Explorar o código

团长:预售商品,达人报表增加达人标签,食品团导出达人信息导出id与名称分开展示

yumeng hai 10 meses
pai
achega
46f6967c33

+ 24 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/controller/KuaishouItemListController.java

@@ -558,6 +558,30 @@ public class KuaishouItemListController extends BaseController {
     }
     }
 
 
 
 
+    @GetMapping("/updateIsPresaleByItemId")
+    public JSONObject updateIsPresaleByItemId(Long itemId, Integer isPresale) {
+        JSONObject returnJson = new JSONObject();
+        try {
+            KuaishouItemList itemInfoByItemId = kuaishouItemListService.getItemInfoByItemId(itemId);
+            if (Check.isNull(itemInfoByItemId)) {
+                throw new Exception("该商品未绑定");
+            }
+            KuaishouItemList update = new KuaishouItemList();
+            update.setItemId(itemId);
+            update.setIsPresale(isPresale);
+            int i = kuaishouItemListService.updateKuaishouItemList(update);
+            if (i > 0) {
+                returnJson.put("code", 0);
+                returnJson.put("message", "修改成功");
+            }
+        } catch (Exception e) {
+            returnJson.put("code", 500);
+            returnJson.put("message", e.getMessage());
+        }
+        return returnJson;
+    }
+
+
     @GetMapping("/removeRelateByItemId")
     @GetMapping("/removeRelateByItemId")
     public JSONObject removeRelateByItemId(Long itemId) {
     public JSONObject removeRelateByItemId(Long itemId) {
         JSONObject returnJson = new JSONObject();
         JSONObject returnJson = new JSONObject();

+ 42 - 9
ruixuan-live/src/main/java/com/ruixuan/isc/controller/SupplyChainController.java

@@ -62,6 +62,11 @@ public class SupplyChainController extends BaseController {
     @Value("${accept.mgsPrivateKey2}")
     @Value("${accept.mgsPrivateKey2}")
     private String mgsPrivateKey2;
     private String mgsPrivateKey2;
 
 
+
+    @Value("${ownership.id}")
+    private String ownershipId;
+
+
     @GetMapping("/privateKey")
     @GetMapping("/privateKey")
     @ApiOperation(value = "达人订单")
     @ApiOperation(value = "达人订单")
     public String privateKey() {
     public String privateKey() {
@@ -332,6 +337,7 @@ public class SupplyChainController extends BaseController {
                 export.add(date.getString("userName"));
                 export.add(date.getString("userName"));
                 export.add(date.getLong("itemId"));
                 export.add(date.getLong("itemId"));
                 export.add(date.getString("itemTitle"));
                 export.add(date.getString("itemTitle"));
+                export.add(date.getString("isPresale"));
                 export.add(date.getString("imageUrl"));
                 export.add(date.getString("imageUrl"));
                 export.add(date.getString("itemCommissionRate"));
                 export.add(date.getString("itemCommissionRate"));
                 export.add(date.getInteger("orderNum"));
                 export.add(date.getInteger("orderNum"));
@@ -349,7 +355,7 @@ public class SupplyChainController extends BaseController {
                 exportList.add(export);
                 exportList.add(export);
             }
             }
         }
         }
-        String[] headers = {"所属人", "商品ID", "商品名称", "商品封面", "佣金率", "订单数", "有效订单数", "有效订单率", "发货数", "发货率", "未发货数", "ccr", "小店星级", "店铺物流分", "店铺评分", "店铺服务分", "店铺质量分"};
+        String[] headers = {"所属人", "商品ID", "商品名称", "是否预售", "商品封面", "佣金率", "订单数", "有效订单数", "有效订单率", "发货数", "发货率", "未发货数", "ccr", "小店星级", "店铺物流分", "店铺评分", "店铺服务分", "店铺质量分"};
         OutputStream os = response.getOutputStream();
         OutputStream os = response.getOutputStream();
         ExportExcelUtils eeu = new ExportExcelUtils();
         ExportExcelUtils eeu = new ExportExcelUtils();
         XSSFWorkbook workbook = new XSSFWorkbook();
         XSSFWorkbook workbook = new XSSFWorkbook();
@@ -910,6 +916,7 @@ public class SupplyChainController extends BaseController {
     @RequestMapping(value = "/exportPromoterTotal")
     @RequestMapping(value = "/exportPromoterTotal")
     @ResponseBody
     @ResponseBody
     public void exportPromoterTotal(HttpServletRequest request, HttpServletResponse response, @RequestBody JSONObject requestJson) throws Exception {
     public void exportPromoterTotal(HttpServletRequest request, HttpServletResponse response, @RequestBody JSONObject requestJson) throws Exception {
+
         Map<String, Object> requestMap = new HashMap<>();
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(requestJson.getString("orderStartDate"))) {
         if (!Check.isNull(requestJson.getString("orderStartDate"))) {
             Long start = DateUtils.getStartLongTime(requestJson.getString("orderStartDate"));
             Long start = DateUtils.getStartLongTime(requestJson.getString("orderStartDate"));
@@ -937,10 +944,19 @@ public class SupplyChainController extends BaseController {
             for (int i = 0; i < list.size(); i++) {
             for (int i = 0; i < list.size(); i++) {
                 JSONObject date = list.get(i);
                 JSONObject date = list.get(i);
                 List<Object> export = new ArrayList();
                 List<Object> export = new ArrayList();
-                Long promoterId = date.getLong("promoterId");
-                String promoterNickName = date.getString("promoterNickName");
-                String name = promoterNickName + "(" + promoterId + ")";
-                export.add(name);
+
+                if (ownershipId.equals("miaogousi")) {
+                    Long promoterId = date.getLong("promoterId");
+                    export.add(promoterId);
+                    String promoterNickName = date.getString("promoterNickName");
+                    export.add(promoterNickName);
+                } else {
+                    Long promoterId = date.getLong("promoterId");
+                    String promoterNickName = date.getString("promoterNickName");
+                    String name = promoterNickName + "(" + promoterId + ")";
+                    export.add(name);
+                }
+
                 export.add(date.getInteger("orderNum"));
                 export.add(date.getInteger("orderNum"));
                 export.add(date.getInteger("validOrderNUm"));
                 export.add(date.getInteger("validOrderNUm"));
                 export.add(date.getString("validRadio"));
                 export.add(date.getString("validRadio"));
@@ -999,7 +1015,12 @@ public class SupplyChainController extends BaseController {
             }
             }
 
 
         }
         }
-        String[] headers = {"达人名称", "订单数", "有效订单数", "有效订单率", "GVM", "有效GMV", "发货数", "发货率", "未发货数", "绑定人"};
+        String[] headers = {};
+        if (!ownershipId.equals("miaogousi")) {
+            headers = new String[]{"达人名称", "订单数", "有效订单数", "有效订单率", "GVM", "有效GMV", "发货数", "发货率", "未发货数", "绑定人"};
+        } else {
+            headers = new String[]{"达人ID", "达人名称", "订单数", "有效订单数", "有效订单率", "GVM", "有效GMV", "发货数", "发货率", "未发货数", "绑定人"};
+        }
         OutputStream os = response.getOutputStream();
         OutputStream os = response.getOutputStream();
         ExportExcelUtils eeu = new ExportExcelUtils();
         ExportExcelUtils eeu = new ExportExcelUtils();
         XSSFWorkbook workbook = new XSSFWorkbook();
         XSSFWorkbook workbook = new XSSFWorkbook();
@@ -1043,8 +1064,14 @@ public class SupplyChainController extends BaseController {
                 List<Object> export = new ArrayList();
                 List<Object> export = new ArrayList();
                 String promoterNickName = date.getString("promoterNickName");
                 String promoterNickName = date.getString("promoterNickName");
                 Long promoterId = date.getLong("promoterId");
                 Long promoterId = date.getLong("promoterId");
-                String promoter = promoterNickName + "(" + promoterId + ")";
-                export.add(promoter);
+                if ("miaogousi".equals(ownershipId)) {
+                    export.add(promoterId);
+                    export.add(promoterNickName);
+                } else {
+                    String promoter = promoterNickName + "(" + promoterId + ")";
+                    export.add(promoter);
+                }
+
                 Long itemId = date.getLong("itemId");
                 Long itemId = date.getLong("itemId");
                 String itemTitle = date.getString("itemTitle");
                 String itemTitle = date.getString("itemTitle");
                 String item = itemTitle + "(" + itemId + ")";
                 String item = itemTitle + "(" + itemId + ")";
@@ -1059,7 +1086,13 @@ public class SupplyChainController extends BaseController {
                 exportList.add(export);
                 exportList.add(export);
             }
             }
         }
         }
-        String[] headers = {"达人", "商品", "商品封面", "订单数", "有效订单数", "有效订单率", "发货数", "发货率", "商品状态"};
+        String[] headers = {};
+        if (!"miaogousi".equals(ownershipId)) {
+            headers = new String[]{"达人", "商品", "商品封面", "订单数", "有效订单数", "有效订单率", "发货数", "发货率", "商品状态"};
+
+        } else {
+            headers = new String[]{"达人id", "达人名称", "商品", "商品封面", "订单数", "有效订单数", "有效订单率", "发货数", "发货率", "商品状态"};
+        }
         OutputStream os = response.getOutputStream();
         OutputStream os = response.getOutputStream();
         ExportExcelUtils eeu = new ExportExcelUtils();
         ExportExcelUtils eeu = new ExportExcelUtils();
         XSSFWorkbook workbook = new XSSFWorkbook();
         XSSFWorkbook workbook = new XSSFWorkbook();

+ 10 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/entity/KuaishouItemList.java

@@ -16,6 +16,7 @@ public class KuaishouItemList extends BaseEntity {
     @JsonSerialize(using = ToStringSerializer.class)
     @JsonSerialize(using = ToStringSerializer.class)
     private Long itemId;
     private Long itemId;
     private Integer mediaId;
     private Integer mediaId;
+    private Integer isPresale;
 
 
     /**
     /**
      * 商品标题
      * 商品标题
@@ -258,6 +259,14 @@ public class KuaishouItemList extends BaseEntity {
         this.mediaId = mediaId;
         this.mediaId = mediaId;
     }
     }
 
 
+    public Integer getIsPresale() {
+        return isPresale;
+    }
+
+    public void setIsPresale(Integer isPresale) {
+        this.isPresale = isPresale;
+    }
+
     public String getItemTitle() {
     public String getItemTitle() {
         return itemTitle;
         return itemTitle;
     }
     }
@@ -615,6 +624,7 @@ public class KuaishouItemList extends BaseEntity {
         return "KuaishouItemList{" +
         return "KuaishouItemList{" +
                 "itemId=" + itemId +
                 "itemId=" + itemId +
                 ", mediaId=" + mediaId +
                 ", mediaId=" + mediaId +
+                ", isPresale=" + isPresale +
                 ", itemTitle='" + itemTitle + '\'' +
                 ", itemTitle='" + itemTitle + '\'' +
                 ", itemPrice=" + itemPrice +
                 ", itemPrice=" + itemPrice +
                 ", itemDesc='" + itemDesc + '\'' +
                 ", itemDesc='" + itemDesc + '\'' +

+ 3 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/SupplyChainServiceImpl.java

@@ -66,6 +66,9 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
                 List<JSONObject> topOrders = supplyChainMapper.getTopOrders(requestMap);
                 List<JSONObject> topOrders = supplyChainMapper.getTopOrders(requestMap);
                 jsonObject.put("topOrders", topOrders);
                 jsonObject.put("topOrders", topOrders);
 
 
+                List<JSONObject> tags = supplyChainMapper.getPromoterId(Long.valueOf(promoterId));
+                jsonObject.put("tags", tags);
+
             }
             }
         }
         }
         return list;
         return list;

+ 12 - 1
ruixuan-live/src/main/resources/mapper/isc/KuaishouItemListMapper.xml

@@ -45,6 +45,7 @@
         <result property="samplesPeoples" column="samples_peoples"/>
         <result property="samplesPeoples" column="samples_peoples"/>
         <result property="relateId" column="relate_id"/>
         <result property="relateId" column="relate_id"/>
         <result property="ruleId" column="rule_id"/>
         <result property="ruleId" column="rule_id"/>
+        <result property="isPresale" column="is_presale"/>
         <result property="createTime" column="create_time"/>
         <result property="createTime" column="create_time"/>
         <result property="updateTime" column="update_time"/>
         <result property="updateTime" column="update_time"/>
     </resultMap>
     </resultMap>
@@ -64,7 +65,7 @@
                shop_score,
                shop_score,
                category_id,
                category_id,
                category_name,
                category_name,
-               item_gallery_urls, identity, activity_id, shop_title, commission_rate, mall_service_score, mall_quality_score, sku_list, user_id, user_name, examine_id, examine_name, examine_status, refuse_detail, post_area, no_post_area, regimental_promotion_rate, regimental_promotion, sample_count, sample_requirement, delivery_rate, partner_recommend_text, detail_url, samples_received, samples_peoples, relate_id, rule_id, create_time, update_time
+               item_gallery_urls, identity, activity_id, shop_title, commission_rate, mall_service_score, mall_quality_score, sku_list, user_id, user_name, examine_id, examine_name, examine_status, refuse_detail, post_area, no_post_area, regimental_promotion_rate, regimental_promotion, sample_count, sample_requirement, delivery_rate, partner_recommend_text, detail_url, samples_received, samples_peoples, relate_id, rule_id, is_presale, create_time, update_time
         from kuaishou_item_list
         from kuaishou_item_list
     </sql>
     </sql>
     <select id="getItemList" resultType="com.ruixuan.isc.entity.KuaishouItemList">
     <select id="getItemList" resultType="com.ruixuan.isc.entity.KuaishouItemList">
@@ -80,6 +81,7 @@
         t1.detail_url,t1.samples_received, t1.samples_peoples,t1.relate_id,t1.rule_id,t1.create_time, t1.update_time,
         t1.detail_url,t1.samples_received, t1.samples_peoples,t1.relate_id,t1.rule_id,t1.create_time, t1.update_time,
         t2.rule_name,
         t2.rule_name,
         t1.media_id,
         t1.media_id,
+        t1.is_presale,
         (
         (
         case when t1.media_id = 2
         case when t1.media_id = 2
         then '快手'
         then '快手'
@@ -316,6 +318,7 @@
             <if test="samplesPeoples != null">samples_peoples,</if>
             <if test="samplesPeoples != null">samples_peoples,</if>
             <if test="relateId != null">relate_id,</if>
             <if test="relateId != null">relate_id,</if>
             <if test="ruleId != null">rule_id,</if>
             <if test="ruleId != null">rule_id,</if>
+            <if test="isPresale != null">is_presale,</if>
             <if test="createTime != null">create_time,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="updateTime != null">update_time,</if>
         </trim>
         </trim>
@@ -361,6 +364,7 @@
             <if test="samplesPeoples != null">#{samplesPeoples},</if>
             <if test="samplesPeoples != null">#{samplesPeoples},</if>
             <if test="relateId != null">#{relateId},</if>
             <if test="relateId != null">#{relateId},</if>
             <if test="ruleId != null">#{ruleId},</if>
             <if test="ruleId != null">#{ruleId},</if>
+            <if test="isPresale != null">#{isPresale},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
         </trim>
         </trim>
@@ -443,6 +447,7 @@
             <if test="samplesPeoples != null">samples_peoples,</if>
             <if test="samplesPeoples != null">samples_peoples,</if>
             <if test="relateId != null">relate_id,</if>
             <if test="relateId != null">relate_id,</if>
             <if test="ruleId != null">rule_id,</if>
             <if test="ruleId != null">rule_id,</if>
+            <if test="isPresale != null">is_presale,</if>
             <if test="createTime != null">create_time,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="updateTime != null">update_time,</if>
         </trim>
         </trim>
@@ -488,6 +493,7 @@
             <if test="samplesPeoples != null">#{samplesPeoples},</if>
             <if test="samplesPeoples != null">#{samplesPeoples},</if>
             <if test="relateId != null">#{relateId},</if>
             <if test="relateId != null">#{relateId},</if>
             <if test="ruleId != null">#{ruleId},</if>
             <if test="ruleId != null">#{ruleId},</if>
+            <if test="isPresale != null">#{isPresale},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
         </trim>
         </trim>
@@ -536,6 +542,7 @@
             <if test="samplesPeoples != null">samples_peoples,</if>
             <if test="samplesPeoples != null">samples_peoples,</if>
             <if test="relateId != null">relate_id,</if>
             <if test="relateId != null">relate_id,</if>
             <if test="ruleId != null">rule_id,</if>
             <if test="ruleId != null">rule_id,</if>
+            <if test="isPresale != null">is_presale,</if>
             <if test="createTime != null">create_time,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="updateTime != null">update_time,</if>
         </trim>
         </trim>
@@ -581,6 +588,7 @@
             <if test="samplesPeoples != null">#{samplesPeoples},</if>
             <if test="samplesPeoples != null">#{samplesPeoples},</if>
             <if test="relateId != null">#{relateId},</if>
             <if test="relateId != null">#{relateId},</if>
             <if test="ruleId != null">#{ruleId},</if>
             <if test="ruleId != null">#{ruleId},</if>
+            <if test="isPresale != null">#{isPresale},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
         </trim>
         </trim>
@@ -629,6 +637,7 @@
             <if test="samplesPeoples != null">samples_peoples,</if>
             <if test="samplesPeoples != null">samples_peoples,</if>
             <if test="relateId != null">relate_id,</if>
             <if test="relateId != null">relate_id,</if>
             <if test="ruleId != null">rule_id,</if>
             <if test="ruleId != null">rule_id,</if>
+            <if test="isPresale != null">is_presale,</if>
             <if test="createTime != null">create_time,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="updateTime != null">update_time,</if>
         </trim>
         </trim>
@@ -674,6 +683,7 @@
             <if test="samplesPeoples != null">#{samplesPeoples},</if>
             <if test="samplesPeoples != null">#{samplesPeoples},</if>
             <if test="relateId != null">#{relateId},</if>
             <if test="relateId != null">#{relateId},</if>
             <if test="ruleId != null">#{ruleId},</if>
             <if test="ruleId != null">#{ruleId},</if>
+            <if test="isPresale != null">#{isPresale},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
         </trim>
         </trim>
@@ -765,6 +775,7 @@
             <if test="samplesPeoples != null">samples_peoples = #{samplesPeoples},</if>
             <if test="samplesPeoples != null">samples_peoples = #{samplesPeoples},</if>
             <if test="relateId != null">relate_id = #{relateId},</if>
             <if test="relateId != null">relate_id = #{relateId},</if>
             <if test="ruleId != null">rule_id = #{ruleId},</if>
             <if test="ruleId != null">rule_id = #{ruleId},</if>
+            <if test="isPresale != null">is_presale = #{isPresale},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
         </trim>
         </trim>

+ 43 - 5
ruixuan-live/src/main/resources/mapper/isc/SupplyChainMapper.xml

@@ -199,7 +199,15 @@
         t4.mall_logistics_score as 'mallLogisticsScore',
         t4.mall_logistics_score as 'mallLogisticsScore',
         t4.shop_score as 'shopScore',
         t4.shop_score as 'shopScore',
         t4.mall_service_score as 'mallServiceScore',
         t4.mall_service_score as 'mallServiceScore',
-        t4.mall_quality_score as 'mallQualityScore'
+        t4.mall_quality_score as 'mallQualityScore',
+        (
+        case when t5.is_presale = 1
+        then '否'
+        when t5.is_presale = 2
+        then '是'
+        else '-'
+        end
+        ) as 'isPresale'
         from kuaishou_supply_chain t1
         from kuaishou_supply_chain t1
         left join kuaishou_item_bind_user t2
         left join kuaishou_item_bind_user t2
         on t1.item_id = t2.item_id
         on t1.item_id = t2.item_id
@@ -207,6 +215,8 @@
         on t1.item_id = t3.item_id
         on t1.item_id = t3.item_id
         left join kuaishou_activity_open_item_list t4
         left join kuaishou_activity_open_item_list t4
         on t1.item_id = t4.item_id
         on t1.item_id = t4.item_id
+        left join kuaishou_item_list t5
+        on t1.item_id = t5.item_id
         where 1 = 1
         where 1 = 1
         <if test="start != null and start != ''">
         <if test="start != null and start != ''">
             and t1.order_create_time &gt;= #{start}
             and t1.order_create_time &gt;= #{start}
@@ -231,6 +241,14 @@
 
 
     <select id="itemBindList" resultType="com.alibaba.fastjson.JSONObject">
     <select id="itemBindList" resultType="com.alibaba.fastjson.JSONObject">
         select t1.*,t2.*,
         select t1.*,t2.*,
+        (
+        case when t4.is_presale = 1
+        then '否'
+        when t4.is_presale = 2
+        then '是'
+        else '-'
+        end
+        ) as 'isPresale',
         t3.shop_star as 'shopStar',
         t3.shop_star as 'shopStar',
         t3.mall_logistics_score as 'mallLogisticsScore',
         t3.mall_logistics_score as 'mallLogisticsScore',
         t3.shop_score as 'shopScore',
         t3.shop_score as 'shopScore',
@@ -280,6 +298,8 @@
         group by item_id) t2 on t1.itemId = t2.itemId
         group by item_id) t2 on t1.itemId = t2.itemId
         left join kuaishou_activity_open_item_list t3
         left join kuaishou_activity_open_item_list t3
         on t1.itemId = t3.item_id
         on t1.itemId = t3.item_id
+        left join kuaishou_item_list t4
+        on t1.itemId = t4.item_id
 
 
         where 1 = 1
         where 1 = 1
         <if test="itemId != null and itemId != ''">
         <if test="itemId != null and itemId != ''">
@@ -885,7 +905,15 @@
         t4.mall_logistics_score as 'mallLogisticsScore',
         t4.mall_logistics_score as 'mallLogisticsScore',
         t4.shop_score as 'shopScore',
         t4.shop_score as 'shopScore',
         t4.mall_service_score as 'mallServiceScore',
         t4.mall_service_score as 'mallServiceScore',
-        t4.mall_quality_score as 'mallQualityScore'
+        t4.mall_quality_score as 'mallQualityScore',
+        (
+        case when t5.is_presale = 1
+        then '否'
+        when t5.is_presale = 2
+        then '是'
+        else '-'
+        end
+        ) as 'isPresale'
         from kuaishou_supply_chain t1
         from kuaishou_supply_chain t1
         left join kuaishou_item_bind_user t2
         left join kuaishou_item_bind_user t2
         on t1.item_id = t2.item_id
         on t1.item_id = t2.item_id
@@ -893,6 +921,8 @@
         on t1.item_id = t3.item_id
         on t1.item_id = t3.item_id
         left join kuaishou_activity_open_item_list t4
         left join kuaishou_activity_open_item_list t4
         on t1.item_id = t4.item_id
         on t1.item_id = t4.item_id
+        left join kuaishou_item_list t5
+        on t1.item_id = t5.item_id
         where 1 = 1
         where 1 = 1
         <if test="start != null and start != ''">
         <if test="start != null and start != ''">
             and t1.order_create_time &gt;= #{start}
             and t1.order_create_time &gt;= #{start}
@@ -2586,7 +2616,15 @@
         t4.mall_logistics_score as 'mallLogisticsScore',
         t4.mall_logistics_score as 'mallLogisticsScore',
         t4.shop_score as 'shopScore',
         t4.shop_score as 'shopScore',
         t4.mall_service_score as 'mallServiceScore',
         t4.mall_service_score as 'mallServiceScore',
-        t4.mall_quality_score as 'mallQualityScore'
+        t4.mall_quality_score as 'mallQualityScore',
+        (
+        case when t5.is_presale = 1
+        then '否'
+        when t5.is_presale = 2
+        then '是'
+        else '-'
+        end
+        ) as 'isPresale'
         from (select item_id as 'itemId', item_title as 'itemTitle', user_id as 'userId', user_name as 'userName'
         from (select item_id as 'itemId', item_title as 'itemTitle', user_id as 'userId', user_name as 'userName'
         from kuaishou_item_list
         from kuaishou_item_list
         where
         where
@@ -2614,8 +2652,8 @@
         on t1.itemId = t3.item_id
         on t1.itemId = t3.item_id
         left join kuaishou_activity_open_item_list t4
         left join kuaishou_activity_open_item_list t4
         on t1.itemId = t4.item_id
         on t1.itemId = t4.item_id
-
-
+        left join kuaishou_item_list t5
+        on t1.itemId = t5.item_id
         where 1 = 1
         where 1 = 1
         <if test="itemId != null and itemId != ''">
         <if test="itemId != null and itemId != ''">
             and t1.item_id = #{itemId}
             and t1.item_id = #{itemId}