Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
youka-api
Overview
Overview
Details
Activity
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
java-youka-wallet
youka-api
Commits
681724fc
Commit
681724fc
authored
Apr 16, 2018
by
Java-聂换换
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HL2通道支付
parent
8a85d934
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
2 deletions
+74
-2
PayApiService.java
src/main/java/com/thinkgem/jeesite/modules/pay/service/PayApiService.java
+52
-2
CardEntity.java
src/main/java/com/thinkgem/jeesite/modules/user/entity/CardEntity.java
+10
-0
UserApiService.java
src/main/java/com/thinkgem/jeesite/modules/user/service/UserApiService.java
+5
-0
UserDao.xml
src/main/resources/mappings/modules/user/UserDao.xml
+7
-0
No files found.
src/main/java/com/thinkgem/jeesite/modules/pay/service/PayApiService.java
View file @
681724fc
...
@@ -336,8 +336,10 @@ public class PayApiService {
...
@@ -336,8 +336,10 @@ public class PayApiService {
}
}
// HL2 通道 即JFEN 开卡
// HL2 通道 即JFEN 开卡
需要得参数
public
Response
openCardJFen
(
UserRequest
request
){
public
Response
openCardJFen
(
UserRequest
request
){
Response
response
=
new
Response
();
CardEntity
cardEntity
=
userService
.
getCardInfo
(
request
);
CardEntity
cardEntity
=
userService
.
getCardInfo
(
request
);
UserSubMchId
userSubMchId
=
new
UserSubMchId
();
UserSubMchId
userSubMchId
=
new
UserSubMchId
();
userSubMchId
.
setUserCode
(
request
.
getSubMerchantCode
());
userSubMchId
.
setUserCode
(
request
.
getSubMerchantCode
());
...
@@ -345,13 +347,61 @@ public class PayApiService {
...
@@ -345,13 +347,61 @@ public class PayApiService {
userSubMchId
=
userService
.
getUserSubmchid
(
userSubMchId
);
userSubMchId
=
userService
.
getUserSubmchid
(
userSubMchId
);
UserEntity
userEntity
=
userService
.
getUserInfo
(
request
);
UserEntity
userEntity
=
userService
.
getUserInfo
(
request
);
UserDetailEntity
userDetailEntity
=
userService
.
getUserDetailByCode
(
request
.
getSubMerchantCode
());
UserDetailEntity
userDetailEntity
=
userService
.
getUserDetailByCode
(
request
.
getSubMerchantCode
());
// 如果没有注册 则先注册
if
(
userSubMchId
==
null
){
CardEntity
cardEntityDebit
=
userService
.
getCardInfoByCode
(
userEntity
);
JSONObject
dto
=
new
JSONObject
();
String
orderId
=
MakeOrderNum
.
makeOrderNum
();
dto
.
put
(
"orderId"
,
MakeOrderNum
.
makeOrderNum
());
dto
.
put
(
"serviceType"
,
1
);
dto
.
put
(
"subMerchantName"
,
userDetailEntity
.
getRealName
()+
orderId
);
dto
.
put
(
"subMerchantType"
,
"PERSON"
);
dto
.
put
(
"businessLicense"
,
userDetailEntity
.
getRealName
()+
orderId
);
dto
.
put
(
"legalPersonName"
,
userDetailEntity
.
getRealName
());
dto
.
put
(
"legalPersonID"
,
userDetailEntity
.
getIdCard
());
dto
.
put
(
"subMerchantPersonName"
,
userDetailEntity
.
getRealName
());
dto
.
put
(
"subMerchantPersonPhone"
,
userEntity
.
getMobile
());
dto
.
put
(
"bankType"
,
"TOPRIVATE"
);
dto
.
put
(
"accountName"
,
userDetailEntity
.
getRealName
());
dto
.
put
(
"accountNo"
,
cardEntityDebit
.
getCardNo
());
dto
.
put
(
"bankName"
,
cardEntityDebit
.
getBankName
());
dto
.
put
(
"bankProv"
,
cardEntityDebit
.
getProvince
());
dto
.
put
(
"bankCity"
,
cardEntityDebit
.
getCity
());
dto
.
put
(
"bankBranch"
,
cardEntityDebit
.
getCardPlace
());
dto
.
put
(
"bankCode"
,
cardEntityDebit
.
getBelongBank
());
dto
.
put
(
"timestamp"
,
System
.
currentTimeMillis
());
JSONObject
jsonObject
=
null
;
try
{
jsonObject
=
juHeZhongPayJFenService
.
merchantIn
(
dto
);
}
catch
(
Exception
e
)
{
response
.
setStatus
(
ComCode
.
STATUS_CODE_9998
);
response
.
setMessage
(
ComCode
.
STATUS_CODE_9998_DESC
);
response
.
setError
(
e
.
getMessage
());
return
response
;
}
if
(!
"0000"
.
equals
(
jsonObject
.
getString
(
"code"
)))
{
response
.
setStatus
(
ComCode
.
STATUS_CODE_9998
);
response
.
setMessage
(
jsonObject
.
getString
(
"msg"
));
return
response
;
}
String
subMchId
=
jsonObject
.
getString
(
"subMchId"
);
}
// 获取费率
RateEntity
rateEntity
=
new
RateEntity
();
RateEntity
rateEntity
=
new
RateEntity
();
rateEntity
.
setUserLevel
(
userEntity
.
getLevel
());
rateEntity
.
setUserLevel
(
userEntity
.
getLevel
());
rateEntity
.
setPayChannel
(
ComCode
.
PAYCHANNEL_HL2
);
rateEntity
.
setPayChannel
(
ComCode
.
PAYCHANNEL_HL2
);
rateEntity
.
setPayMethod
(
"quick"
);
rateEntity
.
setPayMethod
(
"quick"
);
rateEntity
=
userService
.
getRateByLevel
(
rateEntity
);
rateEntity
=
userService
.
getRateByLevel
(
rateEntity
);
Response
response
=
new
Response
();
JSONObject
dto
=
new
JSONObject
();
JSONObject
dto
=
new
JSONObject
();
dto
.
put
(
"orderId"
,
MakeOrderNum
.
makeOrderNum
());
dto
.
put
(
"orderId"
,
MakeOrderNum
.
makeOrderNum
());
...
...
src/main/java/com/thinkgem/jeesite/modules/user/entity/CardEntity.java
View file @
681724fc
...
@@ -39,6 +39,8 @@ public class CardEntity extends BaseEntity implements Serializable {
...
@@ -39,6 +39,8 @@ public class CardEntity extends BaseEntity implements Serializable {
private
String
swpaccid
;
// HL2通道 开卡唯一标识
private
String
swpaccid
;
// HL2通道 开卡唯一标识
private
String
isOpenCard
=
"1"
;
public
CardEntity
()
{
public
CardEntity
()
{
}
}
...
@@ -231,4 +233,12 @@ public class CardEntity extends BaseEntity implements Serializable {
...
@@ -231,4 +233,12 @@ public class CardEntity extends BaseEntity implements Serializable {
public
void
setSwpaccid
(
String
swpaccid
)
{
public
void
setSwpaccid
(
String
swpaccid
)
{
this
.
swpaccid
=
swpaccid
;
this
.
swpaccid
=
swpaccid
;
}
}
public
String
getIsOpenCard
()
{
return
isOpenCard
;
}
public
void
setIsOpenCard
(
String
isOpenCard
)
{
this
.
isOpenCard
=
isOpenCard
;
}
}
}
src/main/java/com/thinkgem/jeesite/modules/user/service/UserApiService.java
View file @
681724fc
...
@@ -707,4 +707,9 @@ public class UserApiService {
...
@@ -707,4 +707,9 @@ public class UserApiService {
return
userDao
.
getBelongBankByPayChannel
(
request
);
return
userDao
.
getBelongBankByPayChannel
(
request
);
}
}
public
CardEntity
getCardInfoByCode
(
UserEntity
userEntity
)
{
return
userDao
.
getCardInfoByCode
(
userEntity
);
}
}
}
src/main/resources/mappings/modules/user/UserDao.xml
View file @
681724fc
...
@@ -238,15 +238,22 @@
...
@@ -238,15 +238,22 @@
yc.update_date AS modified,
yc.update_date AS modified,
yc.update_by AS modifiedUser,
yc.update_by AS modifiedUser,
yc.del_flag AS delFlag
yc.del_flag AS delFlag
<if
test=
"payChannel!=null and payChannel != ''"
>
,if(ycs.swpaccid is null,0,1) AS isOpenCard
</if>
FROM
FROM
youka_cards yc
youka_cards yc
LEFT JOIN youka_bank yb ON yc.belong_bank = yb.bank_code
LEFT JOIN youka_bank yb ON yc.belong_bank = yb.bank_code
<if
test=
"payChannel!=null and payChannel != ''"
>
LEFT JOIN youka_card_swpaccid ycs ON ycs.card_code = yc.code
</if>
WHERE
WHERE
yc.user_code = #{subMerchantCode}
yc.user_code = #{subMerchantCode}
AND yc.card_type = #{cardType}
AND yc.card_type = #{cardType}
AND yc.del_flag = '0'
AND yc.del_flag = '0'
<if
test=
"payChannel!=null and payChannel != ''"
>
<if
test=
"payChannel!=null and payChannel != ''"
>
AND yb.support_pay_channel LIKE concat('%',#{payChannel},',%')
AND yb.support_pay_channel LIKE concat('%',#{payChannel},',%')
AND ycs.pay_channel = #{payChannel}
</if>
</if>
</select>
</select>
...
...
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