记得上下班打卡 | 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
d3f76288
Commit
d3f76288
authored
Nov 03, 2021
by
Tice
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f3977b44
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
84 deletions
+36
-84
redis_queue_create.txt
...quidnet-service-merchant-impl/docu/redis_queue_create.txt
+3
-0
MerchantFieldsController.java
...service/merchant/controller/MerchantFieldsController.java
+24
-2
MerchantFieldsAppliesServiceImpl.java
...rchant/service/impl/MerchantFieldsAppliesServiceImpl.java
+6
-8
errors.properties
...ervice-merchant-impl/src/main/resources/errors.properties
+3
-74
No files found.
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/docu/redis_queue_create.txt
0 → 100644
View file @
d3f76288
XADD merchant:stream:rk.sql.field * 0 0
XGROUP CREATE merchant:stream:rk.sql.field group.sql.field 0
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/controller/MerchantFieldsController.java
View file @
d3f76288
package
com
.
liquidnet
.
service
.
merchant
.
controller
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.merchant.dto.param.MerchantFieldsApplyParam
;
import
com.liquidnet.service.merchant.service.IMerchantFieldsAppliesService
;
import
io.swagger.annotations.Api
;
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
javax.validation.Valid
;
/**
* <p>
* 场地表 前端控制器
...
...
@@ -16,6 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author liquidnet
* @since 2021-11-01
*/
@ApiSupport
(
order
=
10010
)
@Api
(
tags
=
"场地"
)
@Slf4j
@Validated
...
...
@@ -23,4 +33,16 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
(
"fields"
)
public
class
MerchantFieldsController
{
@Autowired
IMerchantFieldsAppliesService
merchantFieldsAppliesService
;
@ApiOperationSupport
(
order
=
1
)
@ApiOperation
(
value
=
"申请场地"
)
@PostMapping
(
"apply"
)
public
ResponseDto
<
Object
>
apply
(
@Valid
@RequestBody
MerchantFieldsApplyParam
parameter
)
{
return
ResponseDto
.
success
(
merchantFieldsAppliesService
.
apply
(
parameter
));
}
}
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/java/com/liquidnet/service/merchant/service/impl/MerchantFieldsAppliesServiceImpl.java
View file @
d3f76288
...
...
@@ -45,8 +45,8 @@ public class MerchantFieldsAppliesServiceImpl implements IMerchantFieldsAppliesS
LocalDateTime
now
=
LocalDateTime
.
now
();
LinkedList
<
String
>
toMqSqls
=
CollectionUtil
.
linkedListString
();
LinkedList
<
Object
[]>
fieldApplyInsertObjs
=
CollectionUtil
.
linkedListObjectArr
();
LinkedList
<
Object
[]>
fieldUpdateObjs
=
CollectionUtil
.
linkedListObjectArr
();
LinkedList
<
Object
[]>
fieldApplyInsertObjs
=
CollectionUtil
.
linkedListObjectArr
();
long
s
=
System
.
currentTimeMillis
();
...
...
@@ -55,34 +55,32 @@ public class MerchantFieldsAppliesServiceImpl implements IMerchantFieldsAppliesS
if
(!
parameter
.
getFieldId
().
isEmpty
())
{
fieldsVo
=
merchantRdmService
.
getFieldsVoByFieldId
(
parameter
.
getFieldId
());
if
(
null
==
fieldsVo
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"1
06
01"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"1
30
01"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
if
(
0
!=
fieldsVo
.
getClaimStatus
())
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"1
06
02"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"1
30
02"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
// 更改场地状态
//
vo
更改场地状态
fieldsVo
.
setClaimStatus
(
2
);
fieldsVo
.
setUpdatedAt
(
now
);
// redis
s
=
System
.
currentTimeMillis
();
merchantRdmService
.
setFieldsVoByFieldId
(
fieldsVo
.
getFieldId
(),
fieldsVo
);
log
.
debug
(
"#RDS耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
}
// 申请场地 上限
//
vos
申请场地 上限
List
<
MerchantFieldsAppliesVo
>
fieldsAppliesVos
=
merchantRdmService
.
getFieldsAppliesVosByUid
(
currentUid
);
if
(!
CollectionUtils
.
isEmpty
(
fieldsAppliesVos
))
{
if
(
fieldsAppliesVos
.
size
()
>=
10
)
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"1
06
03"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"1
30
03"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
// 申请场地vo
MerchantFieldsAppliesVo
fieldsAppliesVo
=
MerchantFieldsAppliesVo
.
getNew
();
BeanUtils
.
copyProperties
(
parameter
,
fieldsAppliesVo
);
...
...
liquidnet-bus-service/liquidnet-service-merchant/liquidnet-service-merchant-impl/src/main/resources/errors.properties
View file @
d3f76288
...
...
@@ -3,79 +3,8 @@
40003
=
登录已过期
# ------------------------ 4开头错误码作系统保留
10000
=
操作过于频繁,请稍后再试
10001
=
授权失败
10002
=
验证码发送失败
10003
=
请输入正确手机号
10004
=
请输入正确验证码
10005
=
手机号获取失败,请更换登录方式
10006
=
第三方账号未注册
10007
=
该第三方账号已经被其他用户绑定
10008
=
已经绑定过该类型的第三方账号
10009
=
手机号已经注册
10010
=
该手机号已被其它账号绑定
10011
=
性别标签无效
10012
=
音乐风格标签无效
10013
=
账号与密码不匹配
10014
=
10015
=
入场人ID不能为空
10016
=
收货地址ID不能为空
10017
=
入场人不存在,请核实
10018
=
收货地址不存在,请核实
10019
=
入场人已存在,请核实
10101
=
姓名或身份证件号无效
10102
=
身份证号与姓名不符
10103
=
已超出姓名长度限制
10104
=
身份证号码不合规
10105
=
入场人不存在
10106
=
收获地址不存在
10107
=
港澳居民来往内地通行证号码不合规
10108
=
台湾居民来往大陆通行证号码不合规
10109
=
不支持中国大陆护照
10110
=
护照号码不合规
10111
=
军官证号不合规
10200
=
仅限从未购买过会员的用户使用
10201
=
会员卡信息有误,请核实
10202
=
会员卡价格有误,请核实
10203
=
支付信息有误,请联系客服
10204
=
微信支付OPENID必传
10205
=
支付宝支付回调URL必传
10206
=
苹果支付商品标识必传
10207
=
兑换码不存在,请核实
10208
=
兑换码已使用,请核实
10209
=
兑换码不可用,请核实
10210
=
创建订单失败,请联系客服
10211
=
订单不存在
10212
=
订单状态查询失败
10213
=
感谢您选择登登登。距您上一次离开不足一年,登登登还没准备好再次邀您加入。不如我们给彼此多一些时间,有缘再相见。
10214
=
兑换失败
10215
=
本次摩登天空会员购买名额已满
10216
=
10301
=
10401
=
10500
=
10501
=
会员订单回调处理失败,该订单不存在
10502
=
会员订单回调处理失败,该订单已处理
10503
=
会员订单回调处理失败,订单金额有误
10504
=
会员订单回调处理失败,会员价格信息不存在
10505
=
会员订单回调处理异常
10601
=
场地不存在,请核实
10602
=
场地已被认领
10603
=
场地申请已达到上限
13001
=
场地不存在,请核实
13002
=
场地已被认领
13003
=
场地申请已达到上限
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