zhang song преди 6 години
родител
ревизия
2d0423f8e2

+ 0 - 3
pine-admin/src/main/java/com/pine/admin/modules/base/service/RedisService.java

@@ -83,7 +83,6 @@ public class RedisService {
             redisTemplate.delete(keys);
         }
     }
-
     /**
      * 删除对应的value
      *
@@ -94,7 +93,6 @@ public class RedisService {
             redisTemplate.delete(key);
         }
     }
-
     /**
      * 判断缓存中是否有对应的value
      *
@@ -104,7 +102,6 @@ public class RedisService {
     public boolean exists(final String key) {
         return redisTemplate.hasKey(key);
     }
-
     /**
      * 读取缓存
      *

+ 13 - 0
pine-admin/src/main/java/com/pine/admin/modules/business/entity/Order.java

@@ -391,4 +391,17 @@ public class Order implements Serializable {
      * LogisticsTemplate
      */
     private LogisticsTemplate logisticsTemplate;
+
+    /**
+     * 收货人手机号
+     */
+    private String receiptMobile;
+    /**
+     * 收货人姓名
+     */
+    private String receiptName;
+    /**
+     * 收货人地址
+     */
+    private String address;
 }

+ 1 - 1
pine-admin/src/main/java/com/pine/admin/modules/business/service/impl/LogisticsTemplateServiceImpl.java

@@ -170,8 +170,8 @@ public class LogisticsTemplateServiceImpl implements LogisticsTemplateService {
 
     @Override
     public LogisticsTemplate queryLogisticsTemplateWithCompany(long id) {
-        log.debug("queryLogisticsTemplateWithCompany and id:{} \r\n storeId;{}", id);
 
+        log.debug("queryLogisticsTemplateWithCompany and id:{} \r\n storeId;{}", id);
 
         LogisticsTemplate logisticsTemplate = logisticsTemplateDao.byId(id);
 

+ 1 - 1
pine-admin/src/main/resources/application.properties

@@ -18,7 +18,7 @@ mybatis.configuration.mapUnderscoreToCamelCase=true
 logging.level.com.pine=DEBUG
 logging.path=/home/INFO_FILE.%d{yyyy-MM-dd}.gz
 logging.level.com.pine.admin.modules.system.dao=DEBUG
-### mysql config ###
+### mysql config   ###
 spring.datasource.url=jdbc:mysql://47.100.127.59:3306/lecshop_v2?useUnicode=true&characterEncoding=utf8&useSSL=false
 spring.datasource.username=root
 spring.datasource.password=pl,okmijn

+ 35 - 20
pine-admin/src/main/resources/mapper/business/OrderDao.xml

@@ -40,10 +40,8 @@
         <result property="modifyTime" column="modify_time"/>
         <result property="evaluationTime" column="evaluation_time"/>
         <result property="presaleTime" column="presale_time"/>
-
         <result property="openGroupTime" column="open_group_time"/>
         <result column="customer_name" property="customerName"/>
-
         <result property="recommended" column="recommended"/>
         <result property="lotteryStatus" column="lottery_status"/>
         <result property="writeOffCode" column="write_off_code"/>
@@ -329,24 +327,41 @@
 
     <!-- 分页查询-->
     <select id="queryByPage" parameterType="java.util.Map"
-            resultMap="entityMap">
-        select ls_order.*,ls_customer.username as customer_name from ls_order join ls_customer on ls_order.customer_id =
-        ls_customer.id where ls_customer.del_flag = '0'
+            resultType="com.pine.admin.modules.business.entity.Order">
+        select ls_order.*,
+        ls_customer.username as customerName,
+        ls_customer.mobile,
+        ls_order_attr.receipt_mobile as receiptMobile,
+        ls_order_attr.receipt_name as receiptName,
+        concat(ls_order_attr.receipt_address,ls_order_attr.receipt_detail_address) as address
+        from ls_order
+        join ls_customer on ls_order.customer_id = ls_customer.id
+        join ls_order_attr on ls_order_attr.order_id = ls_order.id
+        where ls_customer.del_flag = '0'
         and ls_order.store_id = 0
-
+        and ls_order.status != 1
+        and ls_order.status != 5
+        <!-- 收货人手机号 -->
+        <if test="record.receiptMobile != null and record.receiptMobile != '' ">
+            and ls_order_attr.receipt_mobile = #{record.receiptMobile}
+        </if>
+        <!-- 收货人姓名 -->
+        <if test="record.receiptName != null and record.receiptName != '' ">
+            and ls_order_attr.receipt_name like CONCAT(CONCAT('%', #{record.receiptName}),'%')
+        </if>
         <if test="record.orderCode != null and record.orderCode != '' ">
             AND ls_order.order_code = #{record.orderCode}
         </if>
-
         <if test="record.customerName != null and record.customerName != ''">
             AND ls_customer.username like CONCAT(CONCAT('%', #{record.customerName}),'%')
         </if>
-
-
+        <if test="record.customerMobile != null and record.customerMobile != ''">
+            AND ls_customer.mobile = #{record.customerMobile}
+        </if>
         <if test="record.customerId != null and record.customerId != ''">
             AND ls_order.id=#{record.customerId}
         </if>
-           <if test="record.dealerId != null and record.dealerId != ''">
+        <if test="record.dealerId != null and record.dealerId != ''">
             AND ls_order.dealer_id=#{record.dealerId}
         </if>
 
@@ -355,7 +370,7 @@
         </if>
 
         <if test='record.status != null and record.status != "" and  record.status!= "5"'>
-            AND ls_order.status = #record.{status}
+            AND ls_order.status =  #{record.status}
         </if>
         <if test='record.status=="5"'>
             AND ls_order.status in ('5','6','7')
@@ -769,18 +784,18 @@
     </select>
 
     <update id="delete">
-<!--        UPDATE ls_order SET del_flag = 'Y'-->
-<!--        <where>-->
-<!--            AND id = #{id}-->
-<!--        </where>-->
+        <!--        UPDATE ls_order SET del_flag = 'Y'-->
+        <!--        <where>-->
+        <!--            AND id = #{id}-->
+        <!--        </where>-->
     </update>
 
     <update id="deleteIds" parameterType="java.util.ArrayList">
-<!--        UPDATE ls_order SET del_flag = 'Y'-->
-<!--        WHERE id IN-->
-<!--        <foreach item='ids' collection="array" index="index" open="(" separator="," close=")">-->
-<!--            #{ids}-->
-<!--        </foreach>-->
+        <!--        UPDATE ls_order SET del_flag = 'Y'-->
+        <!--        WHERE id IN-->
+        <!--        <foreach item='ids' collection="array" index="index" open="(" separator="," close=")">-->
+        <!--            #{ids}-->
+        <!--        </foreach>-->
     </update>
 
 </mapper>