Explorar o código

1、数据处理

lqh hai 1 ano
pai
achega
dc5610d550

+ 68 - 0
hx-customer/src/main/java/com/fjhx/customer/controller/xiaoman/XiaomanCustomerInfoJsonController.java

@@ -0,0 +1,68 @@
+package com.fjhx.customer.controller.xiaoman;
+
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.customer.entity.xiaoman.vo.XiaomanCustomerInfoJsonVo;
+import com.fjhx.customer.entity.xiaoman.dto.XiaomanCustomerInfoJsonSelectDto;
+import com.fjhx.customer.entity.xiaoman.dto.XiaomanCustomerInfoJsonDto;
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import com.fjhx.customer.service.xiaoman.XiaomanCustomerInfoJsonService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+/**
+ * <p>
+ * 小满客户详情表 前端控制器
+ * </p>
+ *
+ * @author lqh
+ * @since 2024-04-06
+ */
+@RestController
+@RequestMapping("/xiaomanCustomerInfoJson")
+public class XiaomanCustomerInfoJsonController {
+
+    @Autowired
+    private XiaomanCustomerInfoJsonService xiaomanCustomerInfoJsonService;
+
+    /**
+     * 小满客户详情表分页
+     */
+    @PostMapping("/page")
+    public Page<XiaomanCustomerInfoJsonVo> page(@RequestBody XiaomanCustomerInfoJsonSelectDto dto) {
+        return xiaomanCustomerInfoJsonService.getPage(dto);
+    }
+
+    /**
+     * 小满客户详情表明细
+     */
+    @PostMapping("/detail")
+    public XiaomanCustomerInfoJsonVo detail(@RequestBody BaseSelectDto dto) {
+        return xiaomanCustomerInfoJsonService.detail(dto.getId());
+    }
+
+    /**
+     * 小满客户详情表新增
+     */
+    @PostMapping("/add")
+    public void add(@RequestBody XiaomanCustomerInfoJsonDto xiaomanCustomerInfoJsonDto) {
+        xiaomanCustomerInfoJsonService.add(xiaomanCustomerInfoJsonDto);
+    }
+
+    /**
+     * 小满客户详情表编辑
+     */
+    @PostMapping("/edit")
+    public void edit(@RequestBody XiaomanCustomerInfoJsonDto xiaomanCustomerInfoJsonDto) {
+        xiaomanCustomerInfoJsonService.edit(xiaomanCustomerInfoJsonDto);
+    }
+
+    /**
+     * 小满客户详情表删除
+     */
+    @PostMapping("/delete")
+    public void delete(@RequestBody BaseSelectDto dto) {
+        xiaomanCustomerInfoJsonService.delete(dto.getId());
+    }
+
+}

+ 17 - 0
hx-customer/src/main/java/com/fjhx/customer/entity/xiaoman/dto/XiaomanCustomerInfoJsonDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.customer.entity.xiaoman.dto;
+
+import com.fjhx.customer.entity.xiaoman.po.XiaomanCustomerInfoJson;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 小满客户详情表新增编辑入参实体
+ *
+ * @author lqh
+ * @since 2024-04-06
+ */
+@Getter
+@Setter
+public class XiaomanCustomerInfoJsonDto extends XiaomanCustomerInfoJson {
+
+}

+ 17 - 0
hx-customer/src/main/java/com/fjhx/customer/entity/xiaoman/dto/XiaomanCustomerInfoJsonSelectDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.customer.entity.xiaoman.dto;
+
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 小满客户详情表列表查询入参实体
+ *
+ * @author lqh
+ * @since 2024-04-06
+ */
+@Getter
+@Setter
+public class XiaomanCustomerInfoJsonSelectDto extends BaseSelectDto {
+
+}

+ 31 - 0
hx-customer/src/main/java/com/fjhx/customer/entity/xiaoman/po/XiaomanCustomerInfoJson.java

