Просмотр исходного кода

缴费赠送优惠券 功能开发完成

wuxw лет назад: 3
Родитель
Сommit
5972c0cf0f

+ 46 - 28
java110-bean/src/main/java/com/java110/dto/couponPropertyPoolDetail/CouponPropertyPoolDetailDto.java

@@ -1,6 +1,7 @@
 package com.java110.dto.couponPropertyPoolDetail;
 package com.java110.dto.couponPropertyPoolDetail;
 
 
 import com.java110.dto.PageDto;
 import com.java110.dto.PageDto;
+
 import java.io.Serializable;
 import java.io.Serializable;
 import java.util.Date;
 import java.util.Date;
 
 
@@ -15,14 +16,14 @@ import java.util.Date;
 public class CouponPropertyPoolDetailDto extends PageDto implements Serializable {
 public class CouponPropertyPoolDetailDto extends PageDto implements Serializable {
 
 
     private String couponName;
     private String couponName;
-private String detailId;
-private String cppId;
-private String tel;
-private String communityId;
-private String sendCount;
-private String userName;
-private String value;
-private String userId;
+    private String detailId;
+    private String cppId;
+    private String tel;
+    private String communityId;
+    private String sendCount;
+    private String userName;
+    private String value;
+    private String couponUserId;
 
 
 
 
     private Date createTime;
     private Date createTime;
@@ -33,58 +34,75 @@ private String userId;
     public String getCouponName() {
     public String getCouponName() {
         return couponName;
         return couponName;
     }
     }
-public void setCouponName(String couponName) {
+
+    public void setCouponName(String couponName) {
         this.couponName = couponName;
         this.couponName = couponName;
     }
     }
-public String getDetailId() {
+
+    public String getDetailId() {
         return detailId;
         return detailId;
     }
     }
-public void setDetailId(String detailId) {
+
+    public void setDetailId(String detailId) {
         this.detailId = detailId;
         this.detailId = detailId;
     }
     }
-public String getCppId() {
+
+    public String getCppId() {
         return cppId;
         return cppId;
     }
     }
-public void setCppId(String cppId) {
+
+    public void setCppId(String cppId) {
         this.cppId = cppId;
         this.cppId = cppId;
     }
     }
-public String getTel() {
+
+    public String getTel() {
         return tel;
         return tel;
     }
     }
-public void setTel(String tel) {
+
+    public void setTel(String tel) {
         this.tel = tel;
         this.tel = tel;
     }
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
         return communityId;
     }
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
         this.communityId = communityId;
     }
     }
-public String getSendCount() {
+
+    public String getSendCount() {
         return sendCount;
         return sendCount;
     }
     }
-public void setSendCount(String sendCount) {
+
+    public void setSendCount(String sendCount) {
         this.sendCount = sendCount;
         this.sendCount = sendCount;
     }
     }
-public String getUserName() {
+
+    public String getUserName() {
         return userName;
         return userName;
     }
     }
-public void setUserName(String userName) {
+
+    public void setUserName(String userName) {
         this.userName = userName;
         this.userName = userName;
     }
     }
-public String getValue() {
+
+    public String getValue() {
         return value;
         return value;
     }
     }
-public void setValue(String value) {
+
+    public void setValue(String value) {
         this.value = value;
         this.value = value;
     }
     }
-public String getUserId() {
-        return userId;
-    }
-public void setUserId(String userId) {
-        this.userId = userId;
+
+
+    public String getCouponUserId() {
+        return couponUserId;
     }
     }
 
 
