From 6a8b55a2183720ff6106f581695298168896cadc Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期三, 11 十月 2023 16:03:26 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai

---
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java |    5 
 cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java                                    |   51 ++++++++++
 cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java                    |   18 +++
 cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java              |    4 
 .idea/workspace.xml                                                                                      |   69 +++++++++----
 cloud-server-activity/src/main/java/com/dsh/activity/mapper/CouponMapper.java                            |   12 ++
 cloud-server-activity/src/main/java/com/dsh/activity/service/ICouponService.java                         |    2 
 cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java                 |    4 
 cloud-server-account/src/main/java/com/dsh/account/util/PayMoneyUtil.java                                |    1 
 cloud-server-activity/src/main/resources/mapper/CouponMapper.xml                                         |   82 ++++++++++++++++
 10 files changed, 225 insertions(+), 23 deletions(-)

diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 31efa2f..af726c6 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -27,8 +27,6 @@
   <component name="ChangeListManager">
     <list default="true" id="cb08d02f-fd4f-4fa2-85fe-abd508fa83ac" name="Default Changelist" comment="10.12">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/cloud-server-account/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-account/pom.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/cloud-server-account/src/main/java/com/dsh/account/util/PayMoneyUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-account/src/main/java/com/dsh/account/util/PayMoneyUtil.java" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -70,9 +68,9 @@
   <component name="ProblemsViewState">
     <option name="selectedTabId" value="ProjectErrors" />
   </component>
-  <component name="ProjectColorInfo"><![CDATA[{
-  "associatedIndex": 3
-}]]></component>
+  <component name="ProjectColorInfo">{
+  &quot;associatedIndex&quot;: 3
+}</component>
   <component name="ProjectId" id="2T0poWYlZShlnPso29uxjn4gQQo" />
   <component name="ProjectLevelVcsManager" settingsEditedManually="true">
     <ConfirmationsSetting value="2" id="Add" />
@@ -81,20 +79,21 @@
     <option name="hideEmptyMiddlePackages" value="true" />
     <option name="showLibraryContents" value="true" />
   </component>
-  <component name="PropertiesComponent"><![CDATA[{
-  "keyToString": {
-    "RequestMappingsPanelOrder0": "0",
-    "RequestMappingsPanelOrder1": "1",
-    "RequestMappingsPanelWidth0": "75",
-    "RequestMappingsPanelWidth1": "75",
-    "WebServerToolWindowFactoryState": "false",
-    "git-widget-placeholder": "master",
-    "node.js.detected.package.eslint": "true",
-    "node.js.selected.package.eslint": "(autodetect)",
-    "node.js.selected.package.tslint": "(autodetect)",
-    "vue.rearranger.settings.migration": "true"
+  <component name="PropertiesComponent">{
+  &quot;keyToString&quot;: {
+    &quot;RequestMappingsPanelOrder0&quot;: &quot;0&quot;,
+    &quot;RequestMappingsPanelOrder1&quot;: &quot;1&quot;,
+    &quot;RequestMappingsPanelWidth0&quot;: &quot;75&quot;,
+    &quot;RequestMappingsPanelWidth1&quot;: &quot;75&quot;,
+    &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
+    &quot;git-widget-placeholder&quot;: &quot;master&quot;,
+    &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
+    &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
+    &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
+    &quot;settings.editor.selected.configurable&quot;: &quot;inlay.hints&quot;,
+    &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
   }
-}]]></component>
+}</component>
   <component name="ReactorSettings">
     <option name="notificationShown" value="true" />
   </component>
@@ -246,9 +245,9 @@
     <list>
       <item itemvalue="JUnit.AccountApplicationTests.contextLoads" />
       <item itemvalue="Spring Boot.ManagementApplication" />
+      <item itemvalue="Spring Boot.AccountApplication" />
       <item itemvalue="Spring Boot.GatewayApplication" />
       <item itemvalue="Spring Boot.OtherApplication" />
-      <item itemvalue="Spring Boot.AccountApplication" />
       <item itemvalue="Spring Boot.ActivityApplication" />
       <item itemvalue="Spring Boot.AuthApplication" />
       <item itemvalue="Spring Boot.CourseApplication" />
@@ -347,7 +346,11 @@
       <workItem from="1696917635013" duration="5121000" />
       <workItem from="1696847977356" duration="7435000" />
       <workItem from="1696898972818" duration="19012000" />
-      <workItem from="1696992350781" duration="1182000" />
+      <workItem from="1696992350781" duration="4934000" />
+      <workItem from="1697004175378" duration="3253000" />
+      <workItem from="1697007526233" duration="1089000" />
+      <workItem from="1697008680148" duration="240000" />
+      <workItem from="1697009049694" duration="2170000" />
     </task>
     <task id="LOCAL-00001" summary="后台代码删除">
       <created>1690249807612</created>
@@ -680,7 +683,31 @@
       <option name="project" value="LOCAL" />
       <updated>1696990659189</updated>
     </task>
-    <option name="localTasksCounter" value="44" />
+    <task id="LOCAL-00044" summary="10.11">
+      <option name="closed" value="true" />
+      <created>1696993684991</created>
+      <option name="number" value="00044" />
+      <option name="presentableId" value="LOCAL-00044" />
+      <option name="project" value="LOCAL" />
+      <updated>1696993684991</updated>
+    </task>
+    <task id="LOCAL-00045" summary="10.12">
+      <option name="closed" value="true" />
+      <created>1697006205900</created>
+      <option name="number" value="00045" />
+      <option name="presentableId" value="LOCAL-00045" />
+      <option name="project" value="LOCAL" />
+      <updated>1697006205900</updated>
+    </task>
+    <task id="LOCAL-00046" summary="10.12">
+      <option name="closed" value="true" />
+      <created>1697009748275</created>
+      <option name="number" value="00046" />
+      <option name="presentableId" value="LOCAL-00046" />
+      <option name="project" value="LOCAL" />
+      <updated>1697009748275</updated>
+    </task>
+    <option name="localTasksCounter" value="47" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
diff --git a/cloud-server-account/src/main/java/com/dsh/account/util/PayMoneyUtil.java b/cloud-server-account/src/main/java/com/dsh/account/util/PayMoneyUtil.java
index 4763861..f65d53e 100644
--- a/cloud-server-account/src/main/java/com/dsh/account/util/PayMoneyUtil.java
+++ b/cloud-server-account/src/main/java/com/dsh/account/util/PayMoneyUtil.java
@@ -24,6 +24,7 @@
 //import com.github.binarywang.wxpay.bean.profitsharingV3.ProfitSharingRequest;
 //import com.github.binarywang.wxpay.service.ProfitSharingV3Service;
 //import com.github.binarywang.wxpay.service.WxPayService;
+
 import org.apache.commons.collections.map.HashedMap;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.bouncycastle.jce.provider.BouncyCastleProvider;
diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java b/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java
index 4829342..e9a3473 100644
--- a/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java
+++ b/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java
@@ -238,6 +238,24 @@
         return mapList;
     }
 
+
+    @ResponseBody
+    @PostMapping("/base/coupon/queryCouponListSearch1")
+    public List<Map<String,Object>> getCouponListOfSearch1(@RequestBody CouponListOfSearch ofSearch){
+        List<Map<String, Object>> mapList = couponService.queryCouponListOfSearch1(ofSearch);
+        if (mapList.size() > 0){
+            for (Map<String, Object> stringObjectMap : mapList) {
+                Integer o = (Integer) stringObjectMap.get("id");
+                Object startTime = stringObjectMap.get("startTime");
+                Object endTime = stringObjectMap.get("endTime");
+                stringObjectMap.put("timeValue",startTime + "至"+endTime);
+                int count = ucService.count(new LambdaQueryWrapper<UserCoupon>()
+                        .eq(UserCoupon::getCouponId, o));
+                stringObjectMap.put("hasPickQty",count);
+            }
+        }
+        return mapList;
+    }
     @ResponseBody
     @PostMapping("/base/coupon/couponExamineListSearch")
     public List<Map<String,Object>> getCouponExamineListOfSearch(@RequestBody CouponExamineListSearch ofSearch){
diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/mapper/CouponMapper.java b/cloud-server-activity/src/main/java/com/dsh/activity/mapper/CouponMapper.java
index 091436a..a9439b1 100644
--- a/cloud-server-activity/src/main/java/com/dsh/activity/mapper/CouponMapper.java
+++ b/cloud-server-activity/src/main/java/com/dsh/activity/mapper/CouponMapper.java
@@ -34,6 +34,18 @@
 
                                                       );
 
+    List<Map<String, Object>> queryCouponListOfSearch1(@Param("name")String name,
+                                                      @Param("type")Integer type,
+                                                      @Param("distributionMethod")Integer distributionMethod,
+                                                      @Param("userPopulation")Integer userPopulation,
+                                                      @Param("status")Integer status,
+                                                      @Param("state")Integer state,
+                                                      @Param("page")Page<Map<String, Object>> page,
+                                                      @Param("cityCode") String cityCode,
+                                                      @Param("storeId")Integer storeId
+
+    );
+
     List<Map<String, Object>> queryCouponExamineList(@Param("name")String name,
                                                      @Param("type")Integer type,
                                                      @Param("userPopulation") Integer userPopulation,
diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/service/ICouponService.java b/cloud-server-activity/src/main/java/com/dsh/activity/service/ICouponService.java
index 3f7fcf6..28016ac 100644
--- a/cloud-server-activity/src/main/java/com/dsh/activity/service/ICouponService.java
+++ b/cloud-server-activity/src/main/java/com/dsh/activity/service/ICouponService.java
@@ -34,6 +34,8 @@
 
     List<Map<String, Object>> queryCouponListOfSearch(CouponListOfSearch ofSearch);
 
+    List<Map<String, Object>> queryCouponListOfSearch1(CouponListOfSearch ofSearch);
+
     List<Map<String, Object>> queryCouponExamineList(CouponExamineListSearch ofSearch);
 
     List<Map<String, Object>> listRecord(Page<Object> objectPage, Integer id, List<Integer> ids, Integer type);
diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java b/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java
index 0377fd4..dc3b928 100644
--- a/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java
+++ b/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java
@@ -109,6 +109,10 @@
     }
 
     @Override
+    public List<Map<String, Object>> queryCouponListOfSearch1(CouponListOfSearch ofSearch) {
+        return this.baseMapper.queryCouponListOfSearch1(ofSearch.getName(),ofSearch.getType(),ofSearch.getDistributionMethod(),ofSearch.getUserPopulation(),ofSearch.getStatus(),ofSearch.getState(),ofSearch.getPage(),ofSearch.getCityCode(),ofSearch.getStoreId());
+    }
+    @Override
     public List<Map<String, Object>> queryCouponExamineList(CouponExamineListSearch ofSearch) {
         return this.baseMapper.queryCouponExamineList(ofSearch.getName(),ofSearch.getType(),ofSearch.getUserPopulation(),ofSearch.getDistributionMethod(),ofSearch.getAuditStatus(),ofSearch.getPage());
     }
diff --git a/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml b/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
index 91343f2..6a859aa 100644
--- a/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
+++ b/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
@@ -64,6 +64,88 @@
         </if>
           order by insertTime desc
     </select>
+    <select id="queryCouponListOfSearch1" resultType="java.util.Map">
+        SELECT id,
+        `name`,
+        useScope,
+        `type`,
+        distributionMethod,
+        date_format(startTime ,'%Y-%m-%d') as startTime,
+        date_format(endTime ,'%Y-%m-%d') as endTime,
+        userPopulation,
+        quantityIssued,
+        pickUpQuantity,
+        `status`,
+        state,
+        illustrate
+        from t_coupon
+        where 1 = 1     and distributionMethod = 4
+        <if test="cityCode != null">
+            and id in(
+            SELECT DISTINCT couponId FROM
+
+            (SELECT DISTINCT couponId
+            from t_coupon_store
+            WHERE storeId = #{storeId}
+            UNION ALL
+            SELECT DISTINCT couponId
+
+            from t_coupon_city
+            WHERE provinceCode = #{cityCode}) o)
+        </if>
+        <if test="name != null">
+            and `name` like concat('%', #{name}, '%')
+        </if>
+        <if test="type != null">
+            and type = #{type}
+        </if>
+
+        <if test="userPopulation != null">
+            and userPopulation = #{userPopulation}
+        </if>
+        <if test="status !=null">
+            and `status` = #{status}
+        </if>
+        <if test="state != null">
+            and `state` = #{state}
+        </if>
+
+
+        union all
+        SELECT id,
+        `name`,
+        useScope,
+        `type`,
+        distributionMethod,
+        date_format(startTime ,'%Y-%m-%d') as startTime,
+        date_format(endTime ,'%Y-%m-%d') as endTime,
+        userPopulation,
+        quantityIssued,
+        pickUpQuantity,
+        `status`,
+        state,
+        illustrate
+        from t_coupon
+        where 1 = 1     and distributionMethod = 4  and useScope = 1
+
+        <if test="name != null">
+            and `name` like concat('%', #{name}, '%')
+        </if>
+        <if test="type != null">
+            and type = #{type}
+        </if>
+
+        <if test="userPopulation != null">
+            and userPopulation = #{userPopulation}
+        </if>
+        <if test="status !=null">
+            and `status` = #{status}
+        </if>
+        <if test="state != null">
+            and `state` = #{state}
+        </if>
+
+    </select>
     <select id="queryCouponExamineList" resultType="java.util.Map">
         SELECT id,
                `name`,
diff --git a/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java b/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java
index e90d072..0490859 100644
--- a/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java
+++ b/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java
@@ -18,6 +18,10 @@
     List<Map<String,Object>> getCouponListOfSearch(@RequestBody CouponListOfSearch ofSearch);
 
 
+    @PostMapping("/base/coupon/queryCouponListSearch1")
+    List<Map<String,Object>> getCouponListOfSearch1(@RequestBody CouponListOfSearch ofSearch);
+
+
     @PostMapping("/base/coupon/couponExamineListSearch")
     List<Map<String,Object>> getCouponExamineListOfSearch(@RequestBody CouponExamineListSearch ofSearch);
 
diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java
index adc2a64..d205961 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java
@@ -236,8 +236,11 @@
         ofSearch.setState(state);
         ofSearch.setCityCode(cityCode);
         ofSearch.setStoreId(storeId);
-        return client.getCouponListOfSearch(ofSearch);
+        return client.getCouponListOfSearch1(ofSearch);
     }
+
+
+
     @RequestMapping(value = "/listRecord")
     @ResponseBody
     public Object listRecord(Integer id,String name, Integer type, String phone) {
diff --git a/cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java b/cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java
index c957ee1..b0aef0f 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java
@@ -7,6 +7,9 @@
 import com.alipay.api.CertAlipayRequest;
 import com.alipay.api.DefaultAlipayClient;
 import com.alipay.api.domain.AlipayTradeAppPayModel;
+import com.alipay.api.domain.ExtendParams;
+import com.alipay.api.domain.RoyaltyDetailInfos;
+import com.alipay.api.domain.RoyaltyInfo;
 import com.alipay.api.request.*;
 import com.alipay.api.response.*;
 import org.apache.commons.collections.map.HashedMap;
@@ -19,6 +22,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.stereotype.Component;
 
+import javax.annotation.Resource;
 import javax.crypto.BadPaddingException;
 import javax.crypto.Cipher;
 import javax.crypto.IllegalBlockSizeException;
@@ -65,6 +69,7 @@
     private String alipay_root_cert_path = "C:/cert/alipay/user/alipay_root_cert_path.crt";//支付宝CA根证书文件路径
 
     private String certPath = "C:\\cert\\1523106371_20211206_cert\\apiclient_cert.p12";//微信证书
+
 
 
 
@@ -139,12 +144,56 @@
         model.setPassbackParams(passbackParams);//自定义参数
         request.setBizModel(model);
         request.setNotifyUrl(callbackPath + notifyUrl);
+
+
+
+        //分账
+//        Integer    coursePackagePayments = coursePackageClient.queryByCode(outTradeNo);
+//        Integer paymentCompetitions = competitionsClient.queryByCode(outTradeNo);
+//        Integer siteBookings = siteClient.queryByCode(outTradeNo);
+//        List<Integer> stores = new ArrayList<>();
+//        stores.add(coursePackagePayments);
+//        stores.add(paymentCompetitions);
+//        stores.add(siteBookings);
+
+//        OperatorUser operatorUser = siteClient.queryOperator(stores);
+//
+//        String alipayProportion = operatorUser.getAlipayProportion();
+//        String alipayNum = operatorUser.getAlipayNum();
+
+        ExtendParams extendParams = new ExtendParams();
+//        extendParams.setSysServiceProviderId("YOUR_SERVICE_PROVIDER_ID");
+        model.setExtendParams(extendParams);
+
+        RoyaltyInfo royaltyInfo = new RoyaltyInfo();
+//        royaltyInfo.setRoyaltyType("transfer");
+
+
+        RoyaltyDetailInfos royaltyDetailInfo1 = new RoyaltyDetailInfos();
+        royaltyDetailInfo1.setTransOutType("userId");
+        royaltyDetailInfo1.setTransOut(aliAppid);
+        royaltyDetailInfo1.setTransInType("loginName");
+        royaltyDetailInfo1.setTransIn("18398968484");
+
+        royaltyDetailInfo1.setDesc("分账描述1");
+        royaltyDetailInfo1.setAmountPercentage("10");
+        List<RoyaltyDetailInfos> royaltyDetailInfos = new ArrayList<>();
+
+
+
+
+        royaltyInfo.setRoyaltyDetailInfos(royaltyDetailInfos);
+        model.setRoyaltyInfo(royaltyInfo);
+        System.err.println("========royaltyInfo=========="+royaltyInfo);
+
+
+
         try {
             //这里和普通的接口调用不同,使用的是sdkExecute
             AlipayTradeAppPayResponse response = alipayClient.sdkExecute(request);
             Map<String, String> map = new HashMap<>();
             map.put("orderString", response.getBody());
-            System.out.println(map);//就是orderString 可以直接给客户端请求,无需再做处理。
+            System.err.println("========map=========="+map);//就是orderString 可以直接给客户端请求,无需再做处理。
             return ResultUtil.success(map);
         } catch (AlipayApiException e) {
             e.printStackTrace();

--
Gitblit v1.7.1