Commit 28093657 authored by fangxinjiang's avatar fangxinjiang

前端客服手机号码更新-fxj

parent 7930674c
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* @Author fxj
* @Description 同步前端客服及手机号码
* @Date 11:44 2025/2/28
**/
@Data
public class TDomainUpCsVo implements Serializable {
/**
* 前端客服
*/
@Schema(description = "前端客服")
private String name;
/**
* 手机号码
*/
@Schema(description = "手机号码")
private String phone;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String departNo;
}
......@@ -444,4 +444,22 @@ public class TSettleDomainController {
return tSettleDomainService.changeIssueStatus(changeIssueStatusVo);
}
/**
* @Author fxj
* @Description 更新项目前端客服及手机号码--EKP调用接口
* @Date 11:46 2025/2/28
**/
@Operation(summary = "更新项目前端客服及手机号码--EKP调用接口", description = "更新项目前端客服及手机号码--EKP调用接口")
@SysLog("更新项目前端客服及手机号码--EKP调用接口")
@PostMapping("/updateProjectCsInfo")
public R<Boolean> updateProjectCsInfo(@RequestBody String jsonStr) {
try {
String json = jsonStr.replaceAll("%(?![0-9a-fA-F]{2})", "%25");
jsonStr = URLDecoder.decode(json, CommonConstants.UTF8).replace("=", "");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
List<TDomainUpCsVo> list= JSONObject.parseArray(jsonStr, TDomainUpCsVo.class);
return tSettleDomainService.updateProjectCsInfo(list);
}
}
......@@ -137,4 +137,6 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
R<Boolean> updateProjectServerTeam(List<TSettleDomainUpServerTeamVo> list);
R<Boolean> changeIssueStatus(ChangeIssueStatusVo changeIssueStatusVo);
R<Boolean> updateProjectCsInfo(List<TDomainUpCsVo> list);
}
......@@ -516,4 +516,29 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
}
}
}
@Override
public R<Boolean> updateProjectCsInfo(List<TDomainUpCsVo> list) {
TSettleDomain domain;
TSettleDomain tSettleDomainInfo;
try {
for (TDomainUpCsVo vo:list) {
domain = new TSettleDomain();
tSettleDomainInfo = baseMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo,vo.getDepartNo())
.orderByDesc(BaseEntity::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(tSettleDomainInfo)){
domain.setCsName(vo.getName());
domain.setCsPhone(vo.getPhone());
domain.setId(tSettleDomainInfo.getId());
baseMapper.updateById(domain);
}
}
}catch (Exception e){
log.error("EKP同步前端客服及手机号码异常",e);
return R.failed("EKP同步前端客服及手机号码异常!");
}
return R.ok(Boolean.TRUE,CommonConstants.RESULT_DATA_SUCESS);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment