From 74196bcc835d9b76cdd1bc3d85b0dfbe0191fc00 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 31 十二月 2020 19:23:43 +0800
Subject: [PATCH] 活动信息缓存

---
 service-daylucky/src/main/resources/mapper/UserInfoMapper.xml |  323 ++++++++++++++---------------------------------------
 1 files changed, 88 insertions(+), 235 deletions(-)

diff --git a/service-daylucky/src/main/resources/mapper/UserInfoMapper.xml b/service-daylucky/src/main/resources/mapper/UserInfoMapper.xml
index 8dabf6d..557f8c4 100644
--- a/service-daylucky/src/main/resources/mapper/UserInfoMapper.xml
+++ b/service-daylucky/src/main/resources/mapper/UserInfoMapper.xml
@@ -1,5 +1,6 @@
-<?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" >
+<?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.ks.daylucky.mapper.UserInfoMapper">
     <resultMap id="BaseResultMap" type="com.ks.daylucky.pojo.DO.UserInfo">
         <id column="id" property="id" jdbcType="BIGINT"/>
@@ -10,266 +11,118 @@
         <result column="mobile" property="mobile" jdbcType="VARCHAR"/>
         <result column="alipay_uid" property="alipayUid" jdbcType="VARCHAR"/>
         <result column="alipay_portrait" property="alipayPortrait" jdbcType="VARCHAR"/>
+        <result column="alipay_nick_name" property="alipayNickName" jdbcType="VARCHAR"/>
         <result column="wx_open_id" property="wxOpenId" jdbcType="VARCHAR"/>
         <result column="wx_union_id" property="wxUnionId" jdbcType="VARCHAR"/>
         <result column="wx_portrait" property="wxPortrait" jdbcType="VARCHAR"/>
         <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
         <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="type" property="type" jdbcType="INTEGER"/>
+        <result column="state" property="state" jdbcType="INTEGER"/>
+        <result column="state_desc" property="stateDesc" jdbcType="VARCHAR"/>
     </resultMap>
-    <sql id="Base_Column_List">
-    id, app_id, identify_code, nick_name, portrait, mobile, alipay_uid, alipay_portrait, 
-    wx_open_id, wx_union_id, wx_portrait, create_time, update_time
-  </sql>
-    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
-        select
+    <sql id="Base_Column_List">id, app_id, identify_code, nick_name, portrait, mobile, alipay_uid, alipay_portrait, wx_open_id, wx_union_id, wx_portrait, create_time, update_time,alipay_nick_name,`type`,state,state_desc</sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
         <include refid="Base_Column_List"/>
-        from user_info
-        where id = #{id,jdbcType=BIGINT}
+        from user_info where id = #{id,jdbcType=BIGINT}
     </select>
-
-
     <!-- 闈炴ā鏉� -->
-
     <sql id="listWhere">
-        <if test="query.appId!=null">
-            and app_id=#{query.appId}
-        </if>
-
-        <if test="query.identifyCode!=null">
-            and identify_code=#{query.identifyCode}
-        </if>
-
-        <if test="query.key!=null">
-            and nick_name like '${query.key}%'
-        </if>
-
-        <if test="query.mobile!=null">
-            and mobile=#{query.mobile}
-        </if>
-
-        <if test="query.alipayUid!=null">
-            and alipay_uid=#{query.alipayUid}
-        </if>
-
-        <if test="query.wxOpenId!=null">
-            and wx_open_id=#{query.wxOpenId}
-        </if>
-
-        <if test="query.wxUnionId!=null">
-            and wx_union_id=#{query.wxUnionId}
-        </if>
-
-
-        <if test="query.minCreateTime!=null">
-            and create_time>=#{query.minCreateTime}
-        </if>
-
-        <if test="query.maxCreateTime!=null">
-            and #{query.maxCreateTime}>create_time
-        </if>
-
+        <if test="query.appId!=null">and app_id=#{query.appId}</if>
+        <if test="query.identifyCode!=null">and identify_code=#{query.identifyCode}</if>
+        <if test="query.key!=null">and nick_name like '${query.key}%'</if>
+        <if test="query.mobile!=null">and mobile=#{query.mobile}</if>
+        <if test="query.alipayUid!=null">and alipay_uid=#{query.alipayUid}</if>
+        <if test="query.wxOpenId!=null">and wx_open_id=#{query.wxOpenId}</if>
+        <if test="query.wxUnionId!=null">and wx_union_id=#{query.wxUnionId}</if>
+        <if test="query.minCreateTime!=null">and create_time&gt;=#{query.minCreateTime}</if>
+        <if test="query.maxCreateTime!=null">and #{query.maxCreateTime}&gt;create_time</if>
     </sql>
