浏览代码

add 保单同步
add 保单同步配置页面

fengxiaolei 2 年之前
父节点
当前提交
950ea84297
共有 25 个文件被更改,包括 2428 次插入196 次删除
  1. 90 0
      product-center-manage-admin/src/main/resources/templates/policysynconf/add.html
  2. 72 0
      product-center-manage-admin/src/main/resources/templates/policysynconf/edit.html
  3. 140 0
      product-center-manage-admin/src/main/resources/templates/policysynconf/index.html
  4. 5 0
      product-center-manage-business/pom.xml
  5. 14 14
      product-center-manage-business/src/main/java/com/product/center/manage/controller/policysynconf/CenterPolicySynConfController.java
  6. 3 2
      product-center-manage-business/src/main/java/com/product/center/manage/controller/policysynconf/CenterPolicySynLogController.java
  7. 302 0
      product-center-manage-business/src/main/java/com/product/center/manage/domain/CenterOrderMain.java
  8. 207 0
      product-center-manage-business/src/main/java/com/product/center/manage/domain/CenterOrderPerson.java
  9. 21 81
      product-center-manage-business/src/main/java/com/product/center/manage/domain/CenterPolicySynConf.java
  10. 13 80
      product-center-manage-business/src/main/java/com/product/center/manage/domain/CenterPolicySynLog.java
  11. 27 0
      product-center-manage-business/src/main/java/com/product/center/manage/domain/GenSequenceId.java
  12. 64 0
      product-center-manage-business/src/main/java/com/product/center/manage/mapper/CenterOrderMainMapper.java
  13. 65 0
      product-center-manage-business/src/main/java/com/product/center/manage/mapper/CenterOrderPersonMapper.java
  14. 21 10
      product-center-manage-business/src/main/java/com/product/center/manage/service/impl/CenterPolicySynConfServiceImpl.java
  15. 3 3
      product-center-manage-business/src/main/java/com/product/center/manage/service/impl/CenterPolicySynLogServiceImpl.java
  16. 137 0
      product-center-manage-business/src/main/java/com/product/center/manage/service/impl/PolicySynServiceImpl.java
  17. 48 0
      product-center-manage-business/src/main/java/com/product/center/manage/utils/AesUtil.java
  18. 22 0
      product-center-manage-business/src/main/java/com/product/center/manage/utils/SequenceIdUtil.java
  19. 72 0
      product-center-manage-business/src/main/java/com/product/center/manage/utils/SignUtil.java
  20. 290 0
      product-center-manage-business/src/main/java/com/product/center/manage/vo/CenterOrderMainVo.java
  21. 446 0
      product-center-manage-business/src/main/resources/mapper/CenterOrderMainMapper.xml
  22. 277 0
      product-center-manage-business/src/main/resources/mapper/CenterOrderPersonMapper.xml
  23. 6 6
      product-center-manage-business/src/main/resources/mapper/CenterPolicySynConfMapper.xml
  24. 65 0
      product-center-manage-business/src/main/test/java/com/product/center/manage/TestMain.java
  25. 18 0
      product-center-manage-common/pom.xml

+ 90 - 0
product-center-manage-admin/src/main/resources/templates/policysynconf/add.html

@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('新增【请填写功能名称】')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-conf-add">
+            <div class="form-group">
+                <label class="col-sm-3 control-label">渠道:</label>
+                <div class="col-sm-8">
+                    <input name="channel" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">渠道同步url:</label>
+                <div class="col-sm-8">
+                    <input name="uri" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">配置别名称:</label>
+                <div class="col-sm-8">
+                    <input name="aliasName" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">上次同步保单表id:</label>
+                <div class="col-sm-8">
+                    <input name="lastSynPolicyId" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">aes加密key:</label>
+                <div class="col-sm-8">
+                    <input name="aesKey" class="form-control" type="text">
+                </div>
+            </div>
+
+            <div class="form-group">
+                <label class="col-sm-3 control-label">签名key:</label>
+                <div class="col-sm-8">
+                    <input id="signKey" name="signKey" class="form-control" type="text">
+                    <button class="btn btn-primary " type="button" onclick="generateUuid()"><i class="fa fa-check"></i>&nbsp;生成</button>
+                </div>
+            </div>
+
+            <div class="form-group">
+                <label class="col-sm-3 control-label">备注:</label>
+                <div class="col-sm-8">
+                    <input name="remark" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">开关:</label>
+                <div class="col-sm-8">
+                    <select class="form-control" name="isOpen">
+                        <option value="">--请选择--</option>
+                        <option value="0">关闭</option>
+                        <option value="1">开启</option>
+                    </select>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "policy-syn/conf"
+        $("#form-conf-add").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-conf-add').serialize());
+            }
+        }
+
+
+        function generateUuid(){
+            var uuid = 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+                var r = Math.random() * 16 | 0,
+                    v = c == 'x' ? r : (r & 0x3 | 0x8);
+                return v.toString(16);
+            });
+            $('#signKey').val(uuid)
+        }
+    </script>
+</body>
+</html>

+ 72 - 0
product-center-manage-admin/src/main/resources/templates/policysynconf/edit.html

@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('修改【请填写功能名称】')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-conf-edit" th:object="${centerPolicySynConf}">
+            <input name="id" th:field="*{id}" type="hidden">
+            <div class="form-group">
+                <label class="col-sm-3 control-label">渠道:</label>
+                <div class="col-sm-8">
+                    <input name="channel" th:field="*{channel}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">渠道同步url:</label>
+                <div class="col-sm-8">
+                    <input name="uri" th:field="*{uri}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">配置别名称:</label>
+                <div class="col-sm-8">
+                    <input name="aliasName" th:field="*{aliasName}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">上次同步保单表时间:</label>
+                <div class="col-sm-8">
+                    <input name="lastUpdateDate" th:field="*{lastSynPolicyId}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">aes加密key:</label>
+                <div class="col-sm-8">
+                    <input name="aesKey" th:field="*{aesKey}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">备注:</label>
+                <div class="col-sm-8">
+                    <input name="remark" th:field="*{remark}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">开关:</label>
+                <div class="col-sm-8">
+                    <select class="form-control" name="isOpen" th:field="*{isOpen}">
+                        <option value="">--请选择--</option>
+                        <option value="0">关闭</option>
+                        <option value="1">开启</option>
+                    </select>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "policy-syn/conf";
+        $("#form-conf-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/edit", $('#form-conf-edit').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 140 - 0
product-center-manage-admin/src/main/resources/templates/policysynconf/index.html

@@ -0,0 +1,140 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('【请填写功能名称】列表')" />
+</head>
+<body class="gray-bg">
+     <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formId">
+                    <div class="select-list">
+                        <ul>
+<!--                            <li>-->
+<!--                                <label>渠道:</label>-->
+<!--                                <input type="text" name="channel"/>-->
+<!--                            </li>-->
+<!--                            <li>-->
+<!--                                <label>渠道同步url:</label>-->
+<!--                                <input type="text" name="uri"/>-->
+<!--                            </li>-->
+                            <li>
+                                <label>配置别名称:</label>
+                                <input type="text" name="aliasName"/>
+                            </li>
+<!--                            <li>-->
+<!--                                <label>上次同步保单表时间:</label>-->
+<!--                                <input type="text" name="lastUpdateDate"/>-->
+<!--                            </li>-->
+<!--                            <li>-->
+<!--                                <label>aes加密key:</label>-->
+<!--                                <input type="text" name="aesKey"/>-->
+<!--                            </li>-->
+                            <li>
+                                <label>开关:</label>
+                                <input type="text" name="isOpen"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:conf:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:conf:edit">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:conf:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:conf:export">
+                    <i class="fa fa-download"></i> 导出
+                </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="bootstrap-table"></table>
+            </div>
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('system:conf:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('system:conf:remove')}]];
+        var prefix = ctx + "policy-syn/conf";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "【保单同步配置】",
+                columns: [{
+                    checkbox: true
+                },
+                {
+                    field: 'id',
+                    title: '主键',
+                    visible: false
+                },
+                {
+                    field: 'channel',
+                    title: '渠道'
+                },
+                {
+                    field: 'uri',
+                    title: '渠道同步url'
+                },
+                {
+                    field: 'aliasName',
+                    title: '配置别名称'
+                },
+                {
+                    field: 'lastSynPolicyId',
+                    title: '上次同步保单id'
+                },
+                {
+                    field: 'aesKey',
+                    title: 'aes加密key'
+                },
+                {
+                    field: 'signKey',
+                    title: '签名key'
+                },
+                {
+                    field: 'remark',
+                    title: '备注'
+                },
+                {
+                    field: 'isOpen',
+                    title: '开关',
+                    formatter: function(value, row, index) {
+                        if(1 === value){
+                            return '开启';
+                        }
+                        return '关闭';
+                    }
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                        return actions.join('');
+                    }
+                }]
+            };
+            $.table.init(options);
+        });
+    </script>
+</body>
+</html>

+ 5 - 0
product-center-manage-business/pom.xml

@@ -22,6 +22,11 @@
             <groupId>com.product.center.manage</groupId>
             <artifactId>product-center-manage-common</artifactId>
         </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
 
     </dependencies>
 

+ 14 - 14
product-center-manage-business/src/main/java/com/product/center/manage/controller/policysynconf/CenterPolicySynConfController.java

@@ -1,6 +1,9 @@
 package com.product.center.manage.controller.policysynconf;
 
 import java.util.List;
+
+import com.product.center.manage.domain.CenterPolicySynConf;
+import com.product.center.manage.service.ICenterPolicySynConfService;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -12,8 +15,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import com.product.center.manage.common.annotation.Log;
 import com.product.center.manage.common.enums.BusinessType;
-import com.product.center.manage.system.domain.CenterPolicySynConf;
-import com.product.center.manage.system.service.ICenterPolicySynConfService;
 import com.product.center.manage.common.core.controller.BaseController;
 import com.product.center.manage.common.core.domain.AjaxResult;
 import com.product.center.manage.common.utils.poi.ExcelUtil;
@@ -26,25 +27,25 @@ import com.product.center.manage.common.core.page.TableDataInfo;
  * @date 2022-09-22
  */
 @Controller
