Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

zhuth 7 years ago
parent
commit
a89127f65f
16 changed files with 1354 additions and 0 deletions
  1. 4 0
      applications/document/document-dto/pom.xml
  2. 61 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Customer.java
  3. 112 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/CustomerList.java
  4. 32 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Customeraddress.java
  5. 32 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Customercontact.java
  6. 34 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java
  7. 11 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerListMapper.java
  8. 18 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java
  9. 21 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomeraddressMapper.java
  10. 19 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomercontactMapper.java
  11. 17 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerService.java
  12. 60 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  13. 108 0
      applications/document/document-server/src/main/resources/mapper/CustomerListMapper.xml
  14. 377 0
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  15. 236 0
      applications/document/document-server/src/main/resources/mapper/CustomeraddressMapper.xml
  16. 212 0
      applications/document/document-server/src/main/resources/mapper/CustomercontactMapper.xml

+ 4 - 0
applications/document/document-dto/pom.xml

@@ -22,6 +22,10 @@
             <groupId>com.usoftchina.saas</groupId>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>core</artifactId>
             <artifactId>core</artifactId>
         </dependency>
         </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
     </dependencies>
     </dependencies>
 
 
 </project>
 </project>

+ 61 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Customer.java

@@ -0,0 +1,61 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+@Data
+public class Customer extends CommonBaseEntity implements Serializable {
+
+    private String cu_code;
+
+    private String cu_name;
+
+    private String cu_uu;
+
+    private String cu_type;
+
+    private Date cu_begindate;
+
+    private Double cu_beginaramount;
+
+    private Double cu_beginprerecamount;
+
+    private Double cu_promisedays;
+
+    private Double cu_taxrate;
+
+    private Integer cu_sellerid;
+
+    private String cu_sellercode;
+
+    private String cu_sellername;
+
+    private Double cu_credit;
+
+    private String cu_status;
+
+    private String cu_statuscode;
+
+    private Integer cu_recordmanid;
+
+    private String cu_recordman;
+
+    private Date cu_recorddate;
+
+    private String cu_text1;
+
+    private String cu_text2;
+
+    private String cu_text3;
+
+    private String cu_text4;
+
+    private String cu_text5;
+
+    private Double cu_leftamount;
+
+    private Double cu_recamount;
+
+}

+ 112 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/CustomerList.java

@@ -0,0 +1,112 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * Created by zdw
+ * 2018-10-23 15:35.
+ */
+
+@Data
+public class CustomerList extends CommonBaseEntity{
+//customer
+    private String cu_code;
+
+    private String cu_name;
+
+    private String cu_uu;
+
+    private String cu_type;
+
+    private Date cu_begindate;
+
+    private Double cu_beginaramount;
+
+    private Double cu_beginprerecamount;
+
+    private Double cu_promisedays;
+
+    private Double cu_taxrate;
+
+    private Integer cu_sellerid;
+
+    private String cu_sellercode;
+
+    private String cu_sellername;
+
+    private Double cu_credit;
+
+    private String cu_status;
+
+    private String cu_statuscode;
+
+    private Integer cu_recordmanid;
+
+    private String cu_recordman;
+
+    private Date cu_recorddate;
+
+    private String cu_text1;
+
+    private String cu_text2;
+
+    private String cu_text3;
+
+    private String cu_text4;
+
+    private String cu_text5;
+
+    private Double cu_leftamount;
+
+    private Double cu_recamount;
+//customeraddress
+
+    private Long ca_cuid;
+
+    private Integer ca_detno;
+
+    private String ca_person;
+
+    private Integer ca_phone;
+
+    private Integer ca_default;
+
+    private String ca_text1;
+
+    private String ca_text2;
+
+    private String ca_text3;
+
+    private String ca_text4;
+
+    private String ca_text5;
+
+    private String ca_address;
+//    Customercontact
+
+    private Long cc_cuid;
+
+    private Integer cc_detno;
+
+    private String cc_name;
+
+    private Integer cc_tel;
+
+    private String cc_qq;
+
+    private String cc_email;
+
+    private String cc_text1;
+
+    private String cc_text2;
+
+    private String cc_text3;
+
+    private String cc_text4;
+
+    private String cc_text5;
+
+}

+ 32 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Customeraddress.java

@@ -0,0 +1,32 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+@Data
+public class Customeraddress extends CommonBaseEntity implements Serializable {
+
+    private Long ca_cuid;
+
+    private Integer ca_detno;
+
+    private String ca_person;
+
+    private Integer ca_phone;
+
+    private Integer ca_default;
+
+    private String ca_text1;
+
+    private String ca_text2;
+
+    private String ca_text3;
+
+    private String ca_text4;
+
+    private String ca_text5;
+
+    private String ca_address;
+
+}

+ 32 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Customercontact.java

@@ -0,0 +1,32 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+@Data
+public class Customercontact extends CommonBaseEntity implements Serializable {
+
+    private Long cc_cuid;
+
+    private Integer cc_detno;
+
+    private String cc_name;
+
+    private Integer cc_tel;
+
+    private String cc_qq;
+
+    private String cc_email;
+
+    private String cc_text1;
+
+    private String cc_text2;
+
+    private String cc_text3;
+
+    private String cc_text4;
+
+    private String cc_text5;
+
+}

+ 34 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java

@@ -1,9 +1,43 @@
 package com.usoftchina.saas.document.controller;
 package com.usoftchina.saas.document.controller;
 
 
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.document.entities.CustomerList;
+import com.usoftchina.saas.document.service.CustomerService;
+import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 /**
 /**
  * Created by zdw
  * Created by zdw
  * 2018-10-23 11:39.
  * 2018-10-23 11:39.
  */
  */
 
 
