记得上下班打卡 | 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
2fc004f4
Commit
2fc004f4
authored
Jul 02, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
cdc3e0cc
0bc54988
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
136 additions
and
541 deletions
+136
-541
AdamRedisConst.java
...a/com/liquidnet/service/adam/constant/AdamRedisConst.java
+1
-0
LnsEnum.java
...ain/java/com/liquidnet/commons/lang/constant/LnsEnum.java
+13
-0
CurrentUtil.java
...ain/java/com/liquidnet/commons/lang/util/CurrentUtil.java
+5
-2
liquidnet-service-adam-dev.yml
...us-config/liquidnet-config/liquidnet-service-adam-dev.yml
+3
-0
liquidnet-service-adam-test.yml
...s-config/liquidnet-config/liquidnet-service-adam-test.yml
+3
-0
liquidnet-service-kylin.yml
...t-bus-config/liquidnet-config/liquidnet-service-kylin.yml
+10
-10
AdamLoginController.java
...iquidnet/service/adam/controller/AdamLoginController.java
+24
-7
AdamMemberOrderController.java
...et/service/adam/controller/AdamMemberOrderController.java
+8
-3
AdamUserController.java
...liquidnet/service/adam/controller/AdamUserController.java
+4
-2
KylinStationController.java
...dnet/service/kylin/controller/KylinStationController.java
+3
-2
KylinOrderTicketsServiceImpl.java
...vice/kylin/service/impl/KylinOrderTicketsServiceImpl.java
+1
-1
KylinOrderTicketsServiceImpl.java
...vice/order/service/impl/KylinOrderTicketsServiceImpl.java
+40
-503
DataImpl.java
...quidnet/service/platform/service/impl/kylin/DataImpl.java
+5
-5
MongoVoUtils.java
...va/com/liquidnet/service/platform/utils/MongoVoUtils.java
+16
-6
No files found.
liquidnet-bus-api/liquidnet-service-adam-api/src/main/java/com/liquidnet/service/adam/constant/AdamRedisConst.java
View file @
2fc004f4
...
@@ -38,6 +38,7 @@ public class AdamRedisConst {
...
@@ -38,6 +38,7 @@ public class AdamRedisConst {
public
static
final
String
SWITCH
=
ADAM
.
concat
(
"switch:"
);
public
static
final
String
SWITCH
=
ADAM
.
concat
(
"switch:"
);
public
static
final
String
SWITCH_BUY_MEMBER
=
SWITCH
.
concat
(
"buy:member"
);
public
static
final
String
SWITCH_BUY_MEMBER
=
SWITCH
.
concat
(
"buy:member"
);
public
static
final
String
SWITCH_GRAY_LOGIN_SMS
=
SWITCH
.
concat
(
"gray:login:sms"
);
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
...
...
liquidnet-bus-common/liquidnet-common-base/src/main/java/com/liquidnet/commons/lang/constant/LnsEnum.java
0 → 100644
View file @
2fc004f4
package
com
.
liquidnet
.
commons
.
lang
.
constant
;
public
final
class
LnsEnum
{
public
enum
ENV
{
dev
,
test
,
prod
;
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
ENV
.
dev
.
name
());
}
}
liquidnet-bus-common/liquidnet-common-base/src/main/java/com/liquidnet/commons/lang/util/CurrentUtil.java
View file @
2fc004f4
...
@@ -3,11 +3,14 @@ package com.liquidnet.commons.lang.util;
...
@@ -3,11 +3,14 @@ package com.liquidnet.commons.lang.util;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.util.Map
;
import
java.util.Map
;
public
class
CurrentUtil
{
public
class
CurrentUtil
{
public
static
final
String
CK_ENV_ACTIVE
=
"spring.profiles.active"
;
public
static
final
String
GRAY_LOGIN_SMS_CODE
=
"111111"
;
/* ======================================================= | */
public
static
final
String
uID
=
"sub"
;
public
static
final
String
uID
=
"sub"
;
public
static
final
String
uTag
=
"u-tag"
;
public
static
final
String
uTag
=
"u-tag"
;
public
static
final
String
uToken
=
"authorization"
;
public
static
final
String
uToken
=
"authorization"
;
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-adam-dev.yml
View file @
2fc004f4
...
@@ -29,5 +29,8 @@ liquidnet:
...
@@ -29,5 +29,8 @@ liquidnet:
aliyun
:
aliyun
:
accessKeyId
:
LTAI4FvoqxJUT5T1ydJSyhUn
accessKeyId
:
LTAI4FvoqxJUT5T1ydJSyhUn
accessSecret
:
WNCgFn9dSjnoDdej2YTvR0v0216WWU
accessSecret
:
WNCgFn9dSjnoDdej2YTvR0v0216WWU
reviewer
:
app-login
:
mobile
:
13724286255
#以下为spring各环境个性配置
#以下为spring各环境个性配置
liquidnet-bus-config/liquidnet-config/liquidnet-service-adam-test.yml
View file @
2fc004f4
...
@@ -29,5 +29,8 @@ liquidnet:
...
@@ -29,5 +29,8 @@ liquidnet:
aliyun
:
aliyun
:
accessKeyId
:
LTAI4FvoqxJUT5T1ydJSyhUn
accessKeyId
:
LTAI4FvoqxJUT5T1ydJSyhUn
accessSecret
:
WNCgFn9dSjnoDdej2YTvR0v0216WWU
accessSecret
:
WNCgFn9dSjnoDdej2YTvR0v0216WWU
reviewer
:
app-login
:
mobile
:
13724286255
#以下为spring各环境个性配置
#以下为spring各环境个性配置
liquidnet-bus-config/liquidnet-config/liquidnet-service-kylin.yml
View file @
2fc004f4
...
@@ -2,11 +2,11 @@ server:
...
@@ -2,11 +2,11 @@ server:
port
:
${liquidnet.info.port}
port
:
${liquidnet.info.port}
tomcat
:
tomcat
:
uri-encoding
:
UTF-8
uri-encoding
:
UTF-8
maxThreads
:
200
#默认200
maxThreads
:
200
0
#默认200
minSpareThreads
:
3
0
#默认10
minSpareThreads
:
200
0
#默认10
maxConnections
:
12
000
#默认10000
maxConnections
:
20
000
#默认10000
acceptCount
:
5000
#默认100
acceptCount
:
5000
#默认100
processorCache
:
200
#默认200
processorCache
:
-1
#默认200
servlet
:
servlet
:
context-path
:
${liquidnet.info.context}
context-path
:
${liquidnet.info.context}
# -----------------------------------------------------------
# -----------------------------------------------------------
...
@@ -19,7 +19,7 @@ knife4j:
...
@@ -19,7 +19,7 @@ knife4j:
password
:
${liquidnet.security.password}
password
:
${liquidnet.security.password}
# -----------------------------------------------------------
# -----------------------------------------------------------
logging
:
logging
:
# config: ${liquidnet.logfile.config}
# config: ${liquidnet.logfile.config}
file
:
file
:
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size
:
${liquidnet.logfile.file-max-size}
max-size
:
${liquidnet.logfile.file-max-size}
...
@@ -34,11 +34,11 @@ logging:
...
@@ -34,11 +34,11 @@ logging:
liquidnet
:
${liquidnet.logfile.level}
liquidnet
:
${liquidnet.logfile.level}
# -----------------------------------------------------------
# -----------------------------------------------------------
eureka
:
eureka
:
# client:
# client:
# register-with-eureka: true
# register-with-eureka: true
# fetch-registry: true
# fetch-registry: true
# serviceUrl:
# serviceUrl:
# defaultZone: http://${liquidnet.security.username}:${liquidnet.security.password}@${liquidnet.eureka.host}/eureka-server/eureka
# defaultZone: http://${liquidnet.security.username}:${liquidnet.security.password}@${liquidnet.eureka.host}/eureka-server/eureka
instance
:
instance
:
hostname
:
${spring.cloud.client.ip-address}
hostname
:
${spring.cloud.client.ip-address}
lease-expiration-duration-in-seconds
:
15
#服务过期时间配置,超过这个时间没有接收到心跳EurekaServer就会将这个实例剔除
lease-expiration-duration-in-seconds
:
15
#服务过期时间配置,超过这个时间没有接收到心跳EurekaServer就会将这个实例剔除
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/controller/AdamLoginController.java
View file @
2fc004f4
...
@@ -9,8 +9,10 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
...
@@ -9,8 +9,10 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.common.cache.redisson.util.RedisLockUtil
;
import
com.liquidnet.common.cache.redisson.util.RedisLockUtil
;
import
com.liquidnet.commons.lang.constant.LnsEnum
;
import
com.liquidnet.commons.lang.core.JwtValidator
;
import
com.liquidnet.commons.lang.core.JwtValidator
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.service.adam.constant.AdamRedisConst
;
import
com.liquidnet.service.adam.dto.AdamThirdPartParam
;
import
com.liquidnet.service.adam.dto.AdamThirdPartParam
;
import
com.liquidnet.service.adam.dto.vo.AdamLoginInfoVo
;
import
com.liquidnet.service.adam.dto.vo.AdamLoginInfoVo
;
import
com.liquidnet.service.adam.dto.vo.AdamUserInfoVo
;
import
com.liquidnet.service.adam.dto.vo.AdamUserInfoVo
;
...
@@ -26,6 +28,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -26,6 +28,7 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.DigestUtils
;
...
@@ -67,7 +70,8 @@ public class AdamLoginController {
...
@@ -67,7 +70,8 @@ public class AdamLoginController {
@Autowired
@Autowired
IAdamUserService
adamUserService
;
IAdamUserService
adamUserService
;
@Value
(
"${liquidnet.reviewer.app-login.mobile}"
)
private
String
reviewMobile
;
private
static
final
String
PHP_API_SMS_CODE_SEND
=
"/smsCode"
;
private
static
final
String
PHP_API_SMS_CODE_SEND
=
"/smsCode"
;
private
static
final
String
PHP_API_SMS_CODE_VALID
=
"/smsValidation"
;
private
static
final
String
PHP_API_SMS_CODE_VALID
=
"/smsValidation"
;
...
@@ -174,7 +178,7 @@ public class AdamLoginController {
...
@@ -174,7 +178,7 @@ public class AdamLoginController {
loginInfoVo
.
setUserInfo
(
userInfoVo
);
loginInfoVo
.
setUserInfo
(
userInfoVo
);
loginInfoVo
.
setToken
(
this
.
ssoProcess
(
userInfoVo
));
loginInfoVo
.
setToken
(
this
.
ssoProcess
(
userInfoVo
));
loginInfoVo
.
getUserInfo
().
setMobile
(
SensitizeUtil
.
custom
(
userInfoVo
.
getMobile
(),
3
,
4
));
loginInfoVo
.
getUserInfo
().
setMobile
(
SensitizeUtil
.
custom
(
userInfoVo
.
getMobile
(),
3
,
4
));
log
.
info
(
UserPathDto
.
setData
(
toRegister
?
"注册"
:
"登录"
,
ServletUtils
.
getRequest
().
getParameterMap
(),
loginInfoVo
));
log
.
info
(
UserPathDto
.
setData
(
toRegister
?
"注册"
:
"登录"
,
ServletUtils
.
getRequest
().
getParameterMap
(),
loginInfoVo
));
return
ResponseDto
.
success
(
loginInfoVo
);
return
ResponseDto
.
success
(
loginInfoVo
);
}
}
...
@@ -212,7 +216,7 @@ public class AdamLoginController {
...
@@ -212,7 +216,7 @@ public class AdamLoginController {
loginInfoVo
.
setUserInfo
(
userInfoVo
);
loginInfoVo
.
setUserInfo
(
userInfoVo
);
loginInfoVo
.
setToken
(
this
.
ssoProcess
(
userInfoVo
));
loginInfoVo
.
setToken
(
this
.
ssoProcess
(
userInfoVo
));
loginInfoVo
.
getUserInfo
().
setMobile
(
SensitizeUtil
.
custom
(
userInfoVo
.
getMobile
(),
3
,
4
));
loginInfoVo
.
getUserInfo
().
setMobile
(
SensitizeUtil
.
custom
(
userInfoVo
.
getMobile
(),
3
,
4
));
log
.
info
(
UserPathDto
.
setData
(
toRegister
?
"注册"
:
"登录"
,
ServletUtils
.
getRequest
().
getParameterMap
(),
loginInfoVo
));
log
.
info
(
UserPathDto
.
setData
(
toRegister
?
"注册"
:
"登录"
,
ServletUtils
.
getRequest
().
getParameterMap
(),
loginInfoVo
));
return
ResponseDto
.
success
(
loginInfoVo
);
return
ResponseDto
.
success
(
loginInfoVo
);
}
}
...
@@ -247,7 +251,7 @@ public class AdamLoginController {
...
@@ -247,7 +251,7 @@ public class AdamLoginController {
}
}
loginInfoVo
.
setToken
(
this
.
ssoProcess
(
loginInfoVo
.
getUserInfo
()));
loginInfoVo
.
setToken
(
this
.
ssoProcess
(
loginInfoVo
.
getUserInfo
()));
loginInfoVo
.
getUserInfo
().
setMobile
(
SensitizeUtil
.
custom
(
loginInfoVo
.
getUserInfo
().
getMobile
(),
3
,
4
));
loginInfoVo
.
getUserInfo
().
setMobile
(
SensitizeUtil
.
custom
(
loginInfoVo
.
getUserInfo
().
getMobile
(),
3
,
4
));
log
.
info
(
UserPathDto
.
setData
(
toRegister
?
"注册"
:
"登录"
,
ServletUtils
.
getRequest
().
getParameterMap
(),
loginInfoVo
));
log
.
info
(
UserPathDto
.
setData
(
toRegister
?
"注册"
:
"登录"
,
ServletUtils
.
getRequest
().
getParameterMap
(),
loginInfoVo
));
return
ResponseDto
.
success
(
loginInfoVo
);
return
ResponseDto
.
success
(
loginInfoVo
);
}
}
...
@@ -283,8 +287,22 @@ public class AdamLoginController {
...
@@ -283,8 +287,22 @@ public class AdamLoginController {
/* ---------------------------- Internal Method ---------------------------- */
/* ---------------------------- Internal Method ---------------------------- */
private
boolean
checkSmsCode
(
String
mobile
,
String
code
)
{
private
boolean
checkSmsCode
(
String
mobile
,
String
code
)
{
if
(
Arrays
.
asList
(
"dev"
,
"test"
,
"prod"
).
contains
(
env
.
getProperty
(
"spring.profiles.active"
))
&&
"111111"
.
equals
(
code
))
{
Integer
switchGrayLoginSms
=
(
Integer
)
redisUtil
.
get
(
AdamRedisConst
.
SWITCH_GRAY_LOGIN_SMS
);
return
true
;
if
(
null
!=
switchGrayLoginSms
)
{
if
(
switchGrayLoginSms
==
615243
)
{
if
(
CurrentUtil
.
GRAY_LOGIN_SMS_CODE
.
equals
(
code
))
{
return
true
;
}
}
if
(
switchGrayLoginSms
==
612543
)
{
if
(
reviewMobile
.
equals
(
mobile
)
||
Arrays
.
asList
(
LnsEnum
.
ENV
.
dev
.
name
(),
LnsEnum
.
ENV
.
test
.
name
()).
contains
(
env
.
getProperty
(
CurrentUtil
.
CK_ENV_ACTIVE
))
)
{
if
(
CurrentUtil
.
GRAY_LOGIN_SMS_CODE
.
equals
(
code
))
{
return
true
;
}
}
}
}
}
LinkedMultiValueMap
<
String
,
String
>
paramsMap
=
new
LinkedMultiValueMap
<>();
LinkedMultiValueMap
<
String
,
String
>
paramsMap
=
new
LinkedMultiValueMap
<>();
...
@@ -328,7 +346,6 @@ public class AdamLoginController {
...
@@ -328,7 +346,6 @@ public class AdamLoginController {
private
String
ssoProcess
(
AdamUserInfoVo
userInfoVo
)
{
private
String
ssoProcess
(
AdamUserInfoVo
userInfoVo
)
{
Map
<
String
,
Object
>
claimsMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
claimsMap
=
new
HashMap
<>();
claimsMap
.
put
(
"sub"
,
userInfoVo
.
getUid
());
claimsMap
.
put
(
"sub"
,
userInfoVo
.
getUid
());
// TODO: 2021/5/25 修改手机号更新TOKEN
claimsMap
.
put
(
"mobile"
,
userInfoVo
.
getMobile
());
claimsMap
.
put
(
"mobile"
,
userInfoVo
.
getMobile
());
claimsMap
.
put
(
"nickname"
,
userInfoVo
.
getNickname
());
claimsMap
.
put
(
"nickname"
,
userInfoVo
.
getNickname
());
claimsMap
.
put
(
"type"
,
"user"
);
claimsMap
.
put
(
"type"
,
"user"
);
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/controller/AdamMemberOrderController.java
View file @
2fc004f4
...
@@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo;
...
@@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.liquidnet.common.cache.redisson.util.RedisLockUtil
;
import
com.liquidnet.common.cache.redisson.util.RedisLockUtil
;
import
com.liquidnet.commons.lang.constant.LnsEnum
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.HttpUtil
;
import
com.liquidnet.commons.lang.util.HttpUtil
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
...
@@ -89,8 +90,12 @@ public class AdamMemberOrderController {
...
@@ -89,8 +90,12 @@ public class AdamMemberOrderController {
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10213"
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10213"
));
}
}
if
(
1
!=
adamRdmService
.
getSwitch
(
AdamRedisConst
.
SWITCH_BUY_MEMBER
))
{
AdamUserMemberVo
userMemberVo
=
adamRdmService
.
getUserMemberVoByUid
(
currentUid
);
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10215"
));
if
(
null
==
userMemberVo
||
!
userMemberVo
.
isActive
())
{
// 当前用户非会员或会员已过期时,购买会员时会受系统配置[开放/限制购买会员]限制
if
(
1
!=
adamRdmService
.
getSwitch
(
AdamRedisConst
.
SWITCH_BUY_MEMBER
))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10215"
));
}
}
}
AdamRealInfoVo
realInfoVo
=
adamRdmService
.
getRealInfoVoByUid
(
currentUid
);
AdamRealInfoVo
realInfoVo
=
adamRdmService
.
getRealInfoVoByUid
(
currentUid
);
...
@@ -157,7 +162,7 @@ public class AdamMemberOrderController {
...
@@ -157,7 +162,7 @@ public class AdamMemberOrderController {
return
"fail"
;
return
"fail"
;
}
}
if
(!
"dev"
.
equals
(
env
.
getProperty
(
"spring.profiles.active"
)))
{
if
(!
LnsEnum
.
ENV
.
dev
.
name
().
equals
(
env
.
getProperty
(
CurrentUtil
.
CK_ENV_ACTIVE
)))
{
ResponseDto
<
Integer
>
checkOrderResult
=
this
.
checkOrderResult
(
parameter
.
getOrderCode
());
ResponseDto
<
Integer
>
checkOrderResult
=
this
.
checkOrderResult
(
parameter
.
getOrderCode
());
if
(!
checkOrderResult
.
isSuccess
()
||
checkOrderResult
.
getData
()
!=
1
)
{
if
(!
checkOrderResult
.
isSuccess
()
||
checkOrderResult
.
getData
()
!=
1
)
{
log
.
warn
(
"###购买会员支付回调支付中心验证不通过,无法处理[{}]"
,
JsonUtils
.
toJson
(
parameter
));
log
.
warn
(
"###购买会员支付回调支付中心验证不通过,无法处理[{}]"
,
JsonUtils
.
toJson
(
parameter
));
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/controller/AdamUserController.java
View file @
2fc004f4
...
@@ -2,6 +2,7 @@ package com.liquidnet.service.adam.controller;
...
@@ -2,6 +2,7 @@ package com.liquidnet.service.adam.controller;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.liquidnet.commons.lang.constant.LnsEnum
;
import
com.liquidnet.commons.lang.constant.LnsRegex
;
import
com.liquidnet.commons.lang.constant.LnsRegex
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.HttpUtil
;
import
com.liquidnet.commons.lang.util.HttpUtil
;
...
@@ -304,8 +305,9 @@ public class AdamUserController {
...
@@ -304,8 +305,9 @@ public class AdamUserController {
private
static
final
String
PHP_API_SMS_CODE_VALID
=
"/smsValidation"
;
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"
,
"prod"
).
contains
(
env
.
getProperty
(
"spring.profiles.active"
)))
{
if
(
Arrays
.
asList
(
LnsEnum
.
ENV
.
dev
.
name
(),
LnsEnum
.
ENV
.
test
.
name
()).
contains
(
env
.
getProperty
(
CurrentUtil
.
CK_ENV_ACTIVE
))
return
"111111"
.
equals
(
code
);
&&
CurrentUtil
.
GRAY_LOGIN_SMS_CODE
.
equals
(
code
))
{
return
true
;
}
}
LinkedMultiValueMap
<
String
,
String
>
paramsMap
=
new
LinkedMultiValueMap
<>();
LinkedMultiValueMap
<
String
,
String
>
paramsMap
=
new
LinkedMultiValueMap
<>();
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/KylinStationController.java
View file @
2fc004f4
...
@@ -2,6 +2,7 @@ package com.liquidnet.service.kylin.controller;
...
@@ -2,6 +2,7 @@ package com.liquidnet.service.kylin.controller;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.commons.lang.constant.LnsEnum
;
import
com.liquidnet.commons.lang.constant.LnsRegex
;
import
com.liquidnet.commons.lang.constant.LnsRegex
;
import
com.liquidnet.commons.lang.core.JwtValidator
;
import
com.liquidnet.commons.lang.core.JwtValidator
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.commons.lang.util.*
;
...
@@ -483,8 +484,8 @@ public class KylinStationController {
...
@@ -483,8 +484,8 @@ public class KylinStationController {
}
}
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20602"
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20602"
));
}
else
{
// 校验验证码
}
else
{
// 校验验证码
if
(
Arrays
.
asList
(
"dev"
,
"test"
).
contains
(
environment
.
getProperty
(
"spring.profiles.active"
)))
{
if
(
Arrays
.
asList
(
LnsEnum
.
ENV
.
dev
.
name
(),
LnsEnum
.
ENV
.
test
.
name
()).
contains
(
environment
.
getProperty
(
CurrentUtil
.
CK_ENV_ACTIVE
)))
{
if
(
"111111"
.
equals
(
identity
))
{
if
(
CurrentUtil
.
GRAY_LOGIN_SMS_CODE
.
equals
(
identity
))
{
return
this
.
loginAuthentication
(
checkUserVo
);
return
this
.
loginAuthentication
(
checkUserVo
);
}
}
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20002"
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20002"
));
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinOrderTicketsServiceImpl.java
View file @
2fc004f4
...
@@ -990,7 +990,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
...
@@ -990,7 +990,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
if
(
null
!=
performanceVo
.
getIsCanRefund
()
&&
performanceVo
.
getIsCanRefund
()
==
1
)
{
if
(
null
!=
performanceVo
.
getIsCanRefund
()
&&
performanceVo
.
getIsCanRefund
()
==
1
)
{
LocalDateTime
refundOpenDate
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
performanceVo
.
getRefundOpenTime
());
LocalDateTime
refundOpenDate
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
performanceVo
.
getRefundOpenTime
());
LocalDateTime
refundCloseDate
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
performanceVo
.
getRefundCloseTime
());
LocalDateTime
refundCloseDate
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
performanceVo
.
getRefundCloseTime
());
if
(
LocalDateTime
.
now
().
isAfter
(
refundOpenDate
)
&&
LocalDateTime
.
now
().
isBefore
(
refundCloseDate
))
{
if
(
LocalDateTime
.
now
().
isAfter
(
refundOpenDate
)
&&
LocalDateTime
.
now
().
isBefore
(
refundCloseDate
)
&&
!
orderTicketVo
.
getExpressAddress
().
trim
().
equals
(
""
)
)
{
vo
.
setIsCanRefund
(
1
);
vo
.
setIsCanRefund
(
1
);
}
else
{
}
else
{
vo
.
setIsCanRefund
(
0
);
vo
.
setIsCanRefund
(
0
);
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/KylinOrderTicketsServiceImpl.java
View file @
2fc004f4
...
@@ -94,8 +94,6 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
...
@@ -94,8 +94,6 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
private
TaobaoTicketUtils
taobaoTicketUtils
;
private
TaobaoTicketUtils
taobaoTicketUtils
;
@Autowired
@Autowired
private
OrderRefundOvertimeServiceImpl
orderRefundsCallbackService
;
private
OrderRefundOvertimeServiceImpl
orderRefundsCallbackService
;
@Autowired
private
KylinRefundsStatusServiceImpl
refundsStatusService
;
ArrayList
<
Integer
>
canBuyStatus
=
new
ArrayList
()
{{
ArrayList
<
Integer
>
canBuyStatus
=
new
ArrayList
()
{{
...
@@ -865,183 +863,6 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
...
@@ -865,183 +863,6 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
}
}
}
}
@Override
public
PageInfo
<
List
<
KylinOrderListVo
>>
orderList
()
{
//TODO 缺快递
PageInfo
<
List
<
KylinOrderListVo
>>
mPageInfo
=
null
;
String
uid
=
CurrentUtil
.
getCurrentUid
();
// checkOrderTime(uid);
try
{
List
<
KylinOrderListVo
>
voList
=
dataUtils
.
getOrderList
(
uid
);
for
(
int
i
=
0
;
i
<
voList
.
size
();
i
++)
{
KylinOrderListVo
item
=
voList
.
get
(
i
);
//TODO 顺丰快递
Object
expresses
=
null
;
if
(
null
!=
expresses
)
{
item
.
setExpress_number
(
""
);
//expresses.getNumber()
item
.
setExpress_company
(
""
);
//expresses.getName()
item
.
setKuaidi_status
(-
2
);
//expresses.getStatus()
}
else
{
item
.
setExpress_number
(
""
);
item
.
setExpress_company
(
""
);
item
.
setKuaidi_status
(-
2
);
}
if
(
item
.
getStatus
().
equals
(
KylinTableStatusConst
.
ORDER_STATUS0
))
{
try
{
item
.
setRestTime
(
DateUtil
.
intervalSeconds
(
DateUtil
.
parse
(
item
.
getOverdueAt
(),
"yyyy-MM-dd HH:mm:ss"
),
DateUtil
.
parse
(
DateUtil
.
getNowTime
(),
"yyyy-MM-dd HH:mm:ss"
)
));
if
(
item
.
getRestTime
()
<=
0L
)
{
item
.
setRestTime
(
0L
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
log
.
debug
(
"item.getOverdueAt() = "
+
item
.
getOverdueAt
());
log
.
debug
(
"DateUtil.getNowTime() = "
+
DateUtil
.
getNowTime
());
log
.
debug
(
"item.getRestTime() = "
+
item
.
getRestTime
());
}
else
{
item
.
setRestTime
(
0L
);
}
if
(
i
>=
40
)
{
break
;
}
}
mPageInfo
=
new
PageInfo
(
voList
);
mPageInfo
.
setTotal
(
voList
.
size
());
log
.
info
(
UserPathDto
.
setData
(
"订单列表"
,
""
,
voList
));
return
mPageInfo
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
mPageInfo
;
}
}
@Override
public
OrderDetailsVo
orderDetails
(
String
orderId
)
{
OrderDetailsVo
vo
=
new
OrderDetailsVo
();
try
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
// checkOrderTime(uid);
KylinOrderTicketVo
orderTicketVo
=
dataUtils
.
getOrderTicketVo
(
orderId
);
if
(!
orderTicketVo
.
getUserId
().
equals
(
uid
))
{
return
null
;
}
if
(
null
!=
orderTicketVo
)
{
//TODO 顺丰快递
Object
expresses
=
null
;
KylinPerformanceVo
performanceVo
=
dataUtils
.
getPerformanceVo
(
orderTicketVo
.
getPerformanceId
());
List
<
KylinOrderTicketEntitiesVo
>
kylinOrderTicketEntitiesVoList
=
orderTicketVo
.
getEntitiesVoList
();
KylinTicketVo
ticketVo
=
null
;
//获取购票数据
for
(
int
x
=
0
;
x
<
performanceVo
.
getTicketTimeList
().
size
();
x
++)
{
KylinTicketTimesVo
timeItem
=
performanceVo
.
getTicketTimeList
().
get
(
x
);
for
(
int
y
=
0
;
y
<
timeItem
.
getTicketList
().
size
();
y
++)
{
KylinTicketVo
ticketItem
=
timeItem
.
getTicketList
().
get
(
y
);
if
(
ticketItem
.
getTicketsId
().
equals
(
orderTicketVo
.
getTicketId
()))
{
ticketVo
=
ticketItem
;
break
;
}
}
}
orderTicketVo
.
setIsTrueName
(
ticketVo
.
getIsTrueName
());
orderTicketVo
.
setNoticeImage
(
performanceVo
.
getNoticeImage
());
orderTicketVo
.
setNotice
(
performanceVo
.
getNotice
());
orderTicketVo
.
setTicketType
(
ticketVo
.
getType
());
orderTicketVo
.
setFieldName
(
performanceVo
.
getFieldName
());
if
(
ticketVo
.
getIsShowCode
()
==
1
&&
orderTicketVo
.
getStatus
()
!=
0
&&
orderTicketVo
.
getStatus
()
!=
2
&&
orderTicketVo
.
getStatus
()
!=
4
)
{
LocalDateTime
date
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
ticketVo
.
getQrCodeShowTime
());
if
(
LocalDateTime
.
now
().
isAfter
(
date
))
{
orderTicketVo
.
setQrCode
(
orderTicketVo
.
getQrCode
());
}
else
{
orderTicketVo
.
setQrCode
(
""
);
}
}
else
{
orderTicketVo
.
setQrCode
(
""
);
}
// 数据脱敏
for
(
KylinOrderTicketEntitiesVo
item
:
kylinOrderTicketEntitiesVoList
)
{
if
(
item
.
getEnterIdCode
().
length
()
==
18
)
{
item
.
setEnterIdCode
(
item
.
getEnterIdCode
().
substring
(
0
,
3
)
+
"*************"
+
item
.
getEnterIdCode
().
substring
(
16
));
}
if
(
item
.
getEnterMobile
().
length
()
==
11
)
{
item
.
setEnterMobile
(
item
.
getEnterMobile
().
substring
(
0
,
3
)
+
"****"
+
item
.
getEnterMobile
().
substring
(
7
));
}
}
//计算 倒计时
Date
nowDate
=
DateUtil
.
parse
(
DateUtil
.
getNowTime
(),
"yyyy-MM-dd HH:mm:ss"
);
if
(
orderTicketVo
.
getStatus
().
equals
(
KylinTableStatusConst
.
ORDER_STATUS0
))
{
vo
.
setRestTime
(
DateUtil
.
intervalSeconds
(
DateUtil
.
parse
(
orderTicketVo
.
getOverdueAt
(),
"yyyy-MM-dd HH:mm:ss"
),
nowDate
));
if
(
vo
.
getRestTime
()
<=
0L
)
{
vo
.
setRestTime
(
0L
);
}
}
else
{
vo
.
setRestTime
(
0L
);
}
//快递
if
(
null
!=
expresses
)
{
vo
.
setExpress_number
(
""
);
//expresses.getNumber()
vo
.
setExpress_company
(
""
);
//expresses.getName()
vo
.
setKuaidi_status
(-
2
);
//expresses.getStatus()
}
else
{
vo
.
setExpress_number
(
""
);
vo
.
setExpress_company
(
""
);
vo
.
setKuaidi_status
(-
2
);
}
if
(
null
!=
performanceVo
.
getIsCanRefund
()
&&
performanceVo
.
getIsCanRefund
()
==
1
)
{
LocalDateTime
refundOpenDate
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
performanceVo
.
getRefundOpenTime
());
LocalDateTime
refundCloseDate
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
performanceVo
.
getRefundCloseTime
());
if
(
LocalDateTime
.
now
().
isAfter
(
refundOpenDate
)
&&
LocalDateTime
.
now
().
isBefore
(
refundCloseDate
))
{
vo
.
setIsCanRefund
(
1
);
}
else
{
vo
.
setIsCanRefund
(
0
);
}
}
else
{
vo
.
setIsCanRefund
(
0
);
}
List
<
KylinOrderRefundsOrderCodeVo
>
orderRefundsVoBaseList
=
new
ArrayList
<>();
for
(
KylinOrderRefundsVo
item
:
dataUtils
.
getOrderRefundVoByOrderId
(
orderId
))
{
KylinOrderRefundsOrderCodeVo
data
=
new
KylinOrderRefundsOrderCodeVo
();
data
.
setOrderRefundsId
(
item
.
getOrderRefundsId
());
data
.
setOrderRefundCode
(
item
.
getOrderRefundCode
());
data
.
setStatus
(
item
.
getStatus
());
}
List
<
KylinOrderRefundsVo
>
orderRefundsVoList
=
dataUtils
.
getOrderRefundVoByOrderId
(
orderId
);
List
<
OrderRefundListVo
>
orderRefundListVos
=
new
ArrayList
<>();
for
(
KylinOrderRefundsVo
item
:
orderRefundsVoList
)
{
OrderRefundListVo
data
=
new
OrderRefundListVo
();
data
.
setOrderRefundCode
(
item
.
getOrderRefundCode
().
substring
(
item
.
getOrderRefundCode
().
length
()
-
10
));
data
.
setOrderRefundsId
(
item
.
getOrderRefundsId
());
data
.
setStatus
(
item
.
getStatus
());
orderRefundListVos
.
add
(
data
);
}
orderTicketVo
.
setOrderRefundListVos
(
orderRefundListVos
);
orderTicketVo
.
setOrderCode
(
orderTicketVo
.
getOrderCode
().
substring
(
orderTicketVo
.
getOrderCode
().
length
()
-
10
));
vo
.
setOrderRefundsVoList
(
orderRefundsVoBaseList
);
vo
.
setOrderTicketVo
(
orderTicketVo
);
vo
.
setEnterDescribe
(
dataUtils
.
getEnterInfo
(
"1"
));
}
log
.
info
(
UserPathDto
.
setData
(
"订单详情"
,
orderId
,
vo
));
return
vo
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
vo
;
}
}
@Override
@Override
public
ResponseDto
<
Integer
>
checkOrderResult
(
String
orderId
)
{
public
ResponseDto
<
Integer
>
checkOrderResult
(
String
orderId
)
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
...
@@ -1062,330 +883,6 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
...
@@ -1062,330 +883,6 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
}
}
}
}
@Override
public
ResponseDto
<
Integer
>
orderUnPayCount
()
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
List
<
KylinOrderListVo
>
voList
=
dataUtils
.
getOrderList
(
uid
);
int
unPayCount
=
0
;
for
(
KylinOrderListVo
item
:
voList
)
{
if
(
item
.
getStatus
().
equals
(
KylinTableStatusConst
.
ORDER_STATUS0
))
{
item
.
setRestTime
(
DateUtil
.
intervalSeconds
(
DateUtil
.
parse
(
item
.
getOverdueAt
(),
"yyyy-MM-dd HH:mm:ss"
),
DateUtil
.
parse
(
DateUtil
.
getNowTime
(),
"yyyy-MM-dd HH:mm:ss"
)
));
if
(
item
.
getRestTime
()
<=
0L
)
{
item
.
setRestTime
(
0L
);
}
else
{
unPayCount
+=
1
;
}
}
else
{
item
.
setRestTime
(
0L
);
}
}
return
ResponseDto
.
success
(
unPayCount
);
}
@Override
public
KylinOrderTicketPreVo
toOrderRefundDetails
(
String
orderId
)
{
try
{
KylinOrderTicketPreVo
vo
=
new
KylinOrderTicketPreVo
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
KylinOrderTicketVo
orderTicketVo
=
dataUtils
.
getOrderTicketVo
(
orderId
);
KylinPerformanceVo
performanceVo
=
dataUtils
.
getPerformanceVo
(
orderTicketVo
.
getPerformanceId
());
List
<
KylinOrderRefundsVo
>
kylinOrderRefundsVoBaseList
=
dataUtils
.
getOrderRefundVoByOrderId
(
orderTicketVo
.
getOrderTicketsId
());
if
(!
orderTicketVo
.
getUserId
().
equals
(
uid
))
{
return
null
;
}
List
<
KylinOrderTicketEntitiesVo
>
kylinOrderTicketEntitiesVoList
=
orderTicketVo
.
getEntitiesVoList
();
List
<
KylinOrderTicketEntitiesPreRefundVo
>
kylinOrderTicketEntitiesPreRefundVos
=
new
ArrayList
<>();
// 数据脱敏
for
(
KylinOrderTicketEntitiesVo
item
:
kylinOrderTicketEntitiesVoList
)
{
KylinOrderTicketEntitiesPreRefundVo
refundVo
=
new
KylinOrderTicketEntitiesPreRefundVo
();
if
(
item
.
getEnterIdCode
().
length
()
==
18
)
{
item
.
setEnterIdCode
(
item
.
getEnterIdCode
().
substring
(
0
,
3
)
+
"*************"
+
item
.
getEnterIdCode
().
substring
(
16
));
}
if
(
item
.
getEnterMobile
().
length
()
==
11
)
{
item
.
setEnterMobile
(
item
.
getEnterMobile
().
substring
(
0
,
3
)
+
"****"
+
item
.
getEnterMobile
().
substring
(
7
));
}
item
.
setPriceActual
(
orderTicketVo
.
getPriceActual
().
subtract
(
orderTicketVo
.
getPriceExpress
()).
divide
(
new
BigDecimal
(
orderTicketVo
.
getNumber
())));
item
.
setPriceCanRefund
(
dataUtils
.
getCanRefundOrderEntitiesPrice
(
orderTicketVo
,
kylinOrderRefundsVoBaseList
,
item
.
getOrderTicketEntitiesId
()));
BeanUtils
.
copyProperties
(
item
,
refundVo
);
kylinOrderTicketEntitiesPreRefundVos
.
add
(
refundVo
);
}
orderTicketVo
.
setFieldName
(
performanceVo
.
getFieldName
());
BeanUtils
.
copyProperties
(
orderTicketVo
,
vo
);
vo
.
setIsTrueName
(
performanceVo
.
getIsTrueName
());
vo
.
setEntitiesPreRefundVos
(
kylinOrderTicketEntitiesPreRefundVos
);
return
vo
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
@Override
public
OrderRefundVo
orderRefundDetails
(
String
orderId
,
String
orderRefundId
)
{
OrderRefundVo
vo
=
new
OrderRefundVo
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
KylinOrderTicketVo
orderTicketVo
=
dataUtils
.
getOrderTicketVo
(
orderId
);
KylinPerformanceVo
performanceVo
=
dataUtils
.
getPerformanceVo
(
orderTicketVo
.
getPerformanceId
());
if
(!
orderTicketVo
.
getUserId
().
equals
(
uid
))
{
return
null
;
}
orderTicketVo
.
setFieldName
(
performanceVo
.
getFieldName
());
KylinOrderRefundsVo
kylinOrderRefundsVoBase
=
dataUtils
.
getOrderRefundVo
(
orderRefundId
);
vo
.
setKylinOrderRefundsVoBaseList
(
kylinOrderRefundsVoBase
);
vo
.
setOrderTicketVo
(
orderTicketVo
);
return
vo
;
}
@Override
public
ResponseDto
<
String
>
sendOrderRefund
(
String
orderId
,
String
orderTicketEntitiesId
,
String
reason
,
String
picList
)
{
KylinOrderTicketEntitiesVo
orderTicketEntitiesVo
=
null
;
try
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
KylinOrderTicketVo
orderTicketVo
=
dataUtils
.
getOrderTicketVo
(
orderId
);
List
<
KylinOrderRefundsVo
>
kylinOrderRefundsVoBaseList
=
dataUtils
.
getOrderRefundVoByOrderId
(
orderTicketVo
.
getOrderTicketsId
());
if
(!
orderTicketVo
.
getUserId
().
equals
(
uid
))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20003"
));
}
List
<
KylinOrderTicketEntitiesVo
>
entitiesVos
=
orderTicketVo
.
getEntitiesVoList
();
for
(
KylinOrderTicketEntitiesVo
item
:
entitiesVos
)
{
if
(
item
.
getOrderTicketEntitiesId
().
equals
(
orderTicketEntitiesId
))
{
orderTicketEntitiesVo
=
item
;
}
}
if
(
null
==
orderTicketEntitiesVo
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20004"
));
}
BigDecimal
refundSinglePrice
=
dataUtils
.
getCanRefundOrderEntitiesPrice
(
orderTicketVo
,
kylinOrderRefundsVoBaseList
,
orderTicketEntitiesId
);
if
(
refundSinglePrice
.
doubleValue
()
<=
0
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20022"
));
}
Map
token
=
CurrentUtil
.
getTokenClaims
();
String
username
=
StringUtils
.
defaultString
(((
String
)
token
.
get
(
"nickname"
)),
""
);
String
result
=
refundsStatusService
.
userOrderTicketRefunding
(
orderTicketVo
,
refundSinglePrice
.
doubleValue
(),
orderTicketEntitiesId
,
reason
,
picList
,
uid
,
username
,
kylinOrderRefundsVoBaseList
.
size
());
if
(
result
!=
""
)
{
return
ResponseDto
.
success
(
result
);
}
else
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20019"
));
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20019"
));
}
}
@Override
public
ResponseDto
<
Boolean
>
orderRefundWithdraw
(
String
orderRefundsId
)
{
LinkedList
<
String
>
sqls
=
new
LinkedList
<>();
LinkedList
<
Object
[]>
sqlsDataA
=
new
LinkedList
<>();
LinkedList
<
Object
[]>
sqlsDataB
=
new
LinkedList
<>();
LinkedList
<
Object
[]>
sqlsDataC
=
new
LinkedList
<>();
LocalDateTime
time
=
LocalDateTime
.
now
();
String
strTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
time
);
try
{
KylinOrderRefundsVo
orderRefundsVo
=
dataUtils
.
getOrderRefundVo
(
orderRefundsId
);
if
(!
orderRefundsVo
.
getStatus
().
equals
(
0
))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20020"
));
}
List
<
KylinOrderRefundEntitiesVo
>
refundEntities
=
orderRefundsVo
.
getOrderRefundEntitiesVoList
();
String
orderTicketsId
=
orderRefundsVo
.
getOrderTicketsId
();
KylinOrderTicketVo
orderTicketVo
=
dataUtils
.
getOrderTicketVo
(
orderTicketsId
);
// 更新数据
// 订单状态表 判断是退到正在退款 已付款 部分退款?(取消,完成,失败)
int
newStatus
;
int
refundingCount
=
0
;
List
<
KylinOrderRefundsVo
>
orderRefundsVoList
=
dataUtils
.
getOrderRefundVoByOrderId
(
orderTicketsId
);
for
(
KylinOrderRefundsVo
item
:
orderRefundsVoList
)
{
int
status
=
item
.
getStatus
();
if
(
status
!=
2
&&
status
!=
4
&&
status
!=
6
&&
!
item
.
getOrderRefundsId
().
equals
(
orderRefundsId
))
{
refundingCount
+=
1
;
}
}
if
(
refundingCount
>
0
)
{
// 存在其他正在退款的订单
newStatus
=
KylinTableStatusConst
.
ORDER_STATUS3
;
}
else
{
if
(
orderTicketVo
.
getPriceRefund
().
doubleValue
()
>
0
)
{
// 已经有退完的 那就是部分退款了
newStatus
=
KylinTableStatusConst
.
ORDER_STATUS6
;
}
else
if
(
orderTicketVo
.
getStatus
()
!=
2
)
{
newStatus
=
KylinTableStatusConst
.
ORDER_STATUS1
;
}
else
{
newStatus
=
KylinTableStatusConst
.
ORDER_STATUS2
;
}
}
KylinOrderTicketStatus
orderStatusTable
=
new
KylinOrderTicketStatus
();
orderStatusTable
.
setStatus
(
newStatus
);
orderStatusTable
.
setUpdatedAt
(
time
);
sqlsDataA
.
add
(
new
Object
[]{
orderStatusTable
.
getStatus
(),
orderStatusTable
.
getUpdatedAt
(),
orderTicketsId
,
orderTicketVo
.
getChangeDate
(),
orderTicketVo
.
getChangeDate
()
});
KylinOrderTicketVo
kylinOrderTicketVo
=
new
KylinOrderTicketVo
();
kylinOrderTicketVo
.
setStatus
(
newStatus
);
kylinOrderTicketVo
.
setUpdatedAt
(
strTime
);
kylinOrderTicketVo
.
setChangeDate
(
time
);
BasicDBObject
orderObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
kylinOrderTicketVo
)));
mongoTemplate
.
getCollection
(
KylinOrderTicketVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"orderTicketsId"
).
is
(
orderTicketsId
)).
getQueryObject
(),
orderObject
);
dataUtils
.
delOrderTicketRedis
(
orderTicketsId
);
mongoVoUtils
.
resetOrderListVo
(
orderTicketVo
.
getUserId
(),
2
,
orderTicketsId
,
null
);
// 入场人
for
(
KylinOrderRefundEntitiesVo
item
:
refundEntities
)
{
// 订单状态表 判断是退到正在退款 已付款 部分退款?(取消,完成,失败)
int
newIsPayment
=
0
;
int
refundingEntitiesCount
=
0
;
for
(
KylinOrderRefundsVo
item2
:
orderRefundsVoList
)
{
int
status
=
item2
.
getStatus
();
if
(!
item2
.
getOrderRefundsId
().
equals
(
orderRefundsId
)
&&
(
status
!=
2
&&
status
!=
4
&&
status
!=
6
))
{
for
(
KylinOrderRefundEntitiesVo
item3
:
item2
.
getOrderRefundEntitiesVoList
())
{
if
(
item3
.
getOrderTicketEntitiesId
().
equals
(
item
.
getOrderTicketEntitiesId
()))
{
refundingEntitiesCount
+=
1
;
}
}
}
}
KylinOrderTicketEntitiesVo
entitiesVo
=
null
;
for
(
KylinOrderTicketEntitiesVo
entitiesVo1
:
orderTicketVo
.
getEntitiesVoList
())
{
if
(
entitiesVo1
.
getOrderTicketEntitiesId
().
equals
(
item
.
getOrderTicketEntitiesId
()))
{
entitiesVo
=
entitiesVo1
;
break
;
}
}
if
(
refundingEntitiesCount
>
0
)
{
// 存在其他正在退款的该入场人订单
newIsPayment
=
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT2
;
}
else
{
if
(
entitiesVo
.
getRefundPrice
().
doubleValue
()
>
0
)
{
// 已经有退完的 那就是部分退款了
newIsPayment
=
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT4
;
}
else
{
newIsPayment
=
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT1
;
}
}
KylinOrderTicketEntities
entitiesTable
=
new
KylinOrderTicketEntities
();
entitiesTable
.
setIsPayment
(
newIsPayment
);
entitiesTable
.
setUpdatedAt
(
time
);
sqlsDataB
.
add
(
new
Object
[]{
entitiesTable
.
getIsPayment
(),
entitiesTable
.
getUpdatedAt
(),
item
.
getOrderTicketEntitiesId
(),
entitiesVo
.
getChangeDate
(),
entitiesVo
.
getChangeDate
()
});
KylinOrderTicketEntitiesVo
kylinOrderTicketEntitiesVo
=
new
KylinOrderTicketEntitiesVo
();
kylinOrderTicketEntitiesVo
.
setIsPayment
(
newIsPayment
);
kylinOrderTicketEntitiesVo
.
setUpdatedAt
(
strTime
);
kylinOrderTicketEntitiesVo
.
setChangeDate
(
time
);
BasicDBObject
entitiesObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
kylinOrderTicketEntitiesVo
)));
mongoTemplate
.
getCollection
(
KylinOrderTicketEntitiesVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"orderTicketEntitiesId"
).
is
(
item
.
getOrderTicketEntitiesId
())).
getQueryObject
(),
entitiesObject
);
dataUtils
.
delOrderTicketEntitiesRedis
(
item
.
getOrderTicketEntitiesId
());
}
// 退款细节取消
KylinOrderRefunds
kylinOrderRefunds
=
new
KylinOrderRefunds
();
kylinOrderRefunds
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_CANCEL
);
kylinOrderRefunds
.
setUpdatedAt
(
LocalDateTime
.
now
());
KylinOrderRefundsVo
orderRefundsVoBase
=
new
KylinOrderRefundsVo
();
orderRefundsVoBase
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_CANCEL
);
orderRefundsVoBase
.
setUpdatedAt
(
time
);
BasicDBObject
refundObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
orderRefundsVoBase
)));
mongoTemplate
.
getCollection
(
KylinOrderRefundsVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"orderRefundsId"
).
is
(
orderRefundsId
)).
getQueryObject
(),
refundObject
);
sqlsDataC
.
add
(
new
Object
[]{
orderRefundsVoBase
.
getStatus
(),
orderRefundsVoBase
.
getUpdatedAt
(),
orderRefundsId
});
dataUtils
.
delOrderRefundVo
(
orderRefundsId
);
dataUtils
.
delOrderRefundVoByOrderId
(
orderTicketsId
);
sqls
.
add
(
SqlMapping
.
get
(
"kylin_order_ticket_status.withDraw"
));
sqls
.
add
(
SqlMapping
.
get
(
"kylin_order_ticket_entities.withDraw"
));
sqls
.
add
(
SqlMapping
.
get
(
"kylin_order_refund.withDraw"
));
rabbitTemplate
.
convertAndSend
(
MQConst
.
EXCHANGES_LIQUIDNET_SQL_ORDER_WITHDRAW
,
MQConst
.
ROUTING_KEY_SQL_ORDER_WITHDRAW
,
SqlMapping
.
gets
(
sqls
,
sqlsDataA
,
sqlsDataB
,
sqlsDataC
));
return
ResponseDto
.
success
(
true
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20020"
));
}
}
@Override
public
Boolean
orderRefundAgain
(
String
orderRefundsId
)
{
LocalDateTime
time
=
LocalDateTime
.
now
();
String
strTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
time
);
String
uid
=
CurrentUtil
.
getCurrentUid
();
KylinOrderRefundsVo
orderRefundVo
=
dataUtils
.
getOrderRefundVo
(
orderRefundsId
);
// 订单状态表 MQ
KylinOrderTicketStatus
orderStatusTable
=
new
KylinOrderTicketStatus
();
orderStatusTable
.
setStatus
(
KylinTableStatusConst
.
ORDER_STATUS3
);
orderStatusTable
.
setUpdatedAt
(
time
);
// 订单入场人表 MQ
KylinOrderTicketEntities
entitiesTable
=
new
KylinOrderTicketEntities
();
entitiesTable
.
setIsPayment
(
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT2
);
entitiesTable
.
setUpdatedAt
(
time
);
// 订单退款表
KylinOrderRefunds
orderRefunds
=
new
KylinOrderRefunds
();
orderRefunds
.
setUpdatedAt
(
time
);
orderRefunds
.
setApplicantAt
(
time
);
orderRefunds
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPLY
);
//订单状态表 MONGO
KylinOrderTicketVo
kylinOrderTicketVo
=
new
KylinOrderTicketVo
();
kylinOrderTicketVo
.
setStatus
(
KylinTableStatusConst
.
ORDER_STATUS3
);
kylinOrderTicketVo
.
setUpdatedAt
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
time
));
BasicDBObject
orderObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
kylinOrderTicketVo
)));
mongoTemplate
.
getCollection
(
KylinOrderTicketVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"orderTicketsId"
).
is
(
orderRefundVo
.
getOrderTicketsId
())).
getQueryObject
(),
orderObject
);
dataUtils
.
delOrderTicketRedis
(
orderRefundVo
.
getOrderTicketsId
());
mongoVoUtils
.
resetOrderListVo
(
uid
,
2
,
orderRefundVo
.
getOrderTicketsId
(),
null
);
// 订单入场人表 MONGO
KylinOrderTicketEntitiesVo
kylinOrderTicketEntitiesVo
=
new
KylinOrderTicketEntitiesVo
();
kylinOrderTicketEntitiesVo
.
setIsPayment
(
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT2
);
kylinOrderTicketEntitiesVo
.
setUpdatedAt
(
strTime
);
BasicDBObject
entitiesObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
kylinOrderTicketEntitiesVo
)));
mongoTemplate
.
getCollection
(
KylinOrderTicketEntitiesVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"orderTicketEntitiesId"
).
is
(
orderRefundVo
.
getOrderRefundEntitiesVoList
().
get
(
0
).
getOrderTicketEntitiesId
())).
getQueryObject
(),
entitiesObject
);
dataUtils
.
delOrderTicketEntitiesRedis
(
orderRefundVo
.
getOrderRefundEntitiesVoList
().
get
(
0
).
getOrderTicketEntitiesId
());
// 订单退款表 MONGO
KylinOrderRefundsVo
orderRefundsVo
=
new
KylinOrderRefundsVo
();
orderRefundsVo
.
setStatus
(
KylinTableStatusConst
.
ORDER_REFUND_STATUS_APPLY
);
orderRefundsVo
.
setUpdatedAt
(
time
);
orderRefundsVo
.
setApplicantAt
(
time
);
BasicDBObject
refundObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
orderRefundsVo
)));
mongoTemplate
.
getCollection
(
KylinOrderRefundsVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"orderRefundsId"
).
is
(
orderRefundVo
.
getOrderRefundsId
())).
getQueryObject
(),
refundObject
);
return
null
;
}
public
boolean
checkAgent
(
String
agentId
,
KylinTicketVo
ticketData
)
{
public
boolean
checkAgent
(
String
agentId
,
KylinTicketVo
ticketData
)
{
boolean
isAgent
=
ticketData
.
getIsAgent
()
==
1
;
boolean
isAgent
=
ticketData
.
getIsAgent
()
==
1
;
if
(
isAgent
)
{
if
(
isAgent
)
{
...
@@ -1449,4 +946,44 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
...
@@ -1449,4 +946,44 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
return
false
;
return
false
;
}
}
}
}
@Override
public
PageInfo
<
List
<
KylinOrderListVo
>>
orderList
()
{
return
null
;
}
@Override
public
OrderDetailsVo
orderDetails
(
String
orderId
)
{
return
null
;
}
@Override
public
ResponseDto
<
Integer
>
orderUnPayCount
()
{
return
null
;
}
@Override
public
KylinOrderTicketPreVo
toOrderRefundDetails
(
String
orderId
)
{
return
null
;
}
@Override
public
OrderRefundVo
orderRefundDetails
(
String
orderId
,
String
orderRefundId
)
{
return
null
;
}
@Override
public
ResponseDto
<
String
>
sendOrderRefund
(
String
orderId
,
String
orderTicketEntitiesId
,
String
reason
,
String
picList
)
{
return
null
;
}
@Override
public
ResponseDto
<
Boolean
>
orderRefundWithdraw
(
String
orderRefundsId
)
{
return
null
;
}
@Override
public
Boolean
orderRefundAgain
(
String
orderRefundsId
)
{
return
null
;
}
}
}
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/kylin/DataImpl.java
View file @
2fc004f4
...
@@ -71,7 +71,7 @@ public class DataImpl {
...
@@ -71,7 +71,7 @@ public class DataImpl {
public
boolean
performance
()
{
public
boolean
performance
()
{
try
{
try
{
String
driverClassName
=
"com.mysql.cj.jdbc.Driver"
;
//启动驱动
String
driverClassName
=
"com.mysql.cj.jdbc.Driver"
;
//启动驱动
String
url
=
"jdbc:mysql://
zhengzai
.mysql.polardb.rds.aliyuncs.com:3306/mall"
;
//设置连接路径
String
url
=
"jdbc:mysql://
pc-2ze6z2hxkug559q79
.mysql.polardb.rds.aliyuncs.com:3306/mall"
;
//设置连接路径
String
username
=
"readonly"
;
//数据库用户名
String
username
=
"readonly"
;
//数据库用户名
String
password
=
"ZWDsf8Fy"
;
//数据库连接密码
String
password
=
"ZWDsf8Fy"
;
//数据库连接密码
Connection
con
=
null
;
//连接
Connection
con
=
null
;
//连接
...
@@ -307,7 +307,7 @@ public class DataImpl {
...
@@ -307,7 +307,7 @@ public class DataImpl {
tickets
.
setPriceExpress
(
ticketData
.
getBigDecimal
(
"price_express"
));
tickets
.
setPriceExpress
(
ticketData
.
getBigDecimal
(
"price_express"
));
tickets
.
setPriceDiscountMember
(
new
BigDecimal
(
"0.00"
));
tickets
.
setPriceDiscountMember
(
new
BigDecimal
(
"0.00"
));
tickets
.
setPriceDiscount
(
new
BigDecimal
(
"0.00"
));
tickets
.
setPriceDiscount
(
new
BigDecimal
(
"0.00"
));
tickets
.
setDescribes
(
ticketData
.
getString
(
"describe
_express
"
));
tickets
.
setDescribes
(
ticketData
.
getString
(
"describe"
));
tickets
.
setDescribeExpress
(
ticketData
.
getString
(
"describe_express"
));
tickets
.
setDescribeExpress
(
ticketData
.
getString
(
"describe_express"
));
tickets
.
setDescribeElectronic
(
ticketData
.
getString
(
"describe_electronic"
));
tickets
.
setDescribeElectronic
(
ticketData
.
getString
(
"describe_electronic"
));
tickets
.
setAdvanceMinuteMember
(
5
);
tickets
.
setAdvanceMinuteMember
(
5
);
...
@@ -345,7 +345,7 @@ public class DataImpl {
...
@@ -345,7 +345,7 @@ public class DataImpl {
ticketStatus
.
setSurplusExchange
(
ticketData
.
getInt
(
"surplus_exchange"
));
ticketStatus
.
setSurplusExchange
(
ticketData
.
getInt
(
"surplus_exchange"
));
ticketStatus
.
setExpressType
(
ticketData
.
getInt
(
"express_type"
));
ticketStatus
.
setExpressType
(
ticketData
.
getInt
(
"express_type"
));
ticketStatus
.
setIsTrueName
(
ticketData
.
getString
(
"need_id_card"
).
equals
(
"yes"
)
?
1
:
0
);
ticketStatus
.
setIsTrueName
(
ticketData
.
getString
(
"need_id_card"
).
equals
(
"yes"
)
?
1
:
0
);
ticketStatus
.
setLimitCount
(
0
);
ticketStatus
.
setLimitCount
(
ticketData
.
getInt
(
"num_limit_mobile"
)
);
ticketStatus
.
setMemberLimitCount
(
1
);
ticketStatus
.
setMemberLimitCount
(
1
);
ticketStatus
.
setIsTransfer
(
0
);
ticketStatus
.
setIsTransfer
(
0
);
ticketStatus
.
setIsExclusive
(
ticketData
.
getInt
(
"is_exclusive"
));
ticketStatus
.
setIsExclusive
(
ticketData
.
getInt
(
"is_exclusive"
));
...
@@ -443,7 +443,7 @@ public class DataImpl {
...
@@ -443,7 +443,7 @@ public class DataImpl {
public
boolean
order
(
String
month
)
{
public
boolean
order
(
String
month
)
{
String
driverClassName
=
"com.mysql.cj.jdbc.Driver"
;
//启动驱动
String
driverClassName
=
"com.mysql.cj.jdbc.Driver"
;
//启动驱动
String
url
=
"jdbc:mysql://
zhengzai
.mysql.polardb.rds.aliyuncs.com:3306/mall"
;
//设置连接路径
String
url
=
"jdbc:mysql://
pc-2ze6z2hxkug559q79
.mysql.polardb.rds.aliyuncs.com:3306/mall"
;
//设置连接路径
String
username
=
"readonly"
;
//数据库用户名
String
username
=
"readonly"
;
//数据库用户名
String
password
=
"ZWDsf8Fy"
;
//数据库连接密码
String
password
=
"ZWDsf8Fy"
;
//数据库连接密码
Connection
con
=
null
;
//连接
Connection
con
=
null
;
//连接
...
@@ -772,7 +772,7 @@ public class DataImpl {
...
@@ -772,7 +772,7 @@ public class DataImpl {
public
boolean
roadShow
()
{
public
boolean
roadShow
()
{
String
driverClassName
=
"com.mysql.cj.jdbc.Driver"
;
//启动驱动
String
driverClassName
=
"com.mysql.cj.jdbc.Driver"
;
//启动驱动
String
url
=
"jdbc:mysql://
zhengzai
.mysql.polardb.rds.aliyuncs.com:3306/mall"
;
//设置连接路径
String
url
=
"jdbc:mysql://
pc-2ze6z2hxkug559q79
.mysql.polardb.rds.aliyuncs.com:3306/mall"
;
//设置连接路径
String
username
=
"readonly"
;
//数据库用户名
String
username
=
"readonly"
;
//数据库用户名
String
password
=
"ZWDsf8Fy"
;
//数据库连接密码
String
password
=
"ZWDsf8Fy"
;
//数据库连接密码
Connection
con
=
null
;
//连接
Connection
con
=
null
;
//连接
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/utils/MongoVoUtils.java
View file @
2fc004f4
...
@@ -61,9 +61,9 @@ public class MongoVoUtils {
...
@@ -61,9 +61,9 @@ public class MongoVoUtils {
fields
.
setName
((
String
)
redisUtil
.
hget
(
KylinRedisConst
.
FIELDS
+
":"
+
p3
.
getFieldId
(),
"name"
));
fields
.
setName
((
String
)
redisUtil
.
hget
(
KylinRedisConst
.
FIELDS
+
":"
+
p3
.
getFieldId
(),
"name"
));
//相关状态时间初始变量
//相关状态时间初始变量
LocalDateTime
stopSellTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
"2030-12-01 12:00:00"
)
;
LocalDateTime
stopSellTime
=
null
;
LocalDateTime
sellTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
"2030-12-01 12:00:00"
)
;
LocalDateTime
sellTime
=
null
;
LocalDateTime
sellMemberTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
"2030-12-01 12:00:00"
)
;
LocalDateTime
sellMemberTime
=
null
;
int
isLackRegister
=
0
;
int
isLackRegister
=
0
;
int
isMember
=
0
;
int
isMember
=
0
;
...
@@ -132,13 +132,13 @@ public class MongoVoUtils {
...
@@ -132,13 +132,13 @@ public class MongoVoUtils {
price
=
kylinTicketVo
.
getPrice
();
price
=
kylinTicketVo
.
getPrice
();
}
}
}
}
if
((
stopSellTime
==
null
||
stopSellTime
.
isBefore
(
t1
.
getTimeEnd
()))
&&
(
t2
.
getStatus
()
>=
6
&&
t2
.
getStatus
()!=
7
))
{
if
((
stopSellTime
==
null
||
stopSellTime
.
isBefore
(
t1
.
getTimeEnd
()))
&&
(
t2
.
getStatus
()
>=
6
&&
t2
.
getStatus
()
!=
7
))
{
stopSellTime
=
t1
.
getTimeEnd
();
stopSellTime
=
t1
.
getTimeEnd
();
}
}
if
((
sellMemberTime
==
null
||
sellMemberTime
.
isAfter
(
t1
.
getTimeStart
().
plusMinutes
(-
t1
.
getAdvanceMinuteMember
())))
&&
(
t2
.
getStatus
()
>=
6
&&
t2
.
getStatus
()!=
7
))
{
if
((
sellMemberTime
==
null
||
sellMemberTime
.
isAfter
(
t1
.
getTimeStart
().
plusMinutes
(-
t1
.
getAdvanceMinuteMember
())))
&&
(
t2
.
getStatus
()
>=
6
&&
t2
.
getStatus
()
!=
7
))
{
sellMemberTime
=
t1
.
getTimeStart
().
plusMinutes
(-
t1
.
getAdvanceMinuteMember
());
sellMemberTime
=
t1
.
getTimeStart
().
plusMinutes
(-
t1
.
getAdvanceMinuteMember
());
}
}
if
((
sellTime
==
null
||
sellTime
.
isAfter
(
t1
.
getTimeStart
()))
&&
(
t2
.
getStatus
()
>=
6
&&
t2
.
getStatus
()!=
7
))
{
if
((
sellTime
==
null
||
sellTime
.
isAfter
(
t1
.
getTimeStart
()))
&&
(
t2
.
getStatus
()
>=
6
&&
t2
.
getStatus
()
!=
7
))
{
sellTime
=
t1
.
getTimeStart
();
sellTime
=
t1
.
getTimeStart
();
}
}
}
}
...
@@ -157,6 +157,16 @@ public class MongoVoUtils {
...
@@ -157,6 +157,16 @@ public class MongoVoUtils {
voData
.
setPerformanceStatus
(
p2
);
voData
.
setPerformanceStatus
(
p2
);
voData
.
setPerformanceRelations
(
p3
);
voData
.
setPerformanceRelations
(
p3
);
voData
.
setFieldsData
(
fields
,
cityName
);
voData
.
setFieldsData
(
fields
,
cityName
);
if
(
stopSellTime
==
null
)
{
stopSellTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
"2030-12-01 12:00:00"
);
}
if
(
sellTime
==
null
)
{
sellTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
"2030-12-01 12:00:00"
);
}
if
(
sellMemberTime
==
null
)
{
sellMemberTime
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
"2030-12-01 12:00:00"
);
}
voData
.
setTimePriceVipAndLack
(
isLackRegister
,
isMember
,
isExclusive
,
price
,
stopSellTime
,
sellMemberTime
,
sellTime
,
isAdvance
,
isDiscount
,
payCountdownMinute
);
voData
.
setTimePriceVipAndLack
(
isLackRegister
,
isMember
,
isExclusive
,
price
,
stopSellTime
,
sellMemberTime
,
sellTime
,
isAdvance
,
isDiscount
,
payCountdownMinute
);
voData
.
setTicketTimeList
(
timeList
);
voData
.
setTicketTimeList
(
timeList
);
voData
.
setAppStatus
(
p2
.
getStatus
());
voData
.
setAppStatus
(
p2
.
getStatus
());
...
...
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