记得上下班打卡 | 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
6123966d
Commit
6123966d
authored
Nov 18, 2021
by
Tice
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化授权细节
parent
195dd9ad
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
223 additions
and
71 deletions
+223
-71
MerchantAuthorizationConst.java
...service/merchant/constant/MerchantAuthorizationConst.java
+59
-0
IMerchantFieldsService.java
...dnet/service/merchant/service/IMerchantFieldsService.java
+1
-2
IMerchantSponsorsService.java
...et/service/merchant/service/IMerchantSponsorsService.java
+2
-2
MerchantAuthorizationRecordsAdminServiceImpl.java
...ce/impl/MerchantAuthorizationRecordsAdminServiceImpl.java
+27
-27
MerchantMongoUtil.java
...ient/admin/zhengzai/merchant/utils/MerchantMongoUtil.java
+2
-1
db_merchant.sql
...hant/liquidnet-service-merchant-impl/docu/db_merchant.sql
+2
-2
MerchantFieldsController.java
...service/merchant/controller/MerchantFieldsController.java
+13
-4
MerchantSponsorsController.java
...rvice/merchant/controller/MerchantSponsorsController.java
+9
-0
MerchantMongoService.java
...uidnet/service/merchant/service/MerchantMongoService.java
+6
-1
MerchantAuthorizationRecordsServiceImpl.java
...service/impl/MerchantAuthorizationRecordsServiceImpl.java
+39
-4
MerchantFieldAppliesServiceImpl.java
...erchant/service/impl/MerchantFieldAppliesServiceImpl.java
+6
-6
MerchantFieldsServiceImpl.java
...vice/merchant/service/impl/MerchantFieldsServiceImpl.java
+12
-4
MerchantSponsorAppliesServiceImpl.java
...chant/service/impl/MerchantSponsorAppliesServiceImpl.java
+7
-7
MerchantSponsorsServiceImpl.java
...ce/merchant/service/impl/MerchantSponsorsServiceImpl.java
+22
-0
errors.properties
...ervice-merchant-impl/src/main/resources/errors.properties
+16
-11
No files found.
liquidnet-bus-api/liquidnet-service-merchant-api/src/main/java/com/liquidnet/service/merchant/constant/Merchant
Permiss
ionConst.java
→
liquidnet-bus-api/liquidnet-service-merchant-api/src/main/java/com/liquidnet/service/merchant/constant/Merchant
Authorizat
ionConst.java
View file @
6123966d
package
com
.
liquidnet
.
service
.
merchant
.
constant
;
package
com
.
liquidnet
.
service
.
merchant
.
constant
;
public
class
Merchant
Permiss
ionConst
{
public
class
Merchant
Authorizat
ionConst
{
// 某演出通过审核后,分配演出权限,场地方审核演出为'待审核的演出'与'演出'不同
// 某演出通过审核后,分配演出权限,场地方审核演出为'待审核的演出'与'演出'不同
public
enum
PerformancePermission
{
public
enum
PerformancePermission
{
READ
(
"1"
,
"查看详情"
),
READ
(
"1"
,
"查看详情"
),
EDIT
(
"2"
,
"编辑提交"
),
EDIT
(
"2"
,
"编辑提交"
),
ONOFF
(
"3"
,
"上下线"
),
LINE
(
"3"
,
"上下线"
),
SALES
(
"4"
,
"销售统计"
),
SALES
(
"4"
,
"销售统计"
),
CHECK
(
"5"
,
"验票"
),
CHECK
(
"5"
,
"验票"
),
ACCREDIT
(
"6"
,
"授权"
);
ACCREDIT
(
"6"
,
"授权"
);
...
@@ -27,4 +27,33 @@ public class MerchantPermissionConst {
...
@@ -27,4 +27,33 @@ public class MerchantPermissionConst {
return
name
;
return
name
;
}
}
}
}
public
enum
PerformanceRole
{
CREATOR
(
"CREATOR"
,
"创建者"
,
4
),
SPONSOR
(
"SPONSOR"
,
"主办方"
,
3
),
FIELDER
(
"FIELDER"
,
"场地方"
,
2
),
CHECKER
(
"CHECKER"
,
"验票员"
,
1
);
private
final
String
role
;
private
final
String
name
;
private
final
Integer
level
;
PerformanceRole
(
String
role
,
String
name
,
Integer
level
)
{
this
.
role
=
role
;
this
.
name
=
name
;
this
.
level
=
level
;
}
public
String
getRole
()
{
return
role
;
}
public
String
getName
()
{
return
name
;
}
public
Integer
getLevel
()
{
return
level
;
}
}
}
}
liquidnet-bus-api/liquidnet-service-merchant-api/src/main/java/com/liquidnet/service/merchant/service/IMerchantFieldsService.java
View file @
6123966d
package
com
.
liquidnet
.
service
.
merchant
.
service
;
package
com
.
liquidnet
.
service
.
merchant
.
service
;
import
com.liquidnet.service.base.PagedResult
;
import
com.liquidnet.service.base.PagedResult
;
import
com.liquidnet.service.merchant.dto.param.MerchantFieldApplyParam
;
import
com.liquidnet.service.merchant.dto.vo.MerchantFieldAppliesVo
;
import
com.liquidnet.service.merchant.dto.vo.MerchantFieldCheckersVo
;
import
com.liquidnet.service.merchant.dto.vo.MerchantFieldCheckersVo
;
import
com.liquidnet.service.merchant.dto.vo.MerchantFieldsVo
;
import
com.liquidnet.service.merchant.dto.vo.MerchantFieldsVo
;
...
@@ -11,6 +9,7 @@ import java.util.List;
...
@@ -11,6 +9,7 @@ import java.util.List;
public
interface
IMerchantFieldsService
{
public
interface
IMerchantFieldsService
{
PagedResult
<
MerchantFieldsVo
>
search
(
String
name
,
int
page
,
int
size
);
PagedResult
<
MerchantFieldsVo
>
search
(
String
name
,
int
page
,
int
size
);
MerchantFieldsVo
fieldInfo
(
String
uid
,
String
fieldId
);
void
editIsCheck
(
String
uid
,
String
fieldId
,
int
isCheck
);
void
editIsCheck
(
String
uid
,
String
fieldId
,
int
isCheck
);
...
...
liquidnet-bus-api/liquidnet-service-merchant-api/src/main/java/com/liquidnet/service/merchant/service/IMerchantSponsorsService.java
View file @
6123966d
package
com
.
liquidnet
.
service
.
merchant
.
service
;
package
com
.
liquidnet
.
service
.
merchant
.
service
;
import
com.liquidnet.service.base.PagedResult
;
import
com.liquidnet.service.base.PagedResult
;
import
com.liquidnet.service.merchant.dto.param.MerchantSponsorApplyParam
;
import
com.liquidnet.service.merchant.dto.vo.MerchantSponsorAppliesVo
;
import
com.liquidnet.service.merchant.dto.vo.MerchantSponsorsVo
;
import
com.liquidnet.service.merchant.dto.vo.MerchantSponsorsVo
;
public
interface
IMerchantSponsorsService
{
public
interface
IMerchantSponsorsService
{
PagedResult
<
MerchantSponsorsVo
>
search
(
String
name
,
int
page
,
int
size
);
PagedResult
<
MerchantSponsorsVo
>
search
(
String
name
,
int
page
,
int
size
);
MerchantSponsorsVo
sponsorInfo
(
String
uid
,
String
sponsorId
);
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/merchant/service/impl/MerchantAuthorizationRecordsAdminServiceImpl.java
View file @
6123966d
This diff is collapsed.
Click to expand it.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/merchant/utils/MerchantMongoUtil.java
View file @
6123966d
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
merchant
.
utils
;
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
merchant
.
utils
;
import
com.liquidnet.service.merchant.constant.MerchantAuthorizationConst
;
import
com.liquidnet.service.merchant.dto.vo.*
;
import
com.liquidnet.service.merchant.dto.vo.*
;
import
org.bson.Document
;
import
org.bson.Document
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -52,6 +53,6 @@ public class MerchantMongoUtil {
...
@@ -52,6 +53,6 @@ public class MerchantMongoUtil {
}
}
public
List
<
MerchantAuthorizationRecordsVo
>
getCheckersAuthorizationRecordsVosByCuid
(
String
cuid
,
String
performanceId
)
{
public
List
<
MerchantAuthorizationRecordsVo
>
getCheckersAuthorizationRecordsVosByCuid
(
String
cuid
,
String
performanceId
)
{
return
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"uidRole"
).
is
(
"checker"
).
and
(
"cuid"
).
is
(
cuid
).
and
(
"performanceId"
).
is
(
performanceId
).
and
(
"deletedAt"
).
is
(
null
)),
MerchantAuthorizationRecordsVo
.
class
,
MerchantAuthorizationRecordsVo
.
class
.
getSimpleName
());
return
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"uidRole"
).
is
(
MerchantAuthorizationConst
.
PerformanceRole
.
CHECKER
.
getRole
()
).
and
(
"cuid"
).
is
(
cuid
).
and
(
"performanceId"
).
is
(
performanceId
).
and
(
"deletedAt"
).
is
(
null
)),
MerchantAuthorizationRecordsVo
.
class
,
MerchantAuthorizationRecordsVo
.
class
.
getSimpleName
());
}
}
}
}
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/docu/db_merchant.sql
View file @
6123966d
...
@@ -70,7 +70,7 @@ create table merchant_field_applies
...
@@ -70,7 +70,7 @@ create table merchant_field_applies
apply_type
varchar
(
255
)
default
''
not
null
comment
'类型 claim认领、create创建'
,
apply_type
varchar
(
255
)
default
''
not
null
comment
'类型 claim认领、create创建'
,
reject
varchar
(
255
)
default
''
not
null
comment
'驳回原因'
,
reject
varchar
(
255
)
default
''
not
null
comment
'驳回原因'
,
uid
varchar
(
64
)
default
''
not
null
comment
'申请者账号'
,
uid
varchar
(
64
)
default
''
not
null
comment
'申请者账号'
,
field_id
varchar
(
64
)
default
''
not
null
comment
'
要
认领的或创建的场地ID'
,
field_id
varchar
(
64
)
default
''
not
null
comment
'认领的或创建的场地ID'
,
name
varchar
(
255
)
default
''
not
null
comment
'名称'
,
name
varchar
(
255
)
default
''
not
null
comment
'名称'
,
logo
varchar
(
255
)
default
''
not
null
comment
'logo图片地址'
,
logo
varchar
(
255
)
default
''
not
null
comment
'logo图片地址'
,
background
varchar
(
255
)
default
''
not
null
comment
'背景图片地址'
,
background
varchar
(
255
)
default
''
not
null
comment
'背景图片地址'
,
...
@@ -144,7 +144,7 @@ create table merchant_sponsor_applies
...
@@ -144,7 +144,7 @@ create table merchant_sponsor_applies
apply_type
varchar
(
255
)
default
''
not
null
comment
'类型 create创建'
,
apply_type
varchar
(
255
)
default
''
not
null
comment
'类型 create创建'
,
reject
varchar
(
255
)
default
''
not
null
comment
'驳回原因'
,
reject
varchar
(
255
)
default
''
not
null
comment
'驳回原因'
,
uid
varchar
(
64
)
default
''
not
null
comment
'申请者账号'
,
uid
varchar
(
64
)
default
''
not
null
comment
'申请者账号'
,
sponsor_id
varchar
(
64
)
default
''
not
null
comment
'
要认领的或
创建的主办ID'
,
sponsor_id
varchar
(
64
)
default
''
not
null
comment
'创建的主办ID'
,
name
varchar
(
255
)
default
''
not
null
comment
'名称'
,
name
varchar
(
255
)
default
''
not
null
comment
'名称'
,
logo
varchar
(
255
)
default
''
not
null
comment
'logo图片地址'
,
logo
varchar
(
255
)
default
''
not
null
comment
'logo图片地址'
,
background
varchar
(
255
)
default
''
not
null
comment
'背景图片地址'
,
background
varchar
(
255
)
default
''
not
null
comment
'背景图片地址'
,
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/controller/MerchantFieldsController.java
View file @
6123966d
...
@@ -81,8 +81,17 @@ public class MerchantFieldsController {
...
@@ -81,8 +81,17 @@ public class MerchantFieldsController {
return
ResponseDto
.
success
(
merchantFieldAppliesService
.
applyInfo
(
currentUid
,
fieldApplyId
));
return
ResponseDto
.
success
(
merchantFieldAppliesService
.
applyInfo
(
currentUid
,
fieldApplyId
));
}
}
@ApiOperationSupport
(
order
=
20
)
@ApiOperation
(
value
=
"场地详情"
)
@GetMapping
(
"info"
)
public
ResponseDto
<
MerchantFieldsVo
>
info
(
@RequestParam
(
required
=
true
)
String
fieldId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
return
ResponseDto
.
success
(
merchantFieldsService
.
fieldInfo
(
currentUid
,
fieldId
));
}
@ApiOperationSupport
(
order
=
21
)
@ApiOperationSupport
(
order
=
21
)
@ApiOperation
(
value
=
"
更改场地
是否审核演出"
)
@ApiOperation
(
value
=
"
场地更改
是否审核演出"
)
@PostMapping
(
"editIsCheck"
)
@PostMapping
(
"editIsCheck"
)
public
ResponseDto
<
Object
>
editIsCheck
(
@RequestParam
(
required
=
true
)
String
fieldId
,
public
ResponseDto
<
Object
>
editIsCheck
(
@RequestParam
(
required
=
true
)
String
fieldId
,
@RequestParam
(
required
=
true
)
int
isCheck
){
@RequestParam
(
required
=
true
)
int
isCheck
){
...
@@ -94,7 +103,7 @@ public class MerchantFieldsController {
...
@@ -94,7 +103,7 @@ public class MerchantFieldsController {
}
}
@ApiOperationSupport
(
order
=
22
)
@ApiOperationSupport
(
order
=
22
)
@ApiOperation
(
value
=
"默认验票员列表"
)
@ApiOperation
(
value
=
"
场地
默认验票员列表"
)
@GetMapping
(
"checkers"
)
@GetMapping
(
"checkers"
)
public
ResponseDto
<
List
<
MerchantFieldCheckersVo
>>
checkers
(
@RequestParam
(
required
=
true
)
String
fieldId
)
{
public
ResponseDto
<
List
<
MerchantFieldCheckersVo
>>
checkers
(
@RequestParam
(
required
=
true
)
String
fieldId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
...
@@ -103,7 +112,7 @@ public class MerchantFieldsController {
...
@@ -103,7 +112,7 @@ public class MerchantFieldsController {
}
}
@ApiOperationSupport
(
order
=
23
)
@ApiOperationSupport
(
order
=
23
)
@ApiOperation
(
value
=
"添加默认验票员"
)
@ApiOperation
(
value
=
"
场地
添加默认验票员"
)
@PostMapping
(
"checker/add"
)
@PostMapping
(
"checker/add"
)
public
ResponseDto
<
Object
>
checkerAdd
(
@RequestParam
(
required
=
true
)
String
fieldId
,
public
ResponseDto
<
Object
>
checkerAdd
(
@RequestParam
(
required
=
true
)
String
fieldId
,
@RequestParam
(
required
=
true
)
String
uid
,
@RequestParam
(
required
=
true
)
String
uid
,
...
@@ -117,7 +126,7 @@ public class MerchantFieldsController {
...
@@ -117,7 +126,7 @@ public class MerchantFieldsController {
}
}
@ApiOperationSupport
(
order
=
24
)
@ApiOperationSupport
(
order
=
24
)
@ApiOperation
(
value
=
"移除默认验票员"
)
@ApiOperation
(
value
=
"
场地
移除默认验票员"
)
@PostMapping
(
"checker/del"
)
@PostMapping
(
"checker/del"
)
public
ResponseDto
<
Object
>
checkerDel
(
@RequestParam
(
required
=
true
)
String
fieldId
,
public
ResponseDto
<
Object
>
checkerDel
(
@RequestParam
(
required
=
true
)
String
fieldId
,
@RequestParam
(
required
=
true
)
String
uid
){
@RequestParam
(
required
=
true
)
String
uid
){
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/controller/MerchantSponsorsController.java
View file @
6123966d
...
@@ -78,4 +78,13 @@ public class MerchantSponsorsController {
...
@@ -78,4 +78,13 @@ public class MerchantSponsorsController {
return
ResponseDto
.
success
(
merchantSponsorAppliesService
.
applyInfo
(
currentUid
,
sponsorApplyId
));
return
ResponseDto
.
success
(
merchantSponsorAppliesService
.
applyInfo
(
currentUid
,
sponsorApplyId
));
}
}
@ApiOperationSupport
(
order
=
20
)
@ApiOperation
(
value
=
"主办详情"
)
@GetMapping
(
"info"
)
public
ResponseDto
<
MerchantSponsorsVo
>
info
(
@RequestParam
(
required
=
true
)
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 @
6123966d
package
com
.
liquidnet
.
service
.
merchant
.
service
;
package
com
.
liquidnet
.
service
.
merchant
.
service
;
import
com.liquidnet.service.merchant.constant.MerchantAuthorizationConst
;
import
com.liquidnet.service.merchant.dto.vo.*
;
import
com.liquidnet.service.merchant.dto.vo.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
...
@@ -30,7 +31,11 @@ public class MerchantMongoService {
...
@@ -30,7 +31,11 @@ public class MerchantMongoService {
return
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"uid"
).
is
(
uid
).
and
(
"deletedAt"
).
is
(
null
)),
MerchantSponsorAppliesVo
.
class
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
return
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"uid"
).
is
(
uid
).
and
(
"deletedAt"
).
is
(
null
)),
MerchantSponsorAppliesVo
.
class
,
MerchantSponsorAppliesVo
.
class
.
getSimpleName
());
}
}
public
List
<
MerchantAuthorizationRecordsVo
>
getAuthorizationRecordsVosByUid
(
String
uid
,
String
performanceId
)
{
return
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"uid"
).
is
(
uid
).
and
(
"performanceId"
).
is
(
performanceId
).
and
(
"deletedAt"
).
is
(
null
)),
MerchantAuthorizationRecordsVo
.
class
,
MerchantAuthorizationRecordsVo
.
class
.
getSimpleName
());
}
public
List
<
MerchantAuthorizationRecordsVo
>
getCheckersAuthorizationRecordsVosByCuid
(
String
cuid
,
String
performanceId
)
{
public
List
<
MerchantAuthorizationRecordsVo
>
getCheckersAuthorizationRecordsVosByCuid
(
String
cuid
,
String
performanceId
)
{
return
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"uidRole"
).
is
(
"checker"
).
and
(
"cuid"
).
is
(
cuid
).
and
(
"performanceId"
).
is
(
performanceId
).
and
(
"deletedAt"
).
is
(
null
)),
MerchantAuthorizationRecordsVo
.
class
,
MerchantAuthorizationRecordsVo
.
class
.
getSimpleName
());
return
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"uidRole"
).
is
(
MerchantAuthorizationConst
.
PerformanceRole
.
CHECKER
.
getRole
()
).
and
(
"cuid"
).
is
(
cuid
).
and
(
"performanceId"
).
is
(
performanceId
).
and
(
"deletedAt"
).
is
(
null
)),
MerchantAuthorizationRecordsVo
.
class
,
MerchantAuthorizationRecordsVo
.
class
.
getSimpleName
());
}
}
}
}
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/impl/MerchantAuthorizationRecordsServiceImpl.java
View file @
6123966d
package
com
.
liquidnet
.
service
.
merchant
.
service
.
impl
;
package
com
.
liquidnet
.
service
.
merchant
.
service
.
impl
;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.merchant.constant.MerchantPermissionConst
;
import
com.liquidnet.service.base.ErrorMapping
;
import
com.liquidnet.service.merchant.constant.MerchantAuthorizationConst
;
import
com.liquidnet.service.merchant.dto.vo.MerchantAuthorizationPermissionsVo
;
import
com.liquidnet.service.merchant.dto.vo.MerchantAuthorizationPermissionsVo
;
import
com.liquidnet.service.merchant.dto.vo.MerchantAuthorizationRecordsVo
;
import
com.liquidnet.service.merchant.dto.vo.MerchantAuthorizationRecordsVo
;
import
com.liquidnet.service.merchant.service.IMerchantAuthorizationRecordsService
;
import
com.liquidnet.service.merchant.service.IMerchantAuthorizationRecordsService
;
...
@@ -25,20 +28,32 @@ public class MerchantAuthorizationRecordsServiceImpl implements IMerchantAuthori
...
@@ -25,20 +28,32 @@ public class MerchantAuthorizationRecordsServiceImpl implements IMerchantAuthori
public
void
performanceCheckerAdd
(
String
cuid
,
String
performanceId
,
String
uid
,
String
mobile
,
String
name
,
boolean
statistics
)
{
public
void
performanceCheckerAdd
(
String
cuid
,
String
performanceId
,
String
uid
,
String
mobile
,
String
name
,
boolean
statistics
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
MerchantAuthorizationConst
.
PerformanceRole
maxPerformanceRole
=
this
.
getMaxPerformanceRole
(
cuid
,
performanceId
);
if
(
null
==
maxPerformanceRole
||
maxPerformanceRole
.
getLevel
()
<=
MerchantAuthorizationConst
.
PerformanceRole
.
CHECKER
.
getLevel
())
{
// 无授权权限
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"13301"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
if
(
statistics
&&
maxPerformanceRole
.
getLevel
()
<=
MerchantAuthorizationConst
.
PerformanceRole
.
FIELDER
.
getLevel
())
{
// 无权限授于统计权限
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"13302"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
MerchantAuthorizationRecordsVo
checkerAuthorizationRecordsVo
=
MerchantAuthorizationRecordsVo
.
getNew
();
MerchantAuthorizationRecordsVo
checkerAuthorizationRecordsVo
=
MerchantAuthorizationRecordsVo
.
getNew
();
checkerAuthorizationRecordsVo
.
setAuthorizationRecordId
(
IDGenerator
.
nextSnowId
());
checkerAuthorizationRecordsVo
.
setAuthorizationRecordId
(
IDGenerator
.
nextSnowId
());
checkerAuthorizationRecordsVo
.
setPerformanceId
(
performanceId
);
checkerAuthorizationRecordsVo
.
setPerformanceId
(
performanceId
);
checkerAuthorizationRecordsVo
.
setUidRole
(
"checker"
);
checkerAuthorizationRecordsVo
.
setUidRole
(
MerchantAuthorizationConst
.
PerformanceRole
.
CHECKER
.
getRole
()
);
checkerAuthorizationRecordsVo
.
setUid
(
uid
);
checkerAuthorizationRecordsVo
.
setUid
(
uid
);
checkerAuthorizationRecordsVo
.
setMobile
(
mobile
);
checkerAuthorizationRecordsVo
.
setMobile
(
mobile
);
checkerAuthorizationRecordsVo
.
setName
(
name
);
checkerAuthorizationRecordsVo
.
setName
(
name
);
checkerAuthorizationRecordsVo
.
setCuid
(
"cuid"
);
checkerAuthorizationRecordsVo
.
setCuid
(
"cuid"
);
// checkerAuthorizationRecordsVo.setCuidRole("fielder"
);
checkerAuthorizationRecordsVo
.
setCuidRole
(
maxPerformanceRole
.
getRole
()
);
checkerAuthorizationRecordsVo
.
setCreatedAt
(
now
);
checkerAuthorizationRecordsVo
.
setCreatedAt
(
now
);
// 验票员 授权权限
// 验票员 授权权限
String
[]
checkerPermissionIds
=
{
String
[]
checkerPermissionIds
=
{
Merchant
Permiss
ionConst
.
PerformancePermission
.
CHECK
.
getId
()
Merchant
Authorizat
ionConst
.
PerformancePermission
.
CHECK
.
getId
()
};
};
// 验票员 授权权限 entity vo
// 验票员 授权权限 entity vo
ArrayList
<
MerchantAuthorizationPermissionsVo
>
checkerAuthorizationPermissionsVos
=
new
ArrayList
<>();
ArrayList
<
MerchantAuthorizationPermissionsVo
>
checkerAuthorizationPermissionsVos
=
new
ArrayList
<>();
...
@@ -54,6 +69,8 @@ public class MerchantAuthorizationRecordsServiceImpl implements IMerchantAuthori
...
@@ -54,6 +69,8 @@ public class MerchantAuthorizationRecordsServiceImpl implements IMerchantAuthori
checkerAuthorizationPermissionsVos
.
add
(
checkerAuthorizationPermissionsVo
);
checkerAuthorizationPermissionsVos
.
add
(
checkerAuthorizationPermissionsVo
);
}
}
checkerAuthorizationRecordsVo
.
setPermissionsVos
(
checkerAuthorizationPermissionsVos
);
checkerAuthorizationRecordsVo
.
setPermissionsVos
(
checkerAuthorizationPermissionsVos
);
}
}
@Override
@Override
...
@@ -66,4 +83,22 @@ public class MerchantAuthorizationRecordsServiceImpl implements IMerchantAuthori
...
@@ -66,4 +83,22 @@ public class MerchantAuthorizationRecordsServiceImpl implements IMerchantAuthori
List
<
MerchantAuthorizationRecordsVo
>
authorizationRecordsVos
=
merchantMongoService
.
getCheckersAuthorizationRecordsVosByCuid
(
cuid
,
performanceId
);
List
<
MerchantAuthorizationRecordsVo
>
authorizationRecordsVos
=
merchantMongoService
.
getCheckersAuthorizationRecordsVosByCuid
(
cuid
,
performanceId
);
return
authorizationRecordsVos
;
return
authorizationRecordsVos
;
}
}
private
MerchantAuthorizationConst
.
PerformanceRole
getMaxPerformanceRole
(
String
uid
,
String
performanceId
)
{
List
<
MerchantAuthorizationRecordsVo
>
authorizationRecordsVos
=
merchantMongoService
.
getAuthorizationRecordsVosByUid
(
uid
,
performanceId
);
if
(!
CollectionUtil
.
isEmpty
(
authorizationRecordsVos
))
{
return
null
;
}
MerchantAuthorizationConst
.
PerformanceRole
maxRole
=
MerchantAuthorizationConst
.
PerformanceRole
.
valueOf
(
authorizationRecordsVos
.
get
(
0
).
getUidRole
());
for
(
MerchantAuthorizationRecordsVo
authorizationRecordsVo
:
authorizationRecordsVos
)
{
MerchantAuthorizationConst
.
PerformanceRole
role
=
MerchantAuthorizationConst
.
PerformanceRole
.
valueOf
(
authorizationRecordsVo
.
getUidRole
());
if
(
role
.
getLevel
()
>
maxRole
.
getLevel
())
{
maxRole
=
role
;
}
}
return
maxRole
;
}
}
}
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/impl/MerchantFieldAppliesServiceImpl.java
View file @
6123966d
...
@@ -67,7 +67,7 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
...
@@ -67,7 +67,7 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
List
<
MerchantFieldAppliesVo
>
fieldAppliesVos
=
merchantRdmService
.
getFieldAppliesVosByUid
(
uid
);
List
<
MerchantFieldAppliesVo
>
fieldAppliesVos
=
merchantRdmService
.
getFieldAppliesVosByUid
(
uid
);
if
(!
CollectionUtils
.
isEmpty
(
fieldAppliesVos
))
{
if
(!
CollectionUtils
.
isEmpty
(
fieldAppliesVos
))
{
if
(
fieldAppliesVos
.
size
()
>=
10
)
{
if
(
fieldAppliesVos
.
size
()
>=
10
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
03
"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
11
"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
}
}
...
@@ -166,7 +166,7 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
...
@@ -166,7 +166,7 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
// 查找场地申请,是否存在且已经驳回
// 查找场地申请,是否存在且已经驳回
List
<
MerchantFieldAppliesVo
>
fieldAppliesVos
=
merchantRdmService
.
getFieldAppliesVosByUid
(
uid
);
List
<
MerchantFieldAppliesVo
>
fieldAppliesVos
=
merchantRdmService
.
getFieldAppliesVosByUid
(
uid
);
if
(
CollectionUtils
.
isEmpty
(
fieldAppliesVos
))
{
if
(
CollectionUtils
.
isEmpty
(
fieldAppliesVos
))
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
04
"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
12
"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
int
idx
=
IntStream
.
range
(
0
,
fieldAppliesVos
.
size
())
int
idx
=
IntStream
.
range
(
0
,
fieldAppliesVos
.
size
())
...
@@ -174,12 +174,12 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
...
@@ -174,12 +174,12 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
.
findFirst
()
.
findFirst
()
.
orElse
(-
1
);
.
orElse
(-
1
);
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
04
"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
12
"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
MerchantFieldAppliesVo
fieldAppliesVo
=
fieldAppliesVos
.
get
(
idx
);
MerchantFieldAppliesVo
fieldAppliesVo
=
fieldAppliesVos
.
get
(
idx
);
if
(
fieldAppliesVo
.
getApplyStatus
()
!=
2
)
{
if
(
fieldAppliesVo
.
getApplyStatus
()
!=
2
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
05
"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
13
"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
...
@@ -221,7 +221,7 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
...
@@ -221,7 +221,7 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
// 查找场地申请,是否存在
// 查找场地申请,是否存在
List
<
MerchantFieldAppliesVo
>
fieldAppliesVos
=
merchantRdmService
.
getFieldAppliesVosByUid
(
uid
);
List
<
MerchantFieldAppliesVo
>
fieldAppliesVos
=
merchantRdmService
.
getFieldAppliesVosByUid
(
uid
);
if
(
CollectionUtils
.
isEmpty
(
fieldAppliesVos
))
{
if
(
CollectionUtils
.
isEmpty
(
fieldAppliesVos
))
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
04
"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
12
"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
int
idx
=
IntStream
.
range
(
0
,
fieldAppliesVos
.
size
())
int
idx
=
IntStream
.
range
(
0
,
fieldAppliesVos
.
size
())
...
@@ -229,7 +229,7 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
...
@@ -229,7 +229,7 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
.
findFirst
()
.
findFirst
()
.
orElse
(-
1
);
.
orElse
(-
1
);
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
04
"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
12
"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/impl/MerchantFieldsServiceImpl.java
View file @
6123966d
...
@@ -72,6 +72,14 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
...
@@ -72,6 +72,14 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
return
pagedResult
;
return
pagedResult
;
}
}
@Override
public
MerchantFieldsVo
fieldInfo
(
String
uid
,
String
fieldId
)
{
// 当前用户是否管理该场地
MerchantFieldsVo
fieldsVo
=
this
.
checkFieldAccount
(
uid
,
fieldId
);
return
fieldsVo
;
}
@Override
@Override
public
void
editIsCheck
(
String
uid
,
String
fieldId
,
int
isCheck
)
{
public
void
editIsCheck
(
String
uid
,
String
fieldId
,
int
isCheck
)
{
// 当前用户是否管理该场地
// 当前用户是否管理该场地
...
@@ -132,7 +140,7 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
...
@@ -132,7 +140,7 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
if
(!
CollectionUtils
.
isEmpty
(
fieldCheckersVos
))
{
if
(!
CollectionUtils
.
isEmpty
(
fieldCheckersVos
))
{
for
(
MerchantFieldCheckersVo
vo
:
fieldCheckersVos
)
{
for
(
MerchantFieldCheckersVo
vo
:
fieldCheckersVos
)
{
if
(
vo
.
getUid
().
equals
(
uid
))
{
if
(
vo
.
getUid
().
equals
(
uid
))
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
11
"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
03
"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
}
}
...
@@ -179,7 +187,7 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
...
@@ -179,7 +187,7 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
// 查找场地默认验票员,是否已经添加
// 查找场地默认验票员,是否已经添加
List
<
MerchantFieldCheckersVo
>
fieldCheckersVos
=
merchantRdmService
.
getFieldCheckersVosByFieldId
(
fieldId
);
List
<
MerchantFieldCheckersVo
>
fieldCheckersVos
=
merchantRdmService
.
getFieldCheckersVosByFieldId
(
fieldId
);
if
(
CollectionUtils
.
isEmpty
(
fieldCheckersVos
))
{
if
(
CollectionUtils
.
isEmpty
(
fieldCheckersVos
))
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
12
"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
04
"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
int
idx
=
IntStream
.
range
(
0
,
fieldCheckersVos
.
size
())
int
idx
=
IntStream
.
range
(
0
,
fieldCheckersVos
.
size
())
...
@@ -187,7 +195,7 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
...
@@ -187,7 +195,7 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
.
findFirst
()
.
findFirst
()
.
orElse
(-
1
);
.
orElse
(-
1
);
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
12
"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
04
"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
...
@@ -223,7 +231,7 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
...
@@ -223,7 +231,7 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
private
MerchantFieldsVo
checkFieldAccount
(
String
uid
,
String
fieldId
)
{
private
MerchantFieldsVo
checkFieldAccount
(
String
uid
,
String
fieldId
)
{
// 当前用户是否管理该场地
// 当前用户是否管理该场地
MerchantFieldsVo
fieldsVo
=
merchantRdmService
.
getFieldsVoByFieldId
(
fieldId
);
MerchantFieldsVo
fieldsVo
=
merchantRdmService
.
getFieldsVoByFieldId
(
fieldId
);
if
(
null
==
fieldsVo
||
!
fieldsVo
.
getUid
().
equals
(
uid
))
{
if
(
null
==
fieldsVo
||
!
uid
.
equals
(
fieldsVo
.
getUid
()
))
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"13101"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"13101"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/impl/MerchantSponsorAppliesServiceImpl.java
View file @
6123966d
...
@@ -48,7 +48,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
...
@@ -48,7 +48,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
List
<
MerchantSponsorAppliesVo
>
sponsorAppliesVos
=
merchantRdmService
.
getSponsorAppliesVosByUid
(
uid
);
List
<
MerchantSponsorAppliesVo
>
sponsorAppliesVos
=
merchantRdmService
.
getSponsorAppliesVosByUid
(
uid
);
if
(!
CollectionUtils
.
isEmpty
(
sponsorAppliesVos
))
{
if
(!
CollectionUtils
.
isEmpty
(
sponsorAppliesVos
))
{
if
(
sponsorAppliesVos
.
size
()
>=
10
)
{
if
(
sponsorAppliesVos
.
size
()
>=
10
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
0
1"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
1
1"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
}
}
...
@@ -80,7 +80,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
...
@@ -80,7 +80,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
||
sponsorAppliesVo
.
getLegalIdentity
().
isEmpty
()
||
sponsorAppliesVo
.
getLegalIdentity
().
isEmpty
()
||
sponsorAppliesVo
.
getLegalIdentityObverse
().
isEmpty
()
||
sponsorAppliesVo
.
getLegalIdentityObverse
().
isEmpty
()
||
sponsorAppliesVo
.
getLegalIdentityReverse
().
isEmpty
())
{
||
sponsorAppliesVo
.
getLegalIdentityReverse
().
isEmpty
())
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
0
2"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
1
2"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
...
@@ -139,7 +139,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
...
@@ -139,7 +139,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
// 查找主办申请,是否存在且已经驳回
// 查找主办申请,是否存在且已经驳回
List
<
MerchantSponsorAppliesVo
>
sponsorAppliesVos
=
merchantRdmService
.
getSponsorAppliesVosByUid
(
uid
);
List
<
MerchantSponsorAppliesVo
>
sponsorAppliesVos
=
merchantRdmService
.
getSponsorAppliesVosByUid
(
uid
);
if
(
CollectionUtils
.
isEmpty
(
sponsorAppliesVos
))
{
if
(
CollectionUtils
.
isEmpty
(
sponsorAppliesVos
))
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
0
3"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
1
3"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
int
idx
=
IntStream
.
range
(
0
,
sponsorAppliesVos
.
size
())
int
idx
=
IntStream
.
range
(
0
,
sponsorAppliesVos
.
size
())
...
@@ -147,12 +147,12 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
...
@@ -147,12 +147,12 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
.
findFirst
()
.
findFirst
()
.
orElse
(-
1
);
.
orElse
(-
1
);
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
0
3"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
1
3"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
MerchantSponsorAppliesVo
sponsorAppliesVo
=
sponsorAppliesVos
.
get
(
idx
);
MerchantSponsorAppliesVo
sponsorAppliesVo
=
sponsorAppliesVos
.
get
(
idx
);
if
(
sponsorAppliesVo
.
getApplyStatus
()
!=
2
)
{
if
(
sponsorAppliesVo
.
getApplyStatus
()
!=
2
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
0
4"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
1
4"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
...
@@ -194,7 +194,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
...
@@ -194,7 +194,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
// 查找主办申请,是否存在
// 查找主办申请,是否存在
List
<
MerchantSponsorAppliesVo
>
sponsorAppliesVos
=
merchantRdmService
.
getSponsorAppliesVosByUid
(
uid
);
List
<
MerchantSponsorAppliesVo
>
sponsorAppliesVos
=
merchantRdmService
.
getSponsorAppliesVosByUid
(
uid
);
if
(
CollectionUtils
.
isEmpty
(
sponsorAppliesVos
))
{
if
(
CollectionUtils
.
isEmpty
(
sponsorAppliesVos
))
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
0
3"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
1
3"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
int
idx
=
IntStream
.
range
(
0
,
sponsorAppliesVos
.
size
())
int
idx
=
IntStream
.
range
(
0
,
sponsorAppliesVos
.
size
())
...
@@ -202,7 +202,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
...
@@ -202,7 +202,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
.
findFirst
()
.
findFirst
()
.
orElse
(-
1
);
.
orElse
(-
1
);
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
0
3"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"132
1
3"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/impl/MerchantSponsorsServiceImpl.java
View file @
6123966d
package
com
.
liquidnet
.
service
.
merchant
.
service
.
impl
;
package
com
.
liquidnet
.
service
.
merchant
.
service
.
impl
;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.service.base.ErrorMapping
;
import
com.liquidnet.service.base.PagedResult
;
import
com.liquidnet.service.base.PagedResult
;
import
com.liquidnet.service.merchant.dto.vo.MerchantSponsorsVo
;
import
com.liquidnet.service.merchant.dto.vo.MerchantSponsorsVo
;
import
com.liquidnet.service.merchant.service.IMerchantSponsorsService
;
import
com.liquidnet.service.merchant.service.IMerchantSponsorsService
;
import
com.liquidnet.service.merchant.service.MerchantRdmService
;
import
com.liquidnet.service.merchant.util.ObjectUtil
;
import
com.liquidnet.service.merchant.util.ObjectUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -23,6 +26,9 @@ public class MerchantSponsorsServiceImpl implements IMerchantSponsorsService {
...
@@ -23,6 +26,9 @@ public class MerchantSponsorsServiceImpl implements IMerchantSponsorsService {
@Autowired
@Autowired
MongoTemplate
mongoTemplate
;
MongoTemplate
mongoTemplate
;
@Autowired
MerchantRdmService
merchantRdmService
;
@Override
@Override
public
PagedResult
<
MerchantSponsorsVo
>
search
(
String
name
,
int
page
,
int
size
)
{
public
PagedResult
<
MerchantSponsorsVo
>
search
(
String
name
,
int
page
,
int
size
)
{
// 查询条件
// 查询条件
...
@@ -51,5 +57,21 @@ public class MerchantSponsorsServiceImpl implements IMerchantSponsorsService {
...
@@ -51,5 +57,21 @@ public class MerchantSponsorsServiceImpl implements IMerchantSponsorsService {
return
pagedResult
;
return
pagedResult
;
}
}
@Override
public
MerchantSponsorsVo
sponsorInfo
(
String
uid
,
String
sponsorId
)
{
// 当前用户是否管理该主办
MerchantSponsorsVo
sponsorsVo
=
this
.
checkSponsorAccount
(
uid
,
sponsorId
);
return
sponsorsVo
;
}
private
MerchantSponsorsVo
checkSponsorAccount
(
String
uid
,
String
sponsorId
)
{
// 当前用户是否管理该主办
MerchantSponsorsVo
sponsorsVo
=
merchantRdmService
.
getSponsorsVoBySponsorId
(
sponsorId
);
if
(
null
==
sponsorsVo
||
!
uid
.
equals
(
sponsorsVo
.
getUid
()))
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"13201"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
return
sponsorsVo
;
}
}
}
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/resources/errors.properties
View file @
6123966d
...
@@ -9,21 +9,26 @@
...
@@ -9,21 +9,26 @@
# 场地
# 场地
13101
=
场地不存在,请核实
13101
=
场地不存在,请核实
13102
=
场地已被认领
13102
=
场地已被认领
13103
=
场地申请已达到上限
13103
=
验票员已存在
13104
=
申请不存在,请核实
13104
=
验票员不存在
13105
=
申请未驳回,不能删除
13111
=
验票员已存在
# 场地申请
13112
=
验票员不存在
13111
=
场地申请已达到上限
13112
=
申请不存在,请核实
13113
=
申请未驳回,不能删除
# 主办
# 主办
13201
=
主办申请已经达到上限
13201
=
主办不存在,请核实
13202
=
主办公司信息不能为空
13203
=
申请不存在,请核实
13204
=
申请未驳回,不能删除
# 主办申请
13211
=
主办申请已经达到上限
13212
=
主办公司信息不能为空
13213
=
申请不存在,请核实
13214
=
申请未驳回,不能删除
# 演出授权
13301
=
无授权权限
13302
=
无权限授于统计权限
...
...
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