Ver Fonte

修改积分规则,积分商品客户积分管理

zangguocen há 4 anos atrás
pai
commit
3ee02ad82d

+ 44 - 26
yijia-integral/src/main/java/com/yijia/integral/domain/IntegralOrder.java

@@ -9,7 +9,7 @@ import com.yijia.common.core.domain.BaseEntity;
 
 /**
  * 积分消费订单对象 integral_order
- * 
+ *
  * @author yijia
  * @date 2021-03-02
  */
@@ -70,6 +70,24 @@ public class IntegralOrder extends BaseEntity
     private String stationName;
     /**手机号**/
     private String mobilePhone;
+    private String waresDetail;
+    private String waresPic;
+
+    public String getWaresDetail() {
+        return waresDetail;
+    }
+
+    public void setWaresDetail(String waresDetail) {
+        this.waresDetail = waresDetail;
+    }
+
+    public String getWaresPic() {
+        return waresPic;
+    }
+
+    public void setWaresPic(String waresPic) {
+        this.waresPic = waresPic;
+    }
 
     public String getMobilePhone() {
         return mobilePhone;
@@ -84,115 +102,115 @@ public class IntegralOrder extends BaseEntity
         this.id = id;
     }
 
-    public Long getId() 
+    public Long getId()
     {
         return id;
     }
-    public void setIntegralOrderNo(String integralOrderNo) 
+    public void setIntegralOrderNo(String integralOrderNo)
     {
         this.integralOrderNo = integralOrderNo;
     }
 
-    public String getIntegralOrderNo() 
+    public String getIntegralOrderNo()
     {
         return integralOrderNo;
     }
-    public void setWaresType(String waresType) 
+    public void setWaresType(String waresType)
     {
         this.waresType = waresType;
     }
 
-    public String getWaresType() 
+    public String getWaresType()
     {
         return waresType;
     }
-    public void setWaresName(String waresName) 
+    public void setWaresName(String waresName)
     {
         this.waresName = waresName;
     }
 
-    public String getWaresName() 
+    public String getWaresName()
     {
         return waresName;
     }
-    public void setWaresId(Long waresId) 
+    public void setWaresId(Long waresId)
     {
         this.waresId = waresId;
     }
 
-    public Long getWaresId() 
+    public Long getWaresId()
     {
         return waresId;
     }
-    public void setUnionId(String unionId) 
+    public void setUnionId(String unionId)
     {
         this.unionId = unionId;
     }
 
-    public String getUnionId() 
+    public String getUnionId()
     {
         return unionId;
     }
-    public void setCustomerName(String customerName) 
+    public void setCustomerName(String customerName)
     {
         this.customerName = customerName;
     }
 
-    public String getCustomerName() 
+    public String getCustomerName()
     {
         return customerName;
     }
-    public void setExchangeNum(Long exchangeNum) 
+    public void setExchangeNum(Long exchangeNum)
     {
         this.exchangeNum = exchangeNum;
     }
 
-    public Long getExchangeNum() 
+    public Long getExchangeNum()
     {
         return exchangeNum;
     }
-    public void setExchangeTime(Date exchangeTime) 
+    public void setExchangeTime(Date exchangeTime)
     {
         this.exchangeTime = exchangeTime;
     }
 
-    public Date getExchangeTime() 
+    public Date getExchangeTime()
     {
         return exchangeTime;
     }
-    public void setStatus(String status) 
+    public void setStatus(String status)
     {
         this.status = status;
     }
 
-    public String getStatus() 
+    public String getStatus()
     {
         return status;
     }
-    public void setIntegral(Long integral) 
+    public void setIntegral(Long integral)
     {
         this.integral = integral;
     }
 
-    public Long getIntegral() 
+    public Long getIntegral()
     {
         return integral;
     }
-    public void setStationId(Long stationId) 
+    public void setStationId(Long stationId)
     {
         this.stationId = stationId;
     }
 
-    public Long getStationId() 
+    public Long getStationId()
     {
         return stationId;
     }
-    public void setStationName(String stationName) 
+    public void setStationName(String stationName)
     {
         this.stationName = stationName;
     }
 
-    public String getStationName() 
+    public String getStationName()
     {
         return stationName;
     }

+ 0 - 14
yijia-integral/src/main/java/com/yijia/integral/domain/IntegralWares.java

@@ -21,10 +21,6 @@ public class IntegralWares extends BaseEntity
     /** 商品主键id */
     private Long id;
 
