Commit 07947014 authored by 段英荣's avatar 段英荣

add hospital name

parent a7194f29
......@@ -27,9 +27,9 @@ else
MYSQL_DB="alpha"
DINGDING='https://oapi.dingtalk.com/robot/send?access_token=53686301db86625c308a837fd6d26f56629fc69e693d21b0b12499ab54e74805'
else
MYSQL_USER="work"
MYSQL_PASSWORD="BJQaT9VzDcuPBqkd"
MYSQL_HOST="172.16.30.143"
MYSQL_USER="zx_str"
MYSQL_PASSWORD="ZXueX58pStrage"
MYSQL_HOST="172.16.30.141"
MYSQL_DB="zhengxing"
DINGDING='https://oapi.dingtalk.com/robot/send?access_token=53686301db86625c308a837fd6d26f56629fc69e693d21b0b12499ab54e74805'
fi
......@@ -98,6 +98,12 @@ if [[ $last_total_num != $new_total_num ]];then
echo $ROW >> $DICFILE
done
HOSPITAL_SQL="select name from api_hospital where is_online=1"
mysql -h $MYSQL_HOST -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DB -e "$HOSPITAL_SQL" | while IFS= read -r ROW
do
echo $ROW >> $DICFILE
done
cat $DICFILE | sort | uniq > $TMP_DICFILE
mv $TMP_DICFILE $DICFILE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment