Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
base_platform_enterprise
gic-platform-enterprise
Commits
de8c8f37
Commit
de8c8f37
authored
Jun 24, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
b4d69cec
8bf9e0d3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
18 deletions
+82
-18
BillingOrderApiService.java
...va/com/gic/enterprise/service/BillingOrderApiService.java
+1
-1
TabBillingOrder.java
.../main/java/com/gic/enterprise/entity/TabBillingOrder.java
+29
-3
BillingOrderServiceImpl.java
.../gic/enterprise/service/impl/BillingOrderServiceImpl.java
+1
-0
BillingAccountApiServiceImpl.java
...rise/service/outer/impl/BillingAccountApiServiceImpl.java
+1
-1
BillingOrderApiServcImpl.java
...terprise/service/outer/impl/BillingOrderApiServcImpl.java
+2
-1
OfflineStrategy.java
...ic/enterprise/service/outer/impl/pay/OfflineStrategy.java
+12
-1
TabBillingOrderMapper.xml
...rvice/src/main/resources/mapper/TabBillingOrderMapper.xml
+31
-9
BillingOrderController.java
...gic/enterprise/web/controller/BillingOrderController.java
+1
-1
PackageController.java
.../com/gic/enterprise/web/controller/PackageController.java
+4
-1
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/BillingOrderApiService.java
View file @
de8c8f37
...
...
@@ -26,7 +26,7 @@ public interface BillingOrderApiService {
*/
ServiceResponse
<
Integer
>
saveSmsOrderBuyNow
(
BillingOrderDTO
billingOrderDTO
,
SmsPackageOrderItemDTO
smsPackageOrderItemDTO
);
ServiceResponse
<
BillingPayInfoDTO
>
paySmsPackageOrder
(
Integer
enterpriseId
,
Integer
orderId
,
Integer
payType
,
String
authCode
,
String
userName
);
ServiceResponse
<
BillingPayInfoDTO
>
paySmsPackageOrder
(
Integer
enterpriseId
,
Integer
orderId
,
Integer
payType
,
String
authCode
,
String
userName
,
Integer
userId
);
/**
* 条件分页查询订单状态
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/entity/TabBillingOrder.java
View file @
de8c8f37
...
...
@@ -22,7 +22,7 @@ public class TabBillingOrder {
private
String
serialNumber
;
/**
* 订单状态
* 订单状态
1:审核中 2:已取消 3:审核失败 4:审核通过(已完成) 0:待支付
*/
private
Integer
orderStatus
;
...
...
@@ -34,7 +34,7 @@ public class TabBillingOrder {
/**
* 支付方式 1微信 2支付宝 3.线下支付 4余额支付
*/
private
Integer
payType
=
0
;
private
Integer
payType
;
/**
* 应付金额
...
...
@@ -56,7 +56,6 @@ public class TabBillingOrder {
*/
private
Integer
couponCardId
;
/**
* 审批结果id
*/
...
...
@@ -82,6 +81,16 @@ public class TabBillingOrder {
*/
private
String
itemJson
;
/**
* 1:短信套餐包
*/
private
Integer
orderType
;
/**
* 发起人
*/
private
Integer
initiatorUser
;
public
Integer
getOrderId
()
{
return
orderId
;
}
...
...
@@ -201,4 +210,20 @@ public class TabBillingOrder {
public
void
setItemJson
(
String
itemJson
)
{
this
.
itemJson
=
itemJson
;
}
public
Integer
getOrderType
()
{
return
orderType
;
}
public
void
setOrderType
(
Integer
orderType
)
{
this
.
orderType
=
orderType
;
}
public
Integer
getInitiatorUser
()
{
return
initiatorUser
;
}
public
void
setInitiatorUser
(
Integer
initiatorUser
)
{
this
.
initiatorUser
=
initiatorUser
;
}
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/BillingOrderServiceImpl.java
View file @
de8c8f37
...
...
@@ -46,6 +46,7 @@ public class BillingOrderServiceImpl implements BillingOrderService {
billingOrder
.
setItemJson
(
billingOrderDTO
.
getItemJson
());
billingOrder
.
setPayType
(
billingOrderDTO
.
getPayType
());
billingOrder
.
setOrderContent
(
billingOrderDTO
.
getOrderContent
());
billingOrder
.
setInitiatorUser
(
billingOrderDTO
.
getInitiatorUser
());
tabBillingOrderMapper
.
insertSelective
(
billingOrder
);
return
billingOrder
.
getOrderId
();
}
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/BillingAccountApiServiceImpl.java
View file @
de8c8f37
...
...
@@ -193,7 +193,7 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
ServiceResponse
<
Integer
>
orderResponse
=
billingOrderApiService
.
saveSmsOrderBuyNow
(
orderDTO
,
itemDTO
);
//订购短信套餐包
billingOrderApiService
.
paySmsPackageOrder
(
enterpriseId
,
orderResponse
.
getResult
(),
PayTypeEnum
.
BALANCE_PAY
.
getCode
(),
null
,
null
);
paySmsPackageOrder
(
enterpriseId
,
orderResponse
.
getResult
(),
PayTypeEnum
.
BALANCE_PAY
.
getCode
(),
null
,
null
,
null
);
}
}
}
else
{
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/BillingOrderApiServcImpl.java
View file @
de8c8f37
...
...
@@ -98,7 +98,7 @@ public class BillingOrderApiServcImpl implements BillingOrderApiService {
@Override
@Transactional
public
ServiceResponse
<
BillingPayInfoDTO
>
paySmsPackageOrder
(
Integer
enterpriseId
,
Integer
orderId
,
Integer
payType
,
String
authCode
,
String
userName
){
String
authCode
,
String
userName
,
Integer
userId
){
TabBillingOrder
order
=
this
.
billingOrderService
.
getOrderById
(
orderId
);
OutPayDTO
outPayDTO
=
new
OutPayDTO
();
outPayDTO
.
setEnterpriseId
(
enterpriseId
);
...
...
@@ -118,6 +118,7 @@ public class BillingOrderApiServcImpl implements BillingOrderApiService {
outPayDTO
.
setPayType
(
payType
);
outPayDTO
.
setAuthCode
(
authCode
);
outPayDTO
.
setInitiatorName
(
userName
);
outPayDTO
.
setInitiatorUser
(
userId
);
ServiceResponse
<
BillingPayInfoDTO
>
response
=
this
.
billingPayInfoApiService
.
savePrePayInfo
(
outPayDTO
);
if
(
response
.
isSuccess
()){
Integer
payInfoId
=
response
.
getResult
().
getPayInfoId
();
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/pay/OfflineStrategy.java
View file @
de8c8f37
...
...
@@ -12,6 +12,7 @@ import com.gic.enterprise.dto.ApprovalCallBackDTO;
import
com.gic.enterprise.dto.BillingPayInfoDTO
;
import
com.gic.enterprise.dto.EnterpriseDTO
;
import
com.gic.enterprise.dto.OutPayDTO
;
import
com.gic.enterprise.entity.TabBillingOrder
;
import
com.gic.enterprise.entity.TabBillingPayInfo
;
import
com.gic.enterprise.entity.TabBillingRechargeRecord
;
import
com.gic.enterprise.entity.TabEnterprise
;
...
...
@@ -161,7 +162,7 @@ public class OfflineStrategy implements PayStrategy {
case
2
:
// 短信套餐包购买
this
.
billingOrderService
.
updateBySerialNumber
(
resData
.
getOrderSerialNumber
(),
resData
.
getTotalFeePaid
(),
resData
.
getAuditStatus
(),
resData
.
getTimeEnd
());
sendApprovalSms
(
resData
,
"GICJFZX008"
);
send
Order
ApprovalSms
(
resData
,
"GICJFZX008"
);
break
;
default
:
break
;
...
...
@@ -184,6 +185,16 @@ public class OfflineStrategy implements PayStrategy {
sendSms
(
resData
,
userDTO
,
code
);
}
private
void
sendOrderApprovalSms
(
ApprovalCallBackDTO
resData
,
String
code
)
{
// TabBillingRechargeRecord rechargeRecord = billingRechargeRecordService.getRechargeRecordBySerialNumber(resData.getOrderSerialNumber());
TabBillingOrder
order
=
billingOrderService
.
getOrderBySerialNumber
(
resData
.
getOrderSerialNumber
());
Integer
initiator
=
order
.
getInitiatorUser
();
if
(
initiator
!=
null
)
{
UserDTO
userDTO
=
userApiService
.
getUserById
(
initiator
).
getResult
();
sendSms
(
resData
,
userDTO
,
code
);
}
}
private
void
sendSms
(
ApprovalCallBackDTO
resData
,
UserDTO
userDTO
,
String
code
)
{
try
{
if
(
StringUtils
.
isBlank
(
userDTO
.
getPhoneAreaCode
()))
{
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabBillingOrderMapper.xml
View file @
de8c8f37
...
...
@@ -17,11 +17,13 @@
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"item_json"
jdbcType=
"VARCHAR"
property=
"itemJson"
/>
<result
column=
"order_type"
jdbcType=
"INTEGER"
property=
"orderType"
/>
<result
column=
"initiator_user"
jdbcType=
"INTEGER"
property=
"initiatorUser"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
order_id, enterprise_id, serial_number, order_status, order_content, pay_type, total_fee,
total_fee_paid, pay_info_id, coupon_card_id, audit_result_id, status,
create_time, update_time, item_json
total_fee_paid, pay_info_id, coupon_card_id, audit_result_id, status,
create_time,
update_time, item_json, order_type, initiator_user
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -37,15 +39,15 @@
insert into tab_billing_order (order_id, enterprise_id, serial_number,
order_status, order_content, pay_type,
total_fee, total_fee_paid, pay_info_id,
coupon_card_id, audit_result_id,
status, create_time, update_time
,
item_json
)
coupon_card_id, audit_result_id,
status,
create_time, update_time, item_json
,
order_type, initiator_user
)
values (#{orderId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{serialNumber,jdbcType=VARCHAR},
#{orderStatus,jdbcType=INTEGER}, #{orderContent,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER},
#{totalFee,jdbcType=DOUBLE}, #{totalFeePaid,jdbcType=DOUBLE}, #{payInfoId,jdbcType=INTEGER},
#{couponCardId,jdbcType=INTEGER}, #{auditResultId,jdbcType=INTEGER},
#{
status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP
},
#{
itemJson,jdbcType=VARCHA
R})
#{couponCardId,jdbcType=INTEGER}, #{auditResultId,jdbcType=INTEGER},
#{status,jdbcType=INTEGER},
#{
createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{itemJson,jdbcType=VARCHAR
},
#{
orderType,jdbcType=INTEGER}, #{initiatorUser,jdbcType=INTEGE
R})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.enterprise.entity.TabBillingOrder"
>
<selectKey
keyProperty=
"orderId"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
...
...
@@ -98,6 +100,12 @@
<if
test=
"itemJson != null"
>
item_json,
</if>
<if
test=
"orderType != null"
>
order_type,
</if>
<if
test=
"initiatorUser != null"
>
initiator_user,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"orderId != null"
>
...
...
@@ -145,6 +153,12 @@
<if
test=
"itemJson != null"
>
#{itemJson,jdbcType=VARCHAR},
</if>
<if
test=
"orderType != null"
>
#{orderType,jdbcType=INTEGER},
</if>
<if
test=
"initiatorUser != null"
>
#{initiatorUser,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.enterprise.entity.TabBillingOrder"
>
...
...
@@ -192,6 +206,12 @@
<if
test=
"itemJson != null"
>
item_json = #{itemJson,jdbcType=VARCHAR},
</if>
<if
test=
"orderType != null"
>
order_type = #{orderType,jdbcType=INTEGER},
</if>
<if
test=
"initiatorUser != null"
>
initiator_user = #{initiatorUser,jdbcType=INTEGER},
</if>
</set>
where order_id = #{orderId,jdbcType=INTEGER}
</update>
...
...
@@ -210,7 +230,9 @@
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
item_json = #{itemJson,jdbcType=VARCHAR}
item_json = #{itemJson,jdbcType=VARCHAR},
order_type = #{orderType,jdbcType=INTEGER},
initiator_user = #{initiatorUser,jdbcType=INTEGER}
where order_id = #{orderId,jdbcType=INTEGER}
</update>
<select
id=
"getOrderByPayInfoId"
resultMap=
"BaseResultMap"
>
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/BillingOrderController.java
View file @
de8c8f37
...
...
@@ -84,7 +84,7 @@ public class BillingOrderController {
vo
.
setCouponCardVO
(
EntityUtil
.
changeEntityByJSON
(
BillingCouponCardVO
.
class
,
couponCardDTO
));
}
}
if
(
dto
.
getPayType
()
.
intValu
e
()
==
PayTypeEnum
.
OFFLINE_PAY
.
getCode
()){
if
(
dto
.
getPayType
()
!=
null
&&
dto
.
getPayTyp
e
()
==
PayTypeEnum
.
OFFLINE_PAY
.
getCode
()){
ServiceResponse
<
TransferAccountsApprovalDTO
>
byOrderNumber
=
this
.
transferAccountsApprovalApiService
.
getByOrderNumber
(
dto
.
getSerialNumber
());
if
(
byOrderNumber
.
isSuccess
()){
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/PackageController.java
View file @
de8c8f37
...
...
@@ -7,6 +7,7 @@ import com.gic.auth.service.AuthCodeApiService;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.download.utils.log.LogUtils
;
import
com.gic.enterprise.base.UserInfo
;
import
com.gic.enterprise.constant.PackageHoursEnum
;
import
com.gic.enterprise.dto.*
;
import
com.gic.enterprise.qo.PageQO
;
...
...
@@ -82,6 +83,7 @@ public class PackageController {
orderDTO
.
setOrderContent
(
qo
.
getSmsPackageName
());
orderDTO
.
setTotalFee
(
qo
.
getTotalFee
());
orderDTO
.
setTotalFeePaid
(
qo
.
getTotalFeePaid
());
orderDTO
.
setInitiatorUser
(
UserDetailUtils
.
getUserDetail
().
getUserId
());
SmsPackageOrderItemDTO
itemDTO
=
new
SmsPackageOrderItemDTO
();
itemDTO
.
setBuyCount
(
qo
.
getNum
());
itemDTO
.
setCode
(
qo
.
getSmsPackageCode
());
...
...
@@ -109,8 +111,9 @@ public class PackageController {
}
this
.
authCodeApiService
.
expireAuthCode
(
authCodeId
);
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
UserInfo
userInfo
=
UserDetailUtils
.
getUserDetail
().
getUserInfo
();
ServiceResponse
<
BillingPayInfoDTO
>
serviceResponse
=
this
.
billingOrderApiService
.
paySmsPackageOrder
(
enterpriseId
,
orderId
,
payType
,
authCode
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getUserName
());
paySmsPackageOrder
(
enterpriseId
,
orderId
,
payType
,
authCode
,
userInfo
.
getUserName
(),
userInfo
.
getUserId
());
if
(
serviceResponse
.
isSuccess
()){
BillingOrderDTO
orderDTO
=
this
.
billingOrderApiService
.
getOrderById
(
orderId
).
getResult
();
LogUtils
.
createLog
(
"套餐包支付"
,
orderDTO
.
getOrderContent
());
...
...
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