Просмотр исходного кода

新增企微任务相关代码

lqc 4 лет назад
Родитель
Сommit
8bb350bb00

+ 2 - 1
src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxCashScheduleTaskListMapper.java

@@ -2,6 +2,7 @@ package com.mokamrp.privates.mapper.pangu;
 
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.mokamrp.privates.entity.pangu.FosterwxCashScheduleTaskListHandle;
 import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList;
 import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
@@ -18,7 +19,7 @@ import java.util.List;
  */
  */
 @Component
 @Component
 public interface FosterwxCashScheduleTaskListMapper extends BaseMapper<FosterwxCashScheduleTaskList> {
 public interface FosterwxCashScheduleTaskListMapper extends BaseMapper<FosterwxCashScheduleTaskList> {
-    public List<FosterwxCashScheduleTaskList> getList(@Param("ew") LambdaQueryWrapper<FosterwxCashScheduleTaskList> fosterwxCashScheduleTaskListLambdaQueryWrapper, @Param("limit") Integer page, @Param("offset") Integer offset);
+    public List<FosterwxCashScheduleTaskList> getList(@Param("ew") LambdaQueryWrapper<FosterwxCashScheduleTaskList> fosterwxCashScheduleTaskListLambdaQueryWrapper, @Param("limit") Integer page, @Param("offset") Integer offset, @Param("handle") FosterwxCashScheduleTaskListHandle handle);
 
 
     List<FosterwxCashScheduleTaskList> getBannedGhid();
     List<FosterwxCashScheduleTaskList> getBannedGhid();
 }
 }

+ 29 - 12
src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxCashScheduleTaskListMapper.xml

@@ -31,19 +31,36 @@
         id, schedule_id, template_id, task_id, childTaskId, group_id, task_type, remark, task_content, status, err_info, send_time, create_uid, update_uid, create_at, update_at
         id, schedule_id, template_id, task_id, childTaskId, group_id, task_type, remark, task_content, status, err_info, send_time, create_uid, update_uid, create_at, update_at
     </sql>
     </sql>
     <select id="getList" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList">
     <select id="getList" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList">
-        SELECT
-        task_list.*,
-        task_template.template_name,
-        mobile_group.group_name
-        FROM
+        <if test="handle.type == 2">
+            SELECT
+                task_list.*,
+                task_template.template_name,
+                mobile_group.group_name
+            FROM
             pan_fosterwx_cash_schedule_task_list task_list
             pan_fosterwx_cash_schedule_task_list task_list
-                LEFT JOIN pan_fosterwx_cash_task_template task_template ON task_template.id = task_list.template_id
-                LEFT JOIN pan_fosterwx_cash_mobile_group mobile_group ON task_list.group_id = mobile_group.id
-        <where>
-            ${ew.sqlSegment}
-        </where>
-        order by task_list.id desc
-        limit #{limit} offset #{offset}
+            LEFT JOIN pan_fosterwx_cash_task_template task_template ON task_template.id = task_list.template_id
+            LEFT JOIN pan_fosterwx_cash_mobile_group mobile_group ON task_list.group_id = mobile_group.id
+            <where>
+                ${ew.sqlSegment}
+            </where>d
+            order by task_list.id desc
+            limit #{limit} offset #{offset}
+        </if>
+        <if test="handle.type == 1">
+            SELECT
+                task_list.*,
+                task_template.template_name,
+                mobile_group.group_name
+            FROM
+                pan_fosterwx_cash_schedule_task_list task_list
+                    LEFT JOIN pan_fosterwx_cash_task_template task_template ON task_template.id = task_list.template_id
+                    LEFT JOIN pan_fosterwx_cash_mobile_group mobile_group ON task_list.group_id = mobile_group.id
+            <where>
+                ${ew.sqlSegment}
+            </where>
+            order by task_list.id desc
+            limit #{limit} offset #{offset}
+        </if>
     </select>
     </select>
     <select id="getBannedGhid" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList">
     <select id="getBannedGhid" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList">
         SELECT
         SELECT

+ 4 - 1
src/main/java/com/mokamrp/privates/service/pangu/impl/FosterwxCashScheduleTaskListServiceImpl.java

@@ -57,6 +57,8 @@ public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<Fosterw
         Integer pagesize = handle.getPageSize();
         Integer pagesize = handle.getPageSize();
         Integer page = handle.getPage();
         Integer page = handle.getPage();
         LambdaQueryWrapper<FosterwxCashScheduleTaskList> fosterwxCashScheduleTaskListLambdaQueryWrapper = new LambdaQueryWrapper<>();
         LambdaQueryWrapper<FosterwxCashScheduleTaskList> fosterwxCashScheduleTaskListLambdaQueryWrapper = new LambdaQueryWrapper<>();
+        fosterwxCashScheduleTaskListLambdaQueryWrapper.eq(FosterwxCashScheduleTaskList::getType, handle.getType());
+
         // 任务模板名称
         // 任务模板名称
         if (null != handle.getTemplateId())
         if (null != handle.getTemplateId())
             fosterwxCashScheduleTaskListLambdaQueryWrapper.eq(FosterwxCashScheduleTaskList::getTemplateId, handle.getTemplateId());
             fosterwxCashScheduleTaskListLambdaQueryWrapper.eq(FosterwxCashScheduleTaskList::getTemplateId, handle.getTemplateId());
@@ -76,7 +78,8 @@ public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<Fosterw
         if (null != handle.getScheduleId())
         if (null != handle.getScheduleId())
             fosterwxCashScheduleTaskListLambdaQueryWrapper.eq(FosterwxCashScheduleTaskList::getScheduleId, handle.getScheduleId());
             fosterwxCashScheduleTaskListLambdaQueryWrapper.eq(FosterwxCashScheduleTaskList::getScheduleId, handle.getScheduleId());
 
 
-        List<FosterwxCashScheduleTaskList> list = fosterwxCashScheduleTaskListMapper.getList(fosterwxCashScheduleTaskListLambdaQueryWrapper, pagesize, (page - 1) * pagesize);
+        List<FosterwxCashScheduleTaskList> list = fosterwxCashScheduleTaskListMapper.getList(fosterwxCashScheduleTaskListLambdaQueryWrapper, pagesize, (page - 1) * pagesize, handle);
+
         ResHandle<List<FosterwxCashScheduleTaskList>> res = new ResHandle<>();
         ResHandle<List<FosterwxCashScheduleTaskList>> res = new ResHandle<>();
         res.setList(list);
         res.setList(list);
         res.setTotal(Long.valueOf(fosterwxCashScheduleTaskListMapper.selectCount(fosterwxCashScheduleTaskListLambdaQueryWrapper)));
         res.setTotal(Long.valueOf(fosterwxCashScheduleTaskListMapper.selectCount(fosterwxCashScheduleTaskListLambdaQueryWrapper)));