+    public void setCouponUserId(String couponUserId) {
+        this.couponUserId = couponUserId;
+    }
 
 
     public Date getCreateTime() {
     public Date getCreateTime() {
         return createTime;
         return createTime;

+ 6 - 5
java110-bean/src/main/java/com/java110/dto/couponPropertyUser/CouponPropertyUserDto.java

@@ -23,7 +23,7 @@ public class CouponPropertyUserDto extends PageDto implements Serializable {
     private String validityDay;
     private String validityDay;
     private String couponId;
     private String couponId;
     private String userName;
     private String userName;
-    private String userId;
+    private String couponUserId;
     private String cppId;
     private String cppId;
     private String tel;
     private String tel;
     private String state;
     private String state;
@@ -77,12 +77,13 @@ public class CouponPropertyUserDto extends PageDto implements Serializable {
         this.userName = userName;
         this.userName = userName;
     }
     }
 
 
-    public String getUserId() {
-        return userId;
+
+    public String getCouponUserId() {
+        return couponUserId;
     }
     }
 
 
-    public void setUserId(String userId) {
-        this.userId = userId;
+    public void setCouponUserId(String couponUserId) {
+        this.couponUserId = couponUserId;
     }
     }
 
 
     public String getCppId() {
     public String getCppId() {

+ 110 - 113
java110-db/src/main/resources/mapper/acct/CouponPropertyPoolDetailV1ServiceDaoImplMapper.xml

@@ -5,138 +5,135 @@
 <mapper namespace="couponPropertyPoolDetailV1ServiceDaoImpl">
 <mapper namespace="couponPropertyPoolDetailV1ServiceDaoImpl">
 
 
 
 
-
-
-
     <!-- 保存赠送明细信息 add by wuxw 2018-07-03 -->
     <!-- 保存赠送明细信息 add by wuxw 2018-07-03 -->
     <insert id="saveCouponPropertyPoolDetailInfo" parameterType="Map">
     <insert id="saveCouponPropertyPoolDetailInfo" parameterType="Map">
         insert into coupon_property_pool_detail(
         insert into coupon_property_pool_detail(
-coupon_name,detail_id,cpp_id,tel,community_id,send_count,user_name,value,user_id
-) values (
-#{couponName},#{detailId},#{cppId},#{tel},#{communityId},#{sendCount},#{userName},#{value},#{userId}
-)
+        coupon_name,detail_id,cpp_id,tel,community_id,send_count,user_name,value,user_id
+        ) values (
+        #{couponName},#{detailId},#{cppId},#{tel},#{communityId},#{sendCount},#{userName},#{value},#{userId}
+        )
     </insert>
     </insert>
 
 
 
 
-
     <!-- 查询赠送明细信息 add by wuxw 2018-07-03 -->
     <!-- 查询赠送明细信息 add by wuxw 2018-07-03 -->
     <select id="getCouponPropertyPoolDetailInfo" parameterType="Map" resultType="Map">
     <select id="getCouponPropertyPoolDetailInfo" parameterType="Map" resultType="Map">
-        select  t.coupon_name,t.coupon_name couponName,t.detail_id,t.detail_id detailId,t.cpp_id,t.cpp_id cppId,t.tel,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.send_count,t.send_count sendCount,t.user_name,t.user_name userName,t.value,t.user_id,t.user_id userId 
-from coupon_property_pool_detail t 
-where 1 =1 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="detailId !=null and detailId != ''">
-   and t.detail_id= #{detailId}
-</if> 
-<if test="cppId !=null and cppId != ''">
-   and t.cpp_id= #{cppId}
-</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="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</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="value !=null and value != ''">
-   and t.value= #{value}
-</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 t.coupon_name,t.coupon_name couponName,t.detail_id,t.detail_id detailId,t.cpp_id,t.cpp_id
+        cppId,t.tel,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.send_count,t.send_count
+        sendCount,t.user_name,t.user_name userName,t.value,t.user_id,t.user_id userId
+        from coupon_property_pool_detail t
+        where 1 =1
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="detailId !=null and detailId != ''">
+            and t.detail_id= #{detailId}
+        </if>
+        <if test="cppId !=null and cppId != ''">
+            and t.cpp_id= #{cppId}
+        </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="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </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="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
+        <if test="couponUserId !=null and couponUserId != ''">
+            and t.user_id= #{couponUserId}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
 
     </select>
     </select>
 
 
 
 
-
-
     <!-- 修改赠送明细信息 add by wuxw 2018-07-03 -->
     <!-- 修改赠送明细信息 add by wuxw 2018-07-03 -->
     <update id="updateCouponPropertyPoolDetailInfo" parameterType="Map">
     <update id="updateCouponPropertyPoolDetailInfo" parameterType="Map">
-        update  coupon_property_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="cppId !=null and cppId != ''">
-, t.cpp_id= #{cppId}
-</if> 
-<if test="tel !=null and tel != ''">
-, t.tel= #{tel}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</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="value !=null and value != ''">
-, t.value= #{value}
-</if> 
-<if test="userId !=null and userId != ''">
-, t.user_id= #{userId}
-</if> 
- where 1=1 <if test="detailId !=null and detailId != ''">
-and t.detail_id= #{detailId}
-</if> 
+        update coupon_property_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="cppId !=null and cppId != ''">
+            , t.cpp_id= #{cppId}
+        </if>
+        <if test="tel !=null and tel != ''">
+            , t.tel= #{tel}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </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="value !=null and value != ''">
+            , t.value= #{value}
+        </if>
+        <if test="userId !=null and userId != ''">
+            , t.user_id= #{userId}
+        </if>
+        where 1=1
+        <if test="detailId !=null and detailId != ''">
+            and t.detail_id= #{detailId}
+        </if>
 
 
     </update>
     </update>
 
 
     <!-- 查询赠送明细数量 add by wuxw 2018-07-03 -->
     <!-- 查询赠送明细数量 add by wuxw 2018-07-03 -->
-     <select id="queryCouponPropertyPoolDetailsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from coupon_property_pool_detail t 
-where 1 =1 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="detailId !=null and detailId != ''">
-   and t.detail_id= #{detailId}
-</if> 
-<if test="cppId !=null and cppId != ''">
-   and t.cpp_id= #{cppId}
-</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="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</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="value !=null and value != ''">
-   and t.value= #{value}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
+    <select id="queryCouponPropertyPoolDetailsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from coupon_property_pool_detail t
+        where 1 =1
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="detailId !=null and detailId != ''">
+            and t.detail_id= #{detailId}
+        </if>
+        <if test="cppId !=null and cppId != ''">
+            and t.cpp_id= #{cppId}
+        </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="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </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="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
+        <if test="couponUserId !=null and couponUserId != ''">
+            and t.user_id= #{couponUserId}
+        </if>
 
 
 
 
-     </select>
+    </select>
 
 
 </mapper>
 </mapper>

+ 138 - 140
java110-db/src/main/resources/mapper/acct/CouponPropertyUserV1ServiceDaoImplMapper.xml

@@ -5,165 +5,163 @@
 <mapper namespace="couponPropertyUserV1ServiceDaoImpl">
 <mapper namespace="couponPropertyUserV1ServiceDaoImpl">
 
 
 
 
-
-
-
     <!-- 保存用户优惠券信息 add by wuxw 2018-07-03 -->
     <!-- 保存用户优惠券信息 add by wuxw 2018-07-03 -->
     <insert id="saveCouponPropertyUserInfo" parameterType="Map">
     <insert id="saveCouponPropertyUserInfo" parameterType="Map">
         insert into coupon_property_user(
         insert into coupon_property_user(
-coupon_name,to_type,validity_day,coupon_id,user_name,user_id,cpp_id,tel,state,stock,community_id,value
-) values (
-#{couponName},#{toType},#{validityDay},#{couponId},#{userName},#{userId},#{cppId},#{tel},#{state},#{stock},#{communityId},#{value}
-)
+        coupon_name,to_type,validity_day,coupon_id,user_name,user_id,cpp_id,tel,state,stock,community_id,value
+        ) values (
+        #{couponName},#{toType},#{validityDay},#{couponId},#{userName},#{userId},#{cppId},#{tel},#{state},#{stock},#{communityId},#{value}
+        )
     </insert>
     </insert>
 
 
 
 
-
     <!-- 查询用户优惠券信息 add by wuxw 2018-07-03 -->
     <!-- 查询用户优惠券信息 add by wuxw 2018-07-03 -->
     <select id="getCouponPropertyUserInfo" parameterType="Map" resultType="Map">
     <select id="getCouponPropertyUserInfo" parameterType="Map" resultType="Map">
-        select  t.coupon_name,t.coupon_name couponName,t.to_type,t.to_type toType,t.validity_day,t.validity_day validityDay,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.cpp_id,t.cpp_id cppId,t.tel,t.state,t.stock,t.community_id,t.community_id communityId,t.value 
-from coupon_property_user t 
-where 1 =1 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="toType !=null and toType != ''">
-   and t.to_type= #{toType}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-   and t.validity_day= #{validityDay}
-</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="cppId !=null and cppId != ''">
-   and t.cpp_id= #{cppId}
-</if> 
-<if test="tel !=null and tel != ''">
-   and t.tel= #{tel}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="stock !=null and stock != ''">
-   and t.stock= #{stock}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="value !=null and value != ''">
-   and t.value= #{value}
-</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.to_type,t.to_type toType,t.validity_day,t.validity_day
+        validityDay,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 couponUserId,t.cpp_id,t.cpp_id cppId,t.tel,t.state,t.stock,t.community_id,t.community_id
+        communityId,t.value
+        from coupon_property_user t
+        where 1 =1
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="toType !=null and toType != ''">
+            and t.to_type= #{toType}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            and t.validity_day= #{validityDay}
+        </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="couponUserId !=null and couponUserId != ''">
+            and t.user_id= #{couponUserId}
+        </if>
+        <if test="cppId !=null and cppId != ''">
+            and t.cpp_id= #{cppId}
+        </if>
+        <if test="tel !=null and tel != ''">
+            and t.tel= #{tel}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="stock !=null and stock != ''">
+            and t.stock= #{stock}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
 
     </select>
     </select>
 
 
 
 
-
-
     <!-- 修改用户优惠券信息 add by wuxw 2018-07-03 -->
     <!-- 修改用户优惠券信息 add by wuxw 2018-07-03 -->
     <update id="updateCouponPropertyUserInfo" parameterType="Map">
     <update id="updateCouponPropertyUserInfo" parameterType="Map">
-        update  coupon_property_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="toType !=null and toType != ''">
-, t.to_type= #{toType}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-, t.validity_day= #{validityDay}
-</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="cppId !=null and cppId != ''">
-, t.cpp_id= #{cppId}
-</if> 
-<if test="tel !=null and tel != ''">
-, t.tel= #{tel}
-</if> 
-<if test="state !=null and state != ''">
-, t.state= #{state}
-</if> 
-<if test="stock !=null and stock != ''">
-, t.stock= #{stock}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
-<if test="value !=null and value != ''">
-, t.value= #{value}
-</if> 
- where 1=1 <if test="couponId !=null and couponId != ''">
-and t.coupon_id= #{couponId}
-</if> 
+        update coupon_property_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="toType !=null and toType != ''">
+            , t.to_type= #{toType}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            , t.validity_day= #{validityDay}
+        </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="cppId !=null and cppId != ''">
+            , t.cpp_id= #{cppId}
+        </if>
+        <if test="tel !=null and tel != ''">
+            , t.tel= #{tel}
+        </if>
+        <if test="state !=null and state != ''">
+            , t.state= #{state}
+        </if>
+        <if test="stock !=null and stock != ''">
+            , t.stock= #{stock}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="value !=null and value != ''">
+            , t.value= #{value}
+        </if>
+        where 1=1
+        <if test="couponId !=null and couponId != ''">
+            and t.coupon_id= #{couponId}
+        </if>
 
 
     </update>
     </update>
 
 
     <!-- 查询用户优惠券数量 add by wuxw 2018-07-03 -->
     <!-- 查询用户优惠券数量 add by wuxw 2018-07-03 -->
-     <select id="queryCouponPropertyUsersCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from coupon_property_user t 
-where 1 =1 
-<if test="couponName !=null and couponName != ''">
-   and t.coupon_name= #{couponName}
-</if> 
-<if test="toType !=null and toType != ''">
-   and t.to_type= #{toType}
-</if> 
-<if test="validityDay !=null and validityDay != ''">
-   and t.validity_day= #{validityDay}
-</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="cppId !=null and cppId != ''">
-   and t.cpp_id= #{cppId}
-</if> 
-<if test="tel !=null and tel != ''">
-   and t.tel= #{tel}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="stock !=null and stock != ''">
-   and t.stock= #{stock}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="value !=null and value != ''">
-   and t.value= #{value}
-</if> 
+    <select id="queryCouponPropertyUsersCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from coupon_property_user t
+        where 1 =1
+        <if test="couponName !=null and couponName != ''">
+            and t.coupon_name= #{couponName}
+        </if>
+        <if test="toType !=null and toType != ''">
+            and t.to_type= #{toType}
+        </if>
+        <if test="validityDay !=null and validityDay != ''">
+            and t.validity_day= #{validityDay}
+        </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="couponUserId !=null and couponUserId != ''">
+            and t.user_id= #{couponUserId}
+        </if>
+        <if test="cppId !=null and cppId != ''">
+            and t.cpp_id= #{cppId}
+        </if>
+        <if test="tel !=null and tel != ''">
+            and t.tel= #{tel}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="stock !=null and stock != ''">
+            and t.stock= #{stock}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
 
 
 
 
-     </select>
+    </select>
 
 
 </mapper>
 </mapper>