-@RequestMapping("/system/conf")
+@RequestMapping("/policy-syn/conf")
 public class CenterPolicySynConfController extends BaseController
 {
-    private String prefix = "system/conf";
+    private String prefix = "policysynconf";
 
     @Autowired
     private ICenterPolicySynConfService centerPolicySynConfService;
 
-    @RequiresPermissions("system:conf:view")
+    @RequiresPermissions("policy-syn:conf:view")
     @GetMapping()
     public String conf()
     {
-        return prefix + "/conf";
+        return prefix + "/index";
     }
 
     /**
      * 查询【请填写功能名称】列表
      */
-    @RequiresPermissions("system:conf:list")
+    @RequiresPermissions("policy-syn:conf:list")
     @PostMapping("/list")
     @ResponseBody
     public TableDataInfo list(CenterPolicySynConf centerPolicySynConf)
@@ -57,7 +58,7 @@ public class CenterPolicySynConfController extends BaseController
     /**
      * 导出【请填写功能名称】列表
      */
-    @RequiresPermissions("system:conf:export")
+    @RequiresPermissions("policy-syn:conf:export")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     @ResponseBody
@@ -80,19 +81,18 @@ public class CenterPolicySynConfController extends BaseController
     /**
      * 新增保存【请填写功能名称】
      */
-    @RequiresPermissions("system:conf:add")
+    @RequiresPermissions("policy-syn:conf:add")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
     @PostMapping("/add")
     @ResponseBody
-    public AjaxResult addSave(CenterPolicySynConf centerPolicySynConf)
-    {
+    public AjaxResult addSave(CenterPolicySynConf centerPolicySynConf) {
         return toAjax(centerPolicySynConfService.insertCenterPolicySynConf(centerPolicySynConf));
     }
 
     /**
      * 修改【请填写功能名称】
      */
-    @RequiresPermissions("system:conf:edit")
+    @RequiresPermissions("policy-syn:conf:edit")
     @GetMapping("/edit/{id}")
     public String edit(@PathVariable("id") Long id, ModelMap mmap)
     {
@@ -104,7 +104,7 @@ public class CenterPolicySynConfController extends BaseController
     /**
      * 修改保存【请填写功能名称】
      */
-    @RequiresPermissions("system:conf:edit")
+    @RequiresPermissions("policy-syn:conf:edit")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
     @PostMapping("/edit")
     @ResponseBody
@@ -116,7 +116,7 @@ public class CenterPolicySynConfController extends BaseController
     /**
      * 删除【请填写功能名称】
      */
-    @RequiresPermissions("system:conf:remove")
+    @RequiresPermissions("policy-syn:conf:remove")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
     @PostMapping( "/remove")
     @ResponseBody

+ 3 - 2
product-center-manage-business/src/main/java/com/product/center/manage/controller/policysynconf/CenterPolicySynLogController.java

@@ -1,6 +1,9 @@
 package com.product.center.manage.controller.policysynconf;
 
 import java.util.List;
+
+import com.product.center.manage.domain.CenterPolicySynLog;
+import com.product.center.manage.service.ICenterPolicySynLogService;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -12,8 +15,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import com.product.center.manage.common.annotation.Log;
 import com.product.center.manage.common.enums.BusinessType;
-import com.product.center.manage.system.domain.CenterPolicySynLog;
-import com.product.center.manage.system.service.ICenterPolicySynLogService;
 import com.product.center.manage.common.core.controller.BaseController;
 import com.product.center.manage.common.core.domain.AjaxResult;
 import com.product.center.manage.common.utils.poi.ExcelUtil;

+ 302 - 0
product-center-manage-business/src/main/java/com/product/center/manage/domain/CenterOrderMain.java

@@ -0,0 +1,302 @@
+package com.product.center.manage.domain;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.product.center.manage.common.annotation.Excel;
+import com.product.center.manage.common.core.domain.BaseEntity;
+
+/**
+ * 【请填写功能名称】对象 center_order_main
+ *
+ * @author ruoyi
+ * @date 2022-09-26
+ */
+@Data
+@TableName("center_order_main")
+public class CenterOrderMain extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 保险公司编码 */
+    private String companyCode;
+
+    /** 订单号 */
+    private String orderNo;
+
+    /** 投保单号 */
+    private String applicationNo;
+
+    /** 保单号 */
+    private String policyNo;
+
+    /** 支付交易号 */
+    private String payNo;
+
+    /** 产品代码 */
+    private String riskCode;
+
+    /** 产品名称 */
+    private String riskName;
+
+    /** 产品代码 */
+    private String productCode;
+
+    /** 产品名称 */
+    private String productName;
+
+
+    /** 起保时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date plyStartDate;
+
+    /** 终保时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date plyEndDate;
+
+    /** 总保额 */
+    private BigDecimal sumAmount;
+
+    /** 总保费 */
+    private BigDecimal sumPremium;
+
+    /** 购买份数 */
+    private Long mult;
+
+    /** 保障期间 */
+    private String period;
+
+    /** 缴费期间 */
+    private String payment;
+
+    /** 缴费方式 Y D M */
+    private String payway;
+
+    /** 订单状态(UNDERWRITING("核保中"),UNDERWRIT_FAIL("核保失败"),WAIT_PAY("待支付"),YET_PAY("已支付"),PAY_FAIL("支付失败"),FINISHED("完成"),INSURE_FAIL("承保失败"),CANCEL("取消"),CLOSED("超时关闭")),PRE_ORDER("预订单") */
+    private String status;
+
+    /** 保险公司保单状态 */
+    private String insuranceStatus;
+
+    /** 保险公司子状态 */
+    private String insuranceSubStatus;
+
+    /** 1:犹豫期退保;2:非犹豫期退保
+    /**退保状态(success 已退保 fail 退保失败 part 部分退保)*/
+    /**退保状态", readConverterExp = "s=uccess,已=退保,f=ail,退=保失败,p=art,部=分退保")*/
+    private String tbStatus;
+
+    /** 核保状态(success 核保通过 fail 核保失败) */
+    private String hbStatus;
+
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date createDate;
+
+    /** 最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date updateDate;
+
+    /** 投保人手机号 */
+    private String mobile;
+
+    /** 投保人邮件 */
+    private String email;
+
+    /** 投保省 */
+    private String residenceProvinceId;
+
+    /** 投保城市 */
+    private String residenceCityId;
+
+    /** 渠道来源 */
+    private String channel;
+
+    /** 子渠道信息 */
+    private String subchannel;
+
+    /** 数据来源 */
+    private String dataSource;
+
+    /** 数据来源 */
+    private String dataFrom;
+
+    /** 续期银行代码 */
+    private String bankCode;
+
+    /** 续期银行名称 */
+    private String bankName;
+
+    /** 续期银行账号 */
+    private String bankAccount;
+
+    /** 续费银行省 */
+    private String bankProvince;
+
+    /** 续期银行市 */
+    private String bankCity;
+
+    /** 支付失败原因 */
+    private String payFailReason;
+
+    /** 支付回传时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date payTransTime;
+
+    /** 保单号回传时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date policyTransTime;
+
+    /** 受益人类型:
+        0("本人"),
+        1("父子"),
+        2("父女"),
+        3("母子"),
+        4("母女"),
+        5("祖孙"),
+        7("夫妻"),
+        8("兄弟"),
+        9("兄妹"),
+        10("姐弟"),
+        11("姐妹"),
+        12("叔侄"),
+        13("姑侄"),
+        14("外甥"),
+        15("媳"),
+        16("婿"),
+        17("姐夫"),
+        18("朋友"),
+        19("同事"),
+        20("师生"),
+        21("雇佣"),
+        22("其他"),
+        23("法定"),
+        24("无指定"),
+        25("子女") */
+    private String beneficiaryType;
+
+    /** 被保人类型:
+        0("本人"),
+        1("父子"),
+        2("父女"),
+        3("母子"),
+        4("母女"),
+        5("祖孙"),
+        7("夫妻"),
+        8("兄弟"),
+        9("兄妹"),
+        10("姐弟"),
+        11("姐妹"),
+        12("叔侄"),
+        13("姑侄"),
+        14("外甥"),
+        15("媳"),
+        16("婿"),
+        17("姐夫"),
+        18("朋友"),
+        19("同事"),
+        20("师生"),
+        21("雇佣"),
+        22("其他"),
+        23("法定"),
+        24("无指定"),
+        25("子女") */
+    private String insuredType;
+
+
+    /** 1是自动续费,0是不自动续费 */
+    private String rnewFlag;
+
+    /** 赠险  1是自动续费,0是不自动续费,2是取消自动续费, 目前只有AS普照B版使用 */
+    private String giftRnewFlag;
+
+    /** 支付平台类型 */
+    private String payPlatformType;
+
+
+    /** 电子保单链接 */
+    private String epolicyUrl;
+
+    /** 总保费(含附加险) */
+    private BigDecimal totalPremium;
+
+    /** 期缴保费 */
+    private BigDecimal periodPremium;
+
+    /** 年化保费 */
+    private BigDecimal annualizedPremium;
+
+    /** 总的退保金额 */
+    private BigDecimal refundTotal;
+
+    /** 拆单订单标记 */
+    private String unpackOrder;
+
+
+    /** 核保等级,1-5是老版定期寿等级,6-11是新版定级寿等级(6:健康++,7健康+,8健康) */
+    private String hbClass;
+
+    /** 代理人工号 */
+    private String agentCode;
+
+    /** 代理人姓名 */
+    private String agentName;
+
+
+    /** 提交最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date tjUpdateDate;
+
+    /** 核保最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date hbUpdateDate;
+
+    /** 支付最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date zfUpdateDate;
+
+    /** 承保最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date cbUpdateDate;
+
+    /** 退保最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date tbUpdateDate;
+
+    /** 犹豫期退保更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date ytUpdateDate;
+
+    /** 失效最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date sxUpdateDate;
+
+    /** 复效最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date fxUpdateDate;
+
+    @TableField(exist = false)
+    private List<CenterOrderPerson> insureds;
+
+    /**
+     * 序列id
+     */
+    private Integer triggerId;
+
+//    /** 微信appid */
+//    private String wechatAppid;
+//
+//    /** 微信openid */
+//    private String wechatOpenid;
+
+}

+ 207 - 0
product-center-manage-business/src/main/java/com/product/center/manage/domain/CenterOrderPerson.java

@@ -0,0 +1,207 @@
+package com.product.center.manage.domain;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.product.center.manage.common.annotation.Excel;
+import com.product.center.manage.common.core.domain.BaseEntity;
+
+/**
+ * 【请填写功能名称】对象 center_order_person
+ *
+ * @author ruoyi
+ * @date 2022-09-26
+ */
+@Data
+@TableName("center_order_person")
+public class CenterOrderPerson extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 订单号 */
+    @Excel(name = "订单号")
+    private String orderNo;
+
+    /** 姓名 */
+    @Excel(name = "姓名")
+    private String name;
+
+    /** 性别 */
+    @Excel(name = "性别")
+    private Long sex;
+
+    /** 生日 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date birthday;
+
+    /** 年龄 */
+    @Excel(name = "年龄")
+    private Long age;
+
+    /** 证件类型 */
+    @Excel(name = "证件类型")
+    private String certType;
+
+    /** 证件类型描述 */
+    @Excel(name = "证件类型描述")
+    private String certTypeStr;
+
+    /** 证件号 */
+    @Excel(name = "证件号")
+    private String certNo;
+
+    /** 身份证是否长期,1是长期,0是非长期 */
+    @Excel(name = "身份证是否长期,1是长期,0是非长期")
+    private String certForever;
+
+    /** 证件是否长期,1是长期,0是非长期 */
+    @Excel(name = "证件是否长期,1是长期,0是非长期")
+    private String certForeverDate;
+
+    /** 证件有效期起期 */
+    @Excel(name = "证件有效期起期")
+    private String certStart;
+
+    /** 证件有效期止期 */
+    @Excel(name = "证件有效期止期")
+    private String certValid;
+
+    /** 职业代码 */
+    @Excel(name = "职业代码")
+    private String occup;
+
+    /** 职业名称 */
+    @Excel(name = "职业名称")
+    private String occupName;
+
+    /** 职业风险等级 */
+    @Excel(name = "职业风险等级")
+    private String occupLevel;
+
+    /** 身高 */
+    @Excel(name = "身高")
+    private String height;
+
+    /** 体重 */
+    @Excel(name = "体重")
+    private String weight;
+
+    /** 电话 */
+    @Excel(name = "电话")
+    private String phone;
+
+    /** 邮箱 */
+    @Excel(name = "邮箱")
+    private String email;
+
+    /** 手机号码 */
+    @Excel(name = "手机号码")
+    private String mobile;
+
+    /** 类型 01 投保人 02 被保人 03 受益人 */
+    @Excel(name = "类型 01 投保人 02 被保人 03 受益人")
+    private String type;
+
+    /** 省份代码 */
+    @Excel(name = "省份代码")
+    private String provId;
+
+    /** 省份名称 */
+    @Excel(name = "省份名称")
+    private String provName;
+
+    /** 城市代码 */
+    @Excel(name = "城市代码")
+    private String cityId;
+
+    /** 城市名称 */
+    @Excel(name = "城市名称")
+    private String cityName;
+
+    /** 县区代码 */
+    @Excel(name = "县区代码")
+    private String countryId;
+
+    /** 县区名称 */
+    @Excel(name = "县区名称")
+    private String countryName;
+
+    /** 详细地址不包含省市区 */
+    @Excel(name = "详细地址不包含省市区")
+    private String address;
+
+    /** 婚姻状况 */
+    @Excel(name = "婚姻状况")
+    private String marriage;
+
+    /** 学历、0:大专及一下,1:本科及以上 */
+    @Excel(name = "学历、0:大专及一下,1:本科及以上")
+    private String degree;
+
+    /** 国籍 */
+    @Excel(name = "国籍")
+    private String nativePlace;
+
+    /** 社保状况、0:无社保、1:有社保 */
+    @Excel(name = "社保状况、0:无社保、1:有社保")
+    private String socialSecurity;
+
+    /** 与投保人关系 0("本人"),1("父子"),2("父女"),3("母子"),4("母女"),5("祖孙"),7("夫妻"),8("兄弟"), 9("兄妹"),10("姐弟"),11("姐妹"),12("叔侄"),13("姑侄"),14("外甥"),15("媳"),16("婿"), 17("姐夫"),18("朋友"),19("同事"),20("师生"),21("雇佣"),22("其他"),23("法定"),24("无指定"), 25("子女"),38("父母") */
+    private String relation;
+
+    /** 受益人用:受益顺序 */
+    @Excel(name = "受益人用:受益顺序")
+    private Integer benefSeq;
+
+    /** 受益人用:受益比例 */
+    @Excel(name = "受益人用:受益比例")
+    private String benefRatio;
+
+    /** 受益人用:指定所属被保人 */
+    @Excel(name = "受益人用:指定所属被保人")
+    private String parentInsure;
+
+    /** 健康告知回答 */
+    @Excel(name = "健康告知回答")
+    private String answers;
+
+    /** 受益人类型:1身故受益人;0身存受益人 */
+    @Excel(name = "受益人类型:1身故受益人;0身存受益人")
+    private String benefType;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String healthAnswers;
+
+    /** 企业单位名称 */
+    @Excel(name = "企业单位名称")
+    private String enterpriseName;
+
+    /** 统一社会信用代码 */
+    @Excel(name = "统一社会信用代码")
+    private String organization;
+
+    /** 纳税人识别号 */
+    @Excel(name = "纳税人识别号")
+    private String taxregistration;
+
+    /** 月工资 */
+    @Excel(name = "月工资")
+    private Long salary;
+
+    /** 年收入,单位万元 */
+    @Excel(name = "年收入,单位万元")
+    private String annualIncome;
+
+    /** 收入来源 */
+    @Excel(name = "收入来源")
+    private String annualIncomeSource;
+
+}

+ 21 - 81
product-center-manage-business/src/main/java/com/product/center/manage/domain/CenterPolicySynConf.java

@@ -1,9 +1,15 @@
 package com.product.center.manage.domain;
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
 import com.product.center.manage.common.annotation.Excel;
-import com.product.center.manage.common.core.domain.BaseEntity;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Date;
 
 /**
  * 【请填写功能名称】对象 center_policy_syn_conf
@@ -11,11 +17,16 @@ import com.product.center.manage.common.core.domain.BaseEntity;
  * @author ruoyi
  * @date 2022-09-22
  */
-public class CenterPolicySynConf extends BaseEntity
-{
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@TableName("center_policy_syn_conf")
+public class CenterPolicySynConf extends GenSequenceId {
     private static final long serialVersionUID = 1L;
 
     /** 主键 */
+    @TableId(value = "id",  type = IdType.AUTO)
     private Long id;
 
     /** 渠道 */
@@ -32,7 +43,7 @@ public class CenterPolicySynConf extends BaseEntity
 
     /** 上次同步保单表时间 */
     @Excel(name = "上次同步保单表时间")
-    private String lastUpdateDate;
+    private Integer lastSynPolicyId;
 
     /** aes加密key */
     @Excel(name = "aes加密key")
@@ -40,84 +51,13 @@ public class CenterPolicySynConf extends BaseEntity
 
     /** 0 关闭 1 开启 */
     @Excel(name = "0 关闭 1 开启")
-    private Long isOpen;
-
-    public void setId(Long id)
-    {
-        this.id = id;
-    }
-
-    public Long getId()
-    {
-        return id;
-    }
-    public void setChannel(String channel)
-    {
-        this.channel = channel;
-    }
-
-    public String getChannel()
-    {
-        return channel;
-    }
-    public void setUri(String uri)
-    {
-        this.uri = uri;
-    }
-
-    public String getUri()
-    {
-        return uri;
-    }
-    public void setAliasName(String aliasName)
-    {
-        this.aliasName = aliasName;
-    }
+    private Integer isOpen;
 
-    public String getAliasName()
-    {
-        return aliasName;
-    }
-    public void setLastUpdateDate(String lastUpdateDate)
-    {
-        this.lastUpdateDate = lastUpdateDate;
-    }
+    private String remark;
 
-    public String getLastUpdateDate()
-    {
-        return lastUpdateDate;
-    }
-    public void setAesKey(String aesKey)
-    {
-        this.aesKey = aesKey;
-    }
+    private String signKey;
 
-    public String getAesKey()
-    {
-        return aesKey;
-    }
-    public void setIsOpen(Long isOpen)
-    {
-        this.isOpen = isOpen;
-    }
+    private Date createTime;
 
-    public Long getIsOpen()
-    {
-        return isOpen;
-    }
 
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("channel", getChannel())
-            .append("uri", getUri())
-            .append("aliasName", getAliasName())
-            .append("lastUpdateDate", getLastUpdateDate())
-            .append("aesKey", getAesKey())
-            .append("remark", getRemark())
-            .append("isOpen", getIsOpen())
-            .append("createTime", getCreateTime())
-            .toString();
-    }
 }

+ 13 - 80
product-center-manage-business/src/main/java/com/product/center/manage/domain/CenterPolicySynLog.java

@@ -1,5 +1,10 @@
 package com.product.center.manage.domain;
 
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.product.center.manage.common.annotation.Excel;
@@ -11,8 +16,12 @@ import com.product.center.manage.common.core.domain.BaseEntity;
  * @author ruoyi
  * @date 2022-09-22
  */
-public class CenterPolicySynLog extends BaseEntity
-{
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName("center_policy_syn_log")
+public class CenterPolicySynLog extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
     /** 主键 */
@@ -32,91 +41,15 @@ public class CenterPolicySynLog extends BaseEntity
 
     /** 同步状态 0 成功 1 失败 */
     @Excel(name = "同步状态 0 成功 1 失败")
-    private Long synState;
+    private Integer synState;
 
     /** 同步失败处理状态 */
     @Excel(name = "同步失败处理状态")
-    private Long synFailHanState;
+    private Integer synFailHanState;
 
     /** 接口返回报文 */
     @Excel(name = "接口返回报文")
     private String resMsg;
 
-    public void setId(Long id)
-    {
-        this.id = id;
-    }
 
-    public Long getId()
-    {
-        return id;
-    }
-    public void setConfId(Long confId)
-    {
-        this.confId = confId;
-    }
-
-    public Long getConfId()
-    {
-        return confId;
-    }
-    public void setOrderNo(String orderNo)
-    {
-        this.orderNo = orderNo;
-    }
-
-    public String getOrderNo()
-    {
-        return orderNo;
-    }
-    public void setChannel(String channel)
-    {
-        this.channel = channel;
-    }
-
-    public String getChannel()
-    {
-        return channel;
-    }
-    public void setSynState(Long synState)
-    {
-        this.synState = synState;
-    }
-
-    public Long getSynState()
-    {
-        return synState;
-    }
-    public void setSynFailHanState(Long synFailHanState)
-    {
-        this.synFailHanState = synFailHanState;
-    }
-
-    public Long getSynFailHanState()
-    {
-        return synFailHanState;
-    }
-    public void setResMsg(String resMsg)
-    {
-        this.resMsg = resMsg;
-    }
-
-    public String getResMsg()
-    {
-        return resMsg;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("confId", getConfId())
-            .append("orderNo", getOrderNo())
-            .append("channel", getChannel())
-            .append("synState", getSynState())
-            .append("synFailHanState", getSynFailHanState())
-            .append("resMsg", getResMsg())
-            .append("createTime", getCreateTime())
-            .toString();
-    }
 }

+ 27 - 0
product-center-manage-business/src/main/java/com/product/center/manage/domain/GenSequenceId.java

@@ -0,0 +1,27 @@
+package com.product.center.manage.domain;
+
+import com.product.center.manage.utils.SequenceIdUtil;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :fxl
+ * @date :Created in 2022/9/28 14:38
+ * @description:
+ */
+public class GenSequenceId implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private Integer triggerId;
+
+
+    public Integer getTriggerId() {
+        triggerId = SequenceIdUtil.getSid();
+        return triggerId;
+    }
+
+    public void setTriggerId(Integer triggerId) {
+        this.triggerId = triggerId;
+    }
+}

