Browse Source

辅助资料

chenw 7 years ago
parent
commit
fd72c734ea
22 changed files with 869 additions and 26 deletions
  1. 48 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Customerkind.java
  2. 48 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Productbrand.java
  3. 49 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Producttype.java
  4. 10 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/AddressController.java
  5. 37 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerkindController.java
  6. 49 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductbrandController.java
  7. 37 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProducttypeController.java
  8. 2 5
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorkindController.java
  9. 18 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerkindMapper.java
  10. 19 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductbrandMapper.java
  11. 18 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProducttypeMapper.java
  12. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerkindService.java
  13. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductbrandService.java
  14. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProducttypeService.java
  15. 37 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerkindServiceImpl.java
  16. 47 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductbrandServiceImpl.java
  17. 44 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProducttypeServiceImpl.java
  18. 5 9
      applications/document/document-server/src/main/resources/mapper/AddressMapper.xml
  19. 122 0
      applications/document/document-server/src/main/resources/mapper/CustomerkindMapper.xml
  20. 122 0
      applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml
  21. 125 0
      applications/document/document-server/src/main/resources/mapper/ProducttypeMapper.xml
  22. 5 8
      applications/document/document-server/src/main/resources/mapper/VendorkindMapper.xml

+ 48 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Customerkind.java

@@ -0,0 +1,48 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Customerkind extends CommonBaseEntity implements Serializable {
+    private String ck_name;
+
+    private Integer ck_recordid;
+
+    private String ck_recorder;
+
+    private Date ck_date;
+
+    public String getCk_name() {
+        return ck_name;
+    }
+
+    public void setCk_name(String ck_name) {
+        this.ck_name = ck_name == null ? null : ck_name.trim();
+    }
+
+    public Integer getCk_recordid() {
+        return ck_recordid;
+    }
+
+    public void setCk_recordid(Integer ck_recordid) {
+        this.ck_recordid = ck_recordid;
+    }
+
+    public String getCk_recorder() {
+        return ck_recorder;
+    }
+
+    public void setCk_recorder(String ck_recorder) {
+        this.ck_recorder = ck_recorder == null ? null : ck_recorder.trim();
+    }
+
+    public Date getCk_date() {
+        return ck_date;
+    }
+
+    public void setCk_date(Date ck_date) {
+        this.ck_date = ck_date;
+    }
+}

+ 48 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Productbrand.java

@@ -0,0 +1,48 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Productbrand extends CommonBaseEntity implements Serializable {
+    private String pb_name;
+
+    private Integer pb_recordid;
+
+    private String pb_recorder;
+
+    private Date pb_date;
+
+    public String getPb_name() {
+        return pb_name;
+    }
+
+    public void setPb_name(String pb_name) {
+        this.pb_name = pb_name == null ? null : pb_name.trim();
+    }
+
+    public Integer getPb_recordid() {
+        return pb_recordid;
+    }
+
+    public void setPb_recordid(Integer pb_recordid) {
+        this.pb_recordid = pb_recordid;
+    }
+
+    public String getPb_recorder() {
+        return pb_recorder;
+    }
+
+    public void setPb_recorder(String pb_recorder) {
+        this.pb_recorder = pb_recorder == null ? null : pb_recorder.trim();
+    }
+
+    public Date getPb_date() {
+        return pb_date;
+    }
+
+    public void setPb_date(Date pb_date) {
+        this.pb_date = pb_date;
+    }
+}

+ 49 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Producttype.java

@@ -0,0 +1,49 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Producttype extends CommonBaseEntity implements Serializable {
+
+    private String pt_name;
+
+    private Integer pt_recordid;
+
+    private String pt_recorder;
+
+    private Date pt_date;
+
+    public String getPt_name() {
+        return pt_name;
+    }
+
+    public void setPt_name(String pt_name) {
+        this.pt_name = pt_name == null ? null : pt_name.trim();
+    }
+
+    public Integer getPt_recordid() {
+        return pt_recordid;
+    }
+
+    public void setPt_recordid(Integer pt_recordid) {
+        this.pt_recordid = pt_recordid;
+    }
+
+    public String getPt_recorder() {
+        return pt_recorder;
+    }
+
+    public void setPt_recorder(String pt_recorder) {
+        this.pt_recorder = pt_recorder == null ? null : pt_recorder.trim();
+    }
+
+    public Date getPt_date() {
+        return pt_date;
+    }
+
+    public void setPt_date(Date pt_date) {
+        this.pt_date = pt_date;
+    }
+}