-
-
-    <select id="list" resultMap="BaseResultMap">
-        select
+    <select id="list" resultMap="BaseResultMap">select
         <include refid="Base_Column_List"/>
-        from user_info
-        where 1=1
-        <include refid="listWhere">
-
-        </include>
-
-
+        from user_info where 1=1
+        <include refid="listWhere"/>
         <if test="query.sortList!=null">
-            <foreach collection="query.sortList" item="item" separator="," open=" order by ">
-                #{item}
-            </foreach>
+            <foreach collection="query.sortList" item="item" separator="," open=" order by ">${item}</foreach>
         </if>
         limit #{query.start},#{query.count}
     </select>
-
-
-    <select id="listUserInfo" resultMap="BaseResultMap">
-        select
+    <select id="listUserInfo" resultMap="BaseResultMap">select
         <include refid="Base_Column_List"/>
-        from user_info
-        where 1=1
-        <foreach collection="userList" item="user" open=" and (" close=")" separator=" or ">
-            #{user.uid}=id and app_id=#{user.appId}
+        from user_info where 1=1
+        <foreach collection="userList" item="user" open=" and (" close=")" separator=" or ">#{user.uid}=id and
+            app_id=#{user.appId}
         </foreach>
     </select>
-
-
-    <select id="count" resultType="java.lang.Long">
-        select
-        count(*)
-        from user_info
-        where 1=1
-        <include refid="listWhere">
-
-        </include>
+    <select id="count" resultType="java.lang.Long">select count(*) from user_info where 1=1
+        <include refid="listWhere"/>
     </select>
