diff --git a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/service/impl/ClueBoostServiceImpl.java b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/service/impl/ClueBoostServiceImpl.java index 277f40f9..30676cc1 100644 --- a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/service/impl/ClueBoostServiceImpl.java +++ b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/service/impl/ClueBoostServiceImpl.java @@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.date.DateUnit; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.ObjectUtil; +import com.baiye.common.CommonLog; import com.baiye.constant.DefaultNumberConstants; import com.baiye.feign.SourceClueClient; import com.baiye.modules.agent.repository.ChannelCustomRepository; @@ -111,6 +112,7 @@ public class ClueBoostServiceImpl implements ClueBoostService { // 修改线索为冻结 sourceClueClient.updateTalkClueFreeze(clueBoost.getClueId(), true); clueBoostRepository.save(clueBoostNew); + CommonLog.info("赔付线索.id=" + clueBoost.getClueId()); redisUtils.del(KEY + clueBoostDTO.getClueId()); return; } @@ -123,5 +125,4 @@ public class ClueBoostServiceImpl implements ClueBoostService { redisUtils.set(KEY + clueBoostDTO.getClueId(), clueBoostDTO, 24, TimeUnit.HOURS); } } - -} +} \ No newline at end of file diff --git a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/service/impl/TelephoneCallServiceImpl.java b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/service/impl/TelephoneCallServiceImpl.java index c7365085..fee9a4ec 100644 --- a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/service/impl/TelephoneCallServiceImpl.java +++ b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/telemarkting/service/impl/TelephoneCallServiceImpl.java @@ -211,9 +211,9 @@ public class TelephoneCallServiceImpl implements TelephoneCallService { CommonLog.error("未获取到号码"); return CommonResponse.createByErrorMessage("未获取到号码"); } - if (body.getMemberId() == null) { - CommonLog.error("线索未分配"); - return CommonResponse.createByErrorMessage("线索未分配,请刷新后重试"); + if (body.getMemberId() == null || body.getIsFreeze()) { + CommonLog.error("线索异常"); + return CommonResponse.createByErrorMessage("线索异常,请刷新后重试"); } telephoneCallReqDTO.setTelB("474" + telephoneCallReqDTO.getDisplay() + body.getNid()); //请求呼叫 diff --git a/ad-platform-pojo/src/main/java/com/baiye/model/dto/CallClueDTO.java b/ad-platform-pojo/src/main/java/com/baiye/model/dto/CallClueDTO.java index 9f98fd37..a548cc6d 100644 --- a/ad-platform-pojo/src/main/java/com/baiye/model/dto/CallClueDTO.java +++ b/ad-platform-pojo/src/main/java/com/baiye/model/dto/CallClueDTO.java @@ -1,17 +1,13 @@ package com.baiye.model.dto; import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.*; /** * @author wjt * @date 2023/5/19 */ -@Getter -@Setter +@Data @AllArgsConstructor @NoArgsConstructor public class CallClueDTO { @@ -21,4 +17,7 @@ public class CallClueDTO { @ApiModelProperty(value = "所属组员id") private Long memberId; + + @ApiModelProperty(value = "是否冻结") + private Boolean isFreeze; } diff --git a/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/controller/ClueController.java b/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/controller/ClueController.java index d625be93..ef534642 100644 --- a/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/controller/ClueController.java +++ b/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/controller/ClueController.java @@ -1,6 +1,7 @@ package com.baiye.module.controller; import com.baiye.annotation.Inner; +import com.baiye.annotation.Log; import com.baiye.http.CommonResponse; import com.baiye.model.dto.*; import com.baiye.model.vo.ResSourceLabel; @@ -212,6 +213,7 @@ public class ClueController { @ApiOperation("修改拓客和投流线索的冻结状态") @GetMapping("/updateTalkClueFreeze") @Inner(value = false) + @Log("修改线索的冻结状态") public void updateTalkClueFreeze(@RequestParam("clueId") Long clueId, @RequestParam("isFreeze") Boolean isFreeze) { clueService.updateTalkClueFreeze(clueId, isFreeze); } diff --git a/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/dao/ClueJpa.java b/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/dao/ClueJpa.java index 7c3b374d..d11e908e 100644 --- a/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/dao/ClueJpa.java +++ b/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/dao/ClueJpa.java @@ -568,10 +568,10 @@ public class ClueJpa { public CallClueDTO queryDetailsByClueType(Long clueId, Integer clueType) { StringBuilder sql = null; if (Arrays.asList(ClueTypeConstants.SCREEN_TYPE).contains(clueType)) { - sql = new StringBuilder("select tc.nid as nid ,tcm.member_id as memberId " + + sql = new StringBuilder("select tc.nid as nid ,tcm.member_id as memberId " + "from tb_clue_middle as tcm left join tb_clue as tc on tcm.clue_id =tc.id where tc.id =:clueId "); } else if (Arrays.asList(ClueTypeConstants.TOKER_TYPE).contains(clueType)) { - sql = new StringBuilder("select tc.nid as nid ,tcm.member_id as memberId " + + sql = new StringBuilder("select tc.nid as nid ,tcm.member_id as memberId ,tcm.is_freeze as isFreeze " + "from tb_clue_talk as tcm left join tb_clue as tc on tcm.clue_id =tc.id where tc.id =:clueId "); } assert sql != null; @@ -587,6 +587,11 @@ public class ClueJpa { clueDto.setNid(nid); BigInteger memberId = (BigInteger) row.get("memberId"); clueDto.setMemberId(memberId.longValue()); + if (Arrays.asList(ClueTypeConstants.TOKER_TYPE).contains(clueType)) { + clueDto.setIsFreeze((Boolean) row.get("isFreeze")); + } else { + clueDto.setIsFreeze(false); + } return clueDto; } return null; diff --git a/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/service/impl/ClueServiceImpl.java b/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/service/impl/ClueServiceImpl.java index 9dc241da..3a4fc3c0 100644 --- a/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/service/impl/ClueServiceImpl.java +++ b/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/service/impl/ClueServiceImpl.java @@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import com.baiye.common.CommonLog; import com.baiye.constant.*; import com.baiye.enums.ClueStageEnum; import com.baiye.exception.BadRequestException; @@ -960,6 +961,7 @@ public class ClueServiceImpl implements ClueService { @Override @Transactional(rollbackFor = Exception.class) public void updateTalkClueFreeze(Long clueId, Boolean isFreeze) { + CommonLog.info("赔付线索改为冻结.id=" + clueId); clueTalkRepository.updateTalkClueFreeze(clueId, isFreeze); }