From 7fe6d026bcc8f993ce76437d01607e591cc671fe Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期六, 25 十一月 2023 17:20:02 +0800
Subject: [PATCH] 重写课包支付和排课逻辑

---
 cloud-server-activity/src/main/resources/mapper/CouponMapper.xml |   53 +++++++++++++++++++++++++++--------------------------
 1 files changed, 27 insertions(+), 26 deletions(-)

diff --git a/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml b/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
index 9d85767..bd3c2f5 100644
--- a/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
+++ b/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
@@ -7,12 +7,12 @@
 
     <select id="queryConponRuleOfJson" resultType="java.util.Map">
         SELECT JSON_EXTRACT(content, "$.conditionalAmount") as conditionalAmount,
-               JSON_EXTRACT(content, "$.deductionAmount")   as deductionAmount,
-               JSON_EXTRACT(content, "$.experienceName")   as experienceName
+        JSON_EXTRACT(content, "$.deductionAmount") as deductionAmount,
+        JSON_EXTRACT(content, "$.experienceName") as experienceName
         FROM t_coupon
         where 1=1
         <if test="id != null">
-            and  `id` = #{id}
+            and `id` = #{id}
         </if>
     </select>
     <select id="queryCouponListOfSearch" resultType="java.util.Map">
@@ -38,7 +38,7 @@
         </if>
 
         <if test="cityCode != null">
-           and id in(
+            and id in(
             SELECT DISTINCT couponId FROM
 
             (SELECT DISTINCT couponId
@@ -69,7 +69,7 @@
             and `state` = #{state}
         </if>
         and auditStatus = 2
-          order by insertTime desc
+        order by insertTime desc
     </select>
     <select id="queryCouponListOfSearch1" resultType="java.util.Map">
         SELECT id,
@@ -86,9 +86,9 @@
         state,
         illustrate
         from t_coupon
-        where 1 = 1     and distributionMethod = 4
+        where 1 = 1 and distributionMethod = 4
         and auditStatus = 2
-        and startTime  &lt; now()
+        and startTime &lt; now()
         <if test="cityCode != null">
             and id in(
             SELECT DISTINCT couponId FROM
@@ -134,9 +134,9 @@
         state,
         illustrate
         from t_coupon
-        where 1 = 1     and distributionMethod = 4  and useScope = 1
+        where 1 = 1 and distributionMethod = 4 and useScope = 1
         and auditStatus = 2
-        and startTime  &lt; now()
+        and startTime &lt; now()
         <if test="name != null">
             and `name` like concat('%', #{name}, '%')
         </if>
@@ -157,16 +157,16 @@
     </select>
     <select id="queryCouponExamineList" 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,
-               auditStatus,
+        `name`,
+        useScope,
+        `type`,
+        distributionMethod,
+        date_format(startTime ,'%Y-%m-%d') as startTime,
+        date_format(endTime ,'%Y-%m-%d') as endTime,
+        userPopulation,
+        quantityIssued,
+        pickUpQuantity,
+        auditStatus,
         publisherType,
         cityManagerId
         from t_coupon
@@ -189,13 +189,14 @@
         order by insertTime desc
     </select>
     <select id="listRecord" resultType="java.util.Map">
-        select id,userId,status  from t_user_coupon where couponId =#{id}
-        and userId in <foreach collection="ids" separator="," open="(" item="i" close=")">
-        #{i}
-    </foreach>
-    <if test="type !=null">
-        and status =#{type}
-    </if>
+        select id,userId,status from t_user_coupon where couponId =#{id}
+        and userId in
+        <foreach collection="ids" separator="," open="(" item="i" close=")">
+            #{i}
+        </foreach>
+        <if test="type !=null">
+            and status =#{type}
+        </if>
     </select>
 
 

--
Gitblit v1.7.1