+ 10 - 4
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/AddressController.java

@@ -6,9 +6,9 @@ import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.document.entities.Address;
 import com.usoftchina.saas.document.service.AddressService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 @RestController
 @RequestMapping("/address")
@@ -24,7 +24,7 @@ public class AddressController {
     }
 
     @PostMapping("/delete/{id}")
-    public Result deleteById(Long id){
+    public Result deleteById(@PathVariable("id") Long id){
         addressService.removeByPrimaryKey(id);
         return Result.success();
     }
@@ -35,4 +35,10 @@ public class AddressController {
         return Result.success();
     }
 
+    @GetMapping("/getAll")
+    public Result<List<Address>> getAll(){
+        List<Address> addresseList = addressService.findAll();
+        return Result.success(addresseList);
+    }
+
 }

+ 37 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerkindController.java

@@ -0,0 +1,37 @@
+package com.usoftchina.saas.document.controller;
+
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.document.entities.Customerkind;
+import com.usoftchina.saas.document.service.CustomerkindService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/customerkind")
+public class CustomerkindController {
+
+    @Autowired
+    private CustomerkindService customerkindService;
+
+    @PostMapping("/save")
+    public Result save(Customerkind customerkind){
+        customerkindService.save(customerkind);
+        return Result.success();
+    }
+
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id){
+        customerkindService.removeByPrimaryKey(id);
+        return Result.success();
+    }
+
+    @GetMapping("/getAll")
+    public Result getAll(){
+        List<Customerkind> customerkindList = customerkindService.findAll();
+        return Result.success(customerkindList);
+    }
+
+}

+ 49 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductbrandController.java

@@ -0,0 +1,49 @@
+package com.usoftchina.saas.document.controller;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.document.entities.Productbrand;
+import com.usoftchina.saas.document.service.ProductbrandService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/productbrand")
+public class ProductbrandController {
+
+    @Autowired
+    private ProductbrandService productbrandService;
+
+    /**
+     * 保存
+     * @param productbrand
+     * @return
+     */
+    @PostMapping("/save")
+    public Result save(Productbrand productbrand){
+        productbrandService.save(productbrand);
+        return Result.success();
+    }
+
+    /**
+     * 删除
+     * @param id
+     * @return
+     */
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id){
+        productbrandService.removeByPrimaryKey(id);
+        return  Result.success();
+    }
+
+    /**
+     * 查询所有
+     * @return
+     */
+    @GetMapping("/getAll")
+    public Result getAll(){
+        List<Productbrand> productbrandList = productbrandService.findAll();
+        return Result.success(productbrandList);
+    }
+}

+ 37 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProducttypeController.java

@@ -0,0 +1,37 @@
+package com.usoftchina.saas.document.controller;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.document.entities.Producttype;
+import com.usoftchina.saas.document.service.ProducttypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/producttype")
+public class ProducttypeController {
+
+    @Autowired
+    private ProducttypeService producttypeService;
+
+    @GetMapping("/getAll")
+    public Result<List<Producttype>> getAll(){
+        List<Producttype> producttypeList = producttypeService.findAll();
+        return Result.success(producttypeList);
+    }
+
+    @PostMapping("/save")
+    public Result save(Producttype producttype){
+        producttypeService.save(producttype);
+        return Result.success();
+    }
+
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id){
+        producttypeService.removeByPrimaryKey(id);
+        return Result.success();
+    }
+
+
+}

+ 2 - 5
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorkindController.java

