Jelajahi Sumber

fs_user nickName和nickname 重复去掉nickname

xgb 4 hari lalu
induk
melakukan
b7bf2f25bd

+ 1 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsUserScrm.java

@@ -42,6 +42,7 @@ public class FsUserScrm extends BaseEntity
     private String avatar;
 
     /** 用户昵称 */
+    @TableField(exist = false)
     @Excel(name = "会员昵称", sort = 1)
     private String nickname;
     private String nickName;

+ 0 - 1
fs-service/src/main/resources/db/tenant-initTable.sql

@@ -9758,7 +9758,6 @@ CREATE TABLE `fs_user` (
     `is_del` tinyint(1) DEFAULT '0',
     `user_code` varchar(50) DEFAULT NULL COMMENT '邀请码',
     `remark` varchar(255) DEFAULT '' COMMENT '用户备注',
-    `nickname` varchar(100) DEFAULT NULL COMMENT '用户昵称',
     `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
     `update_time` datetime DEFAULT NULL COMMENT '最后一次登录时间',
     `last_ip` varchar(100) DEFAULT '' COMMENT '最后一次登录ip',

+ 20 - 21
fs-service/src/main/resources/mapper/hisStore/FsUserScrmMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?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">
@@ -28,7 +28,7 @@
         <result property="isDel"    column="is_del"    />
         <result property="userCode"    column="user_code"    />
         <result property="remark"    column="remark"    />
-        <result property="nickname"    column="nickname"    />
+        <result property="nickname"    column="nick_name"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateTime"    column="update_time"    />
         <result property="lastIp"    column="last_ip"    />
@@ -75,7 +75,7 @@
     </resultMap>
 
     <sql id="selectFsUserVo">
-        select user_id, username, nick_name, avatar, phone, integral, status, `level`, spread_user_id, spread_time, user_type, is_promoter, pay_count, spread_count, addres, tui_user_id, tui_time, tui_user_count, ma_open_id, mp_open_id, union_id, is_del, user_code, remark, nickname, create_time, update_time, last_ip, now_money, brokerage_price, balance, sign_num, integral_status, is_buy, password, real_name, birthday, id_card, jpush_id, is_vip, vip_start_date, vip_end_date, vip_level, vip_status, sex, store_open_id, is_official_account_auth, is_push, is_individuation_push, is_weixin_auth, company_id, company_user_id, register_date, register_code, test, login_device, source, is_add_qw, qw_user_id, is_show, parent_id, course_ma_open_id, history_app, qw_ext_id, `rank`, react,order_count,bind_company_user_id,app_id from fs_user
+        select user_id, username, nick_name, avatar, phone, integral, status, `level`, spread_user_id, spread_time, user_type, is_promoter, pay_count, spread_count, addres, tui_user_id, tui_time, tui_user_count, ma_open_id, mp_open_id, union_id, is_del, user_code, remark, create_time, update_time, last_ip, now_money, brokerage_price, balance, sign_num, integral_status, is_buy, password, real_name, birthday, id_card, jpush_id, is_vip, vip_start_date, vip_end_date, vip_level, vip_status, sex, store_open_id, is_official_account_auth, is_push, is_individuation_push, is_weixin_auth, company_id, company_user_id, register_date, register_code, test, login_device, source, is_add_qw, qw_user_id, is_show, parent_id, course_ma_open_id, history_app, qw_ext_id, `rank`, react,order_count,bind_company_user_id,app_id from fs_user
     </sql>
 
     <select id="selectFsUserList" resultMap="FsUserResult">
@@ -88,7 +88,7 @@
             <if test="birthday != null ">and birthday = #{birthday}</if>
             <if test="idCard != null  and idCard != ''">and id_card = #{idCard}</if>
             <if test="remark != null  and remark != ''">and remark = #{remark}</if>
-            <if test="nickname != null  and nickname != ''">and nickname like concat('%', #{nickname}, '%')</if>
+            <if test="nickname != null  and nickname != ''">and nick_name like concat('%', #{nickname}, '%')</if>
             <if test="avatar != null  and avatar != ''">and avatar = #{avatar}</if>
             <if test="phone != null  and phone != ''">and phone = #{phone}</if>
             <if test="lastIp != null  and lastIp != ''">and last_ip = #{lastIp}</if>
@@ -161,7 +161,7 @@
                 and (
                 <if test="username != null  and username != ''">username like concat('%', #{username}, '%')</if>
                 <if test="userId != null  and userId != ''">or user_id = #{userId}</if>
-                <if test="nickname != null  and nickname != ''">or nickname like concat('%', #{nickname}, '%')</if>
+                <if test="nickname != null  and nickname != ''">or nick_name like concat('%', #{nickname}, '%')</if>
                 <if test="phone != null  and phone != ''">or phone like concat('%',#{phone},'%')</if>
                 )
             </if>
@@ -179,7 +179,7 @@
         user.id_card,
         user.phone,
         user.addres,
-        user.nickname,
+        user.nick_name,
         user.status,
         user.company_id,
         user.company_user_id,
@@ -260,12 +260,12 @@
         LEFT JOIN company_user ON company_user.user_id = u.company_user_id
         LEFT JOIN company on company.company_id = company_user.company_id
         <where>
-        1 = 1 and u.nickname is not null
+        1 = 1 and u.nick_name is not null
         <if test = "maps.userId != null" >
             AND u.user_id = #{maps.userId}
         </if >
         <if test = "maps.nickname != null and  maps.nickname !='' " >
-            AND u.nickname LIKE CONCAT("%",#{maps.nickname},"%")
+            AND u.nick_name LIKE CONCAT("%",#{maps.nickname},"%")
         </if >
         <if test = "maps.phone != null   and  maps.phone !='' " >
         AND u.phone LIKE CONCAT("%",#{maps.phone},"%")
@@ -338,9 +338,9 @@
         LEFT JOIN company_user ON company_user.user_id = ucu.company_user_id
         LEFT JOIN company on company.company_id = company_user.company_id
         <where>
-        1 = 1 and u.nickname is not null
+        1 = 1 and u.nick_name is not null
         <if test = "maps.nickname != null and  maps.nickname !='' " >
-            AND u.nickname LIKE CONCAT("%",#{maps.nickname},"%")
+            AND u.nick_name LIKE CONCAT("%",#{maps.nickname},"%")
         </if >
             <if test = "maps.userId != null and  maps.userId !='' " >
             AND u.user_id = #{maps.userId}
@@ -408,7 +408,7 @@
             <if test="isDel != null">is_del,</if>
             <if test="userCode != null">user_code,</if>
             <if test="remark != null">remark,</if>
-            <if test="nickname != null">nickname,</if>
+            <if test="nickname != null">nick_name,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="lastIp != null">last_ip,</if>
@@ -524,7 +524,6 @@
         update fs_user
         <trim prefix="SET" suffixOverrides=",">
             <if test="nickname != null">nick_name = #{nickname},</if>
-            <if test="nickname != null">nickname = #{nickname},</if>
             <if test="avatar != null">avatar = #{avatar},</if>
             <if test="phone != null">phone = #{phone},</if>
             <if test="integral != null">integral = #{integral},</if>
@@ -598,7 +597,7 @@
     <select id="selectFsUserPageListNew" resultType="com.fs.hisStore.vo.h5.FsUserPageListVO">
         SELECT
         fs_user.user_id,
-        fs_user.nickname,
+        fs_user.nick_name,
         fs_user.avatar,
         fs_user.phone,
         fs_user.status,
@@ -633,7 +632,7 @@
                 </foreach>
             </if>
             <if test="nickname != null and nickname != ''">
-                AND fs_user.nickname like concat('%', #{nickname},'%')
+                AND fs_user.nick_name like concat('%', #{nickname},'%')
             </if>
             <if test="phone != null and phone != ''">
                 AND fs_user.phone like concat('%', #{phone},'%')
@@ -649,7 +648,7 @@
         SELECT
         fs_user.user_id,
         fs_user.avatar,
-        fs_user.nickname,
+        fs_user.nick_name,
         fs_user.phone,
         fs_user_course_count.id,
         fs_user_course_count.watch_course_count,
@@ -691,7 +690,7 @@
             AND fs_user_company_user.project_id = #{projectId}
         </if>
         <if test="keyword != null and keyword !='' ">
-            AND (fs_user.nickname LIKE concat('%',#{keyword},'%')
+            AND (fs_user.nick_name LIKE concat('%',#{keyword},'%')
             or  fs_user.phone LIKE concat('%',#{keyword},'%')
             )
         </if>
@@ -764,7 +763,7 @@
                     fs_user_company_user.create_time desc
                 </when>
                 <when test = "continueMissCourseSort == 1">
-                    fs_user.nickname asc
+                    fs_user.nick_name asc
                 </when>
             </choose>
         </if>
@@ -1701,7 +1700,7 @@
                 </foreach>
             </if>
             <if test="nickname != null and nickname!=''">
-                AND fs_user.nickname like concat(#{nickname},'%')
+                AND fs_user.nick_name like concat(#{nickname},'%')
             </if>
             <if test="phone != null and phone!=''">
                 AND fs_user.phone like concat('%', #{phone},'%')
@@ -1774,11 +1773,11 @@
     <select id="selectUserListByMap" resultType="com.fs.his.vo.OptionsVO">
         select
             u.user_id dictValue,
-            u.nickname dictLabel
+            u.nick_name dictLabel
         from fs_user u
         <where>
             <if test="params.nickName != null and params.nickName != ''">
-                u.nickname like concat('%', #{params.nickName}, '%')
+                u.nick_name like concat('%', #{params.nickName}, '%')
             </if>
         </where>
     </select>
@@ -1908,7 +1907,7 @@
         <where>
             <if test="userName != null  and userName != ''">
                 AND (
-                nickname like concat('%', #{userName}, '%')
+                nick_name like concat('%', #{userName}, '%')
                 or  user_id LIKE concat('%',#{userName},'%')
                 )
             </if>

+ 5 - 5
fs-service/src/main/resources/mapper/hisStore/MergedOrderMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?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">
@@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
       c.company_name,
       cu.user_name AS sales_name,
       cu.nick_name AS company_user_nick_name,
-        ifnull(u.nickname,u.nick_name) as nickname,
+        u.nick_name as nickname,
       u.phone,
       o.real_name,
       o.user_phone,
@@ -208,7 +208,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
       c.company_name,
       cu.user_name AS sales_name,
       cu.nick_name AS company_user_nick_name,
-        ifnull(u.nickname,u.nick_name) as nickname,
+        u.nick_name as nickname,
       u.phone,
       o.real_name,
       o.user_phone,
@@ -364,7 +364,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
       c.company_name,
       cu.user_name AS sales_name,
       cu.nick_name AS company_user_nick_name,
-      ifnull(u.nickname,u.nick_name) as nickname,
+      u.nick_name as nickname,
       u.phone,
       o.user_name AS real_name,
       o.user_phone,
@@ -535,7 +535,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     c.company_name,
     cu.user_name AS sales_name,
     cu.nick_name AS company_user_nick_name,
-    ifnull(u.nickname,u.nick_name) as nickname,
+    u.nick_name as nickname,
     u.phone,
     o.real_name,
     o.user_phone,

+ 3 - 3
fs-service/src/main/resources/mapper/live/LiveDataMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?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">
@@ -534,7 +534,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectLiveUserDetailListBySql" resultType="com.fs.live.vo.LiveUserDetailVo">
         SELECT
             u.user_id AS userId,
-            COALESCE(u.nickname,u.nick_name, '未知用户') AS userName,
+            COALESCE(u.nick_name, '未知用户') AS userName,
             COALESCE(SUM(CASE WHEN lwu.live_flag = 1 AND lwu.replay_flag = 0 THEN lwu.online_seconds ELSE 0 END), 0) AS liveWatchDuration,
             COALESCE(SUM(CASE WHEN lwu.live_flag = 0 AND lwu.replay_flag = 1 THEN lwu.online_seconds ELSE 0 END), 0) AS playbackWatchDuration,
             COALESCE(order_info.orderCount, 0) AS orderCount,
@@ -562,7 +562,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="companyUserId != null">
             and lufe.company_user_id = #{companyUserId}
         </if>
-        GROUP BY u.user_id, u.nick_name, u.nickname, order_info.orderCount, order_info.orderAmount, c.company_name, cu.user_name
+        GROUP BY u.user_id, u.nick_name, order_info.orderCount, order_info.orderAmount, c.company_name, cu.user_name
         ORDER BY order_info.orderAmount DESC, liveWatchDuration DESC
     </select>
 </mapper>

+ 5 - 5
fs-service/src/main/resources/mapper/live/LiveOrderMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?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">
@@ -704,7 +704,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and o.delivery_id =#{maps.deliveryId}
         </if>
         <if test="maps.nickname != null and  maps.nickname !=''">
-            and u.nickname like CONCAT('%',#{maps.nickname},'%')
+            and u.nick_name like CONCAT('%',#{maps.nickname},'%')
         </if>
         <if test="maps.realName != null and  maps.realName !=''">
             and o.user_name like CONCAT('%',#{maps.realName},'%')
@@ -866,7 +866,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and o.delivery_id =#{maps.deliveryId}
             </if>
             <if test="maps.nickname != null and  maps.nickname !=''">
-                and u.nickname like CONCAT('%',#{maps.nickname},'%')
+                and u.nick_name like CONCAT('%',#{maps.nickname},'%')
             </if>
             <if test="maps.realName != null and  maps.realName !=''">
                 and o.user_name like CONCAT('%',#{maps.realName},'%')
@@ -1010,7 +1010,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and o.delivery_id =#{maps.deliveryId}
             </if>
             <if test="maps.nickname != null and  maps.nickname !=''">
-                and u.nickname like CONCAT('%',#{maps.nickname},'%')
+                and u.nick_name like CONCAT('%',#{maps.nickname},'%')
             </if>
             <if test="maps.realName != null and  maps.realName !=''">
                 and o.user_name like CONCAT('%',#{maps.realName},'%')
@@ -1459,7 +1459,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND o.delivery_id = #{maps.deliveryId}
         </if>
         <if test="maps.nickname != null and maps.nickname != ''">
-            AND u.nickname LIKE CONCAT('%', #{maps.nickname}, '%')
+            AND u.nick_name LIKE CONCAT('%', #{maps.nickname}, '%')
         </if>
         <if test="maps.realName != null and maps.realName != ''">
             AND o.user_name LIKE CONCAT('%', #{maps.realName}, '%')

+ 2 - 2
fs-service/src/main/resources/mapper/live/LiveUserLotteryRecordMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?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">
@@ -39,7 +39,7 @@
         where id = #{id}
     </select>
     <select id="selectRecordByLiveIdAndLotteryId"  resultType="com.fs.live.vo.LiveUserLotteryRecordVo">
-        select lulr.*,fu.nickname as user_name,fsp.product_name as product_name
+        select lulr.*,fu.nick_name as user_name,fsp.product_name as product_name
         from live_user_lottery_record lulr left join fs_user fu on lulr.user_id = fu.user_id
                                            left join fs_store_product_scrm fsp on lulr.product_id = fsp.product_id
         where lulr.lottery_id = #{lotteryId} and lulr.live_id = #{liveId}

+ 4 - 4
fs-service/src/main/resources/mapper/live/LiveWatchUserMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?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">
@@ -97,7 +97,7 @@
             lwu.user_id     userId,
             lwu.msg_status  msgStatus,
             lwu.online      online,
-            fu.nickname    nickName,
+            fu.nick_name    nickName,
             fu.avatar       avatar,
             lwu.global_visible  globalVisible,
             lwu.single_visible  singleVisible
@@ -110,7 +110,7 @@
 
     <select id="selectOnlineUserList" resultType="com.fs.live.vo.LiveWatchUserVO">
         select lwu.*,
-        fu.nickname    nickName,
+        fu.nick_name    nickName,
         fu.avatar       avatar
 
         from live_watch_user lwu
@@ -212,7 +212,7 @@
     </select>
 
     <select id="selectLiveWatchAndRegisterUser" resultType="com.fs.live.domain.LiveWatchUser">
-        select a.*,fu.nickname as nick_name from (
+        select a.*,fu.nick_name as nick_name from (
             select lws.* from live_watch_user lws 
             where live_id=#{params.liveId} and online = 0
             <if test="params.liveFlag != null "> and live_flag = #{params.liveFlag}</if>

+ 2 - 2
fs-user-app/src/main/resources/application-dev.yml

@@ -7,8 +7,8 @@ spring:
 #    # redis 配置
     redis:
         # 地址
-        #host: localhost
-        host: 172.27.0.7
+        host: localhost
+#        host: 172.27.0.7
         # 端口,默认为6379
         port: 6379
         # 数据库索引

+ 1 - 1
fs-wx-api/src/main/java/com/fs/app/controller/AppBaseController.java

@@ -2,7 +2,7 @@ package com.fs.app.controller;
 
 
 import com.fs.common.utils.ServletUtils;
-import com.fs.company.utils.JwtUtils;
+import com.fs.app.utils.JwtUtils;
 import io.jsonwebtoken.Claims;
 import org.springframework.beans.factory.annotation.Autowired;
 

+ 1 - 1
fs-wx-api/src/main/java/com/fs/app/interceptor/AuthorizationInterceptor.java

@@ -5,7 +5,7 @@ import com.fs.app.annotation.Login;
 import com.fs.app.exception.FSException;
 import com.fs.common.core.redis.RedisCache;
 import com.fs.common.utils.StringUtils;
-import com.fs.company.utils.JwtUtils;
+import com.fs.app.utils.JwtUtils;
 import io.jsonwebtoken.Claims;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;

+ 1 - 1
fs-service/src/main/java/com/fs/company/utils/JwtUtils.java → fs-wx-api/src/main/java/com/fs/app/utils/JwtUtils.java

@@ -1,4 +1,4 @@
-package com.fs.company.utils;
+package com.fs.app.utils;
 
 import io.jsonwebtoken.Claims;
 import io.jsonwebtoken.Jwts;