Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

ct 1 settimana fa
parent
commit
b80ba02963

+ 2 - 1
fs-service/src/main/java/com/fs/fastGpt/mapper/FastGptChatMsgMapper.java

@@ -110,7 +110,8 @@ public interface FastGptChatMsgMapper
 
     @Select("select content from fastgpt_chat_msg where msg_id < #{msgId} and user_id = #{userId} and role_id = #{roleId} and send_type = 1  ORDER BY msg_id desc limit 1")
     String selectUserContent(@Param("msgId") Long msgId,@Param("userId") String userId,@Param("roleId") Long roleId);
-    @Select("select * from fastgpt_chat_msg where  session_id =#{sessionId} and msg_type=1 ORDER BY msg_id DESC  limit 20 ")
+
+//    @Select("select * from fastgpt_chat_msg where  session_id =#{sessionId} and msg_type=1 ORDER BY msg_id DESC  limit 20 ")
     List<FastGptChatMsg> selectFastGptChatMsgByMsgSessionId(Long sessionId);
 
     void insertFastGptEventLog(FastGptEventLog fastGptEventLog);

+ 1 - 11
fs-service/src/main/java/com/fs/his/mapper/FsUserMapper.java

@@ -273,17 +273,7 @@ public interface FsUserMapper
 
     Long selectFsUserPageListCount(FsUserPageListParam param);
 
-    @Select({"<script> " +
-            "select count(1) from fs_user  " +
-            "where 1=1 " +
-            "<if test = 'type != null and  type ==1  '> " +
-            "and  DATE_FORMAT(create_time, '%Y-%m-%d')  = DATE_FORMAT(NOW(), '%Y-%m-%d') " +
-            "</if>" +
-            "<if test = 'companyId != null  '> " +
-            "and  company_id=#{companyId} " +
-            "</if>" +
-            "</script>"})
-    Long selectFsUserCount(@Param("type") int type,@Param("companyId") Long companyId);
+    Long selectFsUserCount(@Param("type") int type,@Param("companyId") Long companyId,@Param("companyUserId") Long companyUserId);
 
 
     int batchUpdateUserCompanyUser(@Param("userIds") List<Long> userIds, @Param("companyUserId") Long companyUserId, @Param("companyId") Long companyId);

+ 1 - 1
fs-service/src/main/java/com/fs/his/service/IFsUserService.java

@@ -142,7 +142,7 @@ public interface IFsUserService
     TableDataInfo selectFsUserPageListNew(FsUserPageListParam param);
 
     Long selectFsUserCount(FsUserPageListParam param);
-    Long selectFsUserCount(int type,Long companyId);
+    Long selectFsUserCount(int type,Long companyI,Long companyUserId);
 
     Map<String, Long> getUserVipCountByCompanyUserId(Long userId);
 

+ 2 - 2
fs-service/src/main/java/com/fs/his/service/impl/FsUserServiceImpl.java

@@ -666,8 +666,8 @@ public class FsUserServiceImpl implements IFsUserService
     }
 
     @Override
-    public Long selectFsUserCount(int type, Long companyId) {
-        return fsUserMapper.selectFsUserCount(type,companyId);
+    public Long selectFsUserCount(int type,Long companyId,Long companyUserId) {
+        return fsUserMapper.selectFsUserCount(type,companyId,companyUserId);
     }
 
     @Override

+ 1 - 1
fs-service/src/main/java/com/fs/statis/service/impl/StatisticsCompanyServiceImpl.java

@@ -772,7 +772,7 @@ public class StatisticsCompanyServiceImpl implements IStatisticsCompanyService {
 
     @Override
     public DealerAggregatedDTO dealerAggregated(Long companyId) {
-        Long dayUserCount=userService.selectFsUserCount(1,companyId);
+        Long dayUserCount=userService.selectFsUserCount(1,companyId, null);
         Long storeOrderCount=storeOrderService.selectFsStoreOrderTotalCount(0,companyId);
         Long dayStoreOrderCount=storeOrderService.selectFsStoreOrderTotalCount(1,companyId);
         Long paymentCount=paymentService.selectFsStorePaymentCount(0,companyId);

+ 1 - 1
fs-service/src/main/java/com/fs/statis/service/impl/StatisticsServiceImpl.java

@@ -677,7 +677,7 @@ public class StatisticsServiceImpl implements IStatisticsService {
 
     @Override
     public DealerAggregatedDTO dealerAggregated() {
-        Long dayUserCount=userService.selectFsUserCount(1,null);
+        Long dayUserCount=userService.selectFsUserCount(1,null, null);
         Long storeOrderCount=storeOrderService.selectFsStoreOrderTotalCount(0,null);
         Long dayStoreOrderCount=storeOrderService.selectFsStoreOrderTotalCount(1,null);
         Long paymentCount=paymentService.selectFsStorePaymentCount(0,null);

+ 1 - 0
fs-service/src/main/resources/mapper/course/FsUserCourseComplaintRecordMapper.xml

@@ -58,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 )
             </if>
         </where>
+        order by cr.create_time desc
     </select>
 
     <select id="selectFsUserCourseComplaintRecordByRecordId" parameterType="Long" resultType="com.fs.course.vo.FsUserCourseComplaintRecordPageListVO">

+ 5 - 3
fs-service/src/main/resources/mapper/his/FsUserMapper.xml

@@ -704,10 +704,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="getUserVipCountByCompanyUserId" resultType="java.util.Map">
         select
-        count(if(date(u.create_time) = curdate(),u.user_id, null)) newVipCount,
-        count(u.user_id) vipCount
+            count(if(date(u.create_time) = curdate(),u.user_id, null)) newVipCount,
+            count(u.user_id) vipCount
         from fs_user u
-        where u.company_user_id = #{companyUserId}
+        left join fs_user_company_user ucu on ucu.user_id = u.user_id
+        left join company_user cu on cu.user_id = ucu.company_user_id
+        where cu.user_id = #{companyUserId}
     </select>
 
     <select id="getUserNumber" resultType="com.fs.store.vo.h5.UserListCountVO">