From 9baa55cf4292ad0fe80547f9c840e917775411f4 Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期日, 05 十一月 2023 09:45:48 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai

---
 cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java |   41 ++++++++++++++++++++++++++++++-----------
 1 files changed, 30 insertions(+), 11 deletions(-)

diff --git a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java
index a849860..82a76bd 100644
--- a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java
+++ b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java
@@ -284,8 +284,9 @@
                 classInfoVo.setHeight(tStudent.getHeight());
                 classInfoVo.setWeight(tStudent.getWeight());
                 classInfoVo.setBmi(tStudent.getBmi());
-                classInfoVo.setBodyStatus(BMIBodyUtil.getBodyStatus(tStudent.getBmi()));
-
+                if (tStudent.getBmi()!=null) {
+                    classInfoVo.setBodyStatus(BMIBodyUtil.getBodyStatus(tStudent.getBmi()));
+                }
                 List<RegisteredCourse> courseList = new ArrayList<>();
                 List<StuCourseResp> stuCoursePayment = paymentClient.getStuCoursePayment(tStudent.getId());
                 List<Integer> coursePackIds = new ArrayList<>();
@@ -302,7 +303,6 @@
                         course.setPeriodOfValidity(tCoursePackagePayment.getPeriodOfValidity());
                         courseList.add(course);
                     }
-
                 }
                 classInfoVo.setCourseList(courseList);
 //                List<ExerciseVideo> stuCourseOfVideoList = voclClient.getStuCourseOfVideoList(coursePackIds);
@@ -799,6 +799,13 @@
                 details.add(consumeDetail);
             }
         }
+
+        //8.积分商场
+
+        List<ConsumeDetail> consumeDetails = mcClient.getConsumeDetails(requestVo);
+        details.addAll(consumeDetails);
+
+
         if (details.size() > 0 ){
             Collections.sort(details, new Comparator<ConsumeDetail>() {
                 @Override
@@ -1142,6 +1149,11 @@
     }
 
     @Override
+    public List<QueryAppUserVO> listAll1(QueryAppUser query) {
+        return appUserMapper.listAll1(query);
+    }
+
+    @Override
     public StuAndStoreResponse queryAppUserDefaultStuAndStore(Integer userIdFormRedis,Integer pointsMerId, String lat, String lon,Integer isCourse) {
         StuAndStoreResponse response = new StuAndStoreResponse();
         if (isCourse == 1){
@@ -1321,7 +1333,10 @@
             switch (exchangeType.getExchangeType()){
 //            积分
                 case 1:
-                    boolean b = dealAppUserIntegral(userIdFormRedis,tAppUser,merchandise.getIntegral());
+                    boolean b =true;
+                    for (int i = 0; i < goodsNums; i++) {
+                         b = dealAppUserIntegral(userIdFormRedis,tAppUser,merchandise.getIntegral());
+                    }
                     if (b){
                         switch (exchangeType.getGoodsType()){
                             case 2:
@@ -1375,7 +1390,11 @@
                     break;
                 case 2:
 //                积分+现金
-                    boolean dealt = dealAppUserIntegral(userIdFormRedis,tAppUser,merchandise.getIntegral());
+                    boolean dealt =true;
+                    for (int i = 0; i < goodsNums; i++) {
+                        dealt = dealAppUserIntegral(userIdFormRedis,tAppUser,merchandise.getIntegral());
+                    }
+
                     switch (exchangeType.getPayType()) {
                         case 1:
                             try {
@@ -1389,9 +1408,9 @@
                             }
                         case 2:
                             if (merchandise.getType() == 2) {
-                                return AlipayPayment(merchandise.getCash().multiply(new BigDecimal(exchangeType.getStuIds().size())), code);
+                                return AlipayPayment(merchandise.getCash().multiply(new BigDecimal(exchangeType.getStuIds().size())), code,returnId);
                             } else {
-                                return AlipayPayment(merchandise.getCash().multiply(new BigDecimal(goodsNums)), code);
+                                return AlipayPayment(merchandise.getCash().multiply(new BigDecimal(goodsNums)), code,returnId);
                             }
                         default:
                             break;
@@ -1411,9 +1430,9 @@
                             }
                         case 2:
                             if (merchandise.getType() == 2) {
-                                return AlipayPayment(merchandise.getCash().multiply(new BigDecimal(exchangeType.getStuIds().size())), code);
+                                return AlipayPayment(merchandise.getCash().multiply(new BigDecimal(exchangeType.getStuIds().size())), code,returnId);
                             } else {
-                                return AlipayPayment(merchandise.getCash().multiply(new BigDecimal(goodsNums)), code);
+                                return AlipayPayment(merchandise.getCash().multiply(new BigDecimal(goodsNums)), code,returnId);
                             }
                         default:
                             break;
@@ -1455,9 +1474,9 @@
         }
     }
 
-    private ResultUtil AlipayPayment(BigDecimal cash, String code) {
+    private ResultUtil AlipayPayment(BigDecimal cash, String code,Long  returnId) {
         System.out.println("金额:"+cash);
-        ResultUtil alipay = payMoneyUtil.alipay("课包续费", "课包续费", "", code, cash.toString(),
+        ResultUtil alipay = payMoneyUtil.alipay("课包续费", "课包续费", String.valueOf(returnId), code, cash.toString(),
                 "/base/pointMer/exchangeGoodPaymentAliCallback");
         if(alipay.getCode() == 200){
             new Thread(new Runnable() {

--
Gitblit v1.7.1