+ 64 - 0
product-center-manage-business/src/main/java/com/product/center/manage/mapper/CenterOrderMainMapper.java

@@ -0,0 +1,64 @@
+package com.product.center.manage.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.product.center.manage.domain.CenterOrderMain;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-09-26
+ */
+@Repository
+public interface CenterOrderMainMapper extends BaseMapper<CenterOrderMain> {
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public CenterOrderMain selectCenterOrderMainById(Long id);
+
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param centerOrderMain 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<CenterOrderMain> selectCenterOrderMainList(CenterOrderMain centerOrderMain);
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param centerOrderMain 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertCenterOrderMain(CenterOrderMain centerOrderMain);
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param centerOrderMain 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateCenterOrderMain(CenterOrderMain centerOrderMain);
+
+    /**
+     * 删除【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteCenterOrderMainById(Long id);
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCenterOrderMainByIds(String[] ids);
+}

+ 65 - 0
product-center-manage-business/src/main/java/com/product/center/manage/mapper/CenterOrderPersonMapper.java

@@ -0,0 +1,65 @@
+package com.product.center.manage.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.product.center.manage.domain.CenterOrderPerson;
+import com.product.center.manage.domain.CenterPolicySynConf;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-09-26
+ */
+@Repository
+public interface CenterOrderPersonMapper extends BaseMapper<CenterOrderPerson> {
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public CenterOrderPerson selectCenterOrderPersonById(Long id);
+
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param centerOrderPerson 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<CenterOrderPerson> selectCenterOrderPersonList(CenterOrderPerson centerOrderPerson);
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param centerOrderPerson 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertCenterOrderPerson(CenterOrderPerson centerOrderPerson);
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param centerOrderPerson 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateCenterOrderPerson(CenterOrderPerson centerOrderPerson);
+
+    /**
+     * 删除【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteCenterOrderPersonById(Long id);
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCenterOrderPersonByIds(String[] ids);
+}

+ 21 - 10
product-center-manage-business/src/main/java/com/product/center/manage/service/impl/CenterPolicySynConfServiceImpl.java

@@ -1,12 +1,16 @@
 package com.product.center.manage.service.impl;
 
 import java.util.List;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.product.center.manage.common.exception.base.BaseException;
 import com.product.center.manage.common.utils.DateUtils;
+import com.product.center.manage.domain.CenterPolicySynConf;
+import com.product.center.manage.mapper.CenterPolicySynConfMapper;
+import com.product.center.manage.service.ICenterPolicySynConfService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.product.center.manage.system.mapper.CenterPolicySynConfMapper;
-import com.product.center.manage.system.domain.CenterPolicySynConf;
-import com.product.center.manage.system.service.ICenterPolicySynConfService;
 import com.product.center.manage.common.core.text.Convert;
 
 /**
@@ -40,9 +44,10 @@ public class CenterPolicySynConfServiceImpl implements ICenterPolicySynConfServi
      * @return 【请填写功能名称】
      */
     @Override
-    public List<CenterPolicySynConf> selectCenterPolicySynConfList(CenterPolicySynConf centerPolicySynConf)
-    {
-        return centerPolicySynConfMapper.selectCenterPolicySynConfList(centerPolicySynConf);
+    public List<CenterPolicySynConf> selectCenterPolicySynConfList(CenterPolicySynConf centerPolicySynConf) {
+
+        List<CenterPolicySynConf> centerPolicySynConfs = centerPolicySynConfMapper.selectCenterPolicySynConfList(centerPolicySynConf);
+        return centerPolicySynConfs;
     }
 
     /**
@@ -52,10 +57,16 @@ public class CenterPolicySynConfServiceImpl implements ICenterPolicySynConfServi
      * @return 结果
      */
     @Override
-    public int insertCenterPolicySynConf(CenterPolicySynConf centerPolicySynConf)
-    {
-        centerPolicySynConf.setCreateTime(DateUtils.getNowDate());
-        return centerPolicySynConfMapper.insertCenterPolicySynConf(centerPolicySynConf);
+    public int insertCenterPolicySynConf(CenterPolicySynConf centerPolicySynConf) {
+        LambdaQueryWrapper<CenterPolicySynConf> lqw = Wrappers.lambdaQuery();
+        lqw.eq(true,CenterPolicySynConf::getUri,centerPolicySynConf.getUri());
+        Integer count = centerPolicySynConfMapper.selectCount(lqw);
+        if(count == 0){
+            int insert = centerPolicySynConfMapper.insert(centerPolicySynConf);
+            return insert;
+        }else {
+            throw new BaseException("url已配置");
+        }
     }
 
     /**

+ 3 - 3
product-center-manage-business/src/main/java/com/product/center/manage/service/impl/CenterPolicySynLogServiceImpl.java

@@ -2,11 +2,11 @@ package com.product.center.manage.service.impl;
 
 import java.util.List;
 import com.product.center.manage.common.utils.DateUtils;
+import com.product.center.manage.domain.CenterPolicySynLog;
+import com.product.center.manage.mapper.CenterPolicySynLogMapper;
+import com.product.center.manage.service.ICenterPolicySynLogService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.product.center.manage.system.mapper.CenterPolicySynLogMapper;
-import com.product.center.manage.system.domain.CenterPolicySynLog;
-import com.product.center.manage.system.service.ICenterPolicySynLogService;
 import com.product.center.manage.common.core.text.Convert;
 
 /**

+ 137 - 0
product-center-manage-business/src/main/java/com/product/center/manage/service/impl/PolicySynServiceImpl.java

@@ -1,25 +1,57 @@
 package com.product.center.manage.service.impl;
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.http.HttpUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 
+import com.product.center.manage.domain.CenterOrderMain;
+import com.product.center.manage.domain.CenterOrderPerson;
 import com.product.center.manage.domain.CenterPolicySynConf;
+import com.product.center.manage.domain.CenterPolicySynLog;
+import com.product.center.manage.mapper.CenterOrderMainMapper;
+import com.product.center.manage.mapper.CenterOrderPersonMapper;
 import com.product.center.manage.mapper.CenterPolicySynConfMapper;
+import com.product.center.manage.mapper.CenterPolicySynLogMapper;
 import com.product.center.manage.service.PolicySynService;
+import com.product.center.manage.utils.AesUtil;
+import com.product.center.manage.utils.SignUtil;
+import com.product.center.manage.vo.CenterOrderMainVo;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Repository;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
 /**
  * @author :fxl
  * @date :Created in 2022/9/22 10:45
  * @description:
  */
 @Repository
+@Slf4j
 public class PolicySynServiceImpl implements PolicySynService {
 
     @Autowired
     private CenterPolicySynConfMapper centerPolicySynConfMapper;
 
+    @Autowired
+    private CenterOrderMainMapper centerOrderMainMapper;
+
+
+    @Autowired
+    private CenterOrderPersonMapper centerOrderPersonMapper;
+
+    @Autowired
+    private CenterPolicySynLogMapper centerPolicySynLogMapper;
+
     /**
      * 开始同步保单数据
      */
@@ -27,7 +59,112 @@ public class PolicySynServiceImpl implements PolicySynService {
     public void startPolicySyn() {
         LambdaQueryWrapper<CenterPolicySynConf> lqw = Wrappers.lambdaQuery();
         lqw.eq(true,CenterPolicySynConf::getIsOpen,1);
+        List<CenterPolicySynConf> centerPolicySynConfs = centerPolicySynConfMapper.selectList(lqw);
+        for (CenterPolicySynConf centerPolicySynConf : centerPolicySynConfs) {
+            // 同步保单
+            synPolicy(centerPolicySynConf);
+        }
+    }
+
+    /**
+     * 同步保单逻辑
+     * @param centerPolicySynConf
+     */
+    private void synPolicy(CenterPolicySynConf centerPolicySynConf) {
+        // 根据配置获取保单
+        List<CenterOrderMain> centerOrderMains = getpolicyList(centerPolicySynConf);
+        for (CenterOrderMain centerOrderMain : centerOrderMains) {
+            // 按照配置走不同请求
+            commonReq(centerOrderMain,centerPolicySynConf);
+        }
+
+
+    }
+
+    /**
+     * 公共请求方法
+     * @param centerOrderMain
+     * @param centerPolicySynConf
+     */
+    private void commonReq(CenterOrderMain centerOrderMain, CenterPolicySynConf centerPolicySynConf) {
+        CenterOrderMainVo centerOrderMainVo = new CenterOrderMainVo();
+        BeanUtil.copyProperties(centerOrderMain,centerOrderMainVo);
+
+        Map<String, String> jsonMap = JSON.parseObject(JSON.toJSONString(centerOrderMainVo), new TypeReference<Map<String, String>>() {});
+        String sign = SignUtil.sign(jsonMap,centerPolicySynConf.getSignKey());
+        jsonMap.put("sign", sign);
+
+        String centerOrderMainJson = JSON.toJSONString(jsonMap);
+        log.info("{}渠道保单同步请求明文:=> {}",centerPolicySynConf.getAliasName(),centerOrderMainJson);
+        String req = AesUtil.encryptFromString(centerOrderMainJson, centerPolicySynConf.getAesKey());
+        Map<String, String> reqMap = new HashMap<>();
+        reqMap.put("data",req);
+        String reqjson = JSON.toJSONString(reqMap);
+        log.info("{}渠道保单同步请求密文:=> {}",centerPolicySynConf.getAliasName(),reqjson);
+        // 发起请求
+        String repsonResult = HttpUtil.post(centerPolicySynConf.getUri(), reqjson);
+        log.info("{}渠道保单同步返回报文:=> {}",centerPolicySynConf.getAliasName(),repsonResult);
+        JSONObject jsonObject = JSON.parseObject(repsonResult);
+        if("0".equals(jsonObject.getString("code"))){
+            CenterPolicySynLog centerPolicySynLog = CenterPolicySynLog.builder()
+                    .confId(centerOrderMain.getId())
+                    .orderNo(centerOrderMain.getOrderNo())
+                    .channel(centerOrderMain.getChannel())
+                    .synState(0)
+                    .synFailHanState(0)
+                    .resMsg(repsonResult).build();
+            centerPolicySynLogMapper.insert(centerPolicySynLog);
+        }else {
+            CenterPolicySynLog centerPolicySynLog = CenterPolicySynLog.builder()
+                    .confId(centerOrderMain.getId())
+                    .orderNo(centerOrderMain.getOrderNo())
+                    .channel(centerOrderMain.getChannel())
+                    .synState(1)
+                    .synFailHanState(0)
+                    .resMsg(repsonResult).build();
+            centerPolicySynLogMapper.insert(centerPolicySynLog);
+        }
+        centerPolicySynConf.setLastSynPolicyId(centerOrderMain.getTriggerId());
+        centerPolicySynConfMapper.updateById(centerPolicySynConf);
     }
 
 
+    /**
+     * 根据条件查询保单数据
+     */
+    public List<CenterOrderMain> getpolicyList(CenterPolicySynConf centerPolicySynConf){
+        LambdaQueryWrapper<CenterOrderMain> lqw = Wrappers.lambdaQuery();
+        lqw.eq(true,CenterOrderMain::getChannel,centerPolicySynConf.getChannel());
+        lqw.gt(true,CenterOrderMain::getTriggerId,centerPolicySynConf.getLastSynPolicyId());
+        lqw.orderByAsc(CenterOrderMain::getTriggerId);
+        lqw.last(" limit 100");
+        // 查询保单客户
+        List<CenterOrderMain> centerOrderMains = centerOrderMainMapper.selectList(lqw);
+        if(centerOrderMains != null){
+            // 提取保单 订单号
+            List<String> orderNoList = centerOrderMains.stream()
+                    .map(CenterOrderMain::getOrderNo)
+                    .collect(Collectors.toList());
+
+            LambdaQueryWrapper<CenterOrderPerson> prLqw = Wrappers.lambdaQuery();
+            prLqw.in(true,CenterOrderPerson::getOrderNo,orderNoList);
+            // 根据订单号获取客户信息
+            List<CenterOrderPerson> centerOrderPeople = centerOrderPersonMapper.selectList(prLqw);
+            // 获取的客户信息 按照订单号分组
+            Map<String, List<CenterOrderPerson>> prOrderNoMap = centerOrderPeople.stream()
+                    .collect(Collectors.groupingBy(CenterOrderPerson::getOrderNo));
+            // 将客户信息与保单绑定起来
+            centerOrderMains.forEach(e -> {
+                List<CenterOrderPerson> centerOrderPeopleList = prOrderNoMap.get(e.getOrderNo());
+                e.setInsureds(centerOrderPeopleList);
+            });
+        }
+
+        return centerOrderMains;
+    }
+
+
+
+
+
 }

+ 48 - 0
product-center-manage-business/src/main/java/com/product/center/manage/utils/AesUtil.java

@@ -0,0 +1,48 @@
+package com.product.center.manage.utils;
+
+import cn.hutool.crypto.Mode;
+import cn.hutool.crypto.Padding;
+import cn.hutool.crypto.symmetric.AES;
+
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * @author :fxl
+ * @date :Created in 2022/9/28 9:42
+ * @description:
+ */
+public class AesUtil {
+
+
+    private static final String IV_KEY = "0000000000000000";
+
+    /**
+     * 加密方法
+     * @param data
+     * @param aesKey
+     * @return
+     */
+    public static String encryptFromString(String data, String aesKey) {
+        AES aes = new AES(Mode.CBC, Padding.ZeroPadding,
+                new SecretKeySpec(aesKey.getBytes(), "AES"),
+                new IvParameterSpec(IV_KEY.getBytes()));
+        return aes.encryptBase64(data, StandardCharsets.UTF_8);
+    }
+
+
+    /**
+     * 解密方法
+     * @param data
+     * @param aesKey
+     * @return
+     */
+    public static String decryptFromString(String data, String aesKey) {
+        AES aes = new AES(Mode.CBC, Padding.ZeroPadding,
+                new SecretKeySpec(aesKey.getBytes(), "AES"),
+                new IvParameterSpec(IV_KEY.getBytes()));
+        byte[] decryptDataBase64 = aes.decrypt(data);
+        return new String(decryptDataBase64, StandardCharsets.UTF_8);
+    }
+}

+ 22 - 0
product-center-manage-business/src/main/java/com/product/center/manage/utils/SequenceIdUtil.java

@@ -0,0 +1,22 @@
+package com.product.center.manage.utils;
+
+/**
+ * @author :fxl
+ * @date :Created in 2022/9/28 14:46
+ * @description:
+ */
+public class SequenceIdUtil {
+
+    private static Integer sid;
+
+    static {
+        sid = 0;
+    }
+
+    public static Integer getSid(){
+        sid += 1;
+        return sid;
+    }
+
+
+}

+ 72 - 0
product-center-manage-business/src/main/java/com/product/center/manage/utils/SignUtil.java

@@ -0,0 +1,72 @@
+package com.product.center.manage.utils;
+
+import cn.hutool.core.util.StrUtil;
+
+import java.security.MessageDigest;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * @author :fxl
+ * @date :Created in 2022/9/28 9:48
+ * @description:
+ */
+public class SignUtil {
+
+
+    public static String sign(Map<String, String> formData, String secretyKey) {
+        if (formData == null) {
+            throw new IllegalArgumentException("数据不能为空");
+        }
+        if (formData.isEmpty()) {
+            return null;
+        }
+        if (secretyKey == null) {
+            throw new IllegalArgumentException("安全校验码数据不能为空");
+        }
+        Map<String, String> sortedMap = new TreeMap<String, String>(formData);
+        if (sortedMap.containsKey("sign")) {
+            sortedMap.remove("sign");
+        }
+        StringBuffer stringToSign = new StringBuffer();
+        if (sortedMap.size() > 0) {
+            for (Map.Entry<String, String> entry : sortedMap.entrySet()) {
+                if (!StrUtil.isEmpty(entry.getValue()) && entry.getValue() != null) {
+                    stringToSign.append(entry.getKey()).append("=").append(entry.getValue()).append("&");
+                }
+            }
+            stringToSign.deleteCharAt(stringToSign.length() - 1);
+        }
+        System.out.println("代签字符串[" + stringToSign.toString() + "]");
+        stringToSign.append(secretyKey);
+        System.out.println("代签字符串2[" + stringToSign.toString() + "]");
+        String signature = md5Hex(stringToSign.toString());
+        System.out.println("签名结果[" + signature + "]");
+        return signature;
+    }
+
+    public static String md5Hex(String content) {
+        try {
+            MessageDigest digest = MessageDigest.getInstance("MD5");
+            byte[] data = digest.digest(content.getBytes("UTF-8"));
+            return new String(encodeHex(data));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return "";
+    }
+
+    protected static char[] encodeHex(byte[] data) {
+        final int l = data.length;
+        final char[] out = new char[l << 1];
+        for (int i = 0, j = 0; i < l; i++) {
+            out[j++] = DIGITS_LOWER[(0xF0 & data[i]) >>> 4];
+            out[j++] = DIGITS_LOWER[0x0F & data[i]];
+        }
+        return out;
+    }
+
+    private static final char[] DIGITS_LOWER =
+            {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
+
+}

+ 290 - 0
product-center-manage-business/src/main/java/com/product/center/manage/vo/CenterOrderMainVo.java

@@ -0,0 +1,290 @@
+package com.product.center.manage.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.product.center.manage.common.core.domain.BaseEntity;
+import com.product.center.manage.domain.CenterOrderPerson;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 【请填写功能名称】对象 center_order_main
+ *
+ * @author ruoyi
+ * @date 2022-09-26
+ */
+@Data
+public class CenterOrderMainVo extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 保险公司编码 */
+    private String companyCode;
+
+    /** 订单号 */
+    private String orderNo;
+
+    /** 投保单号 */
+    private String applicationNo;
+
+    /** 保单号 */
+    private String policyNo;
+
+    /** 支付交易号 */
+    private String payNo;
+
+    /** 产品代码 */
+    private String riskCode;
+
+    /** 产品名称 */
+    private String riskName;
+
+    /** 产品代码 */
+    private String productCode;
+
+    /** 产品名称 */
+    private String productName;
+
+
+    /** 起保时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date plyStartDate;
+
+    /** 终保时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date plyEndDate;
+
+    /** 总保额 */
+    private BigDecimal sumAmount;
+
+    /** 总保费 */
+    private BigDecimal sumPremium;
+
+    /** 购买份数 */
+    private Long mult;
+
+    /** 保障期间 */
+    private String period;
+
+    /** 缴费期间 */
+    private String payment;
+
+    /** 缴费方式 Y D M */
+    private String payway;
+
+    /** 订单状态(UNDERWRITING("核保中"),UNDERWRIT_FAIL("核保失败"),WAIT_PAY("待支付"),YET_PAY("已支付"),PAY_FAIL("支付失败"),FINISHED("完成"),INSURE_FAIL("承保失败"),CANCEL("取消"),CLOSED("超时关闭")),PRE_ORDER("预订单") */
+    private String status;
+
+    /** 保险公司保单状态 */
+    private String insuranceStatus;
+
+    /** 保险公司子状态 */
+    private String insuranceSubStatus;
+
+    /** 1:犹豫期退保;2:非犹豫期退保
+    /**退保状态(success 已退保 fail 退保失败 part 部分退保)*/
+    /**退保状态", readConverterExp = "s=uccess,已=退保,f=ail,退=保失败,p=art,部=分退保")*/
+    private String tbStatus;
+
+    /** 核保状态(success 核保通过 fail 核保失败) */
+    private String hbStatus;
+
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date createDate;
+
+    /** 最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date updateDate;
+
+    /** 投保人手机号 */
+    private String mobile;
+
+    /** 投保人邮件 */
+    private String email;
+
+    /** 投保省 */
+    private String residenceProvinceId;
+
+    /** 投保城市 */
+    private String residenceCityId;
+
+    /** 渠道来源 */
+    private String channel;
+
+    /** 子渠道信息 */
+    private String subchannel;
+
+    /** 数据来源 */
+    private String dataSource;
+
+    /** 数据来源 */
+    private String dataFrom;
+
+    /** 续期银行代码 */
+    private String bankCode;
+
+    /** 续期银行名称 */
+    private String bankName;
+
+    /** 续期银行账号 */
+    private String bankAccount;
+
+    /** 续费银行省 */
+    private String bankProvince;
+
+    /** 续期银行市 */
+    private String bankCity;
+
+    /** 支付失败原因 */
+    private String payFailReason;
+
+    /** 支付回传时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date payTransTime;
+
+    /** 保单号回传时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date policyTransTime;
+
+    /** 受益人类型:
+        0("本人"),
+        1("父子"),
+        2("父女"),
+        3("母子"),
+        4("母女"),
+        5("祖孙"),
+        7("夫妻"),
+        8("兄弟"),
+        9("兄妹"),
+        10("姐弟"),
+        11("姐妹"),
+        12("叔侄"),
+        13("姑侄"),
+        14("外甥"),
+        15("媳"),
+        16("婿"),
+        17("姐夫"),
+        18("朋友"),
+        19("同事"),
+        20("师生"),
+        21("雇佣"),
+        22("其他"),
+        23("法定"),
+        24("无指定"),
+        25("子女") */
+    private String beneficiaryType;
+
+    /** 被保人类型:
+        0("本人"),
+        1("父子"),
+        2("父女"),
+        3("母子"),
+        4("母女"),
+        5("祖孙"),
+        7("夫妻"),
+        8("兄弟"),
+        9("兄妹"),
+        10("姐弟"),
+        11("姐妹"),
+        12("叔侄"),
+        13("姑侄"),
+        14("外甥"),
+        15("媳"),
+        16("婿"),
+        17("姐夫"),
+        18("朋友"),
+        19("同事"),
+        20("师生"),
+        21("雇佣"),
+        22("其他"),
+        23("法定"),
+        24("无指定"),
+        25("子女") */
+    private String insuredType;
+
+
+    /** 1是自动续费,0是不自动续费 */
+    private String rnewFlag;
+
+    /** 赠险  1是自动续费,0是不自动续费,2是取消自动续费, 目前只有AS普照B版使用 */
+    private String giftRnewFlag;
+
+    /** 支付平台类型 */
+    private String payPlatformType;
+
+
+    /** 电子保单链接 */
+    private String epolicyUrl;
+
+    /** 总保费(含附加险) */
+    private BigDecimal totalPremium;
+
+    /** 期缴保费 */
+    private BigDecimal periodPremium;
+
+    /** 年化保费 */
+    private BigDecimal annualizedPremium;
+
+    /** 总的退保金额 */
+    private BigDecimal refundTotal;
+
+    /** 拆单订单标记 */
+    private String unpackOrder;
+
+
+    /** 核保等级,1-5是老版定期寿等级,6-11是新版定级寿等级(6:健康++,7健康+,8健康) */
+    private String hbClass;
+
+    /** 代理人工号 */
+    private String agentCode;
+
+    /** 代理人姓名 */
+    private String agentName;
+
+
+    /** 提交最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date tjUpdateDate;
+
+    /** 核保最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date hbUpdateDate;
+
+    /** 支付最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date zfUpdateDate;
+
+    /** 承保最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date cbUpdateDate;
+
+    /** 退保最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date tbUpdateDate;
+
+    /** 犹豫期退保更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date ytUpdateDate;
+
+    /** 失效最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date sxUpdateDate;
+
+    /** 复效最近一次更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date fxUpdateDate;
+
+    private List<CenterOrderPerson> insureds;
+
+
+
+
+}

+ 446 - 0
product-center-manage-business/src/main/resources/mapper/CenterOrderMainMapper.xml

@@ -0,0 +1,446 @@
+<?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.product.center.manage.mapper.CenterOrderMainMapper">
+
+    <resultMap type="com.product.center.manage.domain.CenterOrderMain" id="CenterOrderMainResult">
+        <result property="id"    column="id"    />
+        <result property="companyCode"    column="company_code"    />
+        <result property="orderNo"    column="order_no"    />
+        <result property="applicationNo"    column="application_no"    />
+        <result property="policyNo"    column="policy_no"    />
+        <result property="payNo"    column="pay_no"    />
+        <result property="riskCode"    column="risk_code"    />
+        <result property="riskName"    column="risk_name"    />
+        <result property="productCode"    column="product_code"    />
+        <result property="productName"    column="product_name"    />
+        <result property="plyStartDate"    column="ply_start_date"    />
+        <result property="plyEndDate"    column="ply_end_date"    />
+        <result property="sumAmount"    column="sum_amount"    />
+        <result property="sumPremium"    column="sum_premium"    />
+        <result property="mult"    column="mult"    />
+        <result property="period"    column="period"    />
+        <result property="payment"    column="payment"    />
+        <result property="payway"    column="payway"    />
+        <result property="status"    column="status"    />
+        <result property="insuranceStatus"    column="insurance_status"    />
+        <result property="insuranceSubStatus"    column="insurance_sub_status"    />
+        <result property="tbStatus"    column="tb_status"    />
+        <result property="hbStatus"    column="hb_status"    />
+        <result property="createDate"    column="create_date"    />
+        <result property="updateDate"    column="update_date"    />
+        <result property="mobile"    column="mobile"    />
+        <result property="email"    column="email"    />
+        <result property="residenceProvinceId"    column="residence_province_Id"    />
+        <result property="residenceCityId"    column="residence_city_id"    />
+        <result property="channel"    column="channel"    />
+        <result property="subchannel"    column="subchannel"    />
+        <result property="dataSource"    column="data_source"    />
+        <result property="dataFrom"    column="data_from"    />
+        <result property="bankCode"    column="bank_code"    />
+        <result property="bankName"    column="bank_name"    />
+        <result property="bankAccount"    column="bank_account"    />
+        <result property="bankProvince"    column="bank_province"    />
+        <result property="bankCity"    column="bank_city"    />
+        <result property="payFailReason"    column="pay_fail_reason"    />
+        <result property="payTransTime"    column="pay_trans_time"    />
+        <result property="policyTransTime"    column="policy_trans_time"    />
+        <result property="beneficiaryType"    column="beneficiary_type"    />
+        <result property="insuredType"    column="insured_type"    />
+        <result property="rnewFlag"    column="rnew_flag"    />
+        <result property="giftRnewFlag"    column="gift_rnew_flag"    />
+        <result property="payPlatformType"    column="pay_platform_type"    />
+        <result property="epolicyUrl"    column="epolicy_url"    />
+        <result property="remark"    column="remark"    />
+        <result property="totalPremium"    column="total_premium"    />
+        <result property="periodPremium"    column="period_premium"    />
+        <result property="annualizedPremium"    column="annualized_premium"    />
+        <result property="refundTotal"    column="refund_total"    />
+        <result property="unpackOrder"    column="unpack_order"    />
+        <result property="hbClass"    column="hb_class"    />
+        <result property="agentCode"    column="agent_code"    />
+        <result property="agentName"    column="agent_name"    />
+        <result property="tjUpdateDate"    column="tj_update_date"    />
+        <result property="hbUpdateDate"    column="hb_update_date"    />
+        <result property="zfUpdateDate"    column="zf_update_date"    />
+        <result property="cbUpdateDate"    column="cb_update_date"    />
+        <result property="tbUpdateDate"    column="tb_update_date"    />
+        <result property="ytUpdateDate"    column="yt_update_date"    />
+        <result property="sxUpdateDate"    column="sx_update_date"    />
+        <result property="fxUpdateDate"    column="fx_update_date"    />
+    </resultMap>
+
+    <sql id="selectCenterOrderMainVo">
+        select id, company_code, order_no, application_no, policy_no, pay_no, risk_code, risk_name, product_code, product_name, terminal, ply_start_date, ply_end_date, sum_amount, sum_premium, mult, period, payment, payway, status, insurance_status, insurance_sub_status, tb_status, hb_status, cust_id, create_user, create_date, update_date, mobile, email, residence_province_Id, residence_city_id, channel, subchannel, data_source, data_from, bank_code, bank_name, bank_account, bank_province, bank_city, pay_fail_reason, pay_trans_time, hb_manual_flag, hb_manual_time, hb_manual_msg, wait_pay_delay_msg, hb_fail_reason, policy_trans_time, beneficiary_type, insured_type, gift_mark, rnew_flag, gift_rnew_flag, pay_platform_type, pay_url, epolicy_url, visit_url, hostIPAddress, data_source_distincId, remark, paramThird, total_premium, period_premium, annualized_premium, refund_total, unpack_order, create_we_run_data_id, hb_class, agent_code, agent_name, couple_flag, couple_policy_no, pros_order_id, tj_update_date, hb_update_date, zf_update_date, cb_update_date, tb_update_date, yt_update_date, sx_update_date, fx_update_date, wechat_appid, wechat_openid from center_order_main
+    </sql>
+
+    <select id="selectCenterOrderMainList" parameterType="CenterOrderMain" resultMap="CenterOrderMainResult">
+        <include refid="selectCenterOrderMainVo"/>
+        <where>
+            <if test="companyCode != null  and companyCode != ''"> and company_code = #{companyCode}</if>
+            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
+            <if test="applicationNo != null  and applicationNo != ''"> and application_no = #{applicationNo}</if>
+            <if test="policyNo != null  and policyNo != ''"> and policy_no = #{policyNo}</if>
+            <if test="payNo != null  and payNo != ''"> and pay_no = #{payNo}</if>
+            <if test="riskCode != null  and riskCode != ''"> and risk_code = #{riskCode}</if>
+            <if test="riskName != null  and riskName != ''"> and risk_name like concat('%', #{riskName}, '%')</if>
+            <if test="productCode != null  and productCode != ''"> and product_code = #{productCode}</if>
+            <if test="productName != null  and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
+            <if test="terminal != null  and terminal != ''"> and terminal = #{terminal}</if>
+            <if test="plyStartDate != null "> and ply_start_date = #{plyStartDate}</if>
+            <if test="plyEndDate != null "> and ply_end_date = #{plyEndDate}</if>
+            <if test="sumAmount != null "> and sum_amount = #{sumAmount}</if>
+            <if test="sumPremium != null "> and sum_premium = #{sumPremium}</if>
+            <if test="mult != null "> and mult = #{mult}</if>
+            <if test="period != null  and period != ''"> and period = #{period}</if>
+            <if test="payment != null  and payment != ''"> and payment = #{payment}</if>
+            <if test="payway != null  and payway != ''"> and payway = #{payway}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="insuranceStatus != null  and insuranceStatus != ''"> and insurance_status = #{insuranceStatus}</if>
+            <if test="insuranceSubStatus != null  and insuranceSubStatus != ''"> and insurance_sub_status = #{insuranceSubStatus}</if>
+            <if test="tbStatus != null  and tbStatus != ''"> and tb_status = #{tbStatus}</if>
+            <if test="hbStatus != null  and hbStatus != ''"> and hb_status = #{hbStatus}</if>
+            <if test="custId != null  and custId != ''"> and cust_id = #{custId}</if>
+            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
+            <if test="createDate != null "> and create_date = #{createDate}</if>
+            <if test="updateDate != null "> and update_date = #{updateDate}</if>
+            <if test="mobile != null  and mobile != ''"> and mobile = #{mobile}</if>
+            <if test="email != null  and email != ''"> and email = #{email}</if>
+            <if test="residenceProvinceId != null  and residenceProvinceId != ''"> and residence_province_Id = #{residenceProvinceId}</if>
+            <if test="residenceCityId != null  and residenceCityId != ''"> and residence_city_id = #{residenceCityId}</if>
+            <if test="channel != null  and channel != ''"> and channel = #{channel}</if>
+            <if test="subchannel != null  and subchannel != ''"> and subchannel = #{subchannel}</if>
+            <if test="dataSource != null  and dataSource != ''"> and data_source = #{dataSource}</if>
+            <if test="dataFrom != null  and dataFrom != ''"> and data_from = #{dataFrom}</if>
+            <if test="bankCode != null  and bankCode != ''"> and bank_code = #{bankCode}</if>
+            <if test="bankName != null  and bankName != ''"> and bank_name like concat('%', #{bankName}, '%')</if>
+            <if test="bankAccount != null  and bankAccount != ''"> and bank_account = #{bankAccount}</if>
+            <if test="bankProvince != null  and bankProvince != ''"> and bank_province = #{bankProvince}</if>
+            <if test="bankCity != null  and bankCity != ''"> and bank_city = #{bankCity}</if>
+            <if test="payFailReason != null  and payFailReason != ''"> and pay_fail_reason = #{payFailReason}</if>
+            <if test="payTransTime != null "> and pay_trans_time = #{payTransTime}</if>
+            <if test="hbManualFlag != null  and hbManualFlag != ''"> and hb_manual_flag = #{hbManualFlag}</if>
+            <if test="hbManualTime != null  and hbManualTime != ''"> and hb_manual_time = #{hbManualTime}</if>
+            <if test="hbManualMsg != null  and hbManualMsg != ''"> and hb_manual_msg = #{hbManualMsg}</if>
+            <if test="waitPayDelayMsg != null  and waitPayDelayMsg != ''"> and wait_pay_delay_msg = #{waitPayDelayMsg}</if>
+            <if test="hbFailReason != null  and hbFailReason != ''"> and hb_fail_reason = #{hbFailReason}</if>
+            <if test="policyTransTime != null "> and policy_trans_time = #{policyTransTime}</if>
+            <if test="beneficiaryType != null  and beneficiaryType != ''"> and beneficiary_type = #{beneficiaryType}</if>
+            <if test="insuredType != null  and insuredType != ''"> and insured_type = #{insuredType}</if>
+            <if test="giftMark != null  and giftMark != ''"> and gift_mark = #{giftMark}</if>
+            <if test="rnewFlag != null  and rnewFlag != ''"> and rnew_flag = #{rnewFlag}</if>
+            <if test="giftRnewFlag != null  and giftRnewFlag != ''"> and gift_rnew_flag = #{giftRnewFlag}</if>
+            <if test="payPlatformType != null  and payPlatformType != ''"> and pay_platform_type = #{payPlatformType}</if>
+            <if test="payUrl != null  and payUrl != ''"> and pay_url = #{payUrl}</if>
+            <if test="epolicyUrl != null  and epolicyUrl != ''"> and epolicy_url = #{epolicyUrl}</if>
+            <if test="visitUrl != null  and visitUrl != ''"> and visit_url = #{visitUrl}</if>
+            <if test="hostIPAddress != null  and hostIPAddress != ''"> and hostIPAddress = #{hostIPAddress}</if>
+            <if test="dataSourceDistincid != null  and dataSourceDistincid != ''"> and data_source_distincId = #{dataSourceDistincid}</if>
+            <if test="paramThird != null  and paramThird != ''"> and paramThird = #{paramThird}</if>
+            <if test="totalPremium != null "> and total_premium = #{totalPremium}</if>
+            <if test="periodPremium != null "> and period_premium = #{periodPremium}</if>
+            <if test="annualizedPremium != null "> and annualized_premium = #{annualizedPremium}</if>
+            <if test="refundTotal != null "> and refund_total = #{refundTotal}</if>
+            <if test="unpackOrder != null  and unpackOrder != ''"> and unpack_order = #{unpackOrder}</if>
+            <if test="createWeRunDataId != null "> and create_we_run_data_id = #{createWeRunDataId}</if>
+            <if test="hbClass != null  and hbClass != ''"> and hb_class = #{hbClass}</if>
+            <if test="agentCode != null  and agentCode != ''"> and agent_code = #{agentCode}</if>
+            <if test="agentName != null  and agentName != ''"> and agent_name like concat('%', #{agentName}, '%')</if>
+            <if test="coupleFlag != null  and coupleFlag != ''"> and couple_flag = #{coupleFlag}</if>
+            <if test="couplePolicyNo != null  and couplePolicyNo != ''"> and couple_policy_no = #{couplePolicyNo}</if>
+            <if test="prosOrderId != null "> and pros_order_id = #{prosOrderId}</if>
+            <if test="tjUpdateDate != null "> and tj_update_date = #{tjUpdateDate}</if>
+            <if test="hbUpdateDate != null "> and hb_update_date = #{hbUpdateDate}</if>
+            <if test="zfUpdateDate != null "> and zf_update_date = #{zfUpdateDate}</if>
+            <if test="cbUpdateDate != null "> and cb_update_date = #{cbUpdateDate}</if>
+            <if test="tbUpdateDate != null "> and tb_update_date = #{tbUpdateDate}</if>
+            <if test="ytUpdateDate != null "> and yt_update_date = #{ytUpdateDate}</if>
+            <if test="sxUpdateDate != null "> and sx_update_date = #{sxUpdateDate}</if>
+            <if test="fxUpdateDate != null "> and fx_update_date = #{fxUpdateDate}</if>
+            <if test="wechatAppid != null  and wechatAppid != ''"> and wechat_appid = #{wechatAppid}</if>
+            <if test="wechatOpenid != null  and wechatOpenid != ''"> and wechat_openid = #{wechatOpenid}</if>
+        </where>
+    </select>
+
+    <select id="selectCenterOrderMainById" parameterType="Long" resultMap="CenterOrderMainResult">
+        <include refid="selectCenterOrderMainVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertCenterOrderMain" parameterType="CenterOrderMain" useGeneratedKeys="true" keyProperty="id">
+        insert into center_order_main
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="companyCode != null">company_code,</if>
+            <if test="orderNo != null and orderNo != ''">order_no,</if>
+            <if test="applicationNo != null">application_no,</if>
+            <if test="policyNo != null">policy_no,</if>
+            <if test="payNo != null">pay_no,</if>
+            <if test="riskCode != null and riskCode != ''">risk_code,</if>
+            <if test="riskName != null and riskName != ''">risk_name,</if>
+            <if test="productCode != null and productCode != ''">product_code,</if>
+            <if test="productName != null and productName != ''">product_name,</if>
+            <if test="terminal != null">terminal,</if>
+            <if test="plyStartDate != null">ply_start_date,</if>
+            <if test="plyEndDate != null">ply_end_date,</if>
+            <if test="sumAmount != null">sum_amount,</if>
+            <if test="sumPremium != null">sum_premium,</if>
+            <if test="mult != null">mult,</if>
+            <if test="period != null and period != ''">period,</if>
+            <if test="payment != null and payment != ''">payment,</if>
+            <if test="payway != null and payway != ''">payway,</if>
+            <if test="status != null and status != ''">status,</if>
+            <if test="insuranceStatus != null">insurance_status,</if>
+            <if test="insuranceSubStatus != null">insurance_sub_status,</if>
+            <if test="tbStatus != null">tb_status,</if>
+            <if test="hbStatus != null">hb_status,</if>
+            <if test="custId != null">cust_id,</if>
+            <if test="createUser != null and createUser != ''">create_user,</if>
+            <if test="createDate != null">create_date,</if>
+            <if test="updateDate != null">update_date,</if>
+            <if test="mobile != null">mobile,</if>
+            <if test="email != null">email,</if>
+            <if test="residenceProvinceId != null">residence_province_Id,</if>
+            <if test="residenceCityId != null">residence_city_id,</if>
+            <if test="channel != null">channel,</if>
+            <if test="subchannel != null">subchannel,</if>
+            <if test="dataSource != null">data_source,</if>
+            <if test="dataFrom != null">data_from,</if>
+            <if test="bankCode != null">bank_code,</if>
+            <if test="bankName != null">bank_name,</if>
+            <if test="bankAccount != null">bank_account,</if>
+            <if test="bankProvince != null">bank_province,</if>
+            <if test="bankCity != null">bank_city,</if>
+            <if test="payFailReason != null">pay_fail_reason,</if>
+            <if test="payTransTime != null">pay_trans_time,</if>
+            <if test="hbManualFlag != null">hb_manual_flag,</if>
+            <if test="hbManualTime != null">hb_manual_time,</if>
+            <if test="hbManualMsg != null">hb_manual_msg,</if>
+            <if test="waitPayDelayMsg != null">wait_pay_delay_msg,</if>
+            <if test="hbFailReason != null">hb_fail_reason,</if>
+            <if test="policyTransTime != null">policy_trans_time,</if>
+            <if test="beneficiaryType != null and beneficiaryType != ''">beneficiary_type,</if>
+            <if test="insuredType != null and insuredType != ''">insured_type,</if>
+            <if test="giftMark != null">gift_mark,</if>
+            <if test="rnewFlag != null">rnew_flag,</if>
+            <if test="giftRnewFlag != null">gift_rnew_flag,</if>
+            <if test="payPlatformType != null">pay_platform_type,</if>
+            <if test="payUrl != null">pay_url,</if>
+            <if test="epolicyUrl != null">epolicy_url,</if>
+            <if test="visitUrl != null">visit_url,</if>
+            <if test="hostIPAddress != null">hostIPAddress,</if>
+            <if test="dataSourceDistincid != null">data_source_distincId,</if>
+            <if test="remark != null">remark,</if>
+            <if test="paramThird != null">paramThird,</if>
+            <if test="totalPremium != null">total_premium,</if>
+            <if test="periodPremium != null">period_premium,</if>
+            <if test="annualizedPremium != null">annualized_premium,</if>
+            <if test="refundTotal != null">refund_total,</if>
+            <if test="unpackOrder != null">unpack_order,</if>
+            <if test="createWeRunDataId != null">create_we_run_data_id,</if>
+            <if test="hbClass != null">hb_class,</if>
+            <if test="agentCode != null">agent_code,</if>
+            <if test="agentName != null">agent_name,</if>
+            <if test="coupleFlag != null">couple_flag,</if>
+            <if test="couplePolicyNo != null">couple_policy_no,</if>
+            <if test="prosOrderId != null">pros_order_id,</if>
+            <if test="tjUpdateDate != null">tj_update_date,</if>
+            <if test="hbUpdateDate != null">hb_update_date,</if>
+            <if test="zfUpdateDate != null">zf_update_date,</if>
+            <if test="cbUpdateDate != null">cb_update_date,</if>
+            <if test="tbUpdateDate != null">tb_update_date,</if>
+            <if test="ytUpdateDate != null">yt_update_date,</if>
+            <if test="sxUpdateDate != null">sx_update_date,</if>
+            <if test="fxUpdateDate != null">fx_update_date,</if>
+            <if test="wechatAppid != null">wechat_appid,</if>
+            <if test="wechatOpenid != null">wechat_openid,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="companyCode != null">#{companyCode},</if>
+            <if test="orderNo != null and orderNo != ''">#{orderNo},</if>
+            <if test="applicationNo != null">#{applicationNo},</if>
+            <if test="policyNo != null">#{policyNo},</if>
+            <if test="payNo != null">#{payNo},</if>
+            <if test="riskCode != null and riskCode != ''">#{riskCode},</if>
+            <if test="riskName != null and riskName != ''">#{riskName},</if>
+            <if test="productCode != null and productCode != ''">#{productCode},</if>
+            <if test="productName != null and productName != ''">#{productName},</if>
+            <if test="terminal != null">#{terminal},</if>
+            <if test="plyStartDate != null">#{plyStartDate},</if>
+            <if test="plyEndDate != null">#{plyEndDate},</if>
+            <if test="sumAmount != null">#{sumAmount},</if>
+            <if test="sumPremium != null">#{sumPremium},</if>
+            <if test="mult != null">#{mult},</if>
+            <if test="period != null and period != ''">#{period},</if>
+            <if test="payment != null and payment != ''">#{payment},</if>
+            <if test="payway != null and payway != ''">#{payway},</if>
+            <if test="status != null and status != ''">#{status},</if>
+            <if test="insuranceStatus != null">#{insuranceStatus},</if>
+            <if test="insuranceSubStatus != null">#{insuranceSubStatus},</if>
+            <if test="tbStatus != null">#{tbStatus},</if>
+            <if test="hbStatus != null">#{hbStatus},</if>
+            <if test="custId != null">#{custId},</if>
+            <if test="createUser != null and createUser != ''">#{createUser},</if>
+            <if test="createDate != null">#{createDate},</if>
+            <if test="updateDate != null">#{updateDate},</if>
+            <if test="mobile != null">#{mobile},</if>
+            <if test="email != null">#{email},</if>
+            <if test="residenceProvinceId != null">#{residenceProvinceId},</if>
+            <if test="residenceCityId != null">#{residenceCityId},</if>
+            <if test="channel != null">#{channel},</if>
+            <if test="subchannel != null">#{subchannel},</if>
+            <if test="dataSource != null">#{dataSource},</if>
+            <if test="dataFrom != null">#{dataFrom},</if>
+            <if test="bankCode != null">#{bankCode},</if>
+            <if test="bankName != null">#{bankName},</if>
+            <if test="bankAccount != null">#{bankAccount},</if>
+            <if test="bankProvince != null">#{bankProvince},</if>
+            <if test="bankCity != null">#{bankCity},</if>
+            <if test="payFailReason != null">#{payFailReason},</if>
+            <if test="payTransTime != null">#{payTransTime},</if>
+            <if test="hbManualFlag != null">#{hbManualFlag},</if>
+            <if test="hbManualTime != null">#{hbManualTime},</if>
+            <if test="hbManualMsg != null">#{hbManualMsg},</if>
+            <if test="waitPayDelayMsg != null">#{waitPayDelayMsg},</if>
+            <if test="hbFailReason != null">#{hbFailReason},</if>
+            <if test="policyTransTime != null">#{policyTransTime},</if>
+            <if test="beneficiaryType != null and beneficiaryType != ''">#{beneficiaryType},</if>
+            <if test="insuredType != null and insuredType != ''">#{insuredType},</if>
+            <if test="giftMark != null">#{giftMark},</if>
+            <if test="rnewFlag != null">#{rnewFlag},</if>
+            <if test="giftRnewFlag != null">#{giftRnewFlag},</if>
+            <if test="payPlatformType != null">#{payPlatformType},</if>
+            <if test="payUrl != null">#{payUrl},</if>
+            <if test="epolicyUrl != null">#{epolicyUrl},</if>
+            <if test="visitUrl != null">#{visitUrl},</if>
+            <if test="hostIPAddress != null">#{hostIPAddress},</if>
+            <if test="dataSourceDistincid != null">#{dataSourceDistincid},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="paramThird != null">#{paramThird},</if>
+            <if test="totalPremium != null">#{totalPremium},</if>
+            <if test="periodPremium != null">#{periodPremium},</if>
+            <if test="annualizedPremium != null">#{annualizedPremium},</if>
+            <if test="refundTotal != null">#{refundTotal},</if>
+            <if test="unpackOrder != null">#{unpackOrder},</if>
+            <if test="createWeRunDataId != null">#{createWeRunDataId},</if>
+            <if test="hbClass != null">#{hbClass},</if>
+            <if test="agentCode != null">#{agentCode},</if>
+            <if test="agentName != null">#{agentName},</if>
+            <if test="coupleFlag != null">#{coupleFlag},</if>
+            <if test="couplePolicyNo != null">#{couplePolicyNo},</if>
+            <if test="prosOrderId != null">#{prosOrderId},</if>
+            <if test="tjUpdateDate != null">#{tjUpdateDate},</if>
+            <if test="hbUpdateDate != null">#{hbUpdateDate},</if>
+            <if test="zfUpdateDate != null">#{zfUpdateDate},</if>
+            <if test="cbUpdateDate != null">#{cbUpdateDate},</if>
+            <if test="tbUpdateDate != null">#{tbUpdateDate},</if>
+            <if test="ytUpdateDate != null">#{ytUpdateDate},</if>
+            <if test="sxUpdateDate != null">#{sxUpdateDate},</if>
+            <if test="fxUpdateDate != null">#{fxUpdateDate},</if>
+            <if test="wechatAppid != null">#{wechatAppid},</if>
+            <if test="wechatOpenid != null">#{wechatOpenid},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCenterOrderMain" parameterType="CenterOrderMain">
+        update center_order_main
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="companyCode != null">company_code = #{companyCode},</if>
+            <if test="orderNo != null and orderNo != ''">order_no = #{orderNo},</if>
+            <if test="applicationNo != null">application_no = #{applicationNo},</if>
+            <if test="policyNo != null">policy_no = #{policyNo},</if>
+            <if test="payNo != null">pay_no = #{payNo},</if>
+            <if test="riskCode != null and riskCode != ''">risk_code = #{riskCode},</if>
+            <if test="riskName != null and riskName != ''">risk_name = #{riskName},</if>
+            <if test="productCode != null and productCode != ''">product_code = #{productCode},</if>
+            <if test="productName != null and productName != ''">product_name = #{productName},</if>
+            <if test="terminal != null">terminal = #{terminal},</if>
+            <if test="plyStartDate != null">ply_start_date = #{plyStartDate},</if>
+            <if test="plyEndDate != null">ply_end_date = #{plyEndDate},</if>
+            <if test="sumAmount != null">sum_amount = #{sumAmount},</if>
+            <if test="sumPremium != null">sum_premium = #{sumPremium},</if>
+            <if test="mult != null">mult = #{mult},</if>
+            <if test="period != null and period != ''">period = #{period},</if>
+            <if test="payment != null and payment != ''">payment = #{payment},</if>
+            <if test="payway != null and payway != ''">payway = #{payway},</if>
+            <if test="status != null and status != ''">status = #{status},</if>
+            <if test="insuranceStatus != null">insurance_status = #{insuranceStatus},</if>
+            <if test="insuranceSubStatus != null">insurance_sub_status = #{insuranceSubStatus},</if>
+            <if test="tbStatus != null">tb_status = #{tbStatus},</if>
+            <if test="hbStatus != null">hb_status = #{hbStatus},</if>
+            <if test="custId != null">cust_id = #{custId},</if>
+            <if test="createUser != null and createUser != ''">create_user = #{createUser},</if>
+            <if test="createDate != null">create_date = #{createDate},</if>
+            <if test="updateDate != null">update_date = #{updateDate},</if>
+            <if test="mobile != null">mobile = #{mobile},</if>
+            <if test="email != null">email = #{email},</if>
+            <if test="residenceProvinceId != null">residence_province_Id = #{residenceProvinceId},</if>
+            <if test="residenceCityId != null">residence_city_id = #{residenceCityId},</if>
+            <if test="channel != null">channel = #{channel},</if>
+            <if test="subchannel != null">subchannel = #{subchannel},</if>
+            <if test="dataSource != null">data_source = #{dataSource},</if>
+            <if test="dataFrom != null">data_from = #{dataFrom},</if>
+            <if test="bankCode != null">bank_code = #{bankCode},</if>
+            <if test="bankName != null">bank_name = #{bankName},</if>
+            <if test="bankAccount != null">bank_account = #{bankAccount},</if>
+            <if test="bankProvince != null">bank_province = #{bankProvince},</if>
+            <if test="bankCity != null">bank_city = #{bankCity},</if>
+            <if test="payFailReason != null">pay_fail_reason = #{payFailReason},</if>
+            <if test="payTransTime != null">pay_trans_time = #{payTransTime},</if>
+            <if test="hbManualFlag != null">hb_manual_flag = #{hbManualFlag},</if>
+            <if test="hbManualTime != null">hb_manual_time = #{hbManualTime},</if>
+            <if test="hbManualMsg != null">hb_manual_msg = #{hbManualMsg},</if>
+            <if test="waitPayDelayMsg != null">wait_pay_delay_msg = #{waitPayDelayMsg},</if>
+            <if test="hbFailReason != null">hb_fail_reason = #{hbFailReason},</if>
+            <if test="policyTransTime != null">policy_trans_time = #{policyTransTime},</if>
+            <if test="beneficiaryType != null and beneficiaryType != ''">beneficiary_type = #{beneficiaryType},</if>
+            <if test="insuredType != null and insuredType != ''">insured_type = #{insuredType},</if>
+            <if test="giftMark != null">gift_mark = #{giftMark},</if>
+            <if test="rnewFlag != null">rnew_flag = #{rnewFlag},</if>
+            <if test="giftRnewFlag != null">gift_rnew_flag = #{giftRnewFlag},</if>
+            <if test="payPlatformType != null">pay_platform_type = #{payPlatformType},</if>
+            <if test="payUrl != null">pay_url = #{payUrl},</if>
+            <if test="epolicyUrl != null">epolicy_url = #{epolicyUrl},</if>
+            <if test="visitUrl != null">visit_url = #{visitUrl},</if>
+            <if test="hostIPAddress != null">hostIPAddress = #{hostIPAddress},</if>
+            <if test="dataSourceDistincid != null">data_source_distincId = #{dataSourceDistincid},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="paramThird != null">paramThird = #{paramThird},</if>
+            <if test="totalPremium != null">total_premium = #{totalPremium},</if>
+            <if test="periodPremium != null">period_premium = #{periodPremium},</if>
+            <if test="annualizedPremium != null">annualized_premium = #{annualizedPremium},</if>
+            <if test="refundTotal != null">refund_total = #{refundTotal},</if>
+            <if test="unpackOrder != null">unpack_order = #{unpackOrder},</if>
+            <if test="createWeRunDataId != null">create_we_run_data_id = #{createWeRunDataId},</if>
+            <if test="hbClass != null">hb_class = #{hbClass},</if>
+            <if test="agentCode != null">agent_code = #{agentCode},</if>
+            <if test="agentName != null">agent_name = #{agentName},</if>
+            <if test="coupleFlag != null">couple_flag = #{coupleFlag},</if>
+            <if test="couplePolicyNo != null">couple_policy_no = #{couplePolicyNo},</if>
+            <if test="prosOrderId != null">pros_order_id = #{prosOrderId},</if>
+            <if test="tjUpdateDate != null">tj_update_date = #{tjUpdateDate},</if>
+            <if test="hbUpdateDate != null">hb_update_date = #{hbUpdateDate},</if>
+            <if test="zfUpdateDate != null">zf_update_date = #{zfUpdateDate},</if>
+            <if test="cbUpdateDate != null">cb_update_date = #{cbUpdateDate},</if>
+            <if test="tbUpdateDate != null">tb_update_date = #{tbUpdateDate},</if>
+            <if test="ytUpdateDate != null">yt_update_date = #{ytUpdateDate},</if>
+            <if test="sxUpdateDate != null">sx_update_date = #{sxUpdateDate},</if>
+            <if test="fxUpdateDate != null">fx_update_date = #{fxUpdateDate},</if>
+            <if test="wechatAppid != null">wechat_appid = #{wechatAppid},</if>
+            <if test="wechatOpenid != null">wechat_openid = #{wechatOpenid},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCenterOrderMainById" parameterType="Long">
+        delete from center_order_main where id = #{id}
+    </delete>
+
+    <delete id="deleteCenterOrderMainByIds" parameterType="String">
+        delete from center_order_main where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 277 - 0
product-center-manage-business/src/main/resources/mapper/CenterOrderPersonMapper.xml

@@ -0,0 +1,277 @@
+<?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.product.center.manage.mapper.CenterOrderPersonMapper">
+
+    <resultMap type="com.product.center.manage.domain.CenterOrderPerson" id="CenterOrderPersonResult">
+        <result property="id"    column="id"    />
+        <result property="orderNo"    column="order_no"    />
+        <result property="name"    column="name"    />
+        <result property="sex"    column="sex"    />
+        <result property="birthday"    column="birthday"    />
+        <result property="age"    column="age"    />
+        <result property="certType"    column="cert_type"    />
+        <result property="certTypeStr"    column="cert_type_str"    />
+        <result property="certNo"    column="cert_no"    />
+        <result property="certForever"    column="cert_forever"    />
+        <result property="certForeverDate"    column="cert_forever_date"    />
+        <result property="certStart"    column="cert_start"    />
+        <result property="certValid"    column="cert_valid"    />
+        <result property="occup"    column="occup"    />
+        <result property="occupName"    column="occup_name"    />
+        <result property="occupLevel"    column="occup_level"    />
+        <result property="height"    column="height"    />
+        <result property="weight"    column="weight"    />
+        <result property="phone"    column="phone"    />
+        <result property="email"    column="email"    />
+        <result property="mobile"    column="mobile"    />
+        <result property="type"    column="type"    />
+        <result property="provId"    column="prov_id"    />
+        <result property="provName"    column="prov_name"    />
+        <result property="cityId"    column="city_id"    />
+        <result property="cityName"    column="city_name"    />
+        <result property="countryId"    column="country_id"    />
+        <result property="countryName"    column="country_name"    />
+        <result property="address"    column="address"    />
+        <result property="marriage"    column="marriage"    />
+        <result property="degree"    column="degree"    />
+        <result property="nativePlace"    column="native_place"    />
+        <result property="socialSecurity"    column="social_security"    />
+        <result property="relation"    column="relation"    />
+        <result property="benefSeq"    column="benef_seq"    />
+        <result property="benefRatio"    column="benef_ratio"    />
+        <result property="parentInsure"    column="parent_insure"    />
+        <result property="answers"    column="answers"    />
+        <result property="benefType"    column="benef_type"    />
+        <result property="healthAnswers"    column="health_answers"    />
+        <result property="enterpriseName"    column="enterprise_name"    />
+        <result property="organization"    column="organization"    />
+        <result property="taxregistration"    column="taxregistration"    />
+        <result property="salary"    column="salary"    />
+        <result property="annualIncome"    column="annual_income"    />
+        <result property="annualIncomeSource"    column="annual_income_source"    />
+    </resultMap>
+
+    <sql id="selectCenterOrderPersonVo">
+        select id, order_no, name, sex, birthday, age, cert_type, cert_type_str, cert_no, cert_forever, cert_forever_date, cert_start, cert_valid, occup, occup_name, occup_level, height, weight, phone, email, mobile, type, prov_id, prov_name, city_id, city_name, country_id, country_name, address, marriage, degree, native_place, social_security, relation, benef_seq, benef_ratio, parent_insure, answers, benef_type, health_answers, enterprise_name, organization, taxregistration, salary, annual_income, annual_income_source from center_order_person
+    </sql>
+
+    <select id="selectCenterOrderPersonList" parameterType="CenterOrderPerson" resultMap="CenterOrderPersonResult">
+        <include refid="selectCenterOrderPersonVo"/>
+        <where>
+            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="sex != null "> and sex = #{sex}</if>
+            <if test="birthday != null "> and birthday = #{birthday}</if>
+            <if test="age != null "> and age = #{age}</if>
+            <if test="certType != null  and certType != ''"> and cert_type = #{certType}</if>
+            <if test="certTypeStr != null  and certTypeStr != ''"> and cert_type_str = #{certTypeStr}</if>
+            <if test="certNo != null  and certNo != ''"> and cert_no = #{certNo}</if>
+            <if test="certForever != null  and certForever != ''"> and cert_forever = #{certForever}</if>
+            <if test="certForeverDate != null  and certForeverDate != ''"> and cert_forever_date = #{certForeverDate}</if>
+            <if test="certStart != null  and certStart != ''"> and cert_start = #{certStart}</if>
+            <if test="certValid != null  and certValid != ''"> and cert_valid = #{certValid}</if>
+            <if test="occup != null  and occup != ''"> and occup = #{occup}</if>
+            <if test="occupName != null  and occupName != ''"> and occup_name like concat('%', #{occupName}, '%')</if>
+            <if test="occupLevel != null  and occupLevel != ''"> and occup_level = #{occupLevel}</if>
+            <if test="height != null  and height != ''"> and height = #{height}</if>
+            <if test="weight != null  and weight != ''"> and weight = #{weight}</if>
+            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
+            <if test="email != null  and email != ''"> and email = #{email}</if>
+            <if test="mobile != null  and mobile != ''"> and mobile = #{mobile}</if>
+            <if test="type != null  and type != ''"> and type = #{type}</if>
+            <if test="provId != null  and provId != ''"> and prov_id = #{provId}</if>
+            <if test="provName != null  and provName != ''"> and prov_name like concat('%', #{provName}, '%')</if>
+            <if test="cityId != null  and cityId != ''"> and city_id = #{cityId}</if>
+            <if test="cityName != null  and cityName != ''"> and city_name like concat('%', #{cityName}, '%')</if>
+            <if test="countryId != null  and countryId != ''"> and country_id = #{countryId}</if>
+            <if test="countryName != null  and countryName != ''"> and country_name like concat('%', #{countryName}, '%')</if>
+            <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="marriage != null  and marriage != ''"> and marriage = #{marriage}</if>
+            <if test="degree != null  and degree != ''"> and degree = #{degree}</if>
+            <if test="nativePlace != null  and nativePlace != ''"> and native_place = #{nativePlace}</if>
+            <if test="socialSecurity != null  and socialSecurity != ''"> and social_security = #{socialSecurity}</if>
+            <if test="relation != null  and relation != ''"> and relation = #{relation}</if>
+            <if test="benefSeq != null "> and benef_seq = #{benefSeq}</if>
+            <if test="benefRatio != null  and benefRatio != ''"> and benef_ratio = #{benefRatio}</if>
+            <if test="parentInsure != null  and parentInsure != ''"> and parent_insure = #{parentInsure}</if>
+            <if test="answers != null  and answers != ''"> and answers = #{answers}</if>
+            <if test="benefType != null  and benefType != ''"> and benef_type = #{benefType}</if>
+            <if test="healthAnswers != null  and healthAnswers != ''"> and health_answers = #{healthAnswers}</if>
+            <if test="enterpriseName != null  and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
+            <if test="organization != null  and organization != ''"> and organization = #{organization}</if>
+            <if test="taxregistration != null  and taxregistration != ''"> and taxregistration = #{taxregistration}</if>
+            <if test="salary != null "> and salary = #{salary}</if>
+            <if test="annualIncome != null  and annualIncome != ''"> and annual_income = #{annualIncome}</if>
+            <if test="annualIncomeSource != null  and annualIncomeSource != ''"> and annual_income_source = #{annualIncomeSource}</if>
+        </where>
+    </select>
+
+    <select id="selectCenterOrderPersonById" parameterType="Long" resultMap="CenterOrderPersonResult">
+        <include refid="selectCenterOrderPersonVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertCenterOrderPerson" parameterType="CenterOrderPerson" useGeneratedKeys="true" keyProperty="id">
+        insert into center_order_person
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="orderNo != null and orderNo != ''">order_no,</if>
+            <if test="name != null">name,</if>
+            <if test="sex != null">sex,</if>
+            <if test="birthday != null">birthday,</if>
+            <if test="age != null">age,</if>
+            <if test="certType != null and certType != ''">cert_type,</if>
+            <if test="certTypeStr != null">cert_type_str,</if>
+            <if test="certNo != null and certNo != ''">cert_no,</if>
+            <if test="certForever != null">cert_forever,</if>
+            <if test="certForeverDate != null">cert_forever_date,</if>
+            <if test="certStart != null">cert_start,</if>
+            <if test="certValid != null">cert_valid,</if>
+            <if test="occup != null">occup,</if>
+            <if test="occupName != null">occup_name,</if>
+            <if test="occupLevel != null">occup_level,</if>
+            <if test="height != null">height,</if>
+            <if test="weight != null">weight,</if>
+            <if test="phone != null">phone,</if>
+            <if test="email != null">email,</if>
+            <if test="mobile != null and mobile != ''">mobile,</if>
+            <if test="type != null and type != ''">type,</if>
+            <if test="provId != null">prov_id,</if>
+            <if test="provName != null">prov_name,</if>
+            <if test="cityId != null">city_id,</if>
+            <if test="cityName != null">city_name,</if>
+            <if test="countryId != null">country_id,</if>
+            <if test="countryName != null">country_name,</if>
+            <if test="address != null">address,</if>
+            <if test="marriage != null">marriage,</if>
+            <if test="degree != null">degree,</if>
+            <if test="nativePlace != null">native_place,</if>
+            <if test="socialSecurity != null">social_security,</if>
+            <if test="relation != null">relation,</if>
+            <if test="benefSeq != null">benef_seq,</if>
+            <if test="benefRatio != null">benef_ratio,</if>
+            <if test="parentInsure != null">parent_insure,</if>
+            <if test="answers != null">answers,</if>
+            <if test="benefType != null">benef_type,</if>
+            <if test="healthAnswers != null">health_answers,</if>
+            <if test="enterpriseName != null">enterprise_name,</if>
+            <if test="organization != null">organization,</if>
+            <if test="taxregistration != null">taxregistration,</if>
+            <if test="salary != null">salary,</if>
+            <if test="annualIncome != null">annual_income,</if>
+            <if test="annualIncomeSource != null">annual_income_source,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="orderNo != null and orderNo != ''">#{orderNo},</if>
+            <if test="name != null">#{name},</if>
+            <if test="sex != null">#{sex},</if>
+            <if test="birthday != null">#{birthday},</if>
+            <if test="age != null">#{age},</if>
+            <if test="certType != null and certType != ''">#{certType},</if>
+            <if test="certTypeStr != null">#{certTypeStr},</if>
+            <if test="certNo != null and certNo != ''">#{certNo},</if>
+            <if test="certForever != null">#{certForever},</if>
+            <if test="certForeverDate != null">#{certForeverDate},</if>
+            <if test="certStart != null">#{certStart},</if>
+            <if test="certValid != null">#{certValid},</if>
+            <if test="occup != null">#{occup},</if>
+            <if test="occupName != null">#{occupName},</if>
+            <if test="occupLevel != null">#{occupLevel},</if>
+            <if test="height != null">#{height},</if>
+            <if test="weight != null">#{weight},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="email != null">#{email},</if>
+            <if test="mobile != null and mobile != ''">#{mobile},</if>
+            <if test="type != null and type != ''">#{type},</if>
+            <if test="provId != null">#{provId},</if>
+            <if test="provName != null">#{provName},</if>
+            <if test="cityId != null">#{cityId},</if>
+            <if test="cityName != null">#{cityName},</if>
+            <if test="countryId != null">#{countryId},</if>
+            <if test="countryName != null">#{countryName},</if>
+            <if test="address != null">#{address},</if>
+            <if test="marriage != null">#{marriage},</if>
+            <if test="degree != null">#{degree},</if>
+            <if test="nativePlace != null">#{nativePlace},</if>
+            <if test="socialSecurity != null">#{socialSecurity},</if>
+            <if test="relation != null">#{relation},</if>
+            <if test="benefSeq != null">#{benefSeq},</if>
+            <if test="benefRatio != null">#{benefRatio},</if>
+            <if test="parentInsure != null">#{parentInsure},</if>
+            <if test="answers != null">#{answers},</if>
+            <if test="benefType != null">#{benefType},</if>
+            <if test="healthAnswers != null">#{healthAnswers},</if>
+            <if test="enterpriseName != null">#{enterpriseName},</if>
+            <if test="organization != null">#{organization},</if>
+            <if test="taxregistration != null">#{taxregistration},</if>
+            <if test="salary != null">#{salary},</if>
+            <if test="annualIncome != null">#{annualIncome},</if>
+            <if test="annualIncomeSource != null">#{annualIncomeSource},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCenterOrderPerson" parameterType="CenterOrderPerson">
+        update center_order_person
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="orderNo != null and orderNo != ''">order_no = #{orderNo},</if>
+            <if test="name != null">name = #{name},</if>
+            <if test="sex != null">sex = #{sex},</if>
+            <if test="birthday != null">birthday = #{birthday},</if>
+            <if test="age != null">age = #{age},</if>
+            <if test="certType != null and certType != ''">cert_type = #{certType},</if>
+            <if test="certTypeStr != null">cert_type_str = #{certTypeStr},</if>
+            <if test="certNo != null and certNo != ''">cert_no = #{certNo},</if>
+            <if test="certForever != null">cert_forever = #{certForever},</if>
+            <if test="certForeverDate != null">cert_forever_date = #{certForeverDate},</if>
+            <if test="certStart != null">cert_start = #{certStart},</if>
+            <if test="certValid != null">cert_valid = #{certValid},</if>
+            <if test="occup != null">occup = #{occup},</if>
+            <if test="occupName != null">occup_name = #{occupName},</if>
+            <if test="occupLevel != null">occup_level = #{occupLevel},</if>
+            <if test="height != null">height = #{height},</if>
+            <if test="weight != null">weight = #{weight},</if>
+            <if test="phone != null">phone = #{phone},</if>
+            <if test="email != null">email = #{email},</if>
+            <if test="mobile != null and mobile != ''">mobile = #{mobile},</if>
+            <if test="type != null and type != ''">type = #{type},</if>
+            <if test="provId != null">prov_id = #{provId},</if>
+            <if test="provName != null">prov_name = #{provName},</if>
+            <if test="cityId != null">city_id = #{cityId},</if>
+            <if test="cityName != null">city_name = #{cityName},</if>
+            <if test="countryId != null">country_id = #{countryId},</if>
+            <if test="countryName != null">country_name = #{countryName},</if>
+            <if test="address != null">address = #{address},</if>
+            <if test="marriage != null">marriage = #{marriage},</if>
+            <if test="degree != null">degree = #{degree},</if>
+            <if test="nativePlace != null">native_place = #{nativePlace},</if>
+            <if test="socialSecurity != null">social_security = #{socialSecurity},</if>
+            <if test="relation != null">relation = #{relation},</if>
+            <if test="benefSeq != null">benef_seq = #{benefSeq},</if>
+            <if test="benefRatio != null">benef_ratio = #{benefRatio},</if>
+            <if test="parentInsure != null">parent_insure = #{parentInsure},</if>
+            <if test="answers != null">answers = #{answers},</if>
+            <if test="benefType != null">benef_type = #{benefType},</if>
+            <if test="healthAnswers != null">health_answers = #{healthAnswers},</if>
+            <if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
+            <if test="organization != null">organization = #{organization},</if>
+            <if test="taxregistration != null">taxregistration = #{taxregistration},</if>
+            <if test="salary != null">salary = #{salary},</if>
+            <if test="annualIncome != null">annual_income = #{annualIncome},</if>
+            <if test="annualIncomeSource != null">annual_income_source = #{annualIncomeSource},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCenterOrderPersonById" parameterType="Long">
+        delete from center_order_person where id = #{id}
+    </delete>
+
+    <delete id="deleteCenterOrderPersonByIds" parameterType="String">
+        delete from center_order_person where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 6 - 6
product-center-manage-business/src/main/resources/mapper/CenterPolicySynConfMapper.xml

@@ -9,7 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="channel"    column="channel"    />
         <result property="uri"    column="uri"    />
         <result property="aliasName"    column="alias_name"    />
-        <result property="lastUpdateDate"    column="last_update_date"    />
+        <result property="lastSynPolicyId"    column="last_syn_policy_id"    />
         <result property="aesKey"    column="aes_key"    />
         <result property="remark"    column="remark"    />
         <result property="isOpen"    column="is_open"    />
@@ -17,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectCenterPolicySynConfVo">
-        select id, channel, uri, alias_name, last_update_date, aes_key, remark, is_open, create_time from center_policy_syn_conf
+        select id, channel, uri, alias_name, last_syn_policy_id, aes_key, remark, is_open, create_time, sign_key from center_policy_syn_conf
     </sql>
 
     <select id="selectCenterPolicySynConfList" parameterType="CenterPolicySynConf" resultMap="CenterPolicySynConfResult">
@@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="channel != null  and channel != ''"> and channel = #{channel}</if>
             <if test="uri != null  and uri != ''"> and uri = #{uri}</if>
             <if test="aliasName != null  and aliasName != ''"> and alias_name like concat('%', #{aliasName}, '%')</if>
-            <if test="lastUpdateDate != null  and lastUpdateDate != ''"> and last_update_date = #{lastUpdateDate}</if>
+            <if test="lastSynPolicyId != null  and lastSynPolicyId != ''"> and last_syn_policy_id = #{lastSynPolicyId}</if>
             <if test="aesKey != null  and aesKey != ''"> and aes_key = #{aesKey}</if>
             <if test="isOpen != null "> and is_open = #{isOpen}</if>
         </where>
@@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="channel != null">channel,</if>
             <if test="uri != null">uri,</if>
             <if test="aliasName != null">alias_name,</if>
-            <if test="lastUpdateDate != null">last_update_date,</if>
+            <if test="lastSynPolicyId != null">last_syn_policy_id,</if>
             <if test="aesKey != null">aes_key,</if>
             <if test="remark != null">remark,</if>
             <if test="isOpen != null">is_open,</if>
@@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="channel != null">#{channel},</if>
             <if test="uri != null">#{uri},</if>
             <if test="aliasName != null">#{aliasName},</if>
-            <if test="lastUpdateDate != null">#{lastUpdateDate},</if>
+            <if test="lastSynPolicyId != null">#{lastSynPolicyId},</if>
             <if test="aesKey != null">#{aesKey},</if>
             <if test="remark != null">#{remark},</if>
             <if test="isOpen != null">#{isOpen},</if>
@@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="channel != null">channel = #{channel},</if>
             <if test="uri != null">uri = #{uri},</if>
             <if test="aliasName != null">alias_name = #{aliasName},</if>
-            <if test="lastUpdateDate != null">last_update_date = #{lastUpdateDate},</if>
+            <if test="lastSynPolicyId != null">last_syn_policy_id = #{lastSynPolicyId},</if>
             <if test="aesKey != null">aes_key = #{aesKey},</if>
             <if test="remark != null">remark = #{remark},</if>
             <if test="isOpen != null">is_open = #{isOpen},</if>

+ 65 - 0
product-center-manage-business/src/main/test/java/com/product/center/manage/TestMain.java

@@ -0,0 +1,65 @@
+package com.product.center.manage;
+
+import cn.hutool.crypto.Mode;
+import cn.hutool.crypto.Padding;
+import cn.hutool.crypto.symmetric.AES;
+import org.junit.Test;
+
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * @author :fxl
+ * @date :Created in 2022/9/26 10:06
+ * @description:
+ */
+public class TestMain {
+
+
+
+    @Test
+    public void test01(){
+
+        String encryptData = encryptFromString("凯森数据中台", "1234567812345678");
+        System.out.println("加密:" + encryptData);
+        String decryptData = decryptFromString(encryptData, "1234567812345678");
+        System.out.println("解密:" + decryptData);
+
+    }
+
+    private static final String IV_KEY = "0000000000000000";
+
+    /**
+     * 加密方法
+     * @param data
+     * @param aesKey
+     * @return
+     */
+    public static String encryptFromString(String data, String aesKey) {
+        AES aes = new AES(Mode.CBC, Padding.ZeroPadding,
+                new SecretKeySpec(aesKey.getBytes(), "AES"),
+                new IvParameterSpec(IV_KEY.getBytes()));
+        return aes.encryptBase64(data, StandardCharsets.UTF_8);
+    }
+
+
+    /**
+     * 解密方法
+     * @param data
+     * @param aesKey
+     * @return
+     */
+    public static String decryptFromString(String data, String aesKey) {
+        AES aes = new AES(Mode.CBC, Padding.ZeroPadding,
+                new SecretKeySpec(aesKey.getBytes(), "AES"),
+                new IvParameterSpec(IV_KEY.getBytes()));
+        byte[] decryptDataBase64 = aes.decrypt(data);
+        return new String(decryptDataBase64, StandardCharsets.UTF_8);
+    }
+
+
+}
+
+
+

+ 18 - 0
product-center-manage-common/pom.xml

@@ -115,6 +115,24 @@
             <artifactId>lombok</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.8.7</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk15to18</artifactId>
+            <version>1.68</version>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-crypto</artifactId>
+            <version>5.8.7</version>
+        </dependency>
 
     </dependencies>