记得上下班打卡 | 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
003a09fa
Commit
003a09fa
authored
Jun 21, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
f64dac58
8d7edb3b
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
128 additions
and
98 deletions
+128
-98
AdamRedisConst.java
...a/com/liquidnet/service/adam/constant/AdamRedisConst.java
+1
-4
AdamMemberOrderVo.java
.../com/liquidnet/service/adam/dto/vo/AdamMemberOrderVo.java
+3
-0
AdamMemberOrderController.java
...et/service/adam/controller/AdamMemberOrderController.java
+16
-5
AdamUserController.java
...liquidnet/service/adam/controller/AdamUserController.java
+7
-7
KylinOrderTicketsServiceImpl.java
...vice/kylin/service/impl/KylinOrderTicketsServiceImpl.java
+70
-77
OrderUtils.java
...in/java/com/liquidnet/service/kylin/utils/OrderUtils.java
+31
-5
No files found.
liquidnet-bus-
service/liquidnet-service-adam/liquidnet-service-adam-impl
/src/main/java/com/liquidnet/service/adam/constant/AdamRedisConst.java
→
liquidnet-bus-
api/liquidnet-service-adam-api
/src/main/java/com/liquidnet/service/adam/constant/AdamRedisConst.java
View file @
003a09fa
package
com
.
liquidnet
.
service
.
adam
.
constant
;
package
com
.
liquidnet
.
service
.
adam
.
constant
;
/**
* @author Li Chen
* @date 2020-11-04 14:02
*/
public
class
AdamRedisConst
{
public
class
AdamRedisConst
{
public
static
final
String
ADAM
=
"adam:"
;
public
static
final
String
ADAM
=
"adam:"
;
...
...
liquidnet-bus-api/liquidnet-service-adam-api/src/main/java/com/liquidnet/service/adam/dto/vo/AdamMemberOrderVo.java
View file @
003a09fa
...
@@ -63,6 +63,9 @@ public class AdamMemberOrderVo implements Serializable, Cloneable {
...
@@ -63,6 +63,9 @@ public class AdamMemberOrderVo implements Serializable, Cloneable {
@ApiModelProperty
(
position
=
21
,
value
=
"兑换码"
)
@ApiModelProperty
(
position
=
21
,
value
=
"兑换码"
)
private
String
memberCode
;
private
String
memberCode
;
@ApiModelProperty
(
position
=
22
,
value
=
"会员须知"
)
private
String
memberNotes
;
public
static
final
AdamMemberOrderVo
obj
=
new
AdamMemberOrderVo
();
public
static
final
AdamMemberOrderVo
obj
=
new
AdamMemberOrderVo
();
public
static
AdamMemberOrderVo
getNew
()
{
public
static
AdamMemberOrderVo
getNew
()
{
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/controller/AdamMemberOrderController.java
View file @
003a09fa
...
@@ -133,7 +133,7 @@ public class AdamMemberOrderController {
...
@@ -133,7 +133,7 @@ public class AdamMemberOrderController {
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"code"
,
value
=
"支付订单号"
,
example
=
"20210616153954199964032352974P"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"code"
,
value
=
"支付订单号"
,
example
=
"20210616153954199964032352974P"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"type"
,
value
=
"购买类型"
,
example
=
"VIP"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"type"
,
value
=
"购买类型"
,
example
=
"VIP"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"price"
,
value
=
"支付金额"
,
example
=
"0.01"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"price"
,
value
=
"支付金额"
,
example
=
"0.01"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"payment_type"
,
value
=
"支付类型"
,
example
=
"
WA
PALIPAY"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"payment_type"
,
value
=
"支付类型"
,
example
=
"
AP
PALIPAY"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"payment_at"
,
value
=
"支付时间"
,
example
=
"2021-06-16 15:40:02"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"payment_at"
,
value
=
"支付时间"
,
example
=
"2021-06-16 15:40:02"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"payment_id"
,
value
=
"支付ID"
,
example
=
"2021061622001468121421203878"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"payment_id"
,
value
=
"支付ID"
,
example
=
"2021061622001468121421203878"
),
})
})
...
@@ -147,15 +147,23 @@ public class AdamMemberOrderController {
...
@@ -147,15 +147,23 @@ public class AdamMemberOrderController {
!
parameter
.
getType
().
equals
(
"VIP"
)
||
!
parameter
.
getType
().
equals
(
"VIP"
)
||
null
==
parameter
.
getOrderCode
()
||
null
==
parameter
.
getOrderCode
()
||
null
==
parameter
.
getCode
())
{
null
==
parameter
.
getCode
())
{
log
.
error
(
"会员支付回调参数有误:{}"
,
JsonUtils
.
toJson
(
parameter
));
log
.
error
(
"
###购买
会员支付回调参数有误:{}"
,
JsonUtils
.
toJson
(
parameter
));
return
"fail"
;
return
"fail"
;
}
}
if
(!
"dev"
.
equals
(
env
.
getProperty
(
"spring.profiles.active"
)))
{
ResponseDto
<
Integer
>
checkOrderResult
=
this
.
checkOrderResult
(
parameter
.
getOrderCode
());
if
(!
checkOrderResult
.
isSuccess
()
||
checkOrderResult
.
getData
()
!=
1
)
{
log
.
warn
(
"###购买会员支付回调支付中心验证不通过,无法处理[{}]"
,
JsonUtils
.
toJson
(
parameter
));
return
"fail"
;
}
}
ResponseDto
<
Object
>
dto
=
adamMemberOrderService
.
paymentNotifyCallBack
(
parameter
);
ResponseDto
<
Object
>
dto
=
adamMemberOrderService
.
paymentNotifyCallBack
(
parameter
);
if
(!
dto
.
isSuccess
())
{
if
(!
dto
.
isSuccess
())
{
log
.
warn
(
"###
会员支付回调处理失败:handleD
to:{},CallbackParam:{}"
,
JsonUtils
.
toJson
(
dto
),
JsonUtils
.
toJson
(
parameter
));
log
.
warn
(
"###
购买会员支付回调处理失败:d
to:{},CallbackParam:{}"
,
JsonUtils
.
toJson
(
dto
),
JsonUtils
.
toJson
(
parameter
));
return
"fail"
;
return
"fail"
;
}
}
...
@@ -230,11 +238,14 @@ public class AdamMemberOrderController {
...
@@ -230,11 +238,14 @@ public class AdamMemberOrderController {
@ApiOperation
(
value
=
"会员订单详情"
)
@ApiOperation
(
value
=
"会员订单详情"
)
@GetMapping
(
"info/{orderNo}"
)
@GetMapping
(
"info/{orderNo}"
)
public
ResponseDto
<
AdamMemberOrderVo
>
getMemberOrderList
(
@NotBlank
@PathVariable
String
orderNo
)
{
public
ResponseDto
<
AdamMemberOrderVo
>
getMemberOrderList
(
@NotBlank
@PathVariable
String
orderNo
)
{
return
ResponseDto
.
success
(
adamRdmService
.
getShotMemberOrderVoByOrderNo
(
orderNo
));
AdamMemberOrderVo
mOrderVo
=
adamRdmService
.
getShotMemberOrderVoByOrderNo
(
orderNo
);
AdamMemberVo
memberVo
=
adamRdmService
.
getMemberVoByMemberId
(
mOrderVo
.
getMemberId
());
mOrderVo
.
setMemberNotes
(
memberVo
.
getNotes
());
return
ResponseDto
.
success
(
mOrderVo
);
}
}
@ApiOperationSupport
(
order
=
7
)
@ApiOperationSupport
(
order
=
7
)
@ApiOperation
(
value
=
"会员订单状态"
)
@ApiOperation
(
value
=
"会员订单状态"
,
notes
=
"响应参数[`data`:0-未支付|1-已支付]"
)
@GetMapping
(
"check"
)
@GetMapping
(
"check"
)
public
ResponseDto
<
Integer
>
checkOrderResult
(
@NotBlank
@RequestParam
String
orderNo
)
{
public
ResponseDto
<
Integer
>
checkOrderResult
(
@NotBlank
@RequestParam
String
orderNo
)
{
AdamMemberOrderVo
memberOrderInfo
=
adamRdmService
.
getShotMemberOrderVoByOrderNo
(
orderNo
);
AdamMemberOrderVo
memberOrderInfo
=
adamRdmService
.
getShotMemberOrderVoByOrderNo
(
orderNo
);
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/controller/AdamUserController.java
View file @
003a09fa
...
@@ -41,7 +41,7 @@ import java.util.*;
...
@@ -41,7 +41,7 @@ import java.util.*;
@RequestMapping
(
"user"
)
@RequestMapping
(
"user"
)
public
class
AdamUserController
{
public
class
AdamUserController
{
@Autowired
@Autowired
Environment
env
ironment
;
Environment
env
;
@Autowired
@Autowired
IAdamRdmService
adamRdmService
;
IAdamRdmService
adamRdmService
;
@Autowired
@Autowired
...
@@ -180,7 +180,7 @@ public class AdamUserController {
...
@@ -180,7 +180,7 @@ public class AdamUserController {
@ApiOperation
(
value
=
"手机号修改"
,
notes
=
"手机号修改会刷新TOKEN,刷新后的TOKEN对应响应参数中[`data`]"
)
@ApiOperation
(
value
=
"手机号修改"
,
notes
=
"手机号修改会刷新TOKEN,刷新后的TOKEN对应响应参数中[`data`]"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"mobile"
,
value
=
"新手机号"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"mobile"
,
value
=
"新手机号"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"code"
,
value
=
"验证码"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"code"
,
value
=
"验证码"
,
example
=
"111111"
),
})
})
@PostMapping
(
value
=
{
"edit/mobile"
})
@PostMapping
(
value
=
{
"edit/mobile"
})
public
ResponseDto
<
String
>
editMobile
(
@Pattern
(
regexp
=
"\\d{11}"
,
message
=
"手机号格式有误"
)
public
ResponseDto
<
String
>
editMobile
(
@Pattern
(
regexp
=
"\\d{11}"
,
message
=
"手机号格式有误"
)
...
@@ -301,8 +301,10 @@ public class AdamUserController {
...
@@ -301,8 +301,10 @@ public class AdamUserController {
/* ---------------------------- Internal Method ---------------------------- */
/* ---------------------------- Internal Method ---------------------------- */
private
static
final
String
PHP_API_SMS_CODE_VALID
=
"/smsValidation"
;
private
boolean
checkSmsCode
(
String
mobile
,
String
code
)
{
private
boolean
checkSmsCode
(
String
mobile
,
String
code
)
{
if
(
Arrays
.
asList
(
"dev"
,
"test"
).
contains
(
env
ironment
.
getProperty
(
"spring.profiles.active"
)))
{
if
(
Arrays
.
asList
(
"dev"
,
"test"
).
contains
(
env
.
getProperty
(
"spring.profiles.active"
)))
{
return
"111111"
.
equals
(
code
);
return
"111111"
.
equals
(
code
);
}
}
...
@@ -311,11 +313,9 @@ public class AdamUserController {
...
@@ -311,11 +313,9 @@ public class AdamUserController {
paramsMap
.
add
(
"code"
,
code
);
paramsMap
.
add
(
"code"
,
code
);
LinkedMultiValueMap
<
String
,
String
>
headersMap
=
new
LinkedMultiValueMap
<>();
LinkedMultiValueMap
<
String
,
String
>
headersMap
=
new
LinkedMultiValueMap
<>();
headersMap
.
add
(
"token"
,
null
);
headersMap
.
add
(
"token"
,
null
);
try
{
try
{
// TODO: 2021/5/12
String
respStr
=
HttpUtil
.
get
(
env
.
getProperty
(
"liquidnet.url-service.url"
)
+
PHP_API_SMS_CODE_VALID
,
paramsMap
,
headersMap
);
String
respStr
=
HttpUtil
.
get
(
"https://service.zhengzai.tv/smsValidation"
,
paramsMap
,
headersMap
);
log
.
debug
(
"###PHP.API.RESP:{}"
,
respStr
);
log
.
info
(
"###PHP.API.RESP:{}"
,
respStr
);
Map
respMap
=
JsonUtils
.
fromJson
(
respStr
,
Map
.
class
);
Map
respMap
=
JsonUtils
.
fromJson
(
respStr
,
Map
.
class
);
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinOrderTicketsServiceImpl.java
View file @
003a09fa
This diff is collapsed.
Click to expand it.
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/utils/OrderUtils.java
View file @
003a09fa
package
com
.
liquidnet
.
service
.
kylin
.
utils
;
package
com
.
liquidnet
.
service
.
kylin
.
utils
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.service.adam.constant.AdamRedisConst
;
import
com.liquidnet.service.adam.dto.vo.AdamAddressesVo
;
import
com.liquidnet.service.adam.dto.vo.AdamEntersVo
;
import
com.liquidnet.service.adam.dto.vo.AdamUserMemberVo
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketEntitiesVo
;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketEntitiesVo
;
import
io.swagger.models.auth.In
;
import
io.swagger.models.auth.In
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -8,12 +14,15 @@ import org.springframework.data.mongodb.core.query.Query;
...
@@ -8,12 +14,15 @@ import org.springframework.data.mongodb.core.query.Query;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
@Component
@Component
public
class
OrderUtils
{
public
class
OrderUtils
{
@Autowired
@Autowired
private
DataUtils
dataUtils
;
private
DataUtils
dataUtils
;
@Autowired
private
RedisUtil
redisUtil
;
public
String
judgeOrderLimit
(
public
String
judgeOrderLimit
(
int
type
,
int
type
,
...
@@ -32,11 +41,11 @@ public class OrderUtils {
...
@@ -32,11 +41,11 @@ public class OrderUtils {
)
{
)
{
Integer
[]
integers
;
Integer
[]
integers
;
if
(
103
==
type
)
{
if
(
103
==
type
)
{
integers
=
roadShowOrderLimit
(
userId
,
idCard
,
performanceId
,
ticketId
,
performanceBuyCount
,
ticketBuyCount
,
isTrueName
);
integers
=
roadShowOrderLimit
(
userId
,
idCard
,
performanceId
,
ticketId
,
performanceBuyCount
,
ticketBuyCount
,
isTrueName
);
}
else
{
}
else
{
integers
=
festivalOrderLimit
(
userId
,
idCard
,
performanceId
,
ticketId
,
performanceBuyCount
,
ticketBuyCount
,
isTrueName
);
integers
=
festivalOrderLimit
(
userId
,
idCard
,
performanceId
,
ticketId
,
performanceBuyCount
,
ticketBuyCount
,
isTrueName
);
}
}
return
judgeMemberType
(
performanceLimitCount
,
performanceMemberLimitCount
,
ticketLimitCount
,
ticketMemberLimitCount
,
memberType
,
integers
[
0
],
integers
[
1
]);
return
judgeMemberType
(
performanceLimitCount
,
performanceMemberLimitCount
,
ticketLimitCount
,
ticketMemberLimitCount
,
memberType
,
integers
[
0
],
integers
[
1
]);
}
}
public
Integer
[]
roadShowOrderLimit
(
public
Integer
[]
roadShowOrderLimit
(
...
@@ -55,7 +64,7 @@ public class OrderUtils {
...
@@ -55,7 +64,7 @@ public class OrderUtils {
performanceBuyCount
+=
dataUtils
.
getUserPBuyCount
(
userId
,
performanceId
);
performanceBuyCount
+=
dataUtils
.
getUserPBuyCount
(
userId
,
performanceId
);
ticketBuyCount
+=
dataUtils
.
getUserTBuyCount
(
userId
,
ticketId
);
ticketBuyCount
+=
dataUtils
.
getUserTBuyCount
(
userId
,
ticketId
);
}
}
return
new
Integer
[]{
performanceBuyCount
,
ticketBuyCount
};
return
new
Integer
[]{
performanceBuyCount
,
ticketBuyCount
};
}
}
public
Integer
[]
festivalOrderLimit
(
public
Integer
[]
festivalOrderLimit
(
...
@@ -75,7 +84,7 @@ public class OrderUtils {
...
@@ -75,7 +84,7 @@ public class OrderUtils {
ticketBuyCount
+=
dataUtils
.
getUserTBuyCount
(
userId
,
ticketId
);
ticketBuyCount
+=
dataUtils
.
getUserTBuyCount
(
userId
,
ticketId
);
}
}
return
new
Integer
[]{
performanceBuyCount
,
ticketBuyCount
};
return
new
Integer
[]{
performanceBuyCount
,
ticketBuyCount
};
}
}
public
String
judgeMemberType
(
int
performanceLimitCount
,
int
performanceMemberLimitCount
,
int
ticketLimitCount
,
int
ticketMemberLimitCount
,
int
memberType
,
int
performanceBuyCount
,
int
ticketBuyCount
)
{
public
String
judgeMemberType
(
int
performanceLimitCount
,
int
performanceMemberLimitCount
,
int
ticketLimitCount
,
int
ticketMemberLimitCount
,
int
memberType
,
int
performanceBuyCount
,
int
ticketBuyCount
)
{
...
@@ -97,4 +106,21 @@ public class OrderUtils {
...
@@ -97,4 +106,21 @@ public class OrderUtils {
return
""
;
return
""
;
}
}
public
boolean
isMember
(
String
uid
)
{
String
rk
=
AdamRedisConst
.
INFO_USER_MEMBER
.
concat
(
uid
);
AdamUserMemberVo
vo
=
(
AdamUserMemberVo
)
redisUtil
.
get
(
rk
);
return
null
!=
vo
&&
vo
.
isActive
();
}
public
AdamAddressesVo
getAddress
(
String
uid
,
String
addressesId
)
{
String
rk
=
AdamRedisConst
.
INFO_ADDRESSES
.
concat
(
uid
);
List
<
AdamAddressesVo
>
vos
=
(
List
<
AdamAddressesVo
>)
redisUtil
.
get
(
rk
);
return
vos
.
stream
().
filter
(
r
->
r
.
getAddressesId
().
equals
(
addressesId
)).
findAny
().
orElse
(
null
);
}
public
AdamEntersVo
getEnters
(
String
uid
,
String
entersId
)
{
String
rk
=
AdamRedisConst
.
INFO_ENTERS
.
concat
(
uid
);
List
<
AdamEntersVo
>
vos
=
(
List
<
AdamEntersVo
>)
redisUtil
.
get
(
rk
);
return
vos
.
stream
().
filter
(
r
->
r
.
getEntersId
().
equals
(
entersId
)).
findAny
().
orElse
(
null
);
}
}
}
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