+@RestController
+@RequestMapping("/customer")
 public class CustomerController {
 public class CustomerController {
+
+    @Autowired
+    private CustomerService customerService;
+
+    /**
+     * 采购订单列表
+     *
+     * @param page
+     * @param req
+     * @return
+     */
+    @GetMapping("/list")
+    public Result<PageInfo<CustomerList>> getListData(PageRequest page, ListReqDTO req) {
+        PageInfo<CustomerList> listData = customerService.getListData(page, req);
+        return Result.success(listData);
+    }
+
+
+
+
+
 }
 }

+ 11 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerListMapper.java

@@ -0,0 +1,11 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.document.entities.CustomerList;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface CustomerListMapper {
+    List<CustomerList> selectCustomerListByCondition(@Param("con") String con, @Param("companyId") Long companyId);
+    List<CustomerList> selectCustomerBycondition(@Param("con") String con, @Param("companyId") Long companyId);
+}

+ 18 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java

@@ -0,0 +1,18 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Customer;
+
+public interface CustomerMapper extends CommonBaseMapper<Customer> {
+    int deleteByPrimaryKey(Integer cu_id);
+
+    int insert(Customer record);
+
+    int insertSelective(Customer record);
+
+    Customer selectByPrimaryKey(Integer cu_id);
+
+    int updateByPrimaryKeySelective(Customer record);
+
+    int updateByPrimaryKey(Customer record);
+}

+ 21 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomeraddressMapper.java

@@ -0,0 +1,21 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Customer;
+import com.usoftchina.saas.document.entities.Customeraddress;
+
+public interface CustomeraddressMapper extends CommonBaseMapper<Customer> {
+    int deleteByPrimaryKey(Integer ca_id);
+
+    int insert(Customeraddress record);
+
+    int insertSelective(Customeraddress record);
+
+    Customeraddress selectByPrimaryKey(Integer ca_id);
+
+    int updateByPrimaryKeySelective(Customeraddress record);
+
+    int updateByPrimaryKeyWithBLOBs(Customeraddress record);
+
+    int updateByPrimaryKey(Customeraddress record);
+}

+ 19 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomercontactMapper.java

@@ -0,0 +1,19 @@
+package com.usoftchina.saas.document.mapper;
+
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Customercontact;
+
+public interface CustomercontactMapper extends CommonBaseMapper<Customercontact> {
+    int deleteByPrimaryKey(Integer cc_id);
+
+    int insert(Customercontact record);
+
+    int insertSelective(Customercontact record);
+
+    Customercontact selectByPrimaryKey(Integer cc_id);
+
+    int updateByPrimaryKeySelective(Customercontact record);
+
+    int updateByPrimaryKey(Customercontact record);
+}

+ 17 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerService.java

@@ -0,0 +1,17 @@
+package com.usoftchina.saas.document.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.document.entities.Customer;
+import com.usoftchina.saas.document.entities.CustomerList;
+import com.usoftchina.saas.document.mapper.CustomerMapper;
+import com.usoftchina.saas.page.PageRequest;
+
+/**
+ * Created by zdw
+ * 2018-10-23 15:26.
+ */
+public interface CustomerService extends CommonBaseService<CustomerMapper, Customer> {
+    PageInfo<CustomerList> getListData(PageRequest page, ListReqDTO req);
+}

+ 60 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java

@@ -0,0 +1,60 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.entities.Customer;
+import com.usoftchina.saas.document.entities.CustomerList;
+import com.usoftchina.saas.document.mapper.CustomerListMapper;
+import com.usoftchina.saas.document.mapper.CustomerMapper;
+import com.usoftchina.saas.document.service.CustomerService;
+import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.util.List;
+
+/**
+ * Created by zdw
+ * 2018-10-23 15:29.
+ */
+@Service
+public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, Customer> implements CustomerService {
+
+    @Autowired
+    private CustomerListMapper customerListMapper;
+
+    @Override
+    public PageInfo<CustomerList> getListData(PageRequest page, ListReqDTO req) {
+        //设置默认分页
+        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
+            page = new PageRequest();
+            page.setNumber(1);
+            page.setSize(10);
+        }
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        //查询数据
+        List<CustomerList> lists = getListByMode(req);
+        //取分页信息
+        PageInfo<CustomerList> pageInfo = new PageInfo<CustomerList>(lists);
+        return pageInfo;
+    }
+
+    private List<CustomerList> getListByMode(ListReqDTO req) {
+        List<CustomerList> list = null;
+        Long companyId = BaseContextHolder.getCompanyId();
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
+        if (null == req || StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
+            list = customerListMapper.selectPurchaseBycondition(con, companyId);
+        } else {
+            list = customerListMapper.selectPurchaseListByCondition(con, companyId);
+        }
+        return list;
+    }
+}

+ 108 - 0
applications/document/document-server/src/main/resources/mapper/CustomerListMapper.xml

