记得上下班打卡 | 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
19d88009
Commit
19d88009
authored
Dec 06, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_merchant' into dev_merchant
parents
6a1fa1e5
e4246b24
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
95 additions
and
81 deletions
+95
-81
MerchantMongoUtil.java
...ient/admin/zhengzai/merchant/utils/MerchantMongoUtil.java
+31
-29
MerchantRedisUtil.java
...ient/admin/zhengzai/merchant/utils/MerchantRedisUtil.java
+1
-1
db_mongo_merchant.sql
...iquidnet-service-merchant-impl/docu/db_mongo_merchant.sql
+7
-1
MerchantAuthorizationsController.java
...merchant/controller/MerchantAuthorizationsController.java
+4
-3
MerchantFieldsController.java
...service/merchant/controller/MerchantFieldsController.java
+14
-13
MerchantSponsorsController.java
...rvice/merchant/controller/MerchantSponsorsController.java
+6
-5
MerchantMongoService.java
...uidnet/service/merchant/service/MerchantMongoService.java
+31
-29
MerchantRdmService.java
...iquidnet/service/merchant/service/MerchantRdmService.java
+1
-0
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/merchant/utils/MerchantMongoUtil.java
View file @
19d88009
...
...
@@ -36,19 +36,6 @@ public class MerchantMongoUtil {
mongoTemplate
.
upsert
(
query
,
update
,
MerchantFieldsVo
.
class
,
MerchantFieldsVo
.
class
.
getSimpleName
());
}
// 【主办相关】
public
MerchantSponsorsVo
getSponsorsVoBySponsorId
(
String
sponsorId
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"sponsorId"
).
is
(
sponsorId
));
return
mongoTemplate
.
findOne
(
query
,
MerchantSponsorsVo
.
class
,
MerchantSponsorsVo
.
class
.
getSimpleName
());
}
public
void
setSponsorsVoBySponsorId
(
String
sponsorId
,
MerchantSponsorsVo
vo
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"sponsorId"
).
is
(
sponsorId
));
Document
document
=
(
Document
)
mongoConverter
.
convertToMongoType
(
vo
);
Update
update
=
Update
.
fromDocument
(
document
);
mongoTemplate
.
upsert
(
query
,
update
,
MerchantSponsorsVo
.
class
,
MerchantSponsorsVo
.
class
.
getSimpleName
());
}
// 【场地申请相关】
public
List
<
MerchantFieldAppliesVo
>
getFieldAppliesVosByUid
(
String
uid
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"uid"
).
is
(
uid
).
and
(
"deletedAt"
).
is
(
null
));
...
...
@@ -64,21 +51,6 @@ public class MerchantMongoUtil {
mongoTemplate
.
remove
(
query
,
MerchantFieldAppliesVo
.
class
.
getSimpleName
());
}
// 【主办申请相关】
public
List
<
MerchantSponsorAppliesVo
>
getSponsorAppliesVosByUid
(
String
uid
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"uid"
).
is
(
uid
).
and
(
"deletedAt"
).
is
(
null
));
return
mongoTemplate
.
find
(
query
,
MerchantSponsorAppliesVo
.
class
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
}
public
MerchantSponsorAppliesVo
addSponsorAppliesVo
(
MerchantSponsorAppliesVo
vo
)
{
return
mongoTemplate
.
insert
(
vo
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
}
public
void
delSponsorAppliesVoBySponsorApplyId
(
String
sponsorApplyId
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"sponsorApplyId"
).
is
(
sponsorApplyId
));
mongoTemplate
.
remove
(
query
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
}
// 【默认验票员相关】
public
List
<
MerchantFieldCheckersVo
>
getFieldCheckersVosByFieldId
(
String
fieldId
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"fieldId"
).
is
(
fieldId
).
and
(
"deletedAt"
).
is
(
null
));
...
...
@@ -95,7 +67,36 @@ public class MerchantMongoUtil {
}
// 【权限相关】
// 【主办相关】
public
MerchantSponsorsVo
getSponsorsVoBySponsorId
(
String
sponsorId
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"sponsorId"
).
is
(
sponsorId
));
return
mongoTemplate
.
findOne
(
query
,
MerchantSponsorsVo
.
class
,
MerchantSponsorsVo
.
class
.
getSimpleName
());
}
public
void
setSponsorsVoBySponsorId
(
String
sponsorId
,
MerchantSponsorsVo
vo
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"sponsorId"
).
is
(
sponsorId
));
Document
document
=
(
Document
)
mongoConverter
.
convertToMongoType
(
vo
);
Update
update
=
Update
.
fromDocument
(
document
);
mongoTemplate
.
upsert
(
query
,
update
,
MerchantSponsorsVo
.
class
,
MerchantSponsorsVo
.
class
.
getSimpleName
());
}
// 【主办申请相关】
public
List
<
MerchantSponsorAppliesVo
>
getSponsorAppliesVosByUid
(
String
uid
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"uid"
).
is
(
uid
).
and
(
"deletedAt"
).
is
(
null
));
return
mongoTemplate
.
find
(
query
,
MerchantSponsorAppliesVo
.
class
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
}
public
MerchantSponsorAppliesVo
addSponsorAppliesVo
(
MerchantSponsorAppliesVo
vo
)
{
return
mongoTemplate
.
insert
(
vo
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
}
public
void
delSponsorAppliesVoBySponsorApplyId
(
String
sponsorApplyId
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"sponsorApplyId"
).
is
(
sponsorApplyId
));
mongoTemplate
.
remove
(
query
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
}
// 【演出权限相关】
public
MerchantAuthorizationPerformanceVo
getAuthorizationPerformanceVo
(
String
performanceId
,
String
uid
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"performanceId"
).
is
(
performanceId
).
and
(
"uid"
).
is
(
uid
));
return
mongoTemplate
.
findOne
(
query
,
MerchantAuthorizationPerformanceVo
.
class
,
MerchantAuthorizationPerformanceVo
.
class
.
getSimpleName
());
...
...
@@ -129,6 +130,7 @@ public class MerchantMongoUtil {
return
vo
;
}
// 【授权记录相关】
public
MerchantAuthorizationRecordsVo
getAuthorizationRecordsVoByAuthorizationRecordId
(
String
authorizationRecordId
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"authorizationRecordId"
).
is
(
authorizationRecordId
).
and
(
"deletedAt"
).
is
(
null
));
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/merchant/utils/MerchantRedisUtil.java
View file @
19d88009
...
...
@@ -59,7 +59,7 @@ public class MerchantRedisUtil {
return
vos
;
}
// 【场地
认领
】更新我的列表
// 【场地
申请
】更新我的列表
public
boolean
setFieldAppliesVosByUid
(
String
uid
,
List
<
MerchantFieldAppliesVo
>
vos
)
{
return
redisDataSourceUtil
.
getRedisKylinUtil
().
set
(
MerchantRedisConst
.
INFO_FIELD_APPLIES
.
concat
(
uid
),
vos
);
}
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/docu/db_mongo_merchant.sql
View file @
19d88009
...
...
@@ -3,6 +3,7 @@
#
创建集合
db
.
createCollection
(
"MerchantFieldsVo"
);
db
.
createCollection
(
"MerchantFieldAppliesVo"
);
db
.
createCollection
(
"MerchantFieldCheckersVo"
);
db
.
createCollection
(
"MerchantSponsorsVo"
);
db
.
createCollection
(
"MerchantSponsorAppliesVo"
);
db
.
createCollection
(
"MerchantAuthorizationRecordsVo"
);
...
...
@@ -14,14 +15,19 @@ db.MerchantFieldsVo.createIndex({fieldId:"hashed"});
db
.
MerchantFieldsVo
.
createIndex
(
{
isOnline
:
"hashed"
}
);
db
.
MerchantFieldsVo
.
createIndex
(
{
uid
:
"hashed"
}
);
db
.
MerchantFieldsVo
.
createIndex
(
{
companyId
:
"hashed"
}
);
db
.
MerchantFieldAppliesVo
.
createIndex
(
{
fieldApplyId
:
"hashed"
}
);
db
.
MerchantFieldAppliesVo
.
createIndex
(
{
fieldApplyId
:
"hashed"
}
)
db
.
MerchantFieldAppliesVo
.
createIndex
(
{
fieldId
:
"hashed"
}
);
db
.
MerchantFieldAppliesVo
.
createIndex
(
{
uid
:
"hashed"
}
);
db
.
MerchantFieldCheckersVo
.
createIndex
(
{
fieldCheckerId
:
"hashed"
}
);
db
.
MerchantFieldCheckersVo
.
createIndex
(
{
fieldId
:
"hashed"
}
);
db
.
MerchantFieldCheckersVo
.
createIndex
(
{
uid
:
"hashed"
}
);
db
.
MerchantSponsorsVo
.
createIndex
(
{
sponsorId
:
"hashed"
}
);
db
.
MerchantSponsorsVo
.
createIndex
(
{
isOnline
:
"hashed"
}
);
db
.
MerchantSponsorsVo
.
createIndex
(
{
uid
:
"hashed"
}
);
db
.
MerchantSponsorsVo
.
createIndex
(
{
companyId
:
"hashed"
}
);
db
.
MerchantSponsorAppliesVo
.
createIndex
(
{
sponsorApplyId
:
"hashed"
}
);
db
.
MerchantSponsorAppliesVo
.
createIndex
(
{
sponsorId
:
"hashed"
}
);
db
.
MerchantSponsorAppliesVo
.
createIndex
(
{
uid
:
"hashed"
}
);
db
.
MerchantAuthorizationRecordsVo
.
createIndex
(
{
authorizationRecordId
:
"hashed"
}
);
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/controller/MerchantAuthorizationsController.java
View file @
19d88009
...
...
@@ -16,6 +16,7 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
javax.validation.constraints.NotBlank
;
import
java.util.List
;
/**
...
...
@@ -40,7 +41,7 @@ public class MerchantAuthorizationsController {
@ApiOperationSupport
(
order
=
10
)
@ApiOperation
(
value
=
"演出下全部权限"
)
@GetMapping
(
"info"
)
public
ResponseDto
<
MerchantAuthorizationPerformanceVo
>
authorizationInfo
(
@RequestParam
(
required
=
true
)
String
performanceId
)
{
public
ResponseDto
<
MerchantAuthorizationPerformanceVo
>
authorizationInfo
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"演出ID不能为空"
)
String
performanceId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
return
ResponseDto
.
success
(
authorizationRecordsService
.
performanceAuthorization
(
currentUid
,
performanceId
));
...
...
@@ -49,7 +50,7 @@ public class MerchantAuthorizationsController {
@ApiOperationSupport
(
order
=
20
)
@ApiOperation
(
value
=
"授权记录列表"
)
@GetMapping
(
"records"
)
public
ResponseDto
<
List
<
MerchantAuthorizationRecordsVo
>>
recordsCheckers
(
@RequestParam
(
required
=
true
)
String
performanceId
)
{
public
ResponseDto
<
List
<
MerchantAuthorizationRecordsVo
>>
recordsCheckers
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"演出ID不能为空"
)
String
performanceId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
return
ResponseDto
.
success
(
authorizationRecordsService
.
performanceRecordCheckers
(
currentUid
,
performanceId
));
...
...
@@ -67,7 +68,7 @@ public class MerchantAuthorizationsController {
@ApiOperationSupport
(
order
=
22
)
@ApiOperation
(
value
=
"删除授权记录"
)
@PostMapping
(
"records/del"
)
public
ResponseDto
<
Object
>
recordsCheckerDel
(
@RequestParam
(
required
=
true
)
String
authorizationRecordId
)
{
public
ResponseDto
<
Object
>
recordsCheckerDel
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"授权ID不能为空"
)
String
authorizationRecordId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
authorizationRecordsService
.
performanceRecordCheckerDel
(
currentUid
,
authorizationRecordId
);
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/controller/MerchantFieldsController.java
View file @
19d88009
...
...
@@ -19,6 +19,7 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
javax.validation.constraints.NotBlank
;
import
java.util.List
;
/**
...
...
@@ -46,7 +47,7 @@ public class MerchantFieldsController {
@ApiOperationSupport
(
order
=
10
)
@ApiOperation
(
value
=
"场地搜索"
)
@GetMapping
(
"search"
)
public
ResponseDto
<
PagedResult
<
MerchantFieldsVo
>>
search
(
@RequestParam
(
required
=
true
)
String
name
,
public
ResponseDto
<
PagedResult
<
MerchantFieldsVo
>>
search
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"搜索内容不能为空"
)
String
name
,
@RequestParam
(
defaultValue
=
"1"
,
required
=
false
)
int
page
,
@RequestParam
(
defaultValue
=
"10"
,
required
=
false
)
int
size
)
{
return
ResponseDto
.
success
(
merchantFieldsService
.
search
(
name
,
page
,
size
));
...
...
@@ -64,7 +65,7 @@ public class MerchantFieldsController {
@ApiOperationSupport
(
order
=
12
)
@ApiOperation
(
value
=
"申请场地驳回后删除"
)
@PostMapping
(
"apply/del"
)
public
ResponseDto
<
Object
>
applyDel
(
@RequestParam
(
required
=
true
)
String
fieldApplyId
)
{
public
ResponseDto
<
Object
>
applyDel
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"场地申请ID不能为空"
)
String
fieldApplyId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
merchantFieldAppliesService
.
applyDel
(
currentUid
,
fieldApplyId
);
...
...
@@ -75,7 +76,7 @@ public class MerchantFieldsController {
@ApiOperationSupport
(
order
=
13
)
@ApiOperation
(
value
=
"申请场地详情"
)
@PostMapping
(
"apply/info"
)
public
ResponseDto
<
MerchantFieldAppliesVo
>
applyInfo
(
@RequestParam
(
required
=
true
)
String
fieldApplyId
)
{
public
ResponseDto
<
MerchantFieldAppliesVo
>
applyInfo
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"场地申请ID不能为空"
)
String
fieldApplyId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
return
ResponseDto
.
success
(
merchantFieldAppliesService
.
applyInfo
(
currentUid
,
fieldApplyId
));
...
...
@@ -85,7 +86,7 @@ public class MerchantFieldsController {
@ApiOperationSupport
(
order
=
20
)
@ApiOperation
(
value
=
"场地详情"
)
@GetMapping
(
"info"
)
public
ResponseDto
<
MerchantFieldsVo
>
info
(
@RequestParam
(
required
=
true
)
String
fieldId
)
{
public
ResponseDto
<
MerchantFieldsVo
>
info
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"场地ID不能为空"
)
String
fieldId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
return
ResponseDto
.
success
(
merchantFieldsService
.
fieldInfo
(
currentUid
,
fieldId
));
...
...
@@ -94,8 +95,8 @@ public class MerchantFieldsController {
@ApiOperationSupport
(
order
=
21
)
@ApiOperation
(
value
=
"场地更改是否审核演出"
)
@PostMapping
(
"editIsCheck"
)
public
ResponseDto
<
Object
>
editIsCheck
(
@RequestParam
(
required
=
true
)
String
fieldId
,
@RequestParam
(
required
=
true
)
int
isCheck
){
public
ResponseDto
<
Object
>
editIsCheck
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"场地ID不能为空"
)
String
fieldId
,
@RequestParam
(
required
=
true
,
defaultValue
=
"0"
)
int
isCheck
){
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
merchantFieldsService
.
editIsCheck
(
currentUid
,
fieldId
,
isCheck
);
...
...
@@ -107,7 +108,7 @@ public class MerchantFieldsController {
@ApiOperationSupport
(
order
=
30
)
@ApiOperation
(
value
=
"场地默认验票员列表"
)
@GetMapping
(
"checkers"
)
public
ResponseDto
<
List
<
MerchantFieldCheckersVo
>>
checkers
(
@RequestParam
(
required
=
true
)
String
fieldId
)
{
public
ResponseDto
<
List
<
MerchantFieldCheckersVo
>>
checkers
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"场地ID不能为空"
)
String
fieldId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
return
ResponseDto
.
success
(
merchantFieldsService
.
checkers
(
currentUid
,
fieldId
));
...
...
@@ -116,10 +117,10 @@ public class MerchantFieldsController {
@ApiOperationSupport
(
order
=
31
)
@ApiOperation
(
value
=
"场地添加默认验票员"
)
@PostMapping
(
"checker/add"
)
public
ResponseDto
<
Object
>
checkerAdd
(
@RequestParam
(
required
=
true
)
String
fieldId
,
@RequestParam
(
required
=
true
)
String
uid
,
@RequestParam
(
required
=
true
)
String
mobile
,
@RequestParam
(
required
=
true
)
String
name
){
public
ResponseDto
<
Object
>
checkerAdd
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"场地ID不能为空"
)
String
fieldId
,
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"uid不能为空"
)
String
uid
,
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"手机号不能为空"
)
String
mobile
,
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"姓名不能为空"
)
String
name
){
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
return
ResponseDto
.
success
(
merchantFieldsService
.
checkerAdd
(
currentUid
,
fieldId
,
uid
,
mobile
,
name
));
...
...
@@ -128,8 +129,8 @@ public class MerchantFieldsController {
@ApiOperationSupport
(
order
=
32
)
@ApiOperation
(
value
=
"场地移除默认验票员"
)
@PostMapping
(
"checker/del"
)
public
ResponseDto
<
Object
>
checkerDel
(
@RequestParam
(
required
=
true
)
String
fieldId
,
@RequestParam
(
required
=
true
)
String
uid
){
public
ResponseDto
<
Object
>
checkerDel
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"场地ID不能为空"
)
String
fieldId
,
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"uid不能为空"
)
String
uid
){
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
merchantFieldsService
.
checkerDel
(
currentUid
,
fieldId
,
uid
);
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/controller/MerchantSponsorsController.java
View file @
19d88009
...
...
@@ -18,6 +18,7 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
javax.validation.constraints.NotBlank
;
/**
* <p>
...
...
@@ -44,9 +45,9 @@ public class MerchantSponsorsController {
@ApiOperationSupport
(
order
=
10
)
@ApiOperation
(
value
=
"主办搜索"
)
@GetMapping
(
"search"
)
public
ResponseDto
<
PagedResult
<
MerchantSponsorsVo
>>
search
(
@RequestParam
(
required
=
true
)
String
name
,
@RequestParam
(
defaultValue
=
"1"
,
required
=
false
)
int
page
,
@RequestParam
(
defaultValue
=
"10"
,
required
=
false
)
int
size
)
{
public
ResponseDto
<
PagedResult
<
MerchantSponsorsVo
>>
search
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"搜索内容不能为空"
)
String
name
,
@RequestParam
(
defaultValue
=
"1"
,
required
=
false
)
int
page
,
@RequestParam
(
defaultValue
=
"10"
,
required
=
false
)
int
size
)
{
return
ResponseDto
.
success
(
merchantSponsorsService
.
search
(
name
,
page
,
size
));
}
...
...
@@ -73,7 +74,7 @@ public class MerchantSponsorsController {
@ApiOperationSupport
(
order
=
13
)
@ApiOperation
(
value
=
"申请主办详情"
)
@PostMapping
(
"apply/info"
)
public
ResponseDto
<
MerchantSponsorAppliesVo
>
applyInfo
(
@RequestParam
(
required
=
true
)
String
sponsorApplyId
)
{
public
ResponseDto
<
MerchantSponsorAppliesVo
>
applyInfo
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"主办申请ID不能为空"
)
String
sponsorApplyId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
return
ResponseDto
.
success
(
merchantSponsorAppliesService
.
applyInfo
(
currentUid
,
sponsorApplyId
));
...
...
@@ -83,7 +84,7 @@ public class MerchantSponsorsController {
@ApiOperationSupport
(
order
=
20
)
@ApiOperation
(
value
=
"主办详情"
)
@GetMapping
(
"info"
)
public
ResponseDto
<
MerchantSponsorsVo
>
info
(
@RequestParam
(
required
=
true
)
String
sponsorId
)
{
public
ResponseDto
<
MerchantSponsorsVo
>
info
(
@RequestParam
(
required
=
true
)
@NotBlank
(
message
=
"主办ID不能为空"
)
String
sponsorId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
return
ResponseDto
.
success
(
merchantSponsorsService
.
sponsorInfo
(
currentUid
,
sponsorId
));
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/MerchantMongoService.java
View file @
19d88009
...
...
@@ -36,19 +36,6 @@ public class MerchantMongoService {
mongoTemplate
.
upsert
(
query
,
update
,
MerchantFieldsVo
.
class
,
MerchantFieldsVo
.
class
.
getSimpleName
());
}
// 【主办相关】
public
MerchantSponsorsVo
getSponsorsVoBySponsorId
(
String
sponsorId
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"sponsorId"
).
is
(
sponsorId
));
return
mongoTemplate
.
findOne
(
query
,
MerchantSponsorsVo
.
class
,
MerchantSponsorsVo
.
class
.
getSimpleName
());
}
public
void
setSponsorsVoBySponsorId
(
String
sponsorId
,
MerchantSponsorsVo
vo
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"sponsorId"
).
is
(
sponsorId
));
Document
document
=
(
Document
)
mongoConverter
.
convertToMongoType
(
vo
);
Update
update
=
Update
.
fromDocument
(
document
);
mongoTemplate
.
upsert
(
query
,
update
,
MerchantSponsorsVo
.
class
,
MerchantSponsorsVo
.
class
.
getSimpleName
());
}
// 【场地申请相关】
public
List
<
MerchantFieldAppliesVo
>
getFieldAppliesVosByUid
(
String
uid
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"uid"
).
is
(
uid
).
and
(
"deletedAt"
).
is
(
null
));
...
...
@@ -64,21 +51,6 @@ public class MerchantMongoService {
mongoTemplate
.
remove
(
query
,
MerchantFieldAppliesVo
.
class
.
getSimpleName
());
}
// 【主办申请相关】
public
List
<
MerchantSponsorAppliesVo
>
getSponsorAppliesVosByUid
(
String
uid
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"uid"
).
is
(
uid
).
and
(
"deletedAt"
).
is
(
null
));
return
mongoTemplate
.
find
(
query
,
MerchantSponsorAppliesVo
.
class
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
}
public
MerchantSponsorAppliesVo
addSponsorAppliesVo
(
MerchantSponsorAppliesVo
vo
)
{
return
mongoTemplate
.
insert
(
vo
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
}
public
void
delSponsorAppliesVoBySponsorApplyId
(
String
sponsorApplyId
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"sponsorApplyId"
).
is
(
sponsorApplyId
));
mongoTemplate
.
remove
(
query
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
}
// 【默认验票员相关】
public
List
<
MerchantFieldCheckersVo
>
getFieldCheckersVosByFieldId
(
String
fieldId
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"fieldId"
).
is
(
fieldId
).
and
(
"deletedAt"
).
is
(
null
));
...
...
@@ -95,7 +67,36 @@ public class MerchantMongoService {
}
// 【权限相关】
// 【主办相关】
public
MerchantSponsorsVo
getSponsorsVoBySponsorId
(
String
sponsorId
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"sponsorId"
).
is
(
sponsorId
));
return
mongoTemplate
.
findOne
(
query
,
MerchantSponsorsVo
.
class
,
MerchantSponsorsVo
.
class
.
getSimpleName
());
}
public
void
setSponsorsVoBySponsorId
(
String
sponsorId
,
MerchantSponsorsVo
vo
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"sponsorId"
).
is
(
sponsorId
));
Document
document
=
(
Document
)
mongoConverter
.
convertToMongoType
(
vo
);
Update
update
=
Update
.
fromDocument
(
document
);
mongoTemplate
.
upsert
(
query
,
update
,
MerchantSponsorsVo
.
class
,
MerchantSponsorsVo
.
class
.
getSimpleName
());
}
// 【主办申请相关】
public
List
<
MerchantSponsorAppliesVo
>
getSponsorAppliesVosByUid
(
String
uid
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"uid"
).
is
(
uid
).
and
(
"deletedAt"
).
is
(
null
));
return
mongoTemplate
.
find
(
query
,
MerchantSponsorAppliesVo
.
class
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
}
public
MerchantSponsorAppliesVo
addSponsorAppliesVo
(
MerchantSponsorAppliesVo
vo
)
{
return
mongoTemplate
.
insert
(
vo
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
}
public
void
delSponsorAppliesVoBySponsorApplyId
(
String
sponsorApplyId
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"sponsorApplyId"
).
is
(
sponsorApplyId
));
mongoTemplate
.
remove
(
query
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
}
// 【演出权限相关】
public
MerchantAuthorizationPerformanceVo
getAuthorizationPerformanceVo
(
String
performanceId
,
String
uid
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"performanceId"
).
is
(
performanceId
).
and
(
"uid"
).
is
(
uid
));
return
mongoTemplate
.
findOne
(
query
,
MerchantAuthorizationPerformanceVo
.
class
,
MerchantAuthorizationPerformanceVo
.
class
.
getSimpleName
());
...
...
@@ -129,6 +130,7 @@ public class MerchantMongoService {
return
vo
;
}
// 【授权记录相关】
public
MerchantAuthorizationRecordsVo
getAuthorizationRecordsVoByAuthorizationRecordId
(
String
authorizationRecordId
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"authorizationRecordId"
).
is
(
authorizationRecordId
).
and
(
"deletedAt"
).
is
(
null
));
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/MerchantRdmService.java
View file @
19d88009
...
...
@@ -109,6 +109,7 @@ public class MerchantRdmService {
return
redisUtil
.
set
(
MerchantRedisConst
.
INFO_FIELD_CHECKERS
.
concat
(
fieldId
),
vos
);
}
// 【主办】详情
public
MerchantSponsorsVo
getSponsorsVoBySponsorId
(
String
sponsorId
)
{
if
(
null
==
sponsorId
||
sponsorId
.
isEmpty
())
{
...
...
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