@@ -0,0 +1,31 @@
+package com.fjhx.customer.entity.xiaoman.po;
+
+import com.ruoyi.common.core.domain.BaseIdPo;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 小满客户详情表
+ * </p>
+ *
+ * @author lqh
+ * @since 2024-04-06
+ */
+@Getter
+@Setter
+@TableName("xiaoman_customer_info_json")
+public class XiaomanCustomerInfoJson extends BaseIdPo {
+
+    /**
+     * 公司客户ID
+     */
+    private Long companyId;
+
+    /**
+     * 公司客户详情
+     */
+    private String json;
+
+}

+ 17 - 0
hx-customer/src/main/java/com/fjhx/customer/entity/xiaoman/vo/XiaomanCustomerInfoJsonVo.java

@@ -0,0 +1,17 @@
+package com.fjhx.customer.entity.xiaoman.vo;
+
+import com.fjhx.customer.entity.xiaoman.po.XiaomanCustomerInfoJson;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 小满客户详情表列表查询返回值实体
+ *
+ * @author lqh
+ * @since 2024-04-06
+ */
+@Getter
+@Setter
+public class XiaomanCustomerInfoJsonVo extends XiaomanCustomerInfoJson {
+
+}

+ 319 - 0
hx-customer/src/main/java/com/fjhx/customer/handle/ccc.json

@@ -0,0 +1,319 @@
+{
+  "code": 200,
+  "message": "success",
+  "now": "2024-04-06 20:48:31",
+  "data": {
+    "company_id": 18846628768390,
+    "short_name": "",
+    "name": "CLP Trading GmbH",
+    "category_ids": [],
+    "serial_id": "86795",
+    "archive_time": "2024-04-05 17:39:53",
+    "owner": [
+      {
+        "user_id": "56322068",
+        "avatar": "https://v4client.oss-cn-hangzhou.aliyuncs.com/other/img/56322068/1a2df65fa32a4ee0a6b637c0ca6b3f4b29582e092cbd79b9a49536ccb82fa3fe.png",
+        "name": "Cici",
+        "nickname": "Cici"
+      }
+    ],
+    "archive_type": 4,
+    "country": "DE",
+    "biz_type": "",
+    "last_owner_info": {
+      "nickname": "无",
+      "user_id": 0,
+      "avatar": ""
+    },
+    "private_time": "2024-04-05 17:39:57",
+    "public_time": "",
+    "intention_level": 0,
+    "annual_procurement": 0,
+    "province": "",
+    "city": "",
+    "timezone": "1",
+    "scale_id": 0,
+    "star": 0,
+    "group_id": 0,
+    "trail_status": {
+      "status_id": "0",
+      "status_name": "无",
+      "status_color": "#cccccc"
+    },
+    "origin": 404,
+    "origin_list": [
+      404
+    ],
+    "origin_name": "TM咨询",
+    "homepage": "",
+    "fax": "",
+    "tel": [
+      "",
+      ""
+    ],
+    "tel_area_code": "",
+    "address": "",
+    "remark": "",
+    "image_list": [],
+    "next_follow_up_time": "",
+    "create_user": 56322068,
+    "create_time": "2024-04-05 17:39:57",
+    "last_edit_user": "56321852",
+    "update_time": "2024-04-06 18:23:46",
+    "tag": [],
+    "product_group_ids": [],
+    "release_count": 0,
+    "public_type": 0,
+    "edit_time": "2024-04-06 18:23:46",
+    "main_lead_id": 0,
+    "order_time": "2024-04-05 17:49:05",
+    "recent_follow_up_time": "2024-04-05 17:49:06",
+    "client_tag_list": [],
+    "pool_user_map": [],
+    "company": [
+      {
+        "group_id": 1,
+        "name": "基本信息",
+        "fields": [
+          {
+            "id": "name",
+            "name": "公司名称",
+            "field_type": "1",
+            "value": "CLP Trading GmbH"
+          },
+          {
+            "id": "short_name",
+            "name": "简称",
+            "field_type": "1",
+            "value": ""
+          },
+          {
+            "id": "origin_list",
+            "name": "客户来源",
+            "field_type": "7",
+            "value": [
+              "TM咨询"
+            ]
+          },
+          {
+            "id": "origin",
+            "name": "客户来源",
+            "field_type": 3,
+            "value": "TM咨询"
+          }
+        ]
+      },
+      {
+        "group_id": 2,
+        "name": "特征信息",
+        "fields": [
+          {
+            "id": "biz_type",
+            "name": "客户类型",
+            "field_type": "3",
+            "value": ""
+          },
+          {
+            "id": "annual_procurement",
+            "name": "年采购额",
+            "field_type": "3",
+            "value": 0
+          },
+          {
+            "id": "country",
+            "name": "国家地区",
+            "field_type": "3",
+            "value": "DE"
+          },
+          {
+            "id": "intention_level",
+            "name": "采购意向",
+            "field_type": "3",
+            "value": 0
+          },
+          {
+            "id": "province",
+            "name": "省份",
+            "field_type": "3",
+            "value": ""
+          },
+          {
+            "id": "timezone",
+            "name": "时区",
+            "field_type": "3",
+            "value": "1"
+          },
+          {
+            "id": "city",
+            "name": "城市",
+            "field_type": "3",
+            "value": ""
+          },
+          {
+            "id": "scale_id",
+            "name": "规模",
+            "field_type": "3",
+            "value": 0
+          }
+        ]
+      },
+      {
+        "group_id": 3,
+        "name": "管理信息",
+        "fields": [
+          {
+            "id": "trail_status",
+            "name": "客户阶段",
+            "field_type": "3",
+            "value": "无"
+          }
+        ]
+      },
+      {
+        "group_id": 4,
+        "name": "联系信息",
+        "fields": [
+          {
+            "id": "homepage",
+            "name": "公司网址",
+            "field_type": "1",
+            "value": ""
+          },
+          {
+            "id": "fax",
+            "name": "传真",
+            "field_type": "1",
+            "value": ""
+          },
+          {
+            "id": "tel",
+            "name": "座机",
+            "field_type": "1",
+            "value": {
+              "tel_area_code": "",
+              "tel": ""
+            }
+          },
+          {
+            "id": "address",
+            "name": "详细地址",
+            "field_type": "2",
+            "value": ""
+          }
+        ]
+      },
+      {
+        "group_id": 5,
+        "name": "其他信息",
+        "fields": [
+          {
+            "id": "remark",
+            "name": "公司备注",
+            "field_type": "2",
+            "value": ""
+          },
+          {
+            "id": "14200691088213",
+            "name": "餐厨用品",
+            "field_type": "3",
+            "value": ""
+          }
+        ]
+      }
+    ],
+    "lead": {
+      "main_lead_id": 0,
+      "lead_name": null
+    },
+    "customers": [
+      {
+        "customer_id": 18846628830511,
+        "company_id": 18846628768390,
+        "name": "Camon Ye",
+        "email": "",
+        "gender": 0,
+        "remark": "",
+        "birth": "",
+        "tel_list": [],
+        "post_grade": 1,
+        "post": "",
+        "image_list": "",
+        "contact": [],
+        "main_customer_flag": 1,
+        "external_field_data": []
+      }
+    ],
+    "alibaba_store_info": [
+      {
+        "store_id": "215261497",
+        "store_name": "福州尔泓商贸有限公司",
+        "enable_flag": "1",
+        "oauth_flag": "1",
+        "sync_customer_flag": "1"
+      }
+    ],
+    "source_detail": {
+      "alibaba_store_info": [
+        {
+          "store_id": "215261497",
+          "store_name": "福州尔泓商贸有限公司",
+          "enable_flag": "1",
+          "oauth_flag": "1",
+          "sync_customer_flag": "1"
+        }
+      ],
+      "site_info": []
+    },
+    "alibaba_relation_list": [
+      {
+        "store_id": 215261497,
+        "alibaba_company_name": "CLP Trading GmbH",
+        "owner_account_id": 251334597,
+        "detail_url": "https://alicrm.alibaba.com/#customerId=e0e701bc9084d1d2689c83a62f247a0e",
+        "company_id": 18846628768390,
+        "owner_info": {
+          "seller_account_id": "251334597",
+          "seller_email": "sale13@bridge-style.cc",
+          "enable_flag": "1",
+          "login_id": "cn1541175228pgco",
+          "first_name": "Cici",
+          "last_name": "Chen"
+        },
+        "last_owner_info": {
+          "seller_account_id": 0,
+          "seller_email": "",
+          "enable_flag": 0,
+          "first_name": "",
+          "last_name": "",
+          "login_id": ""
+        },
+        "company_info": {
+          "company_id": 18846628768390,
+          "name": "CLP Trading GmbH",
+          "serial_id": "86795",
+          "pool_id": 0,
+          "is_archive": 1,
+          "create_time": "2024-04-05 17:39:57",
+          "trail_status": 0,
+          "user_id": [
+            56322068
+          ],
+          "user_info": [
+            {
+              "user_id": "56322068",
+              "nickname": "Cici"
+            }
+          ]
+        },
+        "store_info": {
+          "store_id": "215261497",
+          "store_name": "福州尔泓商贸有限公司",
+          "delete_flag": false,
+          "exception": 0
+        }
+      }
+    ],
+    "deal_time": "",
+    "country_name": "德国"
+  }
+}

