记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
66a3f5f1
Commit
66a3f5f1
authored
Nov 24, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 删除场次 票
parent
b1342929
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
MerchantRdmService.java
...iquidnet/service/merchant/service/MerchantRdmService.java
+19
-19
No files found.
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/MerchantRdmService.java
View file @
66a3f5f1
package
com
.
liquidnet
.
service
.
merchant
.
service
;
package
com
.
liquidnet
.
service
.
merchant
.
service
;
import
com.liquidnet.common.cache.redis.util.Redis
DataSource
Util
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.service.merchant.constant.MerchantRedisConst
;
import
com.liquidnet.service.merchant.constant.MerchantRedisConst
;
import
com.liquidnet.service.merchant.dto.vo.*
;
import
com.liquidnet.service.merchant.dto.vo.*
;
import
com.liquidnet.service.merchant.util.ObjectUtil
;
import
com.liquidnet.service.merchant.util.ObjectUtil
;
...
@@ -16,7 +16,7 @@ import java.util.List;
...
@@ -16,7 +16,7 @@ import java.util.List;
public
class
MerchantRdmService
{
public
class
MerchantRdmService
{
@Autowired
@Autowired
Redis
DataSourceUtil
redisDataSource
Util
;
Redis
Util
redis
Util
;
@Autowired
@Autowired
private
MerchantMongoService
merchantMongoService
;
private
MerchantMongoService
merchantMongoService
;
...
@@ -28,18 +28,18 @@ public class MerchantRdmService {
...
@@ -28,18 +28,18 @@ public class MerchantRdmService {
}
}
String
key
=
MerchantRedisConst
.
INFO_FIELD
.
concat
(
fieldId
);
String
key
=
MerchantRedisConst
.
INFO_FIELD
.
concat
(
fieldId
);
long
s
=
System
.
currentTimeMillis
();
long
s
=
System
.
currentTimeMillis
();
MerchantFieldsVo
vo
=
(
MerchantFieldsVo
)
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
get
(
key
);
MerchantFieldsVo
vo
=
(
MerchantFieldsVo
)
redis
Util
.
get
(
key
);
log
.
debug
(
"#RDM耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
log
.
debug
(
"#RDM耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
if
(
null
==
vo
)
{
if
(
null
==
vo
)
{
vo
=
merchantMongoService
.
getFieldsVoByFieldId
(
fieldId
);
vo
=
merchantMongoService
.
getFieldsVoByFieldId
(
fieldId
);
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
set
(
key
,
vo
);
redis
Util
.
set
(
key
,
vo
);
}
}
return
vo
;
return
vo
;
}
}
// 【场地】更新详情
// 【场地】更新详情
public
boolean
setFieldsVoByFieldId
(
String
fieldId
,
MerchantFieldsVo
vo
)
{
public
boolean
setFieldsVoByFieldId
(
String
fieldId
,
MerchantFieldsVo
vo
)
{
return
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
set
(
MerchantRedisConst
.
INFO_FIELD
.
concat
(
fieldId
),
vo
);
return
redis
Util
.
set
(
MerchantRedisConst
.
INFO_FIELD
.
concat
(
fieldId
),
vo
);
}
}
...
@@ -50,11 +50,11 @@ public class MerchantRdmService {
...
@@ -50,11 +50,11 @@ public class MerchantRdmService {
}
}
String
key
=
MerchantRedisConst
.
INFO_FIELD_APPLIES
.
concat
(
uid
);
String
key
=
MerchantRedisConst
.
INFO_FIELD_APPLIES
.
concat
(
uid
);
long
s
=
System
.
currentTimeMillis
();
long
s
=
System
.
currentTimeMillis
();
List
<
MerchantFieldAppliesVo
>
vos
=
(
List
<
MerchantFieldAppliesVo
>)
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
get
(
key
);
List
<
MerchantFieldAppliesVo
>
vos
=
(
List
<
MerchantFieldAppliesVo
>)
redis
Util
.
get
(
key
);
log
.
debug
(
"#RDM耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
log
.
debug
(
"#RDM耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
if
(
null
==
vos
)
{
if
(
null
==
vos
)
{
vos
=
merchantMongoService
.
getFieldAppliesVosByUid
(
uid
);
vos
=
merchantMongoService
.
getFieldAppliesVosByUid
(
uid
);
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
set
(
key
,
vos
);
redis
Util
.
set
(
key
,
vos
);
}
}
return
vos
;
return
vos
;
}
}
...
@@ -65,7 +65,7 @@ public class MerchantRdmService {
...
@@ -65,7 +65,7 @@ public class MerchantRdmService {
vos
=
ObjectUtil
.
getMerchantFieldAppliesVoArrayList
();
vos
=
ObjectUtil
.
getMerchantFieldAppliesVoArrayList
();
}
}
vos
.
add
(
vo
);
vos
.
add
(
vo
);
return
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
set
(
MerchantRedisConst
.
INFO_FIELD_APPLIES
.
concat
(
uid
),
vos
);
return
redis
Util
.
set
(
MerchantRedisConst
.
INFO_FIELD_APPLIES
.
concat
(
uid
),
vos
);
}
}
// 【场地申请】删除
// 【场地申请】删除
...
@@ -74,7 +74,7 @@ public class MerchantRdmService {
...
@@ -74,7 +74,7 @@ public class MerchantRdmService {
return
true
;
return
true
;
}
}
vos
.
removeIf
(
r
->
r
.
getFieldApplyId
().
equals
(
vo
.
getFieldApplyId
()));
vos
.
removeIf
(
r
->
r
.
getFieldApplyId
().
equals
(
vo
.
getFieldApplyId
()));
return
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
set
(
MerchantRedisConst
.
INFO_FIELD_APPLIES
.
concat
(
uid
),
vos
);
return
redis
Util
.
set
(
MerchantRedisConst
.
INFO_FIELD_APPLIES
.
concat
(
uid
),
vos
);
}
}
...
@@ -82,7 +82,7 @@ public class MerchantRdmService {
...
@@ -82,7 +82,7 @@ public class MerchantRdmService {
public
List
<
MerchantFieldCheckersVo
>
getFieldCheckersVosByFieldId
(
String
fieldId
)
{
public
List
<
MerchantFieldCheckersVo
>
getFieldCheckersVosByFieldId
(
String
fieldId
)
{
String
key
=
MerchantRedisConst
.
INFO_FIELD_CHECKERS
.
concat
(
fieldId
);
String
key
=
MerchantRedisConst
.
INFO_FIELD_CHECKERS
.
concat
(
fieldId
);
long
s
=
System
.
currentTimeMillis
();
long
s
=
System
.
currentTimeMillis
();
List
<
MerchantFieldCheckersVo
>
vos
=
(
List
<
MerchantFieldCheckersVo
>)
redisDataSourceUtil
.
getRedisKylinUtil
()
.
get
(
key
);
List
<
MerchantFieldCheckersVo
>
vos
=
(
List
<
MerchantFieldCheckersVo
>)
redisUtil
.
get
(
key
);
log
.
debug
(
"#RDM耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
log
.
debug
(
"#RDM耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
return
vos
;
return
vos
;
}
}
...
@@ -93,7 +93,7 @@ public class MerchantRdmService {
...
@@ -93,7 +93,7 @@ public class MerchantRdmService {
vos
=
ObjectUtil
.
getMerchantFieldCheckersVoArrayList
();
vos
=
ObjectUtil
.
getMerchantFieldCheckersVoArrayList
();
}
}
vos
.
add
(
vo
);
vos
.
add
(
vo
);
return
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
set
(
MerchantRedisConst
.
INFO_FIELD_CHECKERS
.
concat
(
fieldId
),
vos
);
return
redis
Util
.
set
(
MerchantRedisConst
.
INFO_FIELD_CHECKERS
.
concat
(
fieldId
),
vos
);
}
}
// 【场地默认验票员】删除
// 【场地默认验票员】删除
...
@@ -102,7 +102,7 @@ public class MerchantRdmService {
...
@@ -102,7 +102,7 @@ public class MerchantRdmService {
return
true
;
return
true
;
}
}
vos
.
removeIf
(
r
->
r
.
getFieldCheckerId
().
equals
(
vo
.
getFieldCheckerId
()));
vos
.
removeIf
(
r
->
r
.
getFieldCheckerId
().
equals
(
vo
.
getFieldCheckerId
()));
return
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
set
(
MerchantRedisConst
.
INFO_FIELD_CHECKERS
.
concat
(
fieldId
),
vos
);
return
redis
Util
.
set
(
MerchantRedisConst
.
INFO_FIELD_CHECKERS
.
concat
(
fieldId
),
vos
);
}
}
// 【主办】详情
// 【主办】详情
...
@@ -112,18 +112,18 @@ public class MerchantRdmService {
...
@@ -112,18 +112,18 @@ public class MerchantRdmService {
}
}
String
key
=
MerchantRedisConst
.
INFO_SPONSOR
.
concat
(
sponsorId
);
String
key
=
MerchantRedisConst
.
INFO_SPONSOR
.
concat
(
sponsorId
);
long
s
=
System
.
currentTimeMillis
();
long
s
=
System
.
currentTimeMillis
();
MerchantSponsorsVo
vo
=
(
MerchantSponsorsVo
)
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
get
(
key
);
MerchantSponsorsVo
vo
=
(
MerchantSponsorsVo
)
redis
Util
.
get
(
key
);
log
.
debug
(
"#RDM耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
log
.
debug
(
"#RDM耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
if
(
null
==
vo
)
{
if
(
null
==
vo
)
{
vo
=
merchantMongoService
.
getSponsorsVoBySponsorId
(
sponsorId
);
vo
=
merchantMongoService
.
getSponsorsVoBySponsorId
(
sponsorId
);
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
set
(
key
,
vo
);
redis
Util
.
set
(
key
,
vo
);
}
}
return
vo
;
return
vo
;
}
}
// 【主办】更新详情
// 【主办】更新详情
public
boolean
setSponsorsVoBySponsorId
(
String
sponsorId
,
MerchantSponsorsVo
vo
)
{
public
boolean
setSponsorsVoBySponsorId
(
String
sponsorId
,
MerchantSponsorsVo
vo
)
{
return
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
set
(
MerchantRedisConst
.
INFO_SPONSOR
.
concat
(
sponsorId
),
vo
);
return
redis
Util
.
set
(
MerchantRedisConst
.
INFO_SPONSOR
.
concat
(
sponsorId
),
vo
);
}
}
// 【主办申请】我的列表
// 【主办申请】我的列表
...
@@ -133,11 +133,11 @@ public class MerchantRdmService {
...
@@ -133,11 +133,11 @@ public class MerchantRdmService {
}
}
String
key
=
MerchantRedisConst
.
INFO_SPONSOR_APPLIES
.
concat
(
uid
);
String
key
=
MerchantRedisConst
.
INFO_SPONSOR_APPLIES
.
concat
(
uid
);
long
s
=
System
.
currentTimeMillis
();
long
s
=
System
.
currentTimeMillis
();
List
<
MerchantSponsorAppliesVo
>
vos
=
(
List
<
MerchantSponsorAppliesVo
>)
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
get
(
key
);
List
<
MerchantSponsorAppliesVo
>
vos
=
(
List
<
MerchantSponsorAppliesVo
>)
redis
Util
.
get
(
key
);
log
.
debug
(
"#RDM耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
log
.
debug
(
"#RDM耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
if
(
null
==
vos
)
{
if
(
null
==
vos
)
{
vos
=
merchantMongoService
.
getSponsorAppliesVosByUid
(
uid
);
vos
=
merchantMongoService
.
getSponsorAppliesVosByUid
(
uid
);
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
set
(
key
,
vos
);
redis
Util
.
set
(
key
,
vos
);
}
}
return
vos
;
return
vos
;
}
}
...
@@ -148,7 +148,7 @@ public class MerchantRdmService {
...
@@ -148,7 +148,7 @@ public class MerchantRdmService {
vos
=
ObjectUtil
.
getMerchantSponsorAppliesVoArrayList
();
vos
=
ObjectUtil
.
getMerchantSponsorAppliesVoArrayList
();
}
}
vos
.
add
(
vo
);
vos
.
add
(
vo
);
return
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
set
(
MerchantRedisConst
.
INFO_SPONSOR_APPLIES
.
concat
(
uid
),
vos
);
return
redis
Util
.
set
(
MerchantRedisConst
.
INFO_SPONSOR_APPLIES
.
concat
(
uid
),
vos
);
}
}
// 【主办申请】删除
// 【主办申请】删除
...
@@ -157,6 +157,6 @@ public class MerchantRdmService {
...
@@ -157,6 +157,6 @@ public class MerchantRdmService {
return
true
;
return
true
;
}
}
vos
.
removeIf
(
r
->
r
.
getSponsorApplyId
().
equals
(
vo
.
getSponsorApplyId
()));
vos
.
removeIf
(
r
->
r
.
getSponsorApplyId
().
equals
(
vo
.
getSponsorApplyId
()));
return
redis
DataSourceUtil
.
getRedisKylinUtil
()
.
set
(
MerchantRedisConst
.
INFO_SPONSOR_APPLIES
.
concat
(
uid
),
vos
);
return
redis
Util
.
set
(
MerchantRedisConst
.
INFO_SPONSOR_APPLIES
.
concat
(
uid
),
vos
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment