yumeng 2 years ago
parent
commit
c95cd457a6

+ 4 - 4
ruixuan-live/src/main/java/com/ruixuan/isc/controller/KuaishouItemCollectSamplesController.java

@@ -81,7 +81,7 @@ public class KuaishouItemCollectSamplesController extends BaseController {
      * 查询【请填写功能名称】列表
      */
     @GetMapping("/list")
-    public TableDataInfo list(Long itemId, Long promoterId, Long userId, Integer collectSampleStatus, String itemTitle, String promoterNickName, String promoterPhone,
+    public TableDataInfo list(Long itemId, String promoterId, Long userId, Integer collectSampleStatus, String itemTitle, String promoterNickName, String promoterPhone,
                               String consignee, Long itemCreateId, Long collectSampleId, String courierNumber, String collectSampleDesc, String fieId, String sort, Integer mediaId) {
         TableDataInfo tableDataInfo = new TableDataInfo();
         try {
@@ -557,7 +557,7 @@ public class KuaishouItemCollectSamplesController extends BaseController {
 
 
     @GetMapping("/copyInfo")
-    public JSONObject copyInfo(Long promoterId) {
+    public JSONObject copyInfo(String promoterId) {
         JSONObject returnJson = new JSONObject();
         try {
             if (Check.isNull(promoterId)) {
@@ -606,7 +606,7 @@ public class KuaishouItemCollectSamplesController extends BaseController {
                 export.add(date.getString("promoterId"));
                 export.add(date.getString("promoterNickName"));
                 export.add(date.getString("status"));
-                JSONObject copyJson = kuaishouItemCollectSamplesService.getCopyInfo(date.getLong("promoterId"));
+                JSONObject copyJson = kuaishouItemCollectSamplesService.getCopyInfo(date.getString("promoterId"));
                 if (!Check.isNull(copyJson)) {
                     export.add(copyJson.getString("fansNumber"));
                     export.add(copyJson.getString("totalSale"));
@@ -714,7 +714,7 @@ public class KuaishouItemCollectSamplesController extends BaseController {
     public TableDataInfo queryProductList(
             @ApiParam("商品ID") @RequestParam(value = "itemId", required = false) Long itemId,
             @ApiParam("商品标题") @RequestParam(value = "itemTitle", required = false) String itemTitle,
-            @ApiParam("达人id") @RequestParam(value = "promoterId", required = false) Long promoterId,
+            @ApiParam("达人id") @RequestParam(value = "promoterId", required = false) String promoterId,
             @ApiParam("达人昵称") @RequestParam(value = "promoterNickName", required = false) String promoterNickName,
             @ApiParam("商品单价起始价") @RequestParam(value = "reservePriceStart", required = false) Double reservePriceStart,
             @ApiParam("商品单价结束价") @RequestParam(value = "reservePriceEnd", required = false) Double reservePriceEnd,

+ 4 - 4
ruixuan-live/src/main/java/com/ruixuan/isc/entity/KuaishouItemCollectSamples.java

@@ -112,7 +112,7 @@ public class KuaishouItemCollectSamples extends BaseEntity {
      * 达人id
      */
     @Excel(name = "达人id")
-    private Long promoterId;
+    private String promoterId;
 
     /**
      * 达人昵称
@@ -308,11 +308,11 @@ public class KuaishouItemCollectSamples extends BaseEntity {
         this.partnerRecommendText = partnerRecommendText;
     }
 
-    public Long getPromoterId() {
+    public String getPromoterId() {
         return promoterId;
     }
 
-    public void setPromoterId(Long promoterId) {
+    public void setPromoterId(String promoterId) {
         this.promoterId = promoterId;
     }
 
@@ -479,7 +479,7 @@ public class KuaishouItemCollectSamples extends BaseEntity {
                 ", collectSampleId=" + collectSampleId +
                 ", collectSampleName='" + collectSampleName + '\'' +
                 ", partnerRecommendText='" + partnerRecommendText + '\'' +
-                ", promoterId=" + promoterId +
+                ", promoterId='" + promoterId + '\'' +
                 ", promoterNickName='" + promoterNickName + '\'' +
                 ", promoterPhone='" + promoterPhone + '\'' +
                 ", promoterAddress='" + promoterAddress + '\'' +

+ 4 - 4
ruixuan-live/src/main/java/com/ruixuan/isc/mapper/KuaishouItemCollectSamplesMapper.java

@@ -71,7 +71,7 @@ public interface KuaishouItemCollectSamplesMapper {
 
     List<JSONObject> promoterList(@Param("ids") JSONArray ids);
 
-    Integer check(@Param("itemId") Long itemId, @Param("promoterId") Long promoterId);
+    Integer check(@Param("itemId") Long itemId, @Param("promoterId") String promoterId);
 
     void batchAdd(@Param(value = "adds") List<KuaishouItemCollectSamples> adds);
 
@@ -97,7 +97,7 @@ public interface KuaishouItemCollectSamplesMapper {
 
     JSONObject getCollectSampleInfo(@Param("itemId") Long itemId);
 
-    JSONObject promoterInfo(@Param("promoterId") Long promoterId);
+    JSONObject promoterInfo(@Param("promoterId") String promoterId);
 
     Long getItemIdById(@Param("id") Long id);
 
@@ -105,7 +105,7 @@ public interface KuaishouItemCollectSamplesMapper {
 
     JSONObject queryTheNumberOfCompletedJobs(@Param("promoterIds") List<Long> promoterIds, @Param("startDate") String startDate, @Param("endDate") String endDate);
 
-    List<JSONObject> selectPromoterInfo(@Param("map") Map<Long, Long> map);
+    List<JSONObject> selectPromoterInfo(@Param("map") Map<String, String> map);
 
     List<Long> getItemIdsByCreateId(@Param("userList") List<Long> userList);
 
@@ -115,7 +115,7 @@ public interface KuaishouItemCollectSamplesMapper {
 
     List<KuaishouItemCollectSamples> getListByPromoterId(@Param("promoterId") String promoterId, @Param("userId") Long userId);
 
-    Integer checkByRelateIdAndPromoterId(@Param("relateId") Long relateId, @Param("promoterId") Long promoterId);
+    Integer checkByRelateIdAndPromoterId(@Param("relateId") Long relateId, @Param("promoterId") String promoterId);
 
     List<Long> getAccordWithOrderQuantityList();
 

+ 1 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/service/IKuaishouItemCollectSamplesService.java

@@ -90,7 +90,7 @@ public interface IKuaishouItemCollectSamplesService {
 
     JSONObject getCollectSampleInfo(Long itemId);
 
-    JSONObject getCopyInfo(Long promoterId);
+    JSONObject getCopyInfo(String  promoterId);
 
     Long getItemIdById(Long id);
 

+ 8 - 8
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KuaishouItemCollectSamplesServiceImpl.java

@@ -81,21 +81,21 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
     @Override
     public List<KuaishouItemCollectSamples> selectKuaishouItemCollectSamplesList(Map<String, Object> requestMap) {
         List<KuaishouItemCollectSamples> kuaishouItemCollectSamples = kuaishouItemCollectSamplesMapper.selectKuaishouItemCollectSamplesList(requestMap);
-        Map<Long, JSONObject> dataMap = new HashMap<>();
+        Map<String, JSONObject> dataMap = new HashMap<>();
         if (!Check.isNull(kuaishouItemCollectSamples)) {
-            Map<Long, Long> map = new HashMap<>();
+            Map<String, String> map = new HashMap<>();
             for (KuaishouItemCollectSamples samples : kuaishouItemCollectSamples) {
-                map.put(samples.getPromoterId(), samples.getPromoterId());
+                map.put(samples.getPromoterId() + "", samples.getPromoterId() + "");
             }
             List<JSONObject> promoterList = kuaishouItemCollectSamplesMapper.selectPromoterInfo(map);
             for (int i = 0; i < promoterList.size(); i++) {
                 JSONObject jsonObject = promoterList.get(i);
-                dataMap.put(jsonObject.getLong("promoterId"), jsonObject);
+                dataMap.put(jsonObject.getString("promoterId"), jsonObject);
             }
         }
         if (!Check.isNull(kuaishouItemCollectSamples)) {
             for (KuaishouItemCollectSamples samples : kuaishouItemCollectSamples) {
-                Long promoterId = samples.getPromoterId();
+                String promoterId = samples.getPromoterId();
                 JSONObject jsonObject = dataMap.get(promoterId);
                 if (!Check.isNull(jsonObject)) {
                     samples.setValidAmount(jsonObject.getLong("validAmount"));
@@ -182,7 +182,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
                 }
 
                 Long relateId = itemJson.getLong("relateId");
-                Long promoterId = promoterJson.getLong("promoterId");
+                String promoterId = promoterJson.getString("promoterId");
                 Integer count = kuaishouItemCollectSamplesMapper.checkByRelateIdAndPromoterId(relateId, promoterId);
                 if (count > 0) {
                     sampleReceivedCount++;
@@ -231,7 +231,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
             JSONObject sampleJson = temCollectSamples.getJSONObject(i);
             KuaishouItemCollectSamples sample = new KuaishouItemCollectSamples();
             Long itemId = sampleJson.getLong("itemId");
-            Long promoterId = sampleJson.getLong("promoterId");
+            String promoterId = sampleJson.getString("promoterId");
             Integer check = kuaishouItemCollectSamplesMapper.check(itemId, promoterId);
             if (check > 0) {
                 continue;
@@ -371,7 +371,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
     }
 
     @Override
-    public JSONObject getCopyInfo(Long promoterId) {
+    public JSONObject getCopyInfo(String promoterId) {
         JSONObject returnJson = kuaishouItemCollectSamplesMapper.promoterInfo(promoterId);
         return returnJson;
     }

+ 2 - 2
ruixuan-live/src/main/resources/mapper/isc/KuaishouItemCollectSamplesMapper.xml

@@ -632,11 +632,11 @@
         valid_amount as 'validAmount'
         from promoter_oerder_amount where promoter_id in
         <foreach collection="map.values" item="v" separator="," open="(" close=")">
-            ${v}
+            #{v, jdbcType=VARCHAR}
         </foreach>
     </select>
 
-    <select id="getItemIdsByCreateId" resultType="Long">
+    <select id="getItemIdsByCreateId" resultType="java.lang.Long">
         select item_id
         from kuaishou_item_collect_samples
         <where>

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

@@ -123,7 +123,7 @@
         IF(t0.handurl is null,t2.promoter_url,t0.handurl) AS 'promoterUrl',
         IF(t0.fans is null,t2.fans_number,t0.fans) AS 'fansNumber',
         t1.30day_gmv AS 'monthDayGmv',
-        t1.30day_order_num AS 'monthDayOrderNum',
+        t1.30day_order_num AS 'monthDayOrderNum',+
         t1.valid_amount AS 'validAmount',
         IF(t0.videoSales is null,t2.video_sales,t0.videoSales) AS 'videoSales',
         IF(t0.avgVideoSales is null,t2.avg_video_sales,t0.avgVideoSales) AS 'avgVideoSales'