+ 26 - 0
hx-customer/src/main/java/com/fjhx/customer/mapper/xiaoman/XiaomanCustomerInfoJsonMapper.java

@@ -0,0 +1,26 @@
+package com.fjhx.customer.mapper.xiaoman;
+
+import com.fjhx.customer.entity.xiaoman.po.XiaomanCustomerInfoJson;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.customer.entity.xiaoman.vo.XiaomanCustomerInfoJsonVo;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.apache.ibatis.annotations.Param;
+
+
+/**
+ * <p>
+ * 小满客户详情表 Mapper 接口
+ * </p>
+ *
+ * @author lqh
+ * @since 2024-04-06
+ */
+public interface XiaomanCustomerInfoJsonMapper extends BaseMapper<XiaomanCustomerInfoJson> {
+
+    /**
+     * 小满客户详情表分页
+     */
+    Page<XiaomanCustomerInfoJsonVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<XiaomanCustomerInfoJson> wrapper);
+
+}

+ 46 - 0
hx-customer/src/main/java/com/fjhx/customer/service/xiaoman/XiaomanCustomerInfoJsonService.java

@@ -0,0 +1,46 @@
+package com.fjhx.customer.service.xiaoman;
+
+import com.fjhx.customer.entity.xiaoman.po.XiaomanCustomerInfoJson;
+import com.ruoyi.common.core.service.BaseService;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.customer.entity.xiaoman.vo.XiaomanCustomerInfoJsonVo;
+import com.fjhx.customer.entity.xiaoman.dto.XiaomanCustomerInfoJsonSelectDto;
+import com.fjhx.customer.entity.xiaoman.dto.XiaomanCustomerInfoJsonDto;
+
+
+/**
+ * <p>
+ * 小满客户详情表 服务类
+ * </p>
+ *
+ * @author lqh
+ * @since 2024-04-06
+ */
+public interface XiaomanCustomerInfoJsonService extends BaseService<XiaomanCustomerInfoJson> {
+
+    /**
+     * 小满客户详情表分页
+     */
+    Page<XiaomanCustomerInfoJsonVo> getPage(XiaomanCustomerInfoJsonSelectDto dto);
+
+    /**
+     * 小满客户详情表明细
+     */
+    XiaomanCustomerInfoJsonVo detail(Long id);
+
+    /**
+     * 小满客户详情表新增
+     */
+    void add(XiaomanCustomerInfoJsonDto xiaomanCustomerInfoJsonDto);
+
+    /**
+     * 小满客户详情表编辑
+     */
+    void edit(XiaomanCustomerInfoJsonDto xiaomanCustomerInfoJsonDto);
+
+    /**
+     * 小满客户详情表删除
+     */
+    void delete(Long id);
+
+}

