|
@@ -2,6 +2,7 @@ package com.mokamrp.privates.service.pangu.impl;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.mokamrp.privates.entity.ResHandle;
|
|
import com.mokamrp.privates.entity.ResHandle;
|
|
|
import com.mokamrp.privates.entity.pangu.FosterwxCashScheduleTaskListHandle;
|
|
import com.mokamrp.privates.entity.pangu.FosterwxCashScheduleTaskListHandle;
|
|
@@ -16,6 +17,7 @@ import com.mokamrp.privates.service.pangu.FosterwxCashScheduleTaskListService;
|
|
|
import com.mokamrp.privates.service.pangu.FosterwxCashTaskListService;
|
|
import com.mokamrp.privates.service.pangu.FosterwxCashTaskListService;
|
|
|
import com.mokamrp.privates.service.pangu.FosterwxCashWorkwxTaskListService;
|
|
import com.mokamrp.privates.service.pangu.FosterwxCashWorkwxTaskListService;
|
|
|
import com.mokamrp.privates.utils.pangu.redis.task.TaskRedis;
|
|
import com.mokamrp.privates.utils.pangu.redis.task.TaskRedis;
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
@@ -32,6 +34,7 @@ import java.util.List;
|
|
|
* @since 2021-10-08
|
|
* @since 2021-10-08
|
|
|
*/
|
|
*/
|
|
|
@Service
|
|
@Service
|
|
|
|
|
+@Slf4j
|
|
|
public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<FosterwxCashScheduleTaskListMapper, FosterwxCashScheduleTaskList> implements FosterwxCashScheduleTaskListService {
|
|
public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<FosterwxCashScheduleTaskListMapper, FosterwxCashScheduleTaskList> implements FosterwxCashScheduleTaskListService {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -60,33 +63,33 @@ public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<Fosterw
|
|
|
public ResHandle<List<FosterwxCashScheduleTaskList>> getList(FosterwxCashScheduleTaskListHandle handle) {
|
|
public ResHandle<List<FosterwxCashScheduleTaskList>> getList(FosterwxCashScheduleTaskListHandle handle) {
|
|
|
Integer pagesize = handle.getPageSize();
|
|
Integer pagesize = handle.getPageSize();
|
|
|
Integer page = handle.getPage();
|
|
Integer page = handle.getPage();
|
|
|
- LambdaQueryWrapper<FosterwxCashScheduleTaskList> fosterwxCashScheduleTaskListLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
- fosterwxCashScheduleTaskListLambdaQueryWrapper.eq(FosterwxCashScheduleTaskList::getType, handle.getType());
|
|
|
|
|
|
|
+ QueryWrapper<FosterwxCashScheduleTaskList> fosterwxCashScheduleTaskListQueryWrapper = new QueryWrapper<>();
|
|
|
|
|
+ fosterwxCashScheduleTaskListQueryWrapper.eq("task_list.type", handle.getType());
|
|
|
|
|
|
|
|
// 任务模板名称
|
|
// 任务模板名称
|
|
|
if (null != handle.getTemplateId())
|
|
if (null != handle.getTemplateId())
|
|
|
- fosterwxCashScheduleTaskListLambdaQueryWrapper.eq(FosterwxCashScheduleTaskList::getTemplateId, handle.getTemplateId());
|
|
|
|
|
|
|
+ fosterwxCashScheduleTaskListQueryWrapper.eq("task_list.template_id", handle.getTemplateId());
|
|
|
// 创建人
|
|
// 创建人
|
|
|
if (null != handle.getCreateUid())
|
|
if (null != handle.getCreateUid())
|
|
|
- fosterwxCashScheduleTaskListLambdaQueryWrapper.eq(FosterwxCashScheduleTaskList::getCreateUid, handle.getCreateUid());
|
|
|
|
|
|
|
+ fosterwxCashScheduleTaskListQueryWrapper.eq("task_list.create_uid", handle.getCreateUid());
|
|
|
// 状态
|
|
// 状态
|
|
|
if (null != handle.getStatus())
|
|
if (null != handle.getStatus())
|
|
|
- fosterwxCashScheduleTaskListLambdaQueryWrapper.eq(FosterwxCashScheduleTaskList::getStatus, handle.getStatus());
|
|
|
|
|
|
|
+ fosterwxCashScheduleTaskListQueryWrapper.eq("task_list.status", handle.getStatus());
|
|
|
// 发送日期
|
|
// 发送日期
|
|
|
if (null != handle.getSendTimeFrom() && null != handle.getSendTimeTo())
|
|
if (null != handle.getSendTimeFrom() && null != handle.getSendTimeTo())
|
|
|
- fosterwxCashScheduleTaskListLambdaQueryWrapper.between(FosterwxCashScheduleTaskList::getSendTime, handle.getSendTimeFrom(), handle.getSendTimeTo());
|
|
|
|
|
|
|
+ fosterwxCashScheduleTaskListQueryWrapper.between("task_list.send_time", handle.getSendTimeFrom(), handle.getSendTimeTo());
|
|
|
// 账号分组
|
|
// 账号分组
|
|
|
if (null != handle.getGroupId())
|
|
if (null != handle.getGroupId())
|
|
|
- fosterwxCashScheduleTaskListLambdaQueryWrapper.eq(FosterwxCashScheduleTaskList::getGroupId, handle.getGroupId());
|
|
|
|
|
|
|
+ fosterwxCashScheduleTaskListQueryWrapper.eq("task_list.group_id", handle.getGroupId());
|
|
|
// 排期id
|
|
// 排期id
|
|
|
if (null != handle.getScheduleId())
|
|
if (null != handle.getScheduleId())
|
|
|
- fosterwxCashScheduleTaskListLambdaQueryWrapper.eq(FosterwxCashScheduleTaskList::getScheduleId, handle.getScheduleId());
|
|
|
|
|
|
|
+ fosterwxCashScheduleTaskListQueryWrapper.eq("task_list.schedule_id", handle.getScheduleId());
|
|
|
|
|
|
|
|
- List<FosterwxCashScheduleTaskList> list = fosterwxCashScheduleTaskListMapper.getList(fosterwxCashScheduleTaskListLambdaQueryWrapper, pagesize, (page - 1) * pagesize, handle);
|
|
|
|
|
|
|
+ List<FosterwxCashScheduleTaskList> list = fosterwxCashScheduleTaskListMapper.getList(fosterwxCashScheduleTaskListQueryWrapper, 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(fosterwxCashScheduleTaskListMapper.count(fosterwxCashScheduleTaskListQueryWrapper, handle));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -166,6 +169,7 @@ public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<Fosterw
|
|
|
i--;
|
|
i--;
|
|
|
}
|
|
}
|
|
|
fosterwxCashOasBoxService.addSendTextCnt(groupId, ghid);
|
|
fosterwxCashOasBoxService.addSendTextCnt(groupId, ghid);
|
|
|
|
|
+ log.info("typr生成发文需要的信息{}", JSON.toJSONString(tempList));
|
|
|
taskRedis.createUrlByTyper(JSON.toJSONString(tempList));
|
|
taskRedis.createUrlByTyper(JSON.toJSONString(tempList));
|
|
|
tempList.clear();
|
|
tempList.clear();
|
|
|
}
|
|
}
|
|
@@ -221,7 +225,7 @@ public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<Fosterw
|
|
|
sendUrl = "/pages/index/index?type=tuiguang&videoId=" + fosterwxCashTaskList.getVideoId();
|
|
sendUrl = "/pages/index/index?type=tuiguang&videoId=" + fosterwxCashTaskList.getVideoId();
|
|
|
} else {
|
|
} else {
|
|
|
// 盘古版视频
|
|
// 盘古版视频
|
|
|
- sendUrl = String.format("pages/index/index?type=tuiguang&materialId=%d&categoryId=&d", fosterwxCashTaskList.getVideoId(), fosterwxCashTaskList.getTagId());
|
|
|
|
|
|
|
+ sendUrl = String.format("pages/index/index?type=tuiguang&materialId=%d&categoryId=%d", fosterwxCashTaskList.getVideoId(), fosterwxCashTaskList.getTagId());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
fosterwxCashScheduleTaskList.setSendUrl(sendUrl);
|
|
fosterwxCashScheduleTaskList.setSendUrl(sendUrl);
|