Jelajahi Sumber

Merge branch 'zrz' of alpha/ygj-yuemum into master

runze.zhao 5 tahun lalu
induk
melakukan
7dece6d8e0
46 mengubah file dengan 3603 tambahan dan 1 penghapusan
  1. 13 0
      pom.xml
  2. 6 0
      src/main/java/com/ygj/yuemum/component/Constant.java
  3. 268 0
      src/main/java/com/ygj/yuemum/component/CyScheduled.java
  4. 1 1
      src/main/java/com/ygj/yuemum/controller/admin/ImageUploadController.java
  5. 72 0
      src/main/java/com/ygj/yuemum/controller/customer/CustomerInfoBasicController.java
  6. 49 0
      src/main/java/com/ygj/yuemum/controller/customer/CustomerInfoFeedbackController.java
  7. 102 0
      src/main/java/com/ygj/yuemum/controller/customer/CustomerInfoFollowController.java
  8. 39 0
      src/main/java/com/ygj/yuemum/controller/customer/CustomerInfoStateController.java
  9. 25 0
      src/main/java/com/ygj/yuemum/controller/customer/CustomerSourceChannelController.java
  10. 66 0
      src/main/java/com/ygj/yuemum/dao/customer/CustomerInfoBasicDao.java
  11. 23 0
      src/main/java/com/ygj/yuemum/dao/customer/CustomerInfoFeedbackDao.java
  12. 65 0
      src/main/java/com/ygj/yuemum/dao/customer/CustomerInfoFollowMapper.java
  13. 60 0
      src/main/java/com/ygj/yuemum/dao/customer/CustomerInfoStateMapper.java
  14. 13 0
      src/main/java/com/ygj/yuemum/dao/customer/CustomerSourceChannelDao.java
  15. 114 0
      src/main/java/com/ygj/yuemum/domain/customer/CustomerInfoBasic.java
  16. 67 0
      src/main/java/com/ygj/yuemum/domain/customer/CustomerInfoFeedback.java
  17. 95 0
      src/main/java/com/ygj/yuemum/domain/customer/CustomerInfoFollow.java
  18. 27 0
      src/main/java/com/ygj/yuemum/domain/customer/CustomerInfoState.java
  19. 12 0
      src/main/java/com/ygj/yuemum/domain/customer/CustomerSourceChannel.java
  20. 95 0
      src/main/java/com/ygj/yuemum/domain/customer/dto/CustomerInfoBasicCyDto.java
  21. 98 0
      src/main/java/com/ygj/yuemum/domain/customer/dto/CustomerInfoBasicDto.java
  22. 47 0
      src/main/java/com/ygj/yuemum/domain/customer/dto/CustomerInfoFeedbackCyDto.java
  23. 53 0
      src/main/java/com/ygj/yuemum/domain/customer/dto/CustomerInfoFeedbackDto.java
  24. 72 0
      src/main/java/com/ygj/yuemum/domain/customer/dto/CustomerInfoFollowCyDto.java
  25. 84 0
      src/main/java/com/ygj/yuemum/domain/customer/dto/CustomerInfoFollowDto.java
  26. 71 0
      src/main/java/com/ygj/yuemum/service/customer/CustomerInfoBasicService.java
  27. 44 0
      src/main/java/com/ygj/yuemum/service/customer/CustomerInfoFeedbackService.java
  28. 57 0
      src/main/java/com/ygj/yuemum/service/customer/CustomerInfoFollowService.java
  29. 32 0
      src/main/java/com/ygj/yuemum/service/customer/CustomerInfoStateService.java
  30. 20 0
      src/main/java/com/ygj/yuemum/service/customer/CustomerSourceChannelService.java
  31. 101 0
      src/main/java/com/ygj/yuemum/service/scheduled/CYScheduledService.java
  32. 1 0
      src/main/java/com/ygj/yuemum/shiro/ShiroConfig.java
  33. 368 0
      src/main/java/com/ygj/yuemum/utils/HttpUtils.java
  34. 125 0
      src/main/java/com/ygj/yuemum/utils/OssService.java
  35. 22 0
      src/main/java/com/ygj/yuemum/utils/ResponseUtil.java
  36. 4 0
      src/main/resources/application.yml
  37. 292 0
      src/main/resources/mybatis/mapper/customer/CustomerInfoBasicDao.xml
  38. 186 0
      src/main/resources/mybatis/mapper/customer/CustomerInfoFeedbackMapper.xml
  39. 250 0
      src/main/resources/mybatis/mapper/customer/CustomerInfoFollowMapper.xml
  40. 105 0
      src/main/resources/mybatis/mapper/customer/CustomerInfoStateMapper.xml
  41. 14 0
      src/main/resources/mybatis/mapper/customer/CustomerSourceChannelMapper.xml
  42. 40 0
      src/test/java/com/ygj/yuemum/chuanyun/CyScheduledTest.java
  43. 18 0
      src/test/java/com/ygj/yuemum/chuanyun/ScheduledServiceTest.java
  44. 128 0
      src/test/java/com/ygj/yuemum/chuanyun/ScheduledSingleServiceTest.java
  45. 116 0
      src/test/java/com/ygj/yuemum/client/HttpClientUtil.java
  46. 43 0
      src/test/java/com/ygj/yuemum/customers/CustomerSourceChannelTest.java

+ 13 - 0
pom.xml

@@ -234,6 +234,19 @@
             <artifactId>spring-boot-devtools</artifactId>
             <optional>true</optional>
         </dependency>
+
+        <!-- lombok -->
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.10</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>3.10.2</version>
+        </dependency>
     </dependencies>
 
 

+ 6 - 0
src/main/java/com/ygj/yuemum/component/Constant.java

