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

+ 58 - 34
java110-bean/src/main/java/com/java110/dto/couponPropertyUser/CouponPropertyUserDto.java

@@ -1,6 +1,7 @@
 package com.java110.dto.couponPropertyUser;
 
 import com.java110.dto.PageDto;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -15,17 +16,17 @@ import java.util.Date;
 public class CouponPropertyUserDto extends PageDto implements Serializable {
 
     private String couponName;
-private String toType;
-private String validityDay;
-private String couponId;
-private String userName;
-private String userId;
-private String cppId;
-private String tel;
-private String state;
-private String stock;
-private String communityId;
-private String value;
+    private String toType;
+    private String validityDay;
+    private String couponId;
+    private String userName;
+    private String userId;
+    private String cppId;
+    private String tel;
+    private String state;
+    private String stock;
+    private String communityId;
+    private String value;
 
 
     private Date createTime;
@@ -36,73 +37,96 @@ private String value;
     public String getCouponName() {
         return couponName;
     }
-public void setCouponName(String couponName) {
+
+    public void setCouponName(String couponName) {
         this.couponName = couponName;
     }
-public String getToType() {
+
+    public String getToType() {
         return toType;
     }
-public void setToType(String toType) {
+
+    public void setToType(String toType) {
         this.toType = toType;
     }
-public String getValidityDay() {
+
+    public String getValidityDay() {
         return validityDay;
     }
-public void setValidityDay(String validityDay) {
+
+    public void setValidityDay(String validityDay) {
         this.validityDay = validityDay;
     }
-public String getCouponId() {
+
+    public String getCouponId() {
         return couponId;
     }
-public void setCouponId(String couponId) {
+
+    public void setCouponId(String couponId) {
         this.couponId = couponId;
     }
-public String getUserName() {
+
+    public String getUserName() {
         return userName;
     }
-public void setUserName(String userName) {
+
+    public void setUserName(String userName) {
         this.userName = userName;
     }
-public String getUserId() {
+
+    public String getUserId() {
         return userId;
     }
-public void setUserId(String userId) {
+
+    public void setUserId(String userId) {
         this.userId = userId;
     }
-public String getCppId() {
+
+    public String getCppId() {
         return cppId;
     }
-public void setCppId(String cppId) {
+
+    public void setCppId(String cppId) {
         this.cppId = cppId;
     }
-public String getTel() {
+
+    public String getTel() {
         return tel;
     }
-public void setTel(String tel) {
+
+    public void setTel(String tel) {
         this.tel = tel;
     }
-public String getState() {
+
+    public String getState() {
         return state;
     }
-public void setState(String state) {
+
+    public void setState(String state) {
         this.state = state;
     }
-public String getStock() {
+
+    public String getStock() {
         return stock;
     }
-public void setStock(String stock) {
+
+    public void setStock(String stock) {
         this.stock = stock;
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
-public String getValue() {
+
+    public String getValue() {
         return value;
     }
-public void setValue(String value) {
+
+    public void setValue(String value) {
         this.value = value;
     }
 

+ 60 - 19
java110-bean/src/main/java/com/java110/dto/couponPropertyUserDetail/CouponPropertyUserDetailDto.java

@@ -1,6 +1,7 @@
 package com.java110.dto.couponPropertyUserDetail;
 
 import com.java110.dto.PageDto;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -15,12 +16,15 @@ import java.util.Date;
 public class CouponPropertyUserDetailDto extends PageDto implements Serializable {
 
     private String detailType;
-private String couponName;
-private String uoId;
-private String businessKey;
-private String remark;
-private String couponId;
-private String communityId;
+    private String couponName;
+    private String uoId;
+    private String businessKey;
+    private String remark;
+    private String couponId;
+    private String communityId;
+    private String userName;
+    private String tel;
+    private String value;
 
 
     private Date createTime;
@@ -31,43 +35,56 @@ private String communityId;
     public String getDetailType() {
         return detailType;
     }
-public void setDetailType(String detailType) {
+
+    public void setDetailType(String detailType) {
         this.detailType = detailType;
     }
-public String getCouponName() {
+
+    public String getCouponName() {
         return couponName;
     }
-public void setCouponName(String couponName) {
+
+    public void setCouponName(String couponName) {
         this.couponName = couponName;
     }
-public String getUoId() {
+
+    public String getUoId() {
         return uoId;
     }
-public void setUoId(String uoId) {
+
+    public void setUoId(String uoId) {
         this.uoId = uoId;
     }
-public String getBusinessKey() {
+
+    public String getBusinessKey() {
         return businessKey;
     }
-public void setBusinessKey(String businessKey) {
+
+    public void setBusinessKey(String businessKey) {
         this.businessKey = businessKey;
     }
-public String getRemark() {
+
+    public String getRemark() {
         return remark;
     }
-public void setRemark(String remark) {
+
+    public void setRemark(String remark) {
         this.remark = remark;
     }
-public String getCouponId() {
+
+    public String getCouponId() {
         return couponId;
     }
-public void setCouponId(String couponId) {
+
+    public void setCouponId(String couponId) {
         this.couponId = couponId;
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
 
@@ -87,4 +104,28 @@ public void setCommunityId(String communityId) {
     public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
 }

+ 40 - 25
java110-bean/src/main/java/com/java110/po/couponPropertyUserDetail/CouponPropertyUserDetailPo.java

@@ -16,7 +16,7 @@
 package com.java110.po.couponPropertyUserDetail;
 
 import java.io.Serializable;
-import java.util.Date;
+
 /**
  * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
  * add by 吴学文 at 2022-11-21 12:30:26 mail: 928255095@qq.com
@@ -28,62 +28,77 @@ import java.util.Date;
 public class CouponPropertyUserDetailPo implements Serializable {
 
     private String detailType;
-private String couponName;
-private String uoId;
-private String businessKey;
-private String remark;
-private String statusCd = "0";
-private String couponId;
-private String communityId;
-public String getDetailType() {
+    private String couponName;
+    private String uoId;
+    private String businessKey;
+    private String remark;
+    private String statusCd = "0";
+    private String couponId;
+    private String communityId;
+
+    public String getDetailType() {
         return detailType;
     }
-public void setDetailType(String detailType) {
+
+    public void setDetailType(String detailType) {
         this.detailType = detailType;
     }
-public String getCouponName() {
+
+    public String getCouponName() {
         return couponName;
     }
-public void setCouponName(String couponName) {
+
+    public void setCouponName(String couponName) {
         this.couponName = couponName;
     }
-public String getUoId() {
+
+    public String getUoId() {
         return uoId;
     }
-public void setUoId(String uoId) {
+
+    public void setUoId(String uoId) {
         this.uoId = uoId;
     }
-public String getBusinessKey() {
+
+    public String getBusinessKey() {
         return businessKey;
     }
-public void setBusinessKey(String businessKey) {
+
+    public void setBusinessKey(String businessKey) {
         this.businessKey = businessKey;
     }
-public String getRemark() {
+
+    public String getRemark() {
         return remark;
     }
-public void setRemark(String remark) {
+
+    public void setRemark(String remark) {
         this.remark = remark;
     }
-public String getStatusCd() {
+
+    public String getStatusCd() {
         return statusCd;
     }
-public void setStatusCd(String statusCd) {
+
+    public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
-public String getCouponId() {
+
+    public String getCouponId() {
         return couponId;
     }
-public void setCouponId(String couponId) {
+
+    public void setCouponId(String couponId) {
         this.couponId = couponId;
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
 
 
-
 }

+ 93 - 96
java110-db/src/main/resources/mapper/acct/CouponPropertyUserDetailV1ServiceDaoImplMapper.xml

@@ -5,120 +5,117 @@
 <mapper namespace="couponPropertyUserDetailV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存用户优惠券明细信息 add by wuxw 2018-07-03 -->
     <insert id="saveCouponPropertyUserDetailInfo" parameterType="Map">
         insert into coupon_property_user_detail(
-detail_type,coupon_name,uo_id,business_key,remark,coupon_id,community_id
-) values (
-#{detailType},#{couponName},#{uoId},#{businessKey},#{remark},#{couponId},#{communityId}
-)
+        detail_type,coupon_name,uo_id,business_key,remark,coupon_id,community_id
+        ) values (
+        #{detailType},#{couponName},#{uoId},#{businessKey},#{remark},#{couponId},#{communityId}
+        )
     </insert>
 
 
-
     <!-- 查询用户优惠券明细信息 add by wuxw 2018-07-03 -->
     <select id="getCouponPropertyUserDetailInfo" parameterType="Map" resultType="Map">
-        select  t.detail_type,t.detail_type detailType,t.coupon_name,t.coupon_name couponName,t.uo_id,t.uo_id uoId,t.business_key,t.business_key businessKey,t.remark,t.status_cd,t.status_cd statusCd,t.coupon_id,t.coupon_id couponId,t.community_id,t.community_id communityId 
-from coupon_property_user_detail t 
-where 1 =1 
-<if test="detailType !=null and detailType != ''">
-   and t.detail_type= #{detailType}
-</if> 
-<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="businessKey !=null and businessKey != ''">
-   and t.business_key= #{businessKey}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</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="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.detail_type,t.detail_type detailType,t.coupon_name,t.coupon_name couponName,t.uo_id,t.uo_id
+        uoId,t.business_key,t.business_key businessKey,t.remark,t.status_cd,t.status_cd statusCd,t.coupon_id,t.coupon_id
+        couponId,t.community_id,t.community_id communityId,cpu.user_name userName,cpu.tel,cpu.value
+        from coupon_property_user_detail t
+        left join coupon_property_user cpu on t.coupon_id = cpu.coupon_id and cpu.status_cd = '0'
+        where 1 =1
+        <if test="detailType !=null and detailType != ''">
+            and t.detail_type= #{detailType}
+        </if>
+        <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="businessKey !=null and businessKey != ''">
+            and t.business_key= #{businessKey}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </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="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </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="updateCouponPropertyUserDetailInfo" parameterType="Map">
-        update  coupon_property_user_detail t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="detailType !=null and detailType != ''">
-, t.detail_type= #{detailType}
-</if> 
-<if test="couponName !=null and couponName != ''">
-, t.coupon_name= #{couponName}
-</if> 
-<if test="uoId !=null and uoId != ''">
-, t.uo_id= #{uoId}
-</if> 
-<if test="businessKey !=null and businessKey != ''">
-, t.business_key= #{businessKey}
-</if> 
-<if test="remark !=null and remark != ''">
-, t.remark= #{remark}
-</if> 
-<if test="couponId !=null and couponId != ''">
-, t.coupon_id= #{couponId}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
- where 1=1 
+        update coupon_property_user_detail t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="detailType !=null and detailType != ''">
+            , t.detail_type= #{detailType}
+        </if>
+        <if test="couponName !=null and couponName != ''">
+            , t.coupon_name= #{couponName}
+        </if>
+        <if test="uoId !=null and uoId != ''">
+            , t.uo_id= #{uoId}
+        </if>
+        <if test="businessKey !=null and businessKey != ''">
+            , t.business_key= #{businessKey}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="couponId !=null and couponId != ''">
+            , t.coupon_id= #{couponId}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        where 1=1
     </update>
 
     <!-- 查询用户优惠券明细数量 add by wuxw 2018-07-03 -->
-     <select id="queryCouponPropertyUserDetailsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from coupon_property_user_detail t 
-where 1 =1 
-<if test="detailType !=null and detailType != ''">
-   and t.detail_type= #{detailType}
-</if> 
-<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="businessKey !=null and businessKey != ''">
-   and t.business_key= #{businessKey}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</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="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
+    <select id="queryCouponPropertyUserDetailsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from coupon_property_user_detail t
+        where 1 =1
+        <if test="detailType !=null and detailType != ''">
+            and t.detail_type= #{detailType}
+        </if>
+        <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="businessKey !=null and businessKey != ''">
+            and t.business_key= #{businessKey}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </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="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>