Commit 2eb8e9b9 authored by 廖旭伟's avatar 廖旭伟

增加项目模板和模板数据功能后台接口

parent cfb2b6d8
...@@ -27,13 +27,13 @@ ...@@ -27,13 +27,13 @@
<profiles.active>develop</profiles.active> <profiles.active>develop</profiles.active>
<profiles.server.port>17002</profiles.server.port> <profiles.server.port>17002</profiles.server.port>
<profiles.datasource.uri> <profiles.datasource.uri>
<![CDATA[jdbc:mysql://localhost:3306/yi_zheng_xiu?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]></profiles.datasource.uri> <![CDATA[jdbc:mysql://192.168.0.98:3306/datav_platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]></profiles.datasource.uri>
<profiles.datasource.username>root</profiles.datasource.username> <profiles.datasource.username>root</profiles.datasource.username>
<profiles.datasource.password>12345678</profiles.datasource.password> <profiles.datasource.password>nacos@2020</profiles.datasource.password>
<profiles.redis.uri>127.0.0.1</profiles.redis.uri> <profiles.redis.uri>192.168.0.252</profiles.redis.uri>
<profiles.redis.port>6379</profiles.redis.port> <profiles.redis.port>6379</profiles.redis.port>
<profiles.redis.username></profiles.redis.username> <profiles.redis.username></profiles.redis.username>
<profiles.redis.password></profiles.redis.password> <profiles.redis.password>hotel@2020</profiles.redis.password>
<profiles.redis.database>3</profiles.redis.database> <profiles.redis.database>3</profiles.redis.database>
<profiles.filepath>d:/mortals/app/data/datav</profiles.filepath> <profiles.filepath>d:/mortals/app/data/datav</profiles.filepath>
<profiles.log.path>/mortals/app/logs</profiles.log.path> <profiles.log.path>/mortals/app/logs</profiles.log.path>
......
package com.mortals.xhx.module.goview.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.goview.model.GoviewMasterplateEntity;
import java.util.List;
/**
* 模板表Dao
* 模板表 DAO接口
*
* @author zxfei
* @date 2023-04-16
*/
public interface GoviewMasterplateDao extends ICRUDDao<GoviewMasterplateEntity,Long>{
}
package com.mortals.xhx.module.goview.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.goview.model.GoviewMasterplateDataEntity;
import java.util.List;
/**
* 模板数据Dao
* 模板数据 DAO接口
*
* @author zxfei
* @date 2023-04-16
*/
public interface GoviewMasterplateDataDao extends ICRUDDao<GoviewMasterplateDataEntity,Long>{
}
package com.mortals.xhx.module.goview.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.goview.dao.GoviewMasterplateDao;
import com.mortals.xhx.module.goview.model.GoviewMasterplateEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 模板表DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-16
*/
@Repository("goviewMasterplateDao")
public class GoviewMasterplateDaoImpl extends BaseCRUDDaoMybatis<GoviewMasterplateEntity,Long> implements GoviewMasterplateDao {
}
package com.mortals.xhx.module.goview.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.goview.dao.GoviewMasterplateDataDao;
import com.mortals.xhx.module.goview.model.GoviewMasterplateDataEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 模板数据DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-16
*/
@Repository("goviewMasterplateDataDao")
public class GoviewMasterplateDataDaoImpl extends BaseCRUDDaoMybatis<GoviewMasterplateDataEntity,Long> implements GoviewMasterplateDataDao {
}
package com.mortals.xhx.module.goview.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.goview.model.vo.GoviewMasterplateDataVo;
/**
* 模板数据实体对象
*
* @author zxfei
* @date 2023-04-16
*/
public class GoviewMasterplateDataEntity extends GoviewMasterplateDataVo {
private static final long serialVersionUID = 1L;
/**
* 模板Id
*/
private Long masterplateId;
/**
* 存储数据
*/
private byte[] content;
public GoviewMasterplateDataEntity(){}
/**
* 获取 模板Id
* @return Long
*/
public Long getMasterplateId(){
return masterplateId;
}
/**
* 设置 模板Id
* @param masterplateId
*/
public void setMasterplateId(Long masterplateId){
this.masterplateId = masterplateId;
}
/**
* 获取 存储数据
* @return byte[]
*/
public byte[] getContent(){
return content;
}
/**
* 设置 存储数据
* @param content
*/
public void setContent(byte[] content){
this.content = content;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof GoviewMasterplateDataEntity) {
GoviewMasterplateDataEntity tmp = (GoviewMasterplateDataEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",masterplateId:").append(getMasterplateId());
sb.append(",content:").append(getContent());
return sb.toString();
}
public void initAttrValue(){
this.masterplateId = null;
this.content = null;
}
}
\ No newline at end of file
package com.mortals.xhx.module.goview.model;
import java.util.List;
import com.mortals.xhx.module.goview.model.GoviewMasterplateDataEntity;
/**
* 模板数据查询对象
*
* @author zxfei
* @date 2023-04-16
*/
public class GoviewMasterplateDataQuery extends GoviewMasterplateDataEntity {
/** 开始 序号,主键,自增长 */
private Long idStart;
/** 结束 序号,主键,自增长 */
private Long idEnd;
/** 增加 序号,主键,自增长 */
private Long idIncrement;
/** 序号,主键,自增长列表 */
private List <Long> idList;
/** 序号,主键,自增长排除列表 */
private List <Long> idNotList;
/** 开始 模板Id */
private Long masterplateIdStart;
/** 结束 模板Id */
private Long masterplateIdEnd;
/** 增加 模板Id */
private Long masterplateIdIncrement;
/** 模板Id列表 */
private List <Long> masterplateIdList;
/** 模板Id排除列表 */
private List <Long> masterplateIdNotList;
/** 开始 创建用户 */
private Long createUserIdStart;
/** 结束 创建用户 */
private Long createUserIdEnd;
/** 增加 创建用户 */
private Long createUserIdIncrement;
/** 创建用户列表 */
private List <Long> createUserIdList;
/** 创建用户排除列表 */
private List <Long> createUserIdNotList;
/** 开始 创建时间 */
private String createTimeStart;
/** 结束 创建时间 */
private String createTimeEnd;
/** 开始 更新用户 */
private Long updateUserIdStart;
/** 结束 更新用户 */
private Long updateUserIdEnd;
/** 增加 更新用户 */
private Long updateUserIdIncrement;
/** 更新用户列表 */
private List <Long> updateUserIdList;
/** 更新用户排除列表 */
private List <Long> updateUserIdNotList;
/** 开始 更新时间 */
private String updateTimeStart;
/** 结束 更新时间 */
private String updateTimeEnd;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<GoviewMasterplateDataQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<GoviewMasterplateDataQuery> andConditionList;
public GoviewMasterplateDataQuery(){}
/**
* 获取 开始 序号,主键,自增长
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 序号,主键,自增长
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 序号,主键,自增长
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 序号,主键,自增长
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 序号,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 开始 模板Id
* @return masterplateIdStart
*/
public Long getMasterplateIdStart(){
return this.masterplateIdStart;
}
/**
* 设置 开始 模板Id
* @param masterplateIdStart
*/
public void setMasterplateIdStart(Long masterplateIdStart){
this.masterplateIdStart = masterplateIdStart;
}
/**
* 获取 结束 模板Id
* @return $masterplateIdEnd
*/
public Long getMasterplateIdEnd(){
return this.masterplateIdEnd;
}
/**
* 设置 结束 模板Id
* @param masterplateIdEnd
*/
public void setMasterplateIdEnd(Long masterplateIdEnd){
this.masterplateIdEnd = masterplateIdEnd;
}
/**
* 获取 增加 模板Id
* @return masterplateIdIncrement
*/
public Long getMasterplateIdIncrement(){
return this.masterplateIdIncrement;
}
/**
* 设置 增加 模板Id
* @param masterplateIdIncrement
*/
public void setMasterplateIdIncrement(Long masterplateIdIncrement){
this.masterplateIdIncrement = masterplateIdIncrement;
}
/**
* 获取 模板Id
* @return masterplateIdList
*/
public List<Long> getMasterplateIdList(){
return this.masterplateIdList;
}
/**
* 设置 模板Id
* @param masterplateIdList
*/
public void setMasterplateIdList(List<Long> masterplateIdList){
this.masterplateIdList = masterplateIdList;
}
/**
* 获取 模板Id
* @return masterplateIdNotList
*/
public List<Long> getMasterplateIdNotList(){
return this.masterplateIdNotList;
}
/**
* 设置 模板Id
* @param masterplateIdNotList
*/
public void setMasterplateIdNotList(List<Long> masterplateIdNotList){
this.masterplateIdNotList = masterplateIdNotList;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
*/
public Long getCreateUserIdStart(){
return this.createUserIdStart;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public void setCreateUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
}
/**
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
public Long getCreateUserIdEnd(){
return this.createUserIdEnd;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public void setCreateUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
}
/**
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
public Long getCreateUserIdIncrement(){
return this.createUserIdIncrement;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public void setCreateUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
}
/**
* 获取 创建用户
* @return createUserIdList
*/
public List<Long> getCreateUserIdList(){
return this.createUserIdList;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public void setCreateUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
}
/**
* 获取 创建用户
* @return createUserIdNotList
*/
public List<Long> getCreateUserIdNotList(){
return this.createUserIdNotList;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public void setCreateUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 获取 开始 更新用户
* @return updateUserIdStart
*/
public Long getUpdateUserIdStart(){
return this.updateUserIdStart;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public void setUpdateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
}
/**
* 获取 结束 更新用户
* @return $updateUserIdEnd
*/
public Long getUpdateUserIdEnd(){
return this.updateUserIdEnd;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public void setUpdateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
}
/**
* 获取 增加 更新用户
* @return updateUserIdIncrement
*/
public Long getUpdateUserIdIncrement(){
return this.updateUserIdIncrement;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public void setUpdateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
}
/**
* 获取 更新用户
* @return updateUserIdList
*/
public List<Long> getUpdateUserIdList(){
return this.updateUserIdList;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public void setUpdateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
}
/**
* 获取 更新用户
* @return updateUserIdNotList
*/
public List<Long> getUpdateUserIdNotList(){
return this.updateUserIdNotList;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public void setUpdateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
}
/**
* 获取 开始 更新时间
* @return updateTimeStart
*/
public String getUpdateTimeStart(){
return this.updateTimeStart;
}
/**
* 设置 开始 更新时间
* @param updateTimeStart
*/
public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
/**
* 获取 结束 更新时间
* @return updateTimeEnd
*/
public String getUpdateTimeEnd(){
return this.updateTimeEnd;
}
/**
* 设置 结束 更新时间
* @param updateTimeEnd
*/
public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
/**
* 设置 序号,主键,自增长
* @param id
*/
public GoviewMasterplateDataQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public GoviewMasterplateDataQuery idStart(Long idStart){
this.idStart = idStart;
return this;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public GoviewMasterplateDataQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public GoviewMasterplateDataQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
public GoviewMasterplateDataQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public GoviewMasterplateDataQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/**
* 设置 模板Id
* @param masterplateId
*/
public GoviewMasterplateDataQuery masterplateId(Long masterplateId){
setMasterplateId(masterplateId);
return this;
}
/**
* 设置 开始 模板Id
* @param masterplateIdStart
*/
public GoviewMasterplateDataQuery masterplateIdStart(Long masterplateIdStart){
this.masterplateIdStart = masterplateIdStart;
return this;
}
/**
* 设置 结束 模板Id
* @param masterplateIdEnd
*/
public GoviewMasterplateDataQuery masterplateIdEnd(Long masterplateIdEnd){
this.masterplateIdEnd = masterplateIdEnd;
return this;
}
/**
* 设置 增加 模板Id
* @param masterplateIdIncrement
*/
public GoviewMasterplateDataQuery masterplateIdIncrement(Long masterplateIdIncrement){
this.masterplateIdIncrement = masterplateIdIncrement;
return this;
}
/**
* 设置 模板Id
* @param masterplateIdList
*/
public GoviewMasterplateDataQuery masterplateIdList(List<Long> masterplateIdList){
this.masterplateIdList = masterplateIdList;
return this;
}
/**
* 设置 模板Id
* @param masterplateIdNotList
*/
public GoviewMasterplateDataQuery masterplateIdNotList(List<Long> masterplateIdNotList){
this.masterplateIdNotList = masterplateIdNotList;
return this;
}
/**
* 设置 创建用户
* @param createUserId
*/
public GoviewMasterplateDataQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public GoviewMasterplateDataQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public GoviewMasterplateDataQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public GoviewMasterplateDataQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public GoviewMasterplateDataQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public GoviewMasterplateDataQuery createUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
return this;
}
/**
* 设置 更新用户
* @param updateUserId
*/
public GoviewMasterplateDataQuery updateUserId(Long updateUserId){
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public GoviewMasterplateDataQuery updateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
return this;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public GoviewMasterplateDataQuery updateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
return this;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public GoviewMasterplateDataQuery updateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public GoviewMasterplateDataQuery updateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public GoviewMasterplateDataQuery updateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<GoviewMasterplateDataQuery> getOrConditionList(){
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<GoviewMasterplateDataQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<GoviewMasterplateDataQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<GoviewMasterplateDataQuery> andConditionList){
this.andConditionList = andConditionList;
}
}
\ No newline at end of file
package com.mortals.xhx.module.goview.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.goview.model.vo.GoviewMasterplateVo;
/**
* 模板表实体对象
*
* @author zxfei
* @date 2023-04-16
*/
public class GoviewMasterplateEntity extends GoviewMasterplateVo {
private static final long serialVersionUID = 1L;
/**
* 模板名称
*/
private String masterplateName;
/**
* 发布用户ID
*/
private Long customerId;
/**
* 项目状态[0未发布,1发布]
*/
private Integer state;
/**
* 首页图片
*/
private String indexImage;
/**
* 模板介绍
*/
private String remarks;
public GoviewMasterplateEntity(){}
/**
* 获取 模板名称
* @return String
*/
public String getMasterplateName(){
return masterplateName;
}
/**
* 设置 模板名称
* @param masterplateName
*/
public void setMasterplateName(String masterplateName){
this.masterplateName = masterplateName;
}
/**
* 获取 发布用户ID
* @return Long
*/
public Long getCustomerId(){
return customerId;
}
/**
* 设置 发布用户ID
* @param customerId
*/
public void setCustomerId(Long customerId){
this.customerId = customerId;
}
/**
* 获取 项目状态[0未发布,1发布]
* @return Integer
*/
public Integer getState(){
return state;
}
/**
* 设置 项目状态[0未发布,1发布]
* @param state
*/
public void setState(Integer state){
this.state = state;
}
/**
* 获取 首页图片
* @return String
*/
public String getIndexImage(){
return indexImage;
}
/**
* 设置 首页图片
* @param indexImage
*/
public void setIndexImage(String indexImage){
this.indexImage = indexImage;
}
/**
* 获取 模板介绍
* @return String
*/
public String getRemarks(){
return remarks;
}
/**
* 设置 模板介绍
* @param remarks
*/
public void setRemarks(String remarks){
this.remarks = remarks;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof GoviewMasterplateEntity) {
GoviewMasterplateEntity tmp = (GoviewMasterplateEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",masterplateName:").append(getMasterplateName());
sb.append(",customerId:").append(getCustomerId());
sb.append(",state:").append(getState());
sb.append(",indexImage:").append(getIndexImage());
sb.append(",remarks:").append(getRemarks());
return sb.toString();
}
public void initAttrValue(){
this.masterplateName = "";
this.customerId = null;
this.state = null;
this.indexImage = "";
this.remarks = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.goview.model;
import java.util.List;
import com.mortals.xhx.module.goview.model.GoviewMasterplateEntity;
/**
* 模板表查询对象
*
* @author zxfei
* @date 2023-04-16
*/
public class GoviewMasterplateQuery extends GoviewMasterplateEntity {
/** 开始 序号,主键,自增长 */
private Long idStart;
/** 结束 序号,主键,自增长 */
private Long idEnd;
/** 增加 序号,主键,自增长 */
private Long idIncrement;
/** 序号,主键,自增长列表 */
private List <Long> idList;
/** 序号,主键,自增长排除列表 */
private List <Long> idNotList;
/** 模板名称 */
private List<String> masterplateNameList;
/** 模板名称排除列表 */
private List <String> masterplateNameNotList;
/** 开始 发布用户ID */
private Long customerIdStart;
/** 结束 发布用户ID */
private Long customerIdEnd;
/** 增加 发布用户ID */
private Long customerIdIncrement;
/** 发布用户ID列表 */
private List <Long> customerIdList;
/** 发布用户ID排除列表 */
private List <Long> customerIdNotList;
/** 开始 项目状态[0未发布,1发布] */
private Integer stateStart;
/** 结束 项目状态[0未发布,1发布] */
private Integer stateEnd;
/** 增加 项目状态[0未发布,1发布] */
private Integer stateIncrement;
/** 项目状态[0未发布,1发布]列表 */
private List <Integer> stateList;
/** 项目状态[0未发布,1发布]排除列表 */
private List <Integer> stateNotList;
/** 首页图片 */
private List<String> indexImageList;
/** 首页图片排除列表 */
private List <String> indexImageNotList;
/** 模板介绍 */
private List<String> remarksList;
/** 模板介绍排除列表 */
private List <String> remarksNotList;
/** 开始 创建用户 */
private Long createUserIdStart;
/** 结束 创建用户 */
private Long createUserIdEnd;
/** 增加 创建用户 */
private Long createUserIdIncrement;
/** 创建用户列表 */
private List <Long> createUserIdList;
/** 创建用户排除列表 */
private List <Long> createUserIdNotList;
/** 开始 创建时间 */
private String createTimeStart;
/** 结束 创建时间 */
private String createTimeEnd;
/** 开始 更新用户 */
private Long updateUserIdStart;
/** 结束 更新用户 */
private Long updateUserIdEnd;
/** 增加 更新用户 */
private Long updateUserIdIncrement;
/** 更新用户列表 */
private List <Long> updateUserIdList;
/** 更新用户排除列表 */
private List <Long> updateUserIdNotList;
/** 开始 更新时间 */
private String updateTimeStart;
/** 结束 更新时间 */
private String updateTimeEnd;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<GoviewMasterplateQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<GoviewMasterplateQuery> andConditionList;
public GoviewMasterplateQuery(){}
/**
* 获取 开始 序号,主键,自增长
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 序号,主键,自增长
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 序号,主键,自增长
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 序号,主键,自增长
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 序号,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 模板名称
* @return masterplateNameList
*/
public List<String> getMasterplateNameList(){
return this.masterplateNameList;
}
/**
* 设置 模板名称
* @param masterplateNameList
*/
public void setMasterplateNameList(List<String> masterplateNameList){
this.masterplateNameList = masterplateNameList;
}
/**
* 获取 模板名称
* @return masterplateNameNotList
*/
public List<String> getMasterplateNameNotList(){
return this.masterplateNameNotList;
}
/**
* 设置 模板名称
* @param masterplateNameNotList
*/
public void setMasterplateNameNotList(List<String> masterplateNameNotList){
this.masterplateNameNotList = masterplateNameNotList;
}
/**
* 获取 开始 发布用户ID
* @return customerIdStart
*/
public Long getCustomerIdStart(){
return this.customerIdStart;
}
/**
* 设置 开始 发布用户ID
* @param customerIdStart
*/
public void setCustomerIdStart(Long customerIdStart){
this.customerIdStart = customerIdStart;
}
/**
* 获取 结束 发布用户ID
* @return $customerIdEnd
*/
public Long getCustomerIdEnd(){
return this.customerIdEnd;
}
/**
* 设置 结束 发布用户ID
* @param customerIdEnd
*/
public void setCustomerIdEnd(Long customerIdEnd){
this.customerIdEnd = customerIdEnd;
}
/**
* 获取 增加 发布用户ID
* @return customerIdIncrement
*/
public Long getCustomerIdIncrement(){
return this.customerIdIncrement;
}
/**
* 设置 增加 发布用户ID
* @param customerIdIncrement
*/
public void setCustomerIdIncrement(Long customerIdIncrement){
this.customerIdIncrement = customerIdIncrement;
}
/**
* 获取 发布用户ID
* @return customerIdList
*/
public List<Long> getCustomerIdList(){
return this.customerIdList;
}
/**
* 设置 发布用户ID
* @param customerIdList
*/
public void setCustomerIdList(List<Long> customerIdList){
this.customerIdList = customerIdList;
}
/**
* 获取 发布用户ID
* @return customerIdNotList
*/
public List<Long> getCustomerIdNotList(){
return this.customerIdNotList;
}
/**
* 设置 发布用户ID
* @param customerIdNotList
*/
public void setCustomerIdNotList(List<Long> customerIdNotList){
this.customerIdNotList = customerIdNotList;
}
/**
* 获取 开始 项目状态[0未发布,1发布]
* @return stateStart
*/
public Integer getStateStart(){
return this.stateStart;
}
/**
* 设置 开始 项目状态[0未发布,1发布]
* @param stateStart
*/
public void setStateStart(Integer stateStart){
this.stateStart = stateStart;
}
/**
* 获取 结束 项目状态[0未发布,1发布]
* @return $stateEnd
*/
public Integer getStateEnd(){
return this.stateEnd;
}
/**
* 设置 结束 项目状态[0未发布,1发布]
* @param stateEnd
*/
public void setStateEnd(Integer stateEnd){
this.stateEnd = stateEnd;
}
/**
* 获取 增加 项目状态[0未发布,1发布]
* @return stateIncrement
*/
public Integer getStateIncrement(){
return this.stateIncrement;
}
/**
* 设置 增加 项目状态[0未发布,1发布]
* @param stateIncrement
*/
public void setStateIncrement(Integer stateIncrement){
this.stateIncrement = stateIncrement;
}
/**
* 获取 项目状态[0未发布,1发布]
* @return stateList
*/
public List<Integer> getStateList(){
return this.stateList;
}
/**
* 设置 项目状态[0未发布,1发布]
* @param stateList
*/
public void setStateList(List<Integer> stateList){
this.stateList = stateList;
}
/**
* 获取 项目状态[0未发布,1发布]
* @return stateNotList
*/
public List<Integer> getStateNotList(){
return this.stateNotList;
}
/**
* 设置 项目状态[0未发布,1发布]
* @param stateNotList
*/
public void setStateNotList(List<Integer> stateNotList){
this.stateNotList = stateNotList;
}
/**
* 获取 首页图片
* @return indexImageList
*/
public List<String> getIndexImageList(){
return this.indexImageList;
}
/**
* 设置 首页图片
* @param indexImageList
*/
public void setIndexImageList(List<String> indexImageList){
this.indexImageList = indexImageList;
}
/**
* 获取 首页图片
* @return indexImageNotList
*/
public List<String> getIndexImageNotList(){
return this.indexImageNotList;
}
/**
* 设置 首页图片
* @param indexImageNotList
*/
public void setIndexImageNotList(List<String> indexImageNotList){
this.indexImageNotList = indexImageNotList;
}
/**
* 获取 模板介绍
* @return remarksList
*/
public List<String> getRemarksList(){
return this.remarksList;
}
/**
* 设置 模板介绍
* @param remarksList
*/
public void setRemarksList(List<String> remarksList){
this.remarksList = remarksList;
}
/**
* 获取 模板介绍
* @return remarksNotList
*/
public List<String> getRemarksNotList(){
return this.remarksNotList;
}
/**
* 设置 模板介绍
* @param remarksNotList
*/
public void setRemarksNotList(List<String> remarksNotList){
this.remarksNotList = remarksNotList;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
*/
public Long getCreateUserIdStart(){
return this.createUserIdStart;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public void setCreateUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
}
/**
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
public Long getCreateUserIdEnd(){
return this.createUserIdEnd;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public void setCreateUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
}
/**
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
public Long getCreateUserIdIncrement(){
return this.createUserIdIncrement;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public void setCreateUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
}
/**
* 获取 创建用户
* @return createUserIdList
*/
public List<Long> getCreateUserIdList(){
return this.createUserIdList;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public void setCreateUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
}
/**
* 获取 创建用户
* @return createUserIdNotList
*/
public List<Long> getCreateUserIdNotList(){
return this.createUserIdNotList;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public void setCreateUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 获取 开始 更新用户
* @return updateUserIdStart
*/
public Long getUpdateUserIdStart(){
return this.updateUserIdStart;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public void setUpdateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
}
/**
* 获取 结束 更新用户
* @return $updateUserIdEnd
*/
public Long getUpdateUserIdEnd(){
return this.updateUserIdEnd;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public void setUpdateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
}
/**
* 获取 增加 更新用户
* @return updateUserIdIncrement
*/
public Long getUpdateUserIdIncrement(){
return this.updateUserIdIncrement;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public void setUpdateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
}
/**
* 获取 更新用户
* @return updateUserIdList
*/
public List<Long> getUpdateUserIdList(){
return this.updateUserIdList;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public void setUpdateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
}
/**
* 获取 更新用户
* @return updateUserIdNotList
*/
public List<Long> getUpdateUserIdNotList(){
return this.updateUserIdNotList;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public void setUpdateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
}
/**
* 获取 开始 更新时间
* @return updateTimeStart
*/
public String getUpdateTimeStart(){
return this.updateTimeStart;
}
/**
* 设置 开始 更新时间
* @param updateTimeStart
*/
public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
/**
* 获取 结束 更新时间
* @return updateTimeEnd
*/
public String getUpdateTimeEnd(){
return this.updateTimeEnd;
}
/**
* 设置 结束 更新时间
* @param updateTimeEnd
*/
public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
/**
* 设置 序号,主键,自增长
* @param id
*/
public GoviewMasterplateQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public GoviewMasterplateQuery idStart(Long idStart){
this.idStart = idStart;
return this;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public GoviewMasterplateQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public GoviewMasterplateQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
public GoviewMasterplateQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public GoviewMasterplateQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/**
* 设置 模板名称
* @param masterplateName
*/
public GoviewMasterplateQuery masterplateName(String masterplateName){
setMasterplateName(masterplateName);
return this;
}
/**
* 设置 模板名称
* @param masterplateNameList
*/
public GoviewMasterplateQuery masterplateNameList(List<String> masterplateNameList){
this.masterplateNameList = masterplateNameList;
return this;
}
/**
* 设置 发布用户ID
* @param customerId
*/
public GoviewMasterplateQuery customerId(Long customerId){
setCustomerId(customerId);
return this;
}
/**
* 设置 开始 发布用户ID
* @param customerIdStart
*/
public GoviewMasterplateQuery customerIdStart(Long customerIdStart){
this.customerIdStart = customerIdStart;
return this;
}
/**
* 设置 结束 发布用户ID
* @param customerIdEnd
*/
public GoviewMasterplateQuery customerIdEnd(Long customerIdEnd){
this.customerIdEnd = customerIdEnd;
return this;
}
/**
* 设置 增加 发布用户ID
* @param customerIdIncrement
*/
public GoviewMasterplateQuery customerIdIncrement(Long customerIdIncrement){
this.customerIdIncrement = customerIdIncrement;
return this;
}
/**
* 设置 发布用户ID
* @param customerIdList
*/
public GoviewMasterplateQuery customerIdList(List<Long> customerIdList){
this.customerIdList = customerIdList;
return this;
}
/**
* 设置 发布用户ID
* @param customerIdNotList
*/
public GoviewMasterplateQuery customerIdNotList(List<Long> customerIdNotList){
this.customerIdNotList = customerIdNotList;
return this;
}
/**
* 设置 项目状态[0未发布,1发布]
* @param state
*/
public GoviewMasterplateQuery state(Integer state){
setState(state);
return this;
}
/**
* 设置 开始 项目状态[0未发布,1发布]
* @param stateStart
*/
public GoviewMasterplateQuery stateStart(Integer stateStart){
this.stateStart = stateStart;
return this;
}
/**
* 设置 结束 项目状态[0未发布,1发布]
* @param stateEnd
*/
public GoviewMasterplateQuery stateEnd(Integer stateEnd){
this.stateEnd = stateEnd;
return this;
}
/**
* 设置 增加 项目状态[0未发布,1发布]
* @param stateIncrement
*/
public GoviewMasterplateQuery stateIncrement(Integer stateIncrement){
this.stateIncrement = stateIncrement;
return this;
}
/**
* 设置 项目状态[0未发布,1发布]
* @param stateList
*/
public GoviewMasterplateQuery stateList(List<Integer> stateList){
this.stateList = stateList;
return this;
}
/**
* 设置 项目状态[0未发布,1发布]
* @param stateNotList
*/
public GoviewMasterplateQuery stateNotList(List<Integer> stateNotList){
this.stateNotList = stateNotList;
return this;
}
/**
* 设置 首页图片
* @param indexImage
*/
public GoviewMasterplateQuery indexImage(String indexImage){
setIndexImage(indexImage);
return this;
}
/**
* 设置 首页图片
* @param indexImageList
*/
public GoviewMasterplateQuery indexImageList(List<String> indexImageList){
this.indexImageList = indexImageList;
return this;
}
/**
* 设置 模板介绍
* @param remarks
*/
public GoviewMasterplateQuery remarks(String remarks){
setRemarks(remarks);
return this;
}
/**
* 设置 模板介绍
* @param remarksList
*/
public GoviewMasterplateQuery remarksList(List<String> remarksList){
this.remarksList = remarksList;
return this;
}
/**
* 设置 创建用户
* @param createUserId
*/
public GoviewMasterplateQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public GoviewMasterplateQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public GoviewMasterplateQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public GoviewMasterplateQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public GoviewMasterplateQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public GoviewMasterplateQuery createUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
return this;
}
/**
* 设置 更新用户
* @param updateUserId
*/
public GoviewMasterplateQuery updateUserId(Long updateUserId){
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public GoviewMasterplateQuery updateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
return this;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public GoviewMasterplateQuery updateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
return this;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public GoviewMasterplateQuery updateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public GoviewMasterplateQuery updateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public GoviewMasterplateQuery updateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<GoviewMasterplateQuery> getOrConditionList(){
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<GoviewMasterplateQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<GoviewMasterplateQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<GoviewMasterplateQuery> andConditionList){
this.andConditionList = andConditionList;
}
}
\ No newline at end of file
package com.mortals.xhx.module.goview.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.goview.model.GoviewMasterplateDataEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
/**
* 模板数据视图对象
*
* @author zxfei
* @date 2023-04-16
*/
@Data
public class GoviewMasterplateDataVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.goview.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.goview.model.GoviewMasterplateEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
/**
* 模板表视图对象
*
* @author zxfei
* @date 2023-04-16
*/
@Data
public class GoviewMasterplateVo extends BaseEntityLong {
/** 项目数据 */
private String content;
}
\ No newline at end of file
package com.mortals.xhx.module.goview.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.goview.model.GoviewMasterplateDataEntity;
/**
* GoviewMasterplateDataService
*
* 模板数据 service接口
*
* @author zxfei
* @date 2023-04-16
*/
public interface GoviewMasterplateDataService extends ICRUDService<GoviewMasterplateDataEntity,Long>{
}
\ No newline at end of file
package com.mortals.xhx.module.goview.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.goview.model.GoviewMasterplateEntity;
/**
* GoviewMasterplateService
*
* 模板表 service接口
*
* @author zxfei
* @date 2023-04-16
*/
public interface GoviewMasterplateService extends ICRUDService<GoviewMasterplateEntity,Long>{
/**
* 使用模板
* @param masterplateId
* @param context
* @throws AppException
*/
void useMasterplate(Long masterplateId, Context context) throws AppException;
}
\ No newline at end of file
package com.mortals.xhx.module.goview.service; package com.mortals.xhx.module.goview.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.goview.model.GoviewProjectEntity; import com.mortals.xhx.module.goview.model.GoviewProjectEntity;
/** /**
...@@ -11,4 +13,10 @@ import com.mortals.xhx.module.goview.model.GoviewProjectEntity; ...@@ -11,4 +13,10 @@ import com.mortals.xhx.module.goview.model.GoviewProjectEntity;
*/ */
public interface GoviewProjectService extends ICRUDService<GoviewProjectEntity,Long>{ public interface GoviewProjectService extends ICRUDService<GoviewProjectEntity,Long>{
/**
* 发布为模板
* @param projectId
* @throws AppException
*/
void publishMasterplate(Long projectId, Context context) throws AppException;
} }
\ No newline at end of file
package com.mortals.xhx.module.goview.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.goview.dao.GoviewMasterplateDataDao;
import com.mortals.xhx.module.goview.model.GoviewMasterplateDataEntity;
import com.mortals.xhx.module.goview.service.GoviewMasterplateDataService;
/**
* GoviewMasterplateDataService
* 模板数据 service实现
*
* @author zxfei
* @date 2023-04-16
*/
@Service("goviewMasterplateDataService")
public class GoviewMasterplateDataServiceImpl extends AbstractCRUDServiceImpl<GoviewMasterplateDataDao, GoviewMasterplateDataEntity, Long> implements GoviewMasterplateDataService {
}
\ No newline at end of file
package com.mortals.xhx.module.goview.service.impl;
import com.mortals.xhx.module.goview.model.*;
import com.mortals.xhx.module.goview.service.GoviewMasterplateDataService;
import com.mortals.xhx.module.goview.service.GoviewProjectDataService;
import com.mortals.xhx.module.goview.service.GoviewProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.goview.dao.GoviewMasterplateDao;
import com.mortals.xhx.module.goview.service.GoviewMasterplateService;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* GoviewMasterplateService
* 模板表 service实现
*
* @author zxfei
* @date 2023-04-16
*/
@Service("goviewMasterplateService")
public class GoviewMasterplateServiceImpl extends AbstractCRUDServiceImpl<GoviewMasterplateDao, GoviewMasterplateEntity, Long> implements GoviewMasterplateService {
@Autowired
private GoviewProjectDataService goviewProjectDataService;
@Autowired
private GoviewProjectService goviewProjectService;
@Autowired
private GoviewMasterplateDataService goviewMasterplateDataService;
@Override
protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
List<Long> masterplateIdList = new ArrayList<>();
for(Long id:ids){
masterplateIdList.add(id);
}
List<GoviewMasterplateDataEntity> list = goviewMasterplateDataService.find(new GoviewMasterplateDataQuery().masterplateIdList(masterplateIdList));
List<Long> dataIds = new ArrayList<>();
for(GoviewMasterplateDataEntity item:list){
dataIds.add(item.getId());
}
goviewMasterplateDataService.remove(dataIds.toArray(new Long[dataIds.size()]),context);
}
@Override
public void useMasterplate(Long masterplateId, Context context) throws AppException {
GoviewMasterplateEntity masterplateEntity = this.get(masterplateId);
if(masterplateEntity==null){
throw new AppException("模板ID不正确,无对应数据");
}
GoviewProjectEntity projectEntity = new GoviewProjectEntity();
projectEntity.setProjectName(masterplateEntity.getMasterplateName());
projectEntity.setIndexImage(masterplateEntity.getIndexImage());
projectEntity.setRemarks(masterplateEntity.getRemarks());
projectEntity.setState(-1);
if(context!=null && context.getUser()!=null) {
projectEntity.setCustomerId(context.getUser().getId());
projectEntity.setCreateUserId(projectEntity.getCustomerId());
}
projectEntity.setCreateTime(new Date());
projectEntity = goviewProjectService.save(projectEntity);
GoviewMasterplateDataEntity masterplateDataEntity = goviewMasterplateDataService.selectOne(new GoviewMasterplateDataQuery().masterplateId(masterplateEntity.getId()));
if(masterplateDataEntity!=null){
GoviewProjectDataEntity projectDataEntity = new GoviewProjectDataEntity();
projectDataEntity.setProjectId(projectEntity.getId());
projectDataEntity.setContent(masterplateDataEntity.getContent());
projectDataEntity.setCreateUserId(projectEntity.getCreateUserId());
projectDataEntity.setCreateTime(projectEntity.getCreateTime());
goviewProjectDataService.save(projectDataEntity);
}
}
}
\ No newline at end of file
...@@ -4,15 +4,16 @@ import com.mortals.framework.exception.AppException; ...@@ -4,15 +4,16 @@ import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.goview.dao.GoviewProjectDao; import com.mortals.xhx.module.goview.dao.GoviewProjectDao;
import com.mortals.xhx.module.goview.model.GoviewProjectDataEntity; import com.mortals.xhx.module.goview.model.*;
import com.mortals.xhx.module.goview.model.GoviewProjectDataQuery; import com.mortals.xhx.module.goview.service.GoviewMasterplateDataService;
import com.mortals.xhx.module.goview.model.GoviewProjectEntity; import com.mortals.xhx.module.goview.service.GoviewMasterplateService;
import com.mortals.xhx.module.goview.service.GoviewProjectDataService; import com.mortals.xhx.module.goview.service.GoviewProjectDataService;
import com.mortals.xhx.module.goview.service.GoviewProjectService; import com.mortals.xhx.module.goview.service.GoviewProjectService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -27,6 +28,10 @@ public class GoviewProjectServiceImpl extends AbstractCRUDServiceImpl<GoviewProj ...@@ -27,6 +28,10 @@ public class GoviewProjectServiceImpl extends AbstractCRUDServiceImpl<GoviewProj
@Autowired @Autowired
private GoviewProjectDataService goviewProjectDataService; private GoviewProjectDataService goviewProjectDataService;
@Autowired
private GoviewMasterplateService goviewMasterplateService;
@Autowired
private GoviewMasterplateDataService goviewMasterplateDataService;
@Override @Override
protected void saveBefore(GoviewProjectEntity entity, Context context) throws AppException { protected void saveBefore(GoviewProjectEntity entity, Context context) throws AppException {
...@@ -47,4 +52,31 @@ public class GoviewProjectServiceImpl extends AbstractCRUDServiceImpl<GoviewProj ...@@ -47,4 +52,31 @@ public class GoviewProjectServiceImpl extends AbstractCRUDServiceImpl<GoviewProj
} }
goviewProjectDataService.remove(dataIds.toArray(new Long[dataIds.size()]),context); goviewProjectDataService.remove(dataIds.toArray(new Long[dataIds.size()]),context);
} }
@Override
public void publishMasterplate(Long projectId, Context context) throws AppException {
GoviewProjectEntity projectEntity = this.get(projectId);
if(projectEntity == null){
throw new AppException("项目id不正确,无此项目数据");
}
GoviewMasterplateEntity masterplateEntity = new GoviewMasterplateEntity();
masterplateEntity.setCustomerId(projectEntity.getCustomerId());
masterplateEntity.setMasterplateName(projectEntity.getProjectName());
masterplateEntity.setIndexImage(projectEntity.getIndexImage());
masterplateEntity.setRemarks(projectEntity.getRemarks());
if(context!=null && context.getUser()!=null) {
masterplateEntity.setCreateUserId(context.getUser().getId());
}
masterplateEntity.setCreateTime(new Date());
masterplateEntity = goviewMasterplateService.save(masterplateEntity);
GoviewProjectDataEntity projectDataEntity = goviewProjectDataService.selectOne(new GoviewProjectDataQuery().projectId(projectId));
if(projectDataEntity!=null){
GoviewMasterplateDataEntity masterplateDataEntity = new GoviewMasterplateDataEntity();
masterplateDataEntity.setMasterplateId(masterplateEntity.getId());
masterplateDataEntity.setContent(projectDataEntity.getContent());
masterplateDataEntity.setCreateUserId(masterplateEntity.getCreateUserId());
masterplateDataEntity.setCreateTime(masterplateEntity.getCreateTime());
goviewMasterplateDataService.save(masterplateDataEntity);
}
}
} }
\ No newline at end of file
package com.mortals.xhx.module.goview.web;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.IUser;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.goview.model.*;
import com.mortals.xhx.module.goview.service.GoviewMasterplateDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.goview.service.GoviewMasterplateService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 模板表
*
* @author zxfei
* @date 2023-04-16
*/
@RestController
@RequestMapping("goview/masterplate")
public class GoviewMasterplateController extends BaseCRUDJsonBodyMappingController<GoviewMasterplateService,GoviewMasterplateEntity,Long> {
@Autowired
private ParamService paramService;
@Autowired
private GoviewMasterplateDataService goviewMasterplateDataService;
public GoviewMasterplateController(){
super.setModuleDesc( "模板表");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "state", paramService.getParamBySecondOrganize("GoviewMasterplate","state"));
super.init(model, context);
}
@RequestMapping(value = {"getData"},method = {RequestMethod.GET})
public Rest<Object> getData(Long masterplateId, ModelMap map) {
Rest<Object> ret = new Rest();
Map<String, Object> model = new HashMap();
Context context = this.getContext();
String busiDesc = "查询模板关联数据";
int code;
try {
GoviewMasterplateEntity goviewProjectEntity = service.get(masterplateId);
if(goviewProjectEntity==null){
throw new AppException("模板ID不正确,无对应数据");
}
GoviewMasterplateDataEntity goviewProjectDataEntity = this.goviewMasterplateDataService.selectOne(new GoviewMasterplateDataQuery().masterplateId(masterplateId));
if(goviewProjectEntity!=null && goviewProjectDataEntity!=null){
byte[] bs= goviewProjectDataEntity.getContent();
String str="二进制转换错误";
str = new String(bs);
goviewProjectEntity.setContent(str);
}
model.put("data", goviewProjectEntity);
code = 1;
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】");
} catch (Exception var9) {
code = -1;
this.doException(this.request, busiDesc, model, var9);
}
ret.setCode(code);
ret.setData(model.get("data"));
ret.setDict(model.get("dict"));
ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString());
return ret;
}
@PostMapping({"save/data"})
public String saveData(GoviewMasterplateDataEntity entity) {
Map<String, Object> model = new HashMap();
Context context = this.getContext();
String busiDesc = "保存模板数据";
int code=1;
try {
IUser user = this.getCurUser();
if(entity.getMasterplateId()==null){
throw new AppException("模板ID不能为空");
}
GoviewMasterplateDataEntity old = goviewMasterplateDataService.selectOne(new GoviewMasterplateDataQuery().masterplateId(entity.getMasterplateId()));
if(old==null){
entity.setCreateTime(new Date());
entity.setUpdateTime(entity.getCreateTime());
if (user != null) {
entity.setCreateUserId(user.getId());
}
this.goviewMasterplateDataService.save(entity, context);
}else {
entity.setId(old.getId());
entity.setUpdateTime(new Date());
this.goviewMasterplateDataService.update(entity, context);
}
model.put("id", entity.getId());
model.put("entity", entity);
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】 [id:" + entity.getId() + "]");
} catch (Exception var7) {
this.doException(this.request, busiDesc, model, var7);
model.put("entity", entity);
code = -1;
}
this.init(model, context);
JSONObject ret = new JSONObject();
ret.put("code", code);
ret.put("msg", model.remove("message_info"));
ret.put("data", model);
return ret.toJSONString();
}
/**
* 使用模板
* @param entity
* @return
*/
@PostMapping({"use/masterplate"})
public String useMasterplate(@RequestBody GoviewMasterplateEntity entity) {
Map<String, Object> model = new HashMap();
Context context = this.getContext();
String busiDesc = "使用模板";
int code=1;
try {
if(entity.getId()==null){
throw new AppException("模板ID不能为空");
}
service.useMasterplate(entity.getId(), context);
model.put("id", entity.getId());
model.put("entity", entity);
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】 [id:" + entity.getId() + "]");
} catch (Exception var7) {
this.doException(this.request, busiDesc, model, var7);
model.put("entity", entity);
code = -1;
}
this.init(model, context);
JSONObject ret = new JSONObject();
ret.put("code", code);
ret.put("msg", model.remove("message_info"));
ret.put("data", model);
return ret.toJSONString();
}
}
\ No newline at end of file
package com.mortals.xhx.module.goview.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.goview.model.GoviewMasterplateDataEntity;
import com.mortals.xhx.module.goview.service.GoviewMasterplateDataService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 模板数据
*
* @author zxfei
* @date 2023-04-16
*/
@RestController
@RequestMapping("goview/masterplate/data")
public class GoviewMasterplateDataController extends BaseCRUDJsonBodyMappingController<GoviewMasterplateDataService,GoviewMasterplateDataEntity,Long> {
@Autowired
private ParamService paramService;
public GoviewMasterplateDataController(){
super.setModuleDesc( "模板数据");
}
@Override
protected void init(Map<String, Object> model, Context context) {
super.init(model, context);
}
}
\ No newline at end of file
package com.mortals.xhx.module.goview.web; package com.mortals.xhx.module.goview.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.IUser;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -13,12 +15,10 @@ import com.mortals.xhx.module.goview.model.GoviewProjectEntity; ...@@ -13,12 +15,10 @@ import com.mortals.xhx.module.goview.model.GoviewProjectEntity;
import com.mortals.xhx.module.goview.service.GoviewProjectService; import com.mortals.xhx.module.goview.service.GoviewProjectService;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List; import java.util.*;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*; import static com.mortals.framework.ap.SysConstains.*;
...@@ -47,4 +47,36 @@ public class GoviewProjectController extends BaseCRUDJsonBodyMappingController<G ...@@ -47,4 +47,36 @@ public class GoviewProjectController extends BaseCRUDJsonBodyMappingController<G
} }
/**
* 发布为模板
* @param entity
* @return
*/
@PostMapping({"publish/masterplate"})
public String publishMasterplate(@RequestBody GoviewProjectEntity entity) {
Map<String, Object> model = new HashMap();
Context context = this.getContext();
String busiDesc = "发布模板";
int code=1;
try {
if(entity.getId()==null){
throw new AppException("项目ID不能为空");
}
service.publishMasterplate(entity.getId(), context);
model.put("id", entity.getId());
model.put("entity", entity);
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】 [id:" + entity.getId() + "]");
} catch (Exception var7) {
this.doException(this.request, busiDesc, model, var7);
model.put("entity", entity);
code = -1;
}
this.init(model, context);
JSONObject ret = new JSONObject();
ret.put("code", code);
ret.put("msg", model.remove("message_info"));
ret.put("data", model);
return ret.toJSONString();
}
} }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.goview.dao.ibatis.GoviewMasterplateDataDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="GoviewMasterplateDataEntity" id="GoviewMasterplateDataEntity-Map">
<id property="id" column="id" />
<result property="masterplateId" column="masterplateId" />
<result property="content" column="content" />
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('masterplateId') or colPickMode == 1 and data.containsKey('masterplateId')))">
a.masterplateId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('content') or colPickMode == 1 and data.containsKey('content')))">
a.content,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="GoviewMasterplateDataEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_goview_masterplate_data
(masterplateId,content,createUserId,createTime,updateUserId,updateTime)
VALUES
(#{masterplateId},#{content},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_goview_masterplate_data
(masterplateId,content,createUserId,createTime,updateUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.masterplateId},#{item.content},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
</foreach>
</insert>
<!-- 根据ParamDto更新 -->
<update id="update" parameterType="paramDto">
update mortals_xhx_goview_masterplate_data as a
set
<trim suffixOverrides="," suffix="">
<if test="(colPickMode==0 and data.containsKey('masterplateId')) or (colPickMode==1 and !data.containsKey('masterplateId'))">
a.masterplateId=#{data.masterplateId},
</if>
<if test="(colPickMode==0 and data.containsKey('masterplateIdIncrement')) or (colPickMode==1 and !data.containsKey('masterplateIdIncrement'))">
a.masterplateId=ifnull(a.masterplateId,0) + #{data.masterplateIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('content')) or (colPickMode==1 and !data.containsKey('content'))">
a.content=#{data.content},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
a.createUserId=#{data.createUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserIdIncrement')) or (colPickMode==1 and !data.containsKey('createUserIdIncrement'))">
a.createUserId=ifnull(a.createUserId,0) + #{data.createUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserId')) or (colPickMode==1 and !data.containsKey('updateUserId'))">
a.updateUserId=#{data.updateUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))">
a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</update>
<!-- 批量更新 -->
<update id="updateBatch" parameterType="paramDto">
update mortals_xhx_goview_masterplate_data as a
<trim prefix="set" suffixOverrides=",">
<trim prefix="masterplateId=(case" suffix="ELSE masterplateId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('masterplateId')) or (colPickMode==1 and !item.containsKey('masterplateId'))">
when a.id=#{item.id} then #{item.masterplateId}
</when>
<when test="(colPickMode==0 and item.containsKey('masterplateIdIncrement')) or (colPickMode==1 and !item.containsKey('masterplateIdIncrement'))">
when a.id=#{item.id} then ifnull(a.masterplateId,0) + #{item.masterplateIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.id=#{item.id} then #{item.updateUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</update>
<!-- 根据主健查询 -->
<select id="getByKey" parameterType="paramDto" resultMap="GoviewMasterplateDataEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_goview_masterplate_data as a
where a.id=#{condition.id}
</select>
<!-- 根据主健删除 -->
<delete id="deleteByKey" parameterType="paramDto">
delete a.* from mortals_xhx_goview_masterplate_data as a where a.id=#{condition.id}
</delete>
<!-- 根据主健删除一批,针对单一主健有效 -->
<delete id="deleteByKeys">
delete from mortals_xhx_goview_masterplate_data where id in
<foreach collection="array" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_xhx_goview_masterplate_data where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_xhx_goview_masterplate_data where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</delete>
<!-- 根据paramDto删除一批 -->
<delete id="deleteByMap" parameterType="paramDto">
delete a.* from mortals_xhx_goview_masterplate_data as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</delete>
<!-- 获取列表 -->
<select id="getList" parameterType="paramDto" resultMap="GoviewMasterplateDataEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_goview_masterplate_data as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
<include refid="_orderCols_"/>
</select>
<!-- 获取 -->
<select id="getListCount" parameterType="paramDto" resultType="int">
select count(1)
from mortals_xhx_goview_masterplate_data as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</select>
<!-- 条件映射 -->
<sql id="_condition_">
<if test="condition != null and !condition.isEmpty()">
<!-- 条件映射-普通条件 -->
<include refid="_condition_param_">
<property name="_conditionParam_" value="condition"/>
<property name="_conditionType_" value="and"/>
</include>
<!-- 条件映射-集合之间使用AND,集合中元素使用OR-(list[0].1 or list[0].2) and (list[1].3 or list[1].4) -->
<if test="condition.containsKey('andConditionList') and !condition.andConditionList.isEmpty()">
and
<foreach collection="condition.andConditionList" open="(" close=")" index="index" item="andCondition" separator=" and ">
<trim prefixOverrides="or" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="andCondition"/>
<property name="_conditionType_" value="or"/>
</include>
</trim>
</foreach>
</if>
<!-- 条件映射-集合之间使用OR,集合中元素使用AND-(list[0].1 and list[0].2) or (list[1].3 and list[1].4) -->
<if test="condition.containsKey('orConditionList') and !condition.orConditionList.isEmpty()">
and
<foreach collection="condition.orConditionList" open="(" close=")" index="index" item="orCondition" separator=" or ">
<trim prefixOverrides="and" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="orCondition"/>
<property name="_conditionType_" value="and"/>
</include>
</trim>
</foreach>
</if>
</if>
</sql>
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
</if>
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if>
<if test="conditionParamRef.containsKey('masterplateId')">
<if test="conditionParamRef.masterplateId != null ">
${_conditionType_} a.masterplateId = #{${_conditionParam_}.masterplateId}
</if>
<if test="conditionParamRef.masterplateId == null">
${_conditionType_} a.masterplateId is null
</if>
</if>
<if test="conditionParamRef.containsKey('masterplateIdList') and conditionParamRef.masterplateIdList.size() > 0">
${_conditionType_} a.masterplateId in
<foreach collection="conditionParamRef.masterplateIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('masterplateIdNotList') and conditionParamRef.masterplateIdNotList.size() > 0">
${_conditionType_} a.masterplateId not in
<foreach collection="conditionParamRef.masterplateIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('masterplateIdStart') and conditionParamRef.masterplateIdStart != null">
${_conditionType_} a.masterplateId <![CDATA[ >= ]]> #{${_conditionParam_}.masterplateIdStart}
</if>
<if test="conditionParamRef.containsKey('masterplateIdEnd') and conditionParamRef.masterplateIdEnd != null">
${_conditionType_} a.masterplateId <![CDATA[ <= ]]> #{${_conditionParam_}.masterplateIdEnd}
</if>
<if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if>
<if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateUserId')">
<if test="conditionParamRef.updateUserId != null ">
${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
</if>
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdNotList') and conditionParamRef.updateUserIdNotList.size() > 0">
${_conditionType_} a.updateUserId not in
<foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if>
<if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</if>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('masterplateId')">
a.masterplateId
<if test='orderCol.masterplateId != null and "DESC".equalsIgnoreCase(orderCol.masterplateId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('content')">
a.content
<if test='orderCol.content != null and "DESC".equalsIgnoreCase(orderCol.content)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')">
a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
<sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()">
GROUP BY
<trim suffixOverrides="," suffix="">
<foreach collection="groupList" open="" close="" index="index" item="item" separator=",">
${item}
</foreach>
</trim>
</if>
</sql>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.goview.dao.ibatis.GoviewMasterplateDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="GoviewMasterplateEntity" id="GoviewMasterplateEntity-Map">
<id property="id" column="id" />
<result property="masterplateName" column="masterplateName" />
<result property="customerId" column="customerId" />
<result property="state" column="state" />
<result property="indexImage" column="indexImage" />
<result property="remarks" column="remarks" />
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('masterplateName') or colPickMode == 1 and data.containsKey('masterplateName')))">
a.masterplateName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('customerId') or colPickMode == 1 and data.containsKey('customerId')))">
a.customerId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('state') or colPickMode == 1 and data.containsKey('state')))">
a.state,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('indexImage') or colPickMode == 1 and data.containsKey('indexImage')))">
a.indexImage,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remarks') or colPickMode == 1 and data.containsKey('remarks')))">
a.remarks,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="GoviewMasterplateEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_goview_masterplate
(masterplateName,customerId,state,indexImage,remarks,createUserId,createTime,updateUserId,updateTime)
VALUES
(#{masterplateName},#{customerId},#{state},#{indexImage},#{remarks},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_goview_masterplate
(masterplateName,customerId,state,indexImage,remarks,createUserId,createTime,updateUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.masterplateName},#{item.customerId},#{item.state},#{item.indexImage},#{item.remarks},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
</foreach>
</insert>
<!-- 根据ParamDto更新 -->
<update id="update" parameterType="paramDto">
update mortals_xhx_goview_masterplate as a
set
<trim suffixOverrides="," suffix="">
<if test="(colPickMode==0 and data.containsKey('masterplateName')) or (colPickMode==1 and !data.containsKey('masterplateName'))">
a.masterplateName=#{data.masterplateName},
</if>
<if test="(colPickMode==0 and data.containsKey('customerId')) or (colPickMode==1 and !data.containsKey('customerId'))">
a.customerId=#{data.customerId},
</if>
<if test="(colPickMode==0 and data.containsKey('customerIdIncrement')) or (colPickMode==1 and !data.containsKey('customerIdIncrement'))">
a.customerId=ifnull(a.customerId,0) + #{data.customerIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('state')) or (colPickMode==1 and !data.containsKey('state'))">
a.state=#{data.state},
</if>
<if test="(colPickMode==0 and data.containsKey('stateIncrement')) or (colPickMode==1 and !data.containsKey('stateIncrement'))">
a.state=ifnull(a.state,0) + #{data.stateIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('indexImage')) or (colPickMode==1 and !data.containsKey('indexImage'))">
a.indexImage=#{data.indexImage},
</if>
<if test="(colPickMode==0 and data.containsKey('remarks')) or (colPickMode==1 and !data.containsKey('remarks'))">
a.remarks=#{data.remarks},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
a.createUserId=#{data.createUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserIdIncrement')) or (colPickMode==1 and !data.containsKey('createUserIdIncrement'))">
a.createUserId=ifnull(a.createUserId,0) + #{data.createUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserId')) or (colPickMode==1 and !data.containsKey('updateUserId'))">
a.updateUserId=#{data.updateUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))">
a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</update>
<!-- 批量更新 -->
<update id="updateBatch" parameterType="paramDto">
update mortals_xhx_goview_masterplate as a
<trim prefix="set" suffixOverrides=",">
<trim prefix="masterplateName=(case" suffix="ELSE masterplateName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('masterplateName')) or (colPickMode==1 and !item.containsKey('masterplateName'))">
when a.id=#{item.id} then #{item.masterplateName}
</if>
</foreach>
</trim>
<trim prefix="customerId=(case" suffix="ELSE customerId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('customerId')) or (colPickMode==1 and !item.containsKey('customerId'))">
when a.id=#{item.id} then #{item.customerId}
</when>
<when test="(colPickMode==0 and item.containsKey('customerIdIncrement')) or (colPickMode==1 and !item.containsKey('customerIdIncrement'))">
when a.id=#{item.id} then ifnull(a.customerId,0) + #{item.customerIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="state=(case" suffix="ELSE state end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('state')) or (colPickMode==1 and !item.containsKey('state'))">
when a.id=#{item.id} then #{item.state}
</when>
<when test="(colPickMode==0 and item.containsKey('stateIncrement')) or (colPickMode==1 and !item.containsKey('stateIncrement'))">
when a.id=#{item.id} then ifnull(a.state,0) + #{item.stateIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="indexImage=(case" suffix="ELSE indexImage end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('indexImage')) or (colPickMode==1 and !item.containsKey('indexImage'))">
when a.id=#{item.id} then #{item.indexImage}
</if>
</foreach>
</trim>
<trim prefix="remarks=(case" suffix="ELSE remarks end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('remarks')) or (colPickMode==1 and !item.containsKey('remarks'))">
when a.id=#{item.id} then #{item.remarks}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.id=#{item.id} then #{item.updateUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</update>
<!-- 根据主健查询 -->
<select id="getByKey" parameterType="paramDto" resultMap="GoviewMasterplateEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_goview_masterplate as a
where a.id=#{condition.id}
</select>
<!-- 根据主健删除 -->
<delete id="deleteByKey" parameterType="paramDto">
delete a.* from mortals_xhx_goview_masterplate as a where a.id=#{condition.id}
</delete>
<!-- 根据主健删除一批,针对单一主健有效 -->
<delete id="deleteByKeys">
delete from mortals_xhx_goview_masterplate where id in
<foreach collection="array" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_xhx_goview_masterplate where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_xhx_goview_masterplate where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</delete>
<!-- 根据paramDto删除一批 -->
<delete id="deleteByMap" parameterType="paramDto">
delete a.* from mortals_xhx_goview_masterplate as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</delete>
<!-- 获取列表 -->
<select id="getList" parameterType="paramDto" resultMap="GoviewMasterplateEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_goview_masterplate as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
<include refid="_orderCols_"/>
</select>
<!-- 获取 -->
<select id="getListCount" parameterType="paramDto" resultType="int">
select count(1)
from mortals_xhx_goview_masterplate as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</select>
<!-- 条件映射 -->
<sql id="_condition_">
<if test="condition != null and !condition.isEmpty()">
<!-- 条件映射-普通条件 -->
<include refid="_condition_param_">
<property name="_conditionParam_" value="condition"/>
<property name="_conditionType_" value="and"/>
</include>
<!-- 条件映射-集合之间使用AND,集合中元素使用OR-(list[0].1 or list[0].2) and (list[1].3 or list[1].4) -->
<if test="condition.containsKey('andConditionList') and !condition.andConditionList.isEmpty()">
and
<foreach collection="condition.andConditionList" open="(" close=")" index="index" item="andCondition" separator=" and ">
<trim prefixOverrides="or" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="andCondition"/>
<property name="_conditionType_" value="or"/>
</include>
</trim>
</foreach>
</if>
<!-- 条件映射-集合之间使用OR,集合中元素使用AND-(list[0].1 and list[0].2) or (list[1].3 and list[1].4) -->
<if test="condition.containsKey('orConditionList') and !condition.orConditionList.isEmpty()">
and
<foreach collection="condition.orConditionList" open="(" close=")" index="index" item="orCondition" separator=" or ">
<trim prefixOverrides="and" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="orCondition"/>
<property name="_conditionType_" value="and"/>
</include>
</trim>
</foreach>
</if>
</if>
</sql>
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
</if>
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if>
<if test="conditionParamRef.containsKey('masterplateName')">
<if test="conditionParamRef.masterplateName != null and conditionParamRef.masterplateName != ''">
${_conditionType_} a.masterplateName like #{${_conditionParam_}.masterplateName}
</if>
<if test="conditionParamRef.masterplateName == null">
${_conditionType_} a.masterplateName is null
</if>
</if>
<if test="conditionParamRef.containsKey('masterplateNameList') and conditionParamRef.masterplateNameList.size() > 0">
${_conditionType_} a.masterplateName in
<foreach collection="conditionParamRef.masterplateNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('masterplateNameNotList') and conditionParamRef.masterplateNameNotList.size() > 0">
${_conditionType_} a.masterplateName not in
<foreach collection="conditionParamRef.masterplateNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('customerId')">
<if test="conditionParamRef.customerId != null ">
${_conditionType_} a.customerId = #{${_conditionParam_}.customerId}
</if>
<if test="conditionParamRef.customerId == null">
${_conditionType_} a.customerId is null
</if>
</if>
<if test="conditionParamRef.containsKey('customerIdList') and conditionParamRef.customerIdList.size() > 0">
${_conditionType_} a.customerId in
<foreach collection="conditionParamRef.customerIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('customerIdNotList') and conditionParamRef.customerIdNotList.size() > 0">
${_conditionType_} a.customerId not in
<foreach collection="conditionParamRef.customerIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('customerIdStart') and conditionParamRef.customerIdStart != null">
${_conditionType_} a.customerId <![CDATA[ >= ]]> #{${_conditionParam_}.customerIdStart}
</if>
<if test="conditionParamRef.containsKey('customerIdEnd') and conditionParamRef.customerIdEnd != null">
${_conditionType_} a.customerId <![CDATA[ <= ]]> #{${_conditionParam_}.customerIdEnd}
</if>
<if test="conditionParamRef.containsKey('state')">
<if test="conditionParamRef.state != null ">
${_conditionType_} a.state = #{${_conditionParam_}.state}
</if>
<if test="conditionParamRef.state == null">
${_conditionType_} a.state is null
</if>
</if>
<if test="conditionParamRef.containsKey('stateList') and conditionParamRef.stateList.size() > 0">
${_conditionType_} a.state in
<foreach collection="conditionParamRef.stateList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('stateNotList') and conditionParamRef.stateNotList.size() > 0">
${_conditionType_} a.state not in
<foreach collection="conditionParamRef.stateNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('stateStart') and conditionParamRef.stateStart != null">
${_conditionType_} a.state <![CDATA[ >= ]]> #{${_conditionParam_}.stateStart}
</if>
<if test="conditionParamRef.containsKey('stateEnd') and conditionParamRef.stateEnd != null">
${_conditionType_} a.state <![CDATA[ <= ]]> #{${_conditionParam_}.stateEnd}
</if>
<if test="conditionParamRef.containsKey('indexImage')">
<if test="conditionParamRef.indexImage != null and conditionParamRef.indexImage != ''">
${_conditionType_} a.indexImage like #{${_conditionParam_}.indexImage}
</if>
<if test="conditionParamRef.indexImage == null">
${_conditionType_} a.indexImage is null
</if>
</if>
<if test="conditionParamRef.containsKey('indexImageList') and conditionParamRef.indexImageList.size() > 0">
${_conditionType_} a.indexImage in
<foreach collection="conditionParamRef.indexImageList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('indexImageNotList') and conditionParamRef.indexImageNotList.size() > 0">
${_conditionType_} a.indexImage not in
<foreach collection="conditionParamRef.indexImageNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('remarks')">
<if test="conditionParamRef.remarks != null and conditionParamRef.remarks != ''">
${_conditionType_} a.remarks like #{${_conditionParam_}.remarks}
</if>
<if test="conditionParamRef.remarks == null">
${_conditionType_} a.remarks is null
</if>
</if>
<if test="conditionParamRef.containsKey('remarksList') and conditionParamRef.remarksList.size() > 0">
${_conditionType_} a.remarks in
<foreach collection="conditionParamRef.remarksList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('remarksNotList') and conditionParamRef.remarksNotList.size() > 0">
${_conditionType_} a.remarks not in
<foreach collection="conditionParamRef.remarksNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if>
<if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateUserId')">
<if test="conditionParamRef.updateUserId != null ">
${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
</if>
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdNotList') and conditionParamRef.updateUserIdNotList.size() > 0">
${_conditionType_} a.updateUserId not in
<foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if>
<if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</if>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('masterplateName')">
a.masterplateName
<if test='orderCol.masterplateName != null and "DESC".equalsIgnoreCase(orderCol.masterplateName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('customerId')">
a.customerId
<if test='orderCol.customerId != null and "DESC".equalsIgnoreCase(orderCol.customerId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('state')">
a.state
<if test='orderCol.state != null and "DESC".equalsIgnoreCase(orderCol.state)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('indexImage')">
a.indexImage
<if test='orderCol.indexImage != null and "DESC".equalsIgnoreCase(orderCol.indexImage)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('remarks')">
a.remarks
<if test='orderCol.remarks != null and "DESC".equalsIgnoreCase(orderCol.remarks)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')">
a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
<sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()">
GROUP BY
<trim suffixOverrides="," suffix="">
<foreach collection="groupList" open="" close="" index="index" item="item" separator=",">
${item}
</foreach>
</trim>
</if>
</sql>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment