Commit 7923bee7 by guojuxing

udesk和tapd关闭状态不同步到gic侧

parent 9a14d86b
......@@ -191,23 +191,24 @@ public class GicTicketApiServiceImpl implements GicTicketApiService{
@Override
public ServiceResponse<String> closeTicket(Integer ticketId) {
// JSONObject param = new JSONObject();
// JSONObject updateJson = new JSONObject();
// updateJson.put("status_id", UdeskStatusEnum.CLOSED.getValue());
// param.put("ticket", updateJson);
// LOGGER.info("更新udesk工单,工单Id:{},更新内容为:{}", ticketId, param.toJSONString());
// String updateTicketRespStr = UdeskHttpClientUtil
// .putUdeskJsonFromJson(UDESK_UPDATE_TICKET + ticketId, param.toJSONString());
// LOGGER.info("更新udesk工单,工单返回为:{}", updateTicketRespStr);
// UdeskTicketDetailDTO updateDetail = JSON.parseObject(updateTicketRespStr, UdeskTicketDetailDTO.class);
// if (updateDetail != null && updateDetail.getCode() == UdeskConstant.UDESK_SUCCESS_CODE) {
// //同步gic工单状态
// udeskEnterpriseService.close(ticketId);
// return ServiceResponse.success(updateDetail.getMessage());
// }
// return ServiceResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), updateDetail.getMessage());
JSONObject param = new JSONObject();
JSONObject updateJson = new JSONObject();
updateJson.put("status_id", UdeskStatusEnum.CLOSED.getValue());
param.put("ticket", updateJson);
LOGGER.info("更新udesk工单,工单Id:{},更新内容为:{}", ticketId, param.toJSONString());
String updateTicketRespStr = UdeskHttpClientUtil
.putUdeskJsonFromJson(UDESK_UPDATE_TICKET + ticketId, param.toJSONString());
LOGGER.info("更新udesk工单,工单返回为:{}", updateTicketRespStr);
UdeskTicketDetailDTO updateDetail = JSON.parseObject(updateTicketRespStr, UdeskTicketDetailDTO.class);
if (updateDetail != null && updateDetail.getCode() == UdeskConstant.UDESK_SUCCESS_CODE) {
//同步gic工单状态
udeskEnterpriseService.close(ticketId);
return ServiceResponse.success();
//todo 同步到tapd关闭
return ServiceResponse.success(updateDetail.getMessage());
}
return ServiceResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), updateDetail.getMessage());
}
@Override
......
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