Procházet zdrojové kódy

Merge branch 'dev_czh'

# Conflicts:
#	sckw-common/sckw-common-core/src/main/java/com/sckw/core/web/constant/HttpStatus.java
small před 2 roky
rodič
revize
ee861b615b

+ 5 - 13
sckw-auth/src/main/java/com/sckw/auth/controller/IndexController.java

@@ -25,20 +25,12 @@ public class IndexController {
     @Autowired
     private IIndexService indexService;
 
-    @GetMapping("/index")
-    public String index() {
-        //auth 服务 调用 system服务提供的feign接口
-        return remoteUserFService.getUserInfo("312");
-    }
-
-    @GetMapping("/getUserInfo")
-    public String getUserInfo(String account) {
-        //auth 服务 调用example实现的dubbo接口
-        return remoteUserService.getUserInfoV1(account);
-    }
-
     /**
-     * 登录
+     * @param reqVo 登录入参
+     * @return HttpResult
+     * @desc: 用户登录
+     * @author: czh
+     * @date: 2023/6/16
      */
     @PostMapping("/login")
     public HttpResult login(@RequestBody LoginReqVo reqVo) {

+ 5 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/req/RegisterReqVo.java

@@ -41,4 +41,9 @@ public class RegisterReqVo implements Serializable {
      */
     private String captcha;
 
+    /**
+     * 用户类型  0 普通用户  1管理员
+     */
+    private Integer isMain;
+
 }

+ 0 - 1
sckw-auth/src/main/java/com/sckw/auth/service/impl/IndexServiceImpl.java

@@ -121,7 +121,6 @@ public class IndexServiceImpl implements IIndexService {
 
         RegisterReqDto registerReqDto = new RegisterReqDto();
         BeanUtils.copyProperties(reqVo, registerReqDto);
-        registerReqDto.setIsMain(Global.YES);
         remoteUserService.register(registerReqDto);
     }
 

+ 6 - 11
sckw-common/sckw-common-core/src/main/java/com/sckw/core/web/constant/HttpStatus.java

@@ -35,6 +35,7 @@ public class HttpStatus {
     public static final String TOKEN_INVAILD = "无效token";
     public static final String TOKEN_ERROR = "非法token!";
 
+
     /**其他自定义状态码*/
     public static final int CODE_60603 = 60603;
     public static final int CODE_60604 = 60604;
@@ -107,17 +108,6 @@ public class HttpStatus {
     public static final String INSERT_FAIL = "新增失败";
     public static final String DELETE_FAIL = "删除失败";
 
-    /**未查询到相关信息*/
-    public static final int CODE_60602 = 60602;
-    public static final String ACCOUNT_NOT_EXISTS = "用户信息不存在";
-
-    /**自定义提示消息*/
-    public static final String MSG_001 = "密码重置成功";
-    public static final String MSG_002 = "密码修改成功";
-    public static final String PASSWD_ERROR = "密码不正确";
-    public static final String PASSWD_REPEAT = "新密码与旧密码不能一样!";
-    public static final String CAPTCHA_ERROR = "验证码输入错误";
-
     /**未查询到相关信息*/
     public static final int QUERY_FAIL_CODE = 60602;
     public static final String ENT_NOT_EXISTS = "企业信息不存在或已失效";
@@ -125,6 +115,11 @@ public class HttpStatus {
     public static final String ROLE_NOT_EXISTS = "未查询到关联的角色";
 
     /**自定义提示消息*/
+    public static final String PASSWD_ERROR = "密码不正确";
+    public static final String PASSWD_REPEAT = "新密码与旧密码不能一样!";
+    public static final String CAPTCHA_ERROR = "验证码输入错误";
+    public static final String MSG_001 = "密码重置成功";
+    public static final String MSG_002 = "密码修改成功";
     public static final String MSG_003 = "新增成功";
     public static final String MSG_004 = "审批完成";
     public static final String MSG_005 = "更新成功";

+ 2 - 1
sckw-modules/sckw-system/src/main/java/com/sckw/system/controller/KwsEnterpriseController.java

@@ -82,7 +82,8 @@ public class KwsEnterpriseController {
      **/
     @PostMapping("/add")
     public HttpResult add(@RequestBody KwsEnterprise params) throws Exception {
-        return kwsEntService.add(params);
+        kwsEntService.add(params);
+        return HttpResult.ok();
     }
 
     /**

+ 0 - 2
sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsEnterpriseDao.java

@@ -21,8 +21,6 @@ public interface KwsEnterpriseDao extends BaseMapper<KwsEnterprise> {
      */
     int insert(KwsEnterprise record);
 
-    int insertPPPPP(KwsEnterprise record);
-
     /**
      * 更新
      * @param record

+ 5 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/model/vo/req/EntRegisterReqVo.java

@@ -17,6 +17,11 @@ public class EntRegisterReqVo implements Serializable {
     @Serial
     private static final long serialVersionUID = 2800416148876795046L;
 
+    /**
+     * 企业id
+     */
+    private Long entId;
+
     /**
      * 母公司id(当注册的公司是一家子公司时,entPid必传)
      */

+ 6 - 50
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsEnterpriseService.java

@@ -75,14 +75,10 @@ public class KwsEnterpriseService {
      * @return
      * @throws Exception
      */
-    public HttpResult add(KwsEnterprise params) throws Exception {
-        /**1、数据校验**/
-        HttpResult result = paramsCheck(params);
-        if (result != null) {
-            return result;
+    public void add(KwsEnterprise params) {
+        if (kwsEnterpriseDao.insert(params) <= 0) {
+            throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
         }
-
-        return null;
     }
 
     /**
@@ -245,7 +241,7 @@ public class KwsEnterpriseService {
     public void register(EntRegisterReqVo reqVo) {
         /*1、存企业信息表*/
         KwsEnterprise kwsEnterprise = new KwsEnterprise();
-        long entId = new IdWorker(1).nextId();
+        long entId = reqVo.getEntId();
         kwsEnterprise.setId(entId);
         Date date = new Date();
         Long userId = LoginUserHolder.getUserId();
@@ -258,8 +254,8 @@ public class KwsEnterpriseService {
         kwsEnterprise.setMemberLevel(0);
         kwsEnterprise.setRegTime(date);
         kwsEnterprise.setApproval(ApprovalEnum.NO.getCode());
-        if (kwsEnterpriseDao.insert(kwsEnterprise) <= 0) {
-            throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
+        if (kwsEnterpriseDao.update(kwsEnterprise) <= 0) {
+            throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
         }
 
         /*2、存企业类型,一个企业可以有多个类型*/
@@ -311,48 +307,8 @@ public class KwsEnterpriseService {
             if (kwsEntDeptDao.insert(kwsEntDept) <= 0) {
                 throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
             }
-            return;
         }
 
-        /*4、新增管理员机构*/
-        KwsDept kwsDept = new KwsDept();
-        long deptId = new IdWorker(1L).nextId();
-        kwsDept.setSystemType(DeptTypeEnum.MANAGE.getCode());
-        kwsDept.setEntId(entId);
-        kwsDept.setName(DeptTypeEnum.MANAGE.getName());
-        kwsDept.setCompany(Global.NO);
-        kwsDept.setParentId(0L);
-        kwsDept.setLevel(1);
-        kwsDept.setSort(0);
-        kwsDept.setId(deptId);
-        kwsDeptService.add(kwsDept);
-
-        /*5、新增管理员角色*/
-        AddRoleReqVo addRoleReqVo = new AddRoleReqVo();
-        List<KwsMenuResVo> list = kwsMenuService.findList(new FindMenuTreePojo());
-        if (CollectionUtils.isEmpty(list)) {
-            throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
-        }
-        addRoleReqVo.setName(Global.MANAGE_NAME);
-        addRoleReqVo.setCurrentDeptId(deptId);
-        addRoleReqVo.setMenuIds(String.join(",", list.stream().map(KwsMenuResVo::getId).map(String::valueOf).toList()));
-        addRoleReqVo.setVisiblePersonal(false);
-        IdResVo idResVo = kwsRoleService.add(addRoleReqVo);
-
-        /*6、新增管理员用户*/
-        String contacts = reqVo.getContacts();
-        String telephone = reqVo.getTelephone();
-        UserAddReqVo userAddReqVo = new UserAddReqVo();
-        userAddReqVo.setSystemType(UserSystemTypeEnum.ENTERPRISE.getCode());
-        userAddReqVo.setAccount(telephone);
-        userAddReqVo.setName(contacts);
-        userAddReqVo.setTelephone(telephone);
-        userAddReqVo.setPhoto("");
-        userAddReqVo.setEmail("");
-        userAddReqVo.setClientId("");
-        userAddReqVo.setIsMain(Global.YES);
-        userAddReqVo.setRoleIds(String.valueOf(idResVo.getId()));
-        kwsUserService.add(userAddReqVo);
     }
 
     /**

+ 51 - 6
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsUserService.java

@@ -2,6 +2,9 @@ package com.sckw.system.service;
 import java.util.Date;
 import com.sckw.core.exception.SystemException;
 import com.sckw.core.model.constant.Global;
+import com.sckw.core.model.enums.ApprovalEnum;
+import com.sckw.core.model.enums.DeptTypeEnum;
+import com.sckw.core.model.enums.UserSystemTypeEnum;
 import com.sckw.core.utils.*;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.redis.utils.RedissonUtils;
@@ -10,9 +13,13 @@ import com.sckw.system.dao.KwsEntCheckTrackDao;
 import com.sckw.system.dao.KwsUserDao;
 import com.sckw.system.dao.KwsUserDeptDao;
 import com.sckw.system.model.KwsDept;
+import com.sckw.system.model.KwsEnterprise;
 import com.sckw.system.model.KwsUser;
 import com.sckw.system.model.KwsUserDept;
+import com.sckw.system.model.pojo.FindMenuTreePojo;
 import com.sckw.system.model.vo.req.*;
+import com.sckw.system.model.vo.res.IdResVo;
+import com.sckw.system.model.vo.res.KwsMenuResVo;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -44,6 +51,12 @@ public class KwsUserService {
     @Autowired
     KwsDeptService kwsDeptService;
 
+    @Autowired
+    KwsEnterpriseService kwsEnterpriseService;
+
+    @Autowired
+    KwsMenuService kwsMenuService;
+
     @Transactional(rollbackFor = Exception.class)
     public void add(UserAddReqVo reqVo) {
         KwsUser kwsUser = new KwsUser();
@@ -63,19 +76,20 @@ public class KwsUserService {
         }
 
         /*4、填充用户角色、用户机构关系*/
-        fillUserRole(reqVo, userId);
+        fillUserRole(reqVo.getRoleIds(), userId);
 
     }
 
     public void register(RegisterReqDto reqDto) {
         /*存用户表、企业表,暂时不处理角色关系,需要认证*/
         KwsUser kwsUser = new KwsUser();
+        long userId = new IdWorker(1).nextId();
         kwsUser.setSystemType(reqDto.getSystemType());
         kwsUser.setAccount(reqDto.getTelephone());
         kwsUser.setName(reqDto.getName());
         kwsUser.setTelephone(reqDto.getTelephone());
         kwsUser.setIsMain(reqDto.getIsMain());
-        kwsUser.setId(new IdWorker(1).nextId());
+        kwsUser.setId(userId);
 
         //填充密码、入库
         fillPassword(kwsUser);
@@ -83,15 +97,46 @@ public class KwsUserService {
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
         }
 
-        //存企业
-
+        /*存企业机构等*/
+        if(reqDto.getIsMain() == Global.YES) {
+            KwsEnterprise kwsEnterprise = new KwsEnterprise();
+            long entId = new IdWorker(1L).nextId();
+            kwsEnterprise.setId(entId);
+            kwsEnterprise.setFirmName(reqDto.getEntName());
+            kwsEnterprise.setApproval(ApprovalEnum.NO.getCode());
+            kwsEnterpriseService.add(kwsEnterprise);
+
+            /*4、新增管理员机构*/
+            KwsDept kwsDept = new KwsDept();
+            long deptId = new IdWorker(1L).nextId();
+            kwsDept.setEntId(entId);
+            kwsDept.setName(DeptTypeEnum.MANAGE.getName());
+            kwsDept.setSystemType(DeptTypeEnum.MANAGE.getCode());
+            kwsDept.setCompany(Global.NO);
+            kwsDeptService.add(kwsDept);
+
+            /*5、新增管理员角色*/
+            AddRoleReqVo addRoleReqVo = new AddRoleReqVo();
+            List<KwsMenuResVo> list = kwsMenuService.findList(new FindMenuTreePojo());
+            if (CollectionUtils.isEmpty(list)) {
+                throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
+            }
+            addRoleReqVo.setName(Global.MANAGE_NAME);
+            addRoleReqVo.setCurrentDeptId(deptId);
+            addRoleReqVo.setMenuIds(String.join(",", list.stream().map(KwsMenuResVo::getId).map(String::valueOf).toList()));
+            addRoleReqVo.setVisiblePersonal(false);
+            IdResVo idResVo = kwsRoleService.add(addRoleReqVo);
+
+            /*6、绑定角色等*/
+            fillUserRole(String.valueOf(idResVo.getId()), userId);
+        }
     }
 
 
-    private void fillUserRole(UserAddReqVo reqVo, long userId) {
+    private void fillUserRole(String roleIds, long userId) {
         UserBindRoleReqVo userBindRoleReqVo = new UserBindRoleReqVo();
         userBindRoleReqVo.setUserId(userId);
-        userBindRoleReqVo.setRoleIds(reqVo.getRoleIds());
+        userBindRoleReqVo.setRoleIds(roleIds);
         kwsRoleService.userBindRole(userBindRoleReqVo);
     }
 

+ 0 - 543
sckw-modules/sckw-system/src/main/resources/mapper/KwsEnterpriseDao.xml

@@ -269,549 +269,6 @@
       </if>
     </trim>
   </insert>
-  <insert id="insertPPPPP" parameterType="com.sckw.system.model.KwsEnterprise">
-    insert into kws_enterprise
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="firmName != null">
-        firm_name,
-      </if>
-      <if test="code != null">
-        code,
-      </if>
-      <if test="contacts != null">
-        contacts,
-      </if>
-      <if test="telephone != null">
-        telephone,
-      </if>
-      <if test="legalName != null">
-        legal_name,
-      </if>
-      <if test="legalTelephone != null">
-        legal_telephone,
-      </if>
-      <if test="head != null">
-        head,
-      </if>
-      <if test="integral != null">
-        integral,
-      </if>
-      <if test="balance != null">
-        balance,
-      </if>
-      <if test="experience != null">
-        experience,
-      </if>
-      <if test="memberLevel != null">
-        member_level,
-      </if>
-      <if test="regTime != null">
-        reg_time,
-      </if>
-      <if test="regSource != null">
-        reg_source,
-      </if>
-      <if test="orgCode != null">
-        org_code,
-      </if>
-      <if test="cityCode != null">
-        city_code,
-      </if>
-      <if test="detailAddress != null">
-        detail_address,
-      </if>
-      <if test="lat != null">
-        lat,
-      </if>
-      <if test="lng != null">
-        lng,
-      </if>
-      <if test="approval != null">
-        approval,
-      </if>
-      <if test="approvalTime != null">
-        approval_time,
-      </if>
-      <if test="manager != null">
-        manager,
-      </if>
-      <if test="remark != null">
-        remark,
-      </if>
-      <if test="status != null">
-        status,
-      </if>
-      <if test="createBy != null">
-        create_by,
-      </if>
-      <if test="createTime != null">
-        create_time,
-      </if>
-      <if test="updateBy != null">
-        update_by,
-      </if>
-      <if test="updateTime != null">
-        update_time,
-      </if>
-      <if test="delFlag != null">
-        del_flag,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=BIGINT},
-      </if>
-      <if test="firmName != null">
-        #{firmName,jdbcType=VARCHAR},
-      </if>
-      <if test="code != null">
-        #{code,jdbcType=VARCHAR},
-      </if>
-      <if test="contacts != null">
-        #{contacts,jdbcType=VARCHAR},
-      </if>
-      <if test="telephone != null">
-        #{telephone,jdbcType=VARCHAR},
-      </if>
-      <if test="legalName != null">
-        #{legalName,jdbcType=VARCHAR},
-      </if>
-      <if test="legalTelephone != null">
-        #{legalTelephone,jdbcType=VARCHAR},
-      </if>
-      <if test="head != null">
-        #{head,jdbcType=VARCHAR},
-      </if>
-      <if test="integral != null">
-        #{integral,jdbcType=INTEGER},
-      </if>
-      <if test="balance != null">
-        #{balance,jdbcType=DECIMAL},
-      </if>
-      <if test="experience != null">
-        #{experience,jdbcType=INTEGER},
-      </if>
-      <if test="memberLevel != null">
-        #{memberLevel,jdbcType=INTEGER},
-      </if>
-      <if test="regTime != null">
-        #{regTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="regSource != null">
-        #{regSource,jdbcType=VARCHAR},
-      </if>
-      <if test="orgCode != null">
-        #{orgCode,jdbcType=VARCHAR},
-      </if>
-      <if test="cityCode != null">
-        #{cityCode,jdbcType=INTEGER},
-      </if>
-      <if test="detailAddress != null">
-        #{detailAddress,jdbcType=VARCHAR},
-      </if>
-      <if test="lat != null">
-        #{lat,jdbcType=VARCHAR},
-      </if>
-      <if test="lng != null">
-        #{lng,jdbcType=VARCHAR},
-      </if>
-      <if test="approval != null">
-        #{approval,jdbcType=INTEGER},
-      </if>
-      <if test="approvalTime != null">
-        #{approvalTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="manager != null">
-        #{manager,jdbcType=BIGINT},
-      </if>
-      <if test="remark != null">
-        #{remark,jdbcType=VARCHAR},
-      </if>
-      <if test="status != null">
-        #{status,jdbcType=INTEGER},
-      </if>
-      <if test="createBy != null">
-        #{createBy,jdbcType=BIGINT},
-      </if>
-      <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="updateBy != null">
-        #{updateBy,jdbcType=BIGINT},
-      </if>
-      <if test="updateTime != null">
-        #{updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="delFlag != null">
-        #{delFlag,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
-  <insert id="insertPPPPP" parameterType="com.sckw.system.model.KwsEnterprise">
-    insert into kws_enterprise
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="firmName != null">
-        firm_name,
-      </if>
-      <if test="code != null">
-        code,
-      </if>
-      <if test="contacts != null">
-        contacts,
-      </if>
-      <if test="telephone != null">
-        telephone,
-      </if>
-      <if test="legalName != null">
-        legal_name,
-      </if>
-      <if test="legalTelephone != null">
-        legal_telephone,
-      </if>
-      <if test="head != null">
-        head,
-      </if>
-      <if test="integral != null">
-        integral,
-      </if>
-      <if test="balance != null">
-        balance,
-      </if>
-      <if test="experience != null">
-        experience,
-      </if>
-      <if test="memberLevel != null">
-        member_level,
-      </if>
-      <if test="regTime != null">
-        reg_time,
-      </if>
-      <if test="regSource != null">
-        reg_source,
-      </if>
-      <if test="orgCode != null">
-        org_code,
-      </if>
-      <if test="cityCode != null">
-        city_code,
-      </if>
-      <if test="detailAddress != null">
-        detail_address,
-      </if>
-      <if test="lat != null">
-        lat,
-      </if>
-      <if test="lng != null">
-        lng,
-      </if>
-      <if test="approval != null">
-        approval,
-      </if>
-      <if test="approvalTime != null">
-        approval_time,
-      </if>
-      <if test="manager != null">
-        manager,
-      </if>
-      <if test="remark != null">
-        remark,
-      </if>
-      <if test="status != null">
-        status,
-      </if>
-      <if test="createBy != null">
-        create_by,
-      </if>
-      <if test="createTime != null">
-        create_time,
-      </if>
-      <if test="updateBy != null">
-        update_by,
-      </if>
-      <if test="updateTime != null">
-        update_time,
-      </if>
-      <if test="delFlag != null">
-        del_flag,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=BIGINT},
-      </if>
-      <if test="firmName != null">
-        #{firmName,jdbcType=VARCHAR},
-      </if>
-      <if test="code != null">
-        #{code,jdbcType=VARCHAR},
-      </if>
-      <if test="contacts != null">
-        #{contacts,jdbcType=VARCHAR},
-      </if>
-      <if test="telephone != null">
-        #{telephone,jdbcType=VARCHAR},
-      </if>
-      <if test="legalName != null">
-        #{legalName,jdbcType=VARCHAR},
-      </if>
-      <if test="legalTelephone != null">
-        #{legalTelephone,jdbcType=VARCHAR},
-      </if>
-      <if test="head != null">
-        #{head,jdbcType=VARCHAR},
-      </if>
-      <if test="integral != null">
-        #{integral,jdbcType=INTEGER},
-      </if>
-      <if test="balance != null">
-        #{balance,jdbcType=DECIMAL},
-      </if>
-      <if test="experience != null">
-        #{experience,jdbcType=INTEGER},
-      </if>
-      <if test="memberLevel != null">
-        #{memberLevel,jdbcType=INTEGER},
-      </if>
-      <if test="regTime != null">
-        #{regTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="regSource != null">
-        #{regSource,jdbcType=VARCHAR},
-      </if>
-      <if test="orgCode != null">
-        #{orgCode,jdbcType=VARCHAR},
-      </if>
-      <if test="cityCode != null">
-        #{cityCode,jdbcType=INTEGER},
-      </if>
-      <if test="detailAddress != null">
-        #{detailAddress,jdbcType=VARCHAR},
-      </if>
-      <if test="lat != null">
-        #{lat,jdbcType=VARCHAR},
-      </if>
-      <if test="lng != null">
-        #{lng,jdbcType=VARCHAR},
-      </if>
-      <if test="approval != null">
-        #{approval,jdbcType=INTEGER},
-      </if>
-      <if test="approvalTime != null">
-        #{approvalTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="manager != null">
-        #{manager,jdbcType=BIGINT},
-      </if>
-      <if test="remark != null">
-        #{remark,jdbcType=VARCHAR},
-      </if>
-      <if test="status != null">
-        #{status,jdbcType=INTEGER},
-      </if>
-      <if test="createBy != null">
-        #{createBy,jdbcType=BIGINT},
-      </if>
-      <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="updateBy != null">
-        #{updateBy,jdbcType=BIGINT},
-      </if>
-      <if test="updateTime != null">
-        #{updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="delFlag != null">
-        #{delFlag,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
-  <insert id="insertPPPPP" parameterType="com.sckw.system.model.KwsEnterprise">
-    insert into kws_enterprise
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="firmName != null">
-        firm_name,
-      </if>
-      <if test="code != null">
-        code,
-      </if>
-      <if test="contacts != null">
-        contacts,
-      </if>
-      <if test="telephone != null">
-        telephone,
-      </if>
-      <if test="legalName != null">
-        legal_name,
-      </if>
-      <if test="legalTelephone != null">
-        legal_telephone,
-      </if>
-      <if test="head != null">
-        head,
-      </if>
-      <if test="integral != null">
-        integral,
-      </if>
-      <if test="balance != null">
-        balance,
-      </if>
-      <if test="experience != null">
-        experience,
-      </if>
-      <if test="memberLevel != null">
-        member_level,
-      </if>
-      <if test="regTime != null">
-        reg_time,
-      </if>
-      <if test="regSource != null">
-        reg_source,
-      </if>
-      <if test="orgCode != null">
-        org_code,
-      </if>
-      <if test="cityCode != null">
-        city_code,
-      </if>
-      <if test="detailAddress != null">
-        detail_address,
-      </if>
-      <if test="lat != null">
-        lat,
-      </if>
-      <if test="lng != null">
-        lng,
-      </if>
-      <if test="approval != null">
-        approval,
-      </if>
-      <if test="approvalTime != null">
-        approval_time,
-      </if>
-      <if test="manager != null">
-        manager,
-      </if>
-      <if test="remark != null">
-        remark,
-      </if>
-      <if test="status != null">
-        status,
-      </if>
-      <if test="createBy != null">
-        create_by,
-      </if>
-      <if test="createTime != null">
-        create_time,
-      </if>
-      <if test="updateBy != null">
-        update_by,
-      </if>
-      <if test="updateTime != null">
-        update_time,
-      </if>
-      <if test="delFlag != null">
-        del_flag,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=BIGINT},
-      </if>
-      <if test="firmName != null">
-        #{firmName,jdbcType=VARCHAR},
-      </if>
-      <if test="code != null">
-        #{code,jdbcType=VARCHAR},
-      </if>
-      <if test="contacts != null">
-        #{contacts,jdbcType=VARCHAR},
-      </if>
-      <if test="telephone != null">
-        #{telephone,jdbcType=VARCHAR},
-      </if>
-      <if test="legalName != null">
-        #{legalName,jdbcType=VARCHAR},
-      </if>
-      <if test="legalTelephone != null">
-        #{legalTelephone,jdbcType=VARCHAR},
-      </if>
-      <if test="head != null">
-        #{head,jdbcType=VARCHAR},
-      </if>
-      <if test="integral != null">
-        #{integral,jdbcType=INTEGER},
-      </if>
-      <if test="balance != null">
-        #{balance,jdbcType=DECIMAL},
-      </if>
-      <if test="experience != null">
-        #{experience,jdbcType=INTEGER},
-      </if>
-      <if test="memberLevel != null">
-        #{memberLevel,jdbcType=INTEGER},
-      </if>
-      <if test="regTime != null">
-        #{regTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="regSource != null">
-        #{regSource,jdbcType=VARCHAR},
-      </if>
-      <if test="orgCode != null">
-        #{orgCode,jdbcType=VARCHAR},
-      </if>
-      <if test="cityCode != null">
-        #{cityCode,jdbcType=INTEGER},
-      </if>
-      <if test="detailAddress != null">
-        #{detailAddress,jdbcType=VARCHAR},
-      </if>
-      <if test="lat != null">
-        #{lat,jdbcType=VARCHAR},
-      </if>
-      <if test="lng != null">
-        #{lng,jdbcType=VARCHAR},
-      </if>
-      <if test="approval != null">
-        #{approval,jdbcType=INTEGER},
-      </if>
-      <if test="approvalTime != null">
-        #{approvalTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="manager != null">
-        #{manager,jdbcType=BIGINT},
-      </if>
-      <if test="remark != null">
-        #{remark,jdbcType=VARCHAR},
-      </if>
-      <if test="status != null">
-        #{status,jdbcType=INTEGER},
-      </if>
-      <if test="createBy != null">
-        #{createBy,jdbcType=BIGINT},
-      </if>
-      <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="updateBy != null">
-        #{updateBy,jdbcType=BIGINT},
-      </if>
-      <if test="updateTime != null">
-        #{updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="delFlag != null">
-        #{delFlag,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
 
   <update id="update" parameterType="com.sckw.system.model.KwsEnterprise">
     update kws_enterprise