记得上下班打卡 | 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
16811f77
Commit
16811f77
authored
Nov 08, 2021
by
Tice
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
申请驳回后删除
parent
6469c3c4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
150 additions
and
15 deletions
+150
-15
IMerchantFieldsService.java
...dnet/service/merchant/service/IMerchantFieldsService.java
+2
-0
IMerchantSponsorsService.java
...et/service/merchant/service/IMerchantSponsorsService.java
+1
-1
MerchantFieldsController.java
...service/merchant/controller/MerchantFieldsController.java
+14
-3
MerchantSponsorsController.java
...rvice/merchant/controller/MerchantSponsorsController.java
+11
-4
MerchantRdmService.java
...iquidnet/service/merchant/service/MerchantRdmService.java
+16
-0
MerchantFieldsServiceImpl.java
...vice/merchant/service/impl/MerchantFieldsServiceImpl.java
+50
-7
MerchantSponsorsServiceImpl.java
...ce/merchant/service/impl/MerchantSponsorsServiceImpl.java
+49
-0
errors.properties
...ervice-merchant-impl/src/main/resources/errors.properties
+5
-0
sqlmap.properties
...ervice-merchant-impl/src/main/resources/sqlmap.properties
+2
-0
No files found.
liquidnet-bus-api/liquidnet-service-merchant-api/src/main/java/com/liquidnet/service/merchant/service/IMerchantFieldsService.java
View file @
16811f77
...
...
@@ -13,6 +13,8 @@ public interface IMerchantFieldsService {
String
apply
(
String
uid
,
MerchantFieldApplyParam
parameter
);
void
applyDel
(
String
uid
,
String
fieldApplyId
);
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 @
16811f77
...
...
@@ -5,5 +5,5 @@ import com.liquidnet.service.merchant.dto.param.MerchantSponsorApplyParam;
public
interface
IMerchantSponsorsService
{
String
apply
(
String
uid
,
MerchantSponsorApplyParam
parameter
);
void
applyDel
(
String
uid
,
String
sponsorApplyId
);
}
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/controller/MerchantFieldsController.java
View file @
16811f77
...
...
@@ -57,6 +57,17 @@ public class MerchantFieldsController {
}
@ApiOperationSupport
(
order
=
12
)
@ApiOperation
(
value
=
"申请场地驳回后删除"
)
@PostMapping
(
"apply/del"
)
public
ResponseDto
<
Object
>
applyDel
(
@RequestParam
(
required
=
true
)
String
fieldApplyId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
merchantFieldsService
.
applyDel
(
currentUid
,
fieldApplyId
);
return
ResponseDto
.
success
();
}
@ApiOperationSupport
(
order
=
21
)
@ApiOperation
(
value
=
"更改场地是否审核演出"
)
@PostMapping
(
"editIsCheck"
)
public
ResponseDto
<
Object
>
editIsCheck
(
@RequestParam
(
required
=
true
)
String
fieldId
,
...
...
@@ -68,7 +79,7 @@ public class MerchantFieldsController {
return
ResponseDto
.
success
();
}
@ApiOperationSupport
(
order
=
13
)
@ApiOperationSupport
(
order
=
22
)
@ApiOperation
(
value
=
"默认验票员列表"
)
@GetMapping
(
"checkers"
)
public
ResponseDto
<
List
<
MerchantFieldCheckersVo
>>
checkers
(
@RequestParam
(
required
=
true
)
String
fieldId
)
{
...
...
@@ -77,7 +88,7 @@ public class MerchantFieldsController {
return
ResponseDto
.
success
(
merchantFieldsService
.
checkers
(
currentUid
,
fieldId
));
}
@ApiOperationSupport
(
order
=
14
)
@ApiOperationSupport
(
order
=
23
)
@ApiOperation
(
value
=
"添加默认验票员"
)
@PostMapping
(
"checker/add"
)
public
ResponseDto
<
Object
>
checkerAdd
(
@RequestParam
(
required
=
true
)
String
fieldId
,
...
...
@@ -91,7 +102,7 @@ public class MerchantFieldsController {
return
ResponseDto
.
success
();
}
@ApiOperationSupport
(
order
=
15
)
@ApiOperationSupport
(
order
=
24
)
@ApiOperation
(
value
=
"移除默认验票员"
)
@PostMapping
(
"checker/del"
)
public
ResponseDto
<
Object
>
checkerDel
(
@RequestParam
(
required
=
true
)
String
fieldId
,
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/controller/MerchantSponsorsController.java
View file @
16811f77
...
...
@@ -11,10 +11,7 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
...
...
@@ -46,5 +43,15 @@ public class MerchantSponsorsController {
return
ResponseDto
.
success
(
merchantSponsorsService
.
apply
(
currentUid
,
parameter
));
}
@ApiOperationSupport
(
order
=
12
)
@ApiOperation
(
value
=
"申请主办驳回后删除"
)
@PostMapping
(
"apply/del"
)
public
ResponseDto
<
Object
>
applyDel
(
@RequestParam
(
required
=
true
)
String
sponsorApplyId
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
merchantSponsorsService
.
applyDel
(
currentUid
,
sponsorApplyId
);
return
ResponseDto
.
success
();
}
}
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/MerchantRdmService.java
View file @
16811f77
...
...
@@ -50,6 +50,14 @@ public class MerchantRdmService {
return
redisUtil
.
set
(
MerchantRedisConst
.
INFO_FIELD_APPLIES
.
concat
(
uid
),
vos
);
}
public
boolean
delFieldAppliesVoByUid
(
String
uid
,
List
<
MerchantFieldAppliesVo
>
vos
,
MerchantFieldAppliesVo
vo
)
{
if
(
CollectionUtils
.
isEmpty
(
vos
))
{
return
true
;
}
vos
.
removeIf
(
r
->
r
.
getFieldApplyId
().
equals
(
vo
.
getFieldApplyId
()));
return
redisUtil
.
set
(
MerchantRedisConst
.
INFO_FIELD_APPLIES
.
concat
(
uid
),
vos
);
}
public
List
<
MerchantFieldCheckersVo
>
getFieldCheckersVosByFieldId
(
String
fieldId
)
{
String
key
=
MerchantRedisConst
.
INFO_FIELD_CHECKERS
.
concat
(
fieldId
);
...
...
@@ -91,4 +99,12 @@ public class MerchantRdmService {
vos
.
add
(
vo
);
return
redisUtil
.
set
(
MerchantRedisConst
.
INFO_SPONSOR_APPLIES
.
concat
(
uid
),
vos
);
}
public
boolean
delSponsorAppliesVoByUid
(
String
uid
,
List
<
MerchantSponsorAppliesVo
>
vos
,
MerchantSponsorAppliesVo
vo
)
{
if
(
CollectionUtils
.
isEmpty
(
vos
))
{
return
true
;
}
vos
.
removeIf
(
r
->
r
.
getSponsorApplyId
().
equals
(
vo
.
getSponsorApplyId
()));
return
redisUtil
.
set
(
MerchantRedisConst
.
INFO_SPONSOR_APPLIES
.
concat
(
uid
),
vos
);
}
}
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/impl/MerchantFieldsServiceImpl.java
View file @
16811f77
...
...
@@ -172,13 +172,57 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
}
@Override
public
void
editIsCheck
(
String
uid
,
String
fieldId
,
int
isCheck
)
{
// 当前用户是否管理该场地
MerchantFieldsVo
fieldsVo
=
merchantRdmService
.
getFieldsVoByFieldId
(
fieldId
);
if
(
null
==
fieldsVo
||
!
fieldsVo
.
getUid
().
equals
(
uid
))
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"13001"
);
public
void
applyDel
(
String
uid
,
String
fieldApplyId
)
{
// 查找场地申请,是否存在且已经驳回
List
<
MerchantFieldAppliesVo
>
fieldAppliesVos
=
merchantRdmService
.
getFieldAppliesVosByUid
(
uid
);
if
(
CollectionUtils
.
isEmpty
(
fieldAppliesVos
))
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"13004"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
int
idx
=
IntStream
.
range
(
0
,
fieldAppliesVos
.
size
())
.
filter
(
i
->
fieldAppliesVos
.
get
(
i
).
getFieldApplyId
().
equals
(
fieldApplyId
))
.
findFirst
()
.
orElse
(-
1
);
if
(
idx
<
0
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"13004"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
MerchantFieldAppliesVo
fieldAppliesVo
=
fieldAppliesVos
.
get
(
idx
);
if
(
fieldAppliesVo
.
getApplyStatus
()
!=
2
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"13005"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
LocalDateTime
now
=
LocalDateTime
.
now
();
fieldAppliesVo
.
setUpdatedAt
(
now
);
fieldAppliesVo
.
setDeletedAt
(
now
);
// 场地默认验票员 redis
long
s
=
System
.
currentTimeMillis
();
merchantRdmService
.
delFieldAppliesVoByUid
(
uid
,
fieldAppliesVos
,
fieldAppliesVo
);
log
.
debug
(
"#RDS耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
// 场地默认验票员 sql
LinkedList
<
String
>
toMqSqls
=
CollectionUtil
.
linkedListString
();
LinkedList
<
Object
[]>
fieldAppliesUpdateObjs
=
CollectionUtil
.
linkedListObjectArr
();
toMqSqls
.
add
(
SqlMapping
.
get
(
"merchant_field_applies.update"
));
fieldAppliesUpdateObjs
.
add
(
new
Object
[]{
fieldAppliesVo
.
getUpdatedAt
(),
fieldAppliesVo
.
getDeletedAt
(),
fieldAppliesVo
.
getFieldApplyId
()
});
// mq
s
=
System
.
currentTimeMillis
();
queueUtils
.
sendMsgByRedis
(
MQConst
.
MerchantQueue
.
SQL_MERCHANT_FIELD
.
getKey
(),
SqlMapping
.
gets
(
toMqSqls
,
fieldAppliesUpdateObjs
)
);
log
.
debug
(
"#MQ耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
}
@Override
public
void
editIsCheck
(
String
uid
,
String
fieldId
,
int
isCheck
)
{
// 当前用户是否管理该场地
MerchantFieldsVo
fieldsVo
=
this
.
checkFieldAccount
(
uid
,
fieldId
);
// 场地 vo 更改是否自动审核
LocalDateTime
now
=
LocalDateTime
.
now
();
...
...
@@ -220,8 +264,7 @@ public class MerchantFieldsServiceImpl implements IMerchantFieldsService {
List
<
MerchantFieldCheckersVo
>
fieldCheckersVos
=
merchantRdmService
.
getFieldCheckersVosByFieldId
(
fieldId
);
return
null
;
return
fieldCheckersVos
;
}
@Override
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/impl/MerchantSponsorsServiceImpl.java
View file @
16811f77
...
...
@@ -20,6 +20,7 @@ import org.springframework.util.CollectionUtils;
import
java.time.LocalDateTime
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.stream.IntStream
;
@Slf4j
@Service
...
...
@@ -101,4 +102,52 @@ public class MerchantSponsorsServiceImpl implements IMerchantSponsorsService {
return
sponsorAppliesVo
.
getSponsorApplyId
();
}
@Override
public
void
applyDel
(
String
uid
,
String
sponsorApplyId
)
{
// 查找场地申请,是否存在且已经驳回
List
<
MerchantSponsorAppliesVo
>
sponsorAppliesVos
=
merchantRdmService
.
getSponsorAppliesVosByUid
(
uid
);
if
(
CollectionUtils
.
isEmpty
(
sponsorAppliesVos
))
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"13023"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
int
idx
=
IntStream
.
range
(
0
,
sponsorAppliesVos
.
size
())
.
filter
(
i
->
sponsorAppliesVos
.
get
(
i
).
getSponsorApplyId
().
equals
(
sponsorApplyId
))
.
findFirst
()
.
orElse
(-
1
);
if
(
idx
<
0
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"13023"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
MerchantSponsorAppliesVo
sponsorAppliesVo
=
sponsorAppliesVos
.
get
(
idx
);
if
(
sponsorAppliesVo
.
getApplyStatus
()
!=
2
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"13024"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
LocalDateTime
now
=
LocalDateTime
.
now
();
sponsorAppliesVo
.
setUpdatedAt
(
now
);
sponsorAppliesVo
.
setDeletedAt
(
now
);
// 场地默认验票员 redis
long
s
=
System
.
currentTimeMillis
();
merchantRdmService
.
delSponsorAppliesVoByUid
(
uid
,
sponsorAppliesVos
,
sponsorAppliesVo
);
log
.
debug
(
"#RDS耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
// 场地默认验票员 sql
LinkedList
<
String
>
toMqSqls
=
CollectionUtil
.
linkedListString
();
LinkedList
<
Object
[]>
sponsorAppliesUpdateObjs
=
CollectionUtil
.
linkedListObjectArr
();
toMqSqls
.
add
(
SqlMapping
.
get
(
"merchant_sponsor_applies.update"
));
sponsorAppliesUpdateObjs
.
add
(
new
Object
[]{
sponsorAppliesVo
.
getUpdatedAt
(),
sponsorAppliesVo
.
getDeletedAt
(),
sponsorAppliesVo
.
getSponsorApplyId
()
});
// mq
s
=
System
.
currentTimeMillis
();
queueUtils
.
sendMsgByRedis
(
MQConst
.
MerchantQueue
.
SQL_MERCHANT_SPONSOR
.
getKey
(),
SqlMapping
.
gets
(
toMqSqls
,
sponsorAppliesUpdateObjs
)
);
log
.
debug
(
"#MQ耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
}
}
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/resources/errors.properties
View file @
16811f77
...
...
@@ -7,6 +7,9 @@
13001
=
场地不存在,请核实
13002
=
场地已被认领
13003
=
场地申请已达到上限
13004
=
场地申请不存在,请核实
13005
=
场地申请未驳回,不能删除
13011
=
验票员已存在
13012
=
验票员不存在
...
...
@@ -14,3 +17,5 @@
13021
=
主办申请已经达到上限
13022
=
主办公司信息不能为空
13023
=
场地申请不存在,请核实
13024
=
场地申请未驳回,不能删除
\ No newline at end of file
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/resources/sqlmap.properties
View file @
16811f77
...
...
@@ -3,11 +3,13 @@ merchant_fields.update_claim_status=UPDATE merchant_fields SET claim_status = ?,
merchant_fields.update_is_check
=
UPDATE merchant_fields SET is_check = ?, updated_at = ? WHERE field_id = ?
# ---------------------------------------------------------------------------------------------------------------------
merchant_field_applies.insert
=
INSERT INTO merchant_field_applies (field_apply_id, apply_status, apply_type, reject, uid, field_id, name, logo, background, description, built_date, province_id, province_name, city_id, city_name, district_id, district_name, address, longitude, latitude, contact_name, contact_email, company_name, license_code, license_img, legal_name, legal_identity, legal_identity_obverse, legal_identity_reverse, created_at) VALUE (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
merchant_field_applies.update
=
UPDATE merchant_field_applies SET updated_at = ?, delete_at = ? WHERE field_apply_id = ?
# ---------------------------------------------------------------------------------------------------------------------
merchant_field_checkers.insert
=
INSERT INTO merchant_field_checkers (field_checker_id, field_id, uid, mobile, name, cuid, created_at) VALUE (?, ?, ?, ?, ?, ?, ?)
merchant_field_checkers.update
=
UPDATE merchant_field_checkers SET cuid = ?, updated_at = ?, delete_at = ? WHERE field_checker_id = ?
# ---------------------------------------------------------------------------------------------------------------------
merchant_sponsor_applies.insert
=
INSERT INTO merchant_sponsor_applies (sponsor_apply_id, apply_status, apply_type, reject, uid, name, logo, background, description, contact_name, contact_identity, contact_identity_obverse, contact_identity_reverse, contact_email, company_name, license_code, license_img, legal_name, legal_identity, legal_identity_obverse, legal_identity_reverse, created_at) VALUE (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
merchant_sponsor_applies.update
=
UPDATE merchant_sponsor_applies SET updated_at = ?, delete_at = ? WHERE sponsor_apply_id = ?
...
...
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