@@ -4,10 +4,7 @@ import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.document.entities.Vendorkind;
 import com.usoftchina.saas.document.service.VendorkindService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
@@ -25,7 +22,7 @@ public class VendorkindController {
     }
 
     @PostMapping("/delete/{id}")
-    public Result delete(long id){
+    public Result delete(@PathVariable("id") long id){
         vendorkindService.removeByPrimaryKey(id);
         return Result.success();
     }

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

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

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

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

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

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

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerkindService.java

@@ -0,0 +1,9 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.document.entities.Customerkind;
+import com.usoftchina.saas.document.mapper.CustomerkindMapper;
+
+public interface CustomerkindService extends CommonBaseService<CustomerkindMapper, Customerkind> {
+
+}

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductbrandService.java

@@ -0,0 +1,9 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.document.entities.Productbrand;
+import com.usoftchina.saas.document.mapper.ProductbrandMapper;
+
+public interface ProductbrandService extends CommonBaseService<ProductbrandMapper, Productbrand> {
+
+}

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProducttypeService.java

@@ -0,0 +1,9 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.document.entities.Producttype;
+import com.usoftchina.saas.document.mapper.ProducttypeMapper;
+
+public interface ProducttypeService extends CommonBaseService<ProducttypeMapper, Producttype> {
+
+}

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

@@ -0,0 +1,37 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.document.entities.Customerkind;
+import com.usoftchina.saas.document.mapper.CustomerkindMapper;
+import com.usoftchina.saas.document.service.CustomerkindService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class CustomerkindServiceImpl extends CommonBaseServiceImpl<CustomerkindMapper, Customerkind> implements CustomerkindService {
+
+    @Autowired
+    private CustomerkindMapper customerkindMapper;
+
+    /**
+     * 保存
+     * @param customerkind
+     * @return
+     */
+    @Override
+    public boolean save(Customerkind customerkind){
+        if(customerkind.getId() == 0){
+            customerkindMapper.insertSelective(customerkind);
+        }else{
+            customerkindMapper.updateByPrimaryKeySelective(customerkind);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean removeByPrimaryKey(Long id){
+        customerkindMapper.deleteByPrimaryKey(id);
+        return true;
+    }
+
+}

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

@@ -0,0 +1,47 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.entities.Productbrand;
+import com.usoftchina.saas.document.mapper.ProductbrandMapper;
+import com.usoftchina.saas.document.service.ProductbrandService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandMapper, Productbrand> implements ProductbrandService {
+
+    @Autowired
+    private ProductbrandMapper productbrandMapper;
+    @Autowired
+    private MessageLogService messageLogService;
+
+    private final String LOG_NAME = "物料品牌";
+
+    @Override
+    public boolean save(Productbrand productbrand){
+        productbrand.setCompanyId(BaseContextHolder.getCompanyId());
+        if(productbrand.getId() == 0){
+            productbrandMapper.insertSelective(productbrand);
+            //记录日志
+            DocBaseDTO docBaseDTO = new DocBaseDTO(productbrand.getId(), null, LOG_NAME);
+            messageLogService.save(docBaseDTO);
+        }else{
+            productbrandMapper.updateByPrimaryKeySelective(productbrand);
+            //记录日志
+            DocBaseDTO docBaseDTO = new DocBaseDTO(productbrand.getId(), null, LOG_NAME);
+            messageLogService.update(docBaseDTO);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean removeByPrimaryKey(Long id){
+        productbrandMapper.deleteByPrimaryKey(id);
+        //记录日志
+        DocBaseDTO docBaseDTO = new DocBaseDTO(id, null, LOG_NAME);
+        messageLogService.delete(docBaseDTO);
+        return true;
+    }
+
+}

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

@@ -0,0 +1,44 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.document.entities.Producttype;
+import com.usoftchina.saas.document.mapper.ProducttypeMapper;
+import com.usoftchina.saas.document.service.ProducttypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class ProducttypeServiceImpl extends CommonBaseServiceImpl<ProducttypeMapper, Producttype> implements ProducttypeService {
+
+    @Autowired
+    private ProducttypeMapper producttypeMapper;
+
+    /**
+     * 保存
+     * @param producttype
+     * @return
+     */
+    @Override
+    public boolean save(Producttype producttype){
+        if(producttype.getId() == 0){
+            producttypeMapper.insertSelective(producttype);
+        }else{
+            producttypeMapper.updateByPrimaryKeySelective(producttype);
+        }
+        return true;
+    }
+
+    /**
+     * 删除
+     * @param id
+     * @return
+     */
+    @Override
+    public boolean removeByPrimaryKey(Long id){
+        producttypeMapper.deleteByPrimaryKey(id);
+        return true;
+    }
+
+}

+ 5 - 9
applications/document/document-server/src/main/resources/mapper/AddressMapper.xml

@@ -25,11 +25,11 @@
   </sql>
 
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Address">
-    insert into address (ad_id, ad_recorddate, companyId, 
+    insert into address (ad_recorddate, companyId,
       updaterId, updateTime, ad_text1, 
       ad_text2, ad_text3, ad_text4, 
       ad_text5, ad_address)
-    values (#{ad_id,jdbcType=INTEGER}, #{ad_recorddate,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER}, 
+    values (#{ad_recorddate,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER},
       #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{ad_text1,jdbcType=VARCHAR}, 
       #{ad_text2,jdbcType=VARCHAR}, #{ad_text3,jdbcType=VARCHAR}, #{ad_text4,jdbcType=VARCHAR}, 
       #{ad_text5,jdbcType=VARCHAR}, #{ad_address,jdbcType=LONGVARCHAR})
@@ -37,9 +37,6 @@
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Address">
     insert into address
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="ad_id != null">
-        ad_id,
-      </if>
       <if test="ad_recorddate != null">
         ad_recorddate,
       </if>
@@ -72,9 +69,6 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="ad_id != null">
-        #{ad_id,jdbcType=INTEGER},
-      </if>
       <if test="ad_recorddate != null">
         #{ad_recorddate,jdbcType=TIMESTAMP},
       </if>
@@ -178,5 +172,7 @@
     delete from address
     where ad_id in (#{ids,jdbcType=VARCHAR})
   </delete>
-
+  <select id="selectAll" resultMap="ResultMapWithBLOBs">
+    SELECT * FROM ADDRESS
+  </select>
 </mapper>

+ 122 - 0
applications/document/document-server/src/main/resources/mapper/CustomerkindMapper.xml

@@ -0,0 +1,122 @@
+<?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.CustomerkindMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Customerkind" >
+    <id column="ck_id" property="id" jdbcType="INTEGER" />
+    <result column="ck_name" property="ck_name" jdbcType="VARCHAR" />
+    <result column="ck_recordid" property="ck_recordid" jdbcType="INTEGER" />
+    <result column="ck_recorder" property="ck_recorder" jdbcType="VARCHAR" />
+    <result column="ck_date" property="ck_date" jdbcType="TIMESTAMP" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from customerkind
+    where ck_id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from customerkind
+    where ck_id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customerkind" >
+    insert into customerkind (ck_name, ck_recordid,
+      ck_recorder, ck_date, companyId, 
+      updaterId, updateTime)
+    values (#{ck_name,jdbcType=VARCHAR}, #{ck_recordid,jdbcType=INTEGER},
+      #{ck_recorder,jdbcType=VARCHAR}, #{ck_date,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER}, 
+      #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Customerkind" >
+    insert into customerkind
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="ck_name != null" >
+        ck_name,
+      </if>
+      <if test="ck_recordid != null" >
+        ck_recordid,
+      </if>
+      <if test="ck_recorder != null" >
+        ck_recorder,
+      </if>
+      <if test="ck_date != null" >
+        ck_date,
+      </if>
+      <if test="companyId != null" >
+        companyId,
+      </if>
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="ck_name != null" >
+        #{ck_name,jdbcType=VARCHAR},
+      </if>
+      <if test="ck_recordid != null" >
+        #{ck_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="ck_recorder != null" >
+        #{ck_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="ck_date != null" >
+        #{ck_date,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>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Customerkind" >
+    update customerkind
+    <set >
+      <if test="ck_name != null" >
+        ck_name = #{ck_name,jdbcType=VARCHAR},
+      </if>
+      <if test="ck_recordid != null" >
+        ck_recordid = #{ck_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="ck_recorder != null" >
+        ck_recorder = #{ck_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="ck_date != null" >
+        ck_date = #{ck_date,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>
+    </set>
+    where ck_id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customerkind" >
+    update customerkind
+    set ck_name = #{ck_name,jdbcType=VARCHAR},
+      ck_recordid = #{ck_recordid,jdbcType=INTEGER},
+      ck_recorder = #{ck_recorder,jdbcType=VARCHAR},
+      ck_date = #{ck_date,jdbcType=TIMESTAMP},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP}
+    where ck_id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="selectAll" resultMap="BaseResultMap">
+    SELECT * FROM CUSTOMERKIND
+  </select>
+</mapper>

+ 122 - 0
applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml

@@ -0,0 +1,122 @@
+<?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.ProductbrandMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Productbrand" >
+    <id column="pb_id" property="id" jdbcType="INTEGER" />
+    <result column="pb_name" property="pb_name" jdbcType="VARCHAR" />
+    <result column="pb_recordid" property="pb_recordid" jdbcType="INTEGER" />
+    <result column="pb_recorder" property="pb_recorder" jdbcType="VARCHAR" />
+    <result column="pb_date" property="pb_date" jdbcType="TIMESTAMP" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from productbrand
+    where pb_id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from productbrand
+    where pb_id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
+    insert into productbrand (pb_name, pb_recordid,
+      pb_recorder, pb_date, companyId, 
+      updaterId, updateTime)
+    values (#{pb_name,jdbcType=VARCHAR}, #{pb_recordid,jdbcType=INTEGER},
+      #{pb_recorder,jdbcType=VARCHAR}, #{pb_date,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER}, 
+      #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
+    insert into productbrand
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="pb_name != null" >
+        pb_name,
+      </if>
+      <if test="pb_recordid != null" >
+        pb_recordid,
+      </if>
+      <if test="pb_recorder != null" >
+        pb_recorder,
+      </if>
+      <if test="pb_date != null" >
+        pb_date,
+      </if>
+      <if test="companyId != null" >
+        companyId,
+      </if>
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="pb_name != null" >
+        #{pb_name,jdbcType=VARCHAR},
+      </if>
+      <if test="pb_recordid != null" >
+        #{pb_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="pb_recorder != null" >
+        #{pb_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="pb_date != null" >
+        #{pb_date,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>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
+    update productbrand
+    <set >
+      <if test="pb_name != null" >
+        pb_name = #{pb_name,jdbcType=VARCHAR},
+      </if>
+      <if test="pb_recordid != null" >
+        pb_recordid = #{pb_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="pb_recorder != null" >
+        pb_recorder = #{pb_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="pb_date != null" >
+        pb_date = #{pb_date,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>
+    </set>
+    where pb_id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
+    update productbrand
+    set pb_name = #{pb_name,jdbcType=VARCHAR},
+      pb_recordid = #{pb_recordid,jdbcType=INTEGER},
+      pb_recorder = #{pb_recorder,jdbcType=VARCHAR},
+      pb_date = #{pb_date,jdbcType=TIMESTAMP},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP}
+    where pb_id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="selectAll" resultMap="BaseResultMap">
+    SELECT * FROM PRODUCTBRAND
+  </select>
+</mapper>

+ 125 - 0
applications/document/document-server/src/main/resources/mapper/ProducttypeMapper.xml

@@ -0,0 +1,125 @@
+<?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.ProducttypeMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Producttype">
+    <id column="pt_id" jdbcType="INTEGER" property="id" />
+    <result column="pt_name" jdbcType="VARCHAR" property="pt_name" />
+    <result column="pt_recordid" jdbcType="INTEGER" property="pt_recordid" />
+    <result column="pt_recorder" jdbcType="VARCHAR" property="pt_recorder" />
+    <result column="pt_date" jdbcType="TIMESTAMP" property="pt_date" />
+    <result column="companyId" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
+    <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    pt_id, pt_name, pt_recordid, pt_recorder, pt_date, companyId, updaterId, updateTime
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from producttype
+    where pt_id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from producttype
+    where pt_id = #{id}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Producttype">
+    insert into producttype (pt_name, pt_recordid,
+      pt_recorder, pt_date, companyId, 
+      updaterId, updateTime)
+    values (#{pt_name,jdbcType=VARCHAR}, #{pt_recordid,jdbcType=INTEGER},
+      #{pt_recorder,jdbcType=VARCHAR}, #{pt_date,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER}, 
+      #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Producttype">
+    insert into producttype
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="pt_name != null">
+        pt_name,
+      </if>
+      <if test="pt_recordid != null">
+        pt_recordid,
+      </if>
+      <if test="pt_recorder != null">
+        pt_recorder,
+      </if>
+      <if test="pt_date != null">
+        pt_date,
+      </if>
+      <if test="companyId != null">
+        companyId,
+      </if>
+      <if test="updaterId != null">
+        updaterId,
+      </if>
+      <if test="updateTime != null">
+        updateTime,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="pt_name != null">
+        #{pt_name,jdbcType=VARCHAR},
+      </if>
+      <if test="pt_recordid != null">
+        #{pt_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="pt_recorder != null">
+        #{pt_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="pt_date != null">
+        #{pt_date,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>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Producttype">
+    update producttype
+    <set>
+      <if test="pt_name != null">
+        pt_name = #{pt_name,jdbcType=VARCHAR},
+      </if>
+      <if test="pt_recordid != null">
+        pt_recordid = #{pt_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="pt_recorder != null">
+        pt_recorder = #{pt_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="pt_date != null">
+        pt_date = #{pt_date,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>
+    </set>
+    where pt_id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Producttype">
+    update producttype
+    set pt_name = #{pt_name,jdbcType=VARCHAR},
+      pt_recordid = #{pt_recordid,jdbcType=INTEGER},
+      pt_recorder = #{pt_recorder,jdbcType=VARCHAR},
+      pt_date = #{pt_date,jdbcType=TIMESTAMP},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP}
+    where pt_id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="selectAll" resultMap="com.usoftchina.saas.document.entities.Producttype">
+    SELECT * FROM PRODUCTTYPE
+  </select>
+</mapper>

+ 5 - 8
applications/document/document-server/src/main/resources/mapper/VendorkindMapper.xml

@@ -25,19 +25,16 @@
     where vk_id = #{id,jdbcType=INTEGER}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Vendorkind">
-    insert into vendorkind (vk_id, vk_name, vk_recordid,
+    insert into vendorkind (vk_name, vk_recordid,
     vk_recorder, vk_date, companyId,
     updaterId, updateTime)
-    values (#{id,jdbcType=INTEGER}, #{vk_name,jdbcType=VARCHAR}, #{vk_recordid,jdbcType=INTEGER},
+    values (#{vk_name,jdbcType=VARCHAR}, #{vk_recordid,jdbcType=INTEGER},
     #{vk_recorder,jdbcType=VARCHAR}, #{vk_date,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER},
     #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Vendorkind">
     insert into vendorkind
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        vk_id,
-      </if>
       <if test="vk_name != null">
         vk_name,
       </if>
@@ -61,9 +58,6 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
       <if test="vk_name != null">
         #{vk_name,jdbcType=VARCHAR},
       </if>
@@ -125,4 +119,7 @@
     updateTime = #{updateTime,jdbcType=TIMESTAMP}
     where vk_id = #{id,jdbcType=INTEGER}
   </update>
+  <select id="selectAll" resultMap="BaseResultMap">
+    SELECT * FROM VENDORKIND
+  </select>
 </mapper>