From f2a65be97fa0537bfd3d3f7f5b0ca7bdbb7182ca Mon Sep 17 00:00:00 2001
From: wangh <9483>
Date: Mon, 13 Nov 2023 18:58:31 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AD=98=E6=B2=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fuintAdmin/src/api/EventMarketing/cardSet.js | 9 +
fuintAdmin/src/views/member/userInfo.vue | 25 +-
.../fuyou/service/impl/FyPayServiceImpl.java | 30 +-
.../integral/entity/IntegralDetail.java | 19 +-
.../mapper/xml/IntegralDetailMapper.xml | 10 +-
.../controller/CardFuelChangeController.java | 93 +++++
.../controller/CardFuelRecordController.java | 93 +++++
.../cardFule/entity/CardFuelChange.java | 89 +++++
.../cardFule/entity/CardFuelRecord.java | 149 ++++++++
.../cardFule/mapper/CardFuelChangeMapper.java | 85 +++++
.../cardFule/mapper/CardFuelRecordMapper.java | 85 +++++
.../mapper/xml/CardFuelChangeMapper.xml | 220 +++++++++++
.../mapper/xml/CardFuelRecordMapper.xml | 352 ++++++++++++++++++
.../service/CardFuelChangeService.java | 58 +++
.../service/CardFuelRecordService.java | 58 +++
.../impl/CardFuelChangeServiceImpl.java | 89 +++++
.../impl/CardFuelRecordServiceImpl.java | 89 +++++
.../controller/CardValueRecordController.java | 23 +-
.../cardValue/dto/CardValueRecordDTO.java | 29 +-
.../cardValue/entity/CardValueRecord.java | 43 +++
.../mapper/CardValueRecordMapper.java | 1 +
.../service/CardValueRecordService.java | 15 +-
.../impl/CardValueRecordServiceImpl.java | 211 +++++++++++
.../userManager/mapper/LJUserMapper.java | 5 +
.../userManager/mapper/xml/LJUserMapper.xml | 11 +
25 files changed, 1855 insertions(+), 36 deletions(-)
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelChangeController.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelRecordController.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelChange.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelRecord.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelChangeMapper.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelRecordMapper.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelChangeMapper.xml
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelChangeService.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelRecordService.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelChangeServiceImpl.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java
diff --git a/fuintAdmin/src/api/EventMarketing/cardSet.js b/fuintAdmin/src/api/EventMarketing/cardSet.js
index cc8c072c3..4333cd375 100644
--- a/fuintAdmin/src/api/EventMarketing/cardSet.js
+++ b/fuintAdmin/src/api/EventMarketing/cardSet.js
@@ -25,4 +25,13 @@ export function getPrepaidCardTopUpApi(query) {
method: 'post',
data: query
})
+}
+
+// 余额插入订单
+export function getCheckTheStatusOfYourPaymentApi(query) {
+ return request({
+ url: 'business/marketingActivity/cardValueRecord/checkTheStatusOfYourPayment?id='+query,
+ method: 'post',
+ data: query
+ })
}
\ No newline at end of file
diff --git a/fuintAdmin/src/views/member/userInfo.vue b/fuintAdmin/src/views/member/userInfo.vue
index c759ec833..22e606174 100644
--- a/fuintAdmin/src/views/member/userInfo.vue
+++ b/fuintAdmin/src/views/member/userInfo.vue
@@ -863,6 +863,8 @@ export default {
authCode:'', // 支付码
+ timer: null,
+
rechargeBalance:0,
@@ -1171,30 +1173,29 @@ export default {
async collection(){
if (this.flag === 1) {
-
-
- /**
- * 插入订单表,返回订单信息id 并调用支付接口
- *
- *
- *
- * 查询支付是否完成(支付完成则修改)
- *
- */
-
- // 余额信息
// 会员id 会员名字会员手机号码
this.cardValueForm.mtUserId = userForm.id
this.cardValueForm.name = userForm.name
this.cardValueForm.mobile = userForm.mobile
// 支付码
this.cardValueForm.authCode = this.authCode
+
+ let id ;
await getPrepaidCardTopUpApi(this.cardValueForm).then(res=> {
console.log("返回数据",res)
});
+ this.timer = setInterval(async () => {
+ await getCheckTheStatusOfYourPaymentApi(id).then(res => {
+ console.log("ddd", res)
+ })
+ }, 500);
+
+
+
}else if (this.flag === 2){
+
}
console.log("88888888888888888888",this.flag)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java
index 9b8a03a3a..1d635e436 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java
@@ -10,16 +10,19 @@ import com.fuint.api.fuyou.entity.Message;
import com.fuint.api.fuyou.service.FyPayService;
import com.fuint.api.fuyou.service.MerchantConfigService;
import com.fuint.api.fuyou.util.Utils;
+import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService;
import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.entity.LJOrder;
import com.fuint.business.order.entity.OilOrder;
import com.fuint.business.order.service.CashierOrderService;
import com.fuint.business.order.service.LJOrderService;
import com.fuint.business.order.service.OilOrderService;
+import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
import java.util.*;
@Service
@@ -31,7 +34,8 @@ public class FyPayServiceImpl implements FyPayService {
private OilOrderService oilOrderService;
@Autowired
private CashierOrderService cashierOrderService;
-
+ @Resource
+ private CardValueRecordService cardValueRecordService;
/**
* 条码支付
* @param map1
@@ -110,6 +114,13 @@ public class FyPayServiceImpl implements FyPayService {
map.put("ins_cd", insCd);
map.put("mchnt_cd", mchntCd);
+ // 余额新增
+ String type = "";
+ String payStates="";
+ if (!ObjectUtil.isEmpty(map1.get("type"))) {
+ type = map1.get("type");
+ }
+
// 请求报文
String reqBody = Message.requestMsg(map);
// 响应报文
@@ -143,6 +154,12 @@ public class FyPayServiceImpl implements FyPayService {
oilOrderService.updateOilOrder(order);
}
}
+ if ("CRV".equals(type)) {
+ payStates = "paid";
+ if (!ObjectUtil.isEmpty(map1.get("orderId"))) {
+
+ }
+ }
// 修改商户账号余额信息
Double amount = merchantConfig.getAmount();
merchantConfig.setAmount(amount+allAmount);
@@ -166,6 +183,12 @@ public class FyPayServiceImpl implements FyPayService {
oilOrderService.updateOilOrder(order);
}
}
+ if ("CRV".equals(type)) {
+ payStates = "payFail";
+ if (!ObjectUtil.isEmpty(map1.get("orderId"))) {
+
+ }
+ }
}
if (!ObjectUtil.isEmpty(oilOrder)){
oilOrderService.updateOilOrder(oilOrder);
@@ -176,6 +199,11 @@ public class FyPayServiceImpl implements FyPayService {
if (!ObjectUtil.isEmpty(cashierOrder)){
cashierOrderService.updateCashierOrder(cashierOrder);
}
+ if ("CRV".equals(type) && !ObjectUtil.isEmpty(map1.get("orderId"))) {
+ payStates = "payFail";
+ Integer id = Integer.parseInt(map1.get("orderId"));
+ cardValueRecordService.editPayStatus(id, payStates);
+ }
}
}catch (Exception e){
log.error(e.getMessage());
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/entity/IntegralDetail.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/entity/IntegralDetail.java
index 94dd8dc45..ff62a8b78 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/entity/IntegralDetail.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/entity/IntegralDetail.java
@@ -37,27 +37,12 @@ public class IntegralDetail extends BaseEntity {
* 积分变动的原因,用于记录变动的具体原因或业务场景
*/
private String changeReason;
+
+ private String changeType;
/**
* 店铺ID
*/
private Integer storeId;
- /**
- * 创建时间
- */
- private Date createTime;
- /**
- * 更新时间
- */
- private Date updateTime;
- /**
- * 创建人
- */
- private String createBy;
- /**
- * 更新人
- */
- private String updateBy;
-
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralDetailMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralDetailMapper.xml
index 5c7ebbc8c..a4e6e71ed 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralDetailMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralDetailMapper.xml
@@ -14,6 +14,7 @@
+
@@ -27,7 +28,7 @@
+
+
+ select mu.*,
+ mub.id balanceId,
+ mub.card_balance cardBalance,
+ mub.points,
+ mub.growth_value growthValue
+ from mt_user mu
+ left join mt_user_balance mub on mu.id = mub.mt_user_id
+ where mu.id = #{userId}
+
\ No newline at end of file