Pārlūkot izejas kodu

feat:看课记录添加sop筛选

caoliqin 13 stundas atpakaļ
vecāks
revīzija
273f63e8a5

+ 13 - 0
fs-company/src/main/java/com/fs/company/controller/qw/QwSopController.java

@@ -326,4 +326,17 @@ public class QwSopController extends BaseController
         Long companyId = loginUser.getCompany().getCompanyId();
         return R.ok().put("data", companySopRoleService.getRolesByCompanyId(companyId));
     }
+
+    /**
+     * 查询所有企微sop下拉列表
+     */
+    @GetMapping("/info")
+    public TableDataInfo sopInfo(QwSop qwSop)
+    {
+        startPage();
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        qwSop.setCompanyId(loginUser.getCompany().getCompanyId());
+        List<QwSop> qwSops = qwSopService.selectAllQwSopInfo(qwSop);
+        return getDataTable(qwSops);
+    }
 }

+ 5 - 0
fs-service/src/main/java/com/fs/course/param/FsCourseWatchLogListParam.java

@@ -78,4 +78,9 @@ public class FsCourseWatchLogListParam implements Serializable {
 
     //是否是会员
     private Integer isVip;
+
+    /**
+     * sop主键id
+     */
+    private String sopId;
 }

+ 3 - 0
fs-service/src/main/java/com/fs/sop/mapper/QwSopMapper.java

@@ -424,4 +424,7 @@ public interface QwSopMapper extends BaseMapper<QwSop> {
      * **/
     @DataSource(DataSourceType.SOP)
     List<QwSop> getQwSopInfoById(@Param("ids") Set<String> ids);
+
+    @DataSource(DataSourceType.SOP)
+    List<QwSop> selectAllQwSopInfo(QwSop qwSop);
 }

+ 2 - 0
fs-service/src/main/java/com/fs/sop/service/IQwSopService.java

@@ -96,4 +96,6 @@ public interface IQwSopService
     List<QwSopTask> getQwSopTaskList(GetSOPTaskDataParam param);
 
     List<QwSop> selectQwSopByTempId(String tempId);
+
+    List<QwSop> selectAllQwSopInfo(QwSop qwSop);
 }

+ 5 - 0
fs-service/src/main/java/com/fs/sop/service/impl/QwSopServiceImpl.java

@@ -1085,6 +1085,11 @@ public class QwSopServiceImpl implements IQwSopService
         return sopUserLogs.stream().collect(Collectors.groupingBy(SopUserLogs::getSopId));
     }
 
+    @Override
+    public List<QwSop> selectAllQwSopInfo(QwSop qwSop) {
+        return qwSopMapper.selectAllQwSopInfo(qwSop);
+    }
+
     /**
      *新增员工执行SOP
      */

+ 3 - 0
fs-service/src/main/resources/mapper/course/FsCourseWatchLogMapper.xml

@@ -138,6 +138,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                     #{sopId}
                 </foreach>
             </if>
+            <if test="maps.sopId != null  and maps.sopId != '' ">
+                and l.sop_id = #{maps.sopId}
+            </if>
         </where>
          order by l.finish_time desc,l.update_time desc,l.create_time desc
     </select>

+ 24 - 0
fs-service/src/main/resources/mapper/sop/QwSopMapper.xml

@@ -541,4 +541,28 @@
     <select id="getQwSopInfoById" resultType="com.fs.sop.domain.QwSop">
         SELECT id,filter_mode,chat_id FROM qw_sop where id IN <foreach collection="ids" item="item" index="index" open="(" separator="," close=")">#{item}</foreach>
     </select>
+
+    <select id="selectAllQwSopInfo" parameterType="QwSop" resultMap="QwSopResult">
+        <include refid="selectQwSopVo"/>
+        <where>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="status != null "> and status = #{status}</if>
+            <if test="type != null "> and type = #{type}</if>
+            <if test="id != null "> and id = #{id}</if>
+            <if test="companyId != null "> and company_id = #{companyId}</if>
+            <if test="qwUserIds != null  and qwUserIds != ''"> and FIND_IN_SET(#{qwUserIds}, qw_user_ids) > 0</if>
+            <if test="createBy != null  and createBy != ''"> and create_by = #{createBy}</if>
+            <if test="corpId != null  and corpId != ''"> and corp_id = #{corpId}</if>
+            <if test="createTime != null "> and DATE(create_time) = #{createTime}</if>
+            <if test="sendType != null "> and send_type = #{sendType}</if>
+            <if test="expiryTime != null "> and expiry_time = #{expiryTime}</if>
+            <if test="isAutoSop != null "> and is_auto_sop = #{isAutoSop}</if>
+            <if test="autoSopTime != null "> and auto_sop_time = #{autoSopTime}</if>
+            <if test="minSend != null "> and min_send = #{minSend}</if>
+            <if test="maxSend != null "> and max_send = #{maxSend}</if>
+            <if test="stopTime != null "> and stop_time = #{stopTime}</if>
+        </where>
+        order by create_time desc
+    </select>
+
 </mapper>

+ 3 - 0
fs-websocket/src/main/java/com/fs/websocket/bean/SendMsgVO.java

@@ -14,6 +14,9 @@ public class SendMsgVO {
     @ApiModelProperty("用户id")
     private Long userId;
 
+    @ApiModelProperty(value = "用户头像,主要用于评论显示")
+    private String avatar;
+
     @ApiModelProperty(value = "用户名称")
     private String nickName;