|
|
@@ -52,6 +52,9 @@ public class FosterwxCashWorkClientController {
|
|
|
@Autowired
|
|
|
private FosterwxCashWorkwxTaskListService fosterwxCashWorkwxTaskListService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private FosterwxCashOasBoxService fosterwxCashOasBoxService;
|
|
|
+
|
|
|
|
|
|
@PostMapping(value = "/getTaskInfo", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
|
|
@ApiOperation(value = "返回凌晨到当前时间的未发送的数据,主体 昵称/团队id 昵称 两两一组必须有数据")
|
|
|
@@ -105,15 +108,30 @@ public class FosterwxCashWorkClientController {
|
|
|
last("LIMIT 1"));
|
|
|
FosterwxCashBoxClientInfo fosterwxCashBoxClientInfo = new FosterwxCashBoxClientInfo();
|
|
|
fosterwxCashBoxClientInfo.setTaskType(fosterwxCashScheduleTaskList.getTaskType());
|
|
|
- if (1 == fosterwxCashScheduleTaskList.getTaskType() || 3 == fosterwxCashScheduleTaskList.getTaskType()) {
|
|
|
- FosterwxCashWorkBoxClientInfo fosterwxCashWorkBoxClientInfo = fosterwxCashWorkBoxClientInfoService.getOne(new LambdaQueryWrapper<FosterwxCashWorkBoxClientInfo>().like(FosterwxCashWorkBoxClientInfo::getGhid, fosterwxCashScheduleTaskList.getBoxGhid()));
|
|
|
+ if (3 == fosterwxCashScheduleTaskList.getTaskType()) {
|
|
|
+ LambdaQueryWrapper<FosterwxCashWorkBoxClientInfo> fosterwxCashWorkBoxClientInfoLambdaQueryWrapper = new LambdaQueryWrapper<FosterwxCashWorkBoxClientInfo>();
|
|
|
+ fosterwxCashWorkBoxClientInfoLambdaQueryWrapper.like(FosterwxCashWorkBoxClientInfo::getWxid, fosterwxCashScheduleTaskList.getBoxGhid());
|
|
|
+ switch (fosterwxCashWorkwxTaskList.getBoxType()) {
|
|
|
+ case 8:
|
|
|
+ // 投放版小程序
|
|
|
+ fosterwxCashWorkBoxClientInfoLambdaQueryWrapper.like(FosterwxCashWorkBoxClientInfo::getEnterpoint, "videoId=" + fosterwxCashWorkwxTaskList.getVideoId() + "&");
|
|
|
+ break;
|
|
|
+ case 26:
|
|
|
+ fosterwxCashWorkBoxClientInfoLambdaQueryWrapper.like(FosterwxCashWorkBoxClientInfo::getEnterpoint, "materialId=" + fosterwxCashWorkwxTaskList.getVideoId() + "&");
|
|
|
+ fosterwxCashWorkBoxClientInfoLambdaQueryWrapper.like(FosterwxCashWorkBoxClientInfo::getEnterpoint, "categoryId=" + fosterwxCashWorkwxTaskList.getTagId() + "&");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ FosterwxCashWorkBoxClientInfo fosterwxCashWorkBoxClientInfo = fosterwxCashWorkBoxClientInfoService.getOne(fosterwxCashWorkBoxClientInfoLambdaQueryWrapper);
|
|
|
+
|
|
|
if (null != fosterwxCashWorkBoxClientInfo) {
|
|
|
FosterwxCashBoxClientInfo.BoxInfo boxInfo = fosterwxCashBoxClientInfo.new BoxInfo();
|
|
|
boxInfo.setGhid(fosterwxCashWorkBoxClientInfo.getGhid());
|
|
|
boxInfo.setWxid(fosterwxCashWorkBoxClientInfo.getWxid());
|
|
|
boxInfo.setName(fosterwxCashWorkBoxClientInfo.getName());
|
|
|
boxInfo.setTitle(fosterwxCashWorkwxTaskList.getTitle());
|
|
|
- boxInfo.setEnterpoint(fosterwxCashScheduleTaskList.getBoxUrl());
|
|
|
+ boxInfo.setEnterpoint(fosterwxCashWorkBoxClientInfo.getEnterpoint());
|
|
|
boxInfo.setHeadimg(fosterwxCashWorkBoxClientInfo.getHeadimg());
|
|
|
boxInfo.setImage_key1(fosterwxCashWorkBoxClientInfo.getImageKey1());
|
|
|
boxInfo.setImage_key2(fosterwxCashWorkBoxClientInfo.getImageKey2());
|
|
|
@@ -122,8 +140,9 @@ public class FosterwxCashWorkClientController {
|
|
|
boxInfo.setApp_type(fosterwxCashWorkBoxClientInfo.getAppType());
|
|
|
boxInfo.setDesc(fosterwxCashWorkBoxClientInfo.getDesc());
|
|
|
fosterwxCashBoxClientInfo.setBoxInfo(boxInfo);
|
|
|
+ } else {
|
|
|
+ log.info("小程序{}无法根据{}{}获取缓存", fosterwxCashScheduleTaskList.getBoxGhid(), fosterwxCashWorkwxTaskList.getVideoId(), fosterwxCashWorkwxTaskList.getTagId());
|
|
|
}
|
|
|
-
|
|
|
} else {
|
|
|
FosterwxCashBoxClientInfo.UrlInfo urlInfo = fosterwxCashBoxClientInfo.new UrlInfo();
|
|
|
urlInfo.setTitle(fosterwxCashWorkwxTaskList.getUrlTitle());
|
|
|
@@ -160,7 +179,8 @@ public class FosterwxCashWorkClientController {
|
|
|
|
|
|
fosterwxMobile = fosterwxMobileService.getOne(new LambdaQueryWrapper<FosterwxMobile>().eq(FosterwxMobile::getMobileNo, handle.getMobileNo()).eq(FosterwxMobile::getWorkWxCorpId, corp.getId()).last("LIMIT 1"));
|
|
|
|
|
|
- return fosterwxMobile;
|
|
|
+ if (null != fosterwxMobile)
|
|
|
+ return fosterwxMobile;
|
|
|
}
|
|
|
|
|
|
// 主体 昵称 组
|
|
|
@@ -169,7 +189,8 @@ public class FosterwxCashWorkClientController {
|
|
|
|
|
|
fosterwxMobile = fosterwxMobileService.getOne(new LambdaQueryWrapper<FosterwxMobile>().eq(FosterwxMobile::getCustserviceName, handle.getNickName()).eq(FosterwxMobile::getWorkWxCorpId, corp.getId()).last("LIMIT 1"));
|
|
|
|
|
|
- return fosterwxMobile;
|
|
|
+ if (null != fosterwxMobile)
|
|
|
+ return fosterwxMobile;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -177,7 +198,8 @@ public class FosterwxCashWorkClientController {
|
|
|
if (null != handle.getNickName() && !handle.getNickName().isEmpty() && null != handle.getTeamId() && !handle.getTeamId().isEmpty()) {
|
|
|
fosterwxMobile = fosterwxMobileService.getOne(new LambdaQueryWrapper<FosterwxMobile>().eq(FosterwxMobile::getTeamId, handle.getTeamId()).eq(FosterwxMobile::getCustserviceName, handle.getNickName()).last("LIMIT 1"));
|
|
|
|
|
|
- return fosterwxMobile;
|
|
|
+ if (null != fosterwxMobile)
|
|
|
+ return fosterwxMobile;
|
|
|
}
|
|
|
|
|
|
return null;
|
|
|
@@ -213,11 +235,7 @@ public class FosterwxCashWorkClientController {
|
|
|
@PostMapping(value = "/saveBoxInfo", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
|
|
@ApiOperation(value = "保存小程序信息,已经保存过的小程序更新处理")
|
|
|
public Object saveBoxInfo(FosterwxCashWorkBoxClientInfo fosterwxCashWorkBoxClientInfo) {
|
|
|
- if (fosterwxCashWorkBoxClientInfoService.count(new LambdaQueryWrapper<FosterwxCashWorkBoxClientInfo>().eq(FosterwxCashWorkBoxClientInfo::getGhid, fosterwxCashWorkBoxClientInfo.getGhid())) == 0) {
|
|
|
- fosterwxCashWorkBoxClientInfoService.save(fosterwxCashWorkBoxClientInfo);
|
|
|
- } else {
|
|
|
- fosterwxCashWorkBoxClientInfoService.update(fosterwxCashWorkBoxClientInfo, new LambdaQueryWrapper<FosterwxCashWorkBoxClientInfo>().eq(FosterwxCashWorkBoxClientInfo::getGhid, fosterwxCashWorkBoxClientInfo.getGhid()));
|
|
|
- }
|
|
|
+ fosterwxCashWorkBoxClientInfoService.save(fosterwxCashWorkBoxClientInfo);
|
|
|
|
|
|
return "新增修改成功!";
|
|
|
}
|