Commit 3f496ed197e8f1b251cac7f3fcc3d5cd67ec7ddd
1 parent
a7ffb0b99e
Exists in
master
内容管理
Showing 8 changed files with 314 additions and 37 deletions
- parent/base.common/src/main/java/com/lyms/base/common/dao/content/HospitalMessageVersionMapper.java
- parent/base.common/src/main/java/com/lyms/base/common/dao/content/HospitalMessageVersionMapper.xml
- parent/base.common/src/main/java/com/lyms/base/common/entity/content/HospitalMessageVersion.java
- parent/base.common/src/main/java/com/lyms/base/common/service/content/HospitalMessageVersionService.java
- parent/base.common/src/main/java/com/lyms/base/common/service/content/impl/HospitalMessageVersionServiceImpl.java
- parent/center.manager/src/main/java/com/lyms/cm/controller/content/HospitalMessageVersionController.java
- parent/center.manager/src/main/java/com/lyms/cm/controller/content/OrganizMessageController.java
- parent/mybatis-plus/src/test/java/com/baomidou/mybatisplus/test/generator/MysqlGenerator.java
parent/base.common/src/main/java/com/lyms/base/common/dao/content/HospitalMessageVersionMapper.java
View file @
3f496ed
| 1 | +package com.lyms.base.common.dao.content; | |
| 2 | + | |
| 3 | +import com.lyms.base.common.entity.content.HospitalMessageVersion; | |
| 4 | +import com.baomidou.mybatisplus.mapper.BaseMapper; | |
| 5 | +import org.springframework.stereotype.Repository; | |
| 6 | +import java.io.Serializable; | |
| 7 | +/** | |
| 8 | + * <p> | |
| 9 | + * Mapper接口 | |
| 10 | + * </p> | |
| 11 | + * | |
| 12 | + * @author yangfei | |
| 13 | + * @since 2017-05-31 | |
| 14 | + */ | |
| 15 | +@Repository | |
| 16 | +public interface HospitalMessageVersionMapper extends BaseMapper<HospitalMessageVersion> { | |
| 17 | + | |
| 18 | + public Integer deleteLogicById(Serializable id); | |
| 19 | + | |
| 20 | +} |
parent/base.common/src/main/java/com/lyms/base/common/dao/content/HospitalMessageVersionMapper.xml
View file @
3f496ed
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.lyms.base.common.dao.content.HospitalMessageVersionMapper"> | |
| 4 | + | |
| 5 | + <!-- 通用查询映射结果 --> | |
| 6 | + <resultMap id="BaseResultMap" type="com.lyms.base.common.entity.content.HospitalMessageVersion"> | |
| 7 | + <result column="ID" property="id" /> | |
| 8 | + <result column="TV_ID" property="tvId" /> | |
| 9 | + <result column="HOSPITAL" property="hospital" /> | |
| 10 | + <result column="CREATE_TIME" property="createTime" /> | |
| 11 | + <result column="CREATE_ID" property="createId" /> | |
| 12 | + <result column="CREATE_NAME" property="createName" /> | |
| 13 | + <result column="MODIFY_ID" property="modifyId" /> | |
| 14 | + <result column="MODIFY_NAME" property="modifyName" /> | |
| 15 | + <result column="MODIFY_TIME" property="modifyTime" /> | |
| 16 | + <result column="IFDEL" property="ifdel" /> | |
| 17 | + <result column="ENABLE" property="enable" /> | |
| 18 | + </resultMap> | |
| 19 | + | |
| 20 | + <!-- 通用查询结果列 --> | |
| 21 | + <sql id="Base_Column_List"> | |
| 22 | + ID AS id, TV_ID AS tvId, HOSPITAL AS hospital, CREATE_TIME AS createTime, CREATE_ID AS createId, CREATE_NAME AS createName, MODIFY_ID AS modifyId, MODIFY_NAME AS modifyName, MODIFY_TIME AS modifyTime, IFDEL AS ifdel, ENABLE AS enable | |
| 23 | + </sql> | |
| 24 | +</mapper> |
parent/base.common/src/main/java/com/lyms/base/common/entity/content/HospitalMessageVersion.java
View file @
3f496ed
| 1 | +package com.lyms.base.common.entity.content; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotations.TableField; | |
| 4 | +import com.baomidou.mybatisplus.annotations.TableName; | |
| 5 | + | |
| 6 | +import java.io.Serializable; | |
| 7 | +import java.util.Date; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * <p> | |
| 11 | + * | |
| 12 | + * </p> | |
| 13 | + * | |
| 14 | + * @author yangfei | |
| 15 | + * @since 2017-05-31 | |
| 16 | + */ | |
| 17 | +@TableName("HOSPITAL_MESSAGE_VERSION") | |
| 18 | +public class HospitalMessageVersion implements Serializable { | |
| 19 | + | |
| 20 | + private static final long serialVersionUID = 1L; | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * 主键 | |
| 24 | + */ | |
| 25 | + @TableField(value="ID") | |
| 26 | + private String id; | |
| 27 | + /** | |
| 28 | + * 消息模板版本id | |
| 29 | + */ | |
| 30 | + @TableField(value="TV_ID") | |
| 31 | + private String tvId; | |
| 32 | + /** | |
| 33 | + * 医院id | |
| 34 | + */ | |
| 35 | + @TableField(value="HOSPITAL") | |
| 36 | + private String hospital; | |
| 37 | + /** | |
| 38 | + * 创建时间 | |
| 39 | + */ | |
| 40 | + @TableField(value="CREATE_TIME") | |
| 41 | + private Date createTime; | |
| 42 | + /** | |
| 43 | + * 创建人ID | |
| 44 | + */ | |
| 45 | + @TableField(value="CREATE_ID") | |
| 46 | + private String createId; | |
| 47 | + /** | |
| 48 | + * 创建人名称 | |
| 49 | + */ | |
| 50 | + @TableField(value="CREATE_NAME") | |
| 51 | + private String createName; | |
| 52 | + /** | |
| 53 | + * 修改人ID | |
| 54 | + */ | |
| 55 | + @TableField(value="MODIFY_ID") | |
| 56 | + private String modifyId; | |
| 57 | + /** | |
| 58 | + * 修改人名称 | |
| 59 | + */ | |
| 60 | + @TableField(value="MODIFY_NAME") | |
| 61 | + private String modifyName; | |
| 62 | + /** | |
| 63 | + * 最后修改时间 | |
| 64 | + */ | |
| 65 | + @TableField(value="MODIFY_TIME") | |
| 66 | + private Date modifyTime; | |
| 67 | + /** | |
| 68 | + * 是否删除 | |
| 69 | + */ | |
| 70 | + @TableField(value="IFDEL") | |
| 71 | + private Integer ifdel; | |
| 72 | + /** | |
| 73 | + * 是否启用 | |
| 74 | + */ | |
| 75 | + @TableField(value="ENABLE") | |
| 76 | + private Integer enable; | |
| 77 | + | |
| 78 | + | |
| 79 | + public String getId() { | |
| 80 | + return id; | |
| 81 | + } | |
| 82 | + | |
| 83 | + public void setId(String id) { | |
| 84 | + this.id = id; | |
| 85 | + } | |
| 86 | + | |
| 87 | + public String getTvId() { | |
| 88 | + return tvId; | |
| 89 | + } | |
| 90 | + | |
| 91 | + public void setTvId(String tvId) { | |
| 92 | + this.tvId = tvId; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public String getHospital() { | |
| 96 | + return hospital; | |
| 97 | + } | |
| 98 | + | |
| 99 | + public void setHospital(String hospital) { | |
| 100 | + this.hospital = hospital; | |
| 101 | + } | |
| 102 | + | |
| 103 | + public Date getCreateTime() { | |
| 104 | + return createTime; | |
| 105 | + } | |
| 106 | + | |
| 107 | + public void setCreateTime(Date createTime) { | |
| 108 | + this.createTime = createTime; | |
| 109 | + } | |
| 110 | + | |
| 111 | + public String getCreateId() { | |
| 112 | + return createId; | |
| 113 | + } | |
| 114 | + | |
| 115 | + public void setCreateId(String createId) { | |
| 116 | + this.createId = createId; | |
| 117 | + } | |
| 118 | + | |
| 119 | + public String getCreateName() { | |
| 120 | + return createName; | |
| 121 | + } | |
| 122 | + | |
| 123 | + public void setCreateName(String createName) { | |
| 124 | + this.createName = createName; | |
| 125 | + } | |
| 126 | + | |
| 127 | + public String getModifyId() { | |
| 128 | + return modifyId; | |
| 129 | + } | |
| 130 | + | |
| 131 | + public void setModifyId(String modifyId) { | |
| 132 | + this.modifyId = modifyId; | |
| 133 | + } | |
| 134 | + | |
| 135 | + public String getModifyName() { | |
| 136 | + return modifyName; | |
| 137 | + } | |
| 138 | + | |
| 139 | + public void setModifyName(String modifyName) { | |
| 140 | + this.modifyName = modifyName; | |
| 141 | + } | |
| 142 | + | |
| 143 | + public Date getModifyTime() { | |
| 144 | + return modifyTime; | |
| 145 | + } | |
| 146 | + | |
| 147 | + public void setModifyTime(Date modifyTime) { | |
| 148 | + this.modifyTime = modifyTime; | |
| 149 | + } | |
| 150 | + | |
| 151 | + public Integer getIfdel() { | |
| 152 | + return ifdel; | |
| 153 | + } | |
| 154 | + | |
| 155 | + public void setIfdel(Integer ifdel) { | |
| 156 | + this.ifdel = ifdel; | |
| 157 | + } | |
| 158 | + | |
| 159 | + public Integer getEnable() { | |
| 160 | + return enable; | |
| 161 | + } | |
| 162 | + | |
| 163 | + public void setEnable(Integer enable) { | |
| 164 | + this.enable = enable; | |
| 165 | + } | |
| 166 | + | |
| 167 | +} |
parent/base.common/src/main/java/com/lyms/base/common/service/content/HospitalMessageVersionService.java
View file @
3f496ed
| 1 | +package com.lyms.base.common.service.content; | |
| 2 | + | |
| 3 | +import com.lyms.base.common.entity.content.HospitalMessageVersion; | |
| 4 | +import com.lyms.web.service.BaseService; | |
| 5 | +import java.io.Serializable; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * <p> | |
| 9 | + * 服务类 | |
| 10 | + * </p> | |
| 11 | + * | |
| 12 | + * @author yangfei | |
| 13 | + * @since 2017-05-31 | |
| 14 | + */ | |
| 15 | +public interface HospitalMessageVersionService extends BaseService<HospitalMessageVersion> { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * <li>@Description:逻辑删除,ifDel = 1 为删除,否则为没有删除 | |
| 19 | + * <li>@param id 删除主键id | |
| 20 | + * <li>@return 大于0修改成功,否则为失败 | |
| 21 | + */ | |
| 22 | + public Integer deleteLogicById(Serializable id); | |
| 23 | + | |
| 24 | +} |
parent/base.common/src/main/java/com/lyms/base/common/service/content/impl/HospitalMessageVersionServiceImpl.java
View file @
3f496ed
| 1 | +package com.lyms.base.common.service.content.impl; | |
| 2 | + | |
| 3 | +import com.lyms.base.common.entity.content.HospitalMessageVersion; | |
| 4 | +import com.lyms.base.common.dao.content.HospitalMessageVersionMapper; | |
| 5 | +import com.lyms.base.common.service.content.HospitalMessageVersionService; | |
| 6 | +import com.baomidou.mybatisplus.service.impl.ServiceImpl; | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | +import java.io.Serializable; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * 服务实现类 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author yangfei | |
| 16 | + * @since 2017-05-31 | |
| 17 | + */ | |
| 18 | +@Service | |
| 19 | +public class HospitalMessageVersionServiceImpl extends ServiceImpl<HospitalMessageVersionMapper, HospitalMessageVersion> implements HospitalMessageVersionService { | |
| 20 | + | |
| 21 | + public Integer deleteLogicById(Serializable id){ | |
| 22 | + return baseMapper.deleteLogicById(id); | |
| 23 | + } | |
| 24 | +} |
parent/center.manager/src/main/java/com/lyms/cm/controller/content/HospitalMessageVersionController.java
View file @
3f496ed
| 1 | +package com.lyms.cm.controller.content; | |
| 2 | + | |
| 3 | +import org.springframework.stereotype.Controller; | |
| 4 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 5 | +import com.lyms.web.controller.BaseController; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * <p> | |
| 9 | + * 前端控制器 | |
| 10 | + * </p> | |
| 11 | + * | |
| 12 | + * @author yangfei | |
| 13 | + * @since 2017-05-31 | |
| 14 | + */ | |
| 15 | +@Controller | |
| 16 | +@RequestMapping("/hospitalMessageVersion") | |
| 17 | +public class HospitalMessageVersionController extends BaseController { | |
| 18 | + | |
| 19 | +} |
parent/center.manager/src/main/java/com/lyms/cm/controller/content/OrganizMessageController.java
View file @
3f496ed
parent/mybatis-plus/src/test/java/com/baomidou/mybatisplus/test/generator/MysqlGenerator.java
View file @
3f496ed
| ... | ... | @@ -15,11 +15,6 @@ |
| 15 | 15 | */ |
| 16 | 16 | package com.baomidou.mybatisplus.test.generator; |
| 17 | 17 | |
| 18 | -import java.util.HashMap; | |
| 19 | -import java.util.Map; | |
| 20 | - | |
| 21 | -import org.junit.Test; | |
| 22 | - | |
| 23 | 18 | import com.baomidou.mybatisplus.generator.AutoGenerator; |
| 24 | 19 | import com.baomidou.mybatisplus.generator.InjectionConfig; |
| 25 | 20 | import com.baomidou.mybatisplus.generator.config.DataSourceConfig; |
| 26 | 21 | |
| ... | ... | @@ -29,7 +24,11 @@ |
| 29 | 24 | import com.baomidou.mybatisplus.generator.config.rules.DbType; |
| 30 | 25 | import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; |
| 31 | 26 | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| 27 | +import org.junit.Test; | |
| 32 | 28 | |
| 29 | +import java.util.HashMap; | |
| 30 | +import java.util.Map; | |
| 31 | + | |
| 33 | 32 | /** |
| 34 | 33 | * <p> |
| 35 | 34 | * 代码生成器演示 |
| 36 | 35 | |
| 37 | 36 | |
| ... | ... | @@ -44,16 +43,16 @@ |
| 44 | 43 | |
| 45 | 44 | private static void customSet(GlobalConfig gc, StrategyConfig strategy, PackageConfig pc) { |
| 46 | 45 | gc.setOutputDir("D://mybatis-plus-generate"); |
| 47 | - gc.setAuthor("fangcheng"); | |
| 46 | + gc.setAuthor("yangfei"); | |
| 48 | 47 | |
| 49 | 48 | // strategy.setInclude(new String[] { |
| 50 | 49 | // "SYS_USERS","SYS_USER_ROLE_MAPS","SYS_ROLES" }); // 需要生成的表 |
| 51 | - strategy.setInclude(new String[] { "ASSAY_SOURCE","ASSAY_SOURCE_CONF","ASSAY_CUSTOMER_CONF"}); // 需要生成的表 | |
| 50 | + strategy.setInclude(new String[] { "HOSPITAL_MESSAGE_VERSION"}); // 需要生成的表 | |
| 52 | 51 | pc.setParent("com.lyms.base.common"); |
| 53 | 52 | // pc.setParent("com.lyms.base.common"); |
| 54 | 53 | |
| 55 | 54 | // 加在controller后面 |
| 56 | - pc.setFunctionName("conf"); // com.lyms.hospital.web.controller.sys | |
| 55 | + pc.setFunctionName("content"); // com.lyms.hospital.web.controller.sys | |
| 57 | 56 | // pc.setModuleName("sys"); //com.lyms.hospital.sys.controller |
| 58 | 57 | // 加在controller前面 |
| 59 | 58 |