Jelajahi Sumber

Merge remote-tracking branch 'origin/develop' into develop

maqingyang 1 tahun lalu
induk
melakukan
88fe289e1d

+ 0 - 5
src/main/java/com/kexun/controller/BusinessController.java

@@ -45,12 +45,7 @@ public class BusinessController {
             String time = list.get(i).getCreateTime().replace(".0","");
             list.get(i).setCreateTime(time);
         }
-
-
         resJson.put("business_todo_list",list);
-
-        System.out.println(list);
-
         return Result.success("ok",resJson);
     }
 

+ 9 - 4
src/main/java/com/kexun/controller/CooperatorProductController.java

@@ -2,6 +2,8 @@ package com.kexun.controller;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import com.kexun.common.utils.Result;
 import com.kexun.entity.CooperatorField;
 import com.kexun.entity.CooperatorInfo;
@@ -27,11 +29,14 @@ public class CooperatorProductController {
 
     // 获取合作产品信息
     @GetMapping("cooperatorProductList")
-    public Result cooperatorProductList() {
+    public Result cooperatorProductList(@RequestParam int pageNum) {
+        int pageSize = 10;
+        PageHelper.startPage(pageNum, pageSize);//设置分页信息
         JSONObject resJson=new JSONObject();
-        List<CooperatorProduct> list=CooperatorProductService.productList();
-        resJson.put("cooperator_Product_List",list);
-        System.out.println(list);
+        List<CooperatorProduct> list=CooperatorProductService.selectPage();
+        PageInfo pageInfo=new PageInfo(list);
+        resJson.put("cooperator_Product_List",pageInfo);
+        System.out.println(pageInfo);
 
         return Result.success("ok",resJson);
     }

+ 2 - 2
src/main/java/com/kexun/controller/FieldDefineController.java

@@ -38,7 +38,7 @@ import java.util.stream.Collectors;
 public class FieldDefineController {
 
     @Autowired
-    FieldDefineService fieldDefineService;
+    private com.kexun.service.FieldDefineService fieldDefineService;
     /**
      * 字段信息读取
      *
@@ -65,7 +65,7 @@ public class FieldDefineController {
         PageInfo pageInfo=new PageInfo(list);
         PageInfo pageInfo2=new PageInfo(list2);
 
-        System.out.println(pageInfo);
+        System.out.println(pageInfo2);
         JSONObject resJson = new JSONObject();
 
         resJson.put("fieldListNew", pageInfo);

+ 5 - 1
src/main/java/com/kexun/controller/FieldTemplateController.java

@@ -10,6 +10,7 @@ import com.kexun.entity.*;
 import com.kexun.model.ro.FiledTemplateRO;
 import com.kexun.model.ro.FiledTemplateUpdateRO;
 import com.kexun.model.vo.FiledTemplateVO;
+import com.kexun.service.BusinessService;
 import com.kexun.service.FieldTemplateService;
 import lombok.extern.java.Log;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -70,6 +71,8 @@ public class FieldTemplateController {
         return Result.success("ok", resJson);
     }
 
+
+
     /**
      * 字段模板详情
      *
@@ -110,7 +113,7 @@ public class FieldTemplateController {
     public Result update(@RequestBody FiledTemplateUpdateRO filedTemplateUpdateRO) {
         Result result = new Result();
         if (null != filedTemplateUpdateRO.getId()) {
-            fieldTemplateService.update(filedTemplateUpdateRO);
+            fieldTemplateService.saveOrUpdate(filedTemplateUpdateRO);
         } else {
             return Result.error(-1, "id不存在");
         }
@@ -149,6 +152,7 @@ public class FieldTemplateController {
         if (StringUtils.isEmpty(id)) {
             return Result.error("-1", "字段定义的ID不能为空");
         }
+        System.out.println(id);
         fieldTemplateService.delete(id);
         return Result.success();
     }

+ 2 - 0
src/main/java/com/kexun/mapper/CooperatorProductMapper.java

@@ -19,4 +19,6 @@ public interface CooperatorProductMapper extends BaseMapper<CooperatorProduct> {
     void updateQuery(@Param("productNum") String productNum, @Param("fieldNo") String fieldNo);
 
     List<CooperatorField> findCooperatorFieldsQuery(@Param("cooperatorName") String cooperatorName);
+
+    List<CooperatorProduct> selectProduct();
 }

+ 2 - 0
src/main/java/com/kexun/service/CooperatorProductService.java

@@ -17,4 +17,6 @@ public interface CooperatorProductService extends IService<CooperatorProduct> {
     void updateProductFieldNo(String productNum,String fieldNo);
 
     List<CooperatorField> findCooperatorFieldsByName(String cooperatorName);
+
+    List<CooperatorProduct> selectPage();
 }

+ 7 - 0
src/main/java/com/kexun/service/impl/CooperatorProductServiceImpl.java

@@ -2,6 +2,7 @@ package com.kexun.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.kexun.entity.CooperatorField;
+import com.kexun.entity.CooperatorInfo;
 import com.kexun.entity.CooperatorProduct;
 import com.kexun.mapper.CooperatorMapper;
 import com.kexun.mapper.CooperatorProductMapper;
@@ -48,4 +49,10 @@ public class CooperatorProductServiceImpl extends ServiceImpl<CooperatorProductM
         return l;
 
     }
+
+    public List<CooperatorProduct> selectPage() {
+//        System.out.println("aaa");
+        List<CooperatorProduct> l = cooperatorProductMapper.selectProduct();
+        return l;
+    }
 }

+ 2 - 0
src/main/resources/mapper/CooperatorMapper.xml

@@ -49,6 +49,8 @@
         select * from cooperator_info
     </select>
 
+
+
     <select id="QueryProduct" resultType="com.kexun.entity.CooperatorProduct" >
         SELECT DISTINCT
             prd_product.product_num,

+ 3 - 1
src/main/resources/mapper/CooperatorProductMapper.xml

@@ -59,7 +59,9 @@
         SET product_field_ref.field_no=#{fieldNo}
         WHERE product_field_ref.product_num=#{productNum}
     </select>
-
+    <select id="selectProduct" resultType="com.kexun.entity.CooperatorProduct">
+        select * from prd_product
+    </select>
     <select id="findCooperatorFieldsQuery" resultType="com.kexun.entity.CooperatorField">
         SELECT DISTINCT
         field_define.field_no,

+ 3 - 1
src/main/resources/mapper/FieldDefineMapper.xml

@@ -51,7 +51,9 @@
 
     <select id="selectAll" resultType="com.kexun.entity.FieldDefineEntity">
         select * from field_define
-        where category=#{cat}
+        where category=#{cat} and is_deleted = 0
+
+
     </select>
 
 

+ 2 - 0
src/main/resources/mapper/FieldTemplateMapper.xml

@@ -16,6 +16,8 @@
 
     <select id="selectAll" resultType="com.kexun.entity.FieldTemplateEntity">
             select * from field_template
+                    where is_deleted = 0
+
     </select>