浏览代码

会员关联项目 最新代码合并

Long 1 周之前
父节点
当前提交
d653d6be0c

+ 0 - 13
fs-service-system/src/main/java/com/fs/store/mapper/FsUserMapper.java

@@ -162,17 +162,6 @@ public interface FsUserMapper
             "order by tui_money desc " +
             "</script>"})
     List<FsUserTuiVO> selectFsUserTuiList(String userId);
-    @Select({"<script> " +
-            "select count(distinct u.user_id) from fs_user u 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 1=1 " +
-            "<if test = 'type != null and  type ==1  '> " +
-            "and  DATE_FORMAT(u.create_time, '%Y-%m-%d')  = DATE_FORMAT(NOW(), '%Y-%m-%d') " +
-            "</if>" +
-            "<if test = 'companyId != null  '> " +
-            "and  cu.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);
 
@@ -188,8 +177,6 @@ public interface FsUserMapper
     @Select("select * from fs_user where course_ma_open_id=#{openId}")
     FsUser selectFsUserByCourseMaOpenId(String openId);
 
-    Long selectCrmCustomerCount(int type, Long companyId);
-
     @Select("select * from fs_user where user_code=#{userCode}")
     FsUser selectFsUserByUserCode(String userCode);
     @Select("select * from fs_user where user_id=#{userId} for update")

+ 4 - 4
fs-service-system/src/main/resources/mapper/store/FsUserMapper.xml

@@ -1849,16 +1849,16 @@
         order by user_id desc
     </select>
     <select id="selectFsUserCount" resultType="java.lang.Long">
-        select count(1) from fs_user
+        select count(distinct u.user_id) from fs_user u 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 1=1
         <if test = "type != null and  type ==1">
-            and DATE_FORMAT(create_time, '%Y-%m-%d')  = DATE_FORMAT(NOW(), '%Y-%m-%d')
+            and DATE_FORMAT(u.create_time, '%Y-%m-%d')  = DATE_FORMAT(NOW(), '%Y-%m-%d')
         </if>
         <if test = "companyId != null">
-            and company_id=#{companyId}
+            and cu.company_id=#{companyId}
         </if>
         <if test="companyUserId != null">
-            and company_user_id = #{companyUserId}
+            and cu.company_user_id = #{companyUserId}
         </if>
     </select>
     <select id="countUserCourse2" resultType="java.util.Map">