Browse Source

增加字段

yumeng 2 năm trước cách đây
mục cha
commit
8ed06861a6

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

@@ -40,6 +40,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
@@ -78,7 +79,9 @@ 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, Long promoterId, Long userId, Integer collectSampleStatus, String itemTitle, String promoterNickName, String promoterPhone,
+                              String consignee
+    ) {
         TableDataInfo tableDataInfo = new TableDataInfo();
         try {
             Map<String, Object> requestMap = new HashMap<>();
@@ -116,12 +119,15 @@ public class KuaishouItemCollectSamplesController extends BaseController {
             if (!Check.isNull(promoterPhone)) {
                 requestMap.put("promoterPhone", promoterPhone);
             }
+            if (!Check.isNull(consignee)) {
+                requestMap.put("consignee", consignee);
+            }
             startPage();
             List<KuaishouItemCollectSamples> list = kuaishouItemCollectSamplesService.selectKuaishouItemCollectSamplesList(requestMap);
             return getDataTable(list);
         } catch (Exception e) {
             e.printStackTrace();
-            tableDataInfo.setCode(-1);
+            tableDataInfo.setCode(500);
             tableDataInfo.setMsg(e.getMessage());
         }
         return tableDataInfo;
@@ -274,7 +280,6 @@ public class KuaishouItemCollectSamplesController extends BaseController {
     }
 
 
-
     @PutMapping("/update")
     public JSONObject update(@RequestBody KuaishouItemCollectSamples kuaishouItemCollectSamples) {
         JSONObject returnJson = new JSONObject();
@@ -294,9 +299,6 @@ public class KuaishouItemCollectSamplesController extends BaseController {
         }
         return returnJson;
     }
-    
-    
-    
 
 
     @GetMapping("/detail")
@@ -436,10 +438,8 @@ public class KuaishouItemCollectSamplesController extends BaseController {
     }
 
 
-
-
     @DeleteMapping("/remove")
-    public AjaxResult remove( Long id) {
+    public AjaxResult remove(Long id) {
         return toAjax(kuaishouItemCollectSamplesService.deleteKuaishouItemCollectSamplesById(id));
     }
 

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

@@ -101,6 +101,9 @@
             <if test="promoterPhone != null and promoterPhone != ''">
                 and promoter_phone = #{promoterPhone}
             </if>
+            <if test="consignee != null and consignee != ''">
+                and consignee like concat('%', #{consignee}, '%')
+            </if>
         </where>
         order by create_time desc
     </select>