Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李苗
/
Vion-DevOps
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ee7a696c
authored
Aug 26, 2024
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[fix] 修复合同同步的 bug
1 parent
8548f1e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
src/main/java/vion/controller/ContractController.java
src/main/java/vion/cron/ContractRunner.java
src/main/java/vion/controller/ContractController.java
View file @
ee7a696
...
@@ -150,18 +150,11 @@ public class ContractController {
...
@@ -150,18 +150,11 @@ public class ContractController {
return
contractService
.
unbindSale
(
dto
);
return
contractService
.
unbindSale
(
dto
);
}
}
/*
@PostMapping("/contractSync")
@PostMapping
(
"/contractSync"
)
@SaCheckPermission(value = "contract:
sync
", orRole = "admin")
@SaCheckPermission
(
value
=
"contract:"
,
orRole
=
"admin"
)
public
String
manualSyncContract
()
{
public
String
manualSyncContract
()
{
contractRunner
.
contractSync
();
contractRunner
.
contractSync
();
return
"成功"
;
return
"成功"
;
}*/
@PostMapping
(
"/contractSync1"
)
@SaCheckPermission
(
value
=
"contract:sync1"
,
orRole
=
"admin"
)
public
String
manualSyncContract1
()
{
contractRunner
.
contractSync1
();
return
"成功"
;
}
}
@PostMapping
(
"/contract/createCRMContract"
)
@PostMapping
(
"/contract/createCRMContract"
)
...
...
src/main/java/vion/cron/ContractRunner.java
View file @
ee7a696
...
@@ -55,7 +55,7 @@ public class ContractRunner {
...
@@ -55,7 +55,7 @@ public class ContractRunner {
@Scheduled
(
cron
=
"0 0 8-20 * * *"
)
@Scheduled
(
cron
=
"0 0 8-20 * * *"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
contractSync
1
()
{
public
void
contractSync
()
{
Long
modifyTime
=
Opt
.
ofNullable
((
Long
)
redissonClient
.
getBucket
(
RedisKeyEnum
.
CONTRACT_SYNC_NEW_TIME
.
getVal
()).
get
()).
orElse
(
0L
);
Long
modifyTime
=
Opt
.
ofNullable
((
Long
)
redissonClient
.
getBucket
(
RedisKeyEnum
.
CONTRACT_SYNC_NEW_TIME
.
getVal
()).
get
()).
orElse
(
0L
);
// 只同步申请日期(原CRM中的签订日期)2024-05-07号(含)之后的合同
// 只同步申请日期(原CRM中的签订日期)2024-05-07号(含)之后的合同
...
@@ -121,7 +121,7 @@ public class ContractRunner {
...
@@ -121,7 +121,7 @@ public class ContractRunner {
.
uri
(
"/pro/v2/api/contract/list"
)
.
uri
(
"/pro/v2/api/contract/list"
)
.
contentType
(
MediaType
.
APPLICATION_JSON
)
.
contentType
(
MediaType
.
APPLICATION_JSON
)
.
header
(
"sign"
,
SecureUtil
.
sha256
(
jsonR
.
toString
()
+
token
))
.
header
(
"sign"
,
SecureUtil
.
sha256
(
jsonR
.
toString
()
+
token
))
.
body
(
json
.
toString
())
.
body
(
json
R
.
toString
())
.
retrieve
()
.
retrieve
()
.
body
(
JSONObject
.
class
);
.
body
(
JSONObject
.
class
);
var
jsonArrR
=
jobR
.
getJSONObject
(
"result"
).
getJSONArray
(
"list"
);
var
jsonArrR
=
jobR
.
getJSONObject
(
"result"
).
getJSONArray
(
"list"
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment