颓废太子 hace 4 años
padre
commit
61c19406a2
Se han modificado 18 ficheros con 650 adiciones y 797 borrados
  1. 0 8
      java110-bean/src/main/java/com/java110/dto/couponDetail/CouponDetailDto.java
  2. 0 7
      java110-bean/src/main/java/com/java110/dto/couponPool/CouponPoolDto.java
  3. 0 8
      java110-bean/src/main/java/com/java110/dto/couponShopPool/CouponShopPoolDto.java
  4. 0 7
      java110-bean/src/main/java/com/java110/dto/couponShopPoolDetail/CouponShopPoolDetailDto.java
  5. 0 8
      java110-bean/src/main/java/com/java110/dto/couponUser/CouponUserDto.java
  6. 0 7
      java110-bean/src/main/java/com/java110/dto/couponUserDetail/CouponUserDetailDto.java
  7. 0 8
      java110-bean/src/main/java/com/java110/po/couponDetail/CouponDetailPo.java
  8. 0 7
      java110-bean/src/main/java/com/java110/po/couponPool/CouponPoolPo.java
  9. 0 8
      java110-bean/src/main/java/com/java110/po/couponShopPool/CouponShopPoolPo.java
  10. 0 7
      java110-bean/src/main/java/com/java110/po/couponShopPoolDetail/CouponShopPoolDetailPo.java
  11. 0 8
      java110-bean/src/main/java/com/java110/po/couponUser/CouponUserPo.java
  12. 111 122
      java110-db/src/main/resources/mapper/acct/CouponDetailV1ServiceDaoImplMapper.xml
  13. 111 122
      java110-db/src/main/resources/mapper/acct/CouponPoolV1ServiceDaoImplMapper.xml
  14. 130 140
      java110-db/src/main/resources/mapper/acct/CouponShopPoolDetailV1ServiceDaoImplMapper.xml
  15. 92 104
      java110-db/src/main/resources/mapper/acct/CouponShopPoolV1ServiceDaoImplMapper.xml
  16. 92 104
      java110-db/src/main/resources/mapper/acct/CouponUserDetailV1ServiceDaoImplMapper.xml
  17. 111 122
      java110-db/src/main/resources/mapper/acct/CouponUserV1ServiceDaoImplMapper.xml
  18. 3 0
      java110-generator/src/main/java/com/java110/code/TableToJson.java

+ 0 - 8
java110-bean/src/main/java/com/java110/dto/couponDetail/CouponDetailDto.java

@@ -23,7 +23,6 @@ private String validityDay;
 private String poolId;
 private String detailId;
 private String shopId;
-private String primary;
 
 
     private Date createTime;
@@ -85,13 +84,6 @@ public String getShopId() {
 public void setShopId(String shopId) {
         this.shopId = shopId;
     }
-public String getPrimary() {
-        return primary;
-    }
-public void setPrimary(String primary) {
-        this.primary = primary;
-    }
-
 
     public Date getCreateTime() {
         return createTime;

+ 0 - 7
java110-bean/src/main/java/com/java110/dto/couponPool/CouponPoolDto.java

@@ -23,7 +23,6 @@ private String couponType;
 private String poolId;
 private String state;
 private String seq;
-private String primary;
 
 
     private Date createTime;
@@ -85,12 +84,6 @@ public String getSeq() {
 public void setSeq(String seq) {
         this.seq = seq;
     }
-public String getPrimary() {
-        return primary;
-    }
-public void setPrimary(String primary) {
-        this.primary = primary;
-    }
 
 
     public Date getCreateTime() {

+ 0 - 8
java110-bean/src/main/java/com/java110/dto/couponShopPool/CouponShopPoolDto.java

@@ -21,7 +21,6 @@ private String poolId;
 private String shopId;
 private String stock;
 private String spId;
-private String primary;
 
 
     private Date createTime;
@@ -71,13 +70,6 @@ public String getSpId() {
 public void setSpId(String spId) {
         this.spId = spId;
     }
-public String getPrimary() {
-        return primary;
-    }
-public void setPrimary(String primary) {
-        this.primary = primary;
-    }
-
 
     public Date getCreateTime() {
         return createTime;

+ 0 - 7
java110-bean/src/main/java/com/java110/dto/couponShopPoolDetail/CouponShopPoolDetailDto.java

@@ -25,7 +25,6 @@ private String userId;
 private String poolId;
 private String tel;
 private String shopId;
-private String primary;
 
 
     private Date createTime;
@@ -99,12 +98,6 @@ public String getShopId() {
 public void setShopId(String shopId) {
         this.shopId = shopId;
     }
-public String getPrimary() {
-        return primary;
-    }
-public void setPrimary(String primary) {
-        this.primary = primary;
-    }
 
 
     public Date getCreateTime() {

+ 0 - 8
java110-bean/src/main/java/com/java110/dto/couponUser/CouponUserDto.java

@@ -23,7 +23,6 @@ private String state;
 private String couponId;
 private String userName;
 private String userId;
-private String primary;
 
 
     private Date createTime;
@@ -85,13 +84,6 @@ public String getUserId() {
 public void setUserId(String userId) {
         this.userId = userId;
     }
-public String getPrimary() {
-        return primary;
-    }
-public void setPrimary(String primary) {
-        this.primary = primary;
-    }
-
 
     public Date getCreateTime() {
         return createTime;

+ 0 - 7
java110-bean/src/main/java/com/java110/dto/couponUserDetail/CouponUserDetailDto.java

@@ -21,7 +21,6 @@ private String couponId;
 private String userName;
 private String userId;
 private String objType;
-private String primary;
 
 
     private Date createTime;
@@ -71,12 +70,6 @@ public String getObjType() {
 public void setObjType(String objType) {
         this.objType = objType;
     }
-public String getPrimary() {
-        return primary;
-    }
-public void setPrimary(String primary) {
-        this.primary = primary;
-    }
 
 
     public Date getCreateTime() {

+ 0 - 8
java110-bean/src/main/java/com/java110/po/couponDetail/CouponDetailPo.java

@@ -37,7 +37,6 @@ private String poolId;
 private String detailId;
 private String statusCd = "0";
 private String shopId;
-private String primary;
 public String getBuyPrice() {
         return buyPrice;
     }
@@ -98,13 +97,6 @@ public String getShopId() {
 public void setShopId(String shopId) {
         this.shopId = shopId;
     }
-public String getPrimary() {
-        return primary;
-    }
-public void setPrimary(String primary) {
-        this.primary = primary;
-    }
-
 
 
 }

+ 0 - 7
java110-bean/src/main/java/com/java110/po/couponPool/CouponPoolPo.java

@@ -37,7 +37,6 @@ private String poolId;
 private String statusCd = "0";
 private String state;
 private String seq;
-private String primary;
 public String getBuyPrice() {
         return buyPrice;
     }
@@ -98,12 +97,6 @@ public String getSeq() {
 public void setSeq(String seq) {
         this.seq = seq;
     }
-public String getPrimary() {
-        return primary;
-    }
-public void setPrimary(String primary) {
-        this.primary = primary;
-    }
 
 
 

+ 0 - 8
java110-bean/src/main/java/com/java110/po/couponShopPool/CouponShopPoolPo.java

@@ -35,7 +35,6 @@ private String statusCd = "0";
 private String shopId;
 private String stock;
 private String spId;
-private String primary;
 public String getCouponName() {
         return couponName;
     }
@@ -84,13 +83,6 @@ public String getSpId() {
 public void setSpId(String spId) {
         this.spId = spId;
     }
-public String getPrimary() {
-        return primary;
-    }
-public void setPrimary(String primary) {
-        this.primary = primary;
-    }
-
 
 
 }

+ 0 - 7
java110-bean/src/main/java/com/java110/po/couponShopPoolDetail/CouponShopPoolDetailPo.java

@@ -39,7 +39,6 @@ private String userId;
 private String poolId;
 private String tel;
 private String shopId;
-private String primary;
 public String getCouponName() {
         return couponName;
     }
@@ -112,12 +111,6 @@ public String getShopId() {
 public void setShopId(String shopId) {
         this.shopId = shopId;
     }
-public String getPrimary() {
-        return primary;
-    }
-public void setPrimary(String primary) {
-        this.primary = primary;
-    }
 
 
 

+ 0 - 8
java110-bean/src/main/java/com/java110/po/couponUser/CouponUserPo.java

@@ -37,7 +37,6 @@ private String state;
 private String couponId;
 private String userName;
 private String userId;
-private String primary;
 public String getCouponName() {
         return couponName;
     }
@@ -98,13 +97,6 @@ public String getUserId() {
 public void setUserId(String userId) {
         this.userId = userId;
     }
-public String getPrimary() {
-        return primary;
-    }
-public void setPrimary(String primary) {
-        this.primary = primary;
-    }
-
 
 
 }

+ 111 - 122
java110-db/src/main/resources/mapper/acct/CouponDetailV1ServiceDaoImplMapper.xml

@@ -5,147 +5,136 @@
 <mapper namespace="couponDetailV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存商家购买记录表信息 add by wuxw 2018-07-03 -->
     <insert id="saveCouponDetailInfo" parameterType="Map">
         insert into coupon_detail(
-buy_price,coupon_name,amount,buy_count,actual_price,validity_day,pool_id,detail_id,shop_id,PRIMARY
-) values (
-#{buyPrice},#{couponName},#{amount},#{buyCount},#{actualPrice},#{validityDay},#{poolId},#{detailId},#{shopId},#{primary}
-)
+        buy_price,coupon_name,amount,buy_count,actual_price,validity_day,pool_id,detail_id,shop_id
+        ) values (
+        #{buyPrice},#{couponName},#{amount},#{buyCount},#{actualPrice},#{validityDay},#{poolId},#{detailId},#{shopId}
+        )
     </insert>
 
 
-
     <!-- 查询商家购买记录表信息 add by wuxw 2018-07-03 -->
     <select id="getCouponDetailInfo" parameterType="Map" resultType="Map">
-        select  t.buy_price,t.buy_price buyPrice,t.coupon_name,t.coupon_name couponName,t.amount,t.buy_count,t.buy_count buyCount,t.actual_price,t.actual_price actualPrice,t.validity_day,t.validity_day validityDay,t.pool_id,t.pool_id poolId,t.detail_id,t.detail_id detailId,t.status_cd,t.status_cd statusCd,t.shop_id,t.shop_id shopId,t.PRIMARY,t.PRIMARY primary 
-from coupon_detail t 
-where 1 =1 
-<if test="buyPrice !=null and buyPrice != ''">
-   and t.buy_price= #{buyPrice}
-</if> 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="amount !=null and amount != ''">
-   and t.amount= #{amount}
-</if> 
-<if test="buyCount !=null and buyCount != ''">
-   and t.buy_count= #{buyCount}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-   and t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-   and t.validity_day= #{validityDay}
-</if> 
-<if test="poolId !=null and poolId != ''">
-   and t.pool_id= #{poolId}
-</if> 
-<if test="detailId !=null and detailId != ''">
-   and t.detail_id= #{detailId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="shopId !=null and shopId != ''">
-   and t.shop_id= #{shopId}
-</if> 
-<if test="primary !=null and primary != ''">
-   and t.PRIMARY= #{primary}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.buy_price,t.buy_price buyPrice,t.coupon_name,t.coupon_name couponName,t.amount,t.buy_count,t.buy_count
+        buyCount,t.actual_price,t.actual_price actualPrice,t.validity_day,t.validity_day validityDay,t.pool_id,t.pool_id
+        poolId,t.detail_id,t.detail_id detailId,t.status_cd,t.status_cd statusCd,t.shop_id,t.shop_id
+        shopId
+        from coupon_detail t
+        where 1 =1
+        <if test="buyPrice !=null and buyPrice != ''">
+            and t.buy_price= #{buyPrice}
+        </if>
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="amount !=null and amount != ''">
+            and t.amount= #{amount}
+        </if>
+        <if test="buyCount !=null and buyCount != ''">
+            and t.buy_count= #{buyCount}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            and t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            and t.validity_day= #{validityDay}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            and t.pool_id= #{poolId}
+        </if>
+        <if test="detailId !=null and detailId != ''">
+            and t.detail_id= #{detailId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            and t.shop_id= #{shopId}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改商家购买记录表信息 add by wuxw 2018-07-03 -->
     <update id="updateCouponDetailInfo" parameterType="Map">
-        update  coupon_detail t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="buyPrice !=null and buyPrice != ''">
-, t.buy_price= #{buyPrice}
-</if> 
-<if test="couponName !=null and couponName != ''">
-, t.coupon_name= #{couponName}
-</if> 
-<if test="amount !=null and amount != ''">
-, t.amount= #{amount}
-</if> 
-<if test="buyCount !=null and buyCount != ''">
-, t.buy_count= #{buyCount}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-, t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-, t.validity_day= #{validityDay}
-</if> 
-<if test="poolId !=null and poolId != ''">
-, t.pool_id= #{poolId}
-</if> 
-<if test="shopId !=null and shopId != ''">
-, t.shop_id= #{shopId}
-</if> 
-<if test="primary !=null and primary != ''">
-, t.PRIMARY= #{primary}
-</if> 
- where 1=1 <if test="detailId !=null and detailId != ''">
-and t.detail_id= #{detailId}
-</if> 
+        update coupon_detail t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="buyPrice !=null and buyPrice != ''">
+            , t.buy_price= #{buyPrice}
+        </if>
+        <if test="couponName !=null and couponName != ''">
+            , t.coupon_name= #{couponName}
+        </if>
+        <if test="amount !=null and amount != ''">
+            , t.amount= #{amount}
+        </if>
+        <if test="buyCount !=null and buyCount != ''">
+            , t.buy_count= #{buyCount}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            , t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            , t.validity_day= #{validityDay}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            , t.pool_id= #{poolId}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            , t.shop_id= #{shopId}
+        </if>
+        where 1=1
+        <if test="detailId !=null and detailId != ''">
+            and t.detail_id= #{detailId}
+        </if>
 
     </update>
 
     <!-- 查询商家购买记录表数量 add by wuxw 2018-07-03 -->
-     <select id="queryCouponDetailsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from coupon_detail t 
-where 1 =1 
-<if test="buyPrice !=null and buyPrice != ''">
-   and t.buy_price= #{buyPrice}
-</if> 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="amount !=null and amount != ''">
-   and t.amount= #{amount}
-</if> 
-<if test="buyCount !=null and buyCount != ''">
-   and t.buy_count= #{buyCount}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-   and t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-   and t.validity_day= #{validityDay}
-</if> 
-<if test="poolId !=null and poolId != ''">
-   and t.pool_id= #{poolId}
-</if> 
-<if test="detailId !=null and detailId != ''">
-   and t.detail_id= #{detailId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="shopId !=null and shopId != ''">
-   and t.shop_id= #{shopId}
-</if> 
-<if test="primary !=null and primary != ''">
-   and t.PRIMARY= #{primary}
-</if> 
+    <select id="queryCouponDetailsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from coupon_detail t
+        where 1 =1
+        <if test="buyPrice !=null and buyPrice != ''">
+            and t.buy_price= #{buyPrice}
+        </if>
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="amount !=null and amount != ''">
+            and t.amount= #{amount}
+        </if>
+        <if test="buyCount !=null and buyCount != ''">
+            and t.buy_count= #{buyCount}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            and t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            and t.validity_day= #{validityDay}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            and t.pool_id= #{poolId}
+        </if>
+        <if test="detailId !=null and detailId != ''">
+            and t.detail_id= #{detailId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            and t.shop_id= #{shopId}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 111 - 122
java110-db/src/main/resources/mapper/acct/CouponPoolV1ServiceDaoImplMapper.xml

@@ -5,147 +5,136 @@
 <mapper namespace="couponPoolV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存优惠券池信息 add by wuxw 2018-07-03 -->
     <insert id="saveCouponPoolInfo" parameterType="Map">
         insert into coupon_pool(
-buy_price,coupon_name,coupon_stock,actual_price,validity_day,coupon_type,pool_id,state,seq,PRIMARY
-) values (
-#{buyPrice},#{couponName},#{couponStock},#{actualPrice},#{validityDay},#{couponType},#{poolId},#{state},#{seq},#{primary}
-)
+        buy_price,coupon_name,coupon_stock,actual_price,validity_day,coupon_type,pool_id,state,seq
+        ) values (
+        #{buyPrice},#{couponName},#{couponStock},#{actualPrice},#{validityDay},#{couponType},#{poolId},#{state},#{seq}
+        )
     </insert>
 
 
-
     <!-- 查询优惠券池信息 add by wuxw 2018-07-03 -->
     <select id="getCouponPoolInfo" parameterType="Map" resultType="Map">
-        select  t.buy_price,t.buy_price buyPrice,t.coupon_name,t.coupon_name couponName,t.coupon_stock,t.coupon_stock couponStock,t.actual_price,t.actual_price actualPrice,t.validity_day,t.validity_day validityDay,t.coupon_type,t.coupon_type couponType,t.pool_id,t.pool_id poolId,t.status_cd,t.status_cd statusCd,t.state,t.seq,t.PRIMARY,t.PRIMARY primary 
-from coupon_pool t 
-where 1 =1 
-<if test="buyPrice !=null and buyPrice != ''">
-   and t.buy_price= #{buyPrice}
-</if> 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="couponStock !=null and couponStock != ''">
-   and t.coupon_stock= #{couponStock}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-   and t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-   and t.validity_day= #{validityDay}
-</if> 
-<if test="couponType !=null and couponType != ''">
-   and t.coupon_type= #{couponType}
-</if> 
-<if test="poolId !=null and poolId != ''">
-   and t.pool_id= #{poolId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="seq !=null and seq != ''">
-   and t.seq= #{seq}
-</if> 
-<if test="primary !=null and primary != ''">
-   and t.PRIMARY= #{primary}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.buy_price,t.buy_price buyPrice,t.coupon_name,t.coupon_name couponName,t.coupon_stock,t.coupon_stock
+        couponStock,t.actual_price,t.actual_price actualPrice,t.validity_day,t.validity_day
+        validityDay,t.coupon_type,t.coupon_type couponType,t.pool_id,t.pool_id poolId,t.status_cd,t.status_cd
+        statusCd,t.state,t.seq
+        from coupon_pool t
+        where 1 =1
+        <if test="buyPrice !=null and buyPrice != ''">
+            and t.buy_price= #{buyPrice}
+        </if>
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="couponStock !=null and couponStock != ''">
+            and t.coupon_stock= #{couponStock}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            and t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            and t.validity_day= #{validityDay}
+        </if>
+        <if test="couponType !=null and couponType != ''">
+            and t.coupon_type= #{couponType}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            and t.pool_id= #{poolId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="seq !=null and seq != ''">
+            and t.seq= #{seq}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改优惠券池信息 add by wuxw 2018-07-03 -->
     <update id="updateCouponPoolInfo" parameterType="Map">
-        update  coupon_pool t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="buyPrice !=null and buyPrice != ''">
-, t.buy_price= #{buyPrice}
-</if> 
-<if test="couponName !=null and couponName != ''">
-, t.coupon_name= #{couponName}
-</if> 
-<if test="couponStock !=null and couponStock != ''">
-, t.coupon_stock= #{couponStock}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-, t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-, t.validity_day= #{validityDay}
-</if> 
-<if test="couponType !=null and couponType != ''">
-, t.coupon_type= #{couponType}
-</if> 
-<if test="state !=null and state != ''">
-, t.state= #{state}
-</if> 
-<if test="seq !=null and seq != ''">
-, t.seq= #{seq}
-</if> 
-<if test="primary !=null and primary != ''">
-, t.PRIMARY= #{primary}
-</if> 
- where 1=1 <if test="poolId !=null and poolId != ''">
-and t.pool_id= #{poolId}
-</if> 
+        update coupon_pool t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="buyPrice !=null and buyPrice != ''">
+            , t.buy_price= #{buyPrice}
+        </if>
+        <if test="couponName !=null and couponName != ''">
+            , t.coupon_name= #{couponName}
+        </if>
+        <if test="couponStock !=null and couponStock != ''">
+            , t.coupon_stock= #{couponStock}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            , t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            , t.validity_day= #{validityDay}
+        </if>
+        <if test="couponType !=null and couponType != ''">
+            , t.coupon_type= #{couponType}
+        </if>
+        <if test="state !=null and state != ''">
+            , t.state= #{state}
+        </if>
+        <if test="seq !=null and seq != ''">
+            , t.seq= #{seq}
+        </if>
+        where 1=1
+        <if test="poolId !=null and poolId != ''">
+            and t.pool_id= #{poolId}
+        </if>
 
     </update>
 
     <!-- 查询优惠券池数量 add by wuxw 2018-07-03 -->
-     <select id="queryCouponPoolsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from coupon_pool t 
-where 1 =1 
-<if test="buyPrice !=null and buyPrice != ''">
-   and t.buy_price= #{buyPrice}
-</if> 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="couponStock !=null and couponStock != ''">
-   and t.coupon_stock= #{couponStock}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-   and t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-   and t.validity_day= #{validityDay}
-</if> 
-<if test="couponType !=null and couponType != ''">
-   and t.coupon_type= #{couponType}
-</if> 
-<if test="poolId !=null and poolId != ''">
-   and t.pool_id= #{poolId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="seq !=null and seq != ''">
-   and t.seq= #{seq}
-</if> 
-<if test="primary !=null and primary != ''">
-   and t.PRIMARY= #{primary}
-</if> 
+    <select id="queryCouponPoolsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from coupon_pool t
+        where 1 =1
+        <if test="buyPrice !=null and buyPrice != ''">
+            and t.buy_price= #{buyPrice}
+        </if>
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="couponStock !=null and couponStock != ''">
+            and t.coupon_stock= #{couponStock}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            and t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            and t.validity_day= #{validityDay}
+        </if>
+        <if test="couponType !=null and couponType != ''">
+            and t.coupon_type= #{couponType}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            and t.pool_id= #{poolId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="seq !=null and seq != ''">
+            and t.seq= #{seq}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 130 - 140
java110-db/src/main/resources/mapper/acct/CouponShopPoolDetailV1ServiceDaoImplMapper.xml

@@ -5,165 +5,155 @@
 <mapper namespace="couponShopPoolDetailV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存商家赠送记录信息 add by wuxw 2018-07-03 -->
     <insert id="saveCouponShopPoolDetailInfo" parameterType="Map">
         insert into coupon_shop_pool_detail(
-coupon_name,actual_price,validity_day,detail_id,send_count,user_name,sp_id,user_id,pool_id,tel,shop_id,PRIMARY
-) values (
-#{couponName},#{actualPrice},#{validityDay},#{detailId},#{sendCount},#{userName},#{spId},#{userId},#{poolId},#{tel},#{shopId},#{primary}
-)
+        coupon_name,actual_price,validity_day,detail_id,send_count,user_name,sp_id,user_id,pool_id,tel,shop_id
+        ) values (
+        #{couponName},#{actualPrice},#{validityDay},#{detailId},#{sendCount},#{userName},#{spId},#{userId},
+        #{poolId},#{tel},#{shopId}
+        )
     </insert>
 
 
-
     <!-- 查询商家赠送记录信息 add by wuxw 2018-07-03 -->
     <select id="getCouponShopPoolDetailInfo" parameterType="Map" resultType="Map">
-        select  t.coupon_name,t.coupon_name couponName,t.actual_price,t.actual_price actualPrice,t.validity_day,t.validity_day validityDay,t.detail_id,t.detail_id detailId,t.status_cd,t.status_cd statusCd,t.send_count,t.send_count sendCount,t.user_name,t.user_name userName,t.sp_id,t.sp_id spId,t.user_id,t.user_id userId,t.pool_id,t.pool_id poolId,t.tel,t.shop_id,t.shop_id shopId,t.PRIMARY,t.PRIMARY primary 
-from coupon_shop_pool_detail t 
-where 1 =1 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-   and t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-   and t.validity_day= #{validityDay}
-</if> 
-<if test="detailId !=null and detailId != ''">
-   and t.detail_id= #{detailId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="sendCount !=null and sendCount != ''">
-   and t.send_count= #{sendCount}
-</if> 
-<if test="userName !=null and userName != ''">
-   and t.user_name= #{userName}
-</if> 
-<if test="spId !=null and spId != ''">
-   and t.sp_id= #{spId}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="poolId !=null and poolId != ''">
-   and t.pool_id= #{poolId}
-</if> 
-<if test="tel !=null and tel != ''">
-   and t.tel= #{tel}
-</if> 
-<if test="shopId !=null and shopId != ''">
-   and t.shop_id= #{shopId}
-</if> 
-<if test="primary !=null and primary != ''">
-   and t.PRIMARY= #{primary}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.coupon_name,t.coupon_name couponName,t.actual_price,t.actual_price
+        actualPrice,t.validity_day,t.validity_day validityDay,t.detail_id,t.detail_id detailId,t.status_cd,t.status_cd
+        statusCd,t.send_count,t.send_count sendCount,t.user_name,t.user_name userName,t.sp_id,t.sp_id
+        spId,t.user_id,t.user_id userId,t.pool_id,t.pool_id poolId,t.tel,t.shop_id,t.shop_id shopId
+        from coupon_shop_pool_detail t
+        where 1 =1
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            and t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            and t.validity_day= #{validityDay}
+        </if>
+        <if test="detailId !=null and detailId != ''">
+            and t.detail_id= #{detailId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="sendCount !=null and sendCount != ''">
+            and t.send_count= #{sendCount}
+        </if>
+        <if test="userName !=null and userName != ''">
+            and t.user_name= #{userName}
+        </if>
+        <if test="spId !=null and spId != ''">
+            and t.sp_id= #{spId}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            and t.pool_id= #{poolId}
+        </if>
+        <if test="tel !=null and tel != ''">
+            and t.tel= #{tel}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            and t.shop_id= #{shopId}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改商家赠送记录信息 add by wuxw 2018-07-03 -->
     <update id="updateCouponShopPoolDetailInfo" parameterType="Map">
-        update  coupon_shop_pool_detail t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="couponName !=null and couponName != ''">
-, t.coupon_name= #{couponName}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-, t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-, t.validity_day= #{validityDay}
-</if> 
-<if test="sendCount !=null and sendCount != ''">
-, t.send_count= #{sendCount}
-</if> 
-<if test="userName !=null and userName != ''">
-, t.user_name= #{userName}
-</if> 
-<if test="spId !=null and spId != ''">
-, t.sp_id= #{spId}
-</if> 
-<if test="userId !=null and userId != ''">
-, t.user_id= #{userId}
-</if> 
-<if test="poolId !=null and poolId != ''">
-, t.pool_id= #{poolId}
-</if> 
-<if test="tel !=null and tel != ''">
-, t.tel= #{tel}
-</if> 
-<if test="shopId !=null and shopId != ''">
-, t.shop_id= #{shopId}
-</if> 
-<if test="primary !=null and primary != ''">
-, t.PRIMARY= #{primary}
-</if> 
- where 1=1 <if test="detailId !=null and detailId != ''">
-and t.detail_id= #{detailId}
-</if> 
+        update coupon_shop_pool_detail t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="couponName !=null and couponName != ''">
+            , t.coupon_name= #{couponName}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            , t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            , t.validity_day= #{validityDay}
+        </if>
+        <if test="sendCount !=null and sendCount != ''">
+            , t.send_count= #{sendCount}
+        </if>
+        <if test="userName !=null and userName != ''">
+            , t.user_name= #{userName}
+        </if>
+        <if test="spId !=null and spId != ''">
+            , t.sp_id= #{spId}
+        </if>
+        <if test="userId !=null and userId != ''">
+            , t.user_id= #{userId}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            , t.pool_id= #{poolId}
+        </if>
+        <if test="tel !=null and tel != ''">
+            , t.tel= #{tel}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            , t.shop_id= #{shopId}
+        </if>
+        where 1=1
+        <if test="detailId !=null and detailId != ''">
+            and t.detail_id= #{detailId}
+        </if>
 
     </update>
 
     <!-- 查询商家赠送记录数量 add by wuxw 2018-07-03 -->
-     <select id="queryCouponShopPoolDetailsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from coupon_shop_pool_detail t 
-where 1 =1 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-   and t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-   and t.validity_day= #{validityDay}
-</if> 
-<if test="detailId !=null and detailId != ''">
-   and t.detail_id= #{detailId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="sendCount !=null and sendCount != ''">
-   and t.send_count= #{sendCount}
-</if> 
-<if test="userName !=null and userName != ''">
-   and t.user_name= #{userName}
-</if> 
-<if test="spId !=null and spId != ''">
-   and t.sp_id= #{spId}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="poolId !=null and poolId != ''">
-   and t.pool_id= #{poolId}
-</if> 
-<if test="tel !=null and tel != ''">
-   and t.tel= #{tel}
-</if> 
-<if test="shopId !=null and shopId != ''">
-   and t.shop_id= #{shopId}
-</if> 
-<if test="primary !=null and primary != ''">
-   and t.PRIMARY= #{primary}
-</if> 
+    <select id="queryCouponShopPoolDetailsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from coupon_shop_pool_detail t
+        where 1 =1
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            and t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            and t.validity_day= #{validityDay}
+        </if>
+        <if test="detailId !=null and detailId != ''">
+            and t.detail_id= #{detailId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="sendCount !=null and sendCount != ''">
+            and t.send_count= #{sendCount}
+        </if>
+        <if test="userName !=null and userName != ''">
+            and t.user_name= #{userName}
+        </if>
+        <if test="spId !=null and spId != ''">
+            and t.sp_id= #{spId}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            and t.pool_id= #{poolId}
+        </if>
+        <if test="tel !=null and tel != ''">
+            and t.tel= #{tel}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            and t.shop_id= #{shopId}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 92 - 104
java110-db/src/main/resources/mapper/acct/CouponShopPoolV1ServiceDaoImplMapper.xml

@@ -5,129 +5,117 @@
 <mapper namespace="couponShopPoolV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存商家优惠券池信息 add by wuxw 2018-07-03 -->
     <insert id="saveCouponShopPoolInfo" parameterType="Map">
         insert into coupon_shop_pool(
-coupon_name,actual_price,validity_day,pool_id,shop_id,stock,sp_id,PRIMARY
-) values (
-#{couponName},#{actualPrice},#{validityDay},#{poolId},#{shopId},#{stock},#{spId},#{primary}
-)
+        coupon_name,actual_price,validity_day,pool_id,shop_id,stock,sp_id
+        ) values (
+        #{couponName},#{actualPrice},#{validityDay},#{poolId},#{shopId},#{stock},#{spId}
+        )
     </insert>
 
 
-
     <!-- 查询商家优惠券池信息 add by wuxw 2018-07-03 -->
     <select id="getCouponShopPoolInfo" parameterType="Map" resultType="Map">
-        select  t.coupon_name,t.coupon_name couponName,t.actual_price,t.actual_price actualPrice,t.validity_day,t.validity_day validityDay,t.pool_id,t.pool_id poolId,t.status_cd,t.status_cd statusCd,t.shop_id,t.shop_id shopId,t.stock,t.sp_id,t.sp_id spId,t.PRIMARY,t.PRIMARY primary 
-from coupon_shop_pool t 
-where 1 =1 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-   and t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-   and t.validity_day= #{validityDay}
-</if> 
-<if test="poolId !=null and poolId != ''">
-   and t.pool_id= #{poolId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="shopId !=null and shopId != ''">
-   and t.shop_id= #{shopId}
-</if> 
-<if test="stock !=null and stock != ''">
-   and t.stock= #{stock}
-</if> 
-<if test="spId !=null and spId != ''">
-   and t.sp_id= #{spId}
-</if> 
-<if test="primary !=null and primary != ''">
-   and t.PRIMARY= #{primary}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.coupon_name,t.coupon_name couponName,t.actual_price,t.actual_price
+        actualPrice,t.validity_day,t.validity_day validityDay,t.pool_id,t.pool_id poolId,t.status_cd,t.status_cd
+        statusCd,t.shop_id,t.shop_id shopId,t.stock,t.sp_id,t.sp_id spId
+        from coupon_shop_pool t
+        where 1 =1
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            and t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            and t.validity_day= #{validityDay}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            and t.pool_id= #{poolId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            and t.shop_id= #{shopId}
+        </if>
+        <if test="stock !=null and stock != ''">
+            and t.stock= #{stock}
+        </if>
+        <if test="spId !=null and spId != ''">
+            and t.sp_id= #{spId}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改商家优惠券池信息 add by wuxw 2018-07-03 -->
     <update id="updateCouponShopPoolInfo" parameterType="Map">
-        update  coupon_shop_pool t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="couponName !=null and couponName != ''">
-, t.coupon_name= #{couponName}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-, t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-, t.validity_day= #{validityDay}
-</if> 
-<if test="poolId !=null and poolId != ''">
-, t.pool_id= #{poolId}
-</if> 
-<if test="shopId !=null and shopId != ''">
-, t.shop_id= #{shopId}
-</if> 
-<if test="stock !=null and stock != ''">
-, t.stock= #{stock}
-</if> 
-<if test="primary !=null and primary != ''">
-, t.PRIMARY= #{primary}
-</if> 
- where 1=1 <if test="spId !=null and spId != ''">
-and t.sp_id= #{spId}
-</if> 
+        update coupon_shop_pool t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="couponName !=null and couponName != ''">
+            , t.coupon_name= #{couponName}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            , t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            , t.validity_day= #{validityDay}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            , t.pool_id= #{poolId}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            , t.shop_id= #{shopId}
+        </if>
+        <if test="stock !=null and stock != ''">
+            , t.stock= #{stock}
+        </if>
+        where 1=1
+        <if test="spId !=null and spId != ''">
+            and t.sp_id= #{spId}
+        </if>
 
     </update>
 
     <!-- 查询商家优惠券池数量 add by wuxw 2018-07-03 -->
-     <select id="queryCouponShopPoolsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from coupon_shop_pool t 
-where 1 =1 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-   and t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-   and t.validity_day= #{validityDay}
-</if> 
-<if test="poolId !=null and poolId != ''">
-   and t.pool_id= #{poolId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="shopId !=null and shopId != ''">
-   and t.shop_id= #{shopId}
-</if> 
-<if test="stock !=null and stock != ''">
-   and t.stock= #{stock}
-</if> 
-<if test="spId !=null and spId != ''">
-   and t.sp_id= #{spId}
-</if> 
-<if test="primary !=null and primary != ''">
-   and t.PRIMARY= #{primary}
-</if> 
+    <select id="queryCouponShopPoolsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from coupon_shop_pool t
+        where 1 =1
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            and t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            and t.validity_day= #{validityDay}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            and t.pool_id= #{poolId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            and t.shop_id= #{shopId}
+        </if>
+        <if test="stock !=null and stock != ''">
+            and t.stock= #{stock}
+        </if>
+        <if test="spId !=null and spId != ''">
+            and t.sp_id= #{spId}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 92 - 104
java110-db/src/main/resources/mapper/acct/CouponUserDetailV1ServiceDaoImplMapper.xml

@@ -5,129 +5,117 @@
 <mapper namespace="couponUserDetailV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存用户抵消记录信息 add by wuxw 2018-07-03 -->
     <insert id="saveCouponUserDetailInfo" parameterType="Map">
         insert into coupon_user_detail(
-coupon_name,uo_id,obj_id,coupon_id,user_name,user_id,obj_type,PRIMARY
-) values (
-#{couponName},#{uoId},#{objId},#{couponId},#{userName},#{userId},#{objType},#{primary}
-)
+        coupon_name,uo_id,obj_id,coupon_id,user_name,user_id,obj_type
+        ) values (
+        #{couponName},#{uoId},#{objId},#{couponId},#{userName},#{userId},#{objType}
+        )
     </insert>
 
 
-
     <!-- 查询用户抵消记录信息 add by wuxw 2018-07-03 -->
     <select id="getCouponUserDetailInfo" parameterType="Map" resultType="Map">
-        select  t.coupon_name,t.coupon_name couponName,t.uo_id,t.uo_id uoId,t.obj_id,t.obj_id objId,t.status_cd,t.status_cd statusCd,t.coupon_id,t.coupon_id couponId,t.user_name,t.user_name userName,t.user_id,t.user_id userId,t.obj_type,t.obj_type objType,t.PRIMARY,t.PRIMARY primary 
-from coupon_user_detail t 
-where 1 =1 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="uoId !=null and uoId != ''">
-   and t.uo_id= #{uoId}
-</if> 
-<if test="objId !=null and objId != ''">
-   and t.obj_id= #{objId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="couponId !=null and couponId != ''">
-   and t.coupon_id= #{couponId}
-</if> 
-<if test="userName !=null and userName != ''">
-   and t.user_name= #{userName}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="objType !=null and objType != ''">
-   and t.obj_type= #{objType}
-</if> 
-<if test="primary !=null and primary != ''">
-   and t.PRIMARY= #{primary}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.coupon_name,t.coupon_name couponName,t.uo_id,t.uo_id uoId,t.obj_id,t.obj_id
+        objId,t.status_cd,t.status_cd statusCd,t.coupon_id,t.coupon_id couponId,t.user_name,t.user_name
+        userName,t.user_id,t.user_id userId,t.obj_type,t.obj_type objType
+        from coupon_user_detail t
+        where 1 =1
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="uoId !=null and uoId != ''">
+            and t.uo_id= #{uoId}
+        </if>
+        <if test="objId !=null and objId != ''">
+            and t.obj_id= #{objId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="couponId !=null and couponId != ''">
+            and t.coupon_id= #{couponId}
+        </if>
+        <if test="userName !=null and userName != ''">
+            and t.user_name= #{userName}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="objType !=null and objType != ''">
+            and t.obj_type= #{objType}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改用户抵消记录信息 add by wuxw 2018-07-03 -->
     <update id="updateCouponUserDetailInfo" parameterType="Map">
-        update  coupon_user_detail t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="couponName !=null and couponName != ''">
-, t.coupon_name= #{couponName}
-</if> 
-<if test="objId !=null and objId != ''">
-, t.obj_id= #{objId}
-</if> 
-<if test="couponId !=null and couponId != ''">
-, t.coupon_id= #{couponId}
-</if> 
-<if test="userName !=null and userName != ''">
-, t.user_name= #{userName}
-</if> 
-<if test="userId !=null and userId != ''">
-, t.user_id= #{userId}
-</if> 
-<if test="objType !=null and objType != ''">
-, t.obj_type= #{objType}
-</if> 
-<if test="primary !=null and primary != ''">
-, t.PRIMARY= #{primary}
-</if> 
- where 1=1 <if test="uoId !=null and uoId != ''">
-and t.uo_id= #{uoId}
-</if> 
+        update coupon_user_detail t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="couponName !=null and couponName != ''">
+            , t.coupon_name= #{couponName}
+        </if>
+        <if test="objId !=null and objId != ''">
+            , t.obj_id= #{objId}
+        </if>
+        <if test="couponId !=null and couponId != ''">
+            , t.coupon_id= #{couponId}
+        </if>
+        <if test="userName !=null and userName != ''">
+            , t.user_name= #{userName}
+        </if>
+        <if test="userId !=null and userId != ''">
+            , t.user_id= #{userId}
+        </if>
+        <if test="objType !=null and objType != ''">
+            , t.obj_type= #{objType}
+        </if>
+        where 1=1
+        <if test="uoId !=null and uoId != ''">
+            and t.uo_id= #{uoId}
+        </if>
 
     </update>
 
     <!-- 查询用户抵消记录数量 add by wuxw 2018-07-03 -->
-     <select id="queryCouponUserDetailsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from coupon_user_detail t 
-where 1 =1 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="uoId !=null and uoId != ''">
-   and t.uo_id= #{uoId}
-</if> 
-<if test="objId !=null and objId != ''">
-   and t.obj_id= #{objId}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="couponId !=null and couponId != ''">
-   and t.coupon_id= #{couponId}
-</if> 
-<if test="userName !=null and userName != ''">
-   and t.user_name= #{userName}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="objType !=null and objType != ''">
-   and t.obj_type= #{objType}
-</if> 
-<if test="primary !=null and primary != ''">
-   and t.PRIMARY= #{primary}
-</if> 
+    <select id="queryCouponUserDetailsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from coupon_user_detail t
+        where 1 =1
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="uoId !=null and uoId != ''">
+            and t.uo_id= #{uoId}
+        </if>
+        <if test="objId !=null and objId != ''">
+            and t.obj_id= #{objId}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="couponId !=null and couponId != ''">
+            and t.coupon_id= #{couponId}
+        </if>
+        <if test="userName !=null and userName != ''">
+            and t.user_name= #{userName}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="objType !=null and objType != ''">
+            and t.obj_type= #{objType}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 111 - 122
java110-db/src/main/resources/mapper/acct/CouponUserV1ServiceDaoImplMapper.xml

@@ -5,147 +5,136 @@
 <mapper namespace="couponUserV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存用户优惠券信息 add by wuxw 2018-07-03 -->
     <insert id="saveCouponUserInfo" parameterType="Map">
         insert into coupon_user(
-coupon_name,actual_price,validity_day,pool_id,tel,state,coupon_id,user_name,user_id,PRIMARY
-) values (
-#{couponName},#{actualPrice},#{validityDay},#{poolId},#{tel},#{state},#{couponId},#{userName},#{userId},#{primary}
-)
+        coupon_name,actual_price,validity_day,pool_id,tel,state,coupon_id,user_name,user_id
+        ) values (
+        #{couponName},#{actualPrice},#{validityDay},#{poolId},#{tel},#{state},#{couponId},#{userName},#{userId}
+        )
     </insert>
 
 
-
     <!-- 查询用户优惠券信息 add by wuxw 2018-07-03 -->
     <select id="getCouponUserInfo" parameterType="Map" resultType="Map">
-        select  t.coupon_name,t.coupon_name couponName,t.actual_price,t.actual_price actualPrice,t.validity_day,t.validity_day validityDay,t.pool_id,t.pool_id poolId,t.tel,t.status_cd,t.status_cd statusCd,t.state,t.coupon_id,t.coupon_id couponId,t.user_name,t.user_name userName,t.user_id,t.user_id userId,t.PRIMARY,t.PRIMARY primary 
-from coupon_user t 
-where 1 =1 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-   and t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-   and t.validity_day= #{validityDay}
-</if> 
-<if test="poolId !=null and poolId != ''">
-   and t.pool_id= #{poolId}
-</if> 
-<if test="tel !=null and tel != ''">
-   and t.tel= #{tel}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="couponId !=null and couponId != ''">
-   and t.coupon_id= #{couponId}
-</if> 
-<if test="userName !=null and userName != ''">
-   and t.user_name= #{userName}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="primary !=null and primary != ''">
-   and t.PRIMARY= #{primary}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.coupon_name,t.coupon_name couponName,t.actual_price,t.actual_price
+        actualPrice,t.validity_day,t.validity_day validityDay,t.pool_id,t.pool_id poolId,t.tel,t.status_cd,t.status_cd
+        statusCd,t.state,t.coupon_id,t.coupon_id couponId,t.user_name,t.user_name userName,t.user_id,t.user_id
+        userId
+        from coupon_user t
+        where 1 =1
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            and t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            and t.validity_day= #{validityDay}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            and t.pool_id= #{poolId}
+        </if>
+        <if test="tel !=null and tel != ''">
+            and t.tel= #{tel}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="couponId !=null and couponId != ''">
+            and t.coupon_id= #{couponId}
+        </if>
+        <if test="userName !=null and userName != ''">
+            and t.user_name= #{userName}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改用户优惠券信息 add by wuxw 2018-07-03 -->
     <update id="updateCouponUserInfo" parameterType="Map">
-        update  coupon_user t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="couponName !=null and couponName != ''">
-, t.coupon_name= #{couponName}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-, t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-, t.validity_day= #{validityDay}
-</if> 
-<if test="poolId !=null and poolId != ''">
-, t.pool_id= #{poolId}
-</if> 
-<if test="tel !=null and tel != ''">
-, t.tel= #{tel}
-</if> 
-<if test="state !=null and state != ''">
-, t.state= #{state}
-</if> 
-<if test="userName !=null and userName != ''">
-, t.user_name= #{userName}
-</if> 
-<if test="userId !=null and userId != ''">
-, t.user_id= #{userId}
-</if> 
-<if test="primary !=null and primary != ''">
-, t.PRIMARY= #{primary}
-</if> 
- where 1=1 <if test="couponId !=null and couponId != ''">
-and t.coupon_id= #{couponId}
-</if> 
+        update coupon_user t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="couponName !=null and couponName != ''">
+            , t.coupon_name= #{couponName}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            , t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            , t.validity_day= #{validityDay}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            , t.pool_id= #{poolId}
+        </if>
+        <if test="tel !=null and tel != ''">
+            , t.tel= #{tel}
+        </if>
+        <if test="state !=null and state != ''">
+            , t.state= #{state}
+        </if>
+        <if test="userName !=null and userName != ''">
+            , t.user_name= #{userName}
+        </if>
+        <if test="userId !=null and userId != ''">
+            , t.user_id= #{userId}
+        </if>
+        where 1=1
+        <if test="couponId !=null and couponId != ''">
+            and t.coupon_id= #{couponId}
+        </if>
 
     </update>
 
     <!-- 查询用户优惠券数量 add by wuxw 2018-07-03 -->
-     <select id="queryCouponUsersCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from coupon_user t 
-where 1 =1 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="actualPrice !=null and actualPrice != ''">
-   and t.actual_price= #{actualPrice}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-   and t.validity_day= #{validityDay}
-</if> 
-<if test="poolId !=null and poolId != ''">
-   and t.pool_id= #{poolId}
-</if> 
-<if test="tel !=null and tel != ''">
-   and t.tel= #{tel}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="couponId !=null and couponId != ''">
-   and t.coupon_id= #{couponId}
-</if> 
-<if test="userName !=null and userName != ''">
-   and t.user_name= #{userName}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="primary !=null and primary != ''">
-   and t.PRIMARY= #{primary}
-</if> 
+    <select id="queryCouponUsersCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from coupon_user t
+        where 1 =1
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="actualPrice !=null and actualPrice != ''">
+            and t.actual_price= #{actualPrice}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            and t.validity_day= #{validityDay}
+        </if>
+        <if test="poolId !=null and poolId != ''">
+            and t.pool_id= #{poolId}
+        </if>
+        <if test="tel !=null and tel != ''">
+            and t.tel= #{tel}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="couponId !=null and couponId != ''">
+            and t.coupon_id= #{couponId}
+        </if>
+        <if test="userName !=null and userName != ''">
+            and t.user_name= #{userName}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 3 - 0
java110-generator/src/main/java/com/java110/code/TableToJson.java

@@ -69,6 +69,9 @@ public class TableToJson {
             if ("KEY".equals(key)) {
                 continue;
             }
+            if ("PRIMARY".equals(key)) {
+                continue;
+            }
             if ("b_id".equals(key)) {
                 continue;
             }