Commit ee7a696c by HlQ

[fix] 修复合同同步的 bug

1 parent 8548f1e4
......@@ -150,18 +150,11 @@ public class ContractController {
return contractService.unbindSale(dto);
}
/*@PostMapping("/contractSync")
@SaCheckPermission(value = "contract:sync", orRole = "admin")
@PostMapping("/contractSync")
@SaCheckPermission(value = "contract:", orRole = "admin")
public String manualSyncContract() {
contractRunner.contractSync();
return "成功";
}*/
@PostMapping("/contractSync1")
@SaCheckPermission(value = "contract:sync1", orRole = "admin")
public String manualSyncContract1() {
contractRunner.contractSync1();
return "成功";
}
@PostMapping("/contract/createCRMContract")
......
......@@ -55,7 +55,7 @@ public class ContractRunner {
@Scheduled(cron = "0 0 8-20 * * *")
@Transactional(rollbackFor = Exception.class)
public void contractSync1() {
public void contractSync() {
Long modifyTime = Opt.ofNullable((Long) redissonClient.getBucket(RedisKeyEnum.CONTRACT_SYNC_NEW_TIME.getVal()).get()).orElse(0L);
// 只同步申请日期(原CRM中的签订日期)2024-05-07号(含)之后的合同
......@@ -121,7 +121,7 @@ public class ContractRunner {
.uri("/pro/v2/api/contract/list")
.contentType(MediaType.APPLICATION_JSON)
.header("sign", SecureUtil.sha256(jsonR.toString() + token))
.body(json.toString())
.body(jsonR.toString())
.retrieve()
.body(JSONObject.class);
var jsonArrR = jobR.getJSONObject("result").getJSONArray("list");
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!