Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
fb5c4749
Commit
fb5c4749
authored
Dec 20, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-auto-pay'
parents
33675910
d2f1efac
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
70 additions
and
111 deletions
+70
-111
BaseUserMemberExport.java
...b/wxiaoqi/security/admin/entity/BaseUserMemberExport.java
+2
-0
MyWalletCath.java
...om/github/wxiaoqi/security/admin/entity/MyWalletCath.java
+10
-4
UserFeign.java
...va/com/github/wxiaoqi/security/admin/feign/UserFeign.java
+2
-1
AppUserAlipayBiz.java
...m/github/wxiaoqi/security/admin/biz/AppUserAlipayBiz.java
+12
-10
BaseUserMemberExportBiz.java
...b/wxiaoqi/security/admin/biz/BaseUserMemberExportBiz.java
+8
-4
MyWalletBiz.java
...va/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
+7
-6
BaseUserMemberExportMapper.java
...oqi/security/admin/mapper/BaseUserMemberExportMapper.java
+1
-1
MyWalletController.java
...ithub/wxiaoqi/security/admin/rest/MyWalletController.java
+3
-2
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+1
-1
BaseUserMemberExportMapper.xml
.../src/main/resources/mapper/BaseUserMemberExportMapper.xml
+2
-1
MyWalletCathMapper.xml
...ce-admin/src/main/resources/mapper/MyWalletCathMapper.xml
+0
-1
WXSuppToUserPay.java
...m/xxfc/platform/universal/weixin/api/WXSuppToUserPay.java
+16
-73
OrderPayBiz.java
...ain/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
+1
-1
WithDrawMqHandler.java
...om/xxfc/platform/universal/handler/WithDrawMqHandler.java
+5
-6
apiclient_cert.p12
...xx-universal-server/src/main/resources/apiclient_cert.p12
+0
-0
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/BaseUserMemberExport.java
View file @
fb5c4749
...
@@ -21,6 +21,8 @@ import java.io.Serializable;
...
@@ -21,6 +21,8 @@ import java.io.Serializable;
public
class
BaseUserMemberExport
implements
Serializable
{
public
class
BaseUserMemberExport
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
Integer
id
;
private
Integer
id
;
@Column
(
name
=
"user_id"
)
private
Integer
userId
;
private
String
username
;
private
String
username
;
@Column
(
name
=
"member_level"
)
@Column
(
name
=
"member_level"
)
private
Integer
memberLevel
;
private
Integer
memberLevel
;
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/MyWalletCath.java
View file @
fb5c4749
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
;
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Column
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
/**
* 钱包提现表
* 钱包提现表
...
@@ -134,4 +137,7 @@ public class MyWalletCath implements Serializable {
...
@@ -134,4 +137,7 @@ public class MyWalletCath implements Serializable {
@Column
(
name
=
"offline_way"
)
@Column
(
name
=
"offline_way"
)
@ApiModelProperty
(
value
=
"线下提现方式 1:自动 2:手动"
)
@ApiModelProperty
(
value
=
"线下提现方式 1:自动 2:手动"
)
private
Integer
offlineWay
;
private
Integer
offlineWay
;
@Column
(
name
=
"real_reason"
)
private
String
realReason
;
}
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/feign/UserFeign.java
View file @
fb5c4749
...
@@ -161,7 +161,8 @@ public interface UserFeign {
...
@@ -161,7 +161,8 @@ public interface UserFeign {
public
ObjectRestResponse
<
Void
>
withDrawprocess
(
@RequestParam
(
value
=
"orderNo"
)
String
orderNo
,
public
ObjectRestResponse
<
Void
>
withDrawprocess
(
@RequestParam
(
value
=
"orderNo"
)
String
orderNo
,
@RequestParam
(
value
=
"cono"
,
required
=
false
)
String
cono
,
@RequestParam
(
value
=
"cono"
,
required
=
false
)
String
cono
,
@RequestParam
(
value
=
"reason"
,
required
=
false
)
String
reason
,
@RequestParam
(
value
=
"reason"
,
required
=
false
)
String
reason
,
@RequestParam
(
value
=
"isSuccess"
)
Boolean
isSuccess
);
@RequestParam
(
value
=
"isSuccess"
)
Boolean
isSuccess
,
@RequestParam
(
value
=
"realReason"
,
required
=
false
)
String
realReason
);
/**
/**
* 通过公司id,获取员工的下级用户id
* 通过公司id,获取员工的下级用户id
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserAlipayBiz.java
View file @
fb5c4749
...
@@ -4,6 +4,8 @@ import cn.hutool.core.bean.BeanUtil;
...
@@ -4,6 +4,8 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.wxiaoqi.security.admin.entity.AppUserAlipay
;
import
com.github.wxiaoqi.security.admin.entity.AppUserAlipay
;
import
com.github.wxiaoqi.security.admin.entity.AppUserDetail
;
import
com.github.wxiaoqi.security.admin.entity.AppUserLogin
;
import
com.github.wxiaoqi.security.admin.mapper.AppUserAlipayMapper
;
import
com.github.wxiaoqi.security.admin.mapper.AppUserAlipayMapper
;
import
com.github.wxiaoqi.security.auth.client.config.UserAuthConfig
;
import
com.github.wxiaoqi.security.auth.client.config.UserAuthConfig
;
import
com.github.wxiaoqi.security.auth.client.jwt.UserAuthUtil
;
import
com.github.wxiaoqi.security.auth.client.jwt.UserAuthUtil
;
...
@@ -94,16 +96,16 @@ public class AppUserAlipayBiz extends BaseBiz<AppUserAlipayMapper, AppUserAlipay
...
@@ -94,16 +96,16 @@ public class AppUserAlipayBiz extends BaseBiz<AppUserAlipayMapper, AppUserAlipay
appUserAlipays
.
add
(
appUserAlipay
);
appUserAlipays
.
add
(
appUserAlipay
);
}
}
//微信
//微信
//
AppUserLogin appUserLogin = appUserLoginBiz.getUserById(userId);
AppUserLogin
appUserLogin
=
appUserLoginBiz
.
getUserById
(
userId
);
//
if(appUserLogin != null && StringUtils.isNotBlank(appUserLogin.getWxOpenid())) {
if
(
appUserLogin
!=
null
&&
StringUtils
.
isNotBlank
(
appUserLogin
.
getWxOpenid
()))
{
//
AppUserDetail appUserDetail = appUserDetailBiz.getUserByUserid(userId);
AppUserDetail
appUserDetail
=
appUserDetailBiz
.
getUserByUserid
(
userId
);
//
AppUserAlipay wxAppUser = new AppUserAlipay();
AppUserAlipay
wxAppUser
=
new
AppUserAlipay
();
// wxAppUser.setType(2
);
wxAppUser
.
setType
(
0
);
//
wxAppUser.setUserId(userId);
wxAppUser
.
setUserId
(
userId
);
//
wxAppUser.setNickname(StringUtils.isEmpty(appUserDetail.getWxNickname())?appUserDetail.getNickname():appUserDetail.getWxNickname());
wxAppUser
.
setNickname
(
StringUtils
.
isEmpty
(
appUserDetail
.
getWxNickname
())?
appUserDetail
.
getNickname
():
appUserDetail
.
getWxNickname
());
//
wxAppUser.setTxAlipay(appUserLogin.getWxOpenid());
wxAppUser
.
setTxAlipay
(
appUserLogin
.
getWxOpenid
());
//
appUserAlipays.add(wxAppUser);
appUserAlipays
.
add
(
wxAppUser
);
//
}
}
return
appUserAlipays
;
return
appUserAlipays
;
}
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/BaseUserMemberExportBiz.java
View file @
fb5c4749
...
@@ -77,6 +77,7 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper,
...
@@ -77,6 +77,7 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper,
throw
new
BaseException
(
e
);
throw
new
BaseException
(
e
);
}
}
}
}
boolean
hasUsed
=
phoneAndUserIdMap
==
null
?
false
:
(
phoneAndUserIdMap
.
get
(
userMemberSaveDTO
.
getPhone
())
==
null
?
false
:
true
);
BaseUserMemberExport
memberExport
=
BaseUserMemberExport
BaseUserMemberExport
memberExport
=
BaseUserMemberExport
.
builder
()
.
builder
()
.
username
(
userMemberSaveDTO
.
getPhone
())
.
username
(
userMemberSaveDTO
.
getPhone
())
...
@@ -85,7 +86,8 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper,
...
@@ -85,7 +86,8 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper,
.
rentFreeDays
(
userMemberSaveDTO
.
getRentFreeDays
())
.
rentFreeDays
(
userMemberSaveDTO
.
getRentFreeDays
())
.
memberName
(
userMemberSaveDTO
.
getMemberName
())
.
memberName
(
userMemberSaveDTO
.
getMemberName
())
.
discount
(
level
==
null
?
0
:
level
.
getDiscount
()
==
null
?
0
:
level
.
getDiscount
())
.
discount
(
level
==
null
?
0
:
level
.
getDiscount
()
==
null
?
0
:
level
.
getDiscount
())
.
status
(
phoneAndUserIdMap
==
null
?
0
:
(
phoneAndUserIdMap
.
get
(
userMemberSaveDTO
.
getPhone
())
==
null
?
0
:
1
))
.
status
(
hasUsed
?
1
:
0
)
.
userId
(
hasUsed
?
phoneAndUserIdMap
.
get
(
userMemberSaveDTO
.
getPhone
()):
null
)
.
crtId
(
userId
)
.
crtId
(
userId
)
.
crtName
(
name
)
.
crtName
(
name
)
.
crtTime
(
Instant
.
now
().
toEpochMilli
())
.
crtTime
(
Instant
.
now
().
toEpochMilli
())
...
@@ -178,6 +180,7 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper,
...
@@ -178,6 +180,7 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper,
throw new BaseException(e);
throw new BaseException(e);
}*/
}*/
}
}
boolean
hasUsed
=
phoneAndUserIdMap
==
null
?
false
:
(
phoneAndUserIdMap
.
get
(
phone
)
==
null
?
false
:
true
);
BaseUserMemberExport
memberExport
=
BaseUserMemberExport
BaseUserMemberExport
memberExport
=
BaseUserMemberExport
.
builder
()
.
builder
()
.
username
(
phone
.
trim
())
.
username
(
phone
.
trim
())
...
@@ -185,7 +188,8 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper,
...
@@ -185,7 +188,8 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper,
.
totalNumber
(
Integer
.
valueOf
(
totalNumber
))
.
totalNumber
(
Integer
.
valueOf
(
totalNumber
))
.
rentFreeDays
(
Integer
.
valueOf
(
rentFreeDays
))
.
rentFreeDays
(
Integer
.
valueOf
(
rentFreeDays
))
.
discount
(
discount
)
.
discount
(
discount
)
.
status
(
phoneAndUserIdMap
==
null
?
0
:
(
phoneAndUserIdMap
.
get
(
phone
)
==
null
?
0
:
1
))
.
status
(
hasUsed
?
1
:
0
)
.
userId
(
hasUsed
?
phoneAndUserIdMap
.
get
(
phone
):
null
)
.
crtId
(
userId
)
.
crtId
(
userId
)
.
memberName
(
memberName
)
.
memberName
(
memberName
)
.
crtName
(
userName
)
.
crtName
(
userName
)
...
@@ -226,8 +230,8 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper,
...
@@ -226,8 +230,8 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper,
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRED
)
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRED
)
public
void
updateUserMemberExportDataToLoseEfficacyByPhone
(
String
phone
)
{
public
void
updateUserMemberExportDataToLoseEfficacyByPhone
(
String
phone
,
Integer
userId
)
{
mapper
.
updateUserMemberExportDataToLoseEfficacyByPhone
(
phone
);
mapper
.
updateUserMemberExportDataToLoseEfficacyByPhone
(
phone
,
userId
);
}
}
public
PageDataVO
<
BaseUserMemberExportVo
>
findUserMemberExportDataPage
(
BaseUserMemberExportDataFindDTO
exportDataFindDTO
)
{
public
PageDataVO
<
BaseUserMemberExportVo
>
findUserMemberExportDataPage
(
BaseUserMemberExportDataFindDTO
exportDataFindDTO
)
{
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
View file @
fb5c4749
...
@@ -366,7 +366,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
...
@@ -366,7 +366,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
String
host
=
StringUtils
.
defaultIfBlank
(
request
.
getHeader
(
"userHost"
),
ClientUtil
.
getClientIp
(
request
));
String
host
=
StringUtils
.
defaultIfBlank
(
request
.
getHeader
(
"userHost"
),
ClientUtil
.
getClientIp
(
request
));
FundPayVo
fundPayVo
=
FundPayVo
.
builder
()
FundPayVo
fundPayVo
=
FundPayVo
.
builder
()
.
amount
(
applyCathVo
.
getCathType
()
==
0
?
String
.
valueOf
(
realAmount
.
multiply
(
new
BigDecimal
(
100
)).
doubleValue
())
:
String
.
format
(
"%.2f"
,
realAmount
.
doubleValue
()))
.
amount
(
applyCathVo
.
getCathType
()
==
0
?
String
.
format
(
"%.0f"
,
realAmount
.
multiply
(
new
BigDecimal
(
100
)).
doubleValue
())
:
String
.
format
(
"%.2f"
,
realAmount
.
doubleValue
()))
.
orderNo
(
orderNo
)
.
orderNo
(
orderNo
)
.
payeeAccount
(
applyCathVo
.
getAccountNumber
())
.
payeeAccount
(
applyCathVo
.
getAccountNumber
())
.
payerShowName
(
"欣新房车网络科技(广东)股份有限公司"
)
.
payerShowName
(
"欣新房车网络科技(广东)股份有限公司"
)
...
@@ -408,13 +408,13 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
...
@@ -408,13 +408,13 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
BigDecimal
commission
=
cath
.
getCommission
();
BigDecimal
commission
=
cath
.
getCommission
();
if
(
status
==
WithDrawStatusEnum
.
AGREE
.
getCode
())
{
if
(
status
==
WithDrawStatusEnum
.
AGREE
.
getCode
())
{
if
(
org
.
springframework
.
util
.
StringUtils
.
hasText
(
payMentNo
)){
if
(
org
.
springframework
.
util
.
StringUtils
.
hasText
(
payMentNo
)){
withDrawProcess
(
cath
.
getOrderNo
(),
payMentNo
,
null
,
true
);
withDrawProcess
(
cath
.
getOrderNo
(),
payMentNo
,
null
,
null
,
true
);
}
else
{
}
else
{
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
String
host
=
StringUtils
.
defaultIfBlank
(
request
.
getHeader
(
"userHost"
),
ClientUtil
.
getClientIp
(
request
));
String
host
=
StringUtils
.
defaultIfBlank
(
request
.
getHeader
(
"userHost"
),
ClientUtil
.
getClientIp
(
request
));
String
cono
=
OrderUtil
.
GetOrderNumber
(
""
);
String
cono
=
OrderUtil
.
GetOrderNumber
(
""
);
FundPayVo
fundPayVo
=
FundPayVo
.
builder
()
FundPayVo
fundPayVo
=
FundPayVo
.
builder
()
.
amount
(
cath
.
getCathType
()
==
0
?
String
.
valueOf
(
cath
.
getRealAmount
().
multiply
(
new
BigDecimal
(
100
)).
doubleValue
())
:
String
.
format
(
"%.2f"
,
cath
.
getRealAmount
().
doubleValue
()))
.
amount
(
cath
.
getCathType
()
==
0
?
String
.
format
(
"%.0f"
,
cath
.
getRealAmount
().
multiply
(
new
BigDecimal
(
100
)).
doubleValue
())
:
String
.
format
(
"%.2f"
,
cath
.
getRealAmount
().
doubleValue
()))
.
payeeAccount
(
cath
.
getAccountNumber
())
.
payeeAccount
(
cath
.
getAccountNumber
())
.
orderNo
(
cono
)
.
orderNo
(
cono
)
.
payerShowName
(
"欣新房车网络科技(广东)股份有限公司"
)
.
payerShowName
(
"欣新房车网络科技(广东)股份有限公司"
)
...
@@ -425,9 +425,9 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
...
@@ -425,9 +425,9 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
ObjectRestResponse
<
String
>
response
=
thirdFeign
.
transferAccount
(
fundPayVo
);
ObjectRestResponse
<
String
>
response
=
thirdFeign
.
transferAccount
(
fundPayVo
);
if
(
response
.
getStatus
()
==
200
){
if
(
response
.
getStatus
()
==
200
){
withDrawProcess
(
cath
.
getOrderNo
(),
response
.
getData
(),
""
,
true
);
withDrawProcess
(
cath
.
getOrderNo
(),
response
.
getData
(),
null
,
null
,
true
);
}
else
{
}
else
{
withDrawProcess
(
cath
.
getOrderNo
(),
response
.
getData
(),
response
.
getMessage
(),
false
);
withDrawProcess
(
cath
.
getOrderNo
(),
response
.
getData
(),
response
.
getMessage
(),
response
.
getMessage
(),
false
);
}
}
log
.
info
(
"发送提现消息成功:【{}】"
,
fundPayVo
);
log
.
info
(
"发送提现消息成功:【{}】"
,
fundPayVo
);
...
@@ -483,7 +483,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
...
@@ -483,7 +483,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
return
payAccountVos
;
return
payAccountVos
;
}
}
public
void
withDrawProcess
(
String
orderNo
,
String
cono
,
String
reason
,
Boolean
isSuccess
)
{
public
void
withDrawProcess
(
String
orderNo
,
String
cono
,
String
reason
,
String
realReason
,
Boolean
isSuccess
)
{
MyWalletCath
myWalletCath
=
myWalletCathBiz
.
findWalletCatchByOrderNo
(
orderNo
);
MyWalletCath
myWalletCath
=
myWalletCathBiz
.
findWalletCatchByOrderNo
(
orderNo
);
BigDecimal
balnece
=
myWalletCath
.
getBalance
();
BigDecimal
balnece
=
myWalletCath
.
getBalance
();
myWalletCath
.
setCono
(
cono
);
myWalletCath
.
setCono
(
cono
);
...
@@ -510,6 +510,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
...
@@ -510,6 +510,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
wallet
.
setUserId
(
myWalletCath
.
getUserId
());
wallet
.
setUserId
(
myWalletCath
.
getUserId
());
wallet
=
selectOne
(
wallet
);
wallet
=
selectOne
(
wallet
);
myWalletCath
.
setReason
(
reason
);
myWalletCath
.
setReason
(
reason
);
myWalletCath
.
setRealReason
(
realReason
);
myWalletCath
.
setStauts
(
WithDrawStatusEnum
.
FAIL
.
getCode
());
myWalletCath
.
setStauts
(
WithDrawStatusEnum
.
FAIL
.
getCode
());
BigDecimal
amount
=
myWalletCath
.
getRealAmount
().
add
(
myWalletCath
.
getCommission
());
BigDecimal
amount
=
myWalletCath
.
getRealAmount
().
add
(
myWalletCath
.
getCommission
());
BigDecimal
balance
=
wallet
.
getBalance
().
add
(
amount
);
BigDecimal
balance
=
wallet
.
getBalance
().
add
(
amount
);
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/mapper/BaseUserMemberExportMapper.java
View file @
fb5c4749
...
@@ -18,7 +18,7 @@ import java.util.List;
...
@@ -18,7 +18,7 @@ import java.util.List;
public
interface
BaseUserMemberExportMapper
extends
Mapper
<
BaseUserMemberExport
>,
InsertListMapper
<
BaseUserMemberExport
>
{
public
interface
BaseUserMemberExportMapper
extends
Mapper
<
BaseUserMemberExport
>,
InsertListMapper
<
BaseUserMemberExport
>
{
void
updateUserMemberExportDataToLoseEfficacyByPhone
(
@Param
(
"phone"
)
String
phone
);
void
updateUserMemberExportDataToLoseEfficacyByPhone
(
@Param
(
"phone"
)
String
phone
,
@Param
(
"userId"
)
Integer
userId
);
List
<
BaseUserMemberExportDTO
>
findExportDataPage
(
BaseUserMemberExportDataFindDTO
exportDataFindDTO
);
List
<
BaseUserMemberExportDTO
>
findExportDataPage
(
BaseUserMemberExportDataFindDTO
exportDataFindDTO
);
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/MyWalletController.java
View file @
fb5c4749
...
@@ -143,8 +143,9 @@ public class MyWalletController {
...
@@ -143,8 +143,9 @@ public class MyWalletController {
public
ObjectRestResponse
<
Void
>
withDrawprocess
(
@RequestParam
(
value
=
"orderNo"
)
String
orderNo
,
public
ObjectRestResponse
<
Void
>
withDrawprocess
(
@RequestParam
(
value
=
"orderNo"
)
String
orderNo
,
@RequestParam
(
value
=
"cono"
,
required
=
false
)
String
cono
,
@RequestParam
(
value
=
"cono"
,
required
=
false
)
String
cono
,
@RequestParam
(
value
=
"reason"
,
required
=
false
)
String
reason
,
@RequestParam
(
value
=
"reason"
,
required
=
false
)
String
reason
,
@RequestParam
(
value
=
"isSuccess"
)
Boolean
isSuccess
)
{
@RequestParam
(
value
=
"isSuccess"
)
Boolean
isSuccess
,
myWalletBiz
.
withDrawProcess
(
orderNo
,
cono
,
reason
,
isSuccess
);
@RequestParam
(
value
=
"realReason"
,
required
=
false
)
String
realReason
)
{
myWalletBiz
.
withDrawProcess
(
orderNo
,
cono
,
reason
,
realReason
,
isSuccess
);
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
fb5c4749
...
@@ -1147,7 +1147,7 @@ public class AppPermissionService {
...
@@ -1147,7 +1147,7 @@ public class AppPermissionService {
List
<
BaseUserMemberExportDTO
>
memberExportDTOS
=
baseUserMemberExportBiz
.
findUserMemberExportDataByPhoneAndHashEffective
(
phone
);
List
<
BaseUserMemberExportDTO
>
memberExportDTOS
=
baseUserMemberExportBiz
.
findUserMemberExportDataByPhoneAndHashEffective
(
phone
);
if
(
CollectionUtils
.
isNotEmpty
(
memberExportDTOS
))
{
if
(
CollectionUtils
.
isNotEmpty
(
memberExportDTOS
))
{
insertUserMemberByExistUserMemberExportData
(
userId
,
memberExportDTOS
);
insertUserMemberByExistUserMemberExportData
(
userId
,
memberExportDTOS
);
baseUserMemberExportBiz
.
updateUserMemberExportDataToLoseEfficacyByPhone
(
phone
);
baseUserMemberExportBiz
.
updateUserMemberExportDataToLoseEfficacyByPhone
(
phone
,
userId
);
}
}
}
}
...
...
ace-modules/ace-admin/src/main/resources/mapper/BaseUserMemberExportMapper.xml
View file @
fb5c4749
...
@@ -13,10 +13,11 @@
...
@@ -13,10 +13,11 @@
<result
property=
"crtId"
column=
"crt_id"
/>
<result
property=
"crtId"
column=
"crt_id"
/>
<result
property=
"crtName"
column=
"crt_name"
/>
<result
property=
"crtName"
column=
"crt_name"
/>
<result
property=
"crtTime"
column=
"crt_time"
/>
<result
property=
"crtTime"
column=
"crt_time"
/>
<result
property=
"userId"
column=
"user_id"
/>
</resultMap>
</resultMap>
<update
id=
"updateUserMemberExportDataToLoseEfficacyByPhone"
>
<update
id=
"updateUserMemberExportDataToLoseEfficacyByPhone"
>
update `base_user_member_export` set `status`=1 where `username`=#{phone}
update `base_user_member_export` set `status`=1
,`user_id`=#{userId}
where `username`=#{phone}
</update>
</update>
<select
id=
"findExportDataPage"
resultType=
"com.github.wxiaoqi.security.admin.dto.BaseUserMemberExportDTO"
>
<select
id=
"findExportDataPage"
resultType=
"com.github.wxiaoqi.security.admin.dto.BaseUserMemberExportDTO"
>
...
...
ace-modules/ace-admin/src/main/resources/mapper/MyWalletCathMapper.xml
View file @
fb5c4749
...
@@ -24,7 +24,6 @@
...
@@ -24,7 +24,6 @@
(SELECT * FROM `my_wallet_cath` WHERE 1 = 1
(SELECT * FROM `my_wallet_cath` WHERE 1 = 1
<if
test=
"state != null"
>
<if
test=
"state != null"
>
AND `stauts`=#{state}
AND `stauts`=#{state}
i
</if>
</if>
<if
test=
"orderNo !=null and orderNo !=''"
>
<if
test=
"orderNo !=null and orderNo !=''"
>
AND `order_no` = #{orderNo}
AND `order_no` = #{orderNo}
...
...
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/weixin/api/WXSuppToUserPay.java
View file @
fb5c4749
...
@@ -6,18 +6,7 @@ import com.github.wxiaoqi.security.common.util.OrderUtil;
...
@@ -6,18 +6,7 @@ import com.github.wxiaoqi.security.common.util.OrderUtil;
import
com.github.wxiaoqi.security.common.util.process.SystemConfig
;
import
com.github.wxiaoqi.security.common.util.process.SystemConfig
;
import
com.xxfc.platform.universal.weixin.util.XMLUtil
;
import
com.xxfc.platform.universal.weixin.util.XMLUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.security.KeyStore
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.TreeMap
;
import
javax.net.ssl.SSLContext
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.client.ClientProtocolException
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.client.protocol.HttpClientContext
;
import
org.apache.http.client.protocol.HttpClientContext
;
...
@@ -25,11 +14,18 @@ import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
...
@@ -25,11 +14,18 @@ import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import
org.apache.http.conn.ssl.SSLContexts
;
import
org.apache.http.conn.ssl.SSLContexts
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.HttpClientBuilder
;
import
org.apache.http.impl.client.HttpClients
;
import
org.apache.http.impl.client.HttpClients
;
import
org.apache.http.protocol.HttpContext
;
import
org.apache.http.protocol.HttpContext
;
import
org.apache.http.util.EntityUtils
;
import
org.apache.http.util.EntityUtils
;
import
org.jdom.JDOMException
;
import
org.jdom.JDOMException
;
import
org.springframework.core.io.ClassPathResource
;
import
javax.net.ssl.SSLContext
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.security.KeyStore
;
import
java.util.Map
;
import
java.util.TreeMap
;
/**
/**
...
@@ -54,66 +50,12 @@ public class WXSuppToUserPay {
...
@@ -54,66 +50,12 @@ public class WXSuppToUserPay {
private
String
desc
;
//企业付款描述信息
private
String
desc
;
//企业付款描述信息
private
String
spbill_create_ip
;
//Ip地址
private
String
spbill_create_ip
;
//Ip地址
private
String
key
;
private
String
key
;
public
static
void
main
(
String
[]
args
)
throws
Exception
,
IOException
{
Map
<
String
,
String
>
map
=
WXSuppToUserPay
.
WeiXinTiXian
(
"oRhMfwKwjNq2Ce-TxlqfoAqsYfww"
,
OrderUtil
.
GetOrderNumber
(
"TX"
),
"NO_CHECK"
,
500
+
""
,
"活动提现"
,
"192.168.8.109"
);
if
(
"SUCCESS"
.
equals
(
map
.
get
(
"return_code"
)))
{
if
(!
StringUtils
.
isBlank
(
map
.
get
(
"payment_no"
))
&&
!
StringUtils
.
isBlank
(
map
.
get
(
"partner_trade_no"
))
)
{
System
.
out
.
println
(
map
.
get
(
"partner_trade_no"
));
System
.
out
.
println
(
map
.
get
(
"payment_no"
));
System
.
out
.
println
(
Integer
.
parseInt
(
System
.
currentTimeMillis
()/
1000
+
""
));
}
System
.
out
.
println
(
map
.
get
(
"return_code"
));
}
// WXSuppToUserPay prePay = new WXSuppToUserPay();
/* prePay.setMch_appid(SystemConfig.WINXIN_AppID);
prePay.setMchid(SystemConfig.WINXIN_PARTNER);*/
// prePay.setMch_appid(SystemConfig.APP_ID);
// prePay.setMchid(SystemConfig.APP_PARTNER);
// prePay.setNonce_str( OrderUtil.CreateNoncestr());
// prePay.setPartner_trade_no(OrderUtil.GetOrderNumber("TX"));
// prePay.setOpenid("oRhMfwBQ-Ouqhff4AeFOqovgJOAs");
// prePay.setCheck_name("NO_CHECK");
// prePay.setAmount("100");
// prePay.setDesc("活动提现");
// prePay.setSpbill_create_ip("192.168.8.109");
// //prePay.setKey(SystemConfig.WINXIN_PARTNER_KEY);
// String result =postXML(suppTouser,prePay.getXMLTuiKuan());
// String result = "<xml>"+
// "<return_code><![CDATA[SUCCESS]]></return_code>"+
// "<return_msg><![CDATA[]]></return_msg>"+
// "<mch_appid><![CDATA[wxa9805823769294b6]]></mch_appid>"+
// "<mchid><![CDATA[1327473801]]></mchid>"+
// "<device_info><![CDATA[]]></device_info>"+
// "<nonce_str><![CDATA[FD45EBC1E1D76BC1FE0BA933E60E9957]]></nonce_str>"+
// "<result_code><![CDATA[SUCCESS]]></result_code>"+
// "<partner_trade_no><![CDATA[TX20160504120550000001]]></partner_trade_no>"+
// "<payment_no><![CDATA[1000018301201605040163328553]]></payment_no>"+
// "<payment_time><![CDATA[2016-05-04 12:05:51]]></payment_time>"+
// "</xml>";
//
//
// result = result.replaceAll("<![CDATA[|]]>", "");
//
// Map<String, String> map = XMLUtil.doXMLParse(result);
//
// System.out.println(map.get("return_code"));
// System.out.println(map.get("mchid"));
// System.out.println(map.get("payment_no"));
// System.out.println(map.get("partner_trade_no"));
// System.out.println(map.get("payment_time"));
}
public
static
Map
<
String
,
String
>
WeiXinTiXian
(
String
openid
,
String
partnerTradeNo
,
String
check_name
,
String
amount
,
String
desc
,
String
spbill_create_ip
)
public
static
Map
<
String
,
String
>
WeiXinTiXian
(
String
openid
,
String
partnerTradeNo
,
String
check_name
,
String
amount
,
String
desc
,
String
spbill_create_ip
)
{
{
WXSuppToUserPay
prePay
=
new
WXSuppToUserPay
();
WXSuppToUserPay
prePay
=
new
WXSuppToUserPay
();
prePay
.
setMch_appid
(
SystemConfig
.
WINXIN_App
ID
);
prePay
.
setMch_appid
(
SystemConfig
.
APP_
ID
);
prePay
.
setMchid
(
SystemConfig
.
WINXIN
_PARTNER
);
prePay
.
setMchid
(
SystemConfig
.
APP
_PARTNER
);
prePay
.
setNonce_str
(
OrderUtil
.
CreateNoncestr
());
prePay
.
setNonce_str
(
OrderUtil
.
CreateNoncestr
());
prePay
.
setPartner_trade_no
(
partnerTradeNo
);
prePay
.
setPartner_trade_no
(
partnerTradeNo
);
prePay
.
setOpenid
(
openid
);
prePay
.
setOpenid
(
openid
);
...
@@ -138,18 +80,19 @@ public class WXSuppToUserPay {
...
@@ -138,18 +80,19 @@ public class WXSuppToUserPay {
try
{
try
{
KeyStore
keyStore
=
KeyStore
.
getInstance
(
"PKCS12"
);
KeyStore
keyStore
=
KeyStore
.
getInstance
(
"PKCS12"
);
// FileInputStream instream = new FileInputStream(new File("E:/cert/apiclient_cert.p12"));
// FileInputStream instream = new FileInputStream(new File("E:/cert/apiclient_cert.p12"));
String
path
=
Thread
.
currentThread
().
getContextClassLoader
().
getResource
(
"/"
).
getPath
(
);
ClassPathResource
classPathResource
=
new
ClassPathResource
(
"apiclient_cert.p12"
);
FileInputStream
instream
=
new
FileInputStream
(
new
File
(
path
+
"/apiclient_cert.p12"
)
);
InputStream
instream
=
classPathResource
.
getInputStream
(
);
try
{
try
{
keyStore
.
load
(
instream
,
SystemConfig
.
WINXIN
_PARTNER
.
toCharArray
());
keyStore
.
load
(
instream
,
SystemConfig
.
APP
_PARTNER
.
toCharArray
());
}
finally
{
}
finally
{
if
(
instream
!=
null
)
if
(
instream
!=
null
)
{
instream
.
close
();
instream
.
close
();
}
}
}
SSLContext
sslcontext
=
SSLContexts
.
custom
().
loadKeyMaterial
(
keyStore
,
SystemConfig
.
APP_PARTNER
.
toCharArray
()).
build
();
SSLContext
sslcontext
=
SSLContexts
.
custom
().
loadKeyMaterial
(
keyStore
,
SystemConfig
.
APP_PARTNER
.
toCharArray
()).
build
();
@SuppressWarnings
(
"deprecation"
)
@SuppressWarnings
(
"deprecation"
)
SSLConnectionSocketFactory
sslsf
=
new
SSLConnectionSocketFactory
(
sslcontext
,
new
String
[]
{
"TLSv1"
},
SSLConnectionSocketFactory
sslsf
=
new
SSLConnectionSocketFactory
(
sslcontext
,
new
String
[]
{
"TLSv1"
},
null
,
SSLConnectionSocketFactory
.
BROWSER_COMPATIBLE_HOSTNAME_VERIFIER
);
null
,
SSLConnectionSocketFactory
.
getDefaultHostnameVerifier
()
);
httpclient
=
HttpClients
.
custom
().
setSSLSocketFactory
(
sslsf
).
build
();
httpclient
=
HttpClients
.
custom
().
setSSLSocketFactory
(
sslsf
).
build
();
return
post
(
httpclient
,
uri
,
xml
,
"text/xml; charset=UTF-8"
,
"UTF-8"
,
null
,
null
);
return
post
(
httpclient
,
uri
,
xml
,
"text/xml; charset=UTF-8"
,
"UTF-8"
,
null
,
null
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
View file @
fb5c4749
...
@@ -401,7 +401,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay>{
...
@@ -401,7 +401,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay>{
}
}
public
String
wxpayfundTrans
(
FundPayVo
fundPayVo
)
{
public
String
wxpayfundTrans
(
FundPayVo
fundPayVo
)
{
Map
<
String
,
String
>
map
=
WXSuppToUserPay
.
WeiXinTiXian
(
fundPayVo
.
get
Am
ount
(),
fundPayVo
.
getOutBizNo
(),
fundPayVo
.
getCheckName
(),
fundPayVo
.
getAmount
(),
fundPayVo
.
getRemark
(),
fundPayVo
.
getCreatIp
());
Map
<
String
,
String
>
map
=
WXSuppToUserPay
.
WeiXinTiXian
(
fundPayVo
.
get
PayeeAcc
ount
(),
fundPayVo
.
getOutBizNo
(),
fundPayVo
.
getCheckName
(),
fundPayVo
.
getAmount
(),
fundPayVo
.
getRemark
(),
fundPayVo
.
getCreatIp
());
if
(
SUCCESS
.
equals
(
map
.
get
(
WxResponseProperties
.
RETURN_CODE
))
&&
SUCCESS
.
equals
(
map
.
get
(
WxResponseProperties
.
RESULT_CODE
)))
{
if
(
SUCCESS
.
equals
(
map
.
get
(
WxResponseProperties
.
RETURN_CODE
))
&&
SUCCESS
.
equals
(
map
.
get
(
WxResponseProperties
.
RESULT_CODE
)))
{
return
map
.
get
(
WxResponseProperties
.
PARTNER_TRADE_NO
);
return
map
.
get
(
WxResponseProperties
.
PARTNER_TRADE_NO
);
}
}
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/handler/WithDrawMqHandler.java
View file @
fb5c4749
...
@@ -78,13 +78,13 @@ public class WithDrawMqHandler implements InitializingBean {
...
@@ -78,13 +78,13 @@ public class WithDrawMqHandler implements InitializingBean {
String
cono
=
orderPayBiz
.
fundTrans
(
fundPayVo
);
String
cono
=
orderPayBiz
.
fundTrans
(
fundPayVo
);
orderNo
=
fundPayVo
.
getOrderNo
();
orderNo
=
fundPayVo
.
getOrderNo
();
log
.
info
(
"提现成功:【商户订单号:{}】-->【{}】"
,
cono
,
msg
);
log
.
info
(
"提现成功:【商户订单号:{}】-->【{}】"
,
cono
,
msg
);
userFeign
.
withDrawprocess
(
fundPayVo
.
getOrderNo
(),
cono
,
""
,
true
);
userFeign
.
withDrawprocess
(
fundPayVo
.
getOrderNo
(),
cono
,
""
,
true
,
""
);
Long
deliveryTag
=
(
Long
)
headers
.
get
(
AmqpHeaders
.
DELIVERY_TAG
);
Long
deliveryTag
=
(
Long
)
headers
.
get
(
AmqpHeaders
.
DELIVERY_TAG
);
// 手动签收
// 手动签收
basicAck
(
channel
,
deliveryTag
,
false
,
pay_way
);
basicAck
(
channel
,
deliveryTag
,
false
,
pay_way
);
}
catch
(
UnsupportedEncodingException
e
)
{
}
catch
(
UnsupportedEncodingException
e
)
{
basicNack
(
channel
,
message
.
getMessageProperties
().
getDeliveryTag
(),
false
,
false
,
pay_way
);
basicNack
(
channel
,
message
.
getMessageProperties
().
getDeliveryTag
(),
false
,
false
,
pay_way
);
userFeign
.
withDrawprocess
(
fundPayVo
.
getOrderNo
(),
""
,
DEFAULT_ERROR_MSG
,
false
);
userFeign
.
withDrawprocess
(
fundPayVo
.
getOrderNo
(),
""
,
DEFAULT_ERROR_MSG
,
false
,
e
.
getMessage
()
);
String
reason
=
String
.
format
(
"%s%s%s"
,
pay_way
,
"转账失败"
,
"[不支持的编码:UTF-8]"
);
String
reason
=
String
.
format
(
"%s%s%s"
,
pay_way
,
"转账失败"
,
"[不支持的编码:UTF-8]"
);
log
.
info
(
"{}:【{}】"
,
reason
,
e
);
log
.
info
(
"{}:【{}】"
,
reason
,
e
);
}
catch
(
BaseException
e
)
{
}
catch
(
BaseException
e
)
{
...
@@ -95,7 +95,7 @@ public class WithDrawMqHandler implements InitializingBean {
...
@@ -95,7 +95,7 @@ public class WithDrawMqHandler implements InitializingBean {
Long
count
=
valueOperations
.
increment
(
orderNo
);
Long
count
=
valueOperations
.
increment
(
orderNo
);
if
(
count
<=
MAX_RETRY
)
{
if
(
count
<=
MAX_RETRY
)
{
//重新把消息放回队列
//重新把消息放回队列
//
basicNack(channel, message.getMessageProperties().getDeliveryTag(), false, true, pay_way);
basicNack
(
channel
,
message
.
getMessageProperties
().
getDeliveryTag
(),
false
,
true
,
pay_way
);
try
{
try
{
channel
.
basicRecover
();
channel
.
basicRecover
();
}
catch
(
IOException
ex
){
}
catch
(
IOException
ex
){
...
@@ -112,9 +112,8 @@ public class WithDrawMqHandler implements InitializingBean {
...
@@ -112,9 +112,8 @@ public class WithDrawMqHandler implements InitializingBean {
if
(
aliPayErrorCodes
.
contains
(
subCode
)
&&
cathType
!=
null
&&
cathType
==
PayWay
.
ALI_PAY
.
getCode
())
{
if
(
aliPayErrorCodes
.
contains
(
subCode
)
&&
cathType
!=
null
&&
cathType
==
PayWay
.
ALI_PAY
.
getCode
())
{
msg
=
AliPayErrorEnum
.
valueOf
(
subCode
).
getSubReason
();
msg
=
AliPayErrorEnum
.
valueOf
(
subCode
).
getSubReason
();
}
}
msg
=
StringUtils
.
isEmpty
(
msg
)
?
DEFAULT_ERROR_MSG
:
msg
;
String
reason
=
StringUtils
.
isEmpty
(
msg
)
?
DEFAULT_ERROR_MSG
:
msg
;
userFeign
.
withDrawprocess
(
fundPayVo
.
getOrderNo
(),
""
,
reason
,
false
,
e
.
getMessage
());
userFeign
.
withDrawprocess
(
fundPayVo
.
getOrderNo
(),
""
,
msg
,
false
);
//放弃此消息
//放弃此消息
basicNack
(
channel
,
message
.
getMessageProperties
().
getDeliveryTag
(),
false
,
false
,
pay_way
);
basicNack
(
channel
,
message
.
getMessageProperties
().
getDeliveryTag
(),
false
,
false
,
pay_way
);
}
}
...
...
xx-universal/xx-universal-server/src/main/resources/apiclient_cert.p12
0 → 100644
View file @
fb5c4749
File added
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