diff --git a/parent/base.common/src/main/java/com/lyms/base/common/dao/content/ContentDoctorMessageMapper.java b/parent/base.common/src/main/java/com/lyms/base/common/dao/content/ContentDoctorMessageMapper.java index 4d2be4d..c3eb8fa 100644 --- a/parent/base.common/src/main/java/com/lyms/base/common/dao/content/ContentDoctorMessageMapper.java +++ b/parent/base.common/src/main/java/com/lyms/base/common/dao/content/ContentDoctorMessageMapper.java @@ -1,21 +1,26 @@ package com.lyms.base.common.dao.content; import com.baomidou.mybatisplus.mapper.BaseMapper; +import com.baomidou.mybatisplus.plugins.Page; import com.lyms.base.common.entity.content.ContentDoctorMessage; import org.springframework.stereotype.Repository; import java.io.Serializable; +import java.util.List; + /** *
* Mapper接口 *
* * @author yangfei - * @since 2017-04-14 + * @since 2017-05-31 */ @Repository public interface ContentDoctorMessageMapper extends BaseMapper+ * Mapper接口 + *
+ * + * @author yangfei + * @since 2017-05-31 + */ +@Repository +public interface ContentHospitalMessageTagsMapper extends BaseMapper+ * Mapper接口 + *
+ * + * @author yangfei + * @since 2017-05-31 + */ +@Repository +public interface ContentHospitalMessageVersionMapper extends BaseMapper- * Mapper接口 - *
- * - * @author yangfei - * @since 2017-05-31 - */ -@Repository -public interface HospitalMessageTagsMapper extends BaseMapper- * Mapper接口 - *
- * - * @author yangfei - * @since 2017-05-31 - */ -@Repository -public interface HospitalMessageVersionMapper extends BaseMapper+ * 医院消息标签 + *
+ * + * @author yangfei + * @since 2017-05-31 + */ +@TableName("CONTENT_HOSPITAL_MESSAGE_TAGS") +public class ContentHospitalMessageTags implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableField(value="ID") + private String id; + /** + * 医院消息ID + */ + @TableField(value="HOSPITAL_MESSAGE_ID") + private String hospitalMessageId; + /** + * 标签IDS + */ + @TableField(value="TAGS_IDS") + private String tagsIds; + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getHospitalMessageId() { + return hospitalMessageId; + } + + public void setHospitalMessageId(String hospitalMessageId) { + this.hospitalMessageId = hospitalMessageId; + } + + public String getTagsIds() { + return tagsIds; + } + + public void setTagsIds(String tagsIds) { + this.tagsIds = tagsIds; + } + +} diff --git a/parent/base.common/src/main/java/com/lyms/base/common/entity/content/ContentHospitalMessageVersion.java b/parent/base.common/src/main/java/com/lyms/base/common/entity/content/ContentHospitalMessageVersion.java new file mode 100644 index 0000000..2fbbdfe --- /dev/null +++ b/parent/base.common/src/main/java/com/lyms/base/common/entity/content/ContentHospitalMessageVersion.java @@ -0,0 +1,167 @@ +package com.lyms.base.common.entity.content; + +import com.baomidou.mybatisplus.annotations.TableId; +import com.baomidou.mybatisplus.annotations.TableField; +import com.baomidou.mybatisplus.annotations.TableName; +import java.io.Serializable; +import java.util.Date; + +/** + *+ * 医院消息模板关系 + *
+ * + * @author yangfei + * @since 2017-05-31 + */ +@TableName("CONTENT_HOSPITAL_MESSAGE_VERSION") +public class ContentHospitalMessageVersion implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableField(value="ID") + private String id; + /** + * 消息模板版本id + */ + @TableField(value="TV_ID") + private String tvId; + /** + * 医院id + */ + @TableField(value="HOSPITAL") + private String hospital; + /** + * 创建时间 + */ + @TableField(value="CREATE_TIME") + private Date createTime; + /** + * 创建人ID + */ + @TableField(value="CREATE_ID") + private String createId; + /** + * 创建人名称 + */ + @TableField(value="CREATE_NAME") + private String createName; + /** + * 修改人ID + */ + @TableField(value="MODIFY_ID") + private String modifyId; + /** + * 修改人名称 + */ + @TableField(value="MODIFY_NAME") + private String modifyName; + /** + * 最后修改时间 + */ + @TableField(value="MODIFY_TIME") + private Date modifyTime; + /** + * 是否删除 + */ + @TableField(value="IFDEL") + private Integer ifdel; + /** + * 是否启用 + */ + @TableField(value="ENABLE") + private Integer enable; + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getTvId() { + return tvId; + } + + public void setTvId(String tvId) { + this.tvId = tvId; + } + + public String getHospital() { + return hospital; + } + + public void setHospital(String hospital) { + this.hospital = hospital; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getCreateId() { + return createId; + } + + public void setCreateId(String createId) { + this.createId = createId; + } + + public String getCreateName() { + return createName; + } + + public void setCreateName(String createName) { + this.createName = createName; + } + + public String getModifyId() { + return modifyId; + } + + public void setModifyId(String modifyId) { + this.modifyId = modifyId; + } + + public String getModifyName() { + return modifyName; + } + + public void setModifyName(String modifyName) { + this.modifyName = modifyName; + } + + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + + public Integer getIfdel() { + return ifdel; + } + + public void setIfdel(Integer ifdel) { + this.ifdel = ifdel; + } + + public Integer getEnable() { + return enable; + } + + public void setEnable(Integer enable) { + this.enable = enable; + } + +} diff --git a/parent/base.common/src/main/java/com/lyms/base/common/entity/content/HospitalMessageTags.java b/parent/base.common/src/main/java/com/lyms/base/common/entity/content/HospitalMessageTags.java deleted file mode 100644 index a6efe11..0000000 --- a/parent/base.common/src/main/java/com/lyms/base/common/entity/content/HospitalMessageTags.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.lyms.base.common.entity.content; - -import com.baomidou.mybatisplus.annotations.TableField; -import com.baomidou.mybatisplus.annotations.TableName; - -import java.io.Serializable; - -/** - *- * - *
- * - * @author yangfei - * @since 2017-05-31 - */ -@TableName("HOSPITAL_MESSAGE_TAGS") -public class HospitalMessageTags implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 主键 - */ - @TableField(value="ID") - private String id; - /** - * 医院消息ID - */ - @TableField(value="HOSPITAL_MESSAGE_ID") - private String hospitalMessageId; - /** - * 标签IDS - */ - @TableField(value="TAGS_IDS") - private String tagsIds; - - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getHospitalMessageId() { - return hospitalMessageId; - } - - public void setHospitalMessageId(String hospitalMessageId) { - this.hospitalMessageId = hospitalMessageId; - } - - public String getTagsIds() { - return tagsIds; - } - - public void setTagsIds(String tagsIds) { - this.tagsIds = tagsIds; - } - -} diff --git a/parent/base.common/src/main/java/com/lyms/base/common/entity/content/HospitalMessageVersion.java b/parent/base.common/src/main/java/com/lyms/base/common/entity/content/HospitalMessageVersion.java deleted file mode 100644 index 5d5e26f..0000000 --- a/parent/base.common/src/main/java/com/lyms/base/common/entity/content/HospitalMessageVersion.java +++ /dev/null @@ -1,167 +0,0 @@ -package com.lyms.base.common.entity.content; - -import com.baomidou.mybatisplus.annotations.TableField; -import com.baomidou.mybatisplus.annotations.TableName; - -import java.io.Serializable; -import java.util.Date; - -/** - *- * - *
- * - * @author yangfei - * @since 2017-05-31 - */ -@TableName("HOSPITAL_MESSAGE_VERSION") -public class HospitalMessageVersion implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 主键 - */ - @TableField(value="ID") - private String id; - /** - * 消息模板版本id - */ - @TableField(value="TV_ID") - private String tvId; - /** - * 医院id - */ - @TableField(value="HOSPITAL") - private String hospital; - /** - * 创建时间 - */ - @TableField(value="CREATE_TIME") - private Date createTime; - /** - * 创建人ID - */ - @TableField(value="CREATE_ID") - private String createId; - /** - * 创建人名称 - */ - @TableField(value="CREATE_NAME") - private String createName; - /** - * 修改人ID - */ - @TableField(value="MODIFY_ID") - private String modifyId; - /** - * 修改人名称 - */ - @TableField(value="MODIFY_NAME") - private String modifyName; - /** - * 最后修改时间 - */ - @TableField(value="MODIFY_TIME") - private Date modifyTime; - /** - * 是否删除 - */ - @TableField(value="IFDEL") - private Integer ifdel; - /** - * 是否启用 - */ - @TableField(value="ENABLE") - private Integer enable; - - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getTvId() { - return tvId; - } - - public void setTvId(String tvId) { - this.tvId = tvId; - } - - public String getHospital() { - return hospital; - } - - public void setHospital(String hospital) { - this.hospital = hospital; - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public String getCreateId() { - return createId; - } - - public void setCreateId(String createId) { - this.createId = createId; - } - - public String getCreateName() { - return createName; - } - - public void setCreateName(String createName) { - this.createName = createName; - } - - public String getModifyId() { - return modifyId; - } - - public void setModifyId(String modifyId) { - this.modifyId = modifyId; - } - - public String getModifyName() { - return modifyName; - } - - public void setModifyName(String modifyName) { - this.modifyName = modifyName; - } - - public Date getModifyTime() { - return modifyTime; - } - - public void setModifyTime(Date modifyTime) { - this.modifyTime = modifyTime; - } - - public Integer getIfdel() { - return ifdel; - } - - public void setIfdel(Integer ifdel) { - this.ifdel = ifdel; - } - - public Integer getEnable() { - return enable; - } - - public void setEnable(Integer enable) { - this.enable = enable; - } - -} diff --git a/parent/base.common/src/main/java/com/lyms/base/common/service/content/ContentDoctorMessageService.java b/parent/base.common/src/main/java/com/lyms/base/common/service/content/ContentDoctorMessageService.java index ad05adc..fa61bd4 100644 --- a/parent/base.common/src/main/java/com/lyms/base/common/service/content/ContentDoctorMessageService.java +++ b/parent/base.common/src/main/java/com/lyms/base/common/service/content/ContentDoctorMessageService.java @@ -1,9 +1,10 @@ package com.lyms.base.common.service.content; +import com.baomidou.mybatisplus.plugins.Page; import com.lyms.base.common.entity.content.ContentDoctorMessage; import com.lyms.web.service.BaseService; - import java.io.Serializable; +import java.util.List; /** *@@ -11,7 +12,7 @@ import java.io.Serializable; *
* * @author yangfei - * @since 2017-04-14 + * @since 2017-05-31 */ public interface ContentDoctorMessageService extends BaseService+ * 服务类 + *
+ * + * @author yangfei + * @since 2017-05-31 + */ +public interface ContentHospitalMessageTagsService extends BaseService+ * 服务类 + *
+ * + * @author yangfei + * @since 2017-05-31 + */ +public interface ContentHospitalMessageVersionService extends BaseService- * 服务类 - *
- * - * @author yangfei - * @since 2017-05-31 - */ -public interface HospitalMessageTagsService extends BaseService- * 服务类 - *
- * - * @author yangfei - * @since 2017-05-31 - */ -public interface HospitalMessageVersionService extends BaseService@@ -14,7 +15,7 @@ import java.io.Serializable; *
* * @author yangfei - * @since 2017-04-14 + * @since 2017-05-31 */ @Service public class ContentDoctorMessageServiceImpl extends ServiceImpl+ * 医院消息标签 服务实现类 + *
+ * + * @author yangfei + * @since 2017-05-31 + */ +@Service +public class ContentHospitalMessageTagsServiceImpl extends ServiceImpl+ * 医院消息模板关系 服务实现类 + *
+ * + * @author yangfei + * @since 2017-05-31 + */ +@Service +public class ContentHospitalMessageVersionServiceImpl extends ServiceImpl- * 服务实现类 - *
- * - * @author yangfei - * @since 2017-05-31 - */ -@Service -public class HospitalMessageTagsServiceImpl extends ServiceImpl- * 服务实现类 - *
- * - * @author yangfei - * @since 2017-05-31 - */ -@Service -public class HospitalMessageVersionServiceImpl extends ServiceImpl- * 医院消息 前端控制器 + * 医院消息 *
* * @author yangfei @@ -25,29 +32,214 @@ import java.util.Map; @Controller @RequestMapping("/contentDoctorMessage") public class ContentDoctorMessageController extends BaseController { - //医院信息 + @Autowired + private ContentHospitalMessageVersionService contentHospitalMessageVersionService; @Autowired private ContentDoctorMessageService contentDoctorMessageService; + @Autowired + private ContentHospitalMessageTagsService contentHospitalMessageTagsService; + @Autowired + private ContentTemplateVersionService templateVersionService; + //模板信息 + @Autowired + private ContentMessageTemplateService messageTemplateService; + @Autowired + private OrganizationsService organService; + + /** + * 新增消息模板信息 + *
+ * TODO
+ *
+ * @return
+ */
+ @RequestMapping(value = "/update", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxResult update(@ModelAttribute InContentMessageTemplateDTO contentMessage, AjaxResult ajaxResult) {
+ ContentDoctorMessage messTemp = new ContentDoctorMessage();
+ if(StrUtils.isNotEmpty(contentMessage.getId())&&!contentMessage.getId().equals("0")){//更新
+ messTemp = contentDoctorMessageService.selectById(contentMessage.getId());
+ if(messTemp!=null){
+ messTemp.setModifyTime(new Date());
+ }
+ Map医院名称
-