记得上下班打卡 | 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
117bbd46
Commit
117bbd46
authored
Nov 18, 2021
by
Tice
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_merchant_tice' into dev_merchant
parents
579050bc
d64fc751
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
439 additions
and
81 deletions
+439
-81
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
applyDetail.html
...resources/templates/zhengzai/kylin/field/applyDetail.html
+118
-5
applyDetail.html
...sources/templates/zhengzai/kylin/sponsor/applyDetail.html
+98
-5
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 @
117bbd46
package
com
.
liquidnet
.
service
.
merchant
.
constant
;
public
class
Merchant
Permiss
ionConst
{
public
class
Merchant
Authorizat
ionConst
{
// 某演出通过审核后,分配演出权限,场地方审核演出为'待审核的演出'与'演出'不同
public
enum
PerformancePermission
{
READ
(
"1"
,
"查看详情"
),
EDIT
(
"2"
,
"编辑提交"
),
ONOFF
(
"3"
,
"上下线"
),
LINE
(
"3"
,
"上下线"
),
SALES
(
"4"
,
"销售统计"
),
CHECK
(
"5"
,
"验票"
),
ACCREDIT
(
"6"
,
"授权"
);
...
...
@@ -27,4 +27,33 @@ public class MerchantPermissionConst {
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 @
117bbd46
package
com
.
liquidnet
.
service
.
merchant
.
service
;
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.MerchantFieldsVo
;
...
...
@@ -11,6 +9,7 @@ import java.util.List;
public
interface
IMerchantFieldsService
{
PagedResult
<
MerchantFieldsVo
>
search
(
String
name
,
int
page
,
int
size
);
MerchantFieldsVo
fieldInfo
(
String
uid
,
String
fieldId
);
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 @
117bbd46
package
com
.
liquidnet
.
service
.
merchant
.
service
;
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
;
public
interface
IMerchantSponsorsService
{
PagedResult
<
MerchantSponsorsVo
>
search
(
String
name
,
int
page
,
int
size
);
MerchantSponsorsVo
sponsorInfo
(
String
uid
,
String
sponsorId
);
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/field/applyDetail.html
View file @
117bbd46
<!DOCTYPE html>
<html
lang=
"
en
"
>
<html
lang=
"
zh"
xmlns:th=
"http://www.thymeleaf.org
"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Title
</title>
<th:block
th:include=
"include :: header('场地审核详情')"
/>
<style>
.field-detail-avatar
{
width
:
146px
;
height
:
146px
;
}
.field-detail-avatar-certificates
{
width
:
300px
;
height
:
200px
;
}
.form-btns
{
padding-bottom
:
20px
;
}
.form-dis
{
display
:
none
;
}
</style>
</head>
<body>
<body
class=
"white-bg"
>
<form
class=
"form-horizontal m-t"
id=
"signupForm"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
zbu名称:
</label>
<div
class=
"form-control-static"
th:text=
"${fieldApplyInfo.name}"
></div>
<label
class=
"col-sm-2 control-label"
>
场地logo:
</label>
<div
class=
"form-control-static"
>
<img
class=
"field-detail-avatar"
th:src=
"${fieldApplyInfo.logo}"
alt=
""
>
</div>
<label
class=
"col-sm-2 control-label"
>
场地背景图:
</label>
<div
class=
"form-control-static"
>
<img
class=
"field-detail-avatar"
th:src=
"${fieldApplyInfo.background}"
alt=
""
>
</div>
<label
class=
"col-sm-2 control-label"
>
场地创建时间:
</label>
<div
class=
"form-control-static"
th:text=
"${fieldApplyInfo.builtDate}"
></div>
<label
class=
"col-sm-2 control-label"
>
地区:
</label>
<div
class=
"form-control-static"
th:text=
"${fieldApplyInfo.provinceName + fieldApplyInfo.cityName + fieldApplyInfo.districtName}"
></div>
<label
class=
"col-sm-2 control-label"
>
坐标:
</label>
<div
class=
"form-control-static"
th:text=
"${fieldApplyInfo.longitude + ',' + fieldApplyInfo.latitude}"
></div>
<label
class=
"col-sm-2 control-label"
>
地址详情:
</label>
<div
class=
"form-control-static"
th:text=
"${fieldApplyInfo.address}"
></div>
<label
class=
"col-sm-2 control-label"
>
介绍:
</label>
<div
class=
"form-control-static"
th:text=
"${fieldApplyInfo.description}"
></div>
<label
class=
"col-sm-2 control-label"
>
场地负责人姓名:
</label>
<div
class=
"form-control-static"
th:text=
"${fieldApplyInfo.contactName}"
></div>
<label
class=
"col-sm-2 control-label"
>
联系方式:
</label>
<div
class=
"form-control-static"
th:text=
"${fieldApplyInfo.contactEmail}"
></div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
企业名称:
</label>
<div
class=
"form-control-static"
th:text=
"${fieldApplyInfo.companyName}"
></div>
<label
class=
"col-sm-2 control-label"
>
营业执照编号:
</label>
<div
class=
"form-control-static"
th:text=
"${fieldApplyInfo.licenseCode}"
></div>
<label
class=
"col-sm-2 control-label"
>
营业执照:
</label>
<div
class=
"form-control-static"
>
<img
class=
"field-detail-avatar-certificates"
th:src=
"${fieldApplyInfo.licenseImg}"
alt=
""
>
</div>
<label
class=
"col-sm-2 control-label"
>
法人代表名称:
</label>
<div
class=
"form-control-static"
th:text=
"${fieldApplyInfo.legalName}"
></div>
<label
class=
"col-sm-2 control-label"
>
法人代表身份证号:
</label>
<div
class=
"form-control-static"
th:text=
"${fieldApplyInfo.legalIdentity}"
></div>
<label
class=
"col-sm-2 control-label"
>
法人证件正面照:
</label>
<div
class=
"form-control-static"
>
<img
class=
"field-detail-avatar-certificates"
th:src=
"${fieldApplyInfo.legalIdentityObverse}"
alt=
""
>
</div>
<label
class=
"col-sm-2 control-label"
>
法人证件反面照:
</label>
<div
class=
"form-control-static"
>
<img
class=
"field-detail-avatar-certificates"
th:src=
"${fieldApplyInfo.legalIdentityReverse}"
alt=
""
>
</div>
</div>
<div
class=
"form-group form-btns"
th:class=
"${fieldApplyInfo.applyStatus == 0? '' : 'form-dis'}"
>
<div
class=
"col-sm-offset-2 col-sm-10"
>
<button
type=
"button"
class=
"btn btn-sm btn-primary"
onclick=
"AdoptSubmit()"
>
审核通过
</button>
<a
class=
"btn btn-sm btn-danger"
href=
"#field-reject-form"
data-toggle=
"modal"
>
驳 回
</a>
</div>
</div>
<div
id=
"field-reject-form"
class=
"modal fade"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
style=
"width:33%;"
>
<div
class=
"modal-content"
style=
"padding:0 20px;"
>
<div
class=
"modal-body"
>
<div
class=
"row"
>
<div>
<h3
class=
"m-t-none m-b text-center"
>
驳回原因
</h3>
<div
class=
"form-group"
>
<textarea
id=
"fieldRejectText"
rows=
"3"
name=
"reason"
placeholder=
"请输入驳回原因"
class=
"form-control"
></textarea>
</div>
<div
class=
"text-center"
style=
"margin-bottom: -15px;margin-top: 10px;"
>
<button
class=
"btn btn-sm btn-primary m-t-n-xs"
type=
"button"
onclick=
"Reject()"
>
<strong>
确认驳回
</strong>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
<th:block
th:include=
"include :: footer"
/>
<script
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"merchant/field/apply"
;
var
fieldInfo
=
[[
$
{
fieldApplyInfo
}]]
var
param
=
{
fieldApplyId
:
fieldInfo
.
fieldApplyId
}
function
AdoptSubmit
()
{
$
.
operate
.
post
(
prefix
+
"/approve"
,
param
,
function
(
res
)
{
location
.
reload
();
});
}
function
Reject
()
{
param
.
reject
=
$
(
'#fieldRejectText'
).
val
();
$
.
operate
.
post
(
prefix
+
"/reject"
,
param
,
function
(
res
)
{
location
.
reload
();
});
}
</script>
</html>
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/sponsor/applyDetail.html
View file @
117bbd46
<!DOCTYPE html>
<html
lang=
"
en
"
>
<html
lang=
"
zh"
xmlns:th=
"http://www.thymeleaf.org
"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Title
</title>
<th:block
th:include=
"include :: header('场地审核详情')"
/>
<style>
.field-detail-avatar
{
width
:
146px
;
height
:
146px
;
}
.field-detail-avatar-certificates
{
width
:
300px
;
height
:
200px
;
}
.form-btns
{
padding-bottom
:
20px
;
}
.form-dis
{
display
:
none
;
}
</style>
</head>
<body>
<body
class=
"white-bg"
>
<form
class=
"form-horizontal m-t"
id=
"signupForm"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
主办名称:
</label>
<div
class=
"form-control-static"
th:text=
"${sponsorApplyInfo.name}"
></div>
<label
class=
"col-sm-2 control-label"
>
主办logo:
</label>
<div
class=
"form-control-static"
>
<img
class=
"field-detail-avatar"
th:src=
"${sponsorApplyInfo.logo}"
alt=
""
>
</div>
<label
class=
"col-sm-2 control-label"
>
主办背景图:
</label>
<div
class=
"form-control-static"
>
<img
class=
"field-detail-avatar"
th:src=
"${sponsorApplyInfo.background}"
alt=
""
>
</div>
<label
class=
"col-sm-2 control-label"
>
介绍:
</label>
<div
class=
"form-control-static"
th:text=
"${sponsorApplyInfo.description}"
></div>
<label
class=
"col-sm-2 control-label"
>
姓名:
</label>
<div
class=
"form-control-static"
th:text=
"${sponsorApplyInfo.contactName}"
></div>
<label
class=
"col-sm-2 control-label"
>
身份证号:
</label>
<div
class=
"form-control-static"
th:text=
"${sponsorApplyInfo.contactIdentity}"
></div>
<label
class=
"col-sm-2 control-label"
>
证件正面照:
</label>
<div
class=
"form-control-static"
>
<img
class=
"field-detail-avatar-certificates"
th:src=
"${sponsorApplyInfo.contactIdentityObverse}"
alt=
""
>
</div>
<label
class=
"col-sm-2 control-label"
>
证件反面照:
</label>
<div
class=
"form-control-static"
>
<img
class=
"field-detail-avatar-certificates"
th:src=
"${sponsorApplyInfo.contactIdentityReverse}"
alt=
""
>
</div>
<label
class=
"col-sm-2 control-label"
>
联系方式:
</label>
<div
class=
"form-control-static"
th:text=
"${sponsorApplyInfo.contactEmail}"
></div>
</div>
<div
class=
"form-group form-btns"
th:class=
"${sponsorApplyInfo.applyStatus == 0? '' : 'form-dis'}"
>
<div
class=
"col-sm-offset-2 col-sm-10"
>
<button
type=
"button"
class=
"btn btn-sm btn-primary"
onclick=
"AdoptSubmit()"
>
审核通过
</button>
<a
class=
"btn btn-sm btn-danger"
href=
"#sponsor-reject-form"
data-toggle=
"modal"
>
驳 回
</a>
</div>
</div>
<div
id=
"sponsor-reject-form"
class=
"modal fade"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
style=
"width:33%;"
>
<div
class=
"modal-content"
style=
"padding:0 20px;"
>
<div
class=
"modal-body"
>
<div
class=
"row"
>
<div>
<h3
class=
"m-t-none m-b text-center"
>
驳回原因
</h3>
<div
class=
"form-group"
>
<textarea
id=
"sponsorRejectText"
rows=
"3"
name=
"reason"
placeholder=
"请输入驳回原因"
class=
"form-control"
></textarea>
</div>
<div
class=
"text-center"
style=
"margin-bottom: -15px;margin-top: 10px;"
>
<button
class=
"btn btn-sm btn-primary m-t-n-xs"
type=
"button"
onclick=
"Reject()"
>
<strong>
确认驳回
</strong>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
<th:block
th:include=
"include :: footer"
/>
<script
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"merchant/sponsor/apply"
;
var
sponsorInfo
=
[[
$
{
sponsorApplyInfo
}]]
var
param
=
{
sponsorApplyId
:
sponsorInfo
.
sponsorApplyId
}
function
AdoptSubmit
()
{
$
.
operate
.
post
(
prefix
+
"/approve"
,
param
,
function
(
res
)
{
location
.
reload
();
});
}
function
Reject
()
{
param
.
reject
=
$
(
'#sponsorRejectText'
).
val
();
$
.
operate
.
post
(
prefix
+
"/reject"
,
param
,
function
(
res
)
{
location
.
reload
();
});
}
</script>
</html>
\ No newline at end of file
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 @
117bbd46
...
...
@@ -10,7 +10,7 @@ import com.liquidnet.client.admin.zhengzai.merchant.utils.MerchantRedisUtil;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.merchant.constant.Merchant
Permiss
ionConst
;
import
com.liquidnet.service.merchant.constant.Merchant
Authorizat
ionConst
;
import
com.liquidnet.service.merchant.dto.vo.*
;
import
com.liquidnet.service.merchant.entity.*
;
import
com.liquidnet.service.merchant.mapper.MerchantAuthorizationRecordsMapper
;
...
...
@@ -71,7 +71,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
// 查询已有权限
LambdaQueryWrapper
<
MerchantAuthorizationRecords
>
authorizationRecordsLambdaQueryWrapper
=
Wrappers
.
lambdaQuery
(
MerchantAuthorizationRecords
.
class
);
authorizationRecordsLambdaQueryWrapper
.
eq
(
MerchantAuthorizationRecords:
:
getPerformanceId
,
performanceId
);
authorizationRecordsLambdaQueryWrapper
.
eq
(
MerchantAuthorizationRecords:
:
getUidRole
,
"creator"
);
authorizationRecordsLambdaQueryWrapper
.
eq
(
MerchantAuthorizationRecords:
:
getUidRole
,
MerchantAuthorizationConst
.
PerformanceRole
.
CREATOR
.
getRole
()
);
authorizationRecordsLambdaQueryWrapper
.
eq
(
MerchantAuthorizationRecords:
:
getDeletedAt
,
null
);
MerchantAuthorizationRecords
authorizationRecords
=
getOne
(
authorizationRecordsLambdaQueryWrapper
);
...
...
@@ -97,7 +97,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
MerchantAuthorizationRecords
creatorAuthorizationRecords
=
new
MerchantAuthorizationRecords
();
creatorAuthorizationRecords
.
setAuthorizationRecordId
(
IDGenerator
.
nextSnowId
());
creatorAuthorizationRecords
.
setPerformanceId
(
performanceId
);
creatorAuthorizationRecords
.
setUidRole
(
"creator"
);
creatorAuthorizationRecords
.
setUidRole
(
MerchantAuthorizationConst
.
PerformanceRole
.
CREATOR
.
getRole
()
);
creatorAuthorizationRecords
.
setUid
(
cuid
);
creatorAuthorizationRecords
.
setMobile
(
""
);
creatorAuthorizationRecords
.
setName
(
""
);
...
...
@@ -109,12 +109,12 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
// 授权权限
ArrayList
<
MerchantAuthorizationPermissionsVo
>
creatorAuthorizationPermissionsVos
=
new
ArrayList
<>();
String
[]
fielderPermissionIds
=
{
Merchant
Permiss
ionConst
.
PerformancePermission
.
READ
.
getId
(),
Merchant
Permiss
ionConst
.
PerformancePermission
.
EDIT
.
getId
(),
Merchant
PermissionConst
.
PerformancePermission
.
ONOFF
.
getId
(),
Merchant
Permiss
ionConst
.
PerformancePermission
.
CHECK
.
getId
(),
Merchant
Permiss
ionConst
.
PerformancePermission
.
SALES
.
getId
(),
Merchant
Permiss
ionConst
.
PerformancePermission
.
ACCREDIT
.
getId
()
Merchant
Authorizat
ionConst
.
PerformancePermission
.
READ
.
getId
(),
Merchant
Authorizat
ionConst
.
PerformancePermission
.
EDIT
.
getId
(),
Merchant
AuthorizationConst
.
PerformancePermission
.
LINE
.
getId
(),
Merchant
Authorizat
ionConst
.
PerformancePermission
.
CHECK
.
getId
(),
Merchant
Authorizat
ionConst
.
PerformancePermission
.
SALES
.
getId
(),
Merchant
Authorizat
ionConst
.
PerformancePermission
.
ACCREDIT
.
getId
()
};
for
(
String
permissionId
:
fielderPermissionIds
)
{
// entity
...
...
@@ -160,7 +160,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
// 查询已有权限
LambdaQueryWrapper
<
MerchantAuthorizationRecords
>
authorizationRecordsLambdaQueryWrapper
=
Wrappers
.
lambdaQuery
(
MerchantAuthorizationRecords
.
class
);
authorizationRecordsLambdaQueryWrapper
.
eq
(
MerchantAuthorizationRecords:
:
getPerformanceId
,
performanceId
);
authorizationRecordsLambdaQueryWrapper
.
eq
(
MerchantAuthorizationRecords:
:
getUidRole
,
"fielder"
);
authorizationRecordsLambdaQueryWrapper
.
eq
(
MerchantAuthorizationRecords:
:
getUidRole
,
MerchantAuthorizationConst
.
PerformanceRole
.
FIELDER
.
getRole
()
);
authorizationRecordsLambdaQueryWrapper
.
eq
(
MerchantAuthorizationRecords:
:
getDeletedAt
,
null
);
MerchantAuthorizationRecords
authorizationRecords
=
getOne
(
authorizationRecordsLambdaQueryWrapper
);
...
...
@@ -189,7 +189,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
.
eq
(
MerchantAuthorizationRecords:
:
getAuthorizationRecordId
,
authorizationRecords
.
getAuthorizationRecordId
())
.
or
(
wrapper1
->
wrapper1
.
eq
(
MerchantAuthorizationRecords:
:
getCuid
,
authorizationRecords
.
getUid
())
.
eq
(
MerchantAuthorizationRecords:
:
getCuidRole
,
"fielder"
))
.
eq
(
MerchantAuthorizationRecords:
:
getCuidRole
,
MerchantAuthorizationConst
.
PerformanceRole
.
FIELDER
.
getRole
()
))
);
authorizationRecordsLambdaUpdateWrapper
.
set
(
MerchantAuthorizationRecords:
:
getUpdatedAt
,
authorizationRecords
.
getUpdatedAt
());
authorizationRecordsLambdaUpdateWrapper
.
set
(
MerchantAuthorizationRecords:
:
getDeletedAt
,
authorizationRecords
.
getDeletedAt
());
...
...
@@ -203,7 +203,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
Criteria
criteria
=
Criteria
.
where
(
"performanceId"
).
is
(
performanceId
).
and
(
"deletedAt"
).
is
(
null
);
criteria
.
orOperator
(
Criteria
.
where
(
"authorizationRecordId"
).
is
(
authorizationRecords
.
getAuthorizationRecordId
()),
Criteria
.
where
(
"cuid"
).
is
(
authorizationRecords
.
getUid
()).
and
(
"cuidRole"
).
is
(
"fielder"
)
Criteria
.
where
(
"cuid"
).
is
(
authorizationRecords
.
getUid
()).
and
(
"cuidRole"
).
is
(
MerchantAuthorizationConst
.
PerformanceRole
.
FIELDER
.
getRole
()
)
);
Query
query
=
Query
.
query
(
criteria
);
mongoTemplate
.
remove
(
query
,
MerchantAuthorizationRecordsVo
.
class
,
MerchantAuthorizationRecordsVo
.
class
.
getSimpleName
());
...
...
@@ -221,7 +221,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
MerchantAuthorizationRecords
fielderAuthorizationRecords
=
new
MerchantAuthorizationRecords
();
fielderAuthorizationRecords
.
setAuthorizationRecordId
(
IDGenerator
.
nextSnowId
());
fielderAuthorizationRecords
.
setPerformanceId
(
performanceId
);
fielderAuthorizationRecords
.
setUidRole
(
"fielder"
);
fielderAuthorizationRecords
.
setUidRole
(
MerchantAuthorizationConst
.
PerformanceRole
.
FIELDER
.
getRole
()
);
fielderAuthorizationRecords
.
setUid
(
fields
.
getUid
());
fielderAuthorizationRecords
.
setMobile
(
""
);
fielderAuthorizationRecords
.
setName
(
""
);
...
...
@@ -232,9 +232,9 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
// 授权权限 entity vo
ArrayList
<
MerchantAuthorizationPermissionsVo
>
fielderAuthorizationPermissionsVos
=
new
ArrayList
<>();
String
[]
fielderPermissionIds
=
{
Merchant
Permiss
ionConst
.
PerformancePermission
.
READ
.
getId
(),
Merchant
Permiss
ionConst
.
PerformancePermission
.
CHECK
.
getId
(),
Merchant
Permiss
ionConst
.
PerformancePermission
.
ACCREDIT
.
getId
()
Merchant
Authorizat
ionConst
.
PerformancePermission
.
READ
.
getId
(),
Merchant
Authorizat
ionConst
.
PerformancePermission
.
CHECK
.
getId
(),
Merchant
Authorizat
ionConst
.
PerformancePermission
.
ACCREDIT
.
getId
()
};
for
(
String
permissionId
:
fielderPermissionIds
)
{
MerchantAuthorizationPermissions
fielderAuthorizationPermissions
=
new
MerchantAuthorizationPermissions
();
...
...
@@ -264,19 +264,19 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
if
(!
CollectionUtil
.
isEmpty
(
fieldCheckersList
))
{
// 验票员 授权权限
String
[]
checkerPermissionIds
=
{
Merchant
Permiss
ionConst
.
PerformancePermission
.
CHECK
.
getId
()
Merchant
Authorizat
ionConst
.
PerformancePermission
.
CHECK
.
getId
()
};
for
(
MerchantFieldCheckers
fieldCheckers:
fieldCheckersList
)
{
// 验票员 授权记录 entity
MerchantAuthorizationRecords
checkerAuthorizationRecords
=
new
MerchantAuthorizationRecords
();
checkerAuthorizationRecords
.
setAuthorizationRecordId
(
IDGenerator
.
nextSnowId
());
checkerAuthorizationRecords
.
setPerformanceId
(
performanceId
);
checkerAuthorizationRecords
.
setUidRole
(
"checker"
);
checkerAuthorizationRecords
.
setUidRole
(
MerchantAuthorizationConst
.
PerformanceRole
.
CHECKER
.
getRole
()
);
checkerAuthorizationRecords
.
setUid
(
fieldCheckers
.
getUid
());
checkerAuthorizationRecords
.
setMobile
(
fieldCheckers
.
getMobile
());
checkerAuthorizationRecords
.
setName
(
fieldCheckers
.
getName
());
checkerAuthorizationRecords
.
setCuid
(
fields
.
getUid
());
checkerAuthorizationRecords
.
setCuidRole
(
"fielder"
);
checkerAuthorizationRecords
.
setCuidRole
(
MerchantAuthorizationConst
.
PerformanceRole
.
FIELDER
.
getRole
()
);
checkerAuthorizationRecords
.
setCreatedAt
(
now
);
authorizationRecordsArrayList
.
add
(
checkerAuthorizationRecords
);
...
...
@@ -331,7 +331,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
// 查询已有权限
LambdaQueryWrapper
<
MerchantAuthorizationRecords
>
authorizationRecordsLambdaQueryWrapper
=
Wrappers
.
lambdaQuery
(
MerchantAuthorizationRecords
.
class
);
authorizationRecordsLambdaQueryWrapper
.
eq
(
MerchantAuthorizationRecords:
:
getPerformanceId
,
performanceId
);
authorizationRecordsLambdaQueryWrapper
.
eq
(
MerchantAuthorizationRecords:
:
getUidRole
,
"sponsor"
);
authorizationRecordsLambdaQueryWrapper
.
eq
(
MerchantAuthorizationRecords:
:
getUidRole
,
MerchantAuthorizationConst
.
PerformanceRole
.
SPONSOR
.
getRole
()
);
authorizationRecordsLambdaQueryWrapper
.
eq
(
MerchantAuthorizationRecords:
:
getDeletedAt
,
null
);
MerchantAuthorizationRecords
authorizationRecords
=
getOne
(
authorizationRecordsLambdaQueryWrapper
);
...
...
@@ -360,7 +360,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
.
eq
(
MerchantAuthorizationRecords:
:
getAuthorizationRecordId
,
authorizationRecords
.
getAuthorizationRecordId
())
.
or
(
wrapper1
->
wrapper1
.
eq
(
MerchantAuthorizationRecords:
:
getCuid
,
authorizationRecords
.
getUid
())
.
eq
(
MerchantAuthorizationRecords:
:
getCuidRole
,
"sponsor"
))
.
eq
(
MerchantAuthorizationRecords:
:
getCuidRole
,
MerchantAuthorizationConst
.
PerformanceRole
.
SPONSOR
.
getRole
()
))
);
authorizationRecordsLambdaUpdateWrapper
.
set
(
MerchantAuthorizationRecords:
:
getUpdatedAt
,
authorizationRecords
.
getUpdatedAt
());
authorizationRecordsLambdaUpdateWrapper
.
set
(
MerchantAuthorizationRecords:
:
getDeletedAt
,
authorizationRecords
.
getDeletedAt
());
...
...
@@ -374,7 +374,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
Criteria
criteria
=
Criteria
.
where
(
"performanceId"
).
is
(
performanceId
).
and
(
"deletedAt"
).
is
(
null
);
criteria
.
orOperator
(
Criteria
.
where
(
"authorizationRecordId"
).
is
(
authorizationRecords
.
getAuthorizationRecordId
()),
Criteria
.
where
(
"cuid"
).
is
(
authorizationRecords
.
getUid
()).
and
(
"cuidRole"
).
is
(
"sponsor"
)
Criteria
.
where
(
"cuid"
).
is
(
authorizationRecords
.
getUid
()).
and
(
"cuidRole"
).
is
(
MerchantAuthorizationConst
.
PerformanceRole
.
SPONSOR
.
getRole
()
)
);
Query
query
=
Query
.
query
(
criteria
);
mongoTemplate
.
remove
(
query
,
MerchantAuthorizationRecordsVo
.
class
,
MerchantAuthorizationRecordsVo
.
class
.
getSimpleName
());
...
...
@@ -390,7 +390,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
MerchantAuthorizationRecords
sponsorAuthorizationRecords
=
new
MerchantAuthorizationRecords
();
sponsorAuthorizationRecords
.
setAuthorizationRecordId
(
IDGenerator
.
nextSnowId
());
sponsorAuthorizationRecords
.
setPerformanceId
(
performanceId
);
sponsorAuthorizationRecords
.
setUidRole
(
"sponsor"
);
sponsorAuthorizationRecords
.
setUidRole
(
MerchantAuthorizationConst
.
PerformanceRole
.
SPONSOR
.
getRole
()
);
sponsorAuthorizationRecords
.
setUid
(
sponsors
.
getUid
());
sponsorAuthorizationRecords
.
setMobile
(
""
);
sponsorAuthorizationRecords
.
setName
(
""
);
...
...
@@ -401,10 +401,10 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
// 授权权限 entity vo
ArrayList
<
MerchantAuthorizationPermissionsVo
>
sponsorAuthorizationPermissionsVos
=
new
ArrayList
<>();
String
[]
fielderPermissionIds
=
{
Merchant
Permiss
ionConst
.
PerformancePermission
.
READ
.
getId
(),
Merchant
Permiss
ionConst
.
PerformancePermission
.
CHECK
.
getId
(),
Merchant
Permiss
ionConst
.
PerformancePermission
.
SALES
.
getId
(),
Merchant
Permiss
ionConst
.
PerformancePermission
.
ACCREDIT
.
getId
()
Merchant
Authorizat
ionConst
.
PerformancePermission
.
READ
.
getId
(),
Merchant
Authorizat
ionConst
.
PerformancePermission
.
CHECK
.
getId
(),
Merchant
Authorizat
ionConst
.
PerformancePermission
.
SALES
.
getId
(),
Merchant
Authorizat
ionConst
.
PerformancePermission
.
ACCREDIT
.
getId
()
};
for
(
String
permissionId
:
fielderPermissionIds
)
{
MerchantAuthorizationPermissions
sponsorAuthorizationPermissions
=
new
MerchantAuthorizationPermissions
();
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/merchant/utils/MerchantMongoUtil.java
View file @
117bbd46
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
merchant
.
utils
;
import
com.liquidnet.service.merchant.constant.MerchantAuthorizationConst
;
import
com.liquidnet.service.merchant.dto.vo.*
;
import
org.bson.Document
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -52,6 +53,6 @@ public class MerchantMongoUtil {
}
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 @
117bbd46
...
...
@@ -70,7 +70,7 @@ create table merchant_field_applies
apply_type
varchar
(
255
)
default
''
not
null
comment
'类型 claim认领、create创建'
,
reject
varchar
(
255
)
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
'名称'
,
logo
varchar
(
255
)
default
''
not
null
comment
'logo图片地址'
,
background
varchar
(
255
)
default
''
not
null
comment
'背景图片地址'
,
...
...
@@ -144,7 +144,7 @@ create table merchant_sponsor_applies
apply_type
varchar
(
255
)
default
''
not
null
comment
'类型 create创建'
,
reject
varchar
(
255
)
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
'名称'
,
logo
varchar
(
255
)
default
''
not
null
comment
'logo图片地址'
,
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 @
117bbd46
...
...
@@ -81,8 +81,17 @@ public class MerchantFieldsController {
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
)
@ApiOperation
(
value
=
"
更改场地
是否审核演出"
)
@ApiOperation
(
value
=
"
场地更改
是否审核演出"
)
@PostMapping
(
"editIsCheck"
)
public
ResponseDto
<
Object
>
editIsCheck
(
@RequestParam
(
required
=
true
)
String
fieldId
,
@RequestParam
(
required
=
true
)
int
isCheck
){
...
...
@@ -94,7 +103,7 @@ public class MerchantFieldsController {
}
@ApiOperationSupport
(
order
=
22
)
@ApiOperation
(
value
=
"默认验票员列表"
)
@ApiOperation
(
value
=
"
场地
默认验票员列表"
)
@GetMapping
(
"checkers"
)
public
ResponseDto
<
List
<
MerchantFieldCheckersVo
>>
checkers
(
@RequestParam
(
required
=
true
)
String
fieldId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
...
...
@@ -103,7 +112,7 @@ public class MerchantFieldsController {
}
@ApiOperationSupport
(
order
=
23
)
@ApiOperation
(
value
=
"添加默认验票员"
)
@ApiOperation
(
value
=
"
场地
添加默认验票员"
)
@PostMapping
(
"checker/add"
)
public
ResponseDto
<
Object
>
checkerAdd
(
@RequestParam
(
required
=
true
)
String
fieldId
,
@RequestParam
(
required
=
true
)
String
uid
,
...
...
@@ -117,7 +126,7 @@ public class MerchantFieldsController {
}
@ApiOperationSupport
(
order
=
24
)
@ApiOperation
(
value
=
"移除默认验票员"
)
@ApiOperation
(
value
=
"
场地
移除默认验票员"
)
@PostMapping
(
"checker/del"
)
public
ResponseDto
<
Object
>
checkerDel
(
@RequestParam
(
required
=
true
)
String
fieldId
,
@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 @
117bbd46
...
...
@@ -78,4 +78,13 @@ public class MerchantSponsorsController {
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 @
117bbd46
package
com
.
liquidnet
.
service
.
merchant
.
service
;
import
com.liquidnet.service.merchant.constant.MerchantAuthorizationConst
;
import
com.liquidnet.service.merchant.dto.vo.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
...
...
@@ -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
());
}
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
)
{
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 @
117bbd46
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.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.MerchantAuthorizationRecordsVo
;
import
com.liquidnet.service.merchant.service.IMerchantAuthorizationRecordsService
;
...
...
@@ -25,20 +28,32 @@ public class MerchantAuthorizationRecordsServiceImpl implements IMerchantAuthori
public
void
performanceCheckerAdd
(
String
cuid
,
String
performanceId
,
String
uid
,
String
mobile
,
String
name
,
boolean
statistics
)
{
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
();
checkerAuthorizationRecordsVo
.
setAuthorizationRecordId
(
IDGenerator
.
nextSnowId
());
checkerAuthorizationRecordsVo
.
setPerformanceId
(
performanceId
);
checkerAuthorizationRecordsVo
.
setUidRole
(
"checker"
);
checkerAuthorizationRecordsVo
.
setUidRole
(
MerchantAuthorizationConst
.
PerformanceRole
.
CHECKER
.
getRole
()
);
checkerAuthorizationRecordsVo
.
setUid
(
uid
);
checkerAuthorizationRecordsVo
.
setMobile
(
mobile
);
checkerAuthorizationRecordsVo
.
setName
(
name
);
checkerAuthorizationRecordsVo
.
setCuid
(
"cuid"
);
// checkerAuthorizationRecordsVo.setCuidRole("fielder"
);
checkerAuthorizationRecordsVo
.
setCuidRole
(
maxPerformanceRole
.
getRole
()
);
checkerAuthorizationRecordsVo
.
setCreatedAt
(
now
);
// 验票员 授权权限
String
[]
checkerPermissionIds
=
{
Merchant
Permiss
ionConst
.
PerformancePermission
.
CHECK
.
getId
()
Merchant
Authorizat
ionConst
.
PerformancePermission
.
CHECK
.
getId
()
};
// 验票员 授权权限 entity vo
ArrayList
<
MerchantAuthorizationPermissionsVo
>
checkerAuthorizationPermissionsVos
=
new
ArrayList
<>();
...
...
@@ -54,6 +69,8 @@ public class MerchantAuthorizationRecordsServiceImpl implements IMerchantAuthori
checkerAuthorizationPermissionsVos
.
add
(
checkerAuthorizationPermissionsVo
);
}
checkerAuthorizationRecordsVo
.
setPermissionsVos
(
checkerAuthorizationPermissionsVos
);
}
@Override
...
...
@@ -66,4 +83,22 @@ public class MerchantAuthorizationRecordsServiceImpl implements IMerchantAuthori
List
<
MerchantAuthorizationRecordsVo
>
authorizationRecordsVos
=
merchantMongoService
.
getCheckersAuthorizationRecordsVosByCuid
(
cuid
,
performanceId
);
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 @
117bbd46
...
...
@@ -67,7 +67,7 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
List
<
MerchantFieldAppliesVo
>
fieldAppliesVos
=
merchantRdmService
.
getFieldAppliesVosByUid
(
uid
);
if
(!
CollectionUtils
.
isEmpty
(
fieldAppliesVos
))
{
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
());
}
}
...
...
@@ -166,7 +166,7 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
// 查找场地申请,是否存在且已经驳回
List
<
MerchantFieldAppliesVo
>
fieldAppliesVos
=
merchantRdmService
.
getFieldAppliesVosByUid
(
uid
);
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
());
}
int
idx
=
IntStream
.
range
(
0
,
fieldAppliesVos
.
size
())
...
...
@@ -174,12 +174,12 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
.
findFirst
()
.
orElse
(-
1
);
if
(
idx
<
0
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
04
"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
12
"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
MerchantFieldAppliesVo
fieldAppliesVo
=
fieldAppliesVos
.
get
(
idx
);
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
());
}
...
...
@@ -221,7 +221,7 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
// 查找场地申请,是否存在
List
<
MerchantFieldAppliesVo
>
fieldAppliesVos
=
merchantRdmService
.
getFieldAppliesVosByUid
(
uid
);
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
());
}
int
idx
=
IntStream
.
range
(
0
,
fieldAppliesVos
.
size
())
...
...
@@ -229,7 +229,7 @@ public class MerchantFieldAppliesServiceImpl implements IMerchantFieldAppliesSer
.
findFirst
()
.
orElse
(-
1
);
if
(
idx
<
0
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
04
"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
12
"
);
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 @
117bbd46
...
...
@@ -72,6 +72,14 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
return
pagedResult
;
}
@Override
public
MerchantFieldsVo
fieldInfo
(
String
uid
,
String
fieldId
)
{
// 当前用户是否管理该场地
MerchantFieldsVo
fieldsVo
=
this
.
checkFieldAccount
(
uid
,
fieldId
);
return
fieldsVo
;
}
@Override
public
void
editIsCheck
(
String
uid
,
String
fieldId
,
int
isCheck
)
{
// 当前用户是否管理该场地
...
...
@@ -132,7 +140,7 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
if
(!
CollectionUtils
.
isEmpty
(
fieldCheckersVos
))
{
for
(
MerchantFieldCheckersVo
vo
:
fieldCheckersVos
)
{
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
());
}
}
...
...
@@ -179,7 +187,7 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
// 查找场地默认验票员,是否已经添加
List
<
MerchantFieldCheckersVo
>
fieldCheckersVos
=
merchantRdmService
.
getFieldCheckersVosByFieldId
(
fieldId
);
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
());
}
int
idx
=
IntStream
.
range
(
0
,
fieldCheckersVos
.
size
())
...
...
@@ -187,7 +195,7 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
.
findFirst
()
.
orElse
(-
1
);
if
(
idx
<
0
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
12
"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"131
04
"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
...
...
@@ -223,7 +231,7 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
private
MerchantFieldsVo
checkFieldAccount
(
String
uid
,
String
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"
);
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 @
117bbd46
...
...
@@ -48,7 +48,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
List
<
MerchantSponsorAppliesVo
>
sponsorAppliesVos
=
merchantRdmService
.
getSponsorAppliesVosByUid
(
uid
);
if
(!
CollectionUtils
.
isEmpty
(
sponsorAppliesVos
))
{
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
());
}
}
...
...
@@ -80,7 +80,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
||
sponsorAppliesVo
.
getLegalIdentity
().
isEmpty
()
||
sponsorAppliesVo
.
getLegalIdentityObverse
().
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
());
}
...
...
@@ -139,7 +139,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
// 查找主办申请,是否存在且已经驳回
List
<
MerchantSponsorAppliesVo
>
sponsorAppliesVos
=
merchantRdmService
.
getSponsorAppliesVosByUid
(
uid
);
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
());
}
int
idx
=
IntStream
.
range
(
0
,
sponsorAppliesVos
.
size
())
...
...
@@ -147,12 +147,12 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
.
findFirst
()
.
orElse
(-
1
);
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
());
}
MerchantSponsorAppliesVo
sponsorAppliesVo
=
sponsorAppliesVos
.
get
(
idx
);
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
());
}
...
...
@@ -194,7 +194,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
// 查找主办申请,是否存在
List
<
MerchantSponsorAppliesVo
>
sponsorAppliesVos
=
merchantRdmService
.
getSponsorAppliesVosByUid
(
uid
);
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
());
}
int
idx
=
IntStream
.
range
(
0
,
sponsorAppliesVos
.
size
())
...
...
@@ -202,7 +202,7 @@ public class MerchantSponsorAppliesServiceImpl implements IMerchantSponsorApplie
.
findFirst
()
.
orElse
(-
1
);
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
());
}
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/impl/MerchantSponsorsServiceImpl.java
View file @
117bbd46
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.merchant.dto.vo.MerchantSponsorsVo
;
import
com.liquidnet.service.merchant.service.IMerchantSponsorsService
;
import
com.liquidnet.service.merchant.service.MerchantRdmService
;
import
com.liquidnet.service.merchant.util.ObjectUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -23,6 +26,9 @@ public class MerchantSponsorsServiceImpl implements IMerchantSponsorsService {
@Autowired
MongoTemplate
mongoTemplate
;
@Autowired
MerchantRdmService
merchantRdmService
;
@Override
public
PagedResult
<
MerchantSponsorsVo
>
search
(
String
name
,
int
page
,
int
size
)
{
// 查询条件
...
...
@@ -51,5 +57,21 @@ public class MerchantSponsorsServiceImpl implements IMerchantSponsorsService {
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 @
117bbd46
...
...
@@ -9,21 +9,26 @@
# 场地
13101
=
场地不存在,请核实
13102
=
场地已被认领
13103
=
场地申请已达到上限
13104
=
申请不存在,请核实
13105
=
申请未驳回,不能删除
13103
=
验票员已存在
13104
=
验票员不存在
13111
=
验票员已存在
13112
=
验票员不存在
# 场地申请
13111
=
场地申请已达到上限
13112
=
申请不存在,请核实
13113
=
申请未驳回,不能删除
# 主办
13201
=
主办申请已经达到上限
13202
=
主办公司信息不能为空
13203
=
申请不存在,请核实
13204
=
申请未驳回,不能删除
13201
=
主办不存在,请核实
# 主办申请
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