This commit is contained in:
苏竹红
2023-06-28 19:56:36 +08:00
parent 88f15cc836
commit 4519286928
4 changed files with 9 additions and 7 deletions

View File

@@ -579,7 +579,7 @@
<select id="getLineFollowHistoryList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM hy_partner_line_info
where (deleted = 1 or (deleted=0 and line_status=0 and close_time is not null))
where (deleted = 1 or (deleted=0 and line_status in (0,3) and close_time is not null))
and partner_id = #{partner_id}
</select>

View File

@@ -83,7 +83,7 @@ public interface HyPartnerLineInfoService {
* @param joinReason
* @return
*/
Boolean joinBlackList(LoginUserInfo user, Long lineId, Integer status, String joinReason);
Boolean joinBlackList(LoginUserInfo user, Long lineId, Integer status, String joinReason) throws ApiException;
/**
* 移除黑名单

View File

@@ -244,7 +244,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
}
@Override
public Boolean joinBlackList(LoginUserInfo user, Long lineId, Integer status, String joinReason) {
public Boolean joinBlackList(LoginUserInfo user, Long lineId, Integer status, String joinReason) throws ApiException {
if (lineId==null){
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
@@ -257,10 +257,13 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
hyPartnerLineInfoDO.setRejectRealReason(joinReason);
hyPartnerLineInfoDO.setCloseTime(new Date());
hyPartnerLineInfoDO.setCloseUserId(user.getUserId());
hyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
hyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
CloseFollowRequest closeFollowRequest = new CloseFollowRequest();
closeFollowRequest.setLineId(lineId);
closeFollowRequest.setRejectRealReason(joinReason);
workFlowService.endProcess(WorkflowStageEnum.getWorkflowStageByCode(line.getWorkflowStage()),closeFollowRequest);
//添加日志
LineLogInfo lineLogInfo = new LineLogInfo(line.getPartnerId(), line.getId(), user.getUserId(),
user.getName(), OperateTypeEnum.ADD_BLACKLIST,
@@ -283,7 +286,6 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
HyPartnerLineInfoDO hyPartnerLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(lineId);
HyPartnerLineInfoDO hyPartnerLineInfoDO = new HyPartnerLineInfoDO();
hyPartnerLineInfoDO.setId(lineId);
hyPartnerLineInfoDO.setLineStatus(status);
hyPartnerLineInfoDO.setRemoveBlackReason(removeReason);
hyPartnerLineInfoDO.setDeleted(Boolean.TRUE);
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);

View File

@@ -235,7 +235,7 @@ public class DeskController {
@PostMapping(path = "/joinBlackList")
@ApiOperation("加入黑名单")
public ResponseResult<Boolean> joinBlackList(@RequestBody LineBlackListRequest lineBlackListRequest){
public ResponseResult<Boolean> joinBlackList(@RequestBody LineBlackListRequest lineBlackListRequest) throws ApiException {
return ResponseResult.success(hyPartnerLineInfoService.joinBlackList(CurrentUserHolder.getUser(),lineBlackListRequest.getLineId(),LineStatusEnum.BLACKLIST.getCode(),lineBlackListRequest.getCause()));
}