@@ -0,0 +1,108 @@
+<?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.usoftchina.saas.document.mapper.CustomerListMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.CustomerList">
+    <id column="pi_id" jdbcType="INTEGER" property="id" />
+    <result column="pi_inoutno" jdbcType="VARCHAR" property="pi_inoutno" />
+    <result column="pi_class" jdbcType="VARCHAR" property="pi_class" />
+    <result column="pi_date" jdbcType="TIMESTAMP" property="pi_date" />
+    <result column="pi_vendid" jdbcType="INTEGER" property="pi_vendid" />
+    <result column="pi_vendcode" jdbcType="VARCHAR" property="pi_vendcode" />
+    <result column="pi_vendname" jdbcType="VARCHAR" property="pi_vendname" />
+    <result column="pi_custid" jdbcType="INTEGER" property="pi_custid" />
+    <result column="pi_custcode" jdbcType="VARCHAR" property="pi_custcode" />
+    <result column="pi_custname" jdbcType="VARCHAR" property="pi_custname" />
+    <result column="pi_puid" jdbcType="INTEGER" property="pi_puid" />
+    <result column="pi_pucode" jdbcType="VARCHAR" property="pi_pucode" />
+    <result column="pi_said" jdbcType="INTEGER" property="pi_said" />
+    <result column="pi_sacode" jdbcType="VARCHAR" property="pi_sacode" />
+    <result column="pi_total" jdbcType="DOUBLE" property="pi_total" />
+    <result column="pi_recordmanid" jdbcType="INTEGER" property="pi_recordmanid" />
+    <result column="pi_recordman" jdbcType="VARCHAR" property="pi_recordman" />
+    <result column="pi_recorddate" jdbcType="TIMESTAMP" property="pi_recorddate" />
+    <result column="pi_status" jdbcType="VARCHAR" property="pi_status" />
+    <result column="pi_statuscode" jdbcType="VARCHAR" property="pi_statuscode" />
+    <result column="pi_printstatus" jdbcType="VARCHAR" property="pi_printstatus" />
+    <result column="pi_printstatuscode" jdbcType="VARCHAR" property="pi_printstatuscode" />
+    <result column="pi_text1" jdbcType="VARCHAR" property="pi_text1" />
+    <result column="pi_text2" jdbcType="VARCHAR" property="pi_text2" />
+    <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
+    <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
+    <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
+    <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
+    <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
+    <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />
+    <result column="pd_piclass" jdbcType="VARCHAR" property="pd_piclass" />
+    <result column="pd_pdno" jdbcType="INTEGER" property="pd_pdno" />
+    <result column="pd_ordercode" jdbcType="VARCHAR" property="pd_ordercode" />
+    <result column="pd_orderdetno" jdbcType="INTEGER" property="pd_orderdetno" />
+    <result column="pd_prodid" jdbcType="INTEGER" property="pd_prodid" />
+    <result column="pd_prodcode" jdbcType="VARCHAR" property="pd_prodcode" />
+    <result column="pd_unit" jdbcType="VARCHAR" property="pd_unit" />
+    <result column="pd_inqty" jdbcType="INTEGER" property="pd_inqty" />
+    <result column="pd_outqty" jdbcType="INTEGER" property="pd_outqty" />
+    <result column="pd_orderprice" jdbcType="DOUBLE" property="pd_orderprice" />
+    <result column="pd_sendprice" jdbcType="DOUBLE" property="pd_sendprice" />
+    <result column="pd_price" jdbcType="DOUBLE" property="pd_price" />
+    <result column="pd_total" jdbcType="DOUBLE" property="pd_total" />
+    <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
+    <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
+    <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
+    <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
+    <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
+    <result column="pd_inwhid" jdbcType="INTEGER" property="pd_inwhid" />
+    <result column="pd_inwhcode" jdbcType="VARCHAR" property="pd_inwhcode" />
+    <result column="pd_inwhname" jdbcType="VARCHAR" property="pd_inwhname" />
+    <result column="pd_orderid" jdbcType="INTEGER" property="pd_orderid" />
+    <result column="pd_sdid" jdbcType="INTEGER" property="pd_sdid" />
+    <result column="pd_status" jdbcType="INTEGER" property="pd_status" />
+    <result column="companyid" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
+    <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="pd_text1" jdbcType="VARCHAR" property="pd_text1" />
+    <result column="pd_text2" jdbcType="VARCHAR" property="pd_text2" />
+    <result column="pd_text3" jdbcType="VARCHAR" property="pd_text3" />
+    <result column="pd_text4" jdbcType="VARCHAR" property="pd_text4" />
+    <result column="pd_text5" jdbcType="VARCHAR" property="pd_text5" />
+    <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
+    <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
+    <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
+
+  </resultMap>
+
+
+  <select id="selectCustomerListByCondition" parameterType="string" resultMap="BaseResultMap">
+    select  *  from purchase left join purchasedetail on pu_id=pd_puid
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and   companyId = #{companyId}
+      </if>
+    </where>  order by pu_id,pd_detno
+  </select>
+
+  <select id="selectCustomerBycondition" parameterType="string" resultMap="BaseResultMap">
+    select  *  from prodinout
+    <where>
+      <if test="begin != null">
+        pu_date &gt;= ${begin}
+      </if>
+      <if test="end!= null">
+        AND  pu_date &lt;= ${end}
+      </if>
+      <if test="status != null">
+        AND pu_status=${status}
+      </if>
+      <if test="keyword != null">
+        AND ${keyword}
+      </if>
+    </where>
+  </select>
+
+
+
+
+</mapper>

+ 377 - 0
applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml

@@ -0,0 +1,377 @@
+<?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.usoftchina.saas.document.mapper.CustomerMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Customer">
+    <id column="cu_id" jdbcType="INTEGER" property="id" />
+    <result column="cu_code" jdbcType="VARCHAR" property="cu_code" />
+    <result column="cu_name" jdbcType="VARCHAR" property="cu_name" />
+    <result column="cu_uu" jdbcType="VARCHAR" property="cu_uu" />
+    <result column="cu_type" jdbcType="VARCHAR" property="cu_type" />
+    <result column="cu_begindate" jdbcType="TIMESTAMP" property="cu_begindate" />
+    <result column="cu_beginaramount" jdbcType="DOUBLE" property="cu_beginaramount" />
+    <result column="cu_beginprerecamount" jdbcType="DOUBLE" property="cu_beginprerecamount" />
+    <result column="cu_promisedays" jdbcType="DOUBLE" property="cu_promisedays" />
+    <result column="cu_taxrate" jdbcType="DOUBLE" property="cu_taxrate" />
+    <result column="cu_sellerid" jdbcType="INTEGER" property="cu_sellerid" />
+    <result column="cu_sellercode" jdbcType="VARCHAR" property="cu_sellercode" />
+    <result column="cu_sellername" jdbcType="VARCHAR" property="cu_sellername" />
+    <result column="cu_credit" jdbcType="DOUBLE" property="cu_credit" />
+    <result column="cu_status" jdbcType="VARCHAR" property="cu_status" />
+    <result column="cu_statuscode" jdbcType="VARCHAR" property="cu_statuscode" />
+    <result column="cu_recordmanid" jdbcType="INTEGER" property="cu_recordmanid" />
+    <result column="cu_recordman" jdbcType="VARCHAR" property="cu_recordman" />
+    <result column="cu_recorddate" jdbcType="TIMESTAMP" property="cu_recorddate" />
+    <result column="companyid" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
+    <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="cu_text1" jdbcType="VARCHAR" property="cu_text1" />
+    <result column="cu_text2" jdbcType="VARCHAR" property="cu_text2" />
+    <result column="cu_text3" jdbcType="VARCHAR" property="cu_text3" />
+    <result column="cu_text4" jdbcType="VARCHAR" property="cu_text4" />
+    <result column="cu_text5" jdbcType="VARCHAR" property="cu_text5" />
+    <result column="cu_leftamount" jdbcType="DOUBLE" property="cu_leftamount" />
+    <result column="cu_recamount" jdbcType="DOUBLE" property="cu_recamount" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    cu_id, cu_code, cu_name, cu_uu, cu_type, cu_begindate, cu_beginaramount, cu_beginprerecamount, 
+    cu_promisedays, cu_taxrate, cu_sellerid, cu_sellercode, cu_sellername, cu_credit, 
+    cu_status, cu_statuscode, cu_recordmanid, cu_recordman, cu_recorddate, companyid, 
+    updaterId, updatetime, cu_text1, cu_text2, cu_text3, cu_text4, cu_text5, cu_leftamount, 
+    cu_recamount
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from customer
+    where cu_id = #{cu_id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from customer
+    where cu_id = #{cu_id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customer">
+    insert into customer (cu_id, cu_code, cu_name, 
+      cu_uu, cu_type, cu_begindate, 
+      cu_beginaramount, cu_beginprerecamount, cu_promisedays, 
+      cu_taxrate, cu_sellerid, cu_sellercode, 
+      cu_sellername, cu_credit, cu_status, 
+      cu_statuscode, cu_recordmanid, cu_recordman, 
+      cu_recorddate, companyid, updaterId, 
+      updatetime, cu_text1, cu_text2, 
+      cu_text3, cu_text4, cu_text5, 
+      cu_leftamount, cu_recamount)
+    values (#{cu_id,jdbcType=INTEGER}, #{cu_code,jdbcType=VARCHAR}, #{cu_name,jdbcType=VARCHAR}, 
+      #{cu_uu,jdbcType=VARCHAR}, #{cu_type,jdbcType=VARCHAR}, #{cu_begindate,jdbcType=TIMESTAMP}, 
+      #{cu_beginaramount,jdbcType=DOUBLE}, #{cu_beginprerecamount,jdbcType=DOUBLE}, #{cu_promisedays,jdbcType=DOUBLE}, 
+      #{cu_taxrate,jdbcType=DOUBLE}, #{cu_sellerid,jdbcType=INTEGER}, #{cu_sellercode,jdbcType=VARCHAR}, 
+      #{cu_sellername,jdbcType=VARCHAR}, #{cu_credit,jdbcType=DOUBLE}, #{cu_status,jdbcType=VARCHAR}, 
+      #{cu_statuscode,jdbcType=VARCHAR}, #{cu_recordmanid,jdbcType=INTEGER}, #{cu_recordman,jdbcType=VARCHAR}, 
+      #{cu_recorddate,jdbcType=TIMESTAMP}, #{companyid,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, 
+      #{updatetime,jdbcType=TIMESTAMP}, #{cu_text1,jdbcType=VARCHAR}, #{cu_text2,jdbcType=VARCHAR}, 
+      #{cu_text3,jdbcType=VARCHAR}, #{cu_text4,jdbcType=VARCHAR}, #{cu_text5,jdbcType=VARCHAR}, 
+      #{cu_leftamount,jdbcType=DOUBLE}, #{cu_recamount,jdbcType=DOUBLE})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Customer">
+    insert into customer
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="cu_id != null">
+        cu_id,
+      </if>
+      <if test="cu_code != null">
+        cu_code,
+      </if>
+      <if test="cu_name != null">
+        cu_name,
+      </if>
+      <if test="cu_uu != null">
+        cu_uu,
+      </if>
+      <if test="cu_type != null">
+        cu_type,
+      </if>
+      <if test="cu_begindate != null">
+        cu_begindate,
+      </if>
+      <if test="cu_beginaramount != null">
+        cu_beginaramount,
+      </if>
+      <if test="cu_beginprerecamount != null">
+        cu_beginprerecamount,
+      </if>
+      <if test="cu_promisedays != null">
+        cu_promisedays,
+      </if>
+      <if test="cu_taxrate != null">
+        cu_taxrate,
+      </if>
+      <if test="cu_sellerid != null">
+        cu_sellerid,
+      </if>
+      <if test="cu_sellercode != null">
+        cu_sellercode,
+      </if>
+      <if test="cu_sellername != null">
+        cu_sellername,
+      </if>
+      <if test="cu_credit != null">
+        cu_credit,
+      </if>
+      <if test="cu_status != null">
+        cu_status,
+      </if>
+      <if test="cu_statuscode != null">
+        cu_statuscode,
+      </if>
+      <if test="cu_recordmanid != null">
+        cu_recordmanid,
+      </if>
+      <if test="cu_recordman != null">
+        cu_recordman,
+      </if>
+      <if test="cu_recorddate != null">
+        cu_recorddate,
+      </if>
+      <if test="companyid != null">
+        companyid,
+      </if>
+      <if test="updaterId != null">
+        updaterId,
+      </if>
+      <if test="updatetime != null">
+        updatetime,
+      </if>
+      <if test="cu_text1 != null">
+        cu_text1,
+      </if>
+      <if test="cu_text2 != null">
+        cu_text2,
+      </if>
+      <if test="cu_text3 != null">
+        cu_text3,
+      </if>
+      <if test="cu_text4 != null">
+        cu_text4,
+      </if>
+      <if test="cu_text5 != null">
+        cu_text5,
+      </if>
+      <if test="cu_leftamount != null">
+        cu_leftamount,
+      </if>
+      <if test="cu_recamount != null">
+        cu_recamount,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="cu_id != null">
+        #{cu_id,jdbcType=INTEGER},
+      </if>
+      <if test="cu_code != null">
+        #{cu_code,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_name != null">
+        #{cu_name,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_uu != null">
+        #{cu_uu,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_type != null">
+        #{cu_type,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_begindate != null">
+        #{cu_begindate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cu_beginaramount != null">
+        #{cu_beginaramount,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_beginprerecamount != null">
+        #{cu_beginprerecamount,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_promisedays != null">
+        #{cu_promisedays,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_taxrate != null">
+        #{cu_taxrate,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_sellerid != null">
+        #{cu_sellerid,jdbcType=INTEGER},
+      </if>
+      <if test="cu_sellercode != null">
+        #{cu_sellercode,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_sellername != null">
+        #{cu_sellername,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_credit != null">
+        #{cu_credit,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_status != null">
+        #{cu_status,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_statuscode != null">
+        #{cu_statuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_recordmanid != null">
+        #{cu_recordmanid,jdbcType=INTEGER},
+      </if>
+      <if test="cu_recordman != null">
+        #{cu_recordman,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_recorddate != null">
+        #{cu_recorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyid != null">
+        #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updatetime != null">
+        #{updatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cu_text1 != null">
+        #{cu_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_text2 != null">
+        #{cu_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_text3 != null">
+        #{cu_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_text4 != null">
+        #{cu_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_text5 != null">
+        #{cu_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_leftamount != null">
+        #{cu_leftamount,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_recamount != null">
+        #{cu_recamount,jdbcType=DOUBLE},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Customer">
+    update customer
+    <set>
+      <if test="cu_code != null">
+        cu_code = #{cu_code,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_name != null">
+        cu_name = #{cu_name,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_uu != null">
+        cu_uu = #{cu_uu,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_type != null">
+        cu_type = #{cu_type,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_begindate != null">
+        cu_begindate = #{cu_begindate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cu_beginaramount != null">
+        cu_beginaramount = #{cu_beginaramount,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_beginprerecamount != null">
+        cu_beginprerecamount = #{cu_beginprerecamount,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_promisedays != null">
+        cu_promisedays = #{cu_promisedays,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_taxrate != null">
+        cu_taxrate = #{cu_taxrate,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_sellerid != null">
+        cu_sellerid = #{cu_sellerid,jdbcType=INTEGER},
+      </if>
+      <if test="cu_sellercode != null">
+        cu_sellercode = #{cu_sellercode,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_sellername != null">
+        cu_sellername = #{cu_sellername,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_credit != null">
+        cu_credit = #{cu_credit,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_status != null">
+        cu_status = #{cu_status,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_statuscode != null">
+        cu_statuscode = #{cu_statuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_recordmanid != null">
+        cu_recordmanid = #{cu_recordmanid,jdbcType=INTEGER},
+      </if>
+      <if test="cu_recordman != null">
+        cu_recordman = #{cu_recordman,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_recorddate != null">
+        cu_recorddate = #{cu_recorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyid != null">
+        companyid = #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updatetime != null">
+        updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cu_text1 != null">
+        cu_text1 = #{cu_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_text2 != null">
+        cu_text2 = #{cu_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_text3 != null">
+        cu_text3 = #{cu_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_text4 != null">
+        cu_text4 = #{cu_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_text5 != null">
+        cu_text5 = #{cu_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="cu_leftamount != null">
+        cu_leftamount = #{cu_leftamount,jdbcType=DOUBLE},
+      </if>
+      <if test="cu_recamount != null">
+        cu_recamount = #{cu_recamount,jdbcType=DOUBLE},
+      </if>
+    </set>
+    where cu_id = #{cu_id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customer">
+    update customer
+    set cu_code = #{cu_code,jdbcType=VARCHAR},
+      cu_name = #{cu_name,jdbcType=VARCHAR},
+      cu_uu = #{cu_uu,jdbcType=VARCHAR},
+      cu_type = #{cu_type,jdbcType=VARCHAR},
+      cu_begindate = #{cu_begindate,jdbcType=TIMESTAMP},
+      cu_beginaramount = #{cu_beginaramount,jdbcType=DOUBLE},
+      cu_beginprerecamount = #{cu_beginprerecamount,jdbcType=DOUBLE},
+      cu_promisedays = #{cu_promisedays,jdbcType=DOUBLE},
+      cu_taxrate = #{cu_taxrate,jdbcType=DOUBLE},
+      cu_sellerid = #{cu_sellerid,jdbcType=INTEGER},
+      cu_sellercode = #{cu_sellercode,jdbcType=VARCHAR},
+      cu_sellername = #{cu_sellername,jdbcType=VARCHAR},
+      cu_credit = #{cu_credit,jdbcType=DOUBLE},
+      cu_status = #{cu_status,jdbcType=VARCHAR},
+      cu_statuscode = #{cu_statuscode,jdbcType=VARCHAR},
+      cu_recordmanid = #{cu_recordmanid,jdbcType=INTEGER},
+      cu_recordman = #{cu_recordman,jdbcType=VARCHAR},
+      cu_recorddate = #{cu_recorddate,jdbcType=TIMESTAMP},
+      companyid = #{companyid,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      cu_text1 = #{cu_text1,jdbcType=VARCHAR},
+      cu_text2 = #{cu_text2,jdbcType=VARCHAR},
+      cu_text3 = #{cu_text3,jdbcType=VARCHAR},
+      cu_text4 = #{cu_text4,jdbcType=VARCHAR},
+      cu_text5 = #{cu_text5,jdbcType=VARCHAR},
+      cu_leftamount = #{cu_leftamount,jdbcType=DOUBLE},
+      cu_recamount = #{cu_recamount,jdbcType=DOUBLE}
+    where cu_id = #{cu_id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 236 - 0
applications/document/document-server/src/main/resources/mapper/CustomeraddressMapper.xml

@@ -0,0 +1,236 @@
+<?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.usoftchina.saas.document.mapper.CustomeraddressMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Customeraddress">
+    <id column="ca_id" jdbcType="INTEGER" property="id" />
+    <result column="ca_cuid" jdbcType="INTEGER" property="ca_cuid" />
+    <result column="ca_detno" jdbcType="INTEGER" property="ca_detno" />
+    <result column="ca_person" jdbcType="VARCHAR" property="ca_person" />
+    <result column="ca_phone" jdbcType="INTEGER" property="ca_phone" />
+    <result column="ca_default" jdbcType="INTEGER" property="ca_default" />
+    <result column="companyid" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
+    <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="ca_text1" jdbcType="VARCHAR" property="ca_text1" />
+    <result column="ca_text2" jdbcType="VARCHAR" property="ca_text2" />
+    <result column="ca_text3" jdbcType="VARCHAR" property="ca_text3" />
+    <result column="ca_text4" jdbcType="VARCHAR" property="ca_text4" />
+    <result column="ca_text5" jdbcType="VARCHAR" property="ca_text5" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.entities.Customeraddress">
+    <result column="ca_address" jdbcType="LONGVARCHAR" property="ca_address" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    ca_id, ca_cuid, ca_detno, ca_person, ca_phone, ca_default, companyid, updaterid, 
+    updatetime, ca_text1, ca_text2, ca_text3, ca_text4, ca_text5
+  </sql>
+  <sql id="Blob_Column_List">
+    ca_address
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from customeraddress
+    where ca_id = #{ca_id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from customeraddress
+    where ca_id = #{ca_id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
+    insert into customeraddress (ca_id, ca_cuid, ca_detno, 
+      ca_person, ca_phone, ca_default, 
+      companyid, updaterid, updatetime, 
+      ca_text1, ca_text2, ca_text3, 
+      ca_text4, ca_text5, ca_address
+      )
+    values (#{ca_id,jdbcType=INTEGER}, #{ca_cuid,jdbcType=INTEGER}, #{ca_detno,jdbcType=INTEGER}, 
+      #{ca_person,jdbcType=VARCHAR}, #{ca_phone,jdbcType=INTEGER}, #{ca_default,jdbcType=INTEGER}, 
+      #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP}, 
+      #{ca_text1,jdbcType=VARCHAR}, #{ca_text2,jdbcType=VARCHAR}, #{ca_text3,jdbcType=VARCHAR}, 
+      #{ca_text4,jdbcType=VARCHAR}, #{ca_text5,jdbcType=VARCHAR}, #{ca_address,jdbcType=LONGVARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
+    insert into customeraddress
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="ca_id != null">
+        ca_id,
+      </if>
+      <if test="ca_cuid != null">
+        ca_cuid,
+      </if>
+      <if test="ca_detno != null">
+        ca_detno,
+      </if>
+      <if test="ca_person != null">
+        ca_person,
+      </if>
+      <if test="ca_phone != null">
+        ca_phone,
+      </if>
+      <if test="ca_default != null">
+        ca_default,
+      </if>
+      <if test="companyid != null">
+        companyid,
+      </if>
+      <if test="updaterid != null">
+        updaterid,
+      </if>
+      <if test="updatetime != null">
+        updatetime,
+      </if>
+      <if test="ca_text1 != null">
+        ca_text1,
+      </if>
+      <if test="ca_text2 != null">
+        ca_text2,
+      </if>
+      <if test="ca_text3 != null">
+        ca_text3,
+      </if>
+      <if test="ca_text4 != null">
+        ca_text4,
+      </if>
+      <if test="ca_text5 != null">
+        ca_text5,
+      </if>
+      <if test="ca_address != null">
+        ca_address,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="ca_id != null">
+        #{ca_id,jdbcType=INTEGER},
+      </if>
+      <if test="ca_cuid != null">
+        #{ca_cuid,jdbcType=INTEGER},
+      </if>
+      <if test="ca_detno != null">
+        #{ca_detno,jdbcType=INTEGER},
+      </if>
+      <if test="ca_person != null">
+        #{ca_person,jdbcType=VARCHAR},
+      </if>
+      <if test="ca_phone != null">
+        #{ca_phone,jdbcType=INTEGER},
+      </if>
+      <if test="ca_default != null">
+        #{ca_default,jdbcType=INTEGER},
+      </if>
+      <if test="companyid != null">
+        #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterid != null">
+        #{updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="updatetime != null">
+        #{updatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ca_text1 != null">
+        #{ca_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="ca_text2 != null">
+        #{ca_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="ca_text3 != null">
+        #{ca_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="ca_text4 != null">
+        #{ca_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="ca_text5 != null">
+        #{ca_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="ca_address != null">
+        #{ca_address,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
+    update customeraddress
+    <set>
+      <if test="ca_cuid != null">
+        ca_cuid = #{ca_cuid,jdbcType=INTEGER},
+      </if>
+      <if test="ca_detno != null">
+        ca_detno = #{ca_detno,jdbcType=INTEGER},
+      </if>
+      <if test="ca_person != null">
+        ca_person = #{ca_person,jdbcType=VARCHAR},
+      </if>
+      <if test="ca_phone != null">
+        ca_phone = #{ca_phone,jdbcType=INTEGER},
+      </if>
+      <if test="ca_default != null">
+        ca_default = #{ca_default,jdbcType=INTEGER},
+      </if>
+      <if test="companyid != null">
+        companyid = #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterid != null">
+        updaterid = #{updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="updatetime != null">
+        updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ca_text1 != null">
+        ca_text1 = #{ca_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="ca_text2 != null">
+        ca_text2 = #{ca_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="ca_text3 != null">
+        ca_text3 = #{ca_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="ca_text4 != null">
+        ca_text4 = #{ca_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="ca_text5 != null">
+        ca_text5 = #{ca_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="ca_address != null">
+        ca_address = #{ca_address,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where ca_id = #{ca_id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
+    update customeraddress
+    set ca_cuid = #{ca_cuid,jdbcType=INTEGER},
+      ca_detno = #{ca_detno,jdbcType=INTEGER},
+      ca_person = #{ca_person,jdbcType=VARCHAR},
+      ca_phone = #{ca_phone,jdbcType=INTEGER},
+      ca_default = #{ca_default,jdbcType=INTEGER},
+      companyid = #{companyid,jdbcType=INTEGER},
+      updaterid = #{updaterid,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      ca_text1 = #{ca_text1,jdbcType=VARCHAR},
+      ca_text2 = #{ca_text2,jdbcType=VARCHAR},
+      ca_text3 = #{ca_text3,jdbcType=VARCHAR},
+      ca_text4 = #{ca_text4,jdbcType=VARCHAR},
+      ca_text5 = #{ca_text5,jdbcType=VARCHAR},
+      ca_address = #{ca_address,jdbcType=LONGVARCHAR}
+    where ca_id = #{ca_id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
+    update customeraddress
+    set ca_cuid = #{ca_cuid,jdbcType=INTEGER},
+      ca_detno = #{ca_detno,jdbcType=INTEGER},
+      ca_person = #{ca_person,jdbcType=VARCHAR},
+      ca_phone = #{ca_phone,jdbcType=INTEGER},
+      ca_default = #{ca_default,jdbcType=INTEGER},
+      companyid = #{companyid,jdbcType=INTEGER},
+      updaterid = #{updaterid,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      ca_text1 = #{ca_text1,jdbcType=VARCHAR},
+      ca_text2 = #{ca_text2,jdbcType=VARCHAR},
+      ca_text3 = #{ca_text3,jdbcType=VARCHAR},
+      ca_text4 = #{ca_text4,jdbcType=VARCHAR},
+      ca_text5 = #{ca_text5,jdbcType=VARCHAR}
+    where ca_id = #{ca_id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 212 - 0
applications/document/document-server/src/main/resources/mapper/CustomercontactMapper.xml

@@ -0,0 +1,212 @@
+<?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.usoftchina.saas.document.mapper.CustomercontactMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Customercontact">
+    <id column="cc_id" jdbcType="INTEGER" property="id" />
+    <result column="cc_cuid" jdbcType="INTEGER" property="cc_cuid" />
+    <result column="cc_detno" jdbcType="INTEGER" property="cc_detno" />
+    <result column="cc_name" jdbcType="VARCHAR" property="cc_name" />
+    <result column="cc_tel" jdbcType="INTEGER" property="cc_tel" />
+    <result column="cc_qq" jdbcType="VARCHAR" property="cc_qq" />
+    <result column="cc_email" jdbcType="VARCHAR" property="cc_email" />
+    <result column="companyid" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
+    <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="cc_text1" jdbcType="VARCHAR" property="cc_text1" />
+    <result column="cc_text2" jdbcType="VARCHAR" property="cc_text2" />
+    <result column="cc_text3" jdbcType="VARCHAR" property="cc_text3" />
+    <result column="cc_text4" jdbcType="VARCHAR" property="cc_text4" />
+    <result column="cc_text5" jdbcType="VARCHAR" property="cc_text5" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    cc_id, cc_cuid, cc_detno, cc_name, cc_tel, cc_qq, cc_email, companyid, updaterid, 
+    updatetime, cc_text1, cc_text2, cc_text3, cc_text4, cc_text5
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from customercontact
+    where cc_id = #{cc_id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from customercontact
+    where cc_id = #{cc_id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customercontact">
+    insert into customercontact (cc_id, cc_cuid, cc_detno, 
+      cc_name, cc_tel, cc_qq, 
+      cc_email, companyid, updaterid, 
+      updatetime, cc_text1, cc_text2, 
+      cc_text3, cc_text4, cc_text5
+      )
+    values (#{cc_id,jdbcType=INTEGER}, #{cc_cuid,jdbcType=INTEGER}, #{cc_detno,jdbcType=INTEGER}, 
+      #{cc_name,jdbcType=VARCHAR}, #{cc_tel,jdbcType=INTEGER}, #{cc_qq,jdbcType=VARCHAR}, 
+      #{cc_email,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
+      #{updatetime,jdbcType=TIMESTAMP}, #{cc_text1,jdbcType=VARCHAR}, #{cc_text2,jdbcType=VARCHAR}, 
+      #{cc_text3,jdbcType=VARCHAR}, #{cc_text4,jdbcType=VARCHAR}, #{cc_text5,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Customercontact">
+    insert into customercontact
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="cc_id != null">
+        cc_id,
+      </if>
+      <if test="cc_cuid != null">
+        cc_cuid,
+      </if>
+      <if test="cc_detno != null">
+        cc_detno,
+      </if>
+      <if test="cc_name != null">
+        cc_name,
+      </if>
+      <if test="cc_tel != null">
+        cc_tel,
+      </if>
+      <if test="cc_qq != null">
+        cc_qq,
+      </if>
+      <if test="cc_email != null">
+        cc_email,
+      </if>
+      <if test="companyid != null">
+        companyid,
+      </if>
+      <if test="updaterid != null">
+        updaterid,
+      </if>
+      <if test="updatetime != null">
+        updatetime,
+      </if>
+      <if test="cc_text1 != null">
+        cc_text1,
+      </if>
+      <if test="cc_text2 != null">
+        cc_text2,
+      </if>
+      <if test="cc_text3 != null">
+        cc_text3,
+      </if>
+      <if test="cc_text4 != null">
+        cc_text4,
+      </if>
+      <if test="cc_text5 != null">
+        cc_text5,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="cc_id != null">
+        #{cc_id,jdbcType=INTEGER},
+      </if>
+      <if test="cc_cuid != null">
+        #{cc_cuid,jdbcType=INTEGER},
+      </if>
+      <if test="cc_detno != null">
+        #{cc_detno,jdbcType=INTEGER},
+      </if>
+      <if test="cc_name != null">
+        #{cc_name,jdbcType=VARCHAR},
+      </if>
+      <if test="cc_tel != null">
+        #{cc_tel,jdbcType=INTEGER},
+      </if>
+      <if test="cc_qq != null">
+        #{cc_qq,jdbcType=VARCHAR},
+      </if>
+      <if test="cc_email != null">
+        #{cc_email,jdbcType=VARCHAR},
+      </if>
+      <if test="companyid != null">
+        #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterid != null">
+        #{updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="updatetime != null">
+        #{updatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cc_text1 != null">
+        #{cc_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="cc_text2 != null">
+        #{cc_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="cc_text3 != null">
+        #{cc_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="cc_text4 != null">
+        #{cc_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="cc_text5 != null">
+        #{cc_text5,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Customercontact">
+    update customercontact
+    <set>
+      <if test="cc_cuid != null">
+        cc_cuid = #{cc_cuid,jdbcType=INTEGER},
+      </if>
+      <if test="cc_detno != null">
+        cc_detno = #{cc_detno,jdbcType=INTEGER},
+      </if>
+      <if test="cc_name != null">
+        cc_name = #{cc_name,jdbcType=VARCHAR},
+      </if>
+      <if test="cc_tel != null">
+        cc_tel = #{cc_tel,jdbcType=INTEGER},
+      </if>
+      <if test="cc_qq != null">
+        cc_qq = #{cc_qq,jdbcType=VARCHAR},
+      </if>
+      <if test="cc_email != null">
+        cc_email = #{cc_email,jdbcType=VARCHAR},
+      </if>
+      <if test="companyid != null">
+        companyid = #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterid != null">
+        updaterid = #{updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="updatetime != null">
+        updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cc_text1 != null">
+        cc_text1 = #{cc_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="cc_text2 != null">
+        cc_text2 = #{cc_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="cc_text3 != null">
+        cc_text3 = #{cc_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="cc_text4 != null">
+        cc_text4 = #{cc_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="cc_text5 != null">
+        cc_text5 = #{cc_text5,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where cc_id = #{cc_id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customercontact">
+    update customercontact
+    set cc_cuid = #{cc_cuid,jdbcType=INTEGER},
+      cc_detno = #{cc_detno,jdbcType=INTEGER},
+      cc_name = #{cc_name,jdbcType=VARCHAR},
+      cc_tel = #{cc_tel,jdbcType=INTEGER},
+      cc_qq = #{cc_qq,jdbcType=VARCHAR},
+      cc_email = #{cc_email,jdbcType=VARCHAR},
+      companyid = #{companyid,jdbcType=INTEGER},
+      updaterid = #{updaterid,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      cc_text1 = #{cc_text1,jdbcType=VARCHAR},
+      cc_text2 = #{cc_text2,jdbcType=VARCHAR},
+      cc_text3 = #{cc_text3,jdbcType=VARCHAR},
+      cc_text4 = #{cc_text4,jdbcType=VARCHAR},
+      cc_text5 = #{cc_text5,jdbcType=VARCHAR}
+    where cc_id = #{cc_id,jdbcType=INTEGER}
+  </update>
+</mapper>