+ 57 - 0
hx-customer/src/main/java/com/fjhx/customer/service/xiaoman/impl/XiaomanCustomerInfoJsonServiceImpl.java

@@ -0,0 +1,57 @@
+package com.fjhx.customer.service.xiaoman.impl;
+
+import com.fjhx.customer.entity.xiaoman.po.XiaomanCustomerInfoJson;
+import com.fjhx.customer.mapper.xiaoman.XiaomanCustomerInfoJsonMapper;
+import com.fjhx.customer.service.xiaoman.XiaomanCustomerInfoJsonService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.customer.entity.xiaoman.vo.XiaomanCustomerInfoJsonVo;
+import com.fjhx.customer.entity.xiaoman.dto.XiaomanCustomerInfoJsonSelectDto;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import com.fjhx.customer.entity.xiaoman.dto.XiaomanCustomerInfoJsonDto;
+import cn.hutool.core.bean.BeanUtil;
+
+
+/**
+ * <p>
+ * 小满客户详情表 服务实现类
+ * </p>
+ *
+ * @author lqh
+ * @since 2024-04-06
+ */
+@Service
+public class XiaomanCustomerInfoJsonServiceImpl extends ServiceImpl<XiaomanCustomerInfoJsonMapper, XiaomanCustomerInfoJson> implements XiaomanCustomerInfoJsonService {
+
+    @Override
+    public Page<XiaomanCustomerInfoJsonVo> getPage(XiaomanCustomerInfoJsonSelectDto dto) {
+        IWrapper<XiaomanCustomerInfoJson> wrapper = getWrapper();
+        wrapper.orderByDesc("xcij", XiaomanCustomerInfoJson::getId);
+        Page<XiaomanCustomerInfoJsonVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
+        return page;
+    }
+
+    @Override
+    public XiaomanCustomerInfoJsonVo detail(Long id) {
+        XiaomanCustomerInfoJson XiaomanCustomerInfoJson = this.getById(id);
+        XiaomanCustomerInfoJsonVo result = BeanUtil.toBean(XiaomanCustomerInfoJson, XiaomanCustomerInfoJsonVo.class);
+        return result;
+    }
+
+    @Override
+    public void add(XiaomanCustomerInfoJsonDto xiaomanCustomerInfoJsonDto) {
+        this.save(xiaomanCustomerInfoJsonDto);
+    }
+
+    @Override
+    public void edit(XiaomanCustomerInfoJsonDto xiaomanCustomerInfoJsonDto) {
+        this.updateById(xiaomanCustomerInfoJsonDto);
+    }
+
+    @Override
+    public void delete(Long id) {
+        this.removeById(id);
+    }
+
+}

+ 12 - 0
hx-customer/src/main/resources/mapper/xiaoman/XiaomanCustomerInfoJsonMapper.xml

@@ -0,0 +1,12 @@
+<?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.fjhx.customer.mapper.xiaoman.XiaomanCustomerInfoJsonMapper">
+    <select id="getPage" resultType="com.fjhx.customer.entity.xiaoman.vo.XiaomanCustomerInfoJsonVo">
+        select
+            xcij.company_id,
+            xcij.json
+        from xiaoman_customer_info_json xcij
+            ${ew.customSqlSegment}
+    </select>
+
+</mapper>