<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.newfiber.api.pc.dao.wechat.ApplyAuthMapper"> <select id="vertifyUserExist" resultType="String"> select platfrom_code from nf_monitor.wechat_user where open_id = #{openId} </select> <update id="updateWechatUser" > update nf_monitor.wechat_user set phoneNum = #{phoneNum} ,nick_name = #{phoneNum},user_type = 5, is_audit = 1,status = 1,platfrom_code = '604-1416-6795',update_time = now() where open_id = #{openId} </update> <update id="updateWechatUserAddNickName"> update nf_monitor.wechat_user set phoneNum = #{phoneNum} ,nick_name = #{nickName},user_type = 5, is_audit = 1,status = 1,platfrom_code = '604-1416-6795',update_time = now() where open_id = #{openId} </update> <insert id="insertOmUser" > insert into nf_monitor.om_user (user_account,mobile,password,slt,real_name,user_type,status,org_id,role_id,role_name) values (#{phoneNum},#{phoneNum},'e10adc3949ba59abbe56e057f20f883e','49ba59abbe56e057',#{phoneNum},0,1,1,27,'业主单位' ) </insert> <insert id="insertUserInit"> insert into nf_monitor.user_init(mobile,user_type,platfrom_code,data_platfrom_code,create_time,update_time) values (#{phoneNum},5,'604-1416-6795','17135',now(),now()) </insert> <select id="getInfoByPhone" parameterType="String" resultType="com.newfiber.api.pc.model.wx.WechatUser"> select DISTINCT ou.mobile phoneNum,w.user_type userType,w.platfrom_code platfromCode,ou.real_name as nickName from nf_monitor.om_user ou left join nf_monitor.user_init w on ou.mobile=w.mobile WHERE ou.mobile=#{phoneNum} </select> </mapper>