PC il y a 2 ans
Parent
commit
f6d5ac176e
23 fichiers modifiés avec 183 ajouts et 440 suppressions
  1. 21 12
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/aspect/DaoAspect.java
  2. 1 6
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/handle/CustomDataSource.java
  3. 1 1
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/handle/CustomMetaHandle.java
  4. 1 1
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/handle/MyConfig.java
  5. 1 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/base/BaseModel.java
  6. 3 2
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/IdWorker.java
  7. 3 2
      sckw-modules/sckw-system/src/main/java/com/sckw/system/controller/KwsUserController.java
  8. 1 1
      sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsDeptDao.java
  9. 3 3
      sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsEntCertificateDao.java
  10. 3 2
      sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsEntTypeDao.java
  11. 3 4
      sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsEnterpriseDao.java
  12. 2 2
      sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsUserDao.java
  13. 1 1
      sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsUserDeptDao.java
  14. 5 0
      sckw-modules/sckw-system/src/main/java/com/sckw/system/model/vo/req/ForgetPasswordReqVo.java
  15. 5 0
      sckw-modules/sckw-system/src/main/java/com/sckw/system/model/vo/req/UpdatePasswordReqVo.java
  16. 1 1
      sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsDeptService.java
  17. 49 39
      sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsEnterpriseService.java
  18. 0 28
      sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsUserDeptService.java
  19. 21 31
      sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsUserService.java
  20. 18 68
      sckw-modules/sckw-system/src/main/resources/mapper/KwsEntCertificateDao.xml
  21. 14 54
      sckw-modules/sckw-system/src/main/resources/mapper/KwsEntTypeDao.xml
  22. 25 181
      sckw-modules/sckw-system/src/main/resources/mapper/KwsEnterpriseDao.xml
  23. 1 1
      sckw-modules/sckw-system/src/main/resources/mapper/KwsUserDao.xml

+ 21 - 12
sckw-common/sckw-common-core/src/main/java/com/sckw/core/aspect/DaoAspect.java

@@ -42,7 +42,7 @@ public class DaoAspect {
     public void daoCreate() {
     }
 
-//    @Around("daoUpdate()")
+    @Around("daoUpdate()")
     public Object doAroundUpdate(ProceedingJoinPoint point) throws Throwable {
         /*ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
         if (attributes == null) {
@@ -69,7 +69,7 @@ public class DaoAspect {
         return object;
     }
 
-//    @Around("daoCreate()")
+    @Around("daoCreate()")
     public Object doAroundCreate(ProceedingJoinPoint point) throws Throwable {
         /*ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
         if (attributes == null) {
@@ -89,17 +89,26 @@ public class DaoAspect {
                     if (isProperty(arg, UPDATE_BY) && BeanUtils.getProperty(arg, UPDATE_BY) == null) {
                         BeanUtils.setProperty(arg, UPDATE_BY, userId);
                     }
-                }
-
-                if (userName != null){
-                    if (isProperty(arg, CREATE_BY_NAME) && StringUtils.isBlank(BeanUtils.getProperty(arg, CREATE_BY_NAME))) {
-                        BeanUtils.setProperty(arg, CREATE_BY_NAME, userName);
+                } else {
+                    userId = 1L;
+                    userName = "暂无";
+                    if (isProperty(arg, CREATE_BY) && BeanUtils.getProperty(arg, CREATE_BY) == null) {
+                        BeanUtils.setProperty(arg, CREATE_BY, userId);
                     }
-                    if (isProperty(arg, UPDATE_BY_NAME) && StringUtils.isBlank(BeanUtils.getProperty(arg, UPDATE_BY_NAME))) {
-                        BeanUtils.setProperty(arg, UPDATE_BY_NAME, userName);
+                    if (isProperty(arg, UPDATE_BY) && BeanUtils.getProperty(arg, UPDATE_BY) == null) {
+                        BeanUtils.setProperty(arg, UPDATE_BY, userId);
                     }
                 }
 
+//                if (userName != null){
+//                    if (isProperty(arg, CREATE_BY_NAME) && StringUtils.isBlank(BeanUtils.getProperty(arg, CREATE_BY_NAME))) {
+//                        BeanUtils.setProperty(arg, CREATE_BY_NAME, userName);
+//                    }
+//                    if (isProperty(arg, UPDATE_BY_NAME) && StringUtils.isBlank(BeanUtils.getProperty(arg, UPDATE_BY_NAME))) {
+//                        BeanUtils.setProperty(arg, UPDATE_BY_NAME, userName);
+//                    }
+//                }
+
                 if (isProperty(arg, CREATE_TIME) && StringUtils.isBlank(BeanUtils.getProperty(arg, CREATE_TIME))) {
                     BeanUtils.setProperty(arg, CREATE_TIME, date);
                 }
@@ -112,9 +121,9 @@ public class DaoAspect {
                     BeanUtils.setProperty(arg, ID, new IdWorker(1).nextId());
                 }
 
-                if (isProperty(arg, STATUS) && StringUtils.isBlank(BeanUtils.getProperty(arg, STATUS))) {
-                    BeanUtils.setProperty(arg, STATUS, Global.NO);
-                }
+//                if (isProperty(arg, STATUS) && StringUtils.isBlank(String.valueOf(BeanUtils.getProperty(arg, STATUS)))) {
+//                    BeanUtils.setProperty(arg, STATUS, Global.NO);
+//                }
 
                 if (isProperty(arg, DEL_FLAG) && StringUtils.isBlank(BeanUtils.getProperty(arg, DEL_FLAG))) {
                     BeanUtils.setProperty(arg, DEL_FLAG, Global.NO);

+ 1 - 6
sckw-common/sckw-common-core/src/main/java/com/sckw/core/handle/CustomDataSource.java

@@ -14,8 +14,7 @@ import javax.sql.DataSource;
  * @desc TODO
  * @date 2023/6/9
  */
-@Slf4j
-@Configuration
+//@Configuration
 public class CustomDataSource {
 
     @Value("${spring.datasource.dynamic.datasource.master.url}")
@@ -33,10 +32,6 @@ public class CustomDataSource {
     @Bean
     @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.master")
     public DataSource dataSource() {
-        log.info("url:{}", url);
-        log.info("username:{}", username);
-        log.info("password:{}", password);
-        log.info("driver:{}", driver);
         return DataSourceBuilder.create().url(url).username(username).password(password).driverClassName(driver).build();
 
     }

+ 1 - 1
sckw-common/sckw-common-core/src/main/java/com/sckw/core/handle/CustomMetaHandle.java

@@ -18,7 +18,7 @@ import java.util.Objects;
  * @desc TODO
  * @date 2023/6/9
  */
-@Component
+//@Component
 public class CustomMetaHandle implements MetaObjectHandler {
 
     @Override

+ 1 - 1
sckw-common/sckw-common-core/src/main/java/com/sckw/core/handle/MyConfig.java

@@ -29,7 +29,7 @@ import javax.sql.DataSource;
  * @desc TODO
  * @date 2023/6/9
  */
-@Configuration
+//@Configuration
 public class MyConfig {
 
     @Autowired

+ 1 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/base/BaseModel.java

@@ -49,6 +49,7 @@ public class BaseModel implements Serializable {
 	/**
 	 * 更新人
 	 */
+	@TableField(fill = FieldFill.INSERT_UPDATE)
 	private Long updateBy;
 
 	/**

+ 3 - 2
sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/IdWorker.java

@@ -107,7 +107,8 @@ public class IdWorker {
     }
 
     public static void main(String[] args) {
-        System.out.println(new IdWorker(1).nextId());
-        System.out.println(System.currentTimeMillis());
+        for (int i  = 0; i < 100; i++) {
+            System.out.println(new IdWorker(1).nextId());
+        }
     }
 }

+ 3 - 2
sckw-modules/sckw-system/src/main/java/com/sckw/system/controller/KwsUserController.java

@@ -60,7 +60,7 @@ public class KwsUserController {
      * @date 2023/5/30
      **/
     @PostMapping("/findList")
-    public HttpResult findList(@RequestBody HashMap params) throws Exception {
+    public HttpResult findList(@RequestBody KwsUser params) throws Exception {
         return HttpResult.ok(kwsUserService.findList(params));
     }
 
@@ -86,7 +86,8 @@ public class KwsUserController {
      **/
     @PostMapping("/update")
     public HttpResult update(@RequestBody KwsUser params) throws Exception {
-        return kwsUserService.update(params);
+        kwsUserService.update(params);
+        return HttpResult.ok();
     }
 
     /**

+ 1 - 1
sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsDeptDao.java

@@ -13,7 +13,7 @@ import java.util.Map;
  * @date 2023-05-31
  */
 @Mapper
-public interface KwsDeptDao extends BaseMapper<KwsDept> {
+public interface KwsDeptDao {
 
     /**
      * 新增

+ 3 - 3
sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsEntCertificateDao.java

@@ -1,6 +1,5 @@
 package com.sckw.system.dao;
 
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.sckw.system.model.KwsEntCertificate;
 import org.apache.ibatis.annotations.Mapper;
 import java.util.List;
@@ -11,7 +10,7 @@ import java.util.List;
  * @date 2023-06-02
  */
 @Mapper
-public interface KwsEntCertificateDao extends BaseMapper<KwsEntCertificate> {
+public interface KwsEntCertificateDao {
     /**
      * 新增
      * @param record
@@ -44,6 +43,7 @@ public interface KwsEntCertificateDao extends BaseMapper<KwsEntCertificate> {
     /**
      * 批量插入
      */
-    int insertForBatch(List<KwsEntCertificate> list);
+    int saveBatch(List<KwsEntCertificate> list);
 
+    List<KwsEntCertificate> selectByEntId(Long id);
 }

+ 3 - 2
sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsEntTypeDao.java

@@ -1,8 +1,9 @@
 package com.sckw.system.dao;
 
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.sckw.system.model.KwsEntType;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
 import java.util.List;
 
 /**
@@ -39,5 +40,5 @@ public interface KwsEntTypeDao {
      * @param list
      * @return
      */
-    int insertForBatchtest(List<KwsEntType> list);
+    int saveBatch(@Param(value = "list") List<KwsEntType> list);
 }

+ 3 - 4
sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsEnterpriseDao.java

@@ -2,6 +2,7 @@ package com.sckw.system.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.sckw.system.model.KwsEnterprise;
+import com.sckw.system.model.vo.req.EntFindPageReqVo;
 import org.apache.ibatis.annotations.Mapper;
 import java.util.List;
 import java.util.Map;
@@ -12,7 +13,7 @@ import java.util.Map;
  * @date 2023-06-02
  */
 @Mapper
-public interface KwsEnterpriseDao extends BaseMapper<KwsEnterprise> {
+public interface KwsEnterpriseDao {
     /**
      * 新增
      * @param record
@@ -20,8 +21,6 @@ public interface KwsEnterpriseDao extends BaseMapper<KwsEnterprise> {
      */
     int insert(KwsEnterprise record);
 
-    int insertPPPPP(KwsEnterprise record);
-
     /**
      * 更新
      * @param record
@@ -49,5 +48,5 @@ public interface KwsEnterpriseDao extends BaseMapper<KwsEnterprise> {
      * @param params
      * @return
      */
-    List<Map<String, Object>> findList(Map<String, Object> params);
+    List<KwsEnterprise> findList(EntFindPageReqVo params);
 }

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

@@ -12,7 +12,7 @@ import java.util.Map;
  * @date 2023-05-31
  */
 @Mapper
-public interface KwsUserDao extends BaseMapper<KwsUser> {
+public interface KwsUserDao {
     /**
      * 新增
      * @param record
@@ -47,5 +47,5 @@ public interface KwsUserDao extends BaseMapper<KwsUser> {
      * @param params
      * @return
      */
-    List<Map<String, Object>> findList(Map<String, Object> params);
+    List<KwsUser> findList(KwsUser params);
 }

+ 1 - 1
sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsUserDeptDao.java

@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
  * @date 2023-05-31
  */
 @Mapper
-public interface KwsUserDeptDao extends BaseMapper<KwsUserDept> {
+public interface KwsUserDeptDao {
     /**
      * 新增
      * @param record

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

@@ -26,4 +26,9 @@ public class ForgetPasswordReqVo implements Serializable {
     @NotBlank(message = "验证码不能为空")
     private String captcha;
 
+    /**
+     * 系统类型(1运营端、2企业开户)
+     */
+    private int systemType;
+
 }

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

@@ -26,4 +26,9 @@ public class UpdatePasswordReqVo implements Serializable {
     @NotBlank(message = "新密码不能为空")
     private String newPassword;
 
+    /**
+     * 系统类型(1运营端、2企业开户)
+     */
+    private int systemType;
+
 }

+ 1 - 1
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsDeptService.java

@@ -22,7 +22,7 @@ import java.util.Map;
  * @date 2023-05-31
  */
 @Service
-public class KwsDeptService extends ServiceImpl<KwsDeptDao, KwsDept> {
+public class KwsDeptService {
 
     @Autowired
     KwsDeptDao kwsDeptDao;

+ 49 - 39
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsEnterpriseService.java

@@ -3,8 +3,6 @@ package com.sckw.system.service;
 import java.util.*;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.sckw.core.exception.SystemException;
@@ -40,7 +38,7 @@ import org.springframework.transaction.annotation.Transactional;
  * @date 2023-05-31
  */
 @Service
-public class KwsEnterpriseService extends ServiceImpl<KwsEnterpriseDao, KwsEnterprise> {
+public class KwsEnterpriseService {
 
     @Autowired
     private KwsEnterpriseDao kwsEnterpriseDao;
@@ -93,16 +91,18 @@ public class KwsEnterpriseService extends ServiceImpl<KwsEnterpriseDao, KwsEnter
         long entId = reqVo.getId();
         KwsEnterprise kwsEnterprise = checkKwsEnterpriseById(entId);
         BeanUtils.copyProperties(reqVo, kwsEnterprise);
-        if (!this.updateById(kwsEnterprise)) {
+        if (kwsEnterpriseDao.update(kwsEnterprise) <= 0) {
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
         }
 
         /*2、更新企业类型*/
-        LambdaQueryWrapper<KwsEntType> kwsEntTypeLambdaQueryWrapper = new LambdaQueryWrapper<>();
-        kwsEntTypeLambdaQueryWrapper.eq(KwsEntType::getEntId, entId);
-//        List<KwsEntType> kwsEntTypes = kwsEntTypeDao.selectList(kwsEntTypeLambdaQueryWrapper);
         List<KwsEntType> kwsEntTypes = null;
-        List<String> typeReqList = Arrays.stream(reqVo.getEntTypes().split(",")).toList();
+        List<String> typeReqList = new ArrayList<>();
+        String entTypes = reqVo.getEntTypes();
+        if (StringUtils.isNotBlank(entTypes)) {
+            typeReqList = Arrays.stream(entTypes.split(",")).toList();
+        }
+
         //若入参传来的type在表里面本来就有则不管,没有就新增
         typeReqList.forEach(item -> {
             if (CollectionUtils.isEmpty(kwsEntTypes) || kwsEntTypes.stream().filter(x -> x.getType() == Integer.parseInt(item)).findAny().isPresent()) {
@@ -119,8 +119,9 @@ public class KwsEnterpriseService extends ServiceImpl<KwsEnterpriseDao, KwsEnter
 
         //若表里的type没有在入参传来的type里则做逻辑删除,有就不管
         if (CollectionUtils.isNotEmpty(kwsEntTypes)) {
+            List<String> finalTypeReqList = typeReqList;
             kwsEntTypes.forEach(item -> {
-                if (typeReqList.contains(String.valueOf(item.getType()))) {
+                if (finalTypeReqList.contains(String.valueOf(item.getType()))) {
                     item.setDelFlag(Global.YES);
                     if (kwsEntTypeDao.update(item) <= 0) {
                         throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
@@ -130,7 +131,21 @@ public class KwsEnterpriseService extends ServiceImpl<KwsEnterpriseDao, KwsEnter
         }
 
         /*更新证书信息*/
+        //1、没有传则全部删除
         List<BusinessLicense> certificates = reqVo.getCertificates();
+        if (CollectionUtils.isEmpty(certificates)) {
+            List<KwsEntCertificate> kwsEntCertificates = kwsEntCertificateDao.selectByEntId(entId);
+            if (!CollectionUtils.isEmpty(kwsEntCertificates)) {
+                kwsEntCertificates.forEach(item -> {
+                    item.setDelFlag(Global.YES);
+                    if(kwsEntCertificateDao.update(item) <= 0){
+                        throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
+                    }
+                });
+            }
+            return;
+        }
+
         certificates.forEach(item -> {
             long id = item.getId();
             if (Objects.isNull(id)) {
@@ -153,8 +168,8 @@ public class KwsEnterpriseService extends ServiceImpl<KwsEnterpriseDao, KwsEnter
     }
 
     public KwsEntCertificate checkEntCertificate(long id){
-        KwsEntCertificate kwsEntCertificate = kwsEntCertificateDao.selectById(id);
-        if(Objects.isNull(kwsEntCertificate) || kwsEntCertificate.getDelFlag() == Global.NO){
+        KwsEntCertificate kwsEntCertificate = kwsEntCertificateDao.selectByKey(id);
+        if(Objects.isNull(kwsEntCertificate) || kwsEntCertificate.getDelFlag() == Global.YES){
             throw new SystemException(HttpStatus.QUERY_FAIL_CODE, HttpStatus.ENTCERTIFICATES_NOT_EXISTS);
         }
         return kwsEntCertificate;
@@ -192,16 +207,7 @@ public class KwsEnterpriseService extends ServiceImpl<KwsEnterpriseDao, KwsEnter
      * @date: 2023/6/9
      */
     public List<KwsEnterprise> findList(EntFindPageReqVo reqVo) {
-        LambdaQueryWrapper<KwsEnterprise> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(StringUtils.isNotBlank(reqVo.getFirmName()), KwsEnterprise::getFirmName, reqVo.getFirmName());
-        wrapper.eq(StringUtils.isNotBlank(reqVo.getContacts()), KwsEnterprise::getContacts, reqVo.getContacts());
-        wrapper.eq(StringUtils.isNotBlank(reqVo.getTelephone()), KwsEnterprise::getTelephone, reqVo.getTelephone());
-        wrapper.eq(StringUtils.isNotBlank(reqVo.getLegalName()), KwsEnterprise::getLegalName, reqVo.getLegalName());
-        wrapper.eq(StringUtils.isNotBlank(reqVo.getLegalTelephone()), KwsEnterprise::getLegalTelephone, reqVo.getLegalTelephone());
-        wrapper.eq(!Objects.isNull(reqVo.getApproval()), KwsEnterprise::getApproval, reqVo.getApproval());
-        wrapper.eq(KwsEnterprise::getDelFlag, Global.NO);
-        wrapper.orderByDesc(KwsEnterprise::getCreateTime);
-        return this.list(wrapper);
+        return kwsEnterpriseDao.findList(reqVo);
     }
 
 
@@ -246,8 +252,7 @@ public class KwsEnterpriseService extends ServiceImpl<KwsEnterpriseDao, KwsEnter
         kwsEnterprise.setMemberLevel(0);
         kwsEnterprise.setRegTime(new Date());
         kwsEnterprise.setApproval(ApprovalEnum.NO.getCode());
-        kwsEnterpriseDao.insertPPPPP(kwsEnterprise);
-        if (!this.save(kwsEnterprise)) {
+        if (kwsEnterpriseDao.insert(kwsEnterprise) <= 0) {
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
         }
 
@@ -257,9 +262,16 @@ public class KwsEnterpriseService extends ServiceImpl<KwsEnterpriseDao, KwsEnter
             KwsEntType kwsEntType = new KwsEntType();
             kwsEntType.setEntId(entId);
             kwsEntType.setType(Integer.parseInt(item));
+            kwsEntType.setId(new IdWorker(1).nextId());
+            kwsEntType.setDelFlag(Global.NO);
+            kwsEntType.setStatus(Global.NO);
+            kwsEntType.setCreateBy(1L);
+            kwsEntType.setUpdateBy(1L);
+            kwsEntType.setCreateTime(new Date());
+            kwsEntType.setUpdateTime(new Date());
             kwsEntTypes.add(kwsEntType);
         });
-        if (kwsEntTypeDao.insertForBatchtest(kwsEntTypes) != kwsEntTypes.size()) {
+        if (kwsEntTypeDao.saveBatch(kwsEntTypes) != kwsEntTypes.size()) {
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
         }
 
@@ -269,10 +281,17 @@ public class KwsEnterpriseService extends ServiceImpl<KwsEnterpriseDao, KwsEnter
             KwsEntCertificate kwsEntCertificate = new KwsEntCertificate();
             //todo 上传证书正反面,将url放到两个入参里
             kwsEntCertificate.setEntId(entId);
+            kwsEntCertificate.setId(new IdWorker(1).nextId());
+            kwsEntCertificate.setDelFlag(Global.NO);
+            kwsEntCertificate.setStatus(Global.NO);
+            kwsEntCertificate.setCreateBy(1L);
+            kwsEntCertificate.setUpdateBy(1L);
+            kwsEntCertificate.setCreateTime(new Date());
+            kwsEntCertificate.setUpdateTime(new Date());
             BeanUtils.copyProperties(item, kwsEntCertificate);
             kwsEntCertificates.add(kwsEntCertificate);
         });
-        if (kwsEntCertificateDao.insertForBatch(kwsEntCertificates) != kwsEntCertificates.size()) {
+        if (kwsEntCertificateDao.saveBatch(kwsEntCertificates) != kwsEntCertificates.size()) {
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
         }
     }
@@ -284,11 +303,8 @@ public class KwsEnterpriseService extends ServiceImpl<KwsEnterpriseDao, KwsEnter
     public void approval(KwsEntCheckTrack kwsEntCheckTrack) {
         /*更新企业信息主表审批状态*/
         KwsEnterprise kwsEnterprise = checkKwsEnterpriseById(kwsEntCheckTrack.getEntId());
-        LambdaUpdateChainWrapper<KwsEnterprise> wrapper = new LambdaUpdateChainWrapper<>(kwsEnterpriseDao);
-        wrapper.eq(KwsEnterprise::getId, kwsEnterprise.getId());
-        wrapper.eq(KwsEnterprise::getApproval, ApprovalEnum.NO.getCode());
-        wrapper.set(KwsEnterprise::getApproval, kwsEntCheckTrack.getStatus());
-        if (!wrapper.update()) {
+        kwsEnterprise.setApproval(kwsEntCheckTrack.getStatus());
+        if (kwsEnterpriseDao.update(kwsEnterprise) <= 0) {
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
         }
 
@@ -299,11 +315,8 @@ public class KwsEnterpriseService extends ServiceImpl<KwsEnterpriseDao, KwsEnter
     }
 
     private KwsEnterprise checkKwsEnterpriseById(long id) {
-        LambdaQueryWrapper<KwsEnterprise> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(KwsEnterprise::getId, id);
-        wrapper.eq(KwsEnterprise::getDelFlag, Global.NO);
-        KwsEnterprise kwsEnterprise = this.getOne(wrapper);
-        if (Objects.isNull(kwsEnterprise)) {
+        KwsEnterprise kwsEnterprise = kwsEnterpriseDao.selectByKey(id);
+        if (Objects.isNull(kwsEnterprise) || kwsEnterprise.getDelFlag() == Global.YES) {
             throw new SystemException(HttpStatus.QUERY_FAIL_CODE, HttpStatus.ENT_NOT_EXISTS);
         }
         return kwsEnterprise;
@@ -325,10 +338,7 @@ public class KwsEnterpriseService extends ServiceImpl<KwsEnterpriseDao, KwsEnter
      */
     public List<CertificateResVo> certificate(Long id) {
         /*查企业资质*/
-        LambdaQueryWrapper<KwsEntCertificate> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(KwsEntCertificate::getEntId, id);
-        wrapper.eq(KwsEntCertificate::getDelFlag, Global.NO);
-        List<KwsEntCertificate> kwsEntCertificates = kwsEntCertificateDao.selectList(wrapper);
+        List<KwsEntCertificate> kwsEntCertificates = kwsEntCertificateDao.selectByEntId(id);
         if (CollectionUtils.isEmpty(kwsEntCertificates)) {
             throw new SystemException(HttpStatus.QUERY_FAIL_CODE, HttpStatus.ENTCERTIFICATES_NOT_EXISTS);
         }

+ 0 - 28
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsUserDeptService.java

@@ -1,28 +0,0 @@
-package com.sckw.system.service;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.sckw.system.dao.KwsUserDeptDao;
-import com.sckw.system.model.KwsUserDept;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Slf4j
-@Service
-public class KwsUserDeptService extends ServiceImpl<KwsUserDeptDao, KwsUserDept> {
-
-    /**
-     * 根据用户id查用户和机构关联关系
-     * @param userId
-     * @return
-     */
-    public List<KwsUserDept> queryUserDeptByUserId(Long userId) {
-        LambdaQueryWrapper<KwsUserDept> kwsUserDeptWrapper = new LambdaQueryWrapper<>();
-        kwsUserDeptWrapper.eq(KwsUserDept::getUserId, userId);
-        return this.list(kwsUserDeptWrapper);
-    }
-
-
-}

+ 21 - 31
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsUserService.java

@@ -32,7 +32,7 @@ import java.util.Objects;
  */
 @Slf4j
 @Service
-public class KwsUserService extends ServiceImpl<KwsUserDao, KwsUser> {
+public class KwsUserService {
 
     @Autowired
     KwsUserDao kwsUserDao;
@@ -45,9 +45,6 @@ public class KwsUserService extends ServiceImpl<KwsUserDao, KwsUser> {
     @Autowired
     KwsDeptService kwsDeptService;
 
-    @Autowired
-    KwsUserDeptService kwsUserDeptService;
-
     @Autowired
     KwsEnterpriseService kwsEnterpriseService;
 
@@ -114,24 +111,19 @@ public class KwsUserService extends ServiceImpl<KwsUserDao, KwsUser> {
      * @return
      * @throws Exception
      */
-    public HttpResult update(KwsUser params) throws Exception {
+    public void update(KwsUser params) throws Exception {
         //更换账号后账号唯一性校验
         if (StringUtils.isNotBlank(params.getAccount())) {
             //用户信息
-            KwsUser user = kwsUserDao.selectByKey(params.getId());
-            if (!user.getAccount().equals(params.getAccount())) {
-                //用户账号唯一性校验
-                Map userParams = new HashMap(){{put("systemType", params.getSystemType()); put("account", params.getAccount());}};
-                List users = kwsUserDao.findList(userParams);
-                if (CollectionUtils.isNotEmpty(users)) {
-                    return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.ACCOUNT_EXISTS);
-                }
+            KwsUser userByAccount = getUserByAccount(params.getAccount(), params.getSystemType());
+            if (Objects.isNull(userByAccount)) {
+                throw new SystemException(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.ACCOUNT_EXISTS);
             }
         }
-
         //更新用户信息
-        int count = kwsUserDao.update(params);
-        return count > 0 ? HttpResult.ok("更新成功!") : HttpResult.error();
+        if (kwsUserDao.update(params) <= 0) {
+            throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
+        }
     }
 
     /**
@@ -162,7 +154,7 @@ public class KwsUserService extends ServiceImpl<KwsUserDao, KwsUser> {
     /**
      * 查询
      */
-    public List<Map<String, Object>> findList(Map<String, Object> params) throws Exception{
+    public List<KwsUser> findList(KwsUser params) throws Exception{
         return kwsUserDao.findList(params);
     }
 
@@ -176,10 +168,7 @@ public class KwsUserService extends ServiceImpl<KwsUserDao, KwsUser> {
         }
 
         //用户账号唯一性校验
-        LambdaQueryWrapper<KwsUser> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(KwsUser::getSystemType, kwsUser.getSystemType());
-        wrapper.eq(KwsUser::getAccount, kwsUser.getAccount());
-        List<KwsUser> users = this.list(wrapper);
+        List<KwsUser> users = kwsUserDao.findList(kwsUser);
         if (CollectionUtils.isNotEmpty(users)) {
             throw new SystemException(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.ACCOUNT_EXISTS);
         }
@@ -190,11 +179,12 @@ public class KwsUserService extends ServiceImpl<KwsUserDao, KwsUser> {
     /**
      * 根据用户名查用户信息
      */
-    public KwsUser getUserByAccount(String username) {
-        LambdaQueryWrapper<KwsUser> kwsUserWrapper = new LambdaQueryWrapper<>();
-        kwsUserWrapper.eq(KwsUser::getAccount, username);
-        kwsUserWrapper.eq(KwsUser::getDelFlag, Global.NO);
-        return kwsUserDao.selectOne(kwsUserWrapper);
+    public KwsUser getUserByAccount(String username, int systemType) {
+        KwsUser kwsUser = new KwsUser();
+        kwsUser.setAccount(username);
+        kwsUser.setSystemType(systemType);
+        List<KwsUser> list = kwsUserDao.findList(kwsUser);
+        return CollectionUtils.isEmpty(list) ? null : list.get(0);
     }
 
     /**
@@ -202,7 +192,7 @@ public class KwsUserService extends ServiceImpl<KwsUserDao, KwsUser> {
      */
     public void updatePassword(UpdatePasswordReqVo reqVo) {
         //查用户信息
-        KwsUser kwsUser = checkUserBase(reqVo.getAccount());
+        KwsUser kwsUser = checkUserBase(reqVo.getAccount(), reqVo.getSystemType());
 
         //密码校验
         String password = reqVo.getPassword();
@@ -231,7 +221,7 @@ public class KwsUserService extends ServiceImpl<KwsUserDao, KwsUser> {
      */
     public void forgetPassword(ForgetPasswordReqVo reqVo) {
         //查用户信息
-        KwsUser kwsUser = checkUserBase(reqVo.getAccount());
+        KwsUser kwsUser = checkUserBase(reqVo.getAccount(), reqVo.getSystemType());
 
         //从缓存中取出验证码,校验
         //todo
@@ -247,8 +237,8 @@ public class KwsUserService extends ServiceImpl<KwsUserDao, KwsUser> {
     /**
      * 根据登录名校验
      */
-    public KwsUser checkUserBase(String account) {
-        KwsUser kwsUser = getUserByAccount(account);
+    public KwsUser checkUserBase(String account, int systemType) {
+        KwsUser kwsUser = getUserByAccount(account, systemType);
         if (Objects.isNull(kwsUser)) {
             throw new SystemException(HttpStatus.QUERY_FAIL_CODE, HttpStatus.ACCOUNT_NOT_EXISTS);
         }
@@ -259,7 +249,7 @@ public class KwsUserService extends ServiceImpl<KwsUserDao, KwsUser> {
      * 根据id校验
      */
     public KwsUser checkUserBase(long id) {
-        KwsUser kwsUser = this.getById(id);
+        KwsUser kwsUser = kwsUserDao.selectByKey(id);
         if (Objects.isNull(kwsUser) || kwsUser.getDelFlag() != Global.NO) {
             throw new SystemException(HttpStatus.QUERY_FAIL_CODE, HttpStatus.ACCOUNT_NOT_EXISTS);
         }

+ 18 - 68
sckw-modules/sckw-system/src/main/resources/mapper/KwsEntCertificateDao.xml

@@ -28,6 +28,9 @@
     from kws_ent_certificate
     where id = #{id,jdbcType=BIGINT}
   </select>
+  <select id="selectByEntId" resultType="com.sckw.system.model.KwsEntCertificate">
+    select a.* from kws_ent_certificate a where a.ent_id = #{id} and a.del_flag = 0
+  </select>
 
   <insert id="insert" parameterType="com.sckw.system.model.KwsEntCertificate">
     insert into kws_ent_certificate
@@ -115,94 +118,41 @@
     </trim>
   </insert>
 
-    <insert id="insertForBatch">
+    <insert id="saveBatch">
       insert into kws_ent_certificate
       <trim prefix="(" suffix=")" suffixOverrides=",">
-        <if test="id != null">
           id,
-        </if>
-        <if test="entId != null">
           ent_id,
-        </if>
-        <if test="type != null">
           type,
-        </if>
-        <if test="code != null">
           code,
-        </if>
-        <if test="certificateMian != null">
           certificate_mian,
-        </if>
-        <if test="certificateRevolt != null">
           certificate_revolt,
-        </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>
+          del_flag
       </trim>
       values
         <foreach collection="list" item="item" separator=",">
           <trim prefix="(" suffix=")" suffixOverrides=",">
-          <if test="id != null">
-            #{id,jdbcType=BIGINT},
-          </if>
-          <if test="entId != null">
-            #{entId,jdbcType=BIGINT},
-          </if>
-          <if test="type != null">
-            #{type,jdbcType=INTEGER},
-          </if>
-          <if test="code != null">
-            #{code,jdbcType=VARCHAR},
-          </if>
-          <if test="certificateMian != null">
-            #{certificateMian,jdbcType=VARCHAR},
-          </if>
-          <if test="certificateRevolt != null">
-            #{certificateRevolt,jdbcType=VARCHAR},
-          </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>
+            #{item.id,jdbcType=BIGINT},
+            #{item.entId,jdbcType=BIGINT},
+            #{item.type,jdbcType=INTEGER},
+            #{item.code,jdbcType=VARCHAR},
+            #{item.certificateMian,jdbcType=VARCHAR},
+            #{item.certificateRevolt,jdbcType=VARCHAR},
+            #{item.remark,jdbcType=VARCHAR},
+            #{item.status,jdbcType=INTEGER},
+            #{item.createBy,jdbcType=BIGINT},
+            #{item.createTime,jdbcType=TIMESTAMP},
+            #{item.updateBy,jdbcType=BIGINT},
+            #{item.updateTime,jdbcType=TIMESTAMP},
+            #{item.delFlag,jdbcType=INTEGER}
           </trim>
         </foreach>
-
     </insert>
 
     <update id="update" parameterType="com.sckw.system.model.KwsEntCertificate">

+ 14 - 54
sckw-modules/sckw-system/src/main/resources/mapper/KwsEntTypeDao.xml

@@ -87,73 +87,33 @@
     </trim>
   </insert>
 
-    <insert id="insertForBatchtest" parameterType="com.sckw.system.model.KwsEntType">
+    <insert id="saveBatch" parameterType="com.sckw.system.model.KwsEntType">
       insert into kws_ent_type
       <trim prefix="(" suffix=")" suffixOverrides=",">
-        <if test="id != null">
           id,
-        </if>
-        <if test="entId != null">
           ent_id,
-        </if>
-        <if test="type != null">
           type,
-        </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>
+          del_flag
       </trim>
-      values
+          values
       <foreach collection="list" item="item" separator=",">
-      <trim prefix="values (" suffix=")" suffixOverrides=",">
-        <if test="id != null">
-          #{id,jdbcType=BIGINT},
-        </if>
-        <if test="entId != null">
-          #{entId,jdbcType=BIGINT},
-        </if>
-        <if test="type != null">
-          #{type,jdbcType=INTEGER},
-        </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 prefix="(" suffix=")" suffixOverrides=",">
+          #{item.id,jdbcType=BIGINT},
+          #{item.entId,jdbcType=BIGINT},
+          #{item.type,jdbcType=INTEGER},
+          #{item.remark,jdbcType=VARCHAR},
+          #{item.status,jdbcType=INTEGER},
+          #{item.createBy,jdbcType=BIGINT},
+          #{item.createTime,jdbcType=TIMESTAMP},
+          #{item.updateBy,jdbcType=BIGINT},
+          #{item.updateTime,jdbcType=TIMESTAMP},
+          #{item.delFlag,jdbcType=INTEGER}
       </trim>
       </foreach>
     </insert>

+ 25 - 181
sckw-modules/sckw-system/src/main/resources/mapper/KwsEnterpriseDao.xml

@@ -47,6 +47,31 @@
     where id = #{id,jdbcType=BIGINT}
   </select>
 
+  <select id="findList" resultType="com.sckw.system.model.KwsEnterprise" parameterType="com.sckw.system.model.vo.req.EntFindPageReqVo">
+    select a.*
+      from kws_enterprise a
+    where a.del_flag = 0
+    <if test="firmName != null and firmName != ''">
+      and a.firm_name = #{firmName}
+    </if>
+    <if test="contacts != null and contacts != ''">
+      and a.contacts = #{contacts}
+    </if>
+    <if test="telephone != null and telephone != ''">
+      and a.telephone = #{telephone}
+    </if>
+    <if test="legalName != null and legalName != ''">
+      and a.legal_name = #{legalName}
+    </if>
+    <if test="legalTelephone != null and legalTelephone != ''">
+      and a.legal_telephone = #{legalName}
+    </if>
+    <if test="approval !=">
+      and a.approval = #{approval}
+    </if>
+    order by a.create_time
+  </select>
+
   <insert id="insert" parameterType="com.sckw.system.model.KwsEnterprise">
     insert into kws_enterprise
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -228,187 +253,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>
 
   <update id="update" parameterType="com.sckw.system.model.KwsEnterprise">
     update kws_enterprise

+ 1 - 1
sckw-modules/sckw-system/src/main/resources/mapper/KwsUserDao.xml

@@ -239,7 +239,7 @@
     ORDER BY su.create_time desc
   </select>
 
-  <select id="findList" resultType="java.util.Map" parameterType="java.util.Map" >
+  <select id="findList" resultType="com.sckw.system.model.KwsUser" parameterType="com.sckw.system.model.KwsUser" >
     select
       su.id, su.system_type systemType, su.account, su.password, su.name,
       su.telephone, su.photo, su.email, su.is_main isMain, su.remark, su.status