@@ -65,6 +65,8 @@ public class Constant {
     public static Integer AGE;
     public static Integer MAXSCHOLARSHIPS;
 
+    public static String FOLDER;
+
     //注入
     @Autowired(required = false)
     public void getQrcode(@Value("${file.qrcode}") String QRCODE) {
@@ -304,4 +306,8 @@ public class Constant {
     public void getMAXSCHOLARSHIPS(@Value("${college.MAXSCHOLARSHIPS}") Integer MAXSCHOLARSHIPS) {
         Constant.MAXSCHOLARSHIPS = MAXSCHOLARSHIPS;
     }
+    @Autowired(required = false)
+    public void getMAXSCHOLARSHIPS(@Value("${chuanyun.OssFolder}") String OssFolder) {
+        Constant.FOLDER = OssFolder;
+    }
 }

+ 268 - 0
src/main/java/com/ygj/yuemum/component/CyScheduled.java

@@ -0,0 +1,268 @@
+package com.ygj.yuemum.component;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoBasicCyDto;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoFeedbackCyDto;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoFollowCyDto;
+import com.ygj.yuemum.service.customer.CustomerInfoBasicService;
+import com.ygj.yuemum.service.customer.CustomerInfoFeedbackService;
+import com.ygj.yuemum.service.customer.CustomerInfoFollowService;
+import com.ygj.yuemum.service.scheduled.CYScheduledService;
+import com.ygj.yuemum.utils.OssService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * 氚云返回数据格式, ReturnData 没有数据时时会为 null
+ * {
+ *     "ReturnData":{
+ *         "BizObjectArray":[
+ *             {}
+ *             ]
+ *     },
+ *     "Logined":false,
+ *     "DataType":0,
+ *     "Successful":true
+ * }
+ */
+@Component
+public class CyScheduled {
+
+    private final Logger logger = LoggerFactory.getLogger(CyScheduled.class);
+
+    private static final String ENPTYDATE= "2000-01-01 01:01:10";
+
+    private static final String CIFBSchemaCode = "e3i1ixenjat08xho5hy3zp2c4";
+
+    private static final String CIBSchemaCode = "twjff2zg1n2lwdrfkwbqnqne5";
+
+    private static final String CIFSchemaCode = "ajxhpu8n5e3n2272xda8k38o3";
+
+    @Resource
+    CYScheduledService cyScheduledService;
+
+    @Resource
+    CustomerInfoFeedbackService customerInfoFeedbackService;
+
+    @Resource
+    CustomerInfoBasicService customerInfoBasicService;
+
+    @Resource
+    CustomerInfoFollowService customerInfoFollowService;
+
+    /**
+     * 信息反馈表,
+     */
+    public void initCustomerInfoFeedback(int fromRowNum, int toRowNum) {
+        JSONObject jsonObject;
+        try {
+            jsonObject = cyScheduledService.listFormData(CIFBSchemaCode, fromRowNum, toRowNum);
+        } catch (Exception e) {
+            logger.error("信息反馈表数据导入有问题" + e.getMessage());
+            e.printStackTrace();
+            return;
+        }
+        JSONObject jsonObject1 = jsonObject.getJSONObject("ReturnData");
+        if (jsonObject1 == null) {
+            logger.info("没有返回值,可能数据导完了");
+            return;
+        }
+        JSONArray jsonArray = jsonObject1.getJSONArray("BizObjectArray");
+        List<CustomerInfoFeedbackCyDto> list = convertRtData2CIFBList(jsonArray);
+        // 因为氚云的数据是按时间倒序的,所以这里倒序插入
+        Collections.reverse(list);
+        customerInfoFeedbackService.insertInfoFeedbackList(list);
+    }
+
+    /**
+     * 用户信息表
+     */
+    public void initCustomerInfoBasic(int fromRowNum, int toRowNum) {
+        JSONObject jsonObject;
+        try {
+            jsonObject = cyScheduledService.listFormData(CIBSchemaCode, fromRowNum, toRowNum);
+        } catch (Exception e) {
+            logger.error("信息基础表数据导入有问题" + e.getMessage());
+            e.printStackTrace();
+            return;
+        }
+        JSONObject jsonObject1 = jsonObject.getJSONObject("ReturnData");
+        if (jsonObject1 == null) {
+            logger.info("没有返回值,可能数据导完了");
+            return;
+        }
+        JSONArray jsonArray = jsonObject1.getJSONArray("BizObjectArray");
+        List<CustomerInfoBasicCyDto> list = convertRtData2CIBList(jsonArray);
+        // 因为氚云的数据是按时间倒序的,所以这里倒序插入
+        Collections.reverse(list);
+        customerInfoBasicService.insertInfoBasicList(list);
+    }
+
+    /**
+     * 用户跟进表
+     */
+    public void initCustomerInfoFollow(int fromRowNum, int toRowNum) {
+        JSONObject jsonObject;
+        try {
+            jsonObject = cyScheduledService.listFormData(CIFSchemaCode, fromRowNum, toRowNum);
+        } catch (Exception e) {
+            logger.error("信息跟进表数据导入有问题" + e.getMessage());
+            e.printStackTrace();
+            return;
+        }
+        JSONObject jsonObject1 = jsonObject.getJSONObject("ReturnData");
+        if (jsonObject1 == null) {
+            logger.info("没有返回值,可能数据导完了");
+            return;
+        }
+        JSONArray jsonArray = jsonObject1.getJSONArray("BizObjectArray");
+        List<CustomerInfoFollowCyDto> list = convertRtData2CIFList(jsonArray);
+        // 因为氚云的数据是按时间倒序的,所以这里倒序插入
+        Collections.reverse(list);
+        customerInfoFollowService.insertInfoFollowList(list);
+    }
+
+    private List<CustomerInfoFeedbackCyDto> convertRtData2CIFBList(JSONArray jsonArray) {
+        List<CustomerInfoFeedbackCyDto> customerInfoFeedbacks = new ArrayList<>(jsonArray.size() * 2);
+        for (int i = 0; i < jsonArray.size(); i++) {
+            JSONObject jObj = jsonArray.getJSONObject(i);
+            CustomerInfoFeedbackCyDto customerInfoFeedback = new CustomerInfoFeedbackCyDto();
+            customerInfoFeedback.setFb_date(jObj.getString("Fd70b7fe2c26543b7a0dc5e842f01505a"));
+            customerInfoFeedback.setSource_channel(jObj.getString("F65c267199c244ab781911ae917c19e23"));
+            customerInfoFeedback.setFb_customer_phone(jObj.getString("F2eaf0b5866324133ae25469e15bfcbeb"));
+            customerInfoFeedback.setBranche_name(jObj.getString("F0000001"));
+            customerInfoFeedback.setFb_type(jObj.getString("F69ae33f6130a456bb49d9c3eda150924"));
+            customerInfoFeedback.setCreate_person(jObj.getString("CreatedBy"));
+            customerInfoFeedback.setIn_charge_person(jObj.getString("F0000005"));
+            customerInfoFeedback.setCustomer_manager(jObj.getString("OwnerId"));
+            customerInfoFeedback.setEntry_date(jObj.getString("CreatedTime"));
+            customerInfoFeedback.setP_code(jObj.getString("F0000012"));
+            customerInfoFeedback.setFb_customer_name(jObj.getString("Feee971d2c7744512951911969636b29a"));
+            customerInfoFeedback.setFb_wechat_number(jObj.getString("F0000010"));
+            customerInfoFeedback.setEdc_date(jObj.getString("F6d79882ffa4145f797ae2d7463087f05"));
+            customerInfoFeedback.setFb_remarks(jObj.getString("fb_remarks"));
+            customerInfoFeedback.setStore(jObj.getString("Fa8590df8fe8546458f799d71e3514a71"));
+            JSONArray jsonArray1 = jObj.getJSONArray("Fe568775265f74579a6f6d54cfabba349");
+            if (jsonArray1 != null && jsonArray1.size() > 0) {
+                JSONObject jsonObject1 = jsonArray1.getJSONObject(0);
+                if (jsonObject1.getString("F6016dc1446df4ce0b9c6ef3fc19bb89a") != null) {
+                    customerInfoFeedback.setIt_on(jsonObject1.getString("F6016dc1446df4ce0b9c6ef3fc19bb89a"));
+                } else {
+                    customerInfoFeedback.setIt_on("");
+                }
+                if (jsonObject1.getString("F0000008") != null) {
+                    customerInfoFeedback.setCommunication_content(jsonObject1.getString("F0000008"));
+                } else {
+                    customerInfoFeedback.setCommunication_content("");
+                }
+                if (jsonObject1.getDate("") != null) {
+                    customerInfoFeedback.setConvenient_time(jObj.getString(""));
+                } else {
+                    customerInfoFeedback.setConvenient_time(ENPTYDATE);
+                }
+                if (jsonObject1.getString("") != null) {
+                    customerInfoFeedback.setUser_feedback(jsonObject1.getString(""));
+                } else {
+                    customerInfoFeedback.setUser_feedback("");
+                }
+            } else {
+                customerInfoFeedback.setIt_on("");
+                customerInfoFeedback.setCommunication_content("");
+                customerInfoFeedback.setConvenient_time(ENPTYDATE);
+                customerInfoFeedback.setUser_feedback("");
+            }
+            customerInfoFeedbacks.add(customerInfoFeedback);
+        }
+
+        return customerInfoFeedbacks;
+    }
+
+    /**
+     * @param jsonArray
+     * @return
+     */
+    private List<CustomerInfoBasicCyDto> convertRtData2CIBList(JSONArray jsonArray) {
+        List<CustomerInfoBasicCyDto> list = new ArrayList<>(jsonArray.size() * 2);
+        for (int i = 0;i < jsonArray.size(); i++) {
+            JSONObject jsonObject = jsonArray.getJSONObject(i);
+            CustomerInfoBasicCyDto customerInfoBasicCyDto = new CustomerInfoBasicCyDto();
+            customerInfoBasicCyDto.setBranche_name(jsonObject.getString("F0000002"));
+            customerInfoBasicCyDto.setFb_customer_name(jsonObject.getString("F0000004"));
+            customerInfoBasicCyDto.setFb_customer_phone(jsonObject.getString("F0000005"));
+            customerInfoBasicCyDto.setP_code(jsonObject.getString("F0000029"));
+            customerInfoBasicCyDto.setFb_wechat_number(jsonObject.getString("F0000007"));
+            customerInfoBasicCyDto.setSource_channel(jsonObject.getString("F0000014"));
+            customerInfoBasicCyDto.setCustomer_state(jsonObject.getString("F0000013"));
+            customerInfoBasicCyDto.setEdc_date(jsonObject.getString("F0000009"));
+            customerInfoBasicCyDto.setPregnancy_way(jsonObject.getString("F0000038"));
+
+            JSONObject jsonObject1 = jsonObject.getJSONObject("F0000010");
+            if (jsonObject1 != null) {
+                customerInfoBasicCyDto.setAddress_basic(jsonObject1.getString("adcode"));
+                customerInfoBasicCyDto.setAddress_detail(jsonObject1.getString("Detail"));
+            }
+
+            customerInfoBasicCyDto.setFb_remarks(jsonObject.getString("F0000011"));
+            customerInfoBasicCyDto.setEntry_date(jsonObject.getString("CreatedTime"));
+            customerInfoBasicCyDto.setCreate_person(jsonObject.getString("CreatedBy"));
+            customerInfoBasicCyDto.setFb_date(jsonObject.getString("F0000024"));
+            list.add(customerInfoBasicCyDto);
+        }
+        return list;
+    }
+
+    /**
+     * @param jsonArray
+     * @return
+     */
+    private List<CustomerInfoFollowCyDto> convertRtData2CIFList(JSONArray jsonArray) {
+        List<CustomerInfoFollowCyDto> list = new ArrayList<>(jsonArray.size() * 2);
+        for (int i = 0; i < jsonArray.size(); i++) {
+            JSONObject jsonObject = jsonArray.getJSONObject(i);
+            CustomerInfoFollowCyDto customerInfoFollowCyDto = new CustomerInfoFollowCyDto();
+            customerInfoFollowCyDto.setCreate_date(jsonObject.getString("CreatedTime"));
+            customerInfoFollowCyDto.setFollow_mehtod(jsonObject.getString("F0000006"));
+            customerInfoFollowCyDto.setFb_customer_name(jsonObject.getString("F0000021"));
+            customerInfoFollowCyDto.setFb_customer_phone(jsonObject.getString("F0000016"));
+            customerInfoFollowCyDto.setSource_channel(jsonObject.getString("F0000017"));
+            customerInfoFollowCyDto.setEdc_date(jsonObject.getString("F0000022"));
+            customerInfoFollowCyDto.setFollow_state(jsonObject.getString("F0000007"));
+            customerInfoFollowCyDto.setAddress(jsonObject.getString("F0000008"));
+            customerInfoFollowCyDto.setFollow_desc(jsonObject.getString("F0000009"));
+            customerInfoFollowCyDto.setPhotos(getPhotoUrl(jsonObject.getJSONArray("F0000010")));
+            customerInfoFollowCyDto.setNext_follow_date(jsonObject.getString("F0000011"));
+            customerInfoFollowCyDto.setCreate_person(jsonObject.getString("CreatedBy"));
+            customerInfoFollowCyDto.setFb_date(jsonObject.getString("F0000023"));
+            list.add(customerInfoFollowCyDto);
+        }
+        return list;
+    }
+
+    private String getPhotoUrl(JSONArray attachmentIdJsonArray) {
+        if (attachmentIdJsonArray != null) {
+            List<String> attachmentIds = attachmentIdJsonArray.toJavaList(String.class);
+            if (attachmentIds.size() > 0) {
+                StringBuilder photos = new StringBuilder();
+                for (String attachmentId:attachmentIds) {
+                    try {
+                        OssService.UploadDto uploadDto = cyScheduledService.getDownloadBizObject(attachmentId);
+                        photos.append(uploadDto.getUrl()).append(",");
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+                photos.delete(photos.length()-1, photos.length());
+                return photos.toString();
+            }
+        }
+        return "";
+    }
+
+}

+ 1 - 1
src/main/java/com/ygj/yuemum/controller/admin/ImageUploadController.java

@@ -26,7 +26,7 @@ import java.util.List;
 
 @Api(tags = "图片、简历相关接口")
 @RestController
-public class ImageUploadController {
+    public class ImageUploadController {
     @Autowired
     private PhotoService photoService;
     @Autowired

+ 72 - 0
src/main/java/com/ygj/yuemum/controller/customer/CustomerInfoBasicController.java

@@ -0,0 +1,72 @@
+package com.ygj.yuemum.controller.customer;
+
+import com.ygj.yuemum.domain.customer.CustomerInfoBasic;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoBasicDto;
+import com.ygj.yuemum.service.customer.CustomerInfoBasicService;
+import com.ygj.yuemum.utils.ResponseUtil;
+import io.swagger.annotations.Api;
+import org.apache.shiro.SecurityUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+@Api(tags = "客户信息相关接口")
+@RestController
+@RequestMapping(value = "/CustomerInfoBasic")
+public class CustomerInfoBasicController {
+
+    @Resource
+    private CustomerInfoBasicService customerInfoBasicService;
+
+    /**
+     * [新增]
+     * @author zrz
+     * @date 2020/06/17
+     **/
+    @RequestMapping("/insert")
+    public int insert(CustomerInfoBasic customerInfoBasic){
+        Object principal = SecurityUtils.getSubject().getPrincipal();
+        customerInfoBasic.setCreate_person(String.valueOf(principal));
+        return customerInfoBasicService.insert(customerInfoBasic);
+    }
+
+    /**
+     * [刪除]
+     * @author zrz
+     * @date 2020/06/17
+     **/
+    @RequestMapping("/delete")
+    public int delete(int id){
+        return customerInfoBasicService.delete(id);
+    }
+
+    /**
+     * [更新]
+     * @author zrz
+     * @date 2020/06/17
+     **/
+    @RequestMapping("/update")
+    public int update(CustomerInfoBasic customerInfoBasic){
+        return customerInfoBasicService.update(customerInfoBasic);
+    }
+
+    /**
+     * [查询] 根据主键 id 查询
+     * @author zrz
+     * @date 2020/06/17
+     **/
+    @RequestMapping("/load")
+    public CustomerInfoBasic load(int id){
+        return customerInfoBasicService.load(id);
+    }
+
+    @RequestMapping("/list")
+    public Map<String, Object> selectByPageNumSize(CustomerInfoBasicDto customerInfoBasic) {
+        List<CustomerInfoBasic> customerInfoBasics = customerInfoBasicService.selectByPageNumSize(customerInfoBasic);
+        return ResponseUtil.convertRetMap(customerInfoBasics);
+    }
+
+}

+ 49 - 0
src/main/java/com/ygj/yuemum/controller/customer/CustomerInfoFeedbackController.java

@@ -0,0 +1,49 @@
+package com.ygj.yuemum.controller.customer;
+
+import com.ygj.yuemum.domain.customer.CustomerInfoFeedback;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoFeedbackDto;
+import com.ygj.yuemum.service.customer.CustomerInfoFeedbackService;
+import com.ygj.yuemum.utils.ResponseUtil;
+import io.swagger.annotations.Api;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.SecurityUtils;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+@Api(tags = "客户信息反馈表")
+@RestController
+public class CustomerInfoFeedbackController {
+
+    @Resource
+    CustomerInfoFeedbackService customerInfoFeedbackService;
+
+    @PostMapping("/info/feedback")
+    public Map<String, Object> selectByPageNumSize(CustomerInfoFeedbackDto customerInfoFeedbackDto) {
+        List<CustomerInfoFeedback> customerInfoFeedbacks = customerInfoFeedbackService.selectByPageNumSize(customerInfoFeedbackDto);
+        return ResponseUtil.convertRetMap(customerInfoFeedbacks);
+    }
+
+    @PostMapping("/info/feedback/insert")
+    public Integer insertInfoFeedback(CustomerInfoFeedback customerInfoFeedback) {
+        Object principal = SecurityUtils.getSubject().getPrincipal();
+        customerInfoFeedback.setCreate_person(String.valueOf(principal));
+        if (StringUtils.isBlank(customerInfoFeedback.getFb_type())) {
+            customerInfoFeedback.setFb_type("待确认");
+        }
+        return customerInfoFeedbackService.insertInfoFeedback(customerInfoFeedback);
+    }
+
+    @PostMapping("/info/feedback/get")
+    public CustomerInfoFeedback getById(CustomerInfoFeedbackDto customerInfoFeedbackDto) {
+        return customerInfoFeedbackService.getById(customerInfoFeedbackDto.getId());
+    }
+
+    @PostMapping("/info/feedback/update")
+    public int updateById(CustomerInfoFeedback customerInfoFeedback) {
+        return customerInfoFeedbackService.updateByPrimaryKeySelective(customerInfoFeedback);
+    }
+}

+ 102 - 0
src/main/java/com/ygj/yuemum/controller/customer/CustomerInfoFollowController.java

@@ -0,0 +1,102 @@
+package com.ygj.yuemum.controller.customer;
+
+import com.ygj.yuemum.component.Constant;
+import com.ygj.yuemum.domain.admin.Photo;
+import com.ygj.yuemum.domain.customer.CustomerInfoFollow;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoFollowDto;
+import com.ygj.yuemum.service.customer.CustomerInfoFollowService;
+import com.ygj.yuemum.utils.OssService;
+import com.ygj.yuemum.utils.ResponseUtil;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.io.IOException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+* customer_info_follow
+* @author zrz
+* @date 2020/06/19
+*/
+@Api(tags = "客户跟进表")
+@RestController
+@RequestMapping(value = "/CustomerInfoFollow")
+public class CustomerInfoFollowController {
+
+    @Resource
+    private CustomerInfoFollowService customerInfoFollowService;
+
+    @Resource
+    private OssService ossService;
+
+    /**
+    * [新增]
+    * @author zrz
+    * @date 2020/06/19
+    **/
+    @RequestMapping("/insert")
+    public int insert(CustomerInfoFollow customerInfoFollow){
+        return customerInfoFollowService.insert(customerInfoFollow);
+    }
+
+    /**
+    * [刪除]
+    * @author zrz
+    * @date 2020/06/19
+    **/
+    @RequestMapping("/delete")
+    public int delete(int id){
+        return customerInfoFollowService.delete(id);
+    }
+
+    /**
+    * [更新]
+    * @author zrz
+    * @date 2020/06/19
+    **/
+    @RequestMapping("/update")
+    public int update(CustomerInfoFollow customerInfoFollow){
+        return customerInfoFollowService.update(customerInfoFollow);
+    }
+
+    /**
+    * [查询] 根据主键 id 查询
+    * @author zrz
+    * @date 2020/06/19
+    **/
+    @RequestMapping("/load")
+    public CustomerInfoFollow load(int id){
+        return customerInfoFollowService.load(id);
+    }
+
+    /**
+    * [查询] 分页查询
+    * @author zrz
+    * @date 2020/06/19
+    **/
+    @RequestMapping("/list")
+    public Map<String, Object> pageList(CustomerInfoFollowDto customerInfoFollowDto) {
+        List<CustomerInfoFollow> list = customerInfoFollowService.selectByPageNumSize(customerInfoFollowDto);
+        return ResponseUtil.convertRetMap(list);
+    }
+
+    @RequestMapping(value = "/uploadImg", method = RequestMethod.POST)
+    @ResponseBody
+    public OssService.UploadDto uploadImg(@RequestParam("file") MultipartFile file) {
+        try {
+            OssService.UploadDto uploadDto = ossService.upload(file, Constant.FOLDER);
+            return uploadDto;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+}

+ 39 - 0
src/main/java/com/ygj/yuemum/controller/customer/CustomerInfoStateController.java

@@ -0,0 +1,39 @@
+package com.ygj.yuemum.controller.customer;
+
+import com.ygj.yuemum.domain.customer.CustomerInfoState;
+import com.ygj.yuemum.service.customer.CustomerInfoStateService;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Api(tags = "客户状态相关接口")
+@RestController
+@RequestMapping(value = "/CustomerInfoState")
+public class CustomerInfoStateController {
+
+    @Resource
+    private CustomerInfoStateService customerInfoStateService;
+
+    /**
+     * [新增]
+     * @author zrz
+     * @date 2020/06/17
+     **/
+    @RequestMapping("/insert")
+    public int insert(CustomerInfoState customerInfoBasic){
+        return customerInfoStateService.insert(customerInfoBasic);
+    }
+
+    /**
+     * [新增]
+     * @author zrz
+     * @date 2020/06/17
+     **/
+    @RequestMapping("/all")
+    public List<CustomerInfoState> selectAll(){
+        return customerInfoStateService.selectAll();
+    }
+}

+ 25 - 0
src/main/java/com/ygj/yuemum/controller/customer/CustomerSourceChannelController.java

@@ -0,0 +1,25 @@
+package com.ygj.yuemum.controller.customer;
+
+import com.ygj.yuemum.domain.customer.CustomerSourceChannel;
+import com.ygj.yuemum.service.customer.CustomerSourceChannelService;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Api(tags = "客户咨询来源渠道")
+@RestController
+public class CustomerSourceChannelController {
+
+    @Resource
+    CustomerSourceChannelService customerSourceChannelService;
+
+    @GetMapping("/source/channel")
+    public List<CustomerSourceChannel> selectCustomerBooking() {
+        List<CustomerSourceChannel> customerSourceChannels = customerSourceChannelService.getAllSourceChannel();
+        return customerSourceChannels;
+    }
+
+}

+ 66 - 0
src/main/java/com/ygj/yuemum/dao/customer/CustomerInfoBasicDao.java

@@ -0,0 +1,66 @@
+package com.ygj.yuemum.dao.customer;
+
+import com.ygj.yuemum.domain.customer.CustomerInfoBasic;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoBasicCyDto;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoBasicDto;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+* customer_info_basic
+* @author zrz
+* @date 2020/06/17
+*/
+@Repository
+public interface CustomerInfoBasicDao {
+
+    /**
+    * [新增]
+    * @author zrz
+    * @date 2020/06/17
+    **/
+    int insert(CustomerInfoBasic customerInfoBasic);
+
+    /**
+    * [刪除]
+    * @author zrz
+    * @date 2020/06/17
+    **/
+    int delete(int id);
+
+    /**
+    * [更新]
+    * @author zrz
+    * @date 2020/06/17
+    **/
+    int update(CustomerInfoBasic customerInfoBasic);
+
+    /**
+    * [查询] 根据主键 id 查询
+    * @author zrz
+    * @date 2020/06/17
+    **/
+    CustomerInfoBasic load(int id);
+
+    /**
+    * [查询] 分页查询
+    * @author zrz
+    * @date 2020/06/17
+    **/
+    List<CustomerInfoBasic> pageList(int offset,int pagesize);
+
+    /**
+    * [查询] 分页查询 count
+    * @author zrz
+    * @date 2020/06/17
+    **/
+    int pageListCount(int offset,int pagesize);
+
+    List<CustomerInfoBasic> selectByPageNumSize(CustomerInfoBasicDto customerInfoBasic);
+
+    void insertInfoBasicList(@Param("list")List<CustomerInfoBasicCyDto> list);
+
+}

+ 23 - 0
src/main/java/com/ygj/yuemum/dao/customer/CustomerInfoFeedbackDao.java

@@ -0,0 +1,23 @@
+package com.ygj.yuemum.dao.customer;
+
+import com.ygj.yuemum.domain.customer.CustomerInfoFeedback;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoFeedbackCyDto;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoFeedbackDto;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CustomerInfoFeedbackDao {
+
+    List<CustomerInfoFeedback> selectByPageNumSize(CustomerInfoFeedbackDto customerInfoFeedback);
+
+    int insertInfoFeedback(CustomerInfoFeedback customerInfoFeedback);
+
+    CustomerInfoFeedback getById(Integer id);
+
+    int updateByPrimaryKeySelective(CustomerInfoFeedback customerInfoFeedback);
+
+    void insertInfoFeedbackList(@Param("list") List<CustomerInfoFeedbackCyDto> customerInfoFeedbacks);
+}

+ 65 - 0
src/main/java/com/ygj/yuemum/dao/customer/CustomerInfoFollowMapper.java

@@ -0,0 +1,65 @@
+package com.ygj.yuemum.dao.customer;
+
+import com.ygj.yuemum.domain.customer.CustomerInfoFollow;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoFollowCyDto;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoFollowDto;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+* customer_info_follow
+* @author zrz
+* @date 2020/06/19
+*/
+@Repository
+public interface CustomerInfoFollowMapper {
+
+    /**
+    * [新增]
+    * @author zrz
+    * @date 2020/06/19
+    **/
+    int insert(CustomerInfoFollow customerInfoFollow);
+
+    /**
+    * [刪除]
+    * @author zrz
+    * @date 2020/06/19
+    **/
+    int delete(int id);
+
+    /**
+    * [更新]
+    * @author zrz
+    * @date 2020/06/19
+    **/
+    int update(CustomerInfoFollow customerInfoFollow);
+
+    /**
+    * [查询] 根据主键 id 查询
+    * @author zrz
+    * @date 2020/06/19
+    **/
+    CustomerInfoFollow load(int id);
+
+    /**
+    * [查询] 分页查询
+    * @author zrz
+    * @date 2020/06/19
+    **/
+    List<CustomerInfoFollow> pageList(int offset,int pagesize);
+
+    /**
+    * [查询] 分页查询 count
+    * @author zrz
+    * @date 2020/06/19
+    **/
+    int pageListCount(int offset,int pagesize);
+
+    List<CustomerInfoFollow> selectByPageNumSize(CustomerInfoFollowDto customerInfoFollowDto);
+
+    void insertInfoFollowList(@Param("list") List<CustomerInfoFollowCyDto> list);
+
+}

+ 60 - 0
src/main/java/com/ygj/yuemum/dao/customer/CustomerInfoStateMapper.java

@@ -0,0 +1,60 @@
+package com.ygj.yuemum.dao.customer;
+
+import com.ygj.yuemum.domain.customer.CustomerInfoBasic;
+import com.ygj.yuemum.domain.customer.CustomerInfoState;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CustomerInfoStateMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer_info_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer_info_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    int insert(CustomerInfoState record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer_info_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    int insertSelective(CustomerInfoState record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer_info_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    CustomerInfoState selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer_info_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    int updateByPrimaryKeySelective(CustomerInfoState record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer_info_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    int updateByPrimaryKey(CustomerInfoState record);
+
+    List<CustomerInfoState> selectAll();
+}

+ 13 - 0
src/main/java/com/ygj/yuemum/dao/customer/CustomerSourceChannelDao.java

@@ -0,0 +1,13 @@
+package com.ygj.yuemum.dao.customer;
+
+import com.ygj.yuemum.domain.customer.CustomerSourceChannel;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CustomerSourceChannelDao {
+
+    List<CustomerSourceChannel> getAllSourceChannel();
+
+}

+ 114 - 0
src/main/java/com/ygj/yuemum/domain/customer/CustomerInfoBasic.java

@@ -0,0 +1,114 @@
+package com.ygj.yuemum.domain.customer;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+*  customer_info_basic
+* @author zrz 2020-06-17
+*/
+@Data
+public class CustomerInfoBasic implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * id
+    */
+    private Integer id;
+
+    /**
+    * 所属城市
+    */
+    private String branche_name;
+
+    /**
+    * 用户姓名
+    */
+    private String fb_customer_name;
+
+    /**
+    * 用户电话
+    */
+    private String fb_customer_phone;
+
+    /**
+    * 用户产品类型
+    */
+    private String p_code;
+
+    /**
+    * 微信号
+    */
+    private String fb_wechat_number;
+
+    /**
+    * 渠道来源
+    */
+    private String source_channel;
+
+    /**
+    * 用户状态
+    */
+    private String customer_state;
+
+    /**
+    * 预产期
+    */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date edc_date;
+
+    /**
+    * 计划生产方式
+    */
+    private String pregnancy_way;
+
+    /**
+    * 地址
+    */
+    private String address_basic;
+
+    /**
+    * 详细地址
+    */
+    private String address_detail;
+
+    /**
+    * 备注
+    */
+    private String fb_remarks;
+
+    /**
+    * 录入时间
+    */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date entry_date;
+
+    /**
+    * 创建人
+    */
+    private String create_person;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date fb_date;
+
+    private Integer page;
+    private Integer limit;
+    private String start_entry_date;
+    private String end_entry_date;
+
+    private List<String> address_basic_str;
+
+    public CustomerInfoBasic() {
+    }
+
+}

+ 67 - 0
src/main/java/com/ygj/yuemum/domain/customer/CustomerInfoFeedback.java

@@ -0,0 +1,67 @@
+package com.ygj.yuemum.domain.customer;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+public class CustomerInfoFeedback {
+
+    private Integer id;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date fb_date;
+
+    private String source_channel;
+
+    private String fb_customer_phone;
+
+    private String branche_name;
+
+    private String fb_type;
+
+    private String create_person;
+
+    private String in_charge_person;
+
+    private String customer_manager;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date entry_date;
+
+    private String p_code;
+
+    private String fb_customer_name;
+
+    private String fb_wechat_number;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date edc_date;
+
+    private String fb_remarks;
+
+    private String it_on;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date convenient_time;
+
+    private String communication_content;
+
+    private String user_feedback;
+
+    private String store;
+//
+//
+//    private Integer page;
+//    private Integer limit;
+//    private String start_fb_date;
+//    private String end_fb_date;
+//    private String start_entry_date;
+//    private String end_entry_date;
+}

+ 95 - 0
src/main/java/com/ygj/yuemum/domain/customer/CustomerInfoFollow.java

@@ -0,0 +1,95 @@
+package com.ygj.yuemum.domain.customer;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ *  customer_info_follow
+ * @author zrz 2020-06-19
+ */
+@Data
+public class CustomerInfoFollow implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 创建时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date create_date;
+
+    /**
+     * 跟进方式
+     */
+    private String follow_mehtod;
+
+    /**
+     * 客户姓名
+     */
+    private String fb_customer_name;
+
+    /**
+     * 用户电话
+     */
+    private String fb_customer_phone;
+
+    /**
+     * 渠道来源
+     */
+    private String source_channel;
+
+    /**
+     * 预产期
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date edc_date;
+
+    /**
+     * 跟进状态
+     */
+    private String follow_state;
+
+    /**
+     * 位置
+     */
+    private String address;
+
+    /**
+     * 跟进情况描述
+     */
+    private String follow_desc;
+
+    /**
+     * 相关照片
+     */
+    private String photos;
+
+    /**
+     * 下次跟进时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date next_follow_date;
+
+    private String create_person;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date fb_date;
+
+    public CustomerInfoFollow() {
+    }
+
+}

+ 27 - 0
src/main/java/com/ygj/yuemum/domain/customer/CustomerInfoState.java

@@ -0,0 +1,27 @@
+package com.ygj.yuemum.domain.customer;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class CustomerInfoState implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer_info_state.id
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer_info_state.customer_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    private String customer_state;
+
+}

+ 12 - 0
src/main/java/com/ygj/yuemum/domain/customer/CustomerSourceChannel.java

@@ -0,0 +1,12 @@
+package com.ygj.yuemum.domain.customer;
+
+import lombok.Data;
+
+@Data
+public class CustomerSourceChannel {
+
+    private Integer id;
+
+    private String source_channel;
+
+}

+ 95 - 0
src/main/java/com/ygj/yuemum/domain/customer/dto/CustomerInfoBasicCyDto.java

@@ -0,0 +1,95 @@
+package com.ygj.yuemum.domain.customer.dto;
+
+import lombok.Data;
+
+@Data
+public class CustomerInfoBasicCyDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 所属城市
+     */
+    private String branche_name;
+
+    /**
+     * 用户姓名
+     */
+    private String fb_customer_name;
+
+    /**
+     * 用户电话
+     */
+    private String fb_customer_phone;
+
+    /**
+     * 用户产品类型
+     */
+    private String p_code;
+
+    /**
+     * 微信号
+     */
+    private String fb_wechat_number;
+
+    /**
+     * 渠道来源
+     */
+    private String source_channel;
+
+    /**
+     * 用户状态
+     */
+    private String customer_state;
+
+    /**
+     * 预产期
+     */
+    private String edc_date;
+
+    /**
+     * 计划生产方式
+     */
+    private String pregnancy_way;
+
+    /**
+     * 地址
+     */
+    private String address_basic;
+
+    /**
+     * 详细地址
+     */
+    private String address_detail;
+
+    /**
+     * 备注
+     */
+    private String fb_remarks;
+
+    /**
+     * 录入时间
+     */
+    private String entry_date;
+
+    /**
+     * 创建人
+     */
+    private String create_person;
+
+    private String fb_date;
+
+    private Integer page;
+    private Integer limit;
+    private String start_entry_date;
+    private String end_entry_date;
+
+    private String address_basic_str;
+
+
+}

+ 98 - 0
src/main/java/com/ygj/yuemum/domain/customer/dto/CustomerInfoBasicDto.java

@@ -0,0 +1,98 @@
+package com.ygj.yuemum.domain.customer.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class CustomerInfoBasicDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 用户姓名
+     */
+    private String fb_customer_name;
+
+    /**
+     * 用户电话
+     */
+    private String fb_customer_phone;
+
+    /**
+     * 用户产品类型
+     */
+    private String p_code;
+
+    /**
+     * 微信号
+     */
+    private String fb_wechat_number;
+
+    /**
+     * 渠道来源
+     */
+    private List<String> source_channel;
+
+    /**
+     * 预产期
+     */
+    private Date edc_date;
+
+    /**
+     * 计划生产方式
+     */
+    private String pregnancy_way;
+
+    /**
+     * 地址
+     */
+    private String address_basic;
+
+    /**
+     * 详细地址
+     */
+    private String address_detail;
+
+    /**
+     * 备注
+     */
+    private String fb_remarks;
+
+    /**
+     * 录入时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date entry_date;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date fb_date;
+
+    private Integer page;
+    private Integer limit;
+    private String start_entry_date;
+    private String end_entry_date;
+
+    private List<String> branche_name;
+
+    private List<String> fb_type;
+
+    private List<String> create_person;
+
+    private List<String> in_charge_person;
+
+    private List<String> customer_manager;
+
+    private List<String> customer_state;
+
+}

+ 47 - 0
src/main/java/com/ygj/yuemum/domain/customer/dto/CustomerInfoFeedbackCyDto.java

@@ -0,0 +1,47 @@
+package com.ygj.yuemum.domain.customer.dto;
+
+import lombok.Data;
+
+@Data
+public class CustomerInfoFeedbackCyDto {
+
+    private Integer id;
+
+    private String fb_date;
+
+    private String source_channel;
+
+    private String fb_customer_phone;
+
+    private String branche_name;
+
+    private String fb_type;
+
+    private String create_person;
+
+    private String in_charge_person;
+
+    private String customer_manager;
+
+    private String entry_date;
+
+    private String p_code;
+
+    private String fb_customer_name;
+
+    private String fb_wechat_number;
+
+    private String edc_date;
+
+    private String fb_remarks;
+
+    private String it_on;
+
+    private String convenient_time;
+
+    private String communication_content;
+
+    private String user_feedback;
+
+    private String store;
+}

+ 53 - 0
src/main/java/com/ygj/yuemum/domain/customer/dto/CustomerInfoFeedbackDto.java

@@ -0,0 +1,53 @@
+package com.ygj.yuemum.domain.customer.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class CustomerInfoFeedbackDto {
+
+    private Integer id;
+
+    private Date fb_Date;
+
+    private List<String> source_channel;
+
+    private String fb_customer_phone;
+
+    private List<String> branche_name;
+
+    private List<String> fb_type;
+
+    private List<String> create_person;
+
+    private List<String> in_charge_person;
+
+    private List<String> customer_manager;
+
+    private Date entry_date;
+
+    private String it_on;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date convenient_time;
+
+    private String communication_content;
+
+    private String user_feedback;
+
+    private String store;
+
+
+    private Integer page;
+    private Integer limit;
+    private String start_fb_date;
+    private String end_fb_date;
+    private String start_entry_date;
+    private String end_entry_date;
+
+}

+ 72 - 0
src/main/java/com/ygj/yuemum/domain/customer/dto/CustomerInfoFollowCyDto.java

@@ -0,0 +1,72 @@
+package com.ygj.yuemum.domain.customer.dto;
+
+import lombok.Data;
+
+@Data
+public class CustomerInfoFollowCyDto {
+
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 创建时间
+     */
+    private String create_date;
+
+    /**
+     * 跟进方式
+     */
+    private String follow_mehtod;
+
+    /**
+     * 客户姓名
+     */
+    private String fb_customer_name;
+
+    /**
+     * 用户电话
+     */
+    private String fb_customer_phone;
+
+    /**
+     * 渠道来源
+     */
+    private String source_channel;
+
+    /**
+     * 预产期
+     */
+    private String edc_date;
+
+    /**
+     * 跟进状态
+     */
+    private String follow_state;
+
+    /**
+     * 位置
+     */
+    private String address;
+
+    /**
+     * 跟进情况描述
+     */
+    private String follow_desc;
+
+    /**
+     * 相关照片
+     */
+    private String photos;
+
+    /**
+     * 下次跟进时间
+     */
+    private String next_follow_date;
+
+    private String create_person;
+
+    private String fb_date;
+
+}

+ 84 - 0
src/main/java/com/ygj/yuemum/domain/customer/dto/CustomerInfoFollowDto.java

@@ -0,0 +1,84 @@
+package com.ygj.yuemum.domain.customer.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class CustomerInfoFollowDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 创建时间
+     */
+    private Date create_date;
+
+    /**
+     * 跟进方式
+     */
+    private String follow_mehtod;
+
+    /**
+     * 客户姓名
+     */
+    private String fb_customer_name;
+
+    /**
+     * 用户电话
+     */
+    private String fb_customer_phone;
+
+    /**
+     * 渠道来源
+     */
+    private String source_channel;
+
+    /**
+     * 预产期
+     */
+    private Date edc_date;
+
+    /**
+     * 跟进状态
+     */
+    private String follow_state;
+
+    /**
+     * 位置
+     */
+    private String address;
+
+    /**
+     * 跟进情况描述
+     */
+    private String follow_desc;
+
+    /**
+     * 相关照片
+     */
+    private String photos;
+
+    /**
+     * 下次跟进时间
+     */
+    private Date next_follow_date;
+
+    private Date fb_date;
+
+    private String start_fb_date;
+
+    private String end_fb_date;
+
+    private List<String> create_person;
+    private Integer page;
+    private Integer limit;
+
+}

+ 71 - 0
src/main/java/com/ygj/yuemum/service/customer/CustomerInfoBasicService.java

@@ -0,0 +1,71 @@
+package com.ygj.yuemum.service.customer;
+
+import com.github.pagehelper.PageHelper;
+import com.ygj.yuemum.dao.customer.CustomerInfoBasicDao;
+import com.ygj.yuemum.domain.customer.CustomerInfoBasic;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoBasicCyDto;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoBasicDto;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+* customer_info_basic
+* @author zrz
+* @date 2020/06/17
+*/
+@Service
+public class CustomerInfoBasicService {
+
+	@Resource
+	private CustomerInfoBasicDao customerInfoBasicDao;
+
+
+	public int insert(CustomerInfoBasic customerInfoBasic) {
+		return customerInfoBasicDao.insert(customerInfoBasic);
+	}
+
+
+	public int delete(int id) {
+		int ret = customerInfoBasicDao.delete(id);
+		return ret;
+	}
+
+
+	public int update(CustomerInfoBasic customerInfoBasic) {
+		int ret = customerInfoBasicDao.update(customerInfoBasic);
+		return ret;
+	}
+
+
+	public CustomerInfoBasic load(int id) {
+		return customerInfoBasicDao.load(id);
+	}
+
+
+	public Map<String,Object> pageList(int offset, int pagesize) {
+
+		List<CustomerInfoBasic> pageList = customerInfoBasicDao.pageList(offset, pagesize);
+		int totalCount = customerInfoBasicDao.pageListCount(offset, pagesize);
+
+		// result
+		Map<String, Object> result = new HashMap<String, Object>();
+		result.put("pageList", pageList);
+		result.put("totalCount", totalCount);
+
+		return result;
+	}
+
+	public List<CustomerInfoBasic> selectByPageNumSize(CustomerInfoBasicDto customerInfoBasic) {
+		PageHelper.startPage(customerInfoBasic.getPage(), customerInfoBasic.getLimit(), true, false);
+		return customerInfoBasicDao.selectByPageNumSize(customerInfoBasic);
+	}
+
+	public void insertInfoBasicList(List<CustomerInfoBasicCyDto> list) {
+		customerInfoBasicDao.insertInfoBasicList(list);
+	}
+
+}

+ 44 - 0
src/main/java/com/ygj/yuemum/service/customer/CustomerInfoFeedbackService.java

@@ -0,0 +1,44 @@
+package com.ygj.yuemum.service.customer;
+
+import com.github.pagehelper.PageHelper;
+import com.ygj.yuemum.dao.customer.CustomerInfoFeedbackDao;
+import com.ygj.yuemum.domain.customer.CustomerInfoFeedback;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoFeedbackCyDto;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoFeedbackDto;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Service
+public class CustomerInfoFeedbackService {
+
+    @Resource
+    CustomerInfoFeedbackDao feedbackDao;
+
+    public List<CustomerInfoFeedback> selectByPageNumSize(CustomerInfoFeedbackDto customerInfoFeedbackDto) {
+        PageHelper.startPage(customerInfoFeedbackDto.getPage(), customerInfoFeedbackDto.getLimit(), true, false);
+        return feedbackDao.selectByPageNumSize(customerInfoFeedbackDto);
+    }
+
+    public int insertInfoFeedback(CustomerInfoFeedback customerInfoFeedback) {
+        if (StringUtils.isBlank(customerInfoFeedback.getFb_remarks())) {
+            customerInfoFeedback.setFb_remarks("");
+        }
+        return feedbackDao.insertInfoFeedback(customerInfoFeedback);
+    }
+
+    public CustomerInfoFeedback getById(Integer id) {
+        return feedbackDao.getById(id);
+    }
+
+    public int updateByPrimaryKeySelective(CustomerInfoFeedback customerInfoFeedback) {
+        return feedbackDao.updateByPrimaryKeySelective(customerInfoFeedback);
+    }
+
+    public void insertInfoFeedbackList(List<CustomerInfoFeedbackCyDto> customerInfoFeedbacks) {
+        feedbackDao.insertInfoFeedbackList(customerInfoFeedbacks);
+    }
+
+}

+ 57 - 0
src/main/java/com/ygj/yuemum/service/customer/CustomerInfoFollowService.java

@@ -0,0 +1,57 @@
+package com.ygj.yuemum.service.customer;
+
+import com.github.pagehelper.PageHelper;
+import com.ygj.yuemum.dao.customer.CustomerInfoFollowMapper;
+import com.ygj.yuemum.domain.customer.CustomerInfoFollow;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoFollowCyDto;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoFollowDto;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+* customer_info_follow
+* @author zrz
+* @date 2020/06/19
+*/
+@Service
+public class CustomerInfoFollowService {
+
+	@Resource
+	private CustomerInfoFollowMapper customerInfoFollowMapper;
+
+
+
+	public int insert(CustomerInfoFollow customerInfoFollow) {
+
+		return customerInfoFollowMapper.insert(customerInfoFollow);
+	}
+
+
+
+	public int delete(int id) {
+		return customerInfoFollowMapper.delete(id);
+	}
+
+
+	public int update(CustomerInfoFollow customerInfoFollow) {
+		return customerInfoFollowMapper.update(customerInfoFollow);
+	}
+
+
+	public CustomerInfoFollow load(int id) {
+		return customerInfoFollowMapper.load(id);
+	}
+
+
+	public List<CustomerInfoFollow> selectByPageNumSize(CustomerInfoFollowDto customerInfoFollowDto) {
+		PageHelper.startPage(customerInfoFollowDto.getPage(), customerInfoFollowDto.getLimit());
+		return customerInfoFollowMapper.selectByPageNumSize(customerInfoFollowDto);
+	}
+
+	public void insertInfoFollowList(List<CustomerInfoFollowCyDto> list) {
+		customerInfoFollowMapper.insertInfoFollowList(list);
+	}
+
+}

+ 32 - 0
src/main/java/com/ygj/yuemum/service/customer/CustomerInfoStateService.java

@@ -0,0 +1,32 @@
+package com.ygj.yuemum.service.customer;
+
+import com.ygj.yuemum.dao.customer.CustomerInfoStateMapper;
+import com.ygj.yuemum.domain.customer.CustomerInfoState;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+* customer_info_state
+* @author zrz
+* @date 2020/06/17
+*/
+@Service
+public class CustomerInfoStateService {
+
+	@Resource
+	private CustomerInfoStateMapper customerInfoStateMapper;
+
+
+
+	public int insert(CustomerInfoState customerInfoState) {
+		return customerInfoStateMapper.insert(customerInfoState);
+	}
+
+	public List<CustomerInfoState> selectAll() {
+		return customerInfoStateMapper.selectAll();
+	}
+
+
+}

+ 20 - 0
src/main/java/com/ygj/yuemum/service/customer/CustomerSourceChannelService.java

@@ -0,0 +1,20 @@
+package com.ygj.yuemum.service.customer;
+
+import com.ygj.yuemum.dao.customer.CustomerSourceChannelDao;
+import com.ygj.yuemum.domain.customer.CustomerSourceChannel;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Service
+public class CustomerSourceChannelService {
+
+    @Resource
+    CustomerSourceChannelDao customerSourceChannelDao;
+
+    public List<CustomerSourceChannel> getAllSourceChannel() {
+        return customerSourceChannelDao.getAllSourceChannel();
+    }
+
+}

+ 101 - 0
src/main/java/com/ygj/yuemum/service/scheduled/CYScheduledService.java

@@ -0,0 +1,101 @@
+package com.ygj.yuemum.service.scheduled;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.component.Constant;
+import com.ygj.yuemum.utils.HttpUtils;
+import com.ygj.yuemum.utils.OssService;
+import org.apache.http.HttpResponse;
+import org.apache.http.util.EntityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+@Service
+public class CYScheduledService {
+
+    @Value("${chuanyun.EngineCode}")
+    String EngineCode;
+
+    @Value("${chuanyun.EngineSecret}")
+    String EngineSecret;
+
+    @Autowired
+    OssService ossService;
+
+    public JSONObject listFormData(String SchemaCode, int FromRowNum, int ToRowNum) throws Exception {
+        return this.listFormData(EngineCode, EngineSecret, SchemaCode, FromRowNum, ToRowNum);
+    }
+
+    /**
+     * 批量从氚云导数据
+     * @param EngineCode 氚云code
+     * @param EngineSecret 氚云secret
+     * @param SchemaCode 表单id
+     * @param FromRowNum 从哪一条开始
+     * @param ToRowNum 到哪一条结束
+     * @return
+     * @throws Exception
+     */
+    public JSONObject listFormData(String EngineCode, String EngineSecret, String SchemaCode, int FromRowNum, int ToRowNum) throws Exception {
+        Map<String, String> paramMap = new HashMap();
+        paramMap.put("ActionName",   "LoadBizObjects");
+        paramMap.put("SchemaCode", SchemaCode);
+
+        JSONObject filterJsonObj = new JSONObject();
+        // 分页查询,从第几条开始
+        filterJsonObj.put("FromRowNum", FromRowNum);
+        // 查询的总行数
+        filterJsonObj.put("ToRowNum", ToRowNum);
+        // 返回的字段,不填返回所有
+        filterJsonObj.put("RequireCount", Boolean.FALSE);
+        // 排序字段,目前不支持使用,默认置空
+        filterJsonObj.put("ReturnItems", Collections.EMPTY_LIST);
+        // 分页查询,第几条结束
+        filterJsonObj.put("SortByCollection", Collections.EMPTY_LIST);
+        // 查询条件
+        filterJsonObj.put("Matcher", "{\"Type\":\"And\",\"Matchers\":[]}");
+
+        paramMap.put("Filter",filterJsonObj.toJSONString());
+
+        //身份认证参数
+        Map<String, String> headers = new HashMap();
+        headers.put("EngineCode", EngineCode);
+        headers.put("EngineSecret", EngineSecret);
+
+        HttpResponse result = HttpUtils.doPost("https://www.h3yun.com", "/OpenApi/Invoke", headers, null, JSON.toJSONString(paramMap));
+        String strResult = EntityUtils.toString(result.getEntity());
+        JSONObject jsonObject = JSONObject.parseObject(strResult);
+
+        return jsonObject;
+    }
+
+    public OssService.UploadDto getDownloadBizObject(String attachmentId) throws Exception {
+        Map<String, String> paramMap = new HashMap();
+
+        paramMap.put("attachmentId", attachmentId);
+
+        paramMap.put("EngineCode", "ae483ce1607kh089");
+
+        //身份认证参数
+        Map<String, String> headers = new HashMap();
+
+        headers.put("EngineCode","ae483ce1607kh089");
+
+        headers.put("EngineSecret","aDKyV5OYQa7HMv4qWvqH8bAlXxmzD3bQK2/klBFoHlu6XHRxh7Q2lg==");
+
+        HttpResponse result = HttpUtils.doPost("https://www.h3yun.com", "/Api/DownloadBizObjectFile", headers, paramMap, "");
+
+        String fileName = UUID.randomUUID().toString() + ".jpg";
+
+        OssService.UploadDto uploadDto = ossService.upload(result.getEntity().getContent(), Constant.FOLDER, fileName, result.getEntity().getContentLength());
+
+        return uploadDto;
+    }
+
+}

+ 1 - 0
src/main/java/com/ygj/yuemum/shiro/ShiroConfig.java

@@ -145,6 +145,7 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/uploadPayImg", "anon");
         filterChainDefinitionMap.put("/uploadMiniImg", "anon");
         filterChainDefinitionMap.put("/uploadDianPingImg", "anon");
+        filterChainDefinitionMap.put("/CustomerInfoFollow/uploadImg", "anon");
         //简历分享问题
         filterChainDefinitionMap.put("/getWeChatInfo", "anon");
         //超人妈妈学院

+ 368 - 0
src/main/java/com/ygj/yuemum/utils/HttpUtils.java

@@ -0,0 +1,368 @@
+package com.ygj.yuemum.utils;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.http.HttpResponse;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.config.AuthSchemes;
+import org.apache.http.client.config.CookieSpecs;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.HttpDelete;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.config.Registry;
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.socket.PlainConnectionSocketFactory;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.entity.ByteArrayEntity;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.apache.http.message.BasicNameValuePair;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @program:
+ * @description:
+ * @author:
+ * @create: 2019-11-06 16:48
+ **/
+public class HttpUtils {
+
+	private static int defaultConnectTimeout = 60000;
+
+	private static int defaultConnectionRequestTimeout = 60000;
+
+	private static int defaultSocketTimeout = 60000;
+
+	/**
+	 * 获取 HttpClient
+	 *
+	 * @param host
+	 * @param path
+	 * @return
+	 */
+	public static HttpClient wrapClient(String host, String path) {
+//        HttpClient httpClient = HttpClientBuilder.create().build();
+		CloseableHttpClient httpClient = HttpClients.custom().build();
+		if (host != null && host.startsWith("https://")) {
+			return sslClient();
+		} else if (StringUtils.isBlank(host) && path != null && path.startsWith("https://")) {
+			return sslClient();
+		}
+		return httpClient;
+	}
+
+	/**
+	 * 在调用SSL之前需要重写验证方法,取消检测SSL
+	 * 创建ConnectionManager,添加Connection配置信息
+	 *
+	 * @return HttpClient 支持https
+	 */
+	public static HttpClient sslClient() {
+		try {
+			// 在调用SSL之前需要重写验证方法,取消检测SSL
+			X509TrustManager trustManager = new X509TrustManager() {
+				@Override
+				public X509Certificate[] getAcceptedIssuers() {
+					return null;
+				}
+
+				@Override
+				public void checkClientTrusted(X509Certificate[] xcs, String str) {
+				}
+
+				@Override
+				public void checkServerTrusted(X509Certificate[] xcs, String str) {
+				}
+			};
+			SSLContext ctx = SSLContext.getInstance(SSLConnectionSocketFactory.TLS);
+			ctx.init(null, new TrustManager[]{trustManager}, null);
+			SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(ctx, NoopHostnameVerifier.INSTANCE);
+			// 创建Registry
+			RequestConfig requestConfig = RequestConfig.custom().setCookieSpec(CookieSpecs.STANDARD_STRICT)
+					.setExpectContinueEnabled(Boolean.TRUE).setTargetPreferredAuthSchemes(Arrays.asList(AuthSchemes.NTLM, AuthSchemes.DIGEST))
+					.setProxyPreferredAuthSchemes(Arrays.asList(AuthSchemes.BASIC)).setConnectTimeout(2000).build();
+			Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory>create()
+					.register("http", PlainConnectionSocketFactory.INSTANCE)
+					.register("https", socketFactory).build();
+
+
+			// 创建ConnectionManager,添加Connection配置信息
+			PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(socketFactoryRegistry);
+
+			connectionManager.setDefaultMaxPerRoute(20);
+			connectionManager.setMaxTotal(200);
+
+			CloseableHttpClient closeableHttpClient = HttpClients.custom()
+					.setConnectionManager(connectionManager)
+					.setDefaultRequestConfig(requestConfig).build();
+
+			return closeableHttpClient;
+		} catch (KeyManagementException ex) {
+			throw new RuntimeException(ex);
+		} catch (NoSuchAlgorithmException ex) {
+			throw new RuntimeException(ex);
+		}
+	}
+
+
+	/**
+	 * get
+	 *
+	 * @param host
+	 * @param path
+	 * @param headers
+	 * @param querys
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doGet(String host, String path,
+									 Map<String, String> headers,
+									 Map<String, String> querys)
+			throws Exception {
+		HttpClient httpClient = wrapClient(host, path);
+		HttpGet request = new HttpGet(buildUrl(host, path, querys));
+		for (Map.Entry<String, String> e : headers.entrySet()) {
+			request.addHeader(e.getKey(), e.getValue());
+		}
+		return httpClient.execute(request);
+	}
+
+	/**
+	 * post form
+	 *
+	 * @param host
+	 * @param path
+	 * @param headers
+	 * @param querys
+	 * @param bodys
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doPost(String host, String path,
+									  Map<String, String> headers,
+									  Map<String, String> querys,
+									  Map<String, String> bodys)
+			throws Exception {
+		HttpClient httpClient = wrapClient(host, path);
+		HttpPost request = new HttpPost(buildUrl(host, path, querys));
+		for (Map.Entry<String, String> e : headers.entrySet()) {
+			request.addHeader(e.getKey(), e.getValue());
+		}
+		if (bodys != null) {
+			List<NameValuePair> nameValuePairList = new ArrayList<NameValuePair>();
+
+			for (String key : bodys.keySet()) {
+				nameValuePairList.add(new BasicNameValuePair(key, bodys.get(key)));
+			}
+			UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(nameValuePairList, "utf-8");
+			formEntity.setContentType("application/x-www-form-urlencoded; charset=UTF-8");
+			request.setEntity(formEntity);
+		}
+		return httpClient.execute(request);
+	}
+
+	/**
+	 * Post String
+	 *
+	 * @param host
+	 * @param path
+	 * @param headers
+	 * @param querys
+	 * @param body
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doPost(String host, String path,
+									  Map<String, String> headers,
+									  Map<String, String> querys,
+									  String body)
+			throws Exception {
+		HttpClient httpClient = wrapClient(host, path);
+		HttpPost request = new HttpPost(buildUrl(host, path, querys));
+		if (headers != null) {
+			for (Map.Entry<String, String> e : headers.entrySet()) {
+				request.addHeader(e.getKey(), e.getValue());
+			}
+		}
+		if (StringUtils.isNotBlank(body)) {
+			request.setEntity(new StringEntity(body, "utf-8"));
+		}
+		request.setConfig(getRequestConfig(defaultConnectTimeout, defaultConnectionRequestTimeout, defaultSocketTimeout));
+		return httpClient.execute(request);
+	}
+
+	/**
+	 * Post stream
+	 *
+	 * @param host
+	 * @param path
+	 * @param headers
+	 * @param querys
+	 * @param body
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doPost(String host, String path,
+									  Map<String, String> headers,
+									  Map<String, String> querys,
+									  byte[] body)
+			throws Exception {
+		HttpClient httpClient = wrapClient(host, path);
+		HttpPost request = new HttpPost(buildUrl(host, path, querys));
+		for (Map.Entry<String, String> e : headers.entrySet()) {
+			request.addHeader(e.getKey(), e.getValue());
+		}
+		if (body != null) {
+			request.setEntity(new ByteArrayEntity(body));
+		}
+		return httpClient.execute(request);
+	}
+
+	/**
+	 * Put String
+	 *
+	 * @param host
+	 * @param path
+	 * @param headers
+	 * @param querys
+	 * @param body
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doPut(String host, String path,
+									 Map<String, String> headers,
+									 Map<String, String> querys,
+									 String body)
+			throws Exception {
+		HttpClient httpClient = wrapClient(host, path);
+		HttpPut request = new HttpPut(buildUrl(host, path, querys));
+		for (Map.Entry<String, String> e : headers.entrySet()) {
+			request.addHeader(e.getKey(), e.getValue());
+		}
+		if (StringUtils.isNotBlank(body)) {
+			request.setEntity(new StringEntity(body, "utf-8"));
+		}
+		return httpClient.execute(request);
+	}
+
+	/**
+	 * Put stream
+	 *
+	 * @param host
+	 * @param path
+	 * @param headers
+	 * @param querys
+	 * @param body
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doPut(String host, String path,
+									 Map<String, String> headers,
+									 Map<String, String> querys,
+									 byte[] body)
+			throws Exception {
+		HttpClient httpClient = wrapClient(host, path);
+		HttpPut request = new HttpPut(buildUrl(host, path, querys));
+		for (Map.Entry<String, String> e : headers.entrySet()) {
+			request.addHeader(e.getKey(), e.getValue());
+		}
+		if (body != null) {
+			request.setEntity(new ByteArrayEntity(body));
+		}
+		return httpClient.execute(request);
+	}
+
+	/**
+	 * Delete
+	 *
+	 * @param host
+	 * @param path
+	 * @param headers
+	 * @param querys
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doDelete(String host, String path,
+										Map<String, String> headers,
+										Map<String, String> querys)
+			throws Exception {
+		HttpClient httpClient = wrapClient(host, path);
+		HttpDelete request = new HttpDelete(buildUrl(host, path, querys));
+		for (Map.Entry<String, String> e : headers.entrySet()) {
+			request.addHeader(e.getKey(), e.getValue());
+		}
+		return httpClient.execute(request);
+	}
+
+	/**
+	 * 构建请求的 url
+	 *
+	 * @param host
+	 * @param path
+	 * @param querys
+	 * @return
+	 * @throws UnsupportedEncodingException
+	 */
+	private static String buildUrl(String host, String path, Map<String, String> querys) throws UnsupportedEncodingException {
+		StringBuilder sbUrl = new StringBuilder();
+		if (!StringUtils.isBlank(host)) {
+			sbUrl.append(host);
+		}
+		if (!StringUtils.isBlank(path)) {
+			sbUrl.append(path);
+		}
+		if (null != querys) {
+			StringBuilder sbQuery = new StringBuilder();
+			for (Map.Entry<String, String> query : querys.entrySet()) {
+				if (0 < sbQuery.length()) {
+					sbQuery.append("&");
+				}
+				if (StringUtils.isBlank(query.getKey()) && !StringUtils.isBlank(query.getValue())) {
+					sbQuery.append(query.getValue());
+				}
+				if (!StringUtils.isBlank(query.getKey())) {
+					sbQuery.append(query.getKey());
+					if (!StringUtils.isBlank(query.getValue())) {
+						sbQuery.append("=");
+						sbQuery.append(URLEncoder.encode(query.getValue(), "utf-8"));
+					}
+				}
+			}
+			if (0 < sbQuery.length()) {
+				sbUrl.append("?").append(sbQuery);
+			}
+		}
+		return sbUrl.toString();
+	}
+
+	/**
+	 * 单位毫秒
+	 * @return
+	 */
+	private static RequestConfig getRequestConfig(int connectTimeout, int connectionRequestTimeout, int socketTimeout){
+		RequestConfig requestConfig = RequestConfig.custom()
+				.setConnectTimeout(connectTimeout).setConnectionRequestTimeout(connectionRequestTimeout)
+				.setSocketTimeout(socketTimeout).build();
+		return requestConfig;
+	}
+
+}

+ 125 - 0
src/main/java/com/ygj/yuemum/utils/OssService.java

@@ -0,0 +1,125 @@
+package com.ygj.yuemum.utils;
+
+import com.aliyun.oss.OSS;
+import com.aliyun.oss.OSSClient;
+import com.aliyun.oss.model.ObjectMetadata;
+import lombok.Data;
+import lombok.experimental.Accessors;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.UUID;
+
+@Service
+public class OssService {
+    String endpoint = "http://oss-cn-hangzhou.aliyuncs.com";
+    String accessKeyId = "02yUhyzfxsxzLCKA";
+    String accessKeySecret = "6Cw3uKQKKRedocMtfZVfCxHoeZh2h6";
+    String bucket = "yueguanjia-bucket";
+    String rootserver = "oss-cn-hangzhou.aliyuncs.com";
+
+
+    public UploadDto upload(File file, String folder) throws Exception {
+        OSS ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);
+        ObjectMetadata objectMetadata = new ObjectMetadata();
+        objectMetadata.setContentLength(file.length());
+        FileInputStream inputStream = new FileInputStream(file);
+
+        String extension = getExtension(file.getName());
+        String saveName = UUID.randomUUID().toString() + "." + extension;
+
+        String key = folder + "/" + saveName;
+        ossClient.putObject(bucket, key, inputStream, objectMetadata);
+        ossClient.shutdown();
+
+        UploadDto uploadDto = new UploadDto();
+        uploadDto.url = getUrl(key);
+        uploadDto.name = file.getName();
+        uploadDto.saveName = saveName;
+        uploadDto.size = file.length();
+        uploadDto.key = key;
+        return uploadDto;
+    }
+
+    public UploadDto upload(MultipartFile file, String folder) throws Exception {
+        OSS ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);
+        ObjectMetadata objectMetadata = new ObjectMetadata();
+        objectMetadata.setContentLength(file.getSize());
+
+
+        String extension = getExtension(file.getOriginalFilename());
+        String saveName = UUID.randomUUID().toString() + "." + extension;
+
+        String key = folder + "/" + saveName;
+        ossClient.putObject(bucket, key, file.getInputStream(), objectMetadata);
+        ossClient.shutdown();
+
+        UploadDto uploadDto = new UploadDto();
+        uploadDto.url = getUrl(key);
+        uploadDto.name = file.getOriginalFilename();
+        uploadDto.saveName = saveName;
+        uploadDto.size = file.getSize();
+        uploadDto.key = key;
+        return uploadDto;
+    }
+
+    public UploadDto upload(InputStream inputStream, String folder, String fileName, long lenth) throws UnsupportedEncodingException {
+        OSS ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);
+
+        String extension = getExtension(fileName);
+        String saveName = UUID.randomUUID().toString() + "." + extension;
+
+        String key = folder + "/" + saveName;
+        ossClient.putObject(bucket, key, inputStream);
+        ossClient.shutdown();
+
+        UploadDto uploadDto = new UploadDto();
+        uploadDto.url = getUrl(key);
+        uploadDto.name = fileName;
+        uploadDto.saveName = saveName;
+        uploadDto.size = lenth;
+        uploadDto.key = key;
+        return uploadDto;
+    }
+
+    private String getExtension(String fileName) {
+        int index = fileName.lastIndexOf(".");
+        if (index < 0) {
+            return "";
+        }
+        return fileName.substring(index + 1);
+    }
+
+
+    public String getUrl(String key) throws UnsupportedEncodingException {
+        return "https://" + bucket + "." + rootserver + "/" + URLEncoder.encode(key, "UTF-8");
+    }
+
+    @Data
+    @Accessors(chain = true)
+    public static class UploadDto {
+        /**
+         * oss存储地址
+         */
+        private String url;
+        /**
+         * osskey
+         */
+        private String key;
+        private String name;
+        /**
+         * 保存oss文件名称
+         */
+        private String saveName;
+        /**
+         * 文件大小
+         */
+        private Long size;
+    }
+
+}

+ 22 - 0
src/main/java/com/ygj/yuemum/utils/ResponseUtil.java

@@ -0,0 +1,22 @@
+package com.ygj.yuemum.utils;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageInfo;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class ResponseUtil {
+
+    public static <T> Map<String, Object> convertRetMap(List<T> list) {
+        Map<String, Object> retMap = new HashMap<>(4);
+        retMap.put("items", list);
+        if (list instanceof Page) {
+            Page page = (Page) list;
+            retMap.put("total", page.getTotal());
+        }
+        return retMap;
+    }
+
+}

+ 4 - 0
src/main/resources/application.yml

@@ -156,6 +156,10 @@ college:
   MAXSCHOLARSHIPS: 12000
 swagger:
   enable: false
+chuanyun:
+  EngineCode: ae483ce1607kh089
+  EngineSecret: aDKyV5OYQa7HMv4qWvqH8bAlXxmzD3bQK2/klBFoHlu6XHRxh7Q2lg==
+  OssFolder: yeusuo/follow
 
 
 

+ 292 - 0
src/main/resources/mybatis/mapper/customer/CustomerInfoBasicDao.xml

@@ -0,0 +1,292 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ygj.yuemum.dao.customer.CustomerInfoBasicDao">
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.customer.CustomerInfoBasic" >
+        <result column="id" property="id" />
+        <result column="branche_name" property="branche_name" />
+        <result column="fb_customer_name" property="fb_customer_name" />
+        <result column="fb_customer_phone" property="fb_customer_phone" />
+        <result column="p_code" property="p_code" />
+        <result column="fb_wechat_number" property="fb_wechat_number" />
+        <result column="source_channel" property="source_channel" />
+        <result column="customer_state" property="customer_state" />
+        <result column="edc_date" property="edc_date" />
+        <result column="pregnancy_way" property="pregnancy_way" />
+        <result column="address_basic" property="address_basic" />
+        <result column="address_detail" property="address_detail" />
+        <result column="fb_remarks" property="fb_remarks" />
+        <result column="entry_date" property="entry_date" />
+        <result column="create_person" property="create_person" />
+        <result column="fb_date" property="fb_date" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+                id,
+                branche_name,
+                fb_customer_name,
+                fb_customer_phone,
+                p_code,
+                fb_wechat_number,
+                source_channel,
+                customer_state,
+                edc_date,
+                pregnancy_way,
+                address_basic,
+                address_detail,
+                fb_remarks,
+                entry_date,
+                create_person,
+                fb_date
+    </sql>
+
+    <insert id="insert" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoBasic">
+        INSERT INTO customer_info_basic
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test ='null != branche_name'>
+                branche_name,
+            </if>
+            <if test ='null != fb_customer_name'>
+                fb_customer_name,
+            </if>
+            <if test ='null != fb_customer_phone'>
+                fb_customer_phone,
+            </if>
+            <if test ='null != p_code'>
+                p_code,
+            </if>
+            <if test ='null != fb_wechat_number'>
+                fb_wechat_number,
+            </if>
+            <if test ='null != source_channel'>
+                source_channel,
+            </if>
+            <if test ='null != customer_state'>
+                customer_state,
+            </if>
+            <if test ='null != edc_date'>
+                edc_date,
+            </if>
+            <if test ='null != pregnancy_way'>
+                pregnancy_way,
+            </if>
+            <if test ='null != address_basic'>
+                address_basic,
+            </if>
+            <if test ='null != address_detail'>
+                address_detail,
+            </if>
+            <if test ='null != fb_remarks'>
+                fb_remarks,
+            </if>
+            <if test ='null != entry_date'>
+                entry_date,
+            </if>
+            <if test ='null != create_person'>
+                create_person,
+            </if>
+            <if test ='null != fb_date'>
+                fb_date
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test ='null != branche_name'>
+                #{branche_name},
+            </if>
+            <if test ='null != fb_customer_name'>
+                #{fb_customer_name},
+            </if>
+            <if test ='null != fb_customer_phone'>
+                #{fb_customer_phone},
+            </if>
+            <if test ='null != p_code'>
+                #{p_code},
+            </if>
+            <if test ='null != fb_wechat_number'>
+                #{fb_wechat_number},
+            </if>
+            <if test ='null != source_channel'>
+                #{source_channel},
+            </if>
+            <if test ='null != customer_state'>
+                #{customer_state},
+            </if>
+            <if test ='null != edc_date'>
+                #{edc_date},
+            </if>
+            <if test ='null != pregnancy_way'>
+                #{pregnancy_way},
+            </if>
+            <if test ='null != address_basic'>
+                #{address_basic},
+            </if>
+            <if test ='null != address_detail'>
+                #{address_detail},
+            </if>
+            <if test ='null != fb_remarks'>
+                #{fb_remarks},
+            </if>
+            <if test ='null != entry_date'>
+                #{entry_date},
+            </if>
+            <if test ='null != create_person'>
+                #{create_person},
+            </if>
+            <if test ='null != fb_date'>
+                #{fb_date}
+            </if>
+        </trim>
+    </insert>
+
+    <delete id="delete" >
+        DELETE FROM customer_info_basic
+        WHERE id = #{id}
+    </delete>
+
+    <update id="update" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoBasic">
+        UPDATE customer_info_basic
+        <set>
+            <if test ='null != branche_name'>branche_name = #{branche_name},</if>
+            <if test ='null != fb_customer_name'>fb_customer_name = #{fb_customer_name},</if>
+            <if test ='null != fb_customer_phone'>fb_customer_phone = #{fb_customer_phone},</if>
+            <if test ='null != p_code'>p_code = #{p_code},</if>
+            <if test ='null != fb_wechat_number'>fb_wechat_number = #{fb_wechat_number},</if>
+            <if test ='null != source_channel'>source_channel = #{source_channel},</if>
+            <if test ='null != customer_state'>customer_state = #{customer_state},</if>
+            <if test ='null != edc_date'>edc_date = #{edc_date},</if>
+            <if test ='null != pregnancy_way'>pregnancy_way = #{pregnancy_way},</if>
+            <if test ='null != address_basic'>address_basic = #{address_basic},</if>
+            <if test ='null != address_detail'>address_detail = #{address_detail},</if>
+            <if test ='null != fb_remarks'>fb_remarks = #{fb_remarks},</if>
+            <if test ='null != entry_date'>entry_date = #{entry_date},</if>
+            <if test ='null != create_person'>create_person = #{create_person},</if>
+            <if test ='null != fb_date'>fb_date = #{fb_date}</if>
+        </set>
+        WHERE id = #{id}
+    </update>
+
+
+    <select id="load" resultMap="BaseResultMap">
+        SELECT <include refid="Base_Column_List" />
+        FROM customer_info_basic
+        WHERE id = #{id}
+    </select>
+
+    <select id="pageList" resultMap="BaseResultMap">
+        SELECT <include refid="Base_Column_List" />
+        FROM customer_info_basic
+        LIMIT #{offset}, #{pageSize}
+    </select>
+
+    <select id="pageListCount" resultType="java.lang.Integer">
+        SELECT count(1)
+        FROM customer_info_basic
+    </select>
+
+    <!--获取所有数据-->
+    <select id="selectByPageNumSize" resultType="com.ygj.yuemum.domain.customer.CustomerInfoBasic" parameterType="com.ygj.yuemum.domain.customer.dto.CustomerInfoBasicDto">
+        SELECT
+            id,
+            branche_name,
+            fb_customer_name,
+            fb_customer_phone,
+             p_code,
+            fb_wechat_number,
+            source_channel,
+            customer_state,
+            edc_date,
+            pregnancy_way,
+            address_basic,
+            address_detail,
+            fb_remarks,
+            entry_date,
+            create_person,
+            fb_date
+        FROM
+        customer_info_basic c
+        where 1=1
+        <if test="p_code != null and p_code !=''">
+            and id = #{p_code}
+        </if>
+        <if test="id != null and id !=''">
+            and id = #{id}
+        </if>
+        <if test="start_entry_date != null and start_entry_date !=''">
+            and entry_date &gt;= #{start_entry_date}
+        </if>
+        <if test="end_entry_date != null and end_entry_date !=''">
+            and entry_date &lt; #{end_entry_date}
+        </if>
+        <if test="source_channel != null ">
+            and source_channel in
+            <foreach collection="source_channel" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="fb_customer_phone != null and fb_customer_phone !=''">
+            and fb_customer_phone like "%"#{fb_customer_phone,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="branche_name != null ">
+            and branche_name in
+            <foreach collection="branche_name" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="create_person != null ">
+            and create_person in
+            <foreach collection="create_person" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="customer_state != null ">
+            and customer_state in
+            <foreach collection="customer_state" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        order by id desc
+    </select>
+
+    <insert id="insertInfoBasicList" >
+        INSERT INTO customer_info_basic
+                (
+                branche_name,
+                fb_customer_name,
+                fb_customer_phone,
+                p_code,
+                fb_wechat_number,
+                source_channel,
+                customer_state,
+                edc_date,
+                pregnancy_way,
+                address_basic,
+                address_detail,
+                fb_remarks,
+                entry_date,
+                create_person,
+                fb_date
+                )
+          VALUES
+        <foreach collection="list" item="item" separator=",">
+              (
+                #{item.branche_name},
+                #{item.fb_customer_name},
+                #{item.fb_customer_phone},
+                #{item.p_code},
+                #{item.fb_wechat_number},
+                #{item.source_channel},
+                #{item.customer_state},
+                #{item.edc_date},
+                #{item.pregnancy_way},
+                #{item.address_basic},
+                #{item.address_detail},
+                #{item.fb_remarks},
+                #{item.entry_date},
+                #{item.create_person},
+                #{item.fb_date}
+             )
+        </foreach>
+    </insert>
+
+</mapper>

+ 186 - 0
src/main/resources/mybatis/mapper/customer/CustomerInfoFeedbackMapper.xml

@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ygj.yuemum.dao.customer.CustomerInfoFeedbackDao" >
+
+    <!--获取所有数据-->
+    <select id="selectByPageNumSize" resultType="com.ygj.yuemum.domain.customer.CustomerInfoFeedback" parameterType="com.ygj.yuemum.domain.customer.dto.CustomerInfoFeedbackDto">
+        SELECT
+            id,
+            fb_date,
+            source_channel,
+            fb_customer_phone,
+            branche_name,
+            fb_type,
+            create_person,
+            in_charge_person,
+            customer_manager,
+            entry_date,
+            edc_date,
+            fb_wechat_number,
+            fb_customer_name,
+            fb_remarks,
+            it_on,
+            convenient_time,
+            communication_content,
+            user_feedback,
+            store
+        FROM
+            customer_info_feedback
+        where 1=1
+        <if test="id != null and id !=''">
+            and id = #{id}
+        </if>
+        <if test="start_fb_date != null and start_fb_date !=''">
+            and fb_Date &gt;= #{start_fb_date}
+        </if>
+        <if test="end_fb_date != null and end_fb_date !=''">
+            and fb_Date &lt; #{end_fb_date}
+        </if>
+        <if test="source_channel != null ">
+            and source_channel in
+            <foreach collection="source_channel" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="fb_customer_phone != null and fb_customer_phone !=''">
+            and fb_customer_phone like "%"#{fb_customer_phone,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="branche_name != null ">
+            and branche_name in
+            <foreach collection="branche_name" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="fb_type != null ">
+            and fb_type in
+            <foreach collection="fb_type" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="create_person != null ">
+            and create_person in
+            <foreach collection="create_person" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="in_charge_person != null ">
+            and in_charge_person in
+            <foreach collection="in_charge_person" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="customer_manager != null ">
+            and customer_manager in
+            <foreach collection="customer_manager" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        order by id desc
+    </select>
+    
+    <insert id="insertInfoFeedback" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoFeedback">
+        insert into customer_info_feedback (fb_date, source_channel, fb_customer_phone, branche_name, fb_type, create_person, in_charge_person, customer_manager, entry_date, p_code, fb_customer_name, fb_wechat_number, edc_date, fb_remarks)
+        values (#{fb_date}, #{source_channel}, #{fb_customer_phone}, #{branche_name}, #{fb_type}, #{create_person}, #{in_charge_person}, #{customer_manager}, #{entry_date}, #{p_code}, #{fb_customer_name}, #{fb_wechat_number}, #{edc_date}, #{fb_remarks})
+    </insert>
+
+    <select id="getById" resultType="com.ygj.yuemum.domain.customer.CustomerInfoFeedback">
+            SELECT
+                id,
+                fb_date,
+                source_channel,
+                fb_customer_phone,
+                branche_name,
+                fb_type,
+                create_person,
+                in_charge_person,
+                customer_manager,
+                entry_date,
+                edc_date,
+                fb_wechat_number,
+                fb_customer_name,
+                fb_remarks,
+                store,
+                p_code,
+                it_on,
+                convenient_time,
+                communication_content,
+                user_feedback
+            FROM
+                customer_info_feedback
+            WHERE
+                id = #{id}
+    </select>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoFeedback">
+        update customer_info_feedback
+        <set>
+            <if test="fb_date != null">
+                `fb_date` = #{fb_date,jdbcType=TIMESTAMP},
+            </if>
+            <if test="source_channel != null">
+                `source_channel` = #{source_channel,jdbcType=VARCHAR},
+            </if>
+            <if test="fb_customer_phone != null">
+                `fb_customer_phone` = #{fb_customer_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="branche_name != null">
+                `branche_name` = #{branche_name,jdbcType=VARCHAR},
+            </if>
+            <if test="fb_type != null">
+                `fb_type` = #{fb_type,jdbcType=VARCHAR},
+            </if>
+            <if test="create_person != null">
+                `create_person` = #{create_person,jdbcType=VARCHAR},
+            </if>
+            <if test="in_charge_person != null">
+                `in_charge_person` = #{in_charge_person,jdbcType=VARCHAR},
+            </if>
+            <if test="customer_manager != null">
+                `customer_manager` = #{customer_manager,jdbcType=VARCHAR},
+            </if>
+            <if test="entry_date != null">
+                `entry_date` = #{entry_date,jdbcType=TIMESTAMP},
+            </if>
+            <if test="p_code != null">
+                `p_code` = #{p_code,jdbcType=VARCHAR},
+            </if>
+            <if test="fb_customer_name != null">
+                `fb_customer_name` = #{fb_customer_name,jdbcType=VARCHAR},
+            </if>
+            <if test="fb_wechat_number != null">
+                `fb_wechat_number` = #{fb_wechat_number,jdbcType=VARCHAR},
+            </if>
+            <if test="edc_date != null">
+                `edc_date` = #{edc_date,jdbcType=TIMESTAMP},
+            </if>
+            <if test="fb_remarks != null">
+                `fb_remarks` = #{fb_remarks,jdbcType=VARCHAR},
+            </if>
+            <if test="it_on != null">
+                `it_on` = #{it_on,jdbcType=VARCHAR},
+            </if>
+            <if test="convenient_time != null">
+                `convenient_time` = #{convenient_time,jdbcType=VARCHAR},
+            </if>
+            <if test="communication_content != null">
+                `communication_content` = #{communication_content,jdbcType=VARCHAR},
+            </if>
+            <if test="user_feedback != null">
+                `user_feedback` = #{user_feedback,jdbcType=VARCHAR},
+            </if>
+            <if test="store != null">
+                `store` = #{store,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where `id` = #{id,jdbcType=INTEGER}
+    </update>
+
+    <insert id="insertInfoFeedbackList">
+        insert into customer_info_feedback (fb_date, source_channel, fb_customer_phone, branche_name, fb_type, create_person, in_charge_person, customer_manager, entry_date, p_code, fb_customer_name, fb_wechat_number, edc_date, fb_remarks, it_on, convenient_time, communication_content, user_feedback, store)
+        values
+        <foreach collection="list" item="item" separator=",">
+         (#{item.fb_date}, #{item.source_channel}, #{item.fb_customer_phone}, #{item.branche_name}, #{item.fb_type}, #{item.create_person}, #{item.in_charge_person}, #{item.customer_manager}, #{item.entry_date}, #{item.p_code}, #{item.fb_customer_name}, #{item.fb_wechat_number}, #{item.edc_date}, #{item.fb_remarks}, #{item.it_on}, #{item.convenient_time}, #{item.communication_content}, #{item.user_feedback}, #{item.store})
+        </foreach>
+    </insert>
+
+</mapper>

+ 250 - 0
src/main/resources/mybatis/mapper/customer/CustomerInfoFollowMapper.xml

@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ygj.yuemum.dao.customer.CustomerInfoFollowMapper">
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.customer.CustomerInfoFollow" >
+        <result column="id" property="id" />
+        <result column="create_date" property="create_date" />
+        <result column="follow_mehtod" property="follow_mehtod" />
+        <result column="fb_customer_name" property="fb_customer_name" />
+        <result column="fb_customer_phone" property="fb_customer_phone" />
+        <result column="source_channel" property="source_channel" />
+        <result column="edc_date" property="edc_date" />
+        <result column="follow_state" property="follow_state" />
+        <result column="address" property="address" />
+        <result column="follow_desc" property="follow_desc" />
+        <result column="photos" property="photos" />
+        <result column="next_follow_date" property="next_follow_date" />
+        <result column="create_person" property="create_person" />
+        <result column="fb_date" property="fb_date" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+                id,
+                create_date,
+                follow_mehtod,
+                fb_customer_name,
+                fb_customer_phone,
+                source_channel,
+                edc_date,
+                follow_state,
+                address,
+                follow_desc,
+                photos,
+                next_follow_date,
+                create_person,
+                fb_date
+    </sql>
+
+    <insert id="insert" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoFollow">
+        INSERT INTO customer_info_follow
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test ='null != create_date'>
+                create_date,
+            </if>
+            <if test ='null != follow_mehtod'>
+                follow_mehtod,
+            </if>
+            <if test ='null != fb_customer_name'>
+                fb_customer_name,
+            </if>
+            <if test ='null != fb_customer_phone'>
+                fb_customer_phone,
+            </if>
+            <if test ='null != source_channel'>
+                source_channel,
+            </if>
+            <if test ='null != edc_date'>
+                edc_date,
+            </if>
+            <if test ='null != follow_state'>
+                follow_state,
+            </if>
+            <if test ='null != address'>
+                address,
+            </if>
+            <if test ='null != follow_desc'>
+                follow_desc,
+            </if>
+            <if test ='null != photos'>
+                photos,
+            </if>
+            <if test ='null != next_follow_date'>
+                next_follow_date,
+            </if>
+            <if test ='null != create_person'>
+                create_person,
+            </if>
+            <if test ='null != fb_date'>
+                fb_date
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test ='null != create_date'>
+                #{create_date},
+            </if>
+            <if test ='null != follow_mehtod'>
+                #{follow_mehtod},
+            </if>
+            <if test ='null != fb_customer_name'>
+                #{fb_customer_name},
+            </if>
+            <if test ='null != fb_customer_phone'>
+                #{fb_customer_phone},
+            </if>
+            <if test ='null != source_channel'>
+                #{source_channel},
+            </if>
+            <if test ='null != edc_date'>
+                #{edc_date},
+            </if>
+            <if test ='null != follow_state'>
+                #{follow_state},
+            </if>
+            <if test ='null != address'>
+                #{address},
+            </if>
+            <if test ='null != follow_desc'>
+                #{follow_desc},
+            </if>
+            <if test ='null != photos'>
+                #{photos},
+            </if>
+            <if test ='null != next_follow_date'>
+                #{next_follow_date},
+            </if>
+            <if test ='null != create_person'>
+                #{create_person},
+            </if>
+            <if test ='null != fb_date'>
+                #{fb_date}
+            </if>
+        </trim>
+    </insert>
+
+    <delete id="delete" >
+        DELETE FROM customer_info_follow
+        WHERE id = #{id}
+    </delete>
+
+    <update id="update" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoFollow">
+        UPDATE customer_info_follow
+        <set>
+            <if test ='null != create_date'>create_date = #{create_date},</if>
+            <if test ='null != follow_mehtod'>follow_mehtod = #{follow_mehtod},</if>
+            <if test ='null != fb_customer_name'>fb_customer_name = #{fb_customer_name},</if>
+            <if test ='null != fb_customer_phone'>fb_customer_phone = #{fb_customer_phone},</if>
+            <if test ='null != source_channel'>source_channel = #{source_channel},</if>
+            <if test ='null != edc_date'>edc_date = #{edc_date},</if>
+            <if test ='null != follow_state'>follow_state = #{follow_state},</if>
+            <if test ='null != address'>address = #{address},</if>
+            <if test ='null != follow_desc'>follow_desc = #{follow_desc},</if>
+            <if test ='null != photos'>photos = #{photos},</if>
+            <if test ='null != next_follow_date'>next_follow_date = #{next_follow_date},</if>
+            <if test ='null != create_person'>create_person = #{create_person},</if>
+            <if test ='null != fb_date'>fb_date = #{fb_date}</if>
+        </set>
+        WHERE id = #{id}
+    </update>
+
+
+    <select id="load" resultMap="BaseResultMap">
+        SELECT <include refid="Base_Column_List" />
+        FROM customer_info_follow
+        WHERE id = #{id}
+    </select>
+
+    <select id="pageList" resultMap="BaseResultMap">
+        SELECT <include refid="Base_Column_List" />
+        FROM customer_info_follow
+        LIMIT #{offset}, #{pageSize}
+    </select>
+
+    <select id="pageListCount" resultType="java.lang.Integer">
+        SELECT count(1)
+        FROM customer_info_follow
+    </select>
+
+    <!--获取所有数据-->
+    <select id="selectByPageNumSize" resultType="com.ygj.yuemum.domain.customer.CustomerInfoFollow" parameterType="com.ygj.yuemum.domain.customer.dto.CustomerInfoFollowDto">
+        SELECT
+        id,
+        create_date,
+        follow_mehtod,
+        fb_customer_name,
+        fb_customer_phone,
+        source_channel,
+        edc_date,
+        follow_state,
+        address,
+        follow_desc,
+        photos,
+        next_follow_date,
+        create_person,
+        fb_date
+        FROM
+        customer_info_follow
+        where 1=1
+        <if test="id != null and id !=''">
+            and id = #{id}
+        </if>
+        <if test="start_fb_date != null and start_fb_date !=''">
+            and fb_Date &gt;= #{start_fb_date}
+        </if>
+        <if test="end_fb_date != null and end_fb_date !=''">
+            and fb_Date &lt; #{end_fb_date}
+        </if>
+        <if test="follow_state != null and follow_state !=''">
+            and follow_state like "%"#{follow_state,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="fb_customer_phone != null and fb_customer_phone !=''">
+            and fb_customer_phone like "%"#{fb_customer_phone,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="create_person != null ">
+            and create_person in
+            <foreach collection="create_person" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        order by id desc
+    </select>
+
+    <insert id="insertInfoFollowList">
+        INSERT INTO customer_info_follow
+                (
+                create_date,
+                follow_mehtod,
+                fb_customer_name,
+                fb_customer_phone,
+                source_channel,
+                edc_date,
+                follow_state,
+                address,
+                follow_desc,
+                photos,
+                next_follow_date,
+                create_person,
+                fb_date
+                )
+        VALUES
+        <foreach collection="list" item="item" separator=",">
+                (
+                #{item.create_date},
+                #{item.follow_mehtod},
+                #{item.fb_customer_name},
+                #{item.fb_customer_phone},
+                #{item.source_channel},
+                #{item.edc_date},
+                #{item.follow_state},
+                #{item.address},
+                #{item.follow_desc},
+                #{item.photos},
+                #{item.next_follow_date},
+                #{item.create_person},
+                #{item.fb_date}
+                )
+        </foreach>
+    </insert>
+
+</mapper>

+ 105 - 0
src/main/resources/mybatis/mapper/customer/CustomerInfoStateMapper.xml

@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ygj.yuemum.dao.customer.CustomerInfoStateMapper">
+  <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.customer.CustomerInfoState">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="customer_state" jdbcType="VARCHAR" property="customer_state" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    `id`, `customer_state`
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from customer_info_state
+    where `id` = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    delete from customer_info_state
+    where `id` = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoState">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    insert into customer_info_state (`id`, `customer_state`)
+    values (#{id,jdbcType=INTEGER}, #{customer_state,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoState">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    insert into customer_info_state
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        `id`,
+      </if>
+      <if test="customer_state != null">
+        `customer_state`,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="customer_state != null">
+        #{customer_state,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoState">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    update customer_info_state
+    <set>
+      <if test="customer_state != null">
+        `customer_state` = #{customer_state,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where `id` = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoState">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    update customer_info_state
+    set `customer_state` = #{customer_state,jdbcType=VARCHAR}
+    where `id` = #{id,jdbcType=INTEGER}
+  </update>
+
+  <select id="selectAll" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+
+    select
+    <include refid="Base_Column_List" />
+    from customer_info_state
+  </select>
+</mapper>

+ 14 - 0
src/main/resources/mybatis/mapper/customer/CustomerSourceChannelMapper.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ygj.yuemum.dao.customer.CustomerSourceChannelDao" >
+
+    <!--获取所有数据-->
+    <select id="getAllSourceChannel" resultType="com.ygj.yuemum.domain.customer.CustomerSourceChannel" >
+        SELECT
+            id,
+            source_channel
+        FROM
+            customer_source_channel
+    </select>
+
+</mapper>

+ 40 - 0
src/test/java/com/ygj/yuemum/chuanyun/CyScheduledTest.java

@@ -0,0 +1,40 @@
+package com.ygj.yuemum.chuanyun;
+
+import com.ygj.yuemum.component.CyScheduled;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class CyScheduledTest {
+
+    private final int base = 500;
+
+    @Autowired
+    CyScheduled cyScheduled;
+
+    @Test
+    public void testInitCustomerInfoFeedback() {
+        for (int i = 30; i >= 0; i--) {
+            cyScheduled.initCustomerInfoFeedback(i * base, (i + 1) * base);
+        }
+    }
+
+    @Test
+    public void testInitCustomerInfoBasic() {
+        for (int i = 9; i >= 0; i--) {
+            cyScheduled.initCustomerInfoBasic(i * base, (i + 1) * base);
+        }
+    }
+
+    @Test
+    public void testInitCustomerInfoFollow() {
+        for (int i = 9; i >= 0; i--) {
+            cyScheduled.initCustomerInfoFollow(i * base, (i + 1) * base);
+        }
+    }
+
+}

+ 18 - 0
src/test/java/com/ygj/yuemum/chuanyun/ScheduledServiceTest.java

@@ -0,0 +1,18 @@
+package com.ygj.yuemum.chuanyun;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ygj.yuemum.service.scheduled.CYScheduledService;
+import org.junit.Test;
+
+public class ScheduledServiceTest {
+
+    @Test
+    public void testListFormData() throws Exception {
+        CYScheduledService scheduledService = new CYScheduledService();
+        JSONObject jsonObject = scheduledService.listFormData("ae483ce1607kh089", "aDKyV5OYQa7HMv4qWvqH8bAlXxmzD3bQK2/klBFoHlu6XHRxh7Q2lg==",
+                "twjff2zg1n2lwdrfkwbqnqne5", 0, 1);
+        String strResult = jsonObject.toJSONString();
+        System.out.println(strResult);
+    }
+
+}

+ 128 - 0
src/test/java/com/ygj/yuemum/chuanyun/ScheduledSingleServiceTest.java

@@ -0,0 +1,128 @@
+package com.ygj.yuemum.chuanyun;
+
+import com.alibaba.fastjson.JSONObject;
+import com.google.gson.Gson;
+import com.ygj.yuemum.utils.HttpUtils;
+import com.ygj.yuemum.utils.OssService;
+import org.apache.http.HttpResponse;
+import org.apache.http.util.EntityUtils;
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ScheduledSingleServiceTest {
+
+    @Test
+    public void testLoadObjects() throws Exception {
+        Map<String, String> paramMap = new HashMap();
+
+        paramMap.put("ActionName",   "LoadBizObjects");
+
+        paramMap.put("SchemaCode", "e3i1ixenjat08xho5hy3zp2c4");
+
+        paramMap.put("Filter","{\"FromRowNum\":   0,\"RequireCount\": false,\"ReturnItems\": [],   " +
+                "\"SortByCollection\": [],\"ToRowNum\": 500,   \"Matcher\": { \"Type\": \"And\",   \"Matchers\": []}}");
+       //身份认证参数
+
+        Map headers = new HashMap();
+
+        headers.put("EngineCode","ae483ce1607kh089");
+
+        headers.put("EngineSecret","aDKyV5OYQa7HMv4qWvqH8bAlXxmzD3bQK2/klBFoHlu6XHRxh7Q2lg==");
+
+
+
+        Gson gson = new Gson();
+
+        HttpResponse result = HttpUtils.doPost("https://www.h3yun.com", "/OpenApi/Invoke", headers, null, gson.toJson(paramMap));
+
+        String strResult = EntityUtils.toString(result.getEntity());
+
+        JSONObject jsonObject = JSONObject.parseObject(strResult);
+
+        System.out.println(strResult);
+
+    }
+
+
+    @Test
+    public void testLoadObject() throws Exception {
+        Map<String, String> paramMap = new HashMap();
+
+        paramMap.put("ActionName",   "LoadBizObject");
+
+        paramMap.put("SchemaCode", "vjtps9qhb4pvp6anvltj3mbz1");
+
+        paramMap.put("BizObjectId", "b0f47e15-7327-4b8c-9df1-975140d8fc84");
+
+        //身份认证参数
+        Map headers = new HashMap();
+
+        headers.put("EngineCode","ae483ce1607kh089");
+
+        headers.put("EngineSecret","aDKyV5OYQa7HMv4qWvqH8bAlXxmzD3bQK2/klBFoHlu6XHRxh7Q2lg==");
+
+
+
+        Gson gson = new Gson();
+
+        HttpResponse result = HttpUtils.doPost("https://www.h3yun.com", "/OpenApi/Invoke", headers, null, gson.toJson(paramMap));
+
+        String strResult = EntityUtils.toString(result.getEntity());
+
+        JSONObject jsonObject = JSONObject.parseObject(strResult);
+
+        System.out.println(strResult);
+    }
+
+    @Test
+    public void testPhotoObject() throws Exception {
+        OssService ossService = new OssService();
+
+        System.out.println("开始时间戳:  " + System.currentTimeMillis());
+        Map<String, String> paramMap = new HashMap();
+
+        paramMap.put("attachmentId",   "25274e9f-6a2b-4d1e-a181-af9d1d47fb87");
+
+        paramMap.put("EngineCode", "ae483ce1607kh089");
+
+        //身份认证参数
+        Map headers = new HashMap();
+
+        headers.put("EngineCode","ae483ce1607kh089");
+
+        headers.put("EngineSecret","aDKyV5OYQa7HMv4qWvqH8bAlXxmzD3bQK2/klBFoHlu6XHRxh7Q2lg==");
+
+        Gson gson = new Gson();
+
+        HttpResponse result = HttpUtils.doPost("https://www.h3yun.com", "/Api/DownloadBizObjectFile", headers, paramMap, "");
+
+//        String strResult = EntityUtils.toString();
+        OssService.UploadDto uploadDto = ossService.upload(result.getEntity().getContent(), "test", "1.jpg", result.getEntity().getContentLength());
+
+        System.out.println(uploadDto.toString());
+
+        System.out.println("结束时间戳:  " + System.currentTimeMillis());
+
+
+//        File dest = new File("D:\\" ,  "1.jpg");
+
+//        InputStream is = result.getEntity().getContent();
+//
+//        dest.getParentFile().mkdirs();
+//        FileOutputStream fileout = new FileOutputStream(dest);
+//        /**
+//         * 根据实际运行效果 设置缓冲区大小
+//         */
+//        byte[] buffer=new byte[1024];
+//        int ch = 0;
+//        while ((ch = is.read(buffer)) != -1) {
+//            fileout.write(buffer,0,ch);
+//        }
+//        is.close();
+//        fileout.flush();
+//        fileout.close();
+    }
+
+}

+ 116 - 0
src/test/java/com/ygj/yuemum/client/HttpClientUtil.java

@@ -0,0 +1,116 @@
+package com.ygj.yuemum.client;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import org.apache.commons.lang.StringUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+import springfox.documentation.spring.web.json.Json;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class HttpClientUtil {
+
+    protected final static String DEFAULT_USERNAME = "admin";
+
+    protected final static String DEFAULT_PASSWORD = "e19d5cd5af0378da05f63f891c7467af";
+
+    protected final static String DEFAULT_URL = "http://localhost:8888/";
+
+    public static String post(String url , Map<String, String> params){
+        try {
+            String jsonObject = postByToken(url, params, getToken(), true);
+            return jsonObject;
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        return new String();
+    }
+
+    public static String get(String url, Map<String, String> params) {
+        try {
+            String jsonObject = getByToken(url, params);
+            return jsonObject;
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        return new String();
+    }
+
+    private static String getByToken(String url, Map<String, String> params) throws IOException {
+        CloseableHttpClient httpclient = HttpClients.createDefault();
+        HttpGet httpGet = new HttpGet(DEFAULT_URL + url);
+        httpGet.setHeader("JSESSIONID", getToken());
+        CloseableHttpResponse response1 = httpclient.execute(httpGet);
+
+        try {
+            HttpEntity entity1 = response1.getEntity();
+            // do something useful with the response body
+            // and ensure it is fully consumed
+            String jsonObject = EntityUtils.toString(entity1, "UTF-8");
+            EntityUtils.consume(entity1);
+            return jsonObject;
+        } finally {
+            response1.close();
+        }
+    }
+
+    private static String postNoToken(String url,Map<String,String> params) throws IOException {
+        return postByToken(url, params, null, false);
+    }
+
+    private static String postByToken(String url, Map<String,String> params, String token, boolean isJson) throws IOException {
+        CloseableHttpClient httpclient = HttpClients.createDefault();
+
+        HttpPost httpPost = new HttpPost(DEFAULT_URL + url);
+        List<NameValuePair> nvps = new ArrayList<>();
+        if (params != null) {
+            params.forEach((k, v) -> nvps.add(new BasicNameValuePair(k, v)));
+        }
+        if (isJson) {
+            httpPost.setHeader("Content-Type", "application/json");
+            httpPost.setEntity(new StringEntity(JSON.toJSONString(params)));
+        } else {
+            httpPost.setEntity(new UrlEncodedFormEntity(nvps));
+        }
+        httpPost.setHeader("Accept", "application/json, text/plain, */*");
+        if (StringUtils.isNotBlank(token)) {
+            httpPost.setHeader("JSESSIONID", token);
+        }
+        CloseableHttpResponse response2 = httpclient.execute(httpPost);
+
+        try {
+            System.out.println(response2.getStatusLine());
+            HttpEntity entity2 = response2.getEntity();
+            String jsonObject = EntityUtils.toString(entity2, "UTF-8");
+            EntityUtils.consume(entity2);
+            return jsonObject;
+        } finally {
+            response2.close();
+        }
+    }
+
+
+    private static String getToken() throws IOException {
+        Map<String, String> params = new HashMap<>();
+        params.put("username", DEFAULT_USERNAME);
+        params.put("password", DEFAULT_PASSWORD);
+        params.put("pwd", "abcd1234");
+        params.put("rememberMe", "false");
+        JSONObject jsonObject = JSON.parseObject(postNoToken("login", params));
+        return (String) jsonObject.get("token");
+    }
+}

+ 43 - 0
src/test/java/com/ygj/yuemum/customers/CustomerSourceChannelTest.java

@@ -0,0 +1,43 @@
+package com.ygj.yuemum.customers;
+
+import com.alibaba.fastjson.JSON;
+import com.ygj.yuemum.client.HttpClientUtil;
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class CustomerSourceChannelTest {
+
+    @Test
+    public void testCustomerSourceChannel() {
+        String str = HttpClientUtil.get("/source/channel", null);
+        System.out.println(str);
+    }
+
+    @Test
+    public void testSelectByPageNumSize() {
+        Map<String, String> param = new HashMap<>();
+        param.put("pageNum", "1");
+        param.put("pageSize", "11");
+        param.put("branche_name", "1");
+        param.put("fb_type", "1");
+        String str = HttpClientUtil.post("/info/feedback", param);
+        System.out.println(JSON.toJSONString(param));
+        System.out.println(str);
+    }
+
+    @Test
+    public void testInsertFeedback() {
+        Map<String, String> param = new HashMap<>();
+        param.put("pageNum", "1");
+        param.put("pageSize", "11");
+        param.put("branche_name", "1");
+        param.put("fb_type", "1");
+        String str = HttpClientUtil.post("/info/feedback/insert", param);
+        System.out.println(JSON.toJSONString(param));
+        System.out.println(str);
+    }
+
+
+}