记得上下班打卡 | 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
0b5e25a9
Commit
0b5e25a9
authored
Nov 22, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交权限
parent
254ec418
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
152 additions
and
49 deletions
+152
-49
PerformanceStep1Param.java
...uidnet/service/kylin/dto/param/PerformanceStep1Param.java
+4
-5
KylinPerformancePartnerController.java
...erchant/controller/KylinPerformancePartnerController.java
+14
-10
KylinPerformancesPartnerServiceImpl.java
...ant/service/impl/KylinPerformancesPartnerServiceImpl.java
+56
-15
KylinTicketTimesPartnerServiceImpl.java
...hant/service/impl/KylinTicketTimesPartnerServiceImpl.java
+17
-1
KylinTicketsPartnerServiceImpl.java
...merchant/service/impl/KylinTicketsPartnerServiceImpl.java
+37
-6
MongoMerchantUtils.java
...m/liquidnet/service/merchant/util/MongoMerchantUtils.java
+22
-10
RedisMerchantUtils.java
...m/liquidnet/service/merchant/util/RedisMerchantUtils.java
+2
-2
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/param/PerformanceStep1Param.java
View file @
0b5e25a9
...
...
@@ -11,15 +11,14 @@ import java.util.List;
@Data
public
class
PerformanceStep1Param
implements
Serializable
{
@ApiModelProperty
(
value
=
"演出id"
,
example
=
""
)
@ApiModelProperty
(
value
=
"演出id
[创建传0]
"
,
example
=
""
)
private
String
performancesId
;
@ApiModelProperty
(
value
=
"封面图"
,
example
=
"https://img.zhengzai.tv/partner/2019/05/14/5cda2d0520177.png"
)
@NotNull
(
message
=
"封面图不能为空"
)
private
String
imgPoster
;
@ApiModelProperty
(
value
=
"第三方id"
,
example
=
"0"
)
@NotNull
(
message
=
"第三方ID不能为空"
)
@ApiModelProperty
(
value
=
"第三方id"
,
hidden
=
true
,
example
=
"0"
)
private
String
merchantId
;
@ApiModelProperty
(
value
=
"演出名称"
,
example
=
"测试演出"
)
...
...
@@ -52,7 +51,7 @@ public class PerformanceStep1Param implements Serializable {
@NotNull
(
message
=
"主办方ID不能为空"
)
private
String
sponsorId
;
@ApiModelProperty
(
value
=
"主办方类型"
,
example
=
"
1
"
)
@ApiModelProperty
(
value
=
"主办方类型"
,
example
=
"
sponsor
"
)
private
String
sponsorType
;
@ApiModelProperty
(
value
=
"主办方名称"
,
example
=
"主办方名称"
)
...
...
@@ -77,7 +76,7 @@ public class PerformanceStep1Param implements Serializable {
@NotNull
(
message
=
"待支付时间不能为空"
)
private
Integer
payCountdownMinute
;
@ApiModelProperty
(
value
=
"购票须知"
,
hidden
=
true
,
example
=
"[{\"id\":1,\"title\":\"\\u95e8\\u7968\\u4e0d\\u9000\\u4e0d\\u6362\",\"type\":\"image\",\"url\":\"http:\\/\\/img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com\\/partner\\/2019\\/01\\/21\\/5c45722882a13.png\",\"text\":\"\\u95e8\\u7968\\u4e3a\\u6709\\u4ef7\\u8bc1\\u5238\\uff0c\\u5e76\\u975e\\u5546\\u54c1\\uff0c\\u4e00\\u7ecf\\u552e\\u51fa\\u4e0d\\u4e88\\u9000\\u6362\\u3002\\u56e0\\u201c\\u4e0d\\u53ef\\u6297\\u529b\\u201d\\u5bfc\\u81f4\\u7684\\u6f14\\u51fa\\u53d6\\u6d88\\u6216\\u5ef6\\u671f\\u9664\\u5916\\u3002\",\"sort\":1},{\"id\":3,\"title\":\"\\u4ec5\\u8bbe\\u7ad9\\u5e2d\",\"type\":\"image\",\"url\":\"http:\\/\\/img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com\\/partner\\/2019\\/01\\/21\\/5c456e93db0b9.png\",\"text\":\"\\u672c\\u573a\\u6f14\\u51fa\\u4e0d\\u8bbe\\u5ea7\\u4f4d\\uff0c\\u5747\\u4e3a\\u7ad9\\u5e2d\\u89c2\\u6f14\\u3002\",\"sort\":2},{\"id\":4,\"title\":\"\\u7981\\u6b62\\u4e2a\\u4eba\\u7968\\u52a1\\u4e70\\u5356\",\"type\":\"image\",\"url\":\"http:\\/\\/img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com\\/partner\\/2019\\/01\\/21\\/5c456e5c27644.png\",\"text\":\"\\u4e3a\\u9632\\u6b62\\u4e0d\\u6cd5\\u5206\\u5b50\\u5229\\u7528\\u7968\\u52a1\\u8f6c\\u8ba9\\u8bc8\\u9a97\\u94b1\\u6b3e\\uff0c\\u5efa\\u8bae\\u5e7f\\u5927\\u4e50\\u8ff7\\u4e0d\\u8981\\u8fdb\\u884c\\u4e2a\\u4eba\\u95f4\\u7968\\u52a1\\u4e70\\u5356\\uff0c\\u4e0d\\u8981\\u8f7b\\u6613\\u76f8\\u4fe1\\u6765\\u6e90\\u4e0d\\u660e\\u7684\\u8f6c\\u7968\\uff0c\\u4ee5\\u514d\\u81ea\\u8eab\\u5229\\u76ca\\u53d7\\u5230\\u4fb5\\u5bb3\\u3002\",\"sort\":3}]"
)
@ApiModelProperty
(
value
=
"购票须知"
,
hidden
=
true
,
example
=
"[{\"id\":1,\"title\":\"\\u95e8\\u7968\\u4e0d\\u9000\\u4e0d\\u6362\",\"type\":\"image\",\"url\":\"http:\\/\\/img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com\\/partner\\/2019\\/01\\/21\\/5c45722882a13.png\",\"text\":\"\\u95e8\\u7968\\u4e3a\\u6709\\u4ef7\\u8bc1\\u5238\\uff0c\\u5e76\\u975e\\u5546\\u54c1\\uff0c\\u4e00\\u7ecf\\u552e\\u51fa\\u4e0d\\u4e88\\u9000\\u6362\\u3002\\u56e0\\u201c\\u4e0d\\u53ef\\u6297\\u529b\\u201d\\u5bfc\\u81f4\\u7684\\u6f14\\u51fa\\u53d6\\u6d88\\u6216\\u5ef6\\u671f\\u9664\\u5916\\u3002\",\"sort\":1},{\"id\":3,\"title\":\"\\u4ec5\\u8bbe\\u7ad9\\u5e2d\",\"type\":\"image\",\"url\":\"http:\\/\\/img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com\\/partner\\/2019\\/01\\/21\\/5c456e93db0b9.png\",\"text\":\"\\u672c\\u573a\\u6f14\\u51fa\\u4e0d\\u8bbe\\u5ea7\\u4f4d\\uff0c\\u5747\\u4e3a\\u7ad9\\u5e2d\\u89c2\\u6f14\\u3002\",\"sort\":2},{\"id\":4,\"title\":\"\\u7981\\u6b62\\u4e2a\\u4eba\\u7968\\u52a1\\u4e70\\u5356\",\"type\":\"image\",\"url\":\"http:\\/\\/img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com\\/partner\\/2019\\/01\\/21\\/5c456e5c27644.png\",\"text\":\"\\u4e3a\\u9632\\u6b62\\u4e0d\\u6cd5\\u5206\\u5b50\\u5229\\u7528\\u7968\\u52a1\\u8f6c\\u8ba9\\u8bc8\\u9a97\\u94b1\\u6b3e\\uff0c\\u5efa\\u8bae\\u5e7f\\u5927\\u4e50\\u8ff7\\u4e0d\\u8981\\u8fdb\\u884c\\u4e2a\\u4eba\\u95f4\\u7968\\u52a1\\u4e70\\u5356\\uff0c\\u4e0d\\u8981\\u8f7b\\u6613\\u76f8\\u4fe1\\u6765\\u6e90\\u4e0d\\u660e\\u7684\\u8f6c\\u7968\\uff0c\\u4ee5\\u514d\\u81ea\\u8eab\\u5229\\u76ca\\u53d7\\u5230\\u4fb5\\u5bb3\\u3002\",\"sort\":3}]"
)
private
String
noticeImage
;
@ApiModelProperty
(
value
=
"购票须知 Id 数组"
)
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/controller/KylinPerformancePartnerController.java
View file @
0b5e25a9
...
...
@@ -23,7 +23,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
@Api
(
tags
=
"第三方-演出"
,
position
=
1001
)
@Api
(
tags
=
"第三方-演出"
,
position
=
1001
)
@RestController
@RequestMapping
(
"partner/performance"
)
@Validated
...
...
@@ -35,19 +35,21 @@ public class KylinPerformancePartnerController {
MongoMerchantUtils
mongoMerchantUtils
;
@PostMapping
(
value
=
"list"
)
@ApiOperation
(
value
=
"演出列表"
,
position
=
1
)
@ApiOperation
(
value
=
"演出列表"
,
position
=
1
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
PageInfo
<
PerformancePartnerListDao
>>
getList
(
@RequestBody
@Valid
PerformancePartnerListParam
performancePartnerListParam
)
{
return
performancesPartnerService
.
getList
(
performancePartnerListParam
);
}
@PostMapping
(
value
=
"copy"
)
@ApiOperation
(
value
=
"复制演出"
,
position
=
6
)
@ApiOperation
(
value
=
"复制演出"
,
position
=
6
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
Map
<
String
,
String
>>
copyPerformance
(
@RequestParam
(
"performancesId"
)
@NotNull
(
message
=
"演出ID不能为空"
)
String
performancesId
)
{
String
result
=
performancesPartnerService
.
copyPerformance
(
performancesId
);
if
(
null
==
result
)
{
return
ResponseDto
.
failure
(
"复制失败"
);
}
else
if
(
"无权限"
.
equals
(
result
))
{
return
ResponseDto
.
failure
(
"无权限"
);
}
else
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"performancesId"
,
result
);
...
...
@@ -57,14 +59,14 @@ public class KylinPerformancePartnerController {
@GetMapping
(
value
=
"step1"
)
@ApiOperation
(
value
=
"获取演出第一步数据"
,
position
=
3
)
@ApiOperation
(
value
=
"获取演出第一步数据"
,
position
=
3
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
PerformancePartnerVo
>
getStep1
(
@RequestParam
(
"performancesId"
)
@NotNull
(
message
=
"演出ID不能为空"
)
String
performancesId
)
{
return
performancesPartnerService
.
getStep1
(
performancesId
);
}
@PostMapping
(
value
=
"step1"
)
@ApiOperation
(
value
=
"操作演出第一步"
,
position
=
2
)
@ApiOperation
(
value
=
"操作演出第一步"
,
position
=
2
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
Map
<
String
,
String
>>
Step1
(
@RequestBody
@Valid
PerformanceStep1Param
performanceStep1Param
)
{
String
result
=
performancesPartnerService
.
step1
(
performanceStep1Param
);
...
...
@@ -72,6 +74,8 @@ public class KylinPerformancePartnerController {
return
ResponseDto
.
failure
(
"操作失败"
);
}
else
if
(
result
.
equals
(
"不可修改"
))
{
return
ResponseDto
.
failure
(
result
);
}
else
if
(
"无权限"
.
equals
(
result
))
{
return
ResponseDto
.
failure
(
"无权限"
);
}
else
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"performancesId"
,
result
);
...
...
@@ -81,35 +85,35 @@ public class KylinPerformancePartnerController {
@PostMapping
(
value
=
"step2"
)
@ApiOperation
(
value
=
"操作演出第二步"
,
position
=
4
)
@ApiOperation
(
value
=
"操作演出第二步"
,
position
=
4
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
String
>
step2
(
@RequestBody
@Valid
PerformanceStep2Param
performanceStep2Param
)
{
return
performancesPartnerService
.
step2
(
performanceStep2Param
);
}
@GetMapping
(
value
=
"step2"
)
@ApiOperation
(
value
=
"获取演出第二步数据"
,
position
=
5
)
@ApiOperation
(
value
=
"获取演出第二步数据"
,
position
=
5
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
PerformanceStep2Param
>
getStep2
(
@RequestParam
(
"performancesId"
)
@NotNull
(
message
=
"演出ID不能为空"
)
String
performancesId
)
{
return
performancesPartnerService
.
getStep2
(
performancesId
);
}
@PostMapping
(
value
=
"online"
)
@ApiOperation
(
value
=
"演出上线"
,
position
=
7
)
@ApiOperation
(
value
=
"演出上线"
,
position
=
7
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
String
>
onLinePerformance
(
@RequestParam
(
"performancesId"
)
@NotNull
(
message
=
"演出ID不能为空"
)
String
performancesId
)
{
return
performancesPartnerService
.
onLinePerformance
(
performancesId
);
}
@PostMapping
(
value
=
"outline"
)
@ApiOperation
(
value
=
"演出下线"
,
position
=
8
)
@ApiOperation
(
value
=
"演出下线"
,
position
=
8
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
String
>
outLinePerformance
(
@RequestParam
(
"performancesId"
)
@NotNull
(
message
=
"演出ID不能为空"
)
String
performancesId
)
{
return
performancesPartnerService
.
outLinePerformance
(
performancesId
);
}
@PostMapping
(
value
=
"withdraw"
)
@ApiOperation
(
value
=
"演出撤回"
,
position
=
9
)
@ApiOperation
(
value
=
"演出撤回"
,
position
=
9
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
String
>
withdraw
(
@RequestParam
(
"performancesId"
)
@NotNull
(
message
=
"演出ID不能为空"
)
String
performancesId
)
{
return
performancesPartnerService
.
withdraw
(
performancesId
);
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/impl/KylinPerformancesPartnerServiceImpl.java
View file @
0b5e25a9
...
...
@@ -22,6 +22,7 @@ import com.liquidnet.service.kylin.dto.vo.partner.*;
import
com.liquidnet.service.kylin.service.partner.IKylinPerformancesPartnerService
;
import
com.liquidnet.service.kylin.service.partner.IKylinTicketTimesPartnerService
;
import
com.liquidnet.service.kylin.service.partner.IKylinTicketsPartnerService
;
import
com.liquidnet.service.merchant.constant.MerchantAuthorizationConst
;
import
com.liquidnet.service.merchant.dto.vo.MerchantFieldsVo
;
import
com.liquidnet.service.merchant.util.*
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -72,11 +73,16 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
String
result
;
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
step1Param
.
setMerchantId
(
merchantId
);
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
step1Param
.
getPerformancesId
(),
step1Param
.
getMerchantId
(),
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
"无权限"
;
}
// 无 performancesId 则 创建
if
(
null
==
step1Param
.
getPerformancesId
())
{
result
=
createStep1
(
step1Param
);
}
else
{
// 获取 create 数据 status = 0 或 无数据 创建
PerformancePartnerVo
createParam
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
step1Param
.
getPerformancesId
()
,
step1Param
.
getMerchantId
()
);
PerformancePartnerVo
createParam
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
step1Param
.
getPerformancesId
());
if
(
createParam
==
null
)
{
result
=
createStep1
(
step1Param
);
log
.
info
(
UserPathDto
.
setPartnerData
(
step1Param
.
getMerchantId
(),
"createStep1"
,
step1Param
,
result
));
...
...
@@ -125,7 +131,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
LocalDateTime
timeNow
=
LocalDateTime
.
now
();
String
performanceId
=
step1Param
.
getPerformancesId
();
try
{
PerformancePartnerVo
data
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
performanceId
,
step1Param
.
getMerchantId
()
);
PerformancePartnerVo
data
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
performanceId
);
if
(
data
==
null
||
data
.
getAuditStatus
()
==
null
||
data
.
getAuditStatus
()
==
0
)
{
return
"不可修改"
;
}
...
...
@@ -147,7 +153,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
performancePartnerVo
.
setProjectId
(
data
.
getProjectId
());
mongoMerchantUtils
.
updatePerformancePartnerVoById
(
performancePartnerVo
);
}
else
{
// 无修改记录
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performanceId
,
step1Param
.
getMerchantId
()
);
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performanceId
);
performancePartnerVo
.
setIsTrueName
(
vo
.
getIsTrueName
());
performancePartnerVo
.
setLimitCount
(
vo
.
getLimitCount
());
performancePartnerVo
.
setStatusSell
(
vo
.
getStatusSell
());
...
...
@@ -166,11 +172,16 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
@Override
public
ResponseDto
<
PerformancePartnerVo
>
getStep1
(
String
performancesId
)
{
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
PerformancePartnerVo
data
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
performancesId
,
merchantId
);
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
performancesId
,
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
PerformancePartnerVo
data
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
performancesId
);
if
(
data
==
null
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
20104
));
}
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
data
.
getPerformancesId
()
,
merchantId
);
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
data
.
getPerformancesId
());
if
(
null
!=
vo
)
{
data
.
setStatus
(
vo
.
getAppStatus
());
}
...
...
@@ -182,9 +193,14 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
public
ResponseDto
<
String
>
step2
(
PerformanceStep2Param
step2Param
)
{
ResponseDto
<
String
>
result
=
null
;
step2Param
.
setMerchantId
(
CurrentUtil
.
getCurrentUid
());
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
step2Param
.
getPerformancesId
(),
step2Param
.
getMerchantId
(),
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
// 无 performancesId 则 创建
if
(!
step2Param
.
getPerformancesId
().
isEmpty
())
{
// 获取 create 数据 status = 0 或 无数据 创建
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
step2Param
.
getPerformancesId
()
,
step2Param
.
getMerchantId
()
);
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
step2Param
.
getPerformancesId
());
if
(
vo
==
null
||
vo
.
getAppStatus
()
==
0
||
vo
.
getAppStatus
()
==
4
)
{
result
=
createStep2
(
step2Param
);
log
.
info
(
UserPathDto
.
setPartnerData
(
"0"
,
"createStep2"
,
step2Param
,
result
));
...
...
@@ -206,7 +222,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
// 获取 当前时间 -> 创建时间
LocalDateTime
createdAt
=
LocalDateTime
.
now
();
String
merchantId
=
step2Param
.
getMerchantId
();
boolean
isExistsSubmit
=
mongoMerchantUtils
.
isExistsSubmitPerformancePartner
(
performanceId
,
merchantId
);
boolean
isExistsSubmit
=
mongoMerchantUtils
.
isExistsSubmitPerformancePartner
(
performanceId
);
if
(
isExistsSubmit
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
20112
));
}
...
...
@@ -295,7 +311,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
LinkedList
<
Object
[]>
sqlsDataF
=
CollectionUtil
.
linkedListObjectArr
();
LocalDateTime
now
=
LocalDateTime
.
now
();
// 获取 当前时间 -> 创建时间
boolean
isExistsSubmit
=
mongoMerchantUtils
.
isExistsSubmitPerformancePartner
(
performanceId
,
merchantId
);
boolean
isExistsSubmit
=
mongoMerchantUtils
.
isExistsSubmitPerformancePartner
(
performanceId
);
if
(
isExistsSubmit
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
20112
));
}
...
...
@@ -359,7 +375,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
for
(
KylinTicketPartnerVo
ticketItem
:
ticketList
)
{
//修改 redis库存
if
(
redisMerchantUtils
.
hasKey
(
KylinRedisConst
.
PERFORMANCES_INVENTORY
+
ticketItem
.
getTicketsId
()
+
":"
+
KylinRedisConst
.
SURPLUS_GENERAL
))
{
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performanceId
,
merchantId
);
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performanceId
);
KylinTicketVo
ticketData
=
null
;
for
(
int
x
=
0
;
x
<
vo
.
getTicketTimeList
().
size
();
x
++)
{
KylinTicketTimesVo
ticketTimesData
=
vo
.
getTicketTimeList
().
get
(
x
);
...
...
@@ -425,7 +441,12 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
@Override
public
ResponseDto
<
PerformanceStep2Param
>
getStep2
(
String
performancesId
)
{
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
PerformancePartnerVo
data
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
performancesId
,
merchantId
);
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
performancesId
,
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
PerformancePartnerVo
data
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
performancesId
);
if
(
data
==
null
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
20104
));
}
...
...
@@ -440,7 +461,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
}
PerformanceStep2Param
performanceStep2Param
=
PerformanceStep2Param
.
getNew
();
BeanUtils
.
copyProperties
(
data
,
performanceStep2Param
);
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performancesId
,
merchantId
);
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performancesId
);
if
(
null
!=
vo
)
{
performanceStep2Param
.
setStatus
(
vo
.
getAppStatus
());
}
else
{
...
...
@@ -461,8 +482,13 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
// sqls.add(SqlMapping.get("kylin_ticket_status.onLine"));
// LinkedList<Object[]> sqlsDataA = CollectionUtil.linkedListObjectArr();
// LinkedList<Object[]> sqlsDataB = CollectionUtil.linkedListObjectArr();
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
performancesId
,
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
LINE
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performancesId
,
merchantId
);
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performancesId
);
if
(!(
vo
.
getAppStatus
()
==
3
||
vo
.
getAppStatus
()
==
7
))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
20110
));
}
...
...
@@ -508,7 +534,12 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
public
ResponseDto
<
String
>
outLinePerformance
(
String
performancesId
)
{
try
{
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performancesId
,
merchantId
);
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
performancesId
,
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
LINE
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performancesId
);
if
(
vo
.
getAppStatus
()
>=
3
&&
vo
.
getAppStatus
()
!=
4
&&
vo
.
getAppStatus
()
!=
7
)
{
//未提审||被拒绝 && performanceStatusData.getStatus() != 10
// HashMap<String, Object> map = CollectionUtil.mapStringObject();
// map.put("status", 7);
...
...
@@ -538,7 +569,12 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
public
String
copyPerformance
(
String
performancesId
)
{
try
{
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
PerformancePartnerVo
performancePartnerVo
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
performancesId
,
merchantId
);
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
performancesId
,
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
READ
.
getId
(),
}))
{
return
"无权限"
;
}
PerformancePartnerVo
performancePartnerVo
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
performancesId
);
//复制演出
performancePartnerVo
.
setPerformancesId
(
IDGenerator
.
nextSnowId
());
performancePartnerVo
.
setStatus
(
0
);
...
...
@@ -633,8 +669,13 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
public
ResponseDto
<
String
>
withdraw
(
String
performancesId
)
{
try
{
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
performancesId
,
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
LocalDateTime
now
=
LocalDateTime
.
now
();
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performancesId
,
merchantId
);
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performancesId
);
if
(
vo
!=
null
&&
vo
.
getAuditStatus
()
==
0
)
{
PerformancePartnerVo
performancePartnerVo
=
PerformancePartnerVo
.
getNew
();
performancePartnerVo
.
setPerformancesId
(
performancesId
);
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/impl/KylinTicketTimesPartnerServiceImpl.java
View file @
0b5e25a9
...
...
@@ -11,6 +11,7 @@ import com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo;
import
com.liquidnet.service.kylin.dto.vo.partner.KylinTicketPartnerVo
;
import
com.liquidnet.service.kylin.dto.vo.partner.KylinTicketTimesPartnerVo
;
import
com.liquidnet.service.kylin.service.partner.IKylinTicketTimesPartnerService
;
import
com.liquidnet.service.merchant.constant.MerchantAuthorizationConst
;
import
com.liquidnet.service.merchant.util.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -46,6 +47,11 @@ public class KylinTicketTimesPartnerServiceImpl implements IKylinTicketTimesPart
public
ResponseDto
<
KylinTicketTimesPartnerVo
>
createTimesSummary
(
CreateTicketTimesParam
createTicketTimesParam
)
{
ResponseDto
<
KylinTicketTimesPartnerVo
>
ticketTimesPartnerVo
;
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
createTicketTimesParam
.
getPerformancesId
(),
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
//获取演出状态
KylinPerformanceVo
vo
=
mongoMerchantUtils
.
getPerformanceVoNoMerchant
(
createTicketTimesParam
.
getPerformancesId
());
if
(
null
!=
vo
&&
!
vo
.
getMerchantId
().
equals
(
merchantId
))
{
...
...
@@ -151,11 +157,16 @@ public class KylinTicketTimesPartnerServiceImpl implements IKylinTicketTimesPart
try
{
LocalDateTime
updatedAt
=
LocalDateTime
.
now
();
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
performanceId
,
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
KylinTicketTimesPartnerVo
data
=
mongoMerchantUtils
.
getTicketTimesPartnerVo
(
ticketTimesId
);
if
(
data
.
getStatus
()
==
0
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
20106
));
}
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performanceId
,
merchantId
);
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performanceId
);
KylinTicketTimesVo
ticketTimesData
=
null
;
for
(
int
x
=
0
;
x
<
vo
.
getTicketTimeList
().
size
();
x
++)
{
ticketTimesData
=
vo
.
getTicketTimeList
().
get
(
x
);
...
...
@@ -192,6 +203,11 @@ public class KylinTicketTimesPartnerServiceImpl implements IKylinTicketTimesPart
public
ResponseDto
<
KylinTicketTimesPartnerVo
>
changeTimes
(
CreateTicketTimesParam
createTicketTimesParam
)
{
try
{
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
createTicketTimesParam
.
getPerformancesId
(),
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
KylinPerformanceVo
vo
=
mongoMerchantUtils
.
getPerformanceVoNoMerchant
(
createTicketTimesParam
.
getPerformancesId
());
if
(
null
!=
vo
&&
!
vo
.
getMerchantId
().
equals
(
merchantId
))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/impl/KylinTicketsPartnerServiceImpl.java
View file @
0b5e25a9
...
...
@@ -15,6 +15,7 @@ import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketExpressModuleVo;
import
com.liquidnet.service.kylin.dto.vo.partner.KylinTicketPartnerVo
;
import
com.liquidnet.service.kylin.dto.vo.partner.KylinTicketTimesPartnerVo
;
import
com.liquidnet.service.kylin.service.partner.IKylinTicketsPartnerService
;
import
com.liquidnet.service.merchant.constant.MerchantAuthorizationConst
;
import
com.liquidnet.service.merchant.util.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -52,6 +53,11 @@ public class KylinTicketsPartnerServiceImpl implements IKylinTicketsPartnerServi
ResponseDto
<
KylinTicketPartnerVo
>
ticketPartnerVo
;
//获取演出状态
KylinTicketTimesPartnerVo
timesPartnerVo
=
mongoMerchantUtils
.
getTicketTimesPartnerVo
(
ticketCreateParam
.
getTimesId
());
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
timesPartnerVo
.
getPerformancesId
(),
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
if
(
null
!=
timesPartnerVo
)
{
KylinPerformanceVo
vo
=
mongoMerchantUtils
.
getPerformanceVoNoMerchant
(
timesPartnerVo
.
getPerformancesId
());
if
(
null
!=
vo
&&
!
vo
.
getMerchantId
().
equals
(
merchantId
))
{
...
...
@@ -187,7 +193,12 @@ public class KylinTicketsPartnerServiceImpl implements IKylinTicketsPartnerServi
try
{
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
KylinTicketTimesPartnerVo
ticketTimeRelation
=
mongoMerchantUtils
.
getTicketTimesPartnerVo
(
ticketCreateParam
.
getTimesId
());
PerformancePartnerVo
data
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
ticketTimeRelation
.
getPerformancesId
(),
merchantId
);
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
ticketTimeRelation
.
getPerformancesId
(),
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
PerformancePartnerVo
data
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
ticketTimeRelation
.
getPerformancesId
());
if
(
data
==
null
||
data
.
getAuditStatus
()
==
null
||
data
.
getAuditStatus
()
==
0
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20112"
));
}
...
...
@@ -237,7 +248,12 @@ public class KylinTicketsPartnerServiceImpl implements IKylinTicketsPartnerServi
try
{
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
LocalDateTime
updatedAt
=
LocalDateTime
.
now
();
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performanceId
,
merchantId
);
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
performanceId
,
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performanceId
);
KylinTicketTimesVo
ticketTimesData
;
KylinTicketVo
ticketData
=
null
;
for
(
int
x
=
0
;
x
<
vo
.
getTicketTimeList
().
size
();
x
++)
{
...
...
@@ -252,7 +268,7 @@ public class KylinTicketsPartnerServiceImpl implements IKylinTicketsPartnerServi
break
;
}
PerformancePartnerVo
data
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
performanceId
,
merchantId
);
PerformancePartnerVo
data
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
performanceId
);
if
(
data
==
null
||
data
.
getAuditStatus
()
==
null
||
data
.
getAuditStatus
()
==
0
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20106"
));
}
...
...
@@ -284,7 +300,12 @@ public class KylinTicketsPartnerServiceImpl implements IKylinTicketsPartnerServi
// 获取 当前时间 -> 创建时间
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
LocalDateTime
createdAt
=
LocalDateTime
.
now
();
PerformancePartnerVo
performancePartnerVo
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
performanceId
,
merchantId
);
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
performanceId
,
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
PerformancePartnerVo
performancePartnerVo
=
mongoMerchantUtils
.
getPerformancePartnerVo
(
performanceId
);
if
(
performancePartnerVo
.
getAuditStatus
()
==
0
||
performancePartnerVo
.
getAuditStatus
()
==
1
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
20107
));
}
...
...
@@ -333,7 +354,12 @@ public class KylinTicketsPartnerServiceImpl implements IKylinTicketsPartnerServi
try
{
LocalDateTime
updatedAt
=
LocalDateTime
.
now
();
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performancesId
,
merchantId
);
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
performancesId
,
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performancesId
);
KylinTicketTimesVo
ticketTimesData
;
KylinTicketVo
ticketData
=
null
;
for
(
int
x
=
0
;
x
<
vo
.
getTicketTimeList
().
size
();
x
++)
{
...
...
@@ -377,7 +403,12 @@ public class KylinTicketsPartnerServiceImpl implements IKylinTicketsPartnerServi
try
{
LocalDateTime
updatedAt
=
LocalDateTime
.
now
();
String
merchantId
=
CurrentUtil
.
getCurrentUid
();
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performancesId
,
merchantId
);
if
(!
mongoMerchantUtils
.
judgeIsPermission
(
performancesId
,
merchantId
,
new
String
[]{
MerchantAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
(),
}))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
29999
));
}
KylinPerformanceVo
vo
=
redisMerchantUtils
.
getPerformanceVo
(
performancesId
);
KylinTicketTimesVo
ticketTimesData
;
KylinTicketVo
ticketData
=
null
;
for
(
int
x
=
0
;
x
<
vo
.
getTicketTimeList
().
size
();
x
++)
{
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/util/MongoMerchantUtils.java
View file @
0b5e25a9
...
...
@@ -42,8 +42,8 @@ public class MongoMerchantUtils {
private
RedisMerchantUtils
redisMerchantUtils
;
public
PerformancePartnerVo
getPerformancePartnerVo
(
String
performanceId
,
String
merchantId
)
{
return
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performanceId
)
.
and
(
"merchantId"
).
is
(
merchantId
)
),
PerformancePartnerVo
.
class
,
PerformancePartnerVo
.
class
.
getSimpleName
());
public
PerformancePartnerVo
getPerformancePartnerVo
(
String
performanceId
)
{
return
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performanceId
)),
PerformancePartnerVo
.
class
,
PerformancePartnerVo
.
class
.
getSimpleName
());
}
public
PerformancePartnerVo
getPerformancePartnerVoNoMerchant
(
String
performanceId
)
{
...
...
@@ -153,8 +153,8 @@ public class MongoMerchantUtils {
mongoTemplate
.
remove
(
Query
.
query
(
Criteria
.
where
(
"ticketsId"
).
is
(
ticketsId
)),
KylinTicketPartnerVo
.
class
,
KylinTicketPartnerVo
.
class
.
getSimpleName
());
}
public
boolean
isExistsSubmitPerformancePartner
(
String
performanceId
,
String
merchantId
)
{
return
mongoTemplate
.
exists
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performanceId
).
and
(
"
merchantId"
).
is
(
merchantId
).
and
(
"
auditStatus"
).
is
(
0
)),
public
boolean
isExistsSubmitPerformancePartner
(
String
performanceId
)
{
return
mongoTemplate
.
exists
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performanceId
).
and
(
"auditStatus"
).
is
(
0
)),
PerformancePartnerVo
.
class
,
PerformancePartnerVo
.
class
.
getSimpleName
());
}
...
...
@@ -185,8 +185,8 @@ public class MongoMerchantUtils {
return
mongoTemplate
.
remove
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performanceId
)),
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
}
public
KylinPerformanceVo
getPerformanceVo
(
String
performanceId
,
String
merchantId
)
{
return
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performanceId
)
.
and
(
"merchantId"
).
is
(
merchantId
)
),
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
public
KylinPerformanceVo
getPerformanceVo
(
String
performanceId
)
{
return
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performanceId
)),
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
}
public
KylinPerformanceVo
getPerformanceVoNoMerchant
(
String
performanceId
)
{
...
...
@@ -197,6 +197,19 @@ public class MongoMerchantUtils {
return
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"appStatus"
).
in
(
6
,
8
,
9
)),
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
}
/**
* 判断该用户对于此演出是否有权限
*
* @param performanceId 演出id
* @param merchantId 用户id(第三方id)
* @param permissionIds 权限id
* @return
*/
public
boolean
judgeIsPermission
(
String
performanceId
,
String
merchantId
,
String
[]
permissionIds
)
{
return
mongoTemplate
.
exists
(
Query
.
query
(
Criteria
.
where
(
"performanceId"
).
is
(
performanceId
).
and
(
"permissionIds"
).
in
(
permissionIds
))
,
MerchantAuthorizationPerformanceVo
.
class
,
MerchantAuthorizationPerformanceVo
.
class
.
getSimpleName
());
}
public
Document
getObjectTicketVo
(
HashMap
<
String
,
Object
>
map
,
String
ticketsId
)
{
BasicDBObject
objectTicketVo
=
ObjectUtil
.
cloneBasicDBObject
().
append
(
"$set"
,
mongoConverter
.
convertToMongoType
(
map
));
Document
docTicket
=
mongoTemplate
.
getCollection
(
KylinTicketPartnerVo
.
class
.
getSimpleName
()).
findOneAndUpdate
(
...
...
@@ -218,7 +231,6 @@ public class MongoMerchantUtils {
//根据权限查询演出id
List
<
MerchantAuthorizationPerformanceVo
>
permissionVoList
=
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"uid"
).
is
(
performancePartnerListParam
.
getMerchantId
())
.
and
(
"deleteAt"
).
is
(
null
)
.
and
(
"permissionIds"
).
in
(
MerchantAuthorizationConst
.
PerformancePermission
.
READ
.
getId
(),
MerchantAuthorizationConst
.
PerformancePermission
.
SALES
.
getId
(),
...
...
@@ -233,10 +245,10 @@ public class MongoMerchantUtils {
criteria
=
criteria
.
and
(
"title"
).
regex
(
".*"
+
performancePartnerListParam
.
getTitle
()
+
".*"
);
}
if
(
performancePartnerListParam
.
getStatus
()
!=
null
)
{
if
(
performancePartnerListParam
.
getStatus
()==
0
)
{
if
(
performancePartnerListParam
.
getStatus
()
==
0
)
{
criteria
=
criteria
.
and
(
"appStatus"
).
is
(
0
);
}
else
{
if
(
performancePartnerListParam
.
getStatus
()!=-
2
)
{
}
else
{
if
(
performancePartnerListParam
.
getStatus
()
!=
-
2
)
{
criteria
=
criteria
.
and
(
"appStatus"
).
is
(
performancePartnerListParam
.
getStatus
());
}
if
(
performancePartnerListParam
.
getTimeStart
()
!=
null
&&
!
performancePartnerListParam
.
getTimeStart
().
isEmpty
())
{
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/util/RedisMerchantUtils.java
View file @
0b5e25a9
...
...
@@ -54,12 +54,12 @@ public class RedisMerchantUtils {
* @param performanceId
* @return
*/
public
KylinPerformanceVo
getPerformanceVo
(
String
performanceId
,
String
merchantId
)
{
public
KylinPerformanceVo
getPerformanceVo
(
String
performanceId
)
{
Object
obj
=
redisUtil
.
get
(
KylinRedisConst
.
PERFORMANCES
+
performanceId
);
if
(
obj
!=
null
)
{
return
(
KylinPerformanceVo
)
obj
;
}
else
{
KylinPerformanceVo
performanceData
=
mongoMerchantUtils
.
getPerformanceVo
(
performanceId
,
merchantId
);
KylinPerformanceVo
performanceData
=
mongoMerchantUtils
.
getPerformanceVo
(
performanceId
);
redisUtil
.
set
(
KylinRedisConst
.
PERFORMANCES
+
performanceId
,
performanceData
);
return
performanceData
;
}
...
...
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