颓废太子
2021-11-25 738f68a11f3815ff6e8ff2f9c0d0083f7fa7a7a1
优化代码
3个文件已修改
48 ■■■■■ 已修改文件
java110-bean/src/main/java/com/java110/dto/couponDetail/CouponDetailDto.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/couponDetail/CouponDetailPo.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/acct/CouponDetailV1ServiceDaoImplMapper.xml 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/couponDetail/CouponDetailDto.java
@@ -23,6 +23,8 @@
private String poolId;
private String detailId;
private String shopId;
private String shopName;
private String shopNameLike;
private String orderId;
@@ -109,4 +111,20 @@
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    public String getShopName() {
        return shopName;
    }
    public void setShopName(String shopName) {
        this.shopName = shopName;
    }
    public String getShopNameLike() {
        return shopNameLike;
    }
    public void setShopNameLike(String shopNameLike) {
        this.shopNameLike = shopNameLike;
    }
}
java110-bean/src/main/java/com/java110/po/couponDetail/CouponDetailPo.java
@@ -37,6 +37,7 @@
private String detailId;
private String statusCd = "0";
private String shopId;
private String shopName;
private String orderId;
public String getBuyPrice() {
        return buyPrice;
@@ -106,4 +107,12 @@
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    public String getShopName() {
        return shopName;
    }
    public void setShopName(String shopName) {
        this.shopName = shopName;
    }
}
java110-db/src/main/resources/mapper/acct/CouponDetailV1ServiceDaoImplMapper.xml
@@ -8,9 +8,9 @@
    <!-- 保存商家购买记录表信息 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,order_id
        buy_price,coupon_name,amount,buy_count,actual_price,validity_day,pool_id,detail_id,shop_id,order_id,shop_name
        ) values (
        #{buyPrice},#{couponName},#{amount},#{buyCount},#{actualPrice},#{validityDay},#{poolId},#{detailId},#{shopId},#{orderId}
        #{buyPrice},#{couponName},#{amount},#{buyCount},#{actualPrice},#{validityDay},#{poolId},#{detailId},#{shopId},#{orderId},#{shopName}
        )
    </insert>
@@ -20,7 +20,7 @@
        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.order_id orderId
        shopId,t.order_id orderId,t.create_time createTime,t.shop_name shopName
        from coupon_detail t
        where 1 =1
        <if test="buyPrice !=null and buyPrice != ''">
@@ -34,6 +34,12 @@
        </if>
        <if test="buyCount !=null and buyCount != ''">
            and t.buy_count= #{buyCount}
        </if>
        <if test="shopName !=null and shopName != ''">
            and t.shop_name= #{shopName}
        </if>
        <if test="shopNameLike !=null and shopNameLike != ''">
            and t.shop_name like concat('%',#{shopNameLike},'%')
        </if>
        <if test="actualPrice !=null and actualPrice != ''">
            and t.actual_price= #{actualPrice}
@@ -82,6 +88,9 @@
        <if test="orderId !=null and orderId != ''">
            , t.order_id= #{orderId}
        </if>
        <if test="shopName !=null and shopName != ''">
            , t.shop_name= #{shopName}
        </if>
        <if test="buyCount !=null and buyCount != ''">
            , t.buy_count= #{buyCount}
        </if>
@@ -115,6 +124,12 @@
        <if test="couponName !=null and couponName != ''">
            and t.coupon_name= #{couponName}
        </if>
        <if test="shopName !=null and shopName != ''">
            and t.shop_name= #{shopName}
        </if>
        <if test="shopNameLike !=null and shopNameLike != ''">
            and t.shop_name like concat('%',#{shopNameLike},'%')
        </if>
        <if test="amount !=null and amount != ''">
            and t.amount= #{amount}
        </if>