-
-
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
-    delete from user_info
-    where id = #{id,jdbcType=BIGINT}
-  </delete>
-    <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.ks.daylucky.pojo.DO.UserInfo">
-    insert into user_info (id, app_id, identify_code, 
-      nick_name, portrait, mobile, 
-      alipay_uid, alipay_portrait, wx_open_id, 
-      wx_union_id, wx_portrait, create_time, 
-      update_time)
-    values (#{id,jdbcType=BIGINT}, #{appId,jdbcType=BIGINT}, #{identifyCode,jdbcType=VARCHAR}, 
-      #{nickName,jdbcType=VARCHAR}, #{portrait,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, 
-      #{alipayUid,jdbcType=VARCHAR}, #{alipayPortrait,jdbcType=VARCHAR}, #{wxOpenId,jdbcType=VARCHAR}, 
-      #{wxUnionId,jdbcType=VARCHAR}, #{wxPortrait,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{updateTime,jdbcType=TIMESTAMP})
-  </insert>
+    <delete id="deleteByPrimaryKey"
+            parameterType="java.lang.Long">delete from user_info where id = #{id,jdbcType=BIGINT}</delete>
+    <insert id="insert" useGeneratedKeys="true" keyProperty="id"
+            parameterType="com.ks.daylucky.pojo.DO.UserInfo">insert into user_info (id, app_id, identify_code, nick_name, portrait, mobile, alipay_uid, alipay_portrait, wx_open_id, wx_union_id, wx_portrait, create_time, update_time,alipay_nick_name,type,state,state_desc) values (#{id,jdbcType=BIGINT}, #{appId,jdbcType=BIGINT}, #{identifyCode,jdbcType=VARCHAR}, #{nickName,jdbcType=VARCHAR}, #{portrait,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{alipayUid,jdbcType=VARCHAR}, #{alipayPortrait,jdbcType=VARCHAR}, #{wxOpenId,jdbcType=VARCHAR}, #{wxUnionId,jdbcType=VARCHAR}, #{wxPortrait,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{alipayNickName,jdbcType=VARCHAR},#{type,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{stateDesc,jdbcType=VARCHAR})</insert>
     <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id"
-            parameterType="com.ks.daylucky.pojo.DO.UserInfo">
-        insert into user_info
+            parameterType="com.ks.daylucky.pojo.DO.UserInfo">insert into user_info
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">
-                id,
-            </if>
-            <if test="appId != null">
-                app_id,
-            </if>
-            <if test="identifyCode != null">
-                identify_code,
-            </if>
-            <if test="nickName != null">
-                nick_name,
-            </if>
-            <if test="portrait != null">
-                portrait,
-            </if>
-            <if test="mobile != null">
-                mobile,
-            </if>
-            <if test="alipayUid != null">
-                alipay_uid,
-            </if>
-            <if test="alipayPortrait != null">
-                alipay_portrait,
-            </if>
-            <if test="wxOpenId != null">
-                wx_open_id,
-            </if>
-            <if test="wxUnionId != null">
-                wx_union_id,
-            </if>
-            <if test="wxPortrait != null">
-                wx_portrait,
-            </if>
-            <if test="createTime != null">
-                create_time,
-            </if>
-            <if test="updateTime != null">
-                update_time,
-            </if>
+            <if test="id != null">id,</if>
+            <if test="appId != null">app_id,</if>
+            <if test="identifyCode != null">identify_code,</if>
+            <if test="nickName != null">nick_name,</if>
+            <if test="portrait != null">portrait,</if>
+            <if test="mobile != null">mobile,</if>
+            <if test="alipayUid != null">alipay_uid,</if>
+            <if test="alipayPortrait != null">alipay_portrait,</if>
+            <if test="wxOpenId != null">wx_open_id,</if>
+            <if test="wxUnionId != null">wx_union_id,</if>
+            <if test="wxPortrait != null">wx_portrait,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="alipayNickName != null">alipay_nick_name,</if>
+            <if test="type != null">type,</if>
+            <if test="state != null">state,</if>
+            <if test="stateDesc != null">state_desc,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">
-                #{id,jdbcType=BIGINT},
-            </if>
-            <if test="appId != null">
-                #{appId,jdbcType=BIGINT},
-            </if>
-            <if test="identifyCode != null">
-                #{identifyCode,jdbcType=VARCHAR},
-            </if>
-            <if test="nickName != null">
-                #{nickName,jdbcType=VARCHAR},
-            </if>
-            <if test="portrait != null">
-                #{portrait,jdbcType=VARCHAR},
-            </if>
-            <if test="mobile != null">
-                #{mobile,jdbcType=VARCHAR},
-            </if>
-            <if test="alipayUid != null">
-                #{alipayUid,jdbcType=VARCHAR},
-            </if>
-            <if test="alipayPortrait != null">
-                #{alipayPortrait,jdbcType=VARCHAR},
-            </if>
-            <if test="wxOpenId != null">
-                #{wxOpenId,jdbcType=VARCHAR},
-            </if>
-            <if test="wxUnionId != null">
-                #{wxUnionId,jdbcType=VARCHAR},
-            </if>
-            <if test="wxPortrait != null">
-                #{wxPortrait,jdbcType=VARCHAR},
-            </if>
-            <if test="createTime != null">
-                #{createTime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="updateTime != null">
-                #{updateTime,jdbcType=TIMESTAMP},
-            </if>
+            <if test="id != null">#{id,jdbcType=BIGINT},</if>
+            <if test="appId != null">#{appId,jdbcType=BIGINT},</if>
+            <if test="identifyCode != null">#{identifyCode,jdbcType=VARCHAR},</if>
+            <if test="nickName != null">#{nickName,jdbcType=VARCHAR},</if>
+            <if test="portrait != null">#{portrait,jdbcType=VARCHAR},</if>
+            <if test="mobile != null">#{mobile,jdbcType=VARCHAR},</if>
+            <if test="alipayUid != null">#{alipayUid,jdbcType=VARCHAR},</if>
+            <if test="alipayPortrait != null">#{alipayPortrait,jdbcType=VARCHAR},</if>
+            <if test="wxOpenId != null">#{wxOpenId,jdbcType=VARCHAR},</if>
+            <if test="wxUnionId != null">#{wxUnionId,jdbcType=VARCHAR},</if>
+            <if test="wxPortrait != null">#{wxPortrait,jdbcType=VARCHAR},</if>
+            <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
+            <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
+            <if test="alipayNickName != null">#{alipayNickName,jdbcType=VARCHAR},</if>
+            <if test="type != null">#{type,jdbcType=INTEGER},</if>
+            <if test="state != null">#{state,jdbcType=INTEGER},</if>
+            <if test="stateDesc != null">#{stateDesc,jdbcType=VARCHAR},</if>
         </trim>
     </insert>
-    <update id="updateByPrimaryKeySelective" parameterType="com.ks.daylucky.pojo.DO.UserInfo">
-        update user_info
+    <update id="updateByPrimaryKeySelective" parameterType="com.ks.daylucky.pojo.DO.UserInfo">update user_info
         <set>
-            <if test="appId != null">
-                app_id = #{appId,jdbcType=BIGINT},
-            </if>
-            <if test="identifyCode != null">
-                identify_code = #{identifyCode,jdbcType=VARCHAR},
-            </if>
-            <if test="nickName != null">
-                nick_name = #{nickName,jdbcType=VARCHAR},
-            </if>
-            <if test="portrait != null">
-                portrait = #{portrait,jdbcType=VARCHAR},
-            </if>
-            <if test="mobile != null">
-                mobile = #{mobile,jdbcType=VARCHAR},
-            </if>
-            <if test="alipayUid != null">
-                alipay_uid = #{alipayUid,jdbcType=VARCHAR},
-            </if>
-            <if test="alipayPortrait != null">
-                alipay_portrait = #{alipayPortrait,jdbcType=VARCHAR},
-            </if>
-            <if test="wxOpenId != null">
-                wx_open_id = #{wxOpenId,jdbcType=VARCHAR},
-            </if>
-            <if test="wxUnionId != null">
-                wx_union_id = #{wxUnionId,jdbcType=VARCHAR},
-            </if>
-            <if test="wxPortrait != null">
-                wx_portrait = #{wxPortrait,jdbcType=VARCHAR},
-            </if>
-            <if test="createTime != null">
-                create_time = #{createTime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="updateTime != null">
-                update_time = #{updateTime,jdbcType=TIMESTAMP},
-            </if>
+            <if test="appId != null">app_id = #{appId,jdbcType=BIGINT},</if>
+            <if test="identifyCode != null">identify_code = #{identifyCode,jdbcType=VARCHAR},</if>
+            <if test="nickName != null">nick_name = #{nickName,jdbcType=VARCHAR},</if>
+            <if test="portrait != null">portrait = #{portrait,jdbcType=VARCHAR},</if>
+            <if test="mobile != null">mobile = #{mobile,jdbcType=VARCHAR},</if>
+            <if test="alipayUid != null">alipay_uid = #{alipayUid,jdbcType=VARCHAR},</if>
+            <if test="alipayPortrait != null">alipay_portrait = #{alipayPortrait,jdbcType=VARCHAR},</if>
+            <if test="wxOpenId != null">wx_open_id = #{wxOpenId,jdbcType=VARCHAR},</if>
+            <if test="wxUnionId != null">wx_union_id = #{wxUnionId,jdbcType=VARCHAR},</if>
+            <if test="wxPortrait != null">wx_portrait = #{wxPortrait,jdbcType=VARCHAR},</if>
+            <if test="createTime != null">create_time = #{createTime,jdbcType=TIMESTAMP},</if>
+            <if test="updateTime != null">update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
+            <if test="alipayNickName !=null">alipay_nick_name =#{alipayNickName,jdbcType=VARCHAR},</if>
+            <if test="type !=null">type =#{type,jdbcType=INTEGER},</if>
+            <if test="state !=null">state =#{state,jdbcType=INTEGER},</if>
+            <if test="stateDesc !=null">state_desc =#{stateDesc,jdbcType=VARCHAR},</if>
         </set>
         where id = #{id,jdbcType=BIGINT}
     </update>
-    <update id="updateByPrimaryKey" parameterType="com.ks.daylucky.pojo.DO.UserInfo">
-    update user_info
-    set app_id = #{appId,jdbcType=BIGINT},
-      identify_code = #{identifyCode,jdbcType=VARCHAR},
-      nick_name = #{nickName,jdbcType=VARCHAR},
-      portrait = #{portrait,jdbcType=VARCHAR},
-      mobile = #{mobile,jdbcType=VARCHAR},
-      alipay_uid = #{alipayUid,jdbcType=VARCHAR},
-      alipay_portrait = #{alipayPortrait,jdbcType=VARCHAR},
-      wx_open_id = #{wxOpenId,jdbcType=VARCHAR},
-      wx_union_id = #{wxUnionId,jdbcType=VARCHAR},
-      wx_portrait = #{wxPortrait,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      update_time = #{updateTime,jdbcType=TIMESTAMP}
-    where id = #{id,jdbcType=BIGINT}
-  </update>
-</mapper>
\ No newline at end of file
+    <update id="updateByPrimaryKey"
+            parameterType="com.ks.daylucky.pojo.DO.UserInfo">update user_info set app_id = #{appId,jdbcType=BIGINT}, identify_code = #{identifyCode,jdbcType=VARCHAR}, nick_name = #{nickName,jdbcType=VARCHAR}, portrait = #{portrait,jdbcType=VARCHAR}, mobile = #{mobile,jdbcType=VARCHAR}, alipay_uid = #{alipayUid,jdbcType=VARCHAR}, alipay_portrait = #{alipayPortrait,jdbcType=VARCHAR}, wx_open_id = #{wxOpenId,jdbcType=VARCHAR}, wx_union_id = #{wxUnionId,jdbcType=VARCHAR}, wx_portrait = #{wxPortrait,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP} ,alipay_nick_name =#{alipayNickName,jdbcType=VARCHAR} ,type =#{type,jdbcType=INTEGER} ,state =#{state,jdbcType=INTEGER} ,state_desc =#{stateDesc,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT}</update>
+</mapper>

--
Gitblit v1.8.0