记得上下班打卡 | 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
a5ec8525
Commit
a5ec8525
authored
Jul 13, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
d7c48029
da2ddd2c
Changes
30
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
521 additions
and
106 deletions
+521
-106
DragonConstant.java
...com/liquidnet/service/dragon/constant/DragonConstant.java
+3
-0
DragonPayNotifyReqDto.java
...m/liquidnet/service/dragon/dto/DragonPayNotifyReqDto.java
+35
-0
NotifyUrlDto.java
...n/java/com/liquidnet/service/dragon/dto/NotifyUrlDto.java
+25
-0
IDragonOrderRefundsService.java
...et/service/dragon/service/IDragonOrderRefundsService.java
+4
-3
IDragonOrdersService.java
...iquidnet/service/dragon/service/IDragonOrdersService.java
+3
-2
KylinRedisConst.java
...com/liquidnet/service/kylin/constant/KylinRedisConst.java
+4
-0
ZhengzaiAppVersionController.java
...ntroller/zhengzai/kylin/ZhengzaiAppVersionController.java
+3
-0
create.html
...s/templates/zhengzai/kylin/zhengzaiAppVersion/create.html
+2
-2
update.html
...s/templates/zhengzai/kylin/zhengzaiAppVersion/update.html
+2
-2
KylinZhengzaiAppVersionsServiceImpl.java
...lin/service/impl/KylinZhengzaiAppVersionsServiceImpl.java
+24
-4
liquidnet-service-dragon-dev.yml
...-config/liquidnet-config/liquidnet-service-dragon-dev.yml
+1
-2
ZhengzaiAppVersionsListDao.java
...quidnet/service/kylin/dao/ZhengzaiAppVersionsListDao.java
+1
-0
KylinZhengzaiAppVersionsMapper.java
.../service/kylin/mapper/KylinZhengzaiAppVersionsMapper.java
+1
-0
KylinZhengzaiAppVersionsMapper.xml
...t.service.kylin.mapper/KylinZhengzaiAppVersionsMapper.xml
+12
-0
AlipayStrategyAppImpl.java
...n/channel/alipay/strategy/impl/AlipayStrategyAppImpl.java
+3
-3
AlipayStrategyWapImpl.java
...n/channel/alipay/strategy/impl/AlipayStrategyWapImpl.java
+2
-2
AlipayUtil.java
...uidnet/service/dragon/channel/alipay/util/AlipayUtil.java
+18
-3
IPayChannelStrategy.java
.../service/dragon/channel/strategy/IPayChannelStrategy.java
+4
-0
PayChannelStrategyAlipayImpl.java
...n/channel/strategy/impl/PayChannelStrategyAlipayImpl.java
+23
-6
PayChannelStrategyApplepayImpl.java
...channel/strategy/impl/PayChannelStrategyApplepayImpl.java
+14
-8
PayChannelStrategyWepayImpl.java
...on/channel/strategy/impl/PayChannelStrategyWepayImpl.java
+32
-6
WePayRefundReturnCallBackDto.java
...agon/channel/wepay/resp/WePayRefundReturnCallBackDto.java
+21
-0
WePayRefundReturnCallBackInfoDto.java
.../channel/wepay/resp/WePayRefundReturnCallBackInfoDto.java
+35
-0
PayNotifyController.java
...uidnet/service/dragon/controller/PayNotifyController.java
+11
-23
RefundController.java
...liquidnet/service/dragon/controller/RefundController.java
+14
-15
DragonOrderRefundsServiceImpl.java
...ce/dragon/service/impl/DragonOrderRefundsServiceImpl.java
+135
-23
DragonOrdersServiceImpl.java
.../service/dragon/service/impl/DragonOrdersServiceImpl.java
+6
-0
PayWepayUtils.java
...ava/com/liquidnet/service/dragon/utils/PayWepayUtils.java
+29
-0
sqlmap.properties
...-service-dragon-impl/src/main/resources/sqlmap.properties
+4
-2
ZhengzaiAppVersionsController.java
...ntroller/basicServices/ZhengzaiAppVersionsController.java
+50
-0
No files found.
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/constant/DragonConstant.java
View file @
a5ec8525
...
...
@@ -15,6 +15,9 @@ public class DragonConstant {
public
static
final
String
REFUND_TYPE_JS_WEPAY
=
"JSWEPAY"
;
//,"微信内网页、微信公众号"),
public
static
final
String
REFUND_TYPE_APPLET_WEPAY
=
"APPLETWEPAY"
;
//,"微信小程序");
public
static
final
String
REFUND_REDIS_KET
=
"dragon:refund:refundCode:"
;
// 订单号对应回调地址
public
enum
PayChannelEnum
{
ALIPAY
(
"alipay"
,
"支付宝"
),
WEPAY
(
"wepay"
,
"微信"
),
...
...
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/dto/DragonPayNotifyReqDto.java
0 → 100644
View file @
a5ec8525
package
com
.
liquidnet
.
service
.
dragon
.
dto
;
import
lombok.Data
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: DragonPayNotifyReqDto
* @Package com.liquidnet.service.dragon.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/7/13 12:26
*/
@Data
public
class
DragonPayNotifyReqDto
{
//notify_id
private
String
notify_type
;
//notify_id
private
String
notify_id
;
private
String
notify_time
;
private
String
sign_type
;
private
String
sign
;
private
String
charge_amount
;
private
String
charge_flags
;
private
String
settlement_id
;
private
String
notify_action_type
;
private
String
current_seller_received_amount
;
private
String
seller_received_total_amount
;
private
String
total_from_seller_fee
;
private
String
ff_current_period
;
private
String
mdiscount_amount
;
private
String
discount_amount
;
private
String
hb_fq_pay_info
;
private
String
receipt_currency_type
;
}
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/dto/NotifyUrlDto.java
0 → 100644
View file @
a5ec8525
package
com
.
liquidnet
.
service
.
dragon
.
dto
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
NotifyUrlDto
implements
Serializable
{
private
Integer
status
;
// private String orderCode;
// private String code;
// private String type;
// private String price;
// private String paymentType;
// private String paymentAt;
// private String paymentId;
private
String
orderRefundCode
;
private
String
refundCode
;
private
String
refundPrice
;
// private String refundReason;
// private String refundType;
private
String
refundId
;
private
String
refundAt
;
private
String
refundError
;
}
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/service/IDragonOrderRefundsService.java
View file @
a5ec8525
...
...
@@ -3,12 +3,12 @@ package com.liquidnet.service.dragon.service;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.dragon.dto.DragonRefundAppDto
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.math.BigDecimal
;
public
interface
IDragonOrderRefundsService
{
void
sendRedisQueue
();
/**
*
* @param tradeNo => refundCode
...
...
@@ -20,7 +20,8 @@ public interface IDragonOrderRefundsService {
*/
ResponseDto
<
DragonRefundAppDto
>
dragonRefund
(
String
orderCode
,
String
tradeNo
,
String
outTradeNo
,
String
reason
,
String
returnUrl
,
BigDecimal
price
,
String
paymentType
,
String
paymentId
,
BigDecimal
priceTotal
);
ResponseDto
<
DragonRefundAppDto
>
wePayRefundCallBack
();
String
wePayRefundCallBack
(
HttpServletRequest
request
,
HttpServletResponse
response
);
}
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/service/IDragonOrdersService.java
View file @
a5ec8525
...
...
@@ -3,12 +3,13 @@ package com.liquidnet.service.dragon.service;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseReqDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseRespDto
;
import
com.liquidnet.service.dragon.dto.DragonRefundAppDto
;
import
java
.math.BigDecimal
;
import
java
x.servlet.http.HttpServletRequest
;
public
interface
IDragonOrdersService
{
void
sendRedisQueue
();
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
);
void
dragonNotify
(
HttpServletRequest
request
,
String
payType
,
String
deviceFrom
);
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/constant/KylinRedisConst.java
View file @
a5ec8525
...
...
@@ -39,4 +39,8 @@ public class KylinRedisConst {
public
static
final
String
WECHAT_SHARE_ACCESSTOKEN
=
"basicServices:accessToken:appid:"
;
public
static
final
String
WECHAT_SHARE_JSAPI_TICKET
=
"basicServices:jsapiTicket:appid:"
;
public
static
final
String
ZHENGZAI_APP_VERSIONS_ANDROID
=
"basicServices:zhengzaiAppVersionsAndroid"
;
public
static
final
String
ZHENGZAI_APP_VERSIONS_IOS
=
"basicServices:zhengzaiAppVersionsIos"
;
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/kylin/ZhengzaiAppVersionController.java
View file @
a5ec8525
...
...
@@ -34,6 +34,9 @@ public class ZhengzaiAppVersionController extends BaseController {
@Value
(
"${liquidnet.client.admin.platformUrl}"
)
private
String
platformUrl
;
@Value
(
"${liquidnet.al-oss.appUrl}"
)
private
String
appUrl
;
private
String
prefix
=
"zhengzai/kylin/zhengzaiAppVersion"
;
@Autowired
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/zhengzaiAppVersion/create.html
View file @
a5ec8525
...
...
@@ -42,7 +42,7 @@
</div>
</div>
</div>
<div
class=
"form-group"
>
<
!--<
div class="form-group">
<label class="col-sm-2 control-label">是否生产环境</label>
<div class="col-sm-10">
<div class="radio check-box">
...
...
@@ -56,7 +56,7 @@
</label>
</div>
</div>
</div>
</div>
-->
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
是否强制升级
</label>
<div
class=
"col-sm-10"
>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/zhengzaiAppVersion/update.html
View file @
a5ec8525
...
...
@@ -42,7 +42,7 @@
</div>
</div>
</div>
<div
class=
"form-group"
>
<
!--<
div class="form-group">
<label class="col-sm-2 control-label">是否生产环境</label>
<div class="col-sm-10">
<div class="radio check-box">
...
...
@@ -56,7 +56,7 @@
</label>
</div>
</div>
</div>
</div>
-->
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
是否强制升级
</label>
<div
class=
"col-sm-10"
>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/service/impl/KylinZhengzaiAppVersionsServiceImpl.java
View file @
a5ec8525
...
...
@@ -8,6 +8,7 @@ import com.liquidnet.common.cache.redis.util.RedisUtil;
import
com.liquidnet.commons.lang.util.BeanUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.kylin.constant.KylinRedisConst
;
import
com.liquidnet.service.kylin.dao.ZhengzaiAppVersionsListDao
;
import
com.liquidnet.service.kylin.dto.param.ZhengzaiAppVersionsParam
;
import
com.liquidnet.service.kylin.dto.param.admin.ZhengzaiAppVersionsSearchParam
;
...
...
@@ -20,7 +21,6 @@ import com.liquidnet.service.kylin.service.admin.IKylinBannersService;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
...
...
@@ -55,7 +55,7 @@ public class KylinZhengzaiAppVersionsServiceImpl extends ServiceImpl<KylinBanner
KylinZhengzaiAppVersions
kylinZhengzaiAppVersions
=
new
KylinZhengzaiAppVersions
();
BeanUtils
.
copyProperties
(
zhengzaiAppVersionsParam
,
kylinZhengzaiAppVersions
);
kylinZhengzaiAppVersionsMapper
.
insert
(
kylinZhengzaiAppVersions
);
getLastInfo
();
return
true
;
}
catch
(
Exception
e
)
{
return
false
;
...
...
@@ -70,7 +70,7 @@ public class KylinZhengzaiAppVersionsServiceImpl extends ServiceImpl<KylinBanner
KylinZhengzaiAppVersions
kylinZhengzaiAppVersions
=
new
KylinZhengzaiAppVersions
();
BeanUtils
.
copyProperties
(
zhengzaiAppVersionsParam
,
kylinZhengzaiAppVersions
);
kylinZhengzaiAppVersionsMapper
.
update
(
kylinZhengzaiAppVersions
,
new
UpdateWrapper
<
KylinZhengzaiAppVersions
>().
eq
(
"zhengzai_app_versions_id"
,
zhengzaiAppVersionsId
));
getLastInfo
();
return
true
;
}
catch
(
Exception
e
)
{
return
false
;
...
...
@@ -113,11 +113,31 @@ public class KylinZhengzaiAppVersionsServiceImpl extends ServiceImpl<KylinBanner
kylinZhengzaiAppVersions
,
new
UpdateWrapper
<
KylinZhengzaiAppVersions
>().
in
(
"zhengzai_app_versions_id"
,
zhengzaiAppVersionsIds
)
);
getLastInfo
();
return
true
;
}
catch
(
Exception
e
)
{
return
false
;
}
}
public
boolean
getLastInfo
()
{
// 因为有可能之前是ios 改成 android 如果单独处理一个会有问题 所以每次处理
ZhengzaiAppVersionsListDao
infoIos
=
kylinZhengzaiAppVersionsMapper
.
getLastInfo
(
1
);
ZhengzaiAppVersionsListDao
infoAndroid
=
kylinZhengzaiAppVersionsMapper
.
getLastInfo
(
2
);
ZhengzaiAppVersionsVo
zhengzaiAppVersionsVo
=
new
ZhengzaiAppVersionsVo
();
redisUtil
.
del
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_IOS
);
if
(
null
!=
infoIos
)
{
BeanUtils
.
copyProperties
(
infoIos
,
zhengzaiAppVersionsVo
);
redisUtil
.
set
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_IOS
,
zhengzaiAppVersionsVo
);
}
redisUtil
.
del
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_ANDROID
);
if
(
null
!=
infoAndroid
)
{
String
newPath
=
appUrl
+
infoAndroid
.
getFilePath
();
infoAndroid
.
setFilePath
(
newPath
);
BeanUtils
.
copyProperties
(
infoAndroid
,
zhengzaiAppVersionsVo
);
redisUtil
.
set
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_ANDROID
,
zhengzaiAppVersionsVo
);
}
return
true
;
}
}
liquidnet-bus-config/liquidnet-config/liquidnet-service-dragon-dev.yml
View file @
a5ec8525
...
...
@@ -23,12 +23,11 @@ liquidnet:
sslEnabled
:
false
database
:
dev_ln_scene
dragon
:
url
:
https://devdragon.zhengzai.tv/dragon
alipay
:
gataway-url
:
https://openapi.alipay.com/gateway.do
notify-url
:
https://testdragon.zhengzai.tv/dragon/notify/alipay
wepay
:
gataway-url
:
https://openapi.alipay.com/gateway.do
notify-url
:
https://testdragon.zhengzai.tv/dragon/notify/wepay
merchantId
:
1551961491
appId
:
wx3498304dda39c5a1
parentKey
:
itIuO65O9yKmemOu3S8g1S4orqvCGwXK
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/dao/ZhengzaiAppVersionsListDao.java
View file @
a5ec8525
...
...
@@ -19,6 +19,7 @@ public class ZhengzaiAppVersionsListDao implements Serializable {
private
Integer
type
;
private
Integer
isProduction
;
private
Integer
isForce
;
private
Integer
isDeleted
;
private
Integer
status
;
private
String
content
;
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/mapper/KylinZhengzaiAppVersionsMapper.java
View file @
a5ec8525
...
...
@@ -19,4 +19,5 @@ public interface KylinZhengzaiAppVersionsMapper extends BaseMapper<KylinZhengzai
List
<
ZhengzaiAppVersionsListDao
>
searchList
(
Map
<
String
,
Object
>
convertBeanToMap
);
ZhengzaiAppVersionsListDao
getLastInfo
(
Integer
type
);
}
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/resources/com.liquidnet.service.kylin.mapper/KylinZhengzaiAppVersionsMapper.xml
View file @
a5ec8525
...
...
@@ -12,5 +12,17 @@
</where>
ORDER BY mid DESC
</select>
<select
id=
"getLastInfo"
resultType=
"com.liquidnet.service.kylin.dao.ZhengzaiAppVersionsListDao"
>
SELECT *
FROM kylin_zhengzai_app_versions
<where>
is_deleted = 1
<if
test=
"type != ''"
>
AND type = ${type}
</if>
</where>
ORDER BY mid DESC
LIMIT 1
</select>
</mapper>
\ No newline at end of file
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/alipay/strategy/impl/AlipayStrategyAppImpl.java
View file @
a5ec8525
...
...
@@ -26,10 +26,10 @@ import java.util.Map;
@Component
@StrategyAlipayHandler
(
DragonConstant
.
DeviceFromEnum
.
APP
)
public
class
AlipayStrategyAppImpl
extends
AbstractAlipayStrategy
{
@Value
(
"${liquidnet.dragon.
alipay.gataway-
url}"
)
@Value
(
"${liquidnet.dragon.url}"
)
private
String
alipayGatewayUrl
;
@Value
(
"${liquidnet.dragon.
alipay.notify-
url}"
)
@Value
(
"${liquidnet.dragon.url}"
)
private
String
notifyUrl
;
@Autowired
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/alipay/strategy/impl/AlipayStrategyWapImpl.java
View file @
a5ec8525
...
...
@@ -26,10 +26,10 @@ import java.util.Map;
@Service
@StrategyAlipayHandler
(
DragonConstant
.
DeviceFromEnum
.
WAP
)
public
class
AlipayStrategyWapImpl
extends
AbstractAlipayStrategy
{
@Value
(
"${liquidnet.dragon.
alipay.gataway-
url}"
)
@Value
(
"${liquidnet.dragon.url}"
)
private
String
alipayGatewayUrl
;
@Value
(
"${liquidnet.dragon.
alipay.notify-
url}"
)
@Value
(
"${liquidnet.dragon.url}"
)
private
String
notifyUrl
;
@Autowired
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/alipay/util/AlipayUtil.java
View file @
a5ec8525
...
...
@@ -27,9 +27,7 @@ import com.liquidnet.service.dragon.channel.alipay.sign.MD5;
import
com.liquidnet.service.dragon.utils.PayAlipayUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
java.util.Map
;
import
java.util.SortedMap
;
import
java.util.TreeMap
;
import
java.util.*
;
@Slf4j
public
class
AlipayUtil
{
...
...
@@ -150,5 +148,22 @@ public class AlipayUtil {
}
return
MD5
.
sign
(
signBuilder
.
substring
(
0
,
signBuilder
.
length
()
-
1
),
key
,
"UTF-8"
);
}
public
static
Map
<
String
,
String
>
parseNotifyMsg
(
Map
<
String
,
String
[]>
requestParams
){
Map
<
String
,
String
>
params
=
new
HashMap
<
String
,
String
>();
for
(
Iterator
iter
=
requestParams
.
keySet
().
iterator
();
iter
.
hasNext
();)
{
String
name
=
(
String
)
iter
.
next
();
String
[]
values
=
requestParams
.
get
(
name
);
String
valueStr
=
""
;
for
(
int
i
=
0
;
i
<
values
.
length
;
i
++)
{
valueStr
=
(
i
==
values
.
length
-
1
)
?
valueStr
+
values
[
i
]
:
valueStr
+
values
[
i
]
+
","
;
}
params
.
put
(
name
,
valueStr
);
}
return
params
;
}
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/IPayChannelStrategy.java
View file @
a5ec8525
...
...
@@ -4,6 +4,8 @@ import com.liquidnet.service.base.ResponseDto;
import
com.liquidnet.service.dragon.dto.DragonPayBaseReqDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseRespDto
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
...
...
@@ -16,4 +18,6 @@ import com.liquidnet.service.dragon.dto.DragonPayBaseRespDto;
*/
public
interface
IPayChannelStrategy
{
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
);
void
dragonNotify
(
HttpServletRequest
request
,
String
payType
,
String
deviceFrom
);
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/impl/PayChannelStrategyAlipayImpl.java
View file @
a5ec8525
package
com
.
liquidnet
.
service
.
dragon
.
channel
.
strategy
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.dragon.channel.alipay.strategy.AlipayStrategyContext
;
import
com.liquidnet.service.dragon.channel.alipay.util.AlipayUtil
;
import
com.liquidnet.service.dragon.channel.strategy.IPayChannelStrategy
;
import
com.liquidnet.service.dragon.channel.strategy.annotation.StrategyPayChannelHandler
;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseReqDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseRespDto
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author AnJiabin <
jiabin.an@lightnet.io
>
* @author AnJiabin <
anjiabin@zhengzai.tv
>
* @version V1.0
* @Description:
currencyCloud
* @class:
CurrencyCloudGetFundDataStrateg
yImpl
* @Package com.liquidnet.service.
reconciliation.strategy.transtype
.impl
* @Copyright: LightNet @ Copyright (c) 202
0
* @date 202
0/10/27 14:58
* @Description:
TODO
* @class:
PayChannelStrategyAlipa
yImpl
* @Package com.liquidnet.service.
dragon.channel.strategy
.impl
* @Copyright: LightNet @ Copyright (c) 202
1
* @date 202
1/7/13 13:06
*/
@Slf4j
@Component
@StrategyPayChannelHandler
(
DragonConstant
.
PayChannelEnum
.
ALIPAY
)
public
class
PayChannelStrategyAlipayImpl
implements
IPayChannelStrategy
{
...
...
@@ -29,4 +37,13 @@ public class PayChannelStrategyAlipayImpl implements IPayChannelStrategy {
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
)
{
return
alipayStrategyContext
.
getStrategy
(
dragonPayBaseReqDto
.
getDeviceFrom
()).
dragonPay
(
dragonPayBaseReqDto
);
}
@Override
public
void
dragonNotify
(
HttpServletRequest
request
,
String
payType
,
String
deviceFrom
)
{
Map
<
String
,
String
[]>
requestParams
=
request
.
getParameterMap
();
Map
<
String
,
String
>
notifyMap
=
new
HashMap
<
String
,
String
>();
notifyMap
=
AlipayUtil
.
parseNotifyMsg
(
requestParams
);
log
.
info
(
"dragonNotify-->alipay json : {}"
,
JSON
.
toJSONString
(
notifyMap
));
}
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/impl/PayChannelStrategyApplepayImpl.java
View file @
a5ec8525
...
...
@@ -6,20 +6,21 @@ import com.liquidnet.service.dragon.channel.strategy.annotation.StrategyPayChann
import
com.liquidnet.service.dragon.constant.DragonConstant
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseReqDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseRespDto
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author AnJiabin <
jiabin.an@lightnet.io
>
* @author AnJiabin <
anjiabin@zhengzai.tv
>
* @version V1.0
* @Description:
liquidnet-wallet
* @class:
LiquidnetWalletGetFundDataStrateg
yImpl
* @Package com.liquidnet.service.
reconciliation.strategy.transtype
.impl
* @Copyright: LightNet @ Copyright (c) 202
0
* @date 202
0/10/27 14:58
* @Description:
TODO
* @class:
PayChannelStrategyApplepa
yImpl
* @Package com.liquidnet.service.
dragon.channel.strategy
.impl
* @Copyright: LightNet @ Copyright (c) 202
1
* @date 202
1/7/13 13:06
*/
@Slf4j
@Component
@StrategyPayChannelHandler
(
DragonConstant
.
PayChannelEnum
.
APPLEPAY
)
public
class
PayChannelStrategyApplepayImpl
implements
IPayChannelStrategy
{
...
...
@@ -28,4 +29,9 @@ public class PayChannelStrategyApplepayImpl implements IPayChannelStrategy {
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
)
{
return
null
;
}
@Override
public
void
dragonNotify
(
HttpServletRequest
request
,
String
payType
,
String
deviceFrom
)
{
}
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/impl/PayChannelStrategyWepayImpl.java
View file @
a5ec8525
package
com
.
liquidnet
.
service
.
dragon
.
channel
.
strategy
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.dragon.channel.strategy.IPayChannelStrategy
;
import
com.liquidnet.service.dragon.channel.strategy.annotation.StrategyPayChannelHandler
;
import
com.liquidnet.service.dragon.channel.wepay.strategy.WepayStrategyContext
;
import
com.liquidnet.service.dragon.channel.wepay.util.WepayUtil
;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseReqDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseRespDto
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author AnJiabin <
jiabin.an@lightnet.io
>
* @author AnJiabin <
anjiabin@zhengzai.tv
>
* @version V1.0
* @Description:
liquidnet-wallet
* @class:
LiquidnetWalletGetFundDataStrateg
yImpl
* @Package com.liquidnet.service.
reconciliation.strategy.transtype
.impl
* @Copyright: LightNet @ Copyright (c) 202
0
* @date 202
0/10/27 14:58
* @Description:
TODO
* @class:
PayChannelStrategyWepa
yImpl
* @Package com.liquidnet.service.
dragon.channel.strategy
.impl
* @Copyright: LightNet @ Copyright (c) 202
1
* @date 202
1/7/13 13:06
*/
@Slf4j
@Component
@StrategyPayChannelHandler
(
DragonConstant
.
PayChannelEnum
.
WEPAY
)
public
class
PayChannelStrategyWepayImpl
implements
IPayChannelStrategy
{
...
...
@@ -29,4 +39,20 @@ public class PayChannelStrategyWepayImpl implements IPayChannelStrategy {
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
)
{
return
wepayStrategyContext
.
getStrategy
(
dragonPayBaseReqDto
.
getDeviceFrom
()).
dragonPay
(
dragonPayBaseReqDto
);
}
@Override
public
void
dragonNotify
(
HttpServletRequest
request
,
String
payType
,
String
deviceFrom
)
{
try
{
InputStream
inputStream
=
request
.
getInputStream
();
// 从request中取得输入流
Map
<
String
,
String
>
notifyMap
=
new
HashMap
<
String
,
String
>();
try
{
notifyMap
=
WepayUtil
.
parseXml
(
inputStream
);
log
.
info
(
"dragonNotify-->wepay json : {}"
,
JSON
.
toJSONString
(
notifyMap
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/resp/WePayRefundReturnCallBackDto.java
0 → 100644
View file @
a5ec8525
package
com
.
liquidnet
.
service
.
dragon
.
channel
.
wepay
.
resp
;
import
com.thoughtworks.xstream.annotations.XStreamAlias
;
import
lombok.Data
;
@Data
@XStreamAlias
(
"xml"
)
public
class
WePayRefundReturnCallBackDto
{
@XStreamAlias
(
"return_code"
)
private
String
returnCode
;
@XStreamAlias
(
"return_msg"
)
private
String
returnMsg
;
@XStreamAlias
(
"appid"
)
private
String
appId
;
@XStreamAlias
(
"mch_id"
)
private
String
mchId
;
@XStreamAlias
(
"nonce_str"
)
private
String
nonceStr
;
@XStreamAlias
(
"req_info"
)
private
String
reqInfo
;
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/resp/WePayRefundReturnCallBackInfoDto.java
0 → 100644
View file @
a5ec8525
package
com
.
liquidnet
.
service
.
dragon
.
channel
.
wepay
.
resp
;
import
com.thoughtworks.xstream.annotations.XStreamAlias
;
import
lombok.Data
;
@Data
@XStreamAlias
(
"xml"
)
public
class
WePayRefundReturnCallBackInfoDto
{
@XStreamAlias
(
"out_refund_no"
)
private
String
outRefundNo
;
@XStreamAlias
(
"out_trade_no"
)
private
String
outTradeNo
;
@XStreamAlias
(
"refund_account"
)
private
String
refundAccount
;
@XStreamAlias
(
"refund_fee"
)
private
String
refundFee
;
@XStreamAlias
(
"refund_id"
)
private
String
refundId
;
@XStreamAlias
(
"refund_recv_accout"
)
private
String
refundRecvAccout
;
@XStreamAlias
(
"refund_request_source"
)
private
String
refundRequestSource
;
@XStreamAlias
(
"refund_status"
)
private
String
refundStatus
;
@XStreamAlias
(
"settlement_refund_fee"
)
private
String
settlementRefundFee
;
@XStreamAlias
(
"settlement_total_fee"
)
private
String
settlementTotalFee
;
@XStreamAlias
(
"success_time"
)
private
String
successTime
;
@XStreamAlias
(
"total_fee"
)
private
String
totalFee
;
@XStreamAlias
(
"transaction_id"
)
private
String
transactionId
;
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/controller/PayNotifyController.java
View file @
a5ec8525
package
com
.
liquidnet
.
service
.
dragon
.
controller
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseRespDto
;
import
com.liquidnet.service.dragon.service.IDragonOrdersService
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.constraints.NotNull
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
...
...
@@ -23,34 +24,21 @@ import javax.validation.constraints.NotNull;
* @date 2021/7/11 23:35
*/
@RestController
@RequestMapping
(
"
pa
y"
)
@RequestMapping
(
"
notif
y"
)
public
class
PayNotifyController
{
@Autowired
private
IDragonOrdersService
dragonOrdersService
;
/**
* 支付宝支付回调
* @return
*/
@PostMapping
(
"/
notify/alipay
"
)
@PostMapping
(
"/
{payType}/{deviceFrom}
"
)
@ApiOperation
(
"支付宝支付回调"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"payType"
,
value
=
"支付类型:alipay,wepay,iappay"
,
example
=
"alipay"
)
})
public
ResponseDto
<
DragonPayBaseRespDto
>
notifyAlipay
(
@RequestParam
(
value
=
"payType"
)
@NotNull
(
message
=
"支付类型不能为空"
)
String
payType
){
return
null
;
}
/**
* 微信支付回调
* @return
*/
@PostMapping
(
"/notify/wepay"
)
@ApiOperation
(
"支付宝支付回调"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"payType"
,
value
=
"支付类型:alipay,wepay,iappay"
,
example
=
"alipay"
)
})
public
ResponseDto
<
DragonPayBaseRespDto
>
notifyWepay
(
@RequestParam
(
value
=
"payType"
)
@NotNull
(
message
=
"支付类型不能为空"
)
String
payType
){
return
null
;
public
void
dragonNotify
(
@PathVariable
(
"payType"
)
String
payType
,
@PathVariable
(
"deviceFrom"
)
String
deviceFrom
,
HttpServletRequest
request
,
HttpServletResponse
respone
)
throws
Exception
{
dragonOrdersService
.
dragonNotify
(
request
,
payType
,
deviceFrom
);
}
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/controller/RefundController.java
View file @
a5ec8525
...
...
@@ -3,14 +3,18 @@ package com.liquidnet.service.dragon.controller;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.dragon.dto.DragonRefundAppDto
;
import
com.liquidnet.service.dragon.service.IDragonOrderRefundsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
@Api
(
tags
=
"退款"
)
@RestController
@RequestMapping
(
"refund"
)
public
class
RefundController
{
...
...
@@ -18,21 +22,6 @@ public class RefundController {
@Autowired
IDragonOrderRefundsService
orderRefundsService
;
@PostMapping
(
"preTest"
)
@ApiOperation
(
"微信退款"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
String
>
checkCanOrder
()
{
orderRefundsService
.
sendRedisQueue
();
return
ResponseDto
.
success
();
}
@PostMapping
(
"refundAliPay"
)
@ApiOperation
(
"支付宝退款"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
String
>
refundAliPay
()
{
return
ResponseDto
.
success
();
}
@PostMapping
(
"refundSingle"
)
@ApiOperation
(
"单条退款"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
...
...
@@ -47,4 +36,14 @@ public class RefundController {
@RequestParam
(
value
=
"paymentId"
)
@NotNull
(
message
=
"支付订单号不能为空"
)
String
paymentId
)
{
return
orderRefundsService
.
dragonRefund
(
orderCode
,
code
,
orderRefundCode
,
reason
,
returnUrl
,
price
,
paymentType
,
paymentId
,
priceTotal
);
}
@PostMapping
(
"callBack/wepay"
)
@ApiOperation
(
"微信退款回调"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
String
refundSingle
(
@RequestParam
(
value
=
"request"
)
HttpServletRequest
request
,
@RequestParam
(
value
=
"response"
)
HttpServletResponse
response
)
{
return
orderRefundsService
.
wePayRefundCallBack
(
request
,
response
);
}
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrderRefundsServiceImpl.java
View file @
a5ec8525
This diff is collapsed.
Click to expand it.
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrdersServiceImpl.java
View file @
a5ec8525
...
...
@@ -13,6 +13,7 @@ import org.springframework.data.redis.connection.stream.StreamRecords;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.HashMap
;
@Slf4j
...
...
@@ -42,4 +43,9 @@ public class DragonOrdersServiceImpl implements IDragonOrdersService {
dragonPayBaseReqDto
.
setCode
(
IDGenerator
.
payCode
());
return
payChannelStrategyContext
.
getStrategy
(
dragonPayBaseReqDto
.
getPayType
()).
dragonPay
(
dragonPayBaseReqDto
);
}
@Override
public
void
dragonNotify
(
HttpServletRequest
request
,
String
payType
,
String
deviceFrom
)
{
payChannelStrategyContext
.
getStrategy
(
payType
).
dragonNotify
(
request
,
payType
,
deviceFrom
);
}
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/utils/PayWepayUtils.java
View file @
a5ec8525
...
...
@@ -7,12 +7,16 @@ import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.HttpClients
;
import
org.apache.http.ssl.SSLContexts
;
import
org.bouncycastle.jce.provider.BouncyCastleProvider
;
import
org.dom4j.DocumentException
;
import
javax.crypto.Cipher
;
import
javax.crypto.spec.SecretKeySpec
;
import
javax.net.ssl.SSLContext
;
import
java.io.ByteArrayInputStream
;
import
java.io.InputStream
;
import
java.security.KeyStore
;
import
java.security.Security
;
import
java.util.*
;
public
class
PayWepayUtils
{
...
...
@@ -118,4 +122,29 @@ public class PayWepayUtils {
sb
.
append
(
"</xml>"
);
return
sb
.
toString
();
}
public
String
unCodeReqInfo
(
String
reqInfo
)
{
try
{
Cipher
cipher
;
String
key
=
MD5Utils
.
md5
(
parentKey
);
SecretKeySpec
secretKeySpec
=
new
SecretKeySpec
(
key
.
getBytes
(),
"AES"
);
Security
.
addProvider
(
new
BouncyCastleProvider
());
cipher
=
Cipher
.
getInstance
(
"AES/ECB/PKCS7Padding"
);
cipher
.
init
(
Cipher
.
DECRYPT_MODE
,
secretKeySpec
);
Base64
.
Decoder
decoder
=
Base64
.
getDecoder
();
byte
[]
base64ByteArr
=
decoder
.
decode
(
reqInfo
);
String
result
=
new
String
(
cipher
.
doFinal
(
base64ByteArr
));
return
result
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
""
;
}
}
// public static void main(String[] args) {
// PayWepayUtils a = new PayWepayUtils();
// System.out.println(a.unCodeReqInfo());
// }
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/resources/sqlmap.properties
View file @
a5ec8525
# ------------------------创建退款订单----------------------------
dragon_order_refund.insert
=
INSERT INTO `dragon_order_refunds`(`order_refund_id`,`code` ,`order_refund_code` ,`price` ,`reason` ,`notify_url` ,`refund_type`,`created_at`,`updated_at`)VALUES(?,?,?,?,?,?,?,?,?);
# ------------------------修改退款订单----------------------------
dragon_order_refund_error.update
=
UPDATE `dragon_order_refunds` SET updated_at = ? , refund_error=? , status=? WHERE order_refund_id = ?
dragon_order_refund_success.update
=
UPDATE `dragon_order_refunds` SET updated_at = ? , refund_at=? , status=? WHERE order_refund_id = ?
dragon_order_refund_error.update
=
UPDATE `dragon_order_refunds` SET updated_at = ? , refund_error=? , status=? WHERE order_refund_code = ?
dragon_order_refund_success.update
=
UPDATE `dragon_order_refunds` SET updated_at = ? , refund_at=? , status=? WHERE order_refund_code = ?
dragon_order_refund_call_back.update
=
UPDATE `dragon_order_refunds` SET updated_at = ? , finished_at=? , status=? WHERE order_refund_code = ?
# ------------------------创建退款订单日志----------------------------
dragon_order_refund_log.insert
=
INSERT INTO `dragon_order_refunds`(`order_refund_id` ,`refund_type` ,`content`,`created_at`,`updated_at`)VALUES(?,?,?,?,?);
dragon_orders.insert
=
INSERT INTO DRAGON_ORDERS (ID, STATUS, CODE, TYPE, PRICE, NAME, DETAIL, ORDER_CODE, CLIENT_IP, NOTIFY_URL, PAYMENT_TYPE,PAYMENT_ID, PAYMENT_AT, FINISHED_AT, CREATED_AT, UPDATED_AT, DELETED_AT)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
dragon_order_logs.insert
=
INSERT INTO DRAGON_ORDER_LOGS (ID, ORDER_ID, PAYMENT_TYPE, CONTENT, CREATED_AT, UPDATED_AT, DELETED_AT) VALUES(?,?,?,?,?,?,?)
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/basicServices/ZhengzaiAppVersionsController.java
0 → 100644
View file @
a5ec8525
package
com
.
liquidnet
.
service
.
platform
.
controller
.
basicServices
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.service.kylin.constant.KylinRedisConst
;
import
com.liquidnet.service.kylin.dto.vo.admin.ZhengzaiAppVersionsVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 获取最新的正在现场App版本控制
* </p>
*
* @author jiangxiulong
* @since 2021-07-09
*/
@Api
(
tags
=
"basicServices"
)
@RestController
@RequestMapping
(
"basicServices/ZhengzaiAppVersions"
)
public
class
ZhengzaiAppVersionsController
{
@Autowired
private
RedisUtil
redisUtil
;
@PostMapping
(
"/last"
)
@ApiOperation
(
"获取最新版本信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"上传类型 1-IOS 2-Android"
,
required
=
true
),
// @ApiImplicitParam(type = "query", dataType = "Integer", name = "isProduction", value = "是否是生产环境,1是 2否", required = true),
})
// public ZhengzaiAppVersionsVo lastInfo(@RequestParam Integer type, @RequestParam Integer isProduction) {
public
ZhengzaiAppVersionsVo
lastInfo
(
@RequestParam
Integer
type
)
{
ZhengzaiAppVersionsVo
info
=
null
;
if
(
1
==
type
)
{
info
=
(
ZhengzaiAppVersionsVo
)
redisUtil
.
get
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_IOS
);
}
else
if
(
2
==
type
)
{
info
=
(
ZhengzaiAppVersionsVo
)
redisUtil
.
get
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_ANDROID
);
}
return
info
;
}
}
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