Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-dj-oaapproval
This project
Loading...
Sign in
Toggle navigation
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 08e6ebd7
authored
Aug 27, 2026
by
叶立庆
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v5.8.5' into 'master'
上线合并 See merge request
!4
2 parents
715c2a63
7ae85dbf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
rpc-dj-oaapproval/src/main/java/cn/com/glsx/dj/oaapproval/mapper/old/ServiceMerchantMapper.java
rpc-dj-oaapproval/src/main/java/cn/com/glsx/dj/oaapproval/service/StoreAppRulePublishService.java
rpc-dj-oaapproval/src/main/java/cn/com/glsx/dj/oaapproval/mapper/old/ServiceMerchantMapper.java
0 → 100644
View file @
08e6ebd
package
cn
.
com
.
glsx
.
dj
.
oaapproval
.
mapper
.
old
;
import
cn.com.glsx.dj.smartcarlife.model.ServiceMerchant
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
@Mapper
public
interface
ServiceMerchantMapper
extends
OreMapper
<
ServiceMerchant
>
{
}
rpc-dj-oaapproval/src/main/java/cn/com/glsx/dj/oaapproval/service/StoreAppRulePublishService.java
View file @
08e6ebd
...
@@ -6,6 +6,7 @@ import cn.com.glsx.dj.oaapproval.mapper.StoreApproveSceneMapper;
...
@@ -6,6 +6,7 @@ import cn.com.glsx.dj.oaapproval.mapper.StoreApproveSceneMapper;
import
cn.com.glsx.dj.oaapproval.mapper.StoreCreateBusinessApproveMapper
;
import
cn.com.glsx.dj.oaapproval.mapper.StoreCreateBusinessApproveMapper
;
import
cn.com.glsx.dj.oaapproval.mapper.old.*
;
import
cn.com.glsx.dj.oaapproval.mapper.old.*
;
import
cn.com.glsx.dj.oaapproval.model.store.*
;
import
cn.com.glsx.dj.oaapproval.model.store.*
;
import
cn.com.glsx.dj.smartcarlife.constant.CommonConstants
;
import
cn.com.glsx.dj.smartcarlife.dto.ExpenseCategoryDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.ExpenseCategoryDTO
;
import
cn.com.glsx.dj.smartcarlife.enums.*
;
import
cn.com.glsx.dj.smartcarlife.enums.*
;
import
cn.com.glsx.dj.smartcarlife.model.*
;
import
cn.com.glsx.dj.smartcarlife.model.*
;
...
@@ -104,6 +105,9 @@ public class StoreAppRulePublishService {
...
@@ -104,6 +105,9 @@ public class StoreAppRulePublishService {
@Autowired
@Autowired
private
SmartcarSceneMerchantRefNewMapper
smartcarSceneMerchantRefNewMapper
;
private
SmartcarSceneMerchantRefNewMapper
smartcarSceneMerchantRefNewMapper
;
@Autowired
private
ServiceMerchantMapper
serviceMerchantMapper
;
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
rollbackFor
=
RpcServiceException
.
class
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
rollbackFor
=
RpcServiceException
.
class
)
public
void
publishApprovedData
(
String
businessCode
,
String
updatedBy
,
Date
now
)
{
public
void
publishApprovedData
(
String
businessCode
,
String
updatedBy
,
Date
now
)
{
RpcAssert
.
assertNotEmpty
(
businessCode
,
DefaultErrorEnum
.
DATA_NULL
,
"businessCode is null"
);
RpcAssert
.
assertNotEmpty
(
businessCode
,
DefaultErrorEnum
.
DATA_NULL
,
"businessCode is null"
);
...
@@ -987,6 +991,36 @@ public class StoreAppRulePublishService {
...
@@ -987,6 +991,36 @@ public class StoreAppRulePublishService {
List
<
Integer
>
mainMerchantIdList
=
context
.
merchantRefs
.
stream
()
List
<
Integer
>
mainMerchantIdList
=
context
.
merchantRefs
.
stream
()
.
map
(
StoreAppMerchantRef:
:
getMerchantId
).
collect
(
Collectors
.
toList
());
.
map
(
StoreAppMerchantRef:
:
getMerchantId
).
collect
(
Collectors
.
toList
());
smartcarSceneMerchantRefNewMapper
.
updateOprTime
(
mainMerchantIdList
,
context
.
updatedBy
,
context
.
baseSceneCode
);
smartcarSceneMerchantRefNewMapper
.
updateOprTime
(
mainMerchantIdList
,
context
.
updatedBy
,
context
.
baseSceneCode
);
// 如果是精品升级场景,需要更新精品升级场景的字段
if
(
context
.
baseSceneCode
!=
null
&&
context
.
baseSceneCode
.
equals
(
BaseSceneEnum
.
QUALITY_UPGRADE
.
getBaseSceneCode
())){
for
(
Integer
merchantId:
mainMerchantIdList
)
{
updateServiceMerchantOpenDate
(
merchantId
,
new
Date
());
}
}
}
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
rollbackFor
=
RpcServiceException
.
class
)
public
void
updateServiceMerchantOpenDate
(
Integer
merchantId
,
Date
openDate
){
ServiceMerchant
sm
=
getBaseByMerchantId
(
merchantId
);
if
(
sm
!=
null
&&
sm
.
getOpenDate
()
==
null
)
{
ServiceMerchant
updatedRecord
=
ServiceMerchant
.
builder
().
id
(
sm
.
getId
()).
openDate
(
openDate
)
.
updatedDate
(
new
Date
()).
updatedBy
(
CommonConstants
.
DEFAULT_UPDATE_BY
).
build
();
serviceMerchantMapper
.
updateByPrimaryKeySelective
(
updatedRecord
);
}
}
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
rollbackFor
=
RpcServiceException
.
class
)
public
ServiceMerchant
getBaseByMerchantId
(
Integer
merchantId
){
RpcAssert
.
assertNotNull
(
merchantId
,
DefaultErrorEnum
.
DATA_NULL
,
"merchantId not be null"
);
try
{
ServiceMerchant
condition
=
new
ServiceMerchant
();
condition
.
setMerchantId
(
merchantId
);
condition
.
setDeletedFlag
(
DeletedFlagEnum
.
N
.
name
());
return
serviceMerchantMapper
.
selectOne
(
condition
);
}
catch
(
Exception
e
){
log
.
info
(
e
.
getMessage
(),
e
);
throw
new
RpcServiceException
(
DefaultErrorEnum
.
DATABASE_ERROR
,
e
.
getMessage
());
}
}
}
private
MerchantTarget
resolveDistributionTarget
(
StoreAppMerchantRef
merchantRef
,
StoreAppDistributionRule
distribution
,
ApprovalPublishContext
context
)
{
private
MerchantTarget
resolveDistributionTarget
(
StoreAppMerchantRef
merchantRef
,
StoreAppDistributionRule
distribution
,
ApprovalPublishContext
context
)
{
...
...
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