调整后台
This commit is contained in:
		| @@ -9,6 +9,10 @@ | ||||
|         <result property="customer" column="customer"/> | ||||
|         <result property="phone" column="phone"/> | ||||
|         <result property="amount" column="amount"/> | ||||
|         <result property="weight" column="weight"/> | ||||
|         <result property="startTime" column="start_time"/> | ||||
|         <result property="pauseTime" column="pause_time"/> | ||||
|         <result property="status" column="status"/> | ||||
|         <result property="payTypeId" column="pay_type_id"/> | ||||
|         <result property="payType" column="pay_type"/> | ||||
|         <result property="preSaleId" column="pre_sale_id"/> | ||||
| @@ -34,7 +38,10 @@ | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectSysOrderVo"> | ||||
|         select o.order_id, o.review_status, o.customer, o.phone, o.amount, ser.dict_label as serve_time, o.serve_time_id, o.pay_type_id, pay.dict_label as pay_type, o.pre_sale_id, o.create_by, o.create_time, o.after_sale_id, o.update_by, o.update_time, o.nutritionist_id, o.remark, o.nutri_assis_id, o.account_id, acc.dict_label as account, o.planner_id, o.planner_assis_id, o.operator_id, o.operator_assis_id, o.recommender, o.order_time from sys_order o | ||||
|         select o.order_id, o.review_status, o.customer, o.phone, o.amount, o.start_time, o.pause_time, o.status, o.weight, ser.dict_label as serve_time, | ||||
|         o.serve_time_id, o.pay_type_id, pay.dict_label as pay_type, o.pre_sale_id, o.create_by, o.create_time, o.after_sale_id, o.update_by, o.update_time, | ||||
|         o.nutritionist_id, o.remark, o.nutri_assis_id, o.account_id, acc.dict_label as account, o.planner_id, o.planner_assis_id, o.operator_id, o.operator_assis_id, | ||||
|         o.recommender, o.order_time from sys_order o | ||||
|         LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_pay_type') AS pay ON pay.dict_value = o.pay_type_id | ||||
|         LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_account') AS acc ON acc.dict_value = o.account_id | ||||
|         LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_serve_time') AS ser ON ser.dict_value = o.serve_time_id | ||||
| @@ -46,6 +53,7 @@ | ||||
|             <if test="orderId != null  and orderId != ''">and order_id = #{orderId}</if> | ||||
|             <if test="customer != null  and customer != ''">and customer = #{customer}</if> | ||||
|             <if test="phone != null  and phone != ''">and phone = #{phone}</if> | ||||
|             <if test="status != null ">and status = #{status}</if> | ||||
|             <if test="payTypeId != null ">and pay_type_id = #{payTypeId}</if> | ||||
|             <if test="preSaleId != null ">and pre_sale_id = #{preSaleId}</if> | ||||
|             <if test="afterSaleId != null ">and after_sale_id = #{afterSaleId}</if> | ||||
| @@ -70,6 +78,7 @@ | ||||
|             <if test="orderId != null  and orderId != ''">and order_id = #{orderId}</if> | ||||
|             <if test="customer != null  and customer != ''">and customer = #{customer}</if> | ||||
|             <if test="phone != null  and phone != ''">and phone = #{phone}</if> | ||||
|             <if test="status != null ">and status = #{status}</if> | ||||
|             <if test="payTypeId != null ">and pay_type_id = #{payTypeId}</if> | ||||
|             <if test="preSaleId != null ">and pre_sale_id = #{preSaleId}</if> | ||||
|             <if test="afterSaleId != null ">and after_sale_id = #{afterSaleId}</if> | ||||
| @@ -101,6 +110,10 @@ | ||||
|             <if test="customer != null and customer != ''">customer,</if> | ||||
|             <if test="phone != null">phone,</if> | ||||
|             <if test="amount != null">amount,</if> | ||||
|             <if test="status != null">status,</if> | ||||
|             <if test="pauseTime != null">pause_time,</if> | ||||
|             <if test="startTime != null">start_time,</if> | ||||
|             <if test="weight != null">weight,</if> | ||||
|             <if test="payTypeId != null">pay_type_id,</if> | ||||
|             <if test="preSaleId != null">pre_sale_id,</if> | ||||
|             <if test="createBy != null">create_by,</if> | ||||
| @@ -126,6 +139,10 @@ | ||||
|             <if test="customer != null and customer != ''">#{customer},</if> | ||||
|             <if test="phone != null">#{phone},</if> | ||||
|             <if test="amount != null">#{amount},</if> | ||||
|             <if test="status != null">#{status},</if> | ||||
|             <if test="pauseTime != null">#{pauseTime},</if> | ||||
|             <if test="startTime != null">#{startTime},</if> | ||||
|             <if test="weight != null">#{weight},</if> | ||||
|             <if test="payTypeId != null">#{payTypeId},</if> | ||||
|             <if test="preSaleId != null">#{preSaleId},</if> | ||||
|             <if test="createBy != null">#{createBy},</if> | ||||
| @@ -154,6 +171,10 @@ | ||||
|             <if test="customer != null and customer != ''">customer = #{customer},</if> | ||||
|             <if test="phone != null">phone = #{phone},</if> | ||||
|             <if test="amount != null">amount = #{amount},</if> | ||||
|             <if test="weight != null">weight = #{weight},</if> | ||||
|             <if test="status != null">status = #{status},</if> | ||||
|             <if test="pauseTime != null">pause_time = #{pauseTime},</if> | ||||
|             <if test="startTime != null">start_time = #{startTime},</if> | ||||
|             <if test="payTypeId != null">pay_type_id = #{payTypeId},</if> | ||||
|             <if test="preSaleId != null">pre_sale_id = #{preSaleId},</if> | ||||
|             <if test="createBy != null">create_by = #{createBy},</if> | ||||
|   | ||||
| @@ -0,0 +1,110 @@ | ||||
| <?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.stdiet.custom.mapper.SysWxUserInfoMapper"> | ||||
|  | ||||
|     <resultMap type="SysWxUserInfo" id="SysWxUserInfoResult"> | ||||
|         <result property="openid"    column="openid"    /> | ||||
|         <result property="nickName"    column="nick_name"    /> | ||||
|         <result property="appid"    column="appid"    /> | ||||
|         <result property="phone"    column="phone"    /> | ||||
|         <result property="avatarUrl"    column="avatar_url"    /> | ||||
|         <result property="sex"    column="sex"    /> | ||||
|         <result property="city"    column="city"    /> | ||||
|         <result property="province"    column="province"    /> | ||||
|         <result property="country"    column="country"    /> | ||||
|         <result property="createBy"    column="create_by"    /> | ||||
|         <result property="createTime"    column="create_time"    /> | ||||
|         <result property="updateBy"    column="update_by"    /> | ||||
|         <result property="updateTime"    column="update_time"    /> | ||||
|         <result property="remark"    column="remark"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectSysWxUserInfoVo"> | ||||
|         select openid, nick_name, appid, phone, avatar_url, sex, city, province, country, create_by, create_time, update_by, update_time, remark from sys_wx_user_info | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectSysWxUserInfoList" parameterType="SysWxUserInfo" resultMap="SysWxUserInfoResult"> | ||||
|         <include refid="selectSysWxUserInfoVo"/> | ||||
|         <where> | ||||
|             <if test="nickName != null  and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if> | ||||
|             <if test="appid != null  and appid != ''"> and appid = #{appid}</if> | ||||
|             <if test="phone != null  and phone != ''"> and phone = #{phone}</if> | ||||
|             <if test="sex != null  and sex != ''"> and sex = #{sex}</if> | ||||
|         </where> | ||||
|     </select> | ||||
|  | ||||
|     <select id="selectSysWxUserInfoById" parameterType="String" resultMap="SysWxUserInfoResult"> | ||||
|         <include refid="selectSysWxUserInfoVo"/> | ||||
|         where openid = #{openid} | ||||
|     </select> | ||||
|  | ||||
|     <insert id="insertSysWxUserInfo" parameterType="SysWxUserInfo"> | ||||
|         insert into sys_wx_user_info | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="openid != null">openid,</if> | ||||
|             <if test="nickName != null">nick_name,</if> | ||||
|             <if test="appid != null">appid,</if> | ||||
|             <if test="phone != null">phone,</if> | ||||
|             <if test="avatarUrl != null">avatar_url,</if> | ||||
|             <if test="sex != null">sex,</if> | ||||
|             <if test="city != null">city,</if> | ||||
|             <if test="province != null">province,</if> | ||||
|             <if test="country != null">country,</if> | ||||
|             <if test="createBy != null">create_by,</if> | ||||
|             <if test="createTime != null">create_time,</if> | ||||
|             <if test="updateBy != null">update_by,</if> | ||||
|             <if test="updateTime != null">update_time,</if> | ||||
|             <if test="remark != null">remark,</if> | ||||
|         </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="openid != null">#{openid},</if> | ||||
|             <if test="nickName != null">#{nickName},</if> | ||||
|             <if test="appid != null">#{appid},</if> | ||||
|             <if test="phone != null">#{phone},</if> | ||||
|             <if test="avatarUrl != null">#{avatarUrl},</if> | ||||
|             <if test="sex != null">#{sex},</if> | ||||
|             <if test="city != null">#{city},</if> | ||||
|             <if test="province != null">#{province},</if> | ||||
|             <if test="country != null">#{country},</if> | ||||
|             <if test="createBy != null">#{createBy},</if> | ||||
|             <if test="createTime != null">#{createTime},</if> | ||||
|             <if test="updateBy != null">#{updateBy},</if> | ||||
|             <if test="updateTime != null">#{updateTime},</if> | ||||
|             <if test="remark != null">#{remark},</if> | ||||
|         </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateSysWxUserInfo" parameterType="SysWxUserInfo"> | ||||
|         update sys_wx_user_info | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="nickName != null">nick_name = #{nickName},</if> | ||||
|             <if test="appid != null">appid = #{appid},</if> | ||||
|             <if test="phone != null">phone = #{phone},</if> | ||||
|             <if test="avatarUrl != null">avatar_url = #{avatarUrl},</if> | ||||
|             <if test="sex != null">sex = #{sex},</if> | ||||
|             <if test="city != null">city = #{city},</if> | ||||
|             <if test="province != null">province = #{province},</if> | ||||
|             <if test="country != null">country = #{country},</if> | ||||
|             <if test="createBy != null">create_by = #{createBy},</if> | ||||
|             <if test="createTime != null">create_time = #{createTime},</if> | ||||
|             <if test="updateBy != null">update_by = #{updateBy},</if> | ||||
|             <if test="updateTime != null">update_time = #{updateTime},</if> | ||||
|             <if test="remark != null">remark = #{remark},</if> | ||||
|         </trim> | ||||
|         where openid = #{openid} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSysWxUserInfoById" parameterType="String"> | ||||
|         delete from sys_wx_user_info where openid = #{openid} | ||||
|     </delete> | ||||
|  | ||||
|     <delete id="deleteSysWxUserInfoByIds" parameterType="String"> | ||||
|         delete from sys_wx_user_info where openid in | ||||
|         <foreach item="openid" collection="array" open="(" separator="," close=")"> | ||||
|             #{openid} | ||||
|         </foreach> | ||||
|     </delete> | ||||
|  | ||||
| </mapper> | ||||
| @@ -0,0 +1,120 @@ | ||||
| <?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.stdiet.custom.mapper.SysWxUserLogMapper"> | ||||
|  | ||||
|     <resultMap type="SysWxUserLog" id="SysWxUserLogResult"> | ||||
|         <result property="openid"    column="openid"    /> | ||||
|         <result property="weight"    column="weight"    /> | ||||
|         <result property="appid"    column="appid"    /> | ||||
|         <result property="phone"    column="phone"    /> | ||||
|         <result property="sleepTime"    column="sleep_time"    /> | ||||
|         <result property="wakeupTime"    column="wakeup_time"    /> | ||||
|         <result property="sport"    column="sport"    /> | ||||
|         <result property="avatarUrl"    column="avatar_url"    /> | ||||
|         <result property="diet"    column="diet"    /> | ||||
|         <result property="insomnia"    column="insomnia"    /> | ||||
|         <result property="defecation"    column="defecation"    /> | ||||
|         <result property="water"    column="water"    /> | ||||
|         <result property="createBy"    column="create_by"    /> | ||||
|         <result property="createTime"    column="create_time"    /> | ||||
|         <result property="updateBy"    column="update_by"    /> | ||||
|         <result property="updateTime"    column="update_time"    /> | ||||
|         <result property="remark"    column="remark"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectSysWxUserLogVo"> | ||||
|         select openid, weight, appid, phone, sleep_time, wakeup_time, sport, avatar_url, diet, insomnia, defecation, water, create_by, create_time, update_by, update_time, remark from sys_wx_user_log | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectSysWxUserLogList" parameterType="SysWxUserLog" resultMap="SysWxUserLogResult"> | ||||
|         <include refid="selectSysWxUserLogVo"/> | ||||
|         <where> | ||||
|             <if test="appid != null  and appid != ''"> and appid = #{appid}</if> | ||||
|             <if test="phone != null  and phone != ''"> and phone = #{phone}</if> | ||||
|         </where> | ||||
|     </select> | ||||
|  | ||||
|     <select id="selectSysWxUserLogById" parameterType="String" resultMap="SysWxUserLogResult"> | ||||
|         <include refid="selectSysWxUserLogVo"/> | ||||
|         where openid = #{openid} | ||||
|     </select> | ||||
|  | ||||
|     <insert id="insertSysWxUserLog" parameterType="SysWxUserLog"> | ||||
|         insert into sys_wx_user_log | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="openid != null">openid,</if> | ||||
|             <if test="weight != null">weight,</if> | ||||
|             <if test="appid != null">appid,</if> | ||||
|             <if test="phone != null">phone,</if> | ||||
|             <if test="sleepTime != null">sleep_time,</if> | ||||
|             <if test="wakeupTime != null">wakeup_time,</if> | ||||
|             <if test="sport != null">sport,</if> | ||||
|             <if test="avatarUrl != null">avatar_url,</if> | ||||
|             <if test="diet != null">diet,</if> | ||||
|             <if test="insomnia != null">insomnia,</if> | ||||
|             <if test="defecation != null">defecation,</if> | ||||
|             <if test="water != null">water,</if> | ||||
|             <if test="createBy != null">create_by,</if> | ||||
|             <if test="createTime != null">create_time,</if> | ||||
|             <if test="updateBy != null">update_by,</if> | ||||
|             <if test="updateTime != null">update_time,</if> | ||||
|             <if test="remark != null">remark,</if> | ||||
|         </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="openid != null">#{openid},</if> | ||||
|             <if test="weight != null">#{weight},</if> | ||||
|             <if test="appid != null">#{appid},</if> | ||||
|             <if test="phone != null">#{phone},</if> | ||||
|             <if test="sleepTime != null">#{sleepTime},</if> | ||||
|             <if test="wakeupTime != null">#{wakeupTime},</if> | ||||
|             <if test="sport != null">#{sport},</if> | ||||
|             <if test="avatarUrl != null">#{avatarUrl},</if> | ||||
|             <if test="diet != null">#{diet},</if> | ||||
|             <if test="insomnia != null">#{insomnia},</if> | ||||
|             <if test="defecation != null">#{defecation},</if> | ||||
|             <if test="water != null">#{water},</if> | ||||
|             <if test="createBy != null">#{createBy},</if> | ||||
|             <if test="createTime != null">#{createTime},</if> | ||||
|             <if test="updateBy != null">#{updateBy},</if> | ||||
|             <if test="updateTime != null">#{updateTime},</if> | ||||
|             <if test="remark != null">#{remark},</if> | ||||
|         </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateSysWxUserLog" parameterType="SysWxUserLog"> | ||||
|         update sys_wx_user_log | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="weight != null">weight = #{weight},</if> | ||||
|             <if test="appid != null">appid = #{appid},</if> | ||||
|             <if test="phone != null">phone = #{phone},</if> | ||||
|             <if test="sleepTime != null">sleep_time = #{sleepTime},</if> | ||||
|             <if test="wakeupTime != null">wakeup_time = #{wakeupTime},</if> | ||||
|             <if test="sport != null">sport = #{sport},</if> | ||||
|             <if test="avatarUrl != null">avatar_url = #{avatarUrl},</if> | ||||
|             <if test="diet != null">diet = #{diet},</if> | ||||
|             <if test="insomnia != null">insomnia = #{insomnia},</if> | ||||
|             <if test="defecation != null">defecation = #{defecation},</if> | ||||
|             <if test="water != null">water = #{water},</if> | ||||
|             <if test="createBy != null">create_by = #{createBy},</if> | ||||
|             <if test="createTime != null">create_time = #{createTime},</if> | ||||
|             <if test="updateBy != null">update_by = #{updateBy},</if> | ||||
|             <if test="updateTime != null">update_time = #{updateTime},</if> | ||||
|             <if test="remark != null">remark = #{remark},</if> | ||||
|         </trim> | ||||
|         where openid = #{openid} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSysWxUserLogById" parameterType="String"> | ||||
|         delete from sys_wx_user_log where openid = #{openid} | ||||
|     </delete> | ||||
|  | ||||
|     <delete id="deleteSysWxUserLogByIds" parameterType="String"> | ||||
|         delete from sys_wx_user_log where openid in | ||||
|         <foreach item="openid" collection="array" open="(" separator="," close=")"> | ||||
|             #{openid} | ||||
|         </foreach> | ||||
|     </delete> | ||||
|  | ||||
| </mapper> | ||||
		Reference in New Issue
	
	Block a user