#!/bin/bash
ip=$1
phone_no=$2

HOSTNAME='$ip'
PORT='$4'
USERNAME='qa'
PASSWORD='qatest'

date="`date +%Y%m%d%H%M%S`"
date_now=`date + "%Y-%m-%d %T"`

mysql="-h${HOSTNAME} -P${PORT} -u${USERNAME} -p${PASSWORD}"

uid = "SELECT uuid,id from xyqb_user.user where phone_no=${phone_no}"
spider = "INSERT INTO spider_center.user_auth_info (auth_type, last_auth_time, auth_account_name, user_id, auth_status) VALUES(14, ${date}, ${phone_no}, ${uid}, 1),(7, ${date_now}, ${phone_no}, ${uid}, 1),(0,${date_now},${phone_no}, ${uid}, 1);"
        address = "INSERT INTO xyqb_user.address (user_id, province_code, province, city_code, city, district_code, district, address, created_at, updated_at) VALUES("+userid+", 450000, '广西壮族自治区', 450500, '北海市', 450503, '银海区', '海淀区中关村102号', '"+date+"', '"+date+"');"
        contact = "INSERT INTO xyqb_user.contact (user_id, name, phone_no, relation, created_at, updated_at)VALUES("+userid+", '张三', '138888888899', 3, '"+date+"', '"+date+"'),( "+userid+", '李四', '13888888888', 3, '"+date+"', '"+date+"');"
        print:
