Переглянути джерело

增加部门名称和附近名称字段

huey 1 рік тому
батько
коміт
98dcb28f72
19 змінених файлів з 229 додано та 33 видалено
  1. 3 1
      src/main/java/com/dragon/tj/portal/auth/controller/SsoController.java
  2. 5 0
      src/main/java/com/dragon/tj/portal/common/constants/BusinessConstants.java
  3. 7 1
      src/main/java/com/dragon/tj/portal/common/dto/message/MessageInfoReq.java
  4. 6 2
      src/main/java/com/dragon/tj/portal/common/dto/notice/NoticeInfoReq.java
  5. 1 1
      src/main/java/com/dragon/tj/portal/component/exception/base/GlobalExceptionHandler.java
  6. 1 1
      src/main/java/com/dragon/tj/portal/component/message/MessageConsumer.java
  7. 21 0
      src/main/java/com/dragon/tj/portal/controller/SysUserMenuController.java
  8. 17 6
      src/main/java/com/dragon/tj/portal/entity/MessageInfo.java
  9. 2 0
      src/main/java/com/dragon/tj/portal/entity/NoticeInfo.java
  10. 35 0
      src/main/java/com/dragon/tj/portal/entity/SysUserMenu.java
  11. 18 0
      src/main/java/com/dragon/tj/portal/mapper/SysUserMenuMapper.java
  12. 19 0
      src/main/java/com/dragon/tj/portal/service/SysUserMenuService.java
  13. 13 6
      src/main/java/com/dragon/tj/portal/service/impl/MessageInfoServiceImpl.java
  14. 15 12
      src/main/java/com/dragon/tj/portal/service/impl/NoticeInfoServiceImpl.java
  15. 44 0
      src/main/java/com/dragon/tj/portal/service/impl/SysUserMenuServiceImpl.java
  16. 2 1
      src/main/resources/mapper/MessageInfoMapper.xml
  17. 2 1
      src/main/resources/mapper/NoticeInfoMapper.xml
  18. 17 0
      src/main/resources/mapper/SysUserMenuMapper.xml
  19. 1 1
      src/test/java/com/dragon/tj/portal/generate/CodeGeneration.java

+ 3 - 1
src/main/java/com/dragon/tj/portal/auth/controller/SsoController.java

@@ -4,6 +4,8 @@ import com.dragon.tj.portal.auth.model.LoginUser;
 import com.dragon.tj.portal.auth.service.TokenService;
 import com.dragon.tj.portal.auth.web.entity.SysUser;
 import com.dragon.tj.portal.common.base.R;
+import com.dragon.tj.portal.common.enums.message.MessageInfoErrorEnums;
+import com.dragon.tj.portal.component.exception.message.MessageInfoException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -48,7 +50,7 @@ public class SsoController {
 
     @GetMapping("/hello")
     public R<String> test() {
-        return R.ok("Hello World!");
+        throw new MessageInfoException(MessageInfoErrorEnums.Code.MESSAGE_READ_ALREADY);
     }
 }
 

+ 5 - 0
src/main/java/com/dragon/tj/portal/common/constants/BusinessConstants.java

@@ -34,4 +34,9 @@ public interface BusinessConstants {
      * 6 超期提醒类
      */
     public static final Integer DICT_ITEM_ID_6 = 6;
+
+    public static final String MENU_APP_PRE = "APP-";
+    public static final String TOPIC_PRE = "sseTopic-";
+    public static final String DEFAULT_ADMIN = "admin";
+
 }

+ 7 - 1
src/main/java/com/dragon/tj/portal/common/dto/message/MessageInfoReq.java

@@ -46,6 +46,12 @@ public class MessageInfoReq {
      */
     private String attachmentPath;
 
+    /**
+    *
+    *附近名称
+    */
+    private String attachmentName;
+
 
     /**
      * 版本号
@@ -74,6 +80,6 @@ public class MessageInfoReq {
     /**
      *消息级别
      */
-    private Integer messageLevel;
+    private Integer messageLevel = 0;
 
 }

+ 6 - 2
src/main/java/com/dragon/tj/portal/common/dto/notice/NoticeInfoReq.java