-    /** 商品类别 */
-    @Excel(name = "商品类别")
-    private String waresType;
-
     /** 商品名称 */
     @Excel(name = "商品名称")
     private String waresName;
@@ -88,15 +84,6 @@ public class IntegralWares extends BaseEntity
     {
         return id;
     }
-    public void setWaresType(String waresType)
-    {
-        this.waresType = waresType;
-    }
-
-    public String getWaresType()
-    {
-        return waresType;
-    }
     public void setWaresName(String waresName)
     {
         this.waresName = waresName;
@@ -201,7 +188,6 @@ public class IntegralWares extends BaseEntity
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id", getId())
-            .append("waresType", getWaresType())
             .append("waresName", getWaresName())
             .append("saleIntegral", getSaleIntegral())
             .append("waresPic", getWaresPic())

+ 4 - 13
yijia-integral/src/main/resources/mapper/integral/CustomerPointsMapper.xml

@@ -7,8 +7,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="CustomerPoints" id="CustomerPointsResult">
         <result property="id"    column="id"    />
         <result property="unionId"    column="union_id"    />
-        <result property="blogOpenid"    column="blog_openid"    />
-        <result property="minaOpenid"    column="mina_openid"    />
         <result property="mobilePhone"    column="mobile_phone"    />
         <result property="points"    column="points"    />
         <result property="consumptionPoints"    column="consumption_points"    />
@@ -21,15 +19,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectCustomerPointsVo">
-        select id, union_id, blog_openid, mina_openid, mobile_phone, points,customer_name, consumption_points, accumulate_points, invalid_points, recent_consumption_date, station_id, station_name from customer_points
+        select  p.id,p.union_id,p.mobile_phone,p.points,p.customer_name, p.consumption_points,
+        p.accumulate_points, p.invalid_points,  p.recent_consumption_date,p.station_id,
+        d.dept_name  as station_name
+        from customer_points p join sys_dept d on p.station_id = d.dept_id
     </sql>
 
     <select id="selectCustomerPointsList" parameterType="CustomerPoints" resultMap="CustomerPointsResult">
         <include refid="selectCustomerPointsVo"/>
         <where>
             <if test="unionId != null  and unionId != ''"> and union_id = #{unionId}</if>
-            <if test="blogOpenid != null  and blogOpenid != ''"> and blog_openid = #{blogOpenid}</if>
-            <if test="minaOpenid != null  and minaOpenid != ''"> and mina_openid = #{minaOpenid}</if>
             <if test="mobilePhone != null  and mobilePhone != ''"> and mobile_phone like concat('%', #{mobilePhone}, '%')</if>
              and points  != 0
             <if test="consumptionPoints != null"> and consumption_points = #{consumptionPoints}</if>
@@ -58,8 +57,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         insert into customer_points
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="unionId != null">union_id,</if>
-            <if test="blogOpenid != null">blog_openid,</if>
-            <if test="minaOpenid != null">mina_openid,</if>
             <if test="mobilePhone != null">mobile_phone,</if>
             <if test="points != null">points,</if>
             <if test="consumptionPoints != null">consumption_points,</if>
@@ -67,12 +64,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="invalidPoints != null">invalid_points,</if>
             <if test="recentConsumptionDate != null">recent_consumption_date,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="unionId != null">#{unionId},</if>
-            <if test="blogOpenid != null">#{blogOpenid},</if>
-            <if test="minaOpenid != null">#{minaOpenid},</if>
             <if test="mobilePhone != null">#{mobilePhone},</if>
             <if test="points != null">#{points},</if>
             <if test="consumptionPoints != null">#{consumptionPoints},</if>
@@ -80,7 +74,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="invalidPoints != null">#{invalidPoints},</if>
             <if test="recentConsumptionDate != null">#{recentConsumptionDate},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
          </trim>
     </insert>
 
@@ -88,8 +81,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update customer_points
         <trim prefix="SET" suffixOverrides=",">
             <if test="unionId != null">union_id = #{unionId},</if>
-            <if test="blogOpenid != null">blog_openid = #{blogOpenid},</if>
-            <if test="minaOpenid != null">mina_openid = #{minaOpenid},</if>
             <if test="mobilePhone != null">mobile_phone = #{mobilePhone},</if>
             <if test="points != null">points = #{points},</if>
             <if test="consumptionPoints != null">consumption_points = #{consumptionPoints},</if>

+ 12 - 17
yijia-integral/src/main/resources/mapper/integral/IntegralOrderMapper.xml

@@ -7,8 +7,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="IntegralOrder" id="IntegralOrderResult">
         <result property="id"    column="id"    />
         <result property="integralOrderNo"    column="integral_order_no"    />
-        <result property="waresType"    column="wares_type"    />
         <result property="waresName"    column="wares_name"    />
+        <result property="waresPic"    column="wares_pic"    />
+        <result property="waresDetail"    column="wares_detail"    />
         <result property="waresId"    column="wares_id"    />
         <result property="unionId"    column="union_id"    />
         <result property="customerName"    column="customer_name"    />
@@ -23,28 +24,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectIntegralOrderVo">
-        select id, integral_order_no, wares_type, wares_name, wares_id, union_id, customer_name, exchange_num, exchange_time,
-         p.status, integral, station_id,d.dept_name as station_name,mobile_phone
-         from integral_order p join  sys_dept d on p.station_id =d.dept_id
+        select p.id, p.integral_order_no, w.wares_name, p.wares_id, p.union_id, p.customer_name, w.wares_pic,w.wares_detail,p.exchange_num,p.exchange_time,p.status, p.integral, p.station_id,d.dept_name as station_name,p.mobile_phone
+        from integral_order p
+        join  sys_dept d on p.station_id =d.dept_id
+        join integral_wares w on p.wares_id = w.id
     </sql>
 
     <select id="selectIntegralOrderList" parameterType="IntegralOrder" resultMap="IntegralOrderResult">
         <include refid="selectIntegralOrderVo"/>
         <where>
             <if test="integralOrderNo != null  and integralOrderNo != ''"> and integral_order_no like concat('%', #{integralOrderNo}, '%')</if>
-            <if test="waresType != null  and waresType != ''"> and wares_type = #{waresType}</if>
-            <if test="waresName != null  and waresName != ''"> and wares_name like concat('%', #{waresName}, '%')</if>
-            <if test="waresId != null "> and wares_id = #{waresId}</if>
+            <if test="waresName != null  and waresName != ''"> and w.wares_name like concat('%', #{waresName}, '%')</if>
+            <if test="waresId != null "> and p.wares_id = #{waresId}</if>
             <if test="unionId != null  and unionId != ''"> and union_id = #{unionId}</if>
             <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
             <if test="exchangeNum != null "> and exchange_num = #{exchangeNum}</if>
             <if test="exchangeTime != null "> and exchange_time = #{exchangeTime}</if>
             <if test="status != null  and status != ''"> and p.status = #{status}</if>
-            <if test="integral != null "> and integral = #{integral}</if>
-            <if test="stationId != null "> and station_id = #{stationId}</if>
-            <if test="mobilePhone != null "> and mobile_phone = #{mobilePhone}</if>
+            <if test="integral != null "> and p.integral = #{integral}</if>
+            <if test="stationId != null "> and p.station_id = #{stationId}</if>
+            <if test="mobilePhone != null "> and p.mobile_phone = #{mobilePhone}</if>
             <if test="stationIdList != null ">
-                and station_id in
+                and p.station_id in
                 <foreach item="item" index="index" collection="stationIdList"
                          open="(" separator="," close=")">
                     #{item}
@@ -63,8 +64,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         insert into integral_order
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="integralOrderNo != null">integral_order_no,</if>
-            <if test="waresType != null">wares_type,</if>
-            <if test="waresName != null">wares_name,</if>
             <if test="waresId != null">wares_id,</if>
             <if test="unionId != null">union_id,</if>
             <if test="customerName != null">customer_name,</if>
@@ -77,8 +76,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="integralOrderNo != null">#{integralOrderNo},</if>
-            <if test="waresType != null">#{waresType},</if>
-            <if test="waresName != null">#{waresName},</if>
             <if test="waresId != null">#{waresId},</if>
             <if test="unionId != null">#{unionId},</if>
             <if test="customerName != null">#{customerName},</if>
@@ -95,8 +92,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update integral_order
         <trim prefix="SET" suffixOverrides=",">
             <if test="integralOrderNo != null">integral_order_no = #{integralOrderNo},</if>
-            <if test="waresType != null">wares_type = #{waresType},</if>
-            <if test="waresName != null">wares_name = #{waresName},</if>
             <if test="waresId != null">wares_id = #{waresId},</if>
             <if test="unionId != null">union_id = #{unionId},</if>
             <if test="customerName != null">customer_name = #{customerName},</if>

+ 2 - 5
yijia-integral/src/main/resources/mapper/integral/IntegralRuleMapper.xml

@@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectIntegralRuleVo"/>
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
-            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
+            <if test="stationName != null  and stationName != ''"> and dept_name like concat('%', #{stationName}, '%')</if>
             <if test="termDateManage != null  and termDateManage != ''"> and term_date_manage = #{termDateManage}</if>
             <if test="emptyDate != null "> and empty_date = #{emptyDate}</if>
             <if test="integralActivity != null  and integralActivity != ''"> and integral_activity = #{integralActivity}</if>
@@ -76,7 +76,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         insert into integral_rule
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
             <if test="termDateManage != null">term_date_manage,</if>
             <if test="emptyDate != null">empty_date,</if>
             <if test="integralActivity != null">integral_activity,</if>
@@ -97,7 +96,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
             <if test="termDateManage != null">#{termDateManage},</if>
             <if test="emptyDate != null">#{emptyDate},</if>
             <if test="integralActivity != null">#{integralActivity},</if>
@@ -117,7 +115,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update integral_rule
         <trim prefix="SET" suffixOverrides=",">
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
             <if test="termDateManage != null">term_date_manage = #{termDateManage},</if>
             <if test="emptyDate != null">empty_date = #{emptyDate},</if>
             <if test="integralActivity != null">integral_activity = #{integralActivity},</if>
@@ -148,7 +145,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectIntegralRuleVo"/>
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
-            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
+            <if test="stationName != null  and stationName != ''"> and dept_name like concat('%', #{stationName}, '%')</if>
             <if test="termDateManage != null  and termDateManage != ''"> and term_date_manage = #{termDateManage}</if>
             <if test="emptyDate != null "> and empty_date = #{emptyDate}</if>
             <if test="integralActivity != null  and integralActivity != ''"> and integral_activity = #{integralActivity}</if>

+ 1 - 6
yijia-integral/src/main/resources/mapper/integral/IntegralWaresMapper.xml

@@ -6,7 +6,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <resultMap type="IntegralWares" id="IntegralWaresResult">
         <result property="id"    column="id"    />
-        <result property="waresType"    column="wares_type"    />
         <result property="waresName"    column="wares_name"    />
         <result property="saleIntegral"    column="sale_integral"    />
         <result property="waresPic"    column="wares_pic"    />
@@ -24,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectIntegralWaresVo">
-        select w.id, wares_type, wares_name, w.sale_integral, wares_pic, wares_detail,
+        select w.id, wares_name, w.sale_integral, wares_pic, wares_detail,
         wares_count, wares_out_count, wares_status, w.create_time, w.create_by,
         w.update_time, w.update_by, w.station_id,d.dept_name as station_name
         from integral_wares w join sys_dept d on w.station_id = d.dept_id
@@ -33,7 +32,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectIntegralWaresList" parameterType="IntegralWares" resultMap="IntegralWaresResult">
         <include refid="selectIntegralWaresVo"/>
         <where>
-            <if test="waresType != null  and waresType != ''"> and wares_type = #{waresType}</if>
             <if test="waresName != null  and waresName != ''"> and wares_name like concat('%', #{waresName}, '%')</if>
             <if test="saleIntegral != null "> and w.sale_integral = #{saleIntegral}</if>
             <if test="waresPic != null  and waresPic != ''"> and w.wares_pic = #{waresPic}</if>
@@ -66,7 +64,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertIntegralWares" parameterType="IntegralWares" useGeneratedKeys="true" keyProperty="id">
         insert into integral_wares
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="waresType != null">wares_type,</if>
             <if test="waresName != null">wares_name,</if>
             <if test="saleIntegral != null">sale_integral,</if>
             <if test="waresPic != null">wares_pic,</if>
@@ -83,7 +80,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="stationId != null">station_id,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="waresType != null">#{waresType},</if>
             <if test="waresName != null">#{waresName},</if>
             <if test="saleIntegral != null">#{saleIntegral},</if>
             <if test="waresPic != null">#{waresPic},</if>
@@ -104,7 +100,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateIntegralWares" parameterType="IntegralWares">
         update integral_wares
         <trim prefix="SET" suffixOverrides=",">
-            <if test="waresType != null">wares_type = #{waresType},</if>
             <if test="waresName != null">wares_name = #{waresName},</if>
             <if test="saleIntegral != null">sale_integral = #{saleIntegral},</if>
             <if test="waresPic != null">wares_pic = #{waresPic},</if>