@@ -30,7 +30,7 @@ public class NoticeInfoReq {
     /**
      *消息级别
      */
-    private Integer messageLevel;
+    private Integer messageLevel = 0;
 
     /**
      * 信息标题
@@ -50,7 +50,11 @@ public class NoticeInfoReq {
     @NotNull(message = "毫秒时间戳 不能为空")
     private Long t;
 
-    private String id;
+    private String clientId;
+
+    private String clientOrgCode;
+
+    private String clientOrgName;
 
     /**
      * md5 (登录人标识+t)

+ 1 - 1
src/main/java/com/dragon/tj/portal/component/exception/base/GlobalExceptionHandler.java

@@ -34,7 +34,7 @@ public class GlobalExceptionHandler {
     @ExceptionHandler(Exception.class)
     public R handleException(Exception e) throws Exception {
         logger.error(e.getMessage(), e);
-        return R.failed("服务器错误,请联系管理员");
+        return R.failed(e.getMessage());
     }
 
     @ExceptionHandler(MethodArgumentNotValidException.class)

+ 1 - 1
src/main/java/com/dragon/tj/portal/component/message/MessageConsumer.java

@@ -83,7 +83,7 @@ public class MessageConsumer {
         ack.acknowledge();
     }
 
-    @KafkaListener(topics = "#{'${kafka.topics}'.split(',')}")
+    @KafkaListener(topicPattern = "sseTopic.*")
     public void sseConnectionProcess2(String msg, Acknowledgment ack) {
         log.info("get kafka2 msg from topic:{}, msg:{}", KafkaInitialConfiguration.sseTopic, msg);
         if (StrUtil.isEmpty(msg)) {

+ 21 - 0
src/main/java/com/dragon/tj/portal/controller/SysUserMenuController.java

@@ -0,0 +1,21 @@
+package com.dragon.tj.portal.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 用户信息表 前端控制器
+ * </p>
+ *
+ * @author huey
+ * @since 2023-07-30
+ */
+@RestController
+@RequestMapping("/sysUserMenu")
+public class SysUserMenuController {
+
+}
+

+ 17 - 6
src/main/java/com/dragon/tj/portal/entity/MessageInfo.java

@@ -4,14 +4,14 @@ import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.experimental.Accessors;
 
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
 /**
  * <p>
  * 信息表
@@ -35,13 +35,13 @@ public class MessageInfo implements Serializable {
     private Long id;
 
     /**
-     * 信息类型 1 通知公告 2信息交流 3 标准规范 
+     * 信息类型 1 通知公告 2信息交流 3 标准规范
      */
     private Integer messageType;
 
     /**
-    *消息级别
-    */
+     * 消息级别
+     */
     private Integer messageLevel;
 
 
@@ -60,12 +60,23 @@ public class MessageInfo implements Serializable {
      */
     private String attachmentPath;
 
+    /**
+     * 附近名称
+     */
+    private String attachmentName;
+
     /**
      * 创建人
      */
     private String createBy;
     private String createUser;
 
+    /**
+     * 创建人部门名称和code
+     */
+    private String createOrgName;
+    private String createOrgCode;
+
     /**
      * 修改人
      */

+ 2 - 0
src/main/java/com/dragon/tj/portal/entity/NoticeInfo.java

@@ -70,6 +70,8 @@ public class NoticeInfo implements Serializable {
      * 创建人姓名
      */
     private String createUser;
+    private String createOrgName;
+    private String createOrgCode;
 
     /**
      * 修改人

+ 35 - 0
src/main/java/com/dragon/tj/portal/entity/SysUserMenu.java

@@ -0,0 +1,35 @@
+package com.dragon.tj.portal.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 用户信息表
+ * </p>
+ *
+ * @author huey
+ * @since 2023-07-30
+ */
+@Getter
+@Setter
+@Accessors(chain = true)
+@TableName("sys_user_menu")
+public class SysUserMenu implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    private String menuCode;
+
+    private String idcard;
+
+
+}

+ 18 - 0
src/main/java/com/dragon/tj/portal/mapper/SysUserMenuMapper.java

@@ -0,0 +1,18 @@
+package com.dragon.tj.portal.mapper;
+
+import com.dragon.tj.portal.entity.SysUserMenu;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * 用户信息表 Mapper 接口
+ * </p>
+ *
+ * @author huey
+ * @since 2023-07-30
+ */
+@Mapper
+public interface SysUserMenuMapper extends BaseMapper<SysUserMenu> {
+
+}

+ 19 - 0
src/main/java/com/dragon/tj/portal/service/SysUserMenuService.java

@@ -0,0 +1,19 @@
+package com.dragon.tj.portal.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.dragon.tj.portal.entity.SysUserMenu;
+
+import java.util.Set;
+
+/**
+ * <p>
+ * 用户信息表 服务类
+ * </p>
+ *
+ * @author huey
+ * @since 2023-07-30
+ */
+public interface SysUserMenuService extends IService<SysUserMenu> {
+
+    public Set<String> findUsersByAppId(String sysCode);
+}

+ 13 - 6
src/main/java/com/dragon/tj/portal/service/impl/MessageInfoServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.dragon.tj.portal.auth.model.LoginUser;
 import com.dragon.tj.portal.auth.util.SecurityUtils;
+import com.dragon.tj.portal.auth.web.entity.SysUser;
 import com.dragon.tj.portal.auth.web.service.SysDeptService;
 import com.dragon.tj.portal.common.base.R;
 import com.dragon.tj.portal.common.constants.BusinessConstants;
@@ -44,7 +45,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.time.LocalDateTime;
 import java.util.List;
-import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 
 /**
@@ -135,12 +136,12 @@ public class MessageInfoServiceImpl extends ServiceImpl<MessageInfoMapper, Messa
         String idCard = loginUser.getIdCard();
         MsgCountVO msgCountVO = new MsgCountVO();
         Integer noticeY = noticeInfoMapper.getCount(idCard, ReadStatusEnum.YES.value());
-        Integer noticeN = noticeInfoMapper.getCount(idCard,ReadStatusEnum.NO.value());
+        Integer noticeN = noticeInfoMapper.getCount(idCard, ReadStatusEnum.NO.value());
 
-        Integer msgY = this.baseMapper.getCount(idCard,ReadStatusEnum.YES.value());
-        Integer msgN = this.baseMapper.getCount(idCard,ReadStatusEnum.NO.value());
+        Integer msgY = this.baseMapper.getCount(idCard, ReadStatusEnum.YES.value());
+        Integer msgN = this.baseMapper.getCount(idCard, ReadStatusEnum.NO.value());
 
-        log.info("getCount-{}-{}-{}-{}-{}",idCard,noticeN,noticeY,msgN,msgY);
+        log.info("getCount-{}-{}-{}-{}-{}", idCard, noticeN, noticeY, msgN, msgY);
         msgCountVO.setNoticeNCount(noticeN);
         msgCountVO.setNoticeYCount(noticeY);
         msgCountVO.setMessageYCount(msgY);
@@ -190,6 +191,12 @@ public class MessageInfoServiceImpl extends ServiceImpl<MessageInfoMapper, Messa
         MessageInfo messageInfo = messageReqConvert.reqToInfo(messageInfoReq);
         messageInfo.setCreateBy(loginUser.getIdCard());
         messageInfo.setCreateUser(loginUser.getUsername());
+        SysUser user = loginUser.getUser();
+        if (Objects.nonNull(user)) {
+            messageInfo.setCreateOrgCode(loginUser.getUser().getOrgCode());
+            messageInfo.setCreateOrgName(loginUser.getUser().getOrgName());
+        }
+
         // 存储
         boolean isSaveBatchSuccess = false;
         try {
@@ -205,7 +212,7 @@ public class MessageInfoServiceImpl extends ServiceImpl<MessageInfoMapper, Messa
             });
             isSaveBatchSuccess = messageInfoScopeService.saveBatch(insertList);
         } catch (Exception e) {
-            log.warn("消息中心 saveBatch 存储失败 {}");
+            log.warn("消息中心 saveBatch 存储失败 {}",e);
         }
 
         // 批量存储失败,则逐个存储

+ 15 - 12
src/main/java/com/dragon/tj/portal/service/impl/NoticeInfoServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.dragon.tj.portal.common.base.R;
+import com.dragon.tj.portal.common.constants.BusinessConstants;
 import com.dragon.tj.portal.common.convert.notice.NoticeInfoVOConvert;
 import com.dragon.tj.portal.common.convert.notice.NoticeReqConvert;
 import com.dragon.tj.portal.common.dto.notice.NoticeInfoReq;
@@ -24,10 +25,10 @@ import com.dragon.tj.portal.entity.MsgRecord;
 import com.dragon.tj.portal.entity.NoticeInfo;
 import com.dragon.tj.portal.entity.NoticeInfoScope;
 import com.dragon.tj.portal.mapper.NoticeInfoMapper;
-import com.dragon.tj.portal.service.InstallInfoService;
 import com.dragon.tj.portal.service.MsgRecordService;
 import com.dragon.tj.portal.service.NoticeInfoScopeService;
 import com.dragon.tj.portal.service.NoticeInfoService;
+import com.dragon.tj.portal.service.SysUserMenuService;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import lombok.extern.slf4j.Slf4j;
@@ -61,7 +62,7 @@ public class NoticeInfoServiceImpl extends ServiceImpl<NoticeInfoMapper, NoticeI
     private MsgRecordService msgRecordService;
 
     @Autowired
-    private InstallInfoService installInfoService;
+    private SysUserMenuService sysUserMenuService;
 
     @Autowired
     private NoticeInfoScopeService noticeInfoScopeService;
@@ -83,7 +84,7 @@ public class NoticeInfoServiceImpl extends ServiceImpl<NoticeInfoMapper, NoticeI
         }
         //封装消息
         //保存及推送mq
-        return R.failed(false);
+        return R.failed("发送消息验证失败");
     }
 
     @Override
@@ -137,10 +138,10 @@ public class NoticeInfoServiceImpl extends ServiceImpl<NoticeInfoMapper, NoticeI
         log.info("transferIds-scopeId-{}-{}", scopeId, messageClientIds);
         if (CollUtil.isNotEmpty(messageClientIds)) {
             NoticeInfoSend noticeInfoSend = this.doSaveNoticeInfo(noticeInfoReq, messageClientIds);
-            isSend = producer.send("sseTopic-a1", JSON.toJSONString(noticeInfoSend));
+            isSend = producer.send(BusinessConstants.TOPIC_PRE + noticeInfoReq.getScopeId(), JSON.toJSONString(noticeInfoSend));
             if (isSend) {
                 MsgRecord msgRecord = new MsgRecord();
-                msgRecord.setCreateBy("admin");
+                msgRecord.setCreateBy(BusinessConstants.DEFAULT_ADMIN);
                 msgRecord.setCreateTime(LocalDateTime.now());
                 msgRecord.setReqContent(JSON.toJSONString(noticeInfoSend));
                 msgRecord.setType(MsgRecordTypeEnum.MESSAGE.value());
@@ -163,7 +164,7 @@ public class NoticeInfoServiceImpl extends ServiceImpl<NoticeInfoMapper, NoticeI
             throw new MessageInfoException(MessageInfoErrorEnums.Code.NOTICE_LIMIT_EMPTY);
         }
         //查询有当前应用的人
-        Set<String> allUserIds = installInfoService.findUsersByAppId(scopeId);
+        Set<String> allUserIds = sysUserMenuService.findUsersByAppId(scopeId);
         if (CollUtil.isNotEmpty(allUserIds)) {
             messageClientIds.addAll(allUserIds);
         }
@@ -173,10 +174,10 @@ public class NoticeInfoServiceImpl extends ServiceImpl<NoticeInfoMapper, NoticeI
 
     private boolean validate(NoticeInfoReq noticeInfoReq) {
 
-        String id = noticeInfoReq.getId();
+        String id = noticeInfoReq.getClientId();
         Long t = noticeInfoReq.getT();
         String scopeId = noticeInfoReq.getScopeId();
-        log.info("noticeInfoReq-validate-start-{}", noticeInfoReq.getId());
+        log.info("noticeInfoReq-validate-start-{}", noticeInfoReq.getClientId());
         if (noticeSecret) {
             String correctHash = DigestUtils.md5Hex(id + t);
             if (!correctHash.equalsIgnoreCase(noticeInfoReq.getK())) {
@@ -190,7 +191,7 @@ public class NoticeInfoServiceImpl extends ServiceImpl<NoticeInfoMapper, NoticeI
 
     @Transactional(rollbackFor = Exception.class)
     public NoticeInfoSend doSaveNoticeInfo(NoticeInfoReq noticeInfoReq, Set<String> messageClientIds) {
-        log.info("doSaveNoticeInfo-start-{}-{}", noticeInfoReq.getId(), messageClientIds);
+        log.info("doSaveNoticeInfo-start-{}-{}", noticeInfoReq.getClientId(), messageClientIds);
         Integer messageType = noticeInfoReq.getMessageType();
         ScopeEnums scopeEnums = ScopeEnums.ofMessageType(messageType);
         List<NoticeInfoScope> insertList = Lists.newArrayList();
@@ -199,7 +200,9 @@ public class NoticeInfoServiceImpl extends ServiceImpl<NoticeInfoMapper, NoticeI
         noticeInfoSend.setClientIds(messageClientIds);
 
         NoticeInfo noticeInfo = noticeReqConvert.reqToInfo(noticeInfoReq);
-        noticeInfo.setCreateBy(noticeInfoReq.getId());
+        noticeInfo.setCreateBy(noticeInfoReq.getClientId());
+        noticeInfo.setCreateOrgCode(noticeInfoReq.getClientOrgCode());
+        noticeInfo.setCreateOrgName(noticeInfoReq.getClientOrgName());
         // 存储
         boolean isSaveBatchSuccess = false;
         try {
@@ -226,10 +229,10 @@ public class NoticeInfoServiceImpl extends ServiceImpl<NoticeInfoMapper, NoticeI
                     noticeInfoScopeService.save(e);
                 });
             } catch (Exception e) {
-                log.warn("消息中心 存储失败 {}");
+                log.warn("消息中心 存储失败 {}",e);
             }
         }
-        log.info("doSaveNoticeInfo-end-{}-{}", noticeInfoReq.getId(), messageClientIds);
+        log.info("doSaveNoticeInfo-end-{}-{}", noticeInfoReq.getClientId(), messageClientIds);
         return noticeInfoSend;
     }
 

+ 44 - 0
src/main/java/com/dragon/tj/portal/service/impl/SysUserMenuServiceImpl.java

@@ -0,0 +1,44 @@
+package com.dragon.tj.portal.service.impl;
+
+import cn.hutool.core.collection.CollUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dragon.tj.portal.common.constants.BusinessConstants;
+import com.dragon.tj.portal.entity.SysUserMenu;
+import com.dragon.tj.portal.mapper.SysUserMenuMapper;
+import com.dragon.tj.portal.service.SysUserMenuService;
+import com.google.common.collect.Sets;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * 用户信息表 服务实现类
+ * </p>
+ *
+ * @author huey
+ * @since 2023-07-30
+ */
+@Service
+public class SysUserMenuServiceImpl extends ServiceImpl<SysUserMenuMapper, SysUserMenu> implements SysUserMenuService {
+
+
+    @Override
+    public Set<String> findUsersByAppId(String sysCode) {
+        LambdaQueryWrapper<SysUserMenu> wrapper = Wrappers.lambdaQuery();
+        wrapper.eq(SysUserMenu::getMenuCode, BusinessConstants.MENU_APP_PRE + sysCode);
+        List<SysUserMenu> list = this.list(wrapper);
+        if (CollUtil.isNotEmpty(list)) {
+            Set<String> idCardSet = list.stream().filter(e -> StringUtils.isNotEmpty(e.getIdcard())).map(SysUserMenu::getIdcard).collect(Collectors.toSet());
+            if (CollUtil.isNotEmpty(idCardSet)) {
+                return idCardSet;
+            }
+        }
+        return Sets.newHashSet();
+    }
+}

+ 2 - 1
src/main/resources/mapper/MessageInfoMapper.xml

@@ -3,7 +3,8 @@
 <mapper namespace="com.dragon.tj.portal.mapper.MessageInfoMapper">
 
     <select id="queryPage" resultType="com.dragon.tj.portal.entity.MessageInfo">
-        SELECT b.id,member_id,scope_type,scope_id,message_type,read_status,title,content,attachment_path,a.id as target_id from message_info_scope a
+        SELECT b.id,member_id,scope_type,scope_id,message_type,read_status,title,content,attachment_path,a.id as target_id,
+        b.create_org_name,b.attachment_name from message_info_scope a
         LEFT JOIN message_info b on a.message_info_id = b.id
         where b.del_flag = 0
         <if test="req.messageType != null">

+ 2 - 1
src/main/resources/mapper/NoticeInfoMapper.xml

@@ -4,7 +4,8 @@
 
 
     <select id="queryPage" resultType="com.dragon.tj.portal.entity.NoticeInfo">
-        SELECT b.id,member_id,scope_type,scope_id,message_type,read_status,title,content,attachment_path,a.id as target_id,b.message_level, b.create_user, b.create_time,a.read_status
+        SELECT b.id,member_id,scope_type,scope_id,message_type,read_status,title,content,attachment_path,a.id as target_id,b.message_level, b.create_user, b.create_time,a.read_status,
+               b.create_org_name
         from notice_info_scope a
         LEFT JOIN notice_info b on a.notice_info_id = b.id
         where b.del_flag = 0

+ 17 - 0
src/main/resources/mapper/SysUserMenuMapper.xml

@@ -0,0 +1,17 @@
+<?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.dragon.tj.portal.mapper.SysUserMenuMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.dragon.tj.portal.entity.SysUserMenu">
+        <id column="id" property="id" />
+        <result column="idcard" property="idcard" />
+        <result column="org_code" property="orgCode" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, idcard, org_code
+    </sql>
+
+</mapper>

+ 1 - 1
src/test/java/com/dragon/tj/portal/generate/CodeGeneration.java

@@ -84,7 +84,7 @@ public class CodeGeneration {
     }
 
     public static void main(String[] args) {
-//        Generation("52.76.81.218:3306","portal","portal01!","portal","sys_log","sys_dict_item","sys_dict");
+        Generation("18.143.223.211:3306","portal","portal01!","portal","sys_user_menu");
 //        Generation(null,null,null,"portal","msg_record","notice_info","notice_info_scope");
     }
 }