Commit ce6e0c38 authored by 廖旭伟's avatar 廖旭伟

微信扫码登录手机登录等

parent e511a534
ALTER TABLE `mortals_xhx_customer` ADD COLUMN `openId` varchar(128) DEFAULT NULL COMMENT '微信openid';
ALTER TABLE `mortals_xhx_customer_work_design` MODIFY COLUMN `updateTime` datetime DEFAULT NULL COMMENT '更新时间';
ALTER TABLE `mortals_xhx_customer_work_design_stat` MODIFY COLUMN `updateTime` datetime DEFAULT NULL COMMENT '更新时间';
ALTER TABLE `mortals_xhx_customer_work_design` ADD COLUMN `designType` tinyint(2) NOT NULL DEFAULT '1' COMMENT '作品类型:1:图片,2:视频';
ALTER TABLE `mortals_xhx_design_masterplate` ADD COLUMN `designType` tinyint(2) NOT NULL DEFAULT '1' COMMENT '作品类型:1:图片,2:视频';
ALTER TABLE `mortals_xhx_customer_work_collect` ADD COLUMN `designType` tinyint(2) NOT NULL DEFAULT '1' COMMENT '作品类型:1:图片,2:视频';
......@@ -59,10 +59,10 @@
<profiles.active>product</profiles.active>
<profiles.server.port>19211</profiles.server.port>
<profiles.queue.type>rabbitmq</profiles.queue.type>
<profiles.kafka.brokers>192.168.0.100:9092</profiles.kafka.brokers>
<profiles.rabbitmq.host>192.168.0.100</profiles.rabbitmq.host>
<profiles.kafka.brokers>127.0.0.1:9092</profiles.kafka.brokers>
<profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.nacos.server-addr>192.168.0.100:8848</profiles.nacos.server-addr>
<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>stp</profiles.nacos.namespace>
<profiles.log.level>info</profiles.log.level>
......
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 设计类型
*/
public enum DesignTypeEnum implements IBaseEnum {
PICTURES(1,"图片", SysConstains.STYLE_DEFAULT),
VIDEOS(2,"视频", SysConstains.STYLE_DEFAULT),
;
private int value;
private String desc;
private String style;
DesignTypeEnum(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
@Override
public String getDesc() {
return this.desc;
}
@Override
public String getStyle() {
return this.style;
}
public static DesignTypeEnum getByValue(int value) {
for (DesignTypeEnum e : DesignTypeEnum.values()) {
if (e.getValue() == value) {
return e;
}
}
return null;
}
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (DesignTypeEnum item : DesignTypeEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
\ No newline at end of file
......@@ -93,7 +93,10 @@ public class CustomerEntity extends CustomerVo implements IUser {
*/
private String lastLoginAddress;
/**
* 微信openid
*/
private String openId;
public CustomerEntity(){}
/**
......@@ -330,8 +333,13 @@ public class CustomerEntity extends CustomerVo implements IUser {
this.lastLoginAddress = lastLoginAddress;
}
public String getOpenId() {
return openId;
}
public void setOpenId(String openId) {
this.openId = openId;
}
@Override
public int hashCode() {
......
......@@ -7,7 +7,7 @@ import com.mortals.xhx.module.customer.model.CustomerEntity;
* 客户管理查询对象
*
* @author zxfei
* @date 2022-07-01
* @date 2023-05-26
*/
public class CustomerQuery extends CustomerEntity {
/** 开始 主键ID,主键,自增长 */
......@@ -22,12 +22,19 @@ public class CustomerQuery extends CustomerEntity {
/** 主键ID,主键,自增长列表 */
private List <Long> idList;
/** 主键ID,主键,自增长排除列表 */
private List <Long> idNotList;
/** 用户登录账号 */
private List<String> loginNameList;
/** 用户登录账号排除列表 */
private List <String> loginNameNotList;
/** 密码 */
private List<String> passwordList;
/** 密码排除列表 */
private List <String> passwordNotList;
/** 开始 会员等级,,0:未开启,1:试用客户,2:VIP,3:设计师,默认0 */
private Integer memberLevelStart;
......@@ -40,18 +47,29 @@ public class CustomerQuery extends CustomerEntity {
/** 会员等级,,0:未开启,1:试用客户,2:VIP,3:设计师,默认0列表 */
private List <Integer> memberLevelList;
/** 会员等级,,0:未开启,1:试用客户,2:VIP,3:设计师,默认0排除列表 */
private List <Integer> memberLevelNotList;
/** 客户真实名称 */
private List<String> custNameList;
/** 客户真实名称排除列表 */
private List <String> custNameNotList;
/** 单位名称 */
private List<String> organizationList;
/** 单位名称排除列表 */
private List <String> organizationNotList;
/** 联系电话 */
private List<String> contactTelphoneList;
/** 联系电话排除列表 */
private List <String> contactTelphoneNotList;
/** 企业顾问 */
private List<String> enterpriseConsultantList;
/** 企业顾问排除列表 */
private List <String> enterpriseConsultantNotList;
/** 开始 站点ID */
private Long siteIdStart;
......@@ -64,6 +82,9 @@ public class CustomerQuery extends CustomerEntity {
/** 站点ID列表 */
private List <Long> siteIdList;
/** 站点ID排除列表 */
private List <Long> siteIdNotList;
/** 开始 性别 */
private Integer sexStart;
......@@ -76,15 +97,24 @@ public class CustomerQuery extends CustomerEntity {
/** 性别列表 */
private List <Integer> sexList;
/** 性别排除列表 */
private List <Integer> sexNotList;
/** 邮箱 */
private List<String> mailboxList;
/** 邮箱排除列表 */
private List <String> mailboxNotList;
/** 职位 */
private List<String> jobList;
/** 职位排除列表 */
private List <String> jobNotList;
/** 头像图片地址 */
private List<String> avatarList;
/** 头像图片地址排除列表 */
private List <String> avatarNotList;
/** 开始 客户来源 */
private Long customerSrcStart;
......@@ -97,6 +127,9 @@ public class CustomerQuery extends CustomerEntity {
/** 客户来源列表 */
private List <Long> customerSrcList;
/** 客户来源排除列表 */
private List <Long> customerSrcNotList;
/** 开始 使用状态,1:正常,0:禁用,默认:0 */
private Integer statusStart;
......@@ -109,6 +142,9 @@ public class CustomerQuery extends CustomerEntity {
/** 使用状态,1:正常,0:禁用,默认:0列表 */
private List <Integer> statusList;
/** 使用状态,1:正常,0:禁用,默认:0排除列表 */
private List <Integer> statusNotList;
/** 开始 创建用户 */
private Long createUserIdStart;
......@@ -121,6 +157,9 @@ public class CustomerQuery extends CustomerEntity {
/** 创建用户列表 */
private List <Long> createUserIdList;
/** 创建用户排除列表 */
private List <Long> createUserIdNotList;
/** 开始 注册时间 */
private String createTimeStart;
......@@ -142,6 +181,13 @@ public class CustomerQuery extends CustomerEntity {
/** 最后一次登录地址 */
private List<String> lastLoginAddressList;
/** 最后一次登录地址排除列表 */
private List <String> lastLoginAddressNotList;
/** 微信openid */
private List<String> openIdList;
/** 微信openid排除列表 */
private List <String> openIdNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<CustomerQuery> orConditionList;
......@@ -214,6 +260,23 @@ public class CustomerQuery extends CustomerEntity {
this.idList = idList;
}
/**
* 获取 主键ID,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 用户登录账号
* @return loginNameList
......@@ -229,6 +292,23 @@ public class CustomerQuery extends CustomerEntity {
public void setLoginNameList(List<String> loginNameList){
this.loginNameList = loginNameList;
}
/**
* 获取 用户登录账号
* @return loginNameNotList
*/
public List<String> getLoginNameNotList(){
return this.loginNameNotList;
}
/**
* 设置 用户登录账号
* @param loginNameNotList
*/
public void setLoginNameNotList(List<String> loginNameNotList){
this.loginNameNotList = loginNameNotList;
}
/**
* 获取 密码
* @return passwordList
......@@ -244,6 +324,23 @@ public class CustomerQuery extends CustomerEntity {
public void setPasswordList(List<String> passwordList){
this.passwordList = passwordList;
}
/**
* 获取 密码
* @return passwordNotList
*/
public List<String> getPasswordNotList(){
return this.passwordNotList;
}
/**
* 设置 密码
* @param passwordNotList
*/
public void setPasswordNotList(List<String> passwordNotList){
this.passwordNotList = passwordNotList;
}
/**
* 获取 开始 会员等级,,0:未开启,1:试用客户,2:VIP,3:设计师,默认0
* @return memberLevelStart
......@@ -308,6 +405,23 @@ public class CustomerQuery extends CustomerEntity {
this.memberLevelList = memberLevelList;
}
/**
* 获取 会员等级,,0:未开启,1:试用客户,2:VIP,3:设计师,默认0
* @return memberLevelNotList
*/
public List<Integer> getMemberLevelNotList(){
return this.memberLevelNotList;
}
/**
* 设置 会员等级,,0:未开启,1:试用客户,2:VIP,3:设计师,默认0
* @param memberLevelNotList
*/
public void setMemberLevelNotList(List<Integer> memberLevelNotList){
this.memberLevelNotList = memberLevelNotList;
}
/**
* 获取 客户真实名称
* @return custNameList
......@@ -323,6 +437,23 @@ public class CustomerQuery extends CustomerEntity {
public void setCustNameList(List<String> custNameList){
this.custNameList = custNameList;
}
/**
* 获取 客户真实名称
* @return custNameNotList
*/
public List<String> getCustNameNotList(){
return this.custNameNotList;
}
/**
* 设置 客户真实名称
* @param custNameNotList
*/
public void setCustNameNotList(List<String> custNameNotList){
this.custNameNotList = custNameNotList;
}
/**
* 获取 单位名称
* @return organizationList
......@@ -338,6 +469,23 @@ public class CustomerQuery extends CustomerEntity {
public void setOrganizationList(List<String> organizationList){
this.organizationList = organizationList;
}
/**
* 获取 单位名称
* @return organizationNotList
*/
public List<String> getOrganizationNotList(){
return this.organizationNotList;
}
/**
* 设置 单位名称
* @param organizationNotList
*/
public void setOrganizationNotList(List<String> organizationNotList){
this.organizationNotList = organizationNotList;
}
/**
* 获取 联系电话
* @return contactTelphoneList
......@@ -353,6 +501,23 @@ public class CustomerQuery extends CustomerEntity {
public void setContactTelphoneList(List<String> contactTelphoneList){
this.contactTelphoneList = contactTelphoneList;
}
/**
* 获取 联系电话
* @return contactTelphoneNotList
*/
public List<String> getContactTelphoneNotList(){
return this.contactTelphoneNotList;
}
/**
* 设置 联系电话
* @param contactTelphoneNotList
*/
public void setContactTelphoneNotList(List<String> contactTelphoneNotList){
this.contactTelphoneNotList = contactTelphoneNotList;
}
/**
* 获取 企业顾问
* @return enterpriseConsultantList
......@@ -368,6 +533,23 @@ public class CustomerQuery extends CustomerEntity {
public void setEnterpriseConsultantList(List<String> enterpriseConsultantList){
this.enterpriseConsultantList = enterpriseConsultantList;
}
/**
* 获取 企业顾问
* @return enterpriseConsultantNotList
*/
public List<String> getEnterpriseConsultantNotList(){
return this.enterpriseConsultantNotList;
}
/**
* 设置 企业顾问
* @param enterpriseConsultantNotList
*/
public void setEnterpriseConsultantNotList(List<String> enterpriseConsultantNotList){
this.enterpriseConsultantNotList = enterpriseConsultantNotList;
}
/**
* 获取 开始 站点ID
* @return siteIdStart
......@@ -432,6 +614,23 @@ public class CustomerQuery extends CustomerEntity {
this.siteIdList = siteIdList;
}
/**
* 获取 站点ID
* @return siteIdNotList
*/
public List<Long> getSiteIdNotList(){
return this.siteIdNotList;
}
/**
* 设置 站点ID
* @param siteIdNotList
*/
public void setSiteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
}
/**
* 获取 开始 性别
* @return sexStart
......@@ -496,6 +695,23 @@ public class CustomerQuery extends CustomerEntity {
this.sexList = sexList;
}
/**
* 获取 性别
* @return sexNotList
*/
public List<Integer> getSexNotList(){
return this.sexNotList;
}
/**
* 设置 性别
* @param sexNotList
*/
public void setSexNotList(List<Integer> sexNotList){
this.sexNotList = sexNotList;
}
/**
* 获取 邮箱
* @return mailboxList
......@@ -511,6 +727,23 @@ public class CustomerQuery extends CustomerEntity {
public void setMailboxList(List<String> mailboxList){
this.mailboxList = mailboxList;
}
/**
* 获取 邮箱
* @return mailboxNotList
*/
public List<String> getMailboxNotList(){
return this.mailboxNotList;
}
/**
* 设置 邮箱
* @param mailboxNotList
*/
public void setMailboxNotList(List<String> mailboxNotList){
this.mailboxNotList = mailboxNotList;
}
/**
* 获取 职位
* @return jobList
......@@ -526,6 +759,23 @@ public class CustomerQuery extends CustomerEntity {
public void setJobList(List<String> jobList){
this.jobList = jobList;
}
/**
* 获取 职位
* @return jobNotList
*/
public List<String> getJobNotList(){
return this.jobNotList;
}
/**
* 设置 职位
* @param jobNotList
*/
public void setJobNotList(List<String> jobNotList){
this.jobNotList = jobNotList;
}
/**
* 获取 头像图片地址
* @return avatarList
......@@ -541,6 +791,23 @@ public class CustomerQuery extends CustomerEntity {
public void setAvatarList(List<String> avatarList){
this.avatarList = avatarList;
}
/**
* 获取 头像图片地址
* @return avatarNotList
*/
public List<String> getAvatarNotList(){
return this.avatarNotList;
}
/**
* 设置 头像图片地址
* @param avatarNotList
*/
public void setAvatarNotList(List<String> avatarNotList){
this.avatarNotList = avatarNotList;
}
/**
* 获取 开始 客户来源
* @return customerSrcStart
......@@ -605,6 +872,23 @@ public class CustomerQuery extends CustomerEntity {
this.customerSrcList = customerSrcList;
}
/**
* 获取 客户来源
* @return customerSrcNotList
*/
public List<Long> getCustomerSrcNotList(){
return this.customerSrcNotList;
}
/**
* 设置 客户来源
* @param customerSrcNotList
*/
public void setCustomerSrcNotList(List<Long> customerSrcNotList){
this.customerSrcNotList = customerSrcNotList;
}
/**
* 获取 开始 使用状态,1:正常,0:禁用,默认:0
* @return statusStart
......@@ -669,6 +953,23 @@ public class CustomerQuery extends CustomerEntity {
this.statusList = statusList;
}
/**
* 获取 使用状态,1:正常,0:禁用,默认:0
* @return statusNotList
*/
public List<Integer> getStatusNotList(){
return this.statusNotList;
}
/**
* 设置 使用状态,1:正常,0:禁用,默认:0
* @param statusNotList
*/
public void setStatusNotList(List<Integer> statusNotList){
this.statusNotList = statusNotList;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
......@@ -733,6 +1034,23 @@ public class CustomerQuery extends CustomerEntity {
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
......@@ -844,6 +1162,55 @@ public class CustomerQuery extends CustomerEntity {
public void setLastLoginAddressList(List<String> lastLoginAddressList){
this.lastLoginAddressList = lastLoginAddressList;
}
/**
* 获取 最后一次登录地址
* @return lastLoginAddressNotList
*/
public List<String> getLastLoginAddressNotList(){
return this.lastLoginAddressNotList;
}
/**
* 设置 最后一次登录地址
* @param lastLoginAddressNotList
*/
public void setLastLoginAddressNotList(List<String> lastLoginAddressNotList){
this.lastLoginAddressNotList = lastLoginAddressNotList;
}
/**
* 获取 微信openid
* @return openIdList
*/
public List<String> getOpenIdList(){
return this.openIdList;
}
/**
* 设置 微信openid
* @param openIdList
*/
public void setOpenIdList(List<String> openIdList){
this.openIdList = openIdList;
}
/**
* 获取 微信openid
* @return openIdNotList
*/
public List<String> getOpenIdNotList(){
return this.openIdNotList;
}
/**
* 设置 微信openid
* @param openIdNotList
*/
public void setOpenIdNotList(List<String> openIdNotList){
this.openIdNotList = openIdNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param id
......@@ -889,6 +1256,15 @@ public class CustomerQuery extends CustomerEntity {
return this;
}
/**
* 设置 主键ID,主键,自增长
* @param idNotList
*/
public CustomerQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/**
* 设置 用户登录账号
......@@ -972,6 +1348,15 @@ public class CustomerQuery extends CustomerEntity {
return this;
}
/**
* 设置 会员等级,,0:未开启,1:试用客户,2:VIP,3:设计师,默认0
* @param memberLevelNotList
*/
public CustomerQuery memberLevelNotList(List<Integer> memberLevelNotList){
this.memberLevelNotList = memberLevelNotList;
return this;
}
/**
* 设置 客户真实名称
......@@ -1093,6 +1478,15 @@ public class CustomerQuery extends CustomerEntity {
return this;
}
/**
* 设置 站点ID
* @param siteIdNotList
*/
public CustomerQuery siteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
return this;
}
/**
* 设置 性别
* @param sex
......@@ -1138,6 +1532,15 @@ public class CustomerQuery extends CustomerEntity {
return this;
}
/**
* 设置 性别
* @param sexNotList
*/
public CustomerQuery sexNotList(List<Integer> sexNotList){
this.sexNotList = sexNotList;
return this;
}
/**
* 设置 邮箱
......@@ -1240,6 +1643,15 @@ public class CustomerQuery extends CustomerEntity {
return this;
}
/**
* 设置 客户来源
* @param customerSrcNotList
*/
public CustomerQuery customerSrcNotList(List<Long> customerSrcNotList){
this.customerSrcNotList = customerSrcNotList;
return this;
}
/**
* 设置 使用状态,1:正常,0:禁用,默认:0
* @param status
......@@ -1285,6 +1697,15 @@ public class CustomerQuery extends CustomerEntity {
return this;
}
/**
* 设置 使用状态,1:正常,0:禁用,默认:0
* @param statusNotList
*/
public CustomerQuery statusNotList(List<Integer> statusNotList){
this.statusNotList = statusNotList;
return this;
}
/**
* 设置 创建用户
* @param createUserId
......@@ -1330,6 +1751,15 @@ public class CustomerQuery extends CustomerEntity {
return this;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public CustomerQuery createUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
return this;
}
......@@ -1352,6 +1782,25 @@ public class CustomerQuery extends CustomerEntity {
return this;
}
/**
* 设置 微信openid
* @param openId
*/
public CustomerQuery openId(String openId){
setOpenId(openId);
return this;
}
/**
* 设置 微信openid
* @param openIdList
*/
public CustomerQuery openIdList(List<String> openIdList){
this.openIdList = openIdList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
package com.mortals.xhx.module.customer.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.customer.model.vo.CustomerWorkCollectVo;
import lombok.Data;
/**
* 客户收藏信息实体对象
*
* @author zxfei
* @date 2022-06-13
*/
* 客户收藏信息实体对象
*
* @author zxfei
* @date 2023-07-11
*/
@Data
public class CustomerWorkCollectEntity extends CustomerWorkCollectVo {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
* 客户ID
*/
private Long customerId;
/**
* 模版ID
*/
* 模版ID
*/
private Long masterplateId;
public CustomerWorkCollectEntity(){}
/**
* 获取 客户ID
* @return Long
*/
public Long getCustomerId(){
return customerId;
}
/**
* 设置 客户ID
* @param customerId
*/
public void setCustomerId(Long customerId){
this.customerId = customerId;
}
/**
* 获取 模版ID
* @return Long
*/
public Long getMasterplateId(){
return masterplateId;
}
/**
* 设置 模版ID
* @param masterplateId
*/
public void setMasterplateId(Long masterplateId){
this.masterplateId = masterplateId;
}
* 作品类型:1:图片,2:视频
*/
private Integer designType;
@Override
public int hashCode() {
return this.getId().hashCode();
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
......@@ -70,23 +38,18 @@ public class CustomerWorkCollectEntity extends CustomerWorkCollectVo {
if (obj instanceof CustomerWorkCollectEntity) {
CustomerWorkCollectEntity tmp = (CustomerWorkCollectEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",customerId:").append(getCustomerId());
sb.append(",masterplateId:").append(getMasterplateId());
return sb.toString();
}
public void initAttrValue(){
this.customerId = null;
this.customerId = null;
this.masterplateId = -1L;
this.masterplateId = null;
this.designType = 1;
}
}
\ No newline at end of file
......@@ -3,11 +3,11 @@ package com.mortals.xhx.module.customer.model;
import java.util.List;
import com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity;
/**
* 客户收藏信息查询对象
*
* @author zxfei
* @date 2022-06-13
*/
* 客户收藏信息查询对象
*
* @author zxfei
* @date 2023-07-11
*/
public class CustomerWorkCollectQuery extends CustomerWorkCollectEntity {
/** 开始 主键ID,主键,自增长 */
private Long idStart;
......@@ -21,6 +21,9 @@ public class CustomerWorkCollectQuery extends CustomerWorkCollectEntity {
/** 主键ID,主键,自增长列表 */
private List <Long> idList;
/** 主键ID,主键,自增长排除列表 */
private List <Long> idNotList;
/** 开始 客户ID */
private Long customerIdStart;
......@@ -33,6 +36,9 @@ public class CustomerWorkCollectQuery extends CustomerWorkCollectEntity {
/** 客户ID列表 */
private List <Long> customerIdList;
/** 客户ID排除列表 */
private List <Long> customerIdNotList;
/** 开始 模版ID */
private Long masterplateIdStart;
......@@ -45,12 +51,30 @@ public class CustomerWorkCollectQuery extends CustomerWorkCollectEntity {
/** 模版ID列表 */
private List <Long> masterplateIdList;
/** 模版ID排除列表 */
private List <Long> masterplateIdNotList;
/** 开始 收藏时间 */
private String createTimeStart;
/** 结束 收藏时间 */
private String createTimeEnd;
/** 开始 作品类型:1:图片,2:视频 */
private Integer designTypeStart;
/** 结束 作品类型:1:图片,2:视频 */
private Integer designTypeEnd;
/** 增加 作品类型:1:图片,2:视频 */
private Integer designTypeIncrement;
/** 作品类型:1:图片,2:视频列表 */
private List <Integer> designTypeList;
/** 作品类型:1:图片,2:视频排除列表 */
private List <Integer> designTypeNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<CustomerWorkCollectQuery> orConditionList;
......@@ -60,393 +84,606 @@ public class CustomerWorkCollectQuery extends CustomerWorkCollectEntity {
public CustomerWorkCollectQuery(){}
/**
* 获取 开始 主键ID,主键,自增长
* @return idStart
*/
* 获取 开始 主键ID,主键,自增长
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 主键ID,主键,自增长
* @return $idEnd
*/
* 获取 结束 主键ID,主键,自增长
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 主键ID,主键,自增长
* @return idIncrement
*/
* 获取 增加 主键ID,主键,自增长
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 主键ID,主键,自增长
* @return idList
*/
* 获取 主键ID,主键,自增长
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 主键ID,主键,自增长
* @param idList
*/
* 设置 主键ID,主键,自增长
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 开始 客户ID
* @return customerIdStart
*/
* 获取 主键ID,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 开始 客户ID
* @return customerIdStart
*/
public Long getCustomerIdStart(){
return this.customerIdStart;
}
/**
* 设置 开始 客户ID
* @param customerIdStart
*/
* 设置 开始 客户ID
* @param customerIdStart
*/
public void setCustomerIdStart(Long customerIdStart){
this.customerIdStart = customerIdStart;
}
/**
* 获取 结束 客户ID
* @return $customerIdEnd
*/
* 获取 结束 客户ID
* @return $customerIdEnd
*/
public Long getCustomerIdEnd(){
return this.customerIdEnd;
}
/**
* 设置 结束 客户ID
* @param customerIdEnd
*/
* 设置 结束 客户ID
* @param customerIdEnd
*/
public void setCustomerIdEnd(Long customerIdEnd){
this.customerIdEnd = customerIdEnd;
}
/**
* 获取 增加 客户ID
* @return customerIdIncrement
*/
* 获取 增加 客户ID
* @return customerIdIncrement
*/
public Long getCustomerIdIncrement(){
return this.customerIdIncrement;
}
/**
* 设置 增加 客户ID
* @param customerIdIncrement
*/
* 设置 增加 客户ID
* @param customerIdIncrement
*/
public void setCustomerIdIncrement(Long customerIdIncrement){
this.customerIdIncrement = customerIdIncrement;
}
/**
* 获取 客户ID
* @return customerIdList
*/
* 获取 客户ID
* @return customerIdList
*/
public List<Long> getCustomerIdList(){
return this.customerIdList;
}
/**
* 设置 客户ID
* @param customerIdList
*/
* 设置 客户ID
* @param customerIdList
*/
public void setCustomerIdList(List<Long> customerIdList){
this.customerIdList = customerIdList;
}
/**
* 获取 开始 模版ID
* @return masterplateIdStart
*/
* 获取 客户ID
* @return customerIdNotList
*/
public List<Long> getCustomerIdNotList(){
return this.customerIdNotList;
}
/**
* 设置 客户ID
* @param customerIdNotList
*/
public void setCustomerIdNotList(List<Long> customerIdNotList){
this.customerIdNotList = customerIdNotList;
}
/**
* 获取 开始 模版ID
* @return masterplateIdStart
*/
public Long getMasterplateIdStart(){
return this.masterplateIdStart;
}
/**
* 设置 开始 模版ID
* @param masterplateIdStart
*/
* 设置 开始 模版ID
* @param masterplateIdStart
*/
public void setMasterplateIdStart(Long masterplateIdStart){
this.masterplateIdStart = masterplateIdStart;
}
/**
* 获取 结束 模版ID
* @return $masterplateIdEnd
*/
* 获取 结束 模版ID
* @return $masterplateIdEnd
*/
public Long getMasterplateIdEnd(){
return this.masterplateIdEnd;
}
/**
* 设置 结束 模版ID
* @param masterplateIdEnd
*/
* 设置 结束 模版ID
* @param masterplateIdEnd
*/
public void setMasterplateIdEnd(Long masterplateIdEnd){
this.masterplateIdEnd = masterplateIdEnd;
}
/**
* 获取 增加 模版ID
* @return masterplateIdIncrement
*/
* 获取 增加 模版ID
* @return masterplateIdIncrement
*/
public Long getMasterplateIdIncrement(){
return this.masterplateIdIncrement;
}
/**
* 设置 增加 模版ID
* @param masterplateIdIncrement
*/
* 设置 增加 模版ID
* @param masterplateIdIncrement
*/
public void setMasterplateIdIncrement(Long masterplateIdIncrement){
this.masterplateIdIncrement = masterplateIdIncrement;
}
/**
* 获取 模版ID
* @return masterplateIdList
*/
* 获取 模版ID
* @return masterplateIdList
*/
public List<Long> getMasterplateIdList(){
return this.masterplateIdList;
}
/**
* 设置 模版ID
* @param masterplateIdList
*/
* 设置 模版ID
* @param masterplateIdList
*/
public void setMasterplateIdList(List<Long> masterplateIdList){
this.masterplateIdList = masterplateIdList;
}
/**
* 获取 开始 收藏时间
* @return createTimeStart
*/
* 获取 模版ID
* @return masterplateIdNotList
*/
public List<Long> getMasterplateIdNotList(){
return this.masterplateIdNotList;
}
/**
* 设置 模版ID
* @param masterplateIdNotList
*/
public void setMasterplateIdNotList(List<Long> masterplateIdNotList){
this.masterplateIdNotList = masterplateIdNotList;
}
/**
* 获取 开始 收藏时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 收藏时间
* @param createTimeStart
*/
* 设置 开始 收藏时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 收藏时间
* @return createTimeEnd
*/
* 获取 结束 收藏时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 收藏时间
* @param createTimeEnd
*/
* 设置 结束 收藏时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 设置 主键ID,主键,自增长
* @param id
*/
* 获取 开始 作品类型:1:图片,2:视频
* @return designTypeStart
*/
public Integer getDesignTypeStart(){
return this.designTypeStart;
}
/**
* 设置 开始 作品类型:1:图片,2:视频
* @param designTypeStart
*/
public void setDesignTypeStart(Integer designTypeStart){
this.designTypeStart = designTypeStart;
}
/**
* 获取 结束 作品类型:1:图片,2:视频
* @return $designTypeEnd
*/
public Integer getDesignTypeEnd(){
return this.designTypeEnd;
}
/**
* 设置 结束 作品类型:1:图片,2:视频
* @param designTypeEnd
*/
public void setDesignTypeEnd(Integer designTypeEnd){
this.designTypeEnd = designTypeEnd;
}
/**
* 获取 增加 作品类型:1:图片,2:视频
* @return designTypeIncrement
*/
public Integer getDesignTypeIncrement(){
return this.designTypeIncrement;
}
/**
* 设置 增加 作品类型:1:图片,2:视频
* @param designTypeIncrement
*/
public void setDesignTypeIncrement(Integer designTypeIncrement){
this.designTypeIncrement = designTypeIncrement;
}
/**
* 获取 作品类型:1:图片,2:视频
* @return designTypeList
*/
public List<Integer> getDesignTypeList(){
return this.designTypeList;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designTypeList
*/
public void setDesignTypeList(List<Integer> designTypeList){
this.designTypeList = designTypeList;
}
/**
* 获取 作品类型:1:图片,2:视频
* @return designTypeNotList
*/
public List<Integer> getDesignTypeNotList(){
return this.designTypeNotList;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designTypeNotList
*/
public void setDesignTypeNotList(List<Integer> designTypeNotList){
this.designTypeNotList = designTypeNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param id
*/
public CustomerWorkCollectQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
setId(id);
return this;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
public CustomerWorkCollectQuery idStart(Long idStart){
this.idStart = idStart;
return this;
this.idStart = idStart;
return this;
}
/**
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
public CustomerWorkCollectQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
public CustomerWorkCollectQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 主键ID,主键,自增长
* @param idList
*/
* 设置 主键ID,主键,自增长
* @param idList
*/
public CustomerWorkCollectQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
return this;
}
/**
* 设置 客户ID
* @param customerId
*/
* 设置 主键ID,主键,自增长
* @param idNotList
*/
public CustomerWorkCollectQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/**
* 设置 客户ID
* @param customerId
*/
public CustomerWorkCollectQuery customerId(Long customerId){
setCustomerId(customerId);
return this;
}
/**
* 设置 开始 客户ID
* @param customerIdStart
*/
setCustomerId(customerId);
return this;
}
/**
* 设置 开始 客户ID
* @param customerIdStart
*/
public CustomerWorkCollectQuery customerIdStart(Long customerIdStart){
this.customerIdStart = customerIdStart;
return this;
this.customerIdStart = customerIdStart;
return this;
}
/**
* 设置 结束 客户ID
* @param customerIdEnd
*/
* 设置 结束 客户ID
* @param customerIdEnd
*/
public CustomerWorkCollectQuery customerIdEnd(Long customerIdEnd){
this.customerIdEnd = customerIdEnd;
return this;
this.customerIdEnd = customerIdEnd;
return this;
}
/**
* 设置 增加 客户ID
* @param customerIdIncrement
*/
* 设置 增加 客户ID
* @param customerIdIncrement
*/
public CustomerWorkCollectQuery customerIdIncrement(Long customerIdIncrement){
this.customerIdIncrement = customerIdIncrement;
return this;
this.customerIdIncrement = customerIdIncrement;
return this;
}
/**
* 设置 客户ID
* @param customerIdList
*/
* 设置 客户ID
* @param customerIdList
*/
public CustomerWorkCollectQuery customerIdList(List<Long> customerIdList){
this.customerIdList = customerIdList;
return this;
}
return this;
}
/**
* 设置 客户ID
* @param customerIdNotList
*/
public CustomerWorkCollectQuery customerIdNotList(List<Long> customerIdNotList){
this.customerIdNotList = customerIdNotList;
return this;
}
/**
* 设置 模版ID
* @param masterplateId
*/
* 设置 模版ID
* @param masterplateId
*/
public CustomerWorkCollectQuery masterplateId(Long masterplateId){
setMasterplateId(masterplateId);
return this;
}
/**
* 设置 开始 模版ID
* @param masterplateIdStart
*/
setMasterplateId(masterplateId);
return this;
}
/**
* 设置 开始 模版ID
* @param masterplateIdStart
*/
public CustomerWorkCollectQuery masterplateIdStart(Long masterplateIdStart){
this.masterplateIdStart = masterplateIdStart;
return this;
this.masterplateIdStart = masterplateIdStart;
return this;
}
/**
* 设置 结束 模版ID
* @param masterplateIdEnd
*/
* 设置 结束 模版ID
* @param masterplateIdEnd
*/
public CustomerWorkCollectQuery masterplateIdEnd(Long masterplateIdEnd){
this.masterplateIdEnd = masterplateIdEnd;
return this;
this.masterplateIdEnd = masterplateIdEnd;
return this;
}
/**
* 设置 增加 模版ID
* @param masterplateIdIncrement
*/
* 设置 增加 模版ID
* @param masterplateIdIncrement
*/
public CustomerWorkCollectQuery masterplateIdIncrement(Long masterplateIdIncrement){
this.masterplateIdIncrement = masterplateIdIncrement;
return this;
this.masterplateIdIncrement = masterplateIdIncrement;
return this;
}
/**
* 设置 模版ID
* @param masterplateIdList
*/
* 设置 模版ID
* @param masterplateIdList
*/
public CustomerWorkCollectQuery masterplateIdList(List<Long> masterplateIdList){
this.masterplateIdList = masterplateIdList;
return this;
}
return this;
}
/**
* 设置 模版ID
* @param masterplateIdNotList
*/
public CustomerWorkCollectQuery masterplateIdNotList(List<Long> masterplateIdNotList){
this.masterplateIdNotList = masterplateIdNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
* 设置 作品类型:1:图片,2:视频
* @param designType
*/
public CustomerWorkCollectQuery designType(Integer designType){
setDesignType(designType);
return this;
}
/**
* 设置 开始 作品类型:1:图片,2:视频
* @param designTypeStart
*/
public CustomerWorkCollectQuery designTypeStart(Integer designTypeStart){
this.designTypeStart = designTypeStart;
return this;
}
/**
* 设置 结束 作品类型:1:图片,2:视频
* @param designTypeEnd
*/
public CustomerWorkCollectQuery designTypeEnd(Integer designTypeEnd){
this.designTypeEnd = designTypeEnd;
return this;
}
/**
* 设置 增加 作品类型:1:图片,2:视频
* @param designTypeIncrement
*/
public CustomerWorkCollectQuery designTypeIncrement(Integer designTypeIncrement){
this.designTypeIncrement = designTypeIncrement;
return this;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designTypeList
*/
public CustomerWorkCollectQuery designTypeList(List<Integer> designTypeList){
this.designTypeList = designTypeList;
return this;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designTypeNotList
*/
public CustomerWorkCollectQuery designTypeNotList(List<Integer> designTypeNotList){
this.designTypeNotList = designTypeNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<CustomerWorkCollectQuery> getOrConditionList(){
return this.orConditionList;
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param 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<CustomerWorkCollectQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<CustomerWorkCollectQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param 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<CustomerWorkCollectQuery> andConditionList){
this.andConditionList = andConditionList;
}
......
package com.mortals.xhx.module.customer.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.customer.model.vo.CustomerWorkDesignVo;
import lombok.Data;
/**
* 客户作品信息实体对象
*
* @author zxfei
* @date 2022-07-08
* @date 2023-07-11
*/
@Data
public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
private static final long serialVersionUID = 1L;
......@@ -56,154 +56,10 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
* 设计草稿
*/
private String draft;
public CustomerWorkDesignEntity(){}
/**
* 获取 客户ID
* @return Long
*/
public Long getCustomerId(){
return customerId;
}
/**
* 设置 客户ID
* @param customerId
*/
public void setCustomerId(Long customerId){
this.customerId = customerId;
}
/**
* 获取 作品名称
* @return String
*/
public String getWorkDesignName(){
return workDesignName;
}
/**
* 设置 作品名称
* @param workDesignName
*/
public void setWorkDesignName(String workDesignName){
this.workDesignName = workDesignName;
}
/**
* 获取 作品状态:0:草稿,1:发布
* @return Integer
*/
public Integer getWorkDesignStatus(){
return workDesignStatus;
}
/**
* 设置 作品状态:0:草稿,1:发布
* @param workDesignStatus
*/
public void setWorkDesignStatus(Integer workDesignStatus){
this.workDesignStatus = workDesignStatus;
}
/**
* 获取 作品描述
* @return String
*/
public String getWorkDesignDesc(){
return workDesignDesc;
}
/**
* 设置 作品描述
* @param workDesignDesc
*/
public void setWorkDesignDesc(String workDesignDesc){
this.workDesignDesc = workDesignDesc;
}
/**
* 获取 模版引用的图片
* @return String
*/
public String getPictureIds(){
return pictureIds;
}
/**
* 设置 模版引用的图片
* @param pictureIds
*/
public void setPictureIds(String pictureIds){
this.pictureIds = pictureIds;
}
/**
* 获取 模版引用的素材
* @return String
* 作品类型:1:图片,2:视频
*/
public String getPictureSrcIds(){
return pictureSrcIds;
}
/**
* 设置 模版引用的素材
* @param pictureSrcIds
*/
public void setPictureSrcIds(String pictureSrcIds){
this.pictureSrcIds = pictureSrcIds;
}
/**
* 获取 模版引用的背景
* @return String
*/
public String getPictureBackgroundIds(){
return pictureBackgroundIds;
}
/**
* 设置 模版引用的背景
* @param pictureBackgroundIds
*/
public void setPictureBackgroundIds(String pictureBackgroundIds){
this.pictureBackgroundIds = pictureBackgroundIds;
}
/**
* 获取 作品引用的字体
* @return String
*/
public String getFontIds(){
return fontIds;
}
/**
* 设置 作品引用的字体
* @param fontIds
*/
public void setFontIds(String fontIds){
this.fontIds = fontIds;
}
/**
* 获取 作品图片预览地址(相对地址)
* @return String
*/
public String getPreviewUrl(){
return previewUrl;
}
/**
* 设置 作品图片预览地址(相对地址)
* @param previewUrl
*/
public void setPreviewUrl(String previewUrl){
this.previewUrl = previewUrl;
}
/**
* 获取 设计草稿
* @return String
*/
public String getDraft(){
return draft;
}
/**
* 设置 设计草稿
* @param draft
*/
public void setDraft(String draft){
this.draft = draft;
}
private Integer designType;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -220,28 +76,13 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",customerId:").append(getCustomerId());
sb.append(",workDesignName:").append(getWorkDesignName());
sb.append(",workDesignStatus:").append(getWorkDesignStatus());
sb.append(",workDesignDesc:").append(getWorkDesignDesc());
sb.append(",pictureIds:").append(getPictureIds());
sb.append(",pictureSrcIds:").append(getPictureSrcIds());
sb.append(",pictureBackgroundIds:").append(getPictureBackgroundIds());
sb.append(",fontIds:").append(getFontIds());
sb.append(",previewUrl:").append(getPreviewUrl());
sb.append(",draft:").append(getDraft());
return sb.toString();
}
public void initAttrValue(){
this.customerId = null;
this.workDesignName = "";
this.workDesignStatus = null;
this.workDesignStatus = -1;
this.workDesignDesc = "";
......@@ -256,5 +97,7 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
this.previewUrl = "";
this.draft = "";
this.designType = 1;
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ import com.mortals.xhx.module.customer.model.CustomerWorkDesignEntity;
* 客户作品信息查询对象
*
* @author zxfei
* @date 2022-07-08
* @date 2023-07-11
*/
public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
/** 开始 主键ID,主键,自增长 */
......@@ -21,6 +21,9 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
/** 主键ID,主键,自增长列表 */
private List <Long> idList;
/** 主键ID,主键,自增长排除列表 */
private List <Long> idNotList;
/** 开始 客户ID */
private Long customerIdStart;
......@@ -33,9 +36,14 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
/** 客户ID列表 */
private List <Long> customerIdList;
/** 客户ID排除列表 */
private List <Long> customerIdNotList;
/** 作品名称 */
private List<String> workDesignNameList;
/** 作品名称排除列表 */
private List <String> workDesignNameNotList;
/** 开始 作品状态:0:草稿,1:发布 */
private Integer workDesignStatusStart;
......@@ -48,9 +56,14 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
/** 作品状态:0:草稿,1:发布列表 */
private List <Integer> workDesignStatusList;
/** 作品状态:0:草稿,1:发布排除列表 */
private List <Integer> workDesignStatusNotList;
/** 作品描述 */
private List<String> workDesignDescList;
/** 作品描述排除列表 */
private List <String> workDesignDescNotList;
/** 开始 创建时间 */
private String createTimeStart;
......@@ -66,21 +79,48 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
/** 模版引用的图片 */
private List<String> pictureIdsList;
/** 模版引用的图片排除列表 */
private List <String> pictureIdsNotList;
/** 模版引用的素材 */
private List<String> pictureSrcIdsList;
/** 模版引用的素材排除列表 */
private List <String> pictureSrcIdsNotList;
/** 模版引用的背景 */
private List<String> pictureBackgroundIdsList;
/** 模版引用的背景排除列表 */
private List <String> pictureBackgroundIdsNotList;
/** 作品引用的字体 */
private List<String> fontIdsList;
/** 作品引用的字体排除列表 */
private List <String> fontIdsNotList;
/** 作品图片预览地址(相对地址) */
private List<String> previewUrlList;
/** 作品图片预览地址(相对地址)排除列表 */
private List <String> previewUrlNotList;
/** 设计草稿 */
private List<String> draftList;
/** 设计草稿排除列表 */
private List <String> draftNotList;
/** 开始 作品类型:1:图片,2:视频 */
private Integer designTypeStart;
/** 结束 作品类型:1:图片,2:视频 */
private Integer designTypeEnd;
/** 增加 作品类型:1:图片,2:视频 */
private Integer designTypeIncrement;
/** 作品类型:1:图片,2:视频列表 */
private List <Integer> designTypeList;
/** 作品类型:1:图片,2:视频排除列表 */
private List <Integer> designTypeNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<CustomerWorkDesignQuery> orConditionList;
......@@ -153,6 +193,23 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
this.idList = idList;
}
/**
* 获取 主键ID,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 开始 客户ID
* @return customerIdStart
......@@ -217,6 +274,23 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
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;
}
/**
* 获取 作品名称
* @return workDesignNameList
......@@ -232,6 +306,23 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
public void setWorkDesignNameList(List<String> workDesignNameList){
this.workDesignNameList = workDesignNameList;
}
/**
* 获取 作品名称
* @return workDesignNameNotList
*/
public List<String> getWorkDesignNameNotList(){
return this.workDesignNameNotList;
}
/**
* 设置 作品名称
* @param workDesignNameNotList
*/
public void setWorkDesignNameNotList(List<String> workDesignNameNotList){
this.workDesignNameNotList = workDesignNameNotList;
}
/**
* 获取 开始 作品状态:0:草稿,1:发布
* @return workDesignStatusStart
......@@ -296,6 +387,23 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
this.workDesignStatusList = workDesignStatusList;
}
/**
* 获取 作品状态:0:草稿,1:发布
* @return workDesignStatusNotList
*/
public List<Integer> getWorkDesignStatusNotList(){
return this.workDesignStatusNotList;
}
/**
* 设置 作品状态:0:草稿,1:发布
* @param workDesignStatusNotList
*/
public void setWorkDesignStatusNotList(List<Integer> workDesignStatusNotList){
this.workDesignStatusNotList = workDesignStatusNotList;
}
/**
* 获取 作品描述
* @return workDesignDescList
......@@ -311,6 +419,23 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
public void setWorkDesignDescList(List<String> workDesignDescList){
this.workDesignDescList = workDesignDescList;
}
/**
* 获取 作品描述
* @return workDesignDescNotList
*/
public List<String> getWorkDesignDescNotList(){
return this.workDesignDescNotList;
}
/**
* 设置 作品描述
* @param workDesignDescNotList
*/
public void setWorkDesignDescNotList(List<String> workDesignDescNotList){
this.workDesignDescNotList = workDesignDescNotList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
......@@ -390,6 +515,23 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
public void setPictureIdsList(List<String> pictureIdsList){
this.pictureIdsList = pictureIdsList;
}
/**
* 获取 模版引用的图片
* @return pictureIdsNotList
*/
public List<String> getPictureIdsNotList(){
return this.pictureIdsNotList;
}
/**
* 设置 模版引用的图片
* @param pictureIdsNotList
*/
public void setPictureIdsNotList(List<String> pictureIdsNotList){
this.pictureIdsNotList = pictureIdsNotList;
}
/**
* 获取 模版引用的素材
* @return pictureSrcIdsList
......@@ -405,6 +547,23 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
public void setPictureSrcIdsList(List<String> pictureSrcIdsList){
this.pictureSrcIdsList = pictureSrcIdsList;
}
/**
* 获取 模版引用的素材
* @return pictureSrcIdsNotList
*/
public List<String> getPictureSrcIdsNotList(){
return this.pictureSrcIdsNotList;
}
/**
* 设置 模版引用的素材
* @param pictureSrcIdsNotList
*/
public void setPictureSrcIdsNotList(List<String> pictureSrcIdsNotList){
this.pictureSrcIdsNotList = pictureSrcIdsNotList;
}
/**
* 获取 模版引用的背景
* @return pictureBackgroundIdsList
......@@ -420,6 +579,23 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
public void setPictureBackgroundIdsList(List<String> pictureBackgroundIdsList){
this.pictureBackgroundIdsList = pictureBackgroundIdsList;
}
/**
* 获取 模版引用的背景
* @return pictureBackgroundIdsNotList
*/
public List<String> getPictureBackgroundIdsNotList(){
return this.pictureBackgroundIdsNotList;
}
/**
* 设置 模版引用的背景
* @param pictureBackgroundIdsNotList
*/
public void setPictureBackgroundIdsNotList(List<String> pictureBackgroundIdsNotList){
this.pictureBackgroundIdsNotList = pictureBackgroundIdsNotList;
}
/**
* 获取 作品引用的字体
* @return fontIdsList
......@@ -435,6 +611,23 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
public void setFontIdsList(List<String> fontIdsList){
this.fontIdsList = fontIdsList;
}
/**
* 获取 作品引用的字体
* @return fontIdsNotList
*/
public List<String> getFontIdsNotList(){
return this.fontIdsNotList;
}
/**
* 设置 作品引用的字体
* @param fontIdsNotList
*/
public void setFontIdsNotList(List<String> fontIdsNotList){
this.fontIdsNotList = fontIdsNotList;
}
/**
* 获取 作品图片预览地址(相对地址)
* @return previewUrlList
......@@ -450,6 +643,23 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
public void setPreviewUrlList(List<String> previewUrlList){
this.previewUrlList = previewUrlList;
}
/**
* 获取 作品图片预览地址(相对地址)
* @return previewUrlNotList
*/
public List<String> getPreviewUrlNotList(){
return this.previewUrlNotList;
}
/**
* 设置 作品图片预览地址(相对地址)
* @param previewUrlNotList
*/
public void setPreviewUrlNotList(List<String> previewUrlNotList){
this.previewUrlNotList = previewUrlNotList;
}
/**
* 获取 设计草稿
* @return draftList
......@@ -465,6 +675,104 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
public void setDraftList(List<String> draftList){
this.draftList = draftList;
}
/**
* 获取 设计草稿
* @return draftNotList
*/
public List<String> getDraftNotList(){
return this.draftNotList;
}
/**
* 设置 设计草稿
* @param draftNotList
*/
public void setDraftNotList(List<String> draftNotList){
this.draftNotList = draftNotList;
}
/**
* 获取 开始 作品类型:1:图片,2:视频
* @return designTypeStart
*/
public Integer getDesignTypeStart(){
return this.designTypeStart;
}
/**
* 设置 开始 作品类型:1:图片,2:视频
* @param designTypeStart
*/
public void setDesignTypeStart(Integer designTypeStart){
this.designTypeStart = designTypeStart;
}
/**
* 获取 结束 作品类型:1:图片,2:视频
* @return $designTypeEnd
*/
public Integer getDesignTypeEnd(){
return this.designTypeEnd;
}
/**
* 设置 结束 作品类型:1:图片,2:视频
* @param designTypeEnd
*/
public void setDesignTypeEnd(Integer designTypeEnd){
this.designTypeEnd = designTypeEnd;
}
/**
* 获取 增加 作品类型:1:图片,2:视频
* @return designTypeIncrement
*/
public Integer getDesignTypeIncrement(){
return this.designTypeIncrement;
}
/**
* 设置 增加 作品类型:1:图片,2:视频
* @param designTypeIncrement
*/
public void setDesignTypeIncrement(Integer designTypeIncrement){
this.designTypeIncrement = designTypeIncrement;
}
/**
* 获取 作品类型:1:图片,2:视频
* @return designTypeList
*/
public List<Integer> getDesignTypeList(){
return this.designTypeList;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designTypeList
*/
public void setDesignTypeList(List<Integer> designTypeList){
this.designTypeList = designTypeList;
}
/**
* 获取 作品类型:1:图片,2:视频
* @return designTypeNotList
*/
public List<Integer> getDesignTypeNotList(){
return this.designTypeNotList;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designTypeNotList
*/
public void setDesignTypeNotList(List<Integer> designTypeNotList){
this.designTypeNotList = designTypeNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param id
......@@ -510,6 +818,15 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
return this;
}
/**
* 设置 主键ID,主键,自增长
* @param idNotList
*/
public CustomerWorkDesignQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/**
* 设置 客户ID
* @param customerId
......@@ -555,6 +872,15 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
return this;
}
/**
* 设置 客户ID
* @param customerIdNotList
*/
public CustomerWorkDesignQuery customerIdNotList(List<Long> customerIdNotList){
this.customerIdNotList = customerIdNotList;
return this;
}
/**
* 设置 作品名称
......@@ -619,6 +945,15 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
return this;
}
/**
* 设置 作品状态:0:草稿,1:发布
* @param workDesignStatusNotList
*/
public CustomerWorkDesignQuery workDesignStatusNotList(List<Integer> workDesignStatusNotList){
this.workDesignStatusNotList = workDesignStatusNotList;
return this;
}
/**
* 设置 作品描述
......@@ -754,6 +1089,60 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
return this;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designType
*/
public CustomerWorkDesignQuery designType(Integer designType){
setDesignType(designType);
return this;
}
/**
* 设置 开始 作品类型:1:图片,2:视频
* @param designTypeStart
*/
public CustomerWorkDesignQuery designTypeStart(Integer designTypeStart){
this.designTypeStart = designTypeStart;
return this;
}
/**
* 设置 结束 作品类型:1:图片,2:视频
* @param designTypeEnd
*/
public CustomerWorkDesignQuery designTypeEnd(Integer designTypeEnd){
this.designTypeEnd = designTypeEnd;
return this;
}
/**
* 设置 增加 作品类型:1:图片,2:视频
* @param designTypeIncrement
*/
public CustomerWorkDesignQuery designTypeIncrement(Integer designTypeIncrement){
this.designTypeIncrement = designTypeIncrement;
return this;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designTypeList
*/
public CustomerWorkDesignQuery designTypeList(List<Integer> designTypeList){
this.designTypeList = designTypeList;
return this;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designTypeNotList
*/
public CustomerWorkDesignQuery designTypeNotList(List<Integer> designTypeNotList){
this.designTypeNotList = designTypeNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
......@@ -82,4 +82,13 @@ public interface CustomerService extends ICRUDService<CustomerEntity,Long>{
*/
CustomerEntity doSmsLogin(String mobileNumber, String verifyCode, String loginIp) throws AppException;
/**
* 微信扫码登录
* @param openId
* @param loginIp
* @return
* @throws AppException
*/
CustomerEntity doWeChatLogin(String openId, String loginIp) throws AppException;
}
\ No newline at end of file
......@@ -148,6 +148,16 @@ public class CustomerServiceImpl extends AbstractCRUDServiceImpl<CustomerDao, Cu
@Override
public CustomerEntity updateByPersonal(CustomerEntity params, Context context) throws AppException {
CustomerEntity old = this.get(params.getId());
if(old==null){
throw new AppException("用户Id不正确!");
}
if(!old.getLoginName().equals(params.getLoginName())) {
CustomerEntity user = this.findByLoginName(params.getLoginName());
if (user != null) {
throw new AppException("用户名已存在!");
}
}
CustomerEntity update = new CustomerEntity();
update.setId(params.getId());
update.setLoginName(params.getLoginName());
......@@ -158,6 +168,7 @@ public class CustomerServiceImpl extends AbstractCRUDServiceImpl<CustomerDao, Cu
update.setContactTelphone(params.getContactTelphone());
update.setMailbox(params.getMailbox());
update.setJob(params.getJob());
update.setOpenId(params.getOpenId());
int iRet = this.dao.update(update);
if (iRet == 0) {
throw new AppException(-1002, "更新失败!");
......@@ -253,6 +264,10 @@ public class CustomerServiceImpl extends AbstractCRUDServiceImpl<CustomerDao, Cu
if(customer==null){
throw new AppException("手机号码:" + mobileNumber + "没有注册用户");
}
String verifyCode = cacheService.get(SMS_VERIFY_CODE_KEY + mobileNumber);
if(StringUtils.isNotEmpty(verifyCode)){
throw new AppException("当前手机号码已发送验证码,请稍后重试");
}
try {
Map<String, String> params = new HashMap<>();
params.put("appid",appid);
......@@ -308,6 +323,20 @@ public class CustomerServiceImpl extends AbstractCRUDServiceImpl<CustomerDao, Cu
return customer;
}
@Override
public CustomerEntity doWeChatLogin(String openId, String loginIp) throws AppException {
CustomerEntity customer = this.selectOne(new CustomerQuery().openId(openId));
if(customer==null){
throw new AppException("用户未绑定微信");
}
CustomerEntity update = new CustomerEntity();
update.setId(customer.getId());
update.setLastLoginAddress(loginIp);
update.setLastLoginTime(new Date());
this.update(update);
return customer;
}
public static void main(String[] args){
try {
JSONObject jsonObject = new JSONObject();
......
......@@ -54,6 +54,10 @@ public class CustomerWorkCollectServiceImpl extends AbstractCRUDServiceImpl<Cust
protected void saveBefore(CustomerWorkCollectEntity entity, Context context) throws AppException {
this.validData(entity, context);
entity.setCustomerId(this.getContextUserId(context));
DesignMasterplateEntity masterplateEntity = designMasterplateService.get(entity.getMasterplateId());
if(masterplateEntity!=null){
entity.setDesignType(masterplateEntity.getDesignType());
}
CustomerWorkCollectEntity query = new CustomerWorkCollectEntity();
query.setCustomerId(entity.getCustomerId());
query.setMasterplateId(entity.getMasterplateId());
......
......@@ -7,10 +7,7 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.common.code.WorkDesignStatusEnum;
import com.mortals.xhx.common.utils.StringUtils;
import com.mortals.xhx.module.customer.dao.CustomerWorkDesignDao;
import com.mortals.xhx.module.customer.model.CustomerEntity;
import com.mortals.xhx.module.customer.model.CustomerWorkDesignEntity;
import com.mortals.xhx.module.customer.model.CustomerWorkDesignStatEntity;
import com.mortals.xhx.module.customer.model.CustomerWorkDesignStatQuery;
import com.mortals.xhx.module.customer.model.*;
import com.mortals.xhx.module.customer.service.CustomerService;
import com.mortals.xhx.module.customer.service.CustomerWorkDesignService;
import com.mortals.xhx.module.customer.service.CustomerWorkDesignStatService;
......@@ -22,6 +19,8 @@ import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
......@@ -65,8 +64,13 @@ public class CustomerWorkDesignServiceImpl extends AbstractCRUDServiceImpl<Custo
if(CollectionUtils.isEmpty(cwdList)){
CustomerWorkDesignStatEntity cwdEntity = new CustomerWorkDesignStatEntity();
cwdEntity.setCustomerId(entity.getCustomerId());
cwdEntity.setCustomerDesignPictures(1);
cwdEntity.setCustomerDesignVideos(0);
if(entity.getDesignType()==1) {
cwdEntity.setCustomerDesignPictures(1);
cwdEntity.setCustomerDesignVideos(0);
}else {
cwdEntity.setCustomerDesignPictures(0);
cwdEntity.setCustomerDesignVideos(1);
}
cwdEntity.setCreateTime(new Date());
cwdEntity.setUpdateTime(new Date());
customerWorkDesignStatService.save(cwdEntity);
......@@ -74,7 +78,11 @@ public class CustomerWorkDesignServiceImpl extends AbstractCRUDServiceImpl<Custo
CustomerWorkDesignStatEntity cwdEntity = cwdList.get(0);
CustomerWorkDesignStatQuery updateEntity = new CustomerWorkDesignStatQuery();
updateEntity.setId(cwdEntity.getId());
updateEntity.setCustomerDesignPicturesIncrement(1);
if(entity.getDesignType()==1) {
updateEntity.setCustomerDesignPicturesIncrement(1);
}else {
updateEntity.setCustomerDesignVideosIncrement(1);
}
updateEntity.setUpdateTime(new Date());
customerWorkDesignStatService.update(updateEntity);
}
......@@ -135,6 +143,7 @@ public class CustomerWorkDesignServiceImpl extends AbstractCRUDServiceImpl<Custo
newMasterplate.setPreviewUrl(entity.getFrontCover());
newMasterplate.setDraft(workDesign.getDraft());
newMasterplate.setPlateType(entity.getPlateType()==null?1:entity.getPlateType());
newMasterplate.setDesignType(workDesign.getDesignType());
newMasterplate.setCreateTime(new Date());
designMasterplateService.save(newMasterplate,context);
return 1;
......@@ -152,7 +161,8 @@ public class CustomerWorkDesignServiceImpl extends AbstractCRUDServiceImpl<Custo
@Override
public int remove(Long[] ids, Context context) throws AppException {
this.removeBefore(ids, context);
List<CustomerWorkDesignEntity> list = this.get(ids,context);
List<Long> idList = new ArrayList<>(Arrays.asList(ids));
List<CustomerWorkDesignEntity> list = this.find(new CustomerWorkDesignQuery().idList(idList));
int iRet = this.dao.delete(ids);
if(CollectionUtils.isNotEmpty(list)){
list.forEach(e->{
......
package com.mortals.xhx.module.customer.web;
import com.mortals.framework.common.IBaseEnum;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.common.code.DesignTypeEnum;
import com.mortals.xhx.common.key.Constant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -43,6 +45,7 @@ public class CustomerWorkCollectController extends BaseCRUDJsonBodyMappingContro
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "designType", IBaseEnum.getEnumMap(DesignTypeEnum.class));
super.init(model, context);
}
......
......@@ -6,20 +6,24 @@ import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.IBaseEnum;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.IUser;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.common.code.DesignTypeEnum;
import com.mortals.xhx.common.code.WorkDesignStatusEnum;
import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.module.customer.model.CustomerWorkDesignEntity;
import com.mortals.xhx.module.customer.service.CustomerWorkDesignService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
......@@ -39,6 +43,7 @@ public class CustomerWorkDesignController extends BaseCRUDJsonBodyMappingControl
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "workDesignStatus", IBaseEnum.getEnumMap(WorkDesignStatusEnum.class));
this.addDict(model, "designType", IBaseEnum.getEnumMap(DesignTypeEnum.class));
super.init(model, context);
}
......@@ -85,6 +90,7 @@ public class CustomerWorkDesignController extends BaseCRUDJsonBodyMappingControl
throw new AppException("非法用户,不可访问");
}
entity.setCustomerId(this.getCurUser().getId());
entity.setUpdateTime(entity.getCreateTime());
if(CollectionUtils.isNotEmpty(entity.getDesignContent())) {
entity.setDraft(JSONObject.toJSONString(entity.getDesignContent()));
}
......
package com.mortals.xhx.module.design.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.design.model.vo.DesignMasterplateVo;
import lombok.Data;
/**
* 模版管理实体对象
*
* @author zxfei
* @date 2022-07-26
* @date 2023-07-11
*/
@Data
public class DesignMasterplateEntity extends DesignMasterplateVo {
private static final long serialVersionUID = 1L;
......@@ -72,210 +72,10 @@ public class DesignMasterplateEntity extends DesignMasterplateVo {
* 版式。1:横版2竖版默认:1
*/
private Integer plateType;
public DesignMasterplateEntity(){}
/**
* 获取 模版名称
* @return String
*/
public String getMasterplateName(){
return masterplateName;
}
/**
* 设置 模版名称
* @param masterplateName
*/
public void setMasterplateName(String masterplateName){
this.masterplateName = masterplateName;
}
/**
* 获取 模版编码
* @return Integer
*/
public Integer getMasterplateCode(){
return masterplateCode;
}
/**
* 设置 模版编码
* @param masterplateCode
*/
public void setMasterplateCode(Integer masterplateCode){
this.masterplateCode = masterplateCode;
}
/**
* 获取 发布人
* @return Long
*/
public Long getCustomerId(){
return customerId;
}
/**
* 设置 发布人
* @param customerId
*/
public void setCustomerId(Long customerId){
this.customerId = customerId;
}
/**
* 获取 发布人名称
* @return String
*/
public String getCustomerName(){
return customerName;
}
/**
* 设置 发布人名称
* @param customerName
*/
public void setCustomerName(String customerName){
this.customerName = customerName;
}
/**
* 获取 模版描述
* @return String
*/
public String getMasterplateDesc(){
return masterplateDesc;
}
/**
* 设置 模版描述
* @param masterplateDesc
*/
public void setMasterplateDesc(String masterplateDesc){
this.masterplateDesc = masterplateDesc;
}
/**
* 获取 模版下载地址(相对地址)
* @return String
*/
public String getMasterplatePath(){
return masterplatePath;
}
/**
* 设置 模版下载地址(相对地址)
* @param masterplatePath
*/
public void setMasterplatePath(String masterplatePath){
this.masterplatePath = masterplatePath;
}
/**
* 获取 模版引用的图片
* @return String
*/
public String getPictureIds(){
return pictureIds;
}
/**
* 设置 模版引用的图片
* @param pictureIds
*/
public void setPictureIds(String pictureIds){
this.pictureIds = pictureIds;
}
/**
* 获取 模版引用的素材
* @return String
* 作品类型:1:图片,2:视频
*/
public String getPictureSrcIds(){
return pictureSrcIds;
}
/**
* 设置 模版引用的素材
* @param pictureSrcIds
*/
public void setPictureSrcIds(String pictureSrcIds){
this.pictureSrcIds = pictureSrcIds;
}
/**
* 获取 模版引用的背景
* @return String
*/
public String getPictureBackgroundIds(){
return pictureBackgroundIds;
}
/**
* 设置 模版引用的背景
* @param pictureBackgroundIds
*/
public void setPictureBackgroundIds(String pictureBackgroundIds){
this.pictureBackgroundIds = pictureBackgroundIds;
}
/**
* 获取 模版引用的字体
* @return String
*/
public String getFontIds(){
return fontIds;
}
/**
* 设置 模版引用的字体
* @param fontIds
*/
public void setFontIds(String fontIds){
this.fontIds = fontIds;
}
/**
* 获取 模版被引用的次数。默认:0
* @return Integer
*/
public Integer getMasterplateUseNum(){
return masterplateUseNum;
}
/**
* 设置 模版被引用的次数。默认:0
* @param masterplateUseNum
*/
public void setMasterplateUseNum(Integer masterplateUseNum){
this.masterplateUseNum = masterplateUseNum;
}
/**
* 获取 作品图片预览地址(相对地址)
* @return String
*/
public String getPreviewUrl(){
return previewUrl;
}
/**
* 设置 作品图片预览地址(相对地址)
* @param previewUrl
*/
public void setPreviewUrl(String previewUrl){
this.previewUrl = previewUrl;
}
/**
* 获取 设计草稿
* @return String
*/
public String getDraft(){
return draft;
}
/**
* 设置 设计草稿
* @param draft
*/
public void setDraft(String draft){
this.draft = draft;
}
/**
* 获取 版式。1:横版2竖版默认:1
* @return Integer
*/
public Integer getPlateType(){
return plateType;
}
/**
* 设置 版式。1:横版2竖版默认:1
* @param plateType
*/
public void setPlateType(Integer plateType){
this.plateType = plateType;
}
private Integer designType;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -292,32 +92,13 @@ public class DesignMasterplateEntity extends DesignMasterplateVo {
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",masterplateName:").append(getMasterplateName());
sb.append(",masterplateCode:").append(getMasterplateCode());
sb.append(",customerId:").append(getCustomerId());
sb.append(",customerName:").append(getCustomerName());
sb.append(",masterplateDesc:").append(getMasterplateDesc());
sb.append(",masterplatePath:").append(getMasterplatePath());
sb.append(",pictureIds:").append(getPictureIds());
sb.append(",pictureSrcIds:").append(getPictureSrcIds());
sb.append(",pictureBackgroundIds:").append(getPictureBackgroundIds());
sb.append(",fontIds:").append(getFontIds());
sb.append(",masterplateUseNum:").append(getMasterplateUseNum());
sb.append(",previewUrl:").append(getPreviewUrl());
sb.append(",draft:").append(getDraft());
sb.append(",plateType:").append(getPlateType());
return sb.toString();
}
public void initAttrValue(){
this.masterplateName = "";
this.masterplateCode = null;
this.masterplateCode = -1;
this.customerId = null;
this.customerId = -1L;
this.customerName = "";
......@@ -333,12 +114,14 @@ public class DesignMasterplateEntity extends DesignMasterplateVo {
this.fontIds = "";
this.masterplateUseNum = null;
this.masterplateUseNum = -1;
this.previewUrl = "";
this.draft = "";
this.plateType = null;
this.plateType = -1;
this.designType = 1;
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ import com.mortals.xhx.module.design.model.DesignMasterplateEntity;
* 模版管理查询对象
*
* @author zxfei
* @date 2022-07-26
* @date 2023-07-11
*/
public class DesignMasterplateQuery extends DesignMasterplateEntity {
/** 开始 主键ID,主键,自增长 */
......@@ -21,9 +21,14 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
/** 主键ID,主键,自增长列表 */
private List <Long> idList;
/** 主键ID,主键,自增长排除列表 */
private List <Long> idNotList;
/** 模版名称 */
private List<String> masterplateNameList;
/** 模版名称排除列表 */
private List <String> masterplateNameNotList;
/** 开始 模版编码 */
private Integer masterplateCodeStart;
......@@ -36,6 +41,9 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
/** 模版编码列表 */
private List <Integer> masterplateCodeList;
/** 模版编码排除列表 */
private List <Integer> masterplateCodeNotList;
/** 开始 发布人 */
private Long customerIdStart;
......@@ -48,9 +56,14 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
/** 发布人列表 */
private List <Long> customerIdList;
/** 发布人排除列表 */
private List <Long> customerIdNotList;
/** 发布人名称 */
private List<String> customerNameList;
/** 发布人名称排除列表 */
private List <String> customerNameNotList;
/** 开始 发布时间 */
private String createTimeStart;
......@@ -60,21 +73,33 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
/** 模版描述 */
private List<String> masterplateDescList;
/** 模版描述排除列表 */
private List <String> masterplateDescNotList;
/** 模版下载地址(相对地址) */
private List<String> masterplatePathList;
/** 模版下载地址(相对地址)排除列表 */
private List <String> masterplatePathNotList;
/** 模版引用的图片 */
private List<String> pictureIdsList;
/** 模版引用的图片排除列表 */
private List <String> pictureIdsNotList;
/** 模版引用的素材 */
private List<String> pictureSrcIdsList;
/** 模版引用的素材排除列表 */
private List <String> pictureSrcIdsNotList;
/** 模版引用的背景 */
private List<String> pictureBackgroundIdsList;
/** 模版引用的背景排除列表 */
private List <String> pictureBackgroundIdsNotList;
/** 模版引用的字体 */
private List<String> fontIdsList;
/** 模版引用的字体排除列表 */
private List <String> fontIdsNotList;
/** 开始 模版被引用的次数。默认:0 */
private Integer masterplateUseNumStart;
......@@ -87,12 +112,19 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
/** 模版被引用的次数。默认:0列表 */
private List <Integer> masterplateUseNumList;
/** 模版被引用的次数。默认:0排除列表 */
private List <Integer> masterplateUseNumNotList;
/** 作品图片预览地址(相对地址) */
private List<String> previewUrlList;
/** 作品图片预览地址(相对地址)排除列表 */
private List <String> previewUrlNotList;
/** 设计草稿 */
private List<String> draftList;
/** 设计草稿排除列表 */
private List <String> draftNotList;
/** 开始 版式。1:横版2竖版默认:1 */
private Integer plateTypeStart;
......@@ -105,6 +137,24 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
/** 版式。1:横版2竖版默认:1列表 */
private List <Integer> plateTypeList;
/** 版式。1:横版2竖版默认:1排除列表 */
private List <Integer> plateTypeNotList;
/** 开始 作品类型:1:图片,2:视频 */
private Integer designTypeStart;
/** 结束 作品类型:1:图片,2:视频 */
private Integer designTypeEnd;
/** 增加 作品类型:1:图片,2:视频 */
private Integer designTypeIncrement;
/** 作品类型:1:图片,2:视频列表 */
private List <Integer> designTypeList;
/** 作品类型:1:图片,2:视频排除列表 */
private List <Integer> designTypeNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<DesignMasterplateQuery> orConditionList;
......@@ -177,6 +227,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
this.idList = idList;
}
/**
* 获取 主键ID,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 模版名称
* @return masterplateNameList
......@@ -192,6 +259,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
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;
}
/**
* 获取 开始 模版编码
* @return masterplateCodeStart
......@@ -256,6 +340,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
this.masterplateCodeList = masterplateCodeList;
}
/**
* 获取 模版编码
* @return masterplateCodeNotList
*/
public List<Integer> getMasterplateCodeNotList(){
return this.masterplateCodeNotList;
}
/**
* 设置 模版编码
* @param masterplateCodeNotList
*/
public void setMasterplateCodeNotList(List<Integer> masterplateCodeNotList){
this.masterplateCodeNotList = masterplateCodeNotList;
}
/**
* 获取 开始 发布人
* @return customerIdStart
......@@ -320,6 +421,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
this.customerIdList = customerIdList;
}
/**
* 获取 发布人
* @return customerIdNotList
*/
public List<Long> getCustomerIdNotList(){
return this.customerIdNotList;
}
/**
* 设置 发布人
* @param customerIdNotList
*/
public void setCustomerIdNotList(List<Long> customerIdNotList){
this.customerIdNotList = customerIdNotList;
}
/**
* 获取 发布人名称
* @return customerNameList
......@@ -335,6 +453,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
public void setCustomerNameList(List<String> customerNameList){
this.customerNameList = customerNameList;
}
/**
* 获取 发布人名称
* @return customerNameNotList
*/
public List<String> getCustomerNameNotList(){
return this.customerNameNotList;
}
/**
* 设置 发布人名称
* @param customerNameNotList
*/
public void setCustomerNameNotList(List<String> customerNameNotList){
this.customerNameNotList = customerNameNotList;
}
/**
* 获取 开始 发布时间
* @return createTimeStart
......@@ -382,6 +517,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
public void setMasterplateDescList(List<String> masterplateDescList){
this.masterplateDescList = masterplateDescList;
}
/**
* 获取 模版描述
* @return masterplateDescNotList
*/
public List<String> getMasterplateDescNotList(){
return this.masterplateDescNotList;
}
/**
* 设置 模版描述
* @param masterplateDescNotList
*/
public void setMasterplateDescNotList(List<String> masterplateDescNotList){
this.masterplateDescNotList = masterplateDescNotList;
}
/**
* 获取 模版下载地址(相对地址)
* @return masterplatePathList
......@@ -397,6 +549,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
public void setMasterplatePathList(List<String> masterplatePathList){
this.masterplatePathList = masterplatePathList;
}
/**
* 获取 模版下载地址(相对地址)
* @return masterplatePathNotList
*/
public List<String> getMasterplatePathNotList(){
return this.masterplatePathNotList;
}
/**
* 设置 模版下载地址(相对地址)
* @param masterplatePathNotList
*/
public void setMasterplatePathNotList(List<String> masterplatePathNotList){
this.masterplatePathNotList = masterplatePathNotList;
}
/**
* 获取 模版引用的图片
* @return pictureIdsList
......@@ -412,6 +581,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
public void setPictureIdsList(List<String> pictureIdsList){
this.pictureIdsList = pictureIdsList;
}
/**
* 获取 模版引用的图片
* @return pictureIdsNotList
*/
public List<String> getPictureIdsNotList(){
return this.pictureIdsNotList;
}
/**
* 设置 模版引用的图片
* @param pictureIdsNotList
*/
public void setPictureIdsNotList(List<String> pictureIdsNotList){
this.pictureIdsNotList = pictureIdsNotList;
}
/**
* 获取 模版引用的素材
* @return pictureSrcIdsList
......@@ -427,6 +613,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
public void setPictureSrcIdsList(List<String> pictureSrcIdsList){
this.pictureSrcIdsList = pictureSrcIdsList;
}
/**
* 获取 模版引用的素材
* @return pictureSrcIdsNotList
*/
public List<String> getPictureSrcIdsNotList(){
return this.pictureSrcIdsNotList;
}
/**
* 设置 模版引用的素材
* @param pictureSrcIdsNotList
*/
public void setPictureSrcIdsNotList(List<String> pictureSrcIdsNotList){
this.pictureSrcIdsNotList = pictureSrcIdsNotList;
}
/**
* 获取 模版引用的背景
* @return pictureBackgroundIdsList
......@@ -442,6 +645,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
public void setPictureBackgroundIdsList(List<String> pictureBackgroundIdsList){
this.pictureBackgroundIdsList = pictureBackgroundIdsList;
}
/**
* 获取 模版引用的背景
* @return pictureBackgroundIdsNotList
*/
public List<String> getPictureBackgroundIdsNotList(){
return this.pictureBackgroundIdsNotList;
}
/**
* 设置 模版引用的背景
* @param pictureBackgroundIdsNotList
*/
public void setPictureBackgroundIdsNotList(List<String> pictureBackgroundIdsNotList){
this.pictureBackgroundIdsNotList = pictureBackgroundIdsNotList;
}
/**
* 获取 模版引用的字体
* @return fontIdsList
......@@ -457,6 +677,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
public void setFontIdsList(List<String> fontIdsList){
this.fontIdsList = fontIdsList;
}
/**
* 获取 模版引用的字体
* @return fontIdsNotList
*/
public List<String> getFontIdsNotList(){
return this.fontIdsNotList;
}
/**
* 设置 模版引用的字体
* @param fontIdsNotList
*/
public void setFontIdsNotList(List<String> fontIdsNotList){
this.fontIdsNotList = fontIdsNotList;
}
/**
* 获取 开始 模版被引用的次数。默认:0
* @return masterplateUseNumStart
......@@ -521,6 +758,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
this.masterplateUseNumList = masterplateUseNumList;
}
/**
* 获取 模版被引用的次数。默认:0
* @return masterplateUseNumNotList
*/
public List<Integer> getMasterplateUseNumNotList(){
return this.masterplateUseNumNotList;
}
/**
* 设置 模版被引用的次数。默认:0
* @param masterplateUseNumNotList
*/
public void setMasterplateUseNumNotList(List<Integer> masterplateUseNumNotList){
this.masterplateUseNumNotList = masterplateUseNumNotList;
}
/**
* 获取 作品图片预览地址(相对地址)
* @return previewUrlList
......@@ -536,6 +790,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
public void setPreviewUrlList(List<String> previewUrlList){
this.previewUrlList = previewUrlList;
}
/**
* 获取 作品图片预览地址(相对地址)
* @return previewUrlNotList
*/
public List<String> getPreviewUrlNotList(){
return this.previewUrlNotList;
}
/**
* 设置 作品图片预览地址(相对地址)
* @param previewUrlNotList
*/
public void setPreviewUrlNotList(List<String> previewUrlNotList){
this.previewUrlNotList = previewUrlNotList;
}
/**
* 获取 设计草稿
* @return draftList
......@@ -551,6 +822,23 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
public void setDraftList(List<String> draftList){
this.draftList = draftList;
}
/**
* 获取 设计草稿
* @return draftNotList
*/
public List<String> getDraftNotList(){
return this.draftNotList;
}
/**
* 设置 设计草稿
* @param draftNotList
*/
public void setDraftNotList(List<String> draftNotList){
this.draftNotList = draftNotList;
}
/**
* 获取 开始 版式。1:横版2竖版默认:1
* @return plateTypeStart
......@@ -615,6 +903,104 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
this.plateTypeList = plateTypeList;
}
/**
* 获取 版式。1:横版2竖版默认:1
* @return plateTypeNotList
*/
public List<Integer> getPlateTypeNotList(){
return this.plateTypeNotList;
}
/**
* 设置 版式。1:横版2竖版默认:1
* @param plateTypeNotList
*/
public void setPlateTypeNotList(List<Integer> plateTypeNotList){
this.plateTypeNotList = plateTypeNotList;
}
/**
* 获取 开始 作品类型:1:图片,2:视频
* @return designTypeStart
*/
public Integer getDesignTypeStart(){
return this.designTypeStart;
}
/**
* 设置 开始 作品类型:1:图片,2:视频
* @param designTypeStart
*/
public void setDesignTypeStart(Integer designTypeStart){
this.designTypeStart = designTypeStart;
}
/**
* 获取 结束 作品类型:1:图片,2:视频
* @return $designTypeEnd
*/
public Integer getDesignTypeEnd(){
return this.designTypeEnd;
}
/**
* 设置 结束 作品类型:1:图片,2:视频
* @param designTypeEnd
*/
public void setDesignTypeEnd(Integer designTypeEnd){
this.designTypeEnd = designTypeEnd;
}
/**
* 获取 增加 作品类型:1:图片,2:视频
* @return designTypeIncrement
*/
public Integer getDesignTypeIncrement(){
return this.designTypeIncrement;
}
/**
* 设置 增加 作品类型:1:图片,2:视频
* @param designTypeIncrement
*/
public void setDesignTypeIncrement(Integer designTypeIncrement){
this.designTypeIncrement = designTypeIncrement;
}
/**
* 获取 作品类型:1:图片,2:视频
* @return designTypeList
*/
public List<Integer> getDesignTypeList(){
return this.designTypeList;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designTypeList
*/
public void setDesignTypeList(List<Integer> designTypeList){
this.designTypeList = designTypeList;
}
/**
* 获取 作品类型:1:图片,2:视频
* @return designTypeNotList
*/
public List<Integer> getDesignTypeNotList(){
return this.designTypeNotList;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designTypeNotList
*/
public void setDesignTypeNotList(List<Integer> designTypeNotList){
this.designTypeNotList = designTypeNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param id
......@@ -660,6 +1046,15 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
return this;
}
/**
* 设置 主键ID,主键,自增长
* @param idNotList
*/
public DesignMasterplateQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/**
* 设置 模版名称
......@@ -724,6 +1119,15 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
return this;
}
/**
* 设置 模版编码
* @param masterplateCodeNotList
*/
public DesignMasterplateQuery masterplateCodeNotList(List<Integer> masterplateCodeNotList){
this.masterplateCodeNotList = masterplateCodeNotList;
return this;
}
/**
* 设置 发布人
* @param customerId
......@@ -769,6 +1173,15 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
return this;
}
/**
* 设置 发布人
* @param customerIdNotList
*/
public DesignMasterplateQuery customerIdNotList(List<Long> customerIdNotList){
this.customerIdNotList = customerIdNotList;
return this;
}
/**
* 设置 发布人名称
......@@ -948,6 +1361,15 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
return this;
}
/**
* 设置 模版被引用的次数。默认:0
* @param masterplateUseNumNotList
*/
public DesignMasterplateQuery masterplateUseNumNotList(List<Integer> masterplateUseNumNotList){
this.masterplateUseNumNotList = masterplateUseNumNotList;
return this;
}
/**
* 设置 作品图片预览地址(相对地址)
......@@ -1031,6 +1453,69 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
return this;
}
/**
* 设置 版式。1:横版2竖版默认:1
* @param plateTypeNotList
*/
public DesignMasterplateQuery plateTypeNotList(List<Integer> plateTypeNotList){
this.plateTypeNotList = plateTypeNotList;
return this;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designType
*/
public DesignMasterplateQuery designType(Integer designType){
setDesignType(designType);
return this;
}
/**
* 设置 开始 作品类型:1:图片,2:视频
* @param designTypeStart
*/
public DesignMasterplateQuery designTypeStart(Integer designTypeStart){
this.designTypeStart = designTypeStart;
return this;
}
/**
* 设置 结束 作品类型:1:图片,2:视频
* @param designTypeEnd
*/
public DesignMasterplateQuery designTypeEnd(Integer designTypeEnd){
this.designTypeEnd = designTypeEnd;
return this;
}
/**
* 设置 增加 作品类型:1:图片,2:视频
* @param designTypeIncrement
*/
public DesignMasterplateQuery designTypeIncrement(Integer designTypeIncrement){
this.designTypeIncrement = designTypeIncrement;
return this;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designTypeList
*/
public DesignMasterplateQuery designTypeList(List<Integer> designTypeList){
this.designTypeList = designTypeList;
return this;
}
/**
* 设置 作品类型:1:图片,2:视频
* @param designTypeNotList
*/
public DesignMasterplateQuery designTypeNotList(List<Integer> designTypeNotList){
this.designTypeNotList = designTypeNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
package com.mortals.xhx.module.design.web;
import com.mortals.framework.common.IBaseEnum;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.DesignTypeEnum;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -45,6 +47,7 @@ public class DesignMasterplateController extends BaseCRUDJsonBodyMappingControll
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "designType", IBaseEnum.getEnumMap(DesignTypeEnum.class));
super.init(model, context);
}
......
......@@ -52,8 +52,13 @@ public class PictureGroupController extends BaseCRUDJsonBodyMappingController<Pa
if(paramEntities.isEmpty()){
max = 1;
}else {
ParamEntity maxEntity = paramEntities.stream().max(Comparator.comparing(ParamEntity::getParamKey)).get();
max = DataUtil.converStr2Int(maxEntity.getParamKey(),paramEntities.size())+1;
for(ParamEntity item:paramEntities){
int temp = DataUtil.converStr2Int(item.getParamKey(),0);
if(max < temp){
max = temp;
}
}
max++;
}
entity.setParamKey(max+"");
entity.setName("素材分组");
......
package com.mortals.xhx.module.thirdlog.wechat;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.RandomUtil;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.web.BaseJsonBodyController;
import com.mortals.xhx.common.utils.StringUtils;
import com.mortals.xhx.module.customer.model.CustomerEntity;
import com.mortals.xhx.module.customer.service.CustomerService;
import com.mortals.xhx.module.thirdlog.sms.pdu.SMSLoginPdu;
import com.mortals.xhx.module.thirdlog.wechat.utils.WeChatUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
/**
* 微信扫码登录
*/
@RestController
@RequestMapping("wechat")
public class WeChatLoginController extends BaseJsonBodyController {
@Autowired
private CustomerService customerService;
@Autowired
private ICacheService cacheService;
private static String WX_VERIFY_CODE_KEY ="login:wx:verify:";
/**
* 微信appId
*/
@Value("${WeChat.pc.appID:wx55400ca31cbbe7fb}")
private String APP_ID;
/**
* 微信appSecret
*/
@Value("${WeChat.pc.appSecret:22555d29a9f914bac0400af5cf63d6b3}")
private String APP_SECRET;
@RequestMapping(
value = {"getLoginSoleCode"},
method = {RequestMethod.POST, RequestMethod.GET}
)
@UnAuth
public Rest<Object> sendSmsVerifyCode(){
Rest<Object> ret = new Rest();
Map<String, Object> model = new HashMap();
String busiDesc = "获取微信登录验证码";
int code=1;
try {
String vCode = RandomUtil.randomNumbers(11);
cacheService.setnx(WX_VERIFY_CODE_KEY+vCode,vCode,90);
model.put("data",vCode);
model.put("message_info", busiDesc + "成功");
} catch (Exception var9) {
code = -1;
this.doException(this.request, busiDesc, model, var9);
}
ret.setCode(code);
ret.setData(model.get("data"));
ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString());
return ret;
}
@RequestMapping(
value = {"wxLoginOAuth"},
method = {RequestMethod.POST, RequestMethod.GET}
)
@UnAuth
public String wxLoginOAuth(HttpServletRequest request, HttpServletResponse response){
JSONObject ret = new JSONObject();
Map<String, Object> data = new HashMap<>();
try {
// 第三方发起微信授权登录请求,微信用户允许授权第三方应用后,微信会拉起应用或重定向到第三方网站,并且带上授权临时票据code参数;
String loginCode = request.getParameter("code");
//前端扫码登入传来的时间戳
String loginState = request.getParameter("state");
//用户拒绝授权时code为空,微信也不会请求该接口。为了防止非法请求,若code为空则返回
if (StringUtils.isEmpty(loginCode)) {
throw new AppException("登入请求被拒绝");
}
if (StringUtils.isEmpty(loginState)) {
throw new AppException("请求状态异常");
}
String vCode = cacheService.get(WX_VERIFY_CODE_KEY + loginState);
if (StringUtils.isEmpty(vCode)){
throw new AppException("微信登录验证码失效");
}
Map<String,String> accessTokenMap = WeChatUtils.getAccessToken(loginCode,APP_ID,APP_SECRET);
String access_token = accessTokenMap.get("access_token");//接口调用凭证,登录后右上角展示数据需要该值去获取
String openid = accessTokenMap.get("openid");//授权用户唯一标识
String ip = super.getRequestIP(request);
CustomerEntity customerEntity = customerService.doWeChatLogin(openid,ip);
customerEntity.setLastLoginAddress(ip);
customerEntity.setLoginTime(System.currentTimeMillis());
customerEntity.setToken(IdUtil.fastSimpleUUID());
customerEntity.setExpireTime(DateUtils.addCurrDate(7).getTime());
String token = authTokenService.createToken(customerEntity);
data.put("token", token);
data.put("customer", customerEntity);
recordSysLog(request, customerEntity, "客户扫码登录系统成功!");
ret.put(KEY_RESULT_DATA, data);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "用户登录系统成功!");
return ret.toJSONString();
} catch (Exception e) {
log.error("login error ", e);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, super.convertException(e));
return ret.toJSONString();
}
}
@RequestMapping(
value = {"bind"},
method = {RequestMethod.POST, RequestMethod.GET}
)
@UnAuth
public String bind(HttpServletRequest request, HttpServletResponse response){
JSONObject ret = new JSONObject();
Map<String, Object> data = new HashMap<>();
try {
// 第三方发起微信授权登录请求,微信用户允许授权第三方应用后,微信会拉起应用或重定向到第三方网站,并且带上授权临时票据code参数;
String loginCode = request.getParameter("code");
//前端扫码登入传来的时间戳
String loginState = request.getParameter("state");
//用户拒绝授权时code为空,微信也不会请求该接口。为了防止非法请求,若code为空则返回
if (StringUtils.isEmpty(loginCode)) {
throw new AppException("登入请求被拒绝");
}
if (StringUtils.isEmpty(loginState)) {
throw new AppException("请求状态异常");
}
String vCode = cacheService.get(WX_VERIFY_CODE_KEY + loginState);
if (StringUtils.isEmpty(vCode)){
throw new AppException("微信登录验证码失效");
}
Map<String,String> accessTokenMap = WeChatUtils.getAccessToken(loginCode,APP_ID,APP_SECRET);
String access_token = accessTokenMap.get("access_token");//接口调用凭证,登录后右上角展示数据需要该值去获取
String openid = accessTokenMap.get("openid");//授权用户唯一标识
data.put("openId", openid);
ret.put(KEY_RESULT_DATA, data);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "微信扫码成功!");
return ret.toJSONString();
} catch (Exception e) {
log.error("bind error ", e);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, super.convertException(e));
return ret.toJSONString();
}
}
}
package com.mortals.xhx.module.thirdlog.wechat.utils;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
* description: json工具类 <br>
* version: 1.0 <br>
* @date: 2019/7/20 0019 上午 10:17 <br>
* @author: William <br>
*/
public class JsonUtils {
public static final ObjectMapper MAPPER = new ObjectMapper();
private static final Logger logger = LoggerFactory.getLogger(JsonUtils.class);
public static String serialize(Object obj) {
if (obj == null) {
return null;
}
if (obj.getClass() == String.class) {
return (String) obj;
}
try {
return MAPPER.writeValueAsString(obj);
} catch (JsonProcessingException e) {
logger.error("json序列化出错:" + obj, e);
return null;
}
}
public static <T> T parse(String json, Class<T> tClass) {
try {
return MAPPER.readValue(json, tClass);
} catch (IOException e) {
logger.error("json解析出错:" + json, e);
return null;
}
}
public static <E> List<E> parseList(String json, Class<E> eClass) {
try {
return MAPPER.readValue(json, MAPPER.getTypeFactory().constructCollectionType(List.class, eClass));
} catch (IOException e) {
logger.error("json解析出错:" + json, e);
return null;
}
}
public static <K, V> Map<K, V> parseMap(String json, Class<K> kClass, Class<V> vClass) {
try {
return MAPPER.readValue(json, MAPPER.getTypeFactory().constructMapType(Map.class, kClass, vClass));
} catch (IOException e) {
logger.error("json解析出错:" + json, e);
return null;
}
}
public static <T> T nativeRead(String json, TypeReference<T> type) {
try {
return MAPPER.readValue(json, type);
} catch (IOException e) {
logger.error("json解析出错:" + json, e);
return null;
}
}
}
package com.mortals.xhx.module.thirdlog.wechat.utils;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import org.springframework.beans.factory.annotation.Value;
import java.util.Map;
/**
* description: WeChatUtils 微信获取用户工具类<br>
*
* @date: 2021/8/19 0019 上午 10:05 <br>
* @author: William <br>
* version: 1.0 <br>
*/
public class WeChatUtils {
/**
* 获取微信accessToken路径
*/
private static final String GET_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
/**
* 微信appId
*/
@Value("${WeChat.pc.appID:wx55400ca31cbbe7fb}")
private static String APP_ID;
/**
* 微信appSecret
*/
@Value("${WeChat.pc.appSecret:22555d29a9f914bac0400af5cf63d6b3}")
private static String APP_SECRET;
/**
* description: getAccessToken 根据code获取accessToken<br>
* version: 1.0 <br>
* @date: 2021/8/19 0019 上午 10:10 <br>
* @author: William <br>
* @param code 微信用户授权code
* @return java.util.Map<java.lang.String,java.lang.String>
*/
public static Map<String,String> getAccessToken(String code){
return getAccessToken(code,APP_ID,APP_SECRET);
}
/**
* description: getAccessToken 根据code获取微信用户信息,返回map如果正确map包含access_token ,如果错误则包含:errcode<br>
* version: 1.0 <br>
* @date: 2021/8/19 0019 上午 10:11 <br>
* @author: William <br>
* @param code 微信授权code
* @param appId 微信appId
* @param appSecret 微信appSecret
* @return java.util.Map<java.lang.String,java.lang.String>
*/
public static Map<String,String> getAccessToken(String code,String appId,String appSecret){
//判断所有字段不能为空
if(isAnyBlank(code,appId,appSecret)){
throw new IllegalArgumentException("参数错误");
}
String requestUrl = GET_ACCESS_TOKEN_URL.replace("APPID",appId)
.replace("SECRET",appSecret).replace("CODE",code);
String result = HttpUtil.get(requestUrl);
return JsonUtils.parseMap(result, String.class, String.class);
}
/**
* description: isAnyBlank 判断是否存在空字符串,Hutool未编写<br>
* version: 1.0 <br>
* @date: 2021/8/19 0019 上午 10:25 <br>
* @author: William <br>
* @param strs 字符串
* @return java.lang.Boolean
*/
public static Boolean isAnyBlank(CharSequence... strs){
//如果为空直接返回true
if (ArrayUtil.isEmpty(strs)) {
return true;
}
for (CharSequence str : strs) {
if (StrUtil.isBlank(str)) {
return true;
}
}
return false;
}
}
server:
port: @profiles.server.port@
servlet:
context-path: /eas
tomcat:
uri-encoding: utf-8
spring:
application:
name: @project.artifactId@
name: eas-manager
profiles:
active: @profiles.active@
servlet:
......@@ -13,19 +16,29 @@ spring:
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
cloud:
nacos:
# Nacos 作为注册中心的配置项,对应 NacosDiscoveryProperties 配置类
discovery:
server-addr: @profiles.nacos.server-addr@ # Nacos 服务器地址
group: @profiles.nacos.group@
namespace: @profiles.nacos.namespace@
config:
server-addr: ${spring.cloud.nacos.discovery.server-addr} # Nacos 服务器地址
group: ${spring.cloud.nacos.discovery.group}
namespace: ${spring.cloud.nacos.discovery.namespace} # Nacos 命名空间 dev 的编号
file-extension: yaml
security:
enable: true
user:
name: admin
password: 1
redis:
host: @profiles.redis.uri@
port: @profiles.redis.port@
username: @profiles.redis.username@
password: @profiles.redis.password@
database: @profiles.redis.database@
timeout: 30000
pool:
max-idle: 30
min-idle: 0
max-active: 100
max-wait: 1000
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: @profiles.datasource.uri@
username: @profiles.datasource.username@
password: @profiles.datasource.password@
mybatis:
root-path: com.mortals
type-aliases-package: com.mortals.framework.model,com.mortals.xhx.common.**.model,com.mortals.xhx.**.model
......@@ -38,5 +51,16 @@ application:
uncheckUrl: /refresh,/error,/login/login,/login/index,/login/logout,/customer/login/login,/customer/login/logout,/securitycode/createCode,/customer/trial/save,/file/common/*,/file/preview/*,/test*,/api/asset/*,/api/*,/zwfw/*,/ws/*,/swagger-ui*,/topic/*,/uploads/*
workflow:
tenantId: ${spring.application.name}
cookie:
ssoServerUrl: http://sso.testnew.com
key: 026db82420614469897fcc2dc1b4ce38
domain: base.testnew.com
port: 111
token:
head: mortal
upload:
path: @profiles.filepath@
WeChat:
pc:
appID: wx55400ca31cbbe7fb
appSecret: 22555d29a9f914bac0400af5cf63d6b3
......@@ -9,7 +9,7 @@
<setting name="useGeneratedKeys" value="false" />
<setting name="defaultExecutorType" value="REUSE" />
<!-- 是否开始sql日志控制台打印 -->
<setting name="logImpl" value="STDOUT_LOGGING" />
<!-- <setting name="logImpl" value="STDOUT_LOGGING" />-->
</settings>
<plugins>
<plugin interceptor="com.mortals.framework.thirty.mybatis.MortalsPagePlugin">
......
......@@ -25,6 +25,7 @@
<result property="updateTime" column="updateTime" />
<result property="lastLoginTime" column="lastLoginTime" />
<result property="lastLoginAddress" column="lastLoginAddress" />
<result property="openId" column="openId" />
</resultMap>
......@@ -92,23 +93,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginAddress') or colPickMode == 1 and data.containsKey('lastLoginAddress')))">
a.lastLoginAddress,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('openId') or colPickMode == 1 and data.containsKey('openId')))">
a.openId,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="CustomerEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_customer
(loginName,password,memberLevel,custName,organization,contactTelphone,enterpriseConsultant,siteId,sex,mailbox,job,avatar,customerSrc,status,createUserId,createTime,updateTime,lastLoginTime,lastLoginAddress)
(loginName,password,memberLevel,custName,organization,contactTelphone,enterpriseConsultant,siteId,sex,mailbox,job,avatar,customerSrc,status,createUserId,createTime,updateTime,lastLoginTime,lastLoginAddress,openId)
VALUES
(#{loginName},#{password},#{memberLevel},#{custName},#{organization},#{contactTelphone},#{enterpriseConsultant},#{siteId},#{sex},#{mailbox},#{job},#{avatar},#{customerSrc},#{status},#{createUserId},#{createTime},#{updateTime},#{lastLoginTime},#{lastLoginAddress})
(#{loginName},#{password},#{memberLevel},#{custName},#{organization},#{contactTelphone},#{enterpriseConsultant},#{siteId},#{sex},#{mailbox},#{job},#{avatar},#{customerSrc},#{status},#{createUserId},#{createTime},#{updateTime},#{lastLoginTime},#{lastLoginAddress},#{openId})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_customer
(loginName,password,memberLevel,custName,organization,contactTelphone,enterpriseConsultant,siteId,sex,mailbox,job,avatar,customerSrc,status,createUserId,createTime,updateTime,lastLoginTime,lastLoginAddress)
(loginName,password,memberLevel,custName,organization,contactTelphone,enterpriseConsultant,siteId,sex,mailbox,job,avatar,customerSrc,status,createUserId,createTime,updateTime,lastLoginTime,lastLoginAddress,openId)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.loginName},#{item.password},#{item.memberLevel},#{item.custName},#{item.organization},#{item.contactTelphone},#{item.enterpriseConsultant},#{item.siteId},#{item.sex},#{item.mailbox},#{item.job},#{item.avatar},#{item.customerSrc},#{item.status},#{item.createUserId},#{item.createTime},#{item.updateTime},#{item.lastLoginTime},#{item.lastLoginAddress})
(#{item.loginName},#{item.password},#{item.memberLevel},#{item.custName},#{item.organization},#{item.contactTelphone},#{item.enterpriseConsultant},#{item.siteId},#{item.sex},#{item.mailbox},#{item.job},#{item.avatar},#{item.customerSrc},#{item.status},#{item.createUserId},#{item.createTime},#{item.updateTime},#{item.lastLoginTime},#{item.lastLoginAddress},#{item.openId})
</foreach>
</insert>
......@@ -193,6 +197,9 @@
<if test="(colPickMode==0 and data.containsKey('lastLoginAddress')) or (colPickMode==1 and !data.containsKey('lastLoginAddress'))">
a.lastLoginAddress=#{data.lastLoginAddress},
</if>
<if test="(colPickMode==0 and data.containsKey('openId')) or (colPickMode==1 and !data.containsKey('openId'))">
a.openId=#{data.openId},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -368,6 +375,13 @@
</if>
</foreach>
</trim>
<trim prefix="openId=(case" suffix="ELSE openId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('openId')) or (colPickMode==1 and !item.containsKey('openId'))">
when a.id=#{item.id} then #{item.openId}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -391,6 +405,21 @@
#{item}
</foreach>
</delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_xhx_customer where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_xhx_customer 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_customer as a
......@@ -477,12 +506,18 @@
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList')">
<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>
......@@ -499,12 +534,18 @@
${_conditionType_} a.loginName is null
</if>
</if>
<if test="conditionParamRef.containsKey('loginNameList')">
<if test="conditionParamRef.containsKey('loginNameList') and conditionParamRef.loginNameList.size() > 0">
${_conditionType_} a.loginName in
<foreach collection="conditionParamRef.loginNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('loginNameNotList') and conditionParamRef.loginNameNotList.size() > 0">
${_conditionType_} a.loginName not in
<foreach collection="conditionParamRef.loginNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('password')">
<if test="conditionParamRef.password != null and conditionParamRef.password != ''">
......@@ -514,12 +555,18 @@
${_conditionType_} a.password is null
</if>
</if>
<if test="conditionParamRef.containsKey('passwordList')">
<if test="conditionParamRef.containsKey('passwordList') and conditionParamRef.passwordList.size() > 0">
${_conditionType_} a.password in
<foreach collection="conditionParamRef.passwordList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('passwordNotList') and conditionParamRef.passwordNotList.size() > 0">
${_conditionType_} a.password not in
<foreach collection="conditionParamRef.passwordNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('memberLevel')">
<if test="conditionParamRef.memberLevel != null ">
${_conditionType_} a.memberLevel = #{${_conditionParam_}.memberLevel}
......@@ -528,12 +575,18 @@
${_conditionType_} a.memberLevel is null
</if>
</if>
<if test="conditionParamRef.containsKey('memberLevelList')">
<if test="conditionParamRef.containsKey('memberLevelList') and conditionParamRef.memberLevelList.size() > 0">
${_conditionType_} a.memberLevel in
<foreach collection="conditionParamRef.memberLevelList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('memberLevelNotList') and conditionParamRef.memberLevelNotList.size() > 0">
${_conditionType_} a.memberLevel not in
<foreach collection="conditionParamRef.memberLevelNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('memberLevelStart') and conditionParamRef.memberLevelStart != null">
${_conditionType_} a.memberLevel <![CDATA[ >= ]]> #{${_conditionParam_}.memberLevelStart}
</if>
......@@ -550,12 +603,18 @@
${_conditionType_} a.custName is null
</if>
</if>
<if test="conditionParamRef.containsKey('custNameList')">
<if test="conditionParamRef.containsKey('custNameList') and conditionParamRef.custNameList.size() > 0">
${_conditionType_} a.custName in
<foreach collection="conditionParamRef.custNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('custNameNotList') and conditionParamRef.custNameNotList.size() > 0">
${_conditionType_} a.custName not in
<foreach collection="conditionParamRef.custNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('organization')">
<if test="conditionParamRef.organization != null and conditionParamRef.organization != ''">
......@@ -565,12 +624,18 @@
${_conditionType_} a.organization is null
</if>
</if>
<if test="conditionParamRef.containsKey('organizationList')">
<if test="conditionParamRef.containsKey('organizationList') and conditionParamRef.organizationList.size() > 0">
${_conditionType_} a.organization in
<foreach collection="conditionParamRef.organizationList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('organizationNotList') and conditionParamRef.organizationNotList.size() > 0">
${_conditionType_} a.organization not in
<foreach collection="conditionParamRef.organizationNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('contactTelphone')">
<if test="conditionParamRef.contactTelphone != null and conditionParamRef.contactTelphone != ''">
......@@ -580,12 +645,18 @@
${_conditionType_} a.contactTelphone is null
</if>
</if>
<if test="conditionParamRef.containsKey('contactTelphoneList')">
<if test="conditionParamRef.containsKey('contactTelphoneList') and conditionParamRef.contactTelphoneList.size() > 0">
${_conditionType_} a.contactTelphone in
<foreach collection="conditionParamRef.contactTelphoneList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('contactTelphoneNotList') and conditionParamRef.contactTelphoneNotList.size() > 0">
${_conditionType_} a.contactTelphone not in
<foreach collection="conditionParamRef.contactTelphoneNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('enterpriseConsultant')">
<if test="conditionParamRef.enterpriseConsultant != null and conditionParamRef.enterpriseConsultant != ''">
......@@ -595,12 +666,18 @@
${_conditionType_} a.enterpriseConsultant is null
</if>
</if>
<if test="conditionParamRef.containsKey('enterpriseConsultantList')">
<if test="conditionParamRef.containsKey('enterpriseConsultantList') and conditionParamRef.enterpriseConsultantList.size() > 0">
${_conditionType_} a.enterpriseConsultant in
<foreach collection="conditionParamRef.enterpriseConsultantList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('enterpriseConsultantNotList') and conditionParamRef.enterpriseConsultantNotList.size() > 0">
${_conditionType_} a.enterpriseConsultant not in
<foreach collection="conditionParamRef.enterpriseConsultantNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteId')">
<if test="conditionParamRef.siteId != null ">
${_conditionType_} a.siteId = #{${_conditionParam_}.siteId}
......@@ -609,12 +686,18 @@
${_conditionType_} a.siteId is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteIdList')">
<if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
${_conditionType_} a.siteId in
<foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIdNotList') and conditionParamRef.siteIdNotList.size() > 0">
${_conditionType_} a.siteId not in
<foreach collection="conditionParamRef.siteIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIdStart') and conditionParamRef.siteIdStart != null">
${_conditionType_} a.siteId <![CDATA[ >= ]]> #{${_conditionParam_}.siteIdStart}
</if>
......@@ -630,12 +713,18 @@
${_conditionType_} a.sex is null
</if>
</if>
<if test="conditionParamRef.containsKey('sexList')">
<if test="conditionParamRef.containsKey('sexList') and conditionParamRef.sexList.size() > 0">
${_conditionType_} a.sex in
<foreach collection="conditionParamRef.sexList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sexNotList') and conditionParamRef.sexNotList.size() > 0">
${_conditionType_} a.sex not in
<foreach collection="conditionParamRef.sexNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sexStart') and conditionParamRef.sexStart != null">
${_conditionType_} a.sex <![CDATA[ >= ]]> #{${_conditionParam_}.sexStart}
</if>
......@@ -652,12 +741,18 @@
${_conditionType_} a.mailbox is null
</if>
</if>
<if test="conditionParamRef.containsKey('mailboxList')">
<if test="conditionParamRef.containsKey('mailboxList') and conditionParamRef.mailboxList.size() > 0">
${_conditionType_} a.mailbox in
<foreach collection="conditionParamRef.mailboxList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('mailboxNotList') and conditionParamRef.mailboxNotList.size() > 0">
${_conditionType_} a.mailbox not in
<foreach collection="conditionParamRef.mailboxNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('job')">
<if test="conditionParamRef.job != null and conditionParamRef.job != ''">
......@@ -667,12 +762,18 @@
${_conditionType_} a.job is null
</if>
</if>
<if test="conditionParamRef.containsKey('jobList')">
<if test="conditionParamRef.containsKey('jobList') and conditionParamRef.jobList.size() > 0">
${_conditionType_} a.job in
<foreach collection="conditionParamRef.jobList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('jobNotList') and conditionParamRef.jobNotList.size() > 0">
${_conditionType_} a.job not in
<foreach collection="conditionParamRef.jobNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('avatar')">
<if test="conditionParamRef.avatar != null and conditionParamRef.avatar != ''">
......@@ -682,12 +783,18 @@
${_conditionType_} a.avatar is null
</if>
</if>
<if test="conditionParamRef.containsKey('avatarList')">
<if test="conditionParamRef.containsKey('avatarList') and conditionParamRef.avatarList.size() > 0">
${_conditionType_} a.avatar in
<foreach collection="conditionParamRef.avatarList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('avatarNotList') and conditionParamRef.avatarNotList.size() > 0">
${_conditionType_} a.avatar not in
<foreach collection="conditionParamRef.avatarNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('customerSrc')">
<if test="conditionParamRef.customerSrc != null ">
${_conditionType_} a.customerSrc = #{${_conditionParam_}.customerSrc}
......@@ -696,12 +803,18 @@
${_conditionType_} a.customerSrc is null
</if>
</if>
<if test="conditionParamRef.containsKey('customerSrcList')">
<if test="conditionParamRef.containsKey('customerSrcList') and conditionParamRef.customerSrcList.size() > 0">
${_conditionType_} a.customerSrc in
<foreach collection="conditionParamRef.customerSrcList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('customerSrcNotList') and conditionParamRef.customerSrcNotList.size() > 0">
${_conditionType_} a.customerSrc not in
<foreach collection="conditionParamRef.customerSrcNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('customerSrcStart') and conditionParamRef.customerSrcStart != null">
${_conditionType_} a.customerSrc <![CDATA[ >= ]]> #{${_conditionParam_}.customerSrcStart}
</if>
......@@ -717,12 +830,18 @@
${_conditionType_} a.status is null
</if>
</if>
<if test="conditionParamRef.containsKey('statusList')">
<if test="conditionParamRef.containsKey('statusList') and conditionParamRef.statusList.size() > 0">
${_conditionType_} a.status in
<foreach collection="conditionParamRef.statusList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('statusNotList') and conditionParamRef.statusNotList.size() > 0">
${_conditionType_} a.status not in
<foreach collection="conditionParamRef.statusNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('statusStart') and conditionParamRef.statusStart != null">
${_conditionType_} a.status <![CDATA[ >= ]]> #{${_conditionParam_}.statusStart}
</if>
......@@ -738,12 +857,18 @@
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList')">
<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>
......@@ -805,12 +930,39 @@
${_conditionType_} a.lastLoginAddress is null
</if>
</if>
<if test="conditionParamRef.containsKey('lastLoginAddressList')">
<if test="conditionParamRef.containsKey('lastLoginAddressList') and conditionParamRef.lastLoginAddressList.size() > 0">
${_conditionType_} a.lastLoginAddress in
<foreach collection="conditionParamRef.lastLoginAddressList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('lastLoginAddressNotList') and conditionParamRef.lastLoginAddressNotList.size() > 0">
${_conditionType_} a.lastLoginAddress not in
<foreach collection="conditionParamRef.lastLoginAddressNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('openId')">
<if test="conditionParamRef.openId != null and conditionParamRef.openId != ''">
${_conditionType_} a.openId like #{${_conditionParam_}.openId}
</if>
<if test="conditionParamRef.openId == null">
${_conditionType_} a.openId is null
</if>
</if>
<if test="conditionParamRef.containsKey('openIdList') and conditionParamRef.openIdList.size() > 0">
${_conditionType_} a.openId in
<foreach collection="conditionParamRef.openIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('openIdNotList') and conditionParamRef.openIdNotList.size() > 0">
${_conditionType_} a.openId not in
<foreach collection="conditionParamRef.openIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -924,6 +1076,11 @@
<if test='orderCol.lastLoginAddress != null and "DESC".equalsIgnoreCase(orderCol.lastLoginAddress)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('openId')">
a.openId
<if test='orderCol.openId != null and "DESC".equalsIgnoreCase(orderCol.openId)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
......
......@@ -24,6 +24,7 @@
<result property="updateTime" column="updateTime" />
<result property="lastLoginTime" column="lastLoginTime" />
<result property="lastLoginAddress" column="lastLoginAddress" />
<result property="openId" column="openId" />
<result property="customerDesignPictures" column="customerDesignPictures" />
<result property="customerDesignVideos" column="customerDesignVideos" />
</resultMap>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.customer.dao.ibatis.CustomerWorkCollectDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="CustomerWorkCollectEntity" id="CustomerWorkCollectEntity-Map">
<id property="id" column="id" />
<result property="customerId" column="customerId" />
<result property="masterplateId" column="masterplateId" />
<result property="createTime" column="createTime" />
<id property="id" column="id" />
<result property="customerId" column="customerId" />
<result property="masterplateId" column="masterplateId" />
<result property="createTime" column="createTime" />
<result property="designType" column="designType" />
</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('customerId') or colPickMode == 1 and data.containsKey('customerId')))">
a.customerId,
</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('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<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('customerId') or colPickMode == 1 and data.containsKey('customerId')))">
a.customerId,
</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('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('designType') or colPickMode == 1 and data.containsKey('designType')))">
a.designType,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="CustomerWorkCollectEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_customer_work_collect
(customerId,masterplateId,createTime)
(customerId,masterplateId,createTime,designType)
VALUES
(#{customerId},#{masterplateId},#{createTime})
(#{customerId},#{masterplateId},#{createTime},#{designType})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_customer_work_collect
(customerId,masterplateId,createTime)
(customerId,masterplateId,createTime,designType)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.customerId},#{item.masterplateId},#{item.createTime})
(#{item.customerId},#{item.masterplateId},#{item.createTime},#{item.designType})
</foreach>
</insert>
......@@ -69,6 +73,12 @@
<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('designType')) or (colPickMode==1 and !data.containsKey('designType'))">
a.designType=#{data.designType},
</if>
<if test="(colPickMode==0 and data.containsKey('designTypeIncrement')) or (colPickMode==1 and !data.containsKey('designTypeIncrement'))">
a.designType=ifnull(a.designType,0) + #{data.designTypeIncrement},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -81,37 +91,49 @@
<update id="updateBatch" parameterType="paramDto">
update mortals_xhx_customer_work_collect as a
<trim prefix="set" suffixOverrides=",">
<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="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="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="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="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="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="designType=(case" suffix="ELSE designType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('designType')) or (colPickMode==1 and !item.containsKey('designType'))">
when a.id=#{item.id} then #{item.designType}
</when>
<when test="(colPickMode==0 and item.containsKey('designTypeIncrement')) or (colPickMode==1 and !item.containsKey('designTypeIncrement'))">
when a.id=#{item.id} then ifnull(a.designType,0) + #{item.designTypeIncrement}
</when>
</choose>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -135,6 +157,21 @@
#{item}
</foreach>
</delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_xhx_customer_work_collect where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_xhx_customer_work_collect 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_customer_work_collect as a
......@@ -213,117 +250,167 @@
${_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')">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" 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 test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
<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('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')">
${_conditionType_} a.customerId in
<foreach collection="conditionParamRef.customerIdList" 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 test="conditionParamRef.containsKey('customerId')">
<if test="conditionParamRef.customerId != null ">
${_conditionType_} a.customerId = #{${_conditionParam_}.customerId}
</if>
<if test="conditionParamRef.containsKey('customerIdEnd') and conditionParamRef.customerIdEnd != null">
${_conditionType_} a.customerId <![CDATA[ <= ]]> #{${_conditionParam_}.customerIdEnd}
<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('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')">
${_conditionType_} a.masterplateId in
<foreach collection="conditionParamRef.masterplateIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.containsKey('masterplateId')">
<if test="conditionParamRef.masterplateId != null ">
${_conditionType_} a.masterplateId = #{${_conditionParam_}.masterplateId}
</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 test="conditionParamRef.masterplateId == null">
${_conditionType_} a.masterplateId is null
</if>
</if>
<if test="conditionParamRef.containsKey('masterplateIdList')">
${_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('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</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 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('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('designType')">
<if test="conditionParamRef.designType != null ">
${_conditionType_} a.designType = #{${_conditionParam_}.designType}
</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 test="conditionParamRef.designType == null">
${_conditionType_} a.designType is null
</if>
</if>
<if test="conditionParamRef.containsKey('designTypeList') and conditionParamRef.designTypeList.size() > 0">
${_conditionType_} a.designType in
<foreach collection="conditionParamRef.designTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('designTypeNotList') and conditionParamRef.designTypeNotList.size() > 0">
${_conditionType_} a.designType not in
<foreach collection="conditionParamRef.designTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('designTypeStart') and conditionParamRef.designTypeStart != null">
${_conditionType_} a.designType <![CDATA[ >= ]]> #{${_conditionParam_}.designTypeStart}
</if>
<if test="conditionParamRef.containsKey('designTypeEnd') and conditionParamRef.designTypeEnd != null">
${_conditionType_} a.designType <![CDATA[ <= ]]> #{${_conditionParam_}.designTypeEnd}
</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}
${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('customerId')">
a.customerId
<if test='orderCol.customerId != null and "DESC".equalsIgnoreCase(orderCol.customerId)'>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('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>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('masterplateId')">
a.masterplateId
<if test='orderCol.masterplateId != null and "DESC".equalsIgnoreCase(orderCol.masterplateId)'>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('designType')">
a.designType
<if test='orderCol.designType != null and "DESC".equalsIgnoreCase(orderCol.designType)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
......
......@@ -18,6 +18,7 @@
<result property="fontIds" column="fontIds" />
<result property="previewUrl" column="previewUrl" />
<result property="draft" column="draft" />
<result property="designType" column="designType" />
</resultMap>
......@@ -64,23 +65,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('draft') or colPickMode == 1 and data.containsKey('draft')))">
a.draft,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('designType') or colPickMode == 1 and data.containsKey('designType')))">
a.designType,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="CustomerWorkDesignEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_customer_work_design
(customerId,workDesignName,workDesignStatus,workDesignDesc,createTime,updateTime,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,previewUrl,draft)
(customerId,workDesignName,workDesignStatus,workDesignDesc,createTime,updateTime,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,previewUrl,draft,designType)
VALUES
(#{customerId},#{workDesignName},#{workDesignStatus},#{workDesignDesc},#{createTime},#{updateTime},#{pictureIds},#{pictureSrcIds},#{pictureBackgroundIds},#{fontIds},#{previewUrl},#{draft})
(#{customerId},#{workDesignName},#{workDesignStatus},#{workDesignDesc},#{createTime},#{updateTime},#{pictureIds},#{pictureSrcIds},#{pictureBackgroundIds},#{fontIds},#{previewUrl},#{draft},#{designType})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_customer_work_design
(customerId,workDesignName,workDesignStatus,workDesignDesc,createTime,updateTime,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,previewUrl,draft)
(customerId,workDesignName,workDesignStatus,workDesignDesc,createTime,updateTime,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,previewUrl,draft,designType)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.customerId},#{item.workDesignName},#{item.workDesignStatus},#{item.workDesignDesc},#{item.createTime},#{item.updateTime},#{item.pictureIds},#{item.pictureSrcIds},#{item.pictureBackgroundIds},#{item.fontIds},#{item.previewUrl},#{item.draft})
(#{item.customerId},#{item.workDesignName},#{item.workDesignStatus},#{item.workDesignDesc},#{item.createTime},#{item.updateTime},#{item.pictureIds},#{item.pictureSrcIds},#{item.pictureBackgroundIds},#{item.fontIds},#{item.previewUrl},#{item.draft},#{item.designType})
</foreach>
</insert>
......@@ -132,6 +136,12 @@
<if test="(colPickMode==0 and data.containsKey('draft')) or (colPickMode==1 and !data.containsKey('draft'))">
a.draft=#{data.draft},
</if>
<if test="(colPickMode==0 and data.containsKey('designType')) or (colPickMode==1 and !data.containsKey('designType'))">
a.designType=#{data.designType},
</if>
<if test="(colPickMode==0 and data.containsKey('designTypeIncrement')) or (colPickMode==1 and !data.containsKey('designTypeIncrement'))">
a.designType=ifnull(a.designType,0) + #{data.designTypeIncrement},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -238,6 +248,18 @@
</if>
</foreach>
</trim>
<trim prefix="designType=(case" suffix="ELSE designType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('designType')) or (colPickMode==1 and !item.containsKey('designType'))">
when a.id=#{item.id} then #{item.designType}
</when>
<when test="(colPickMode==0 and item.containsKey('designTypeIncrement')) or (colPickMode==1 and !item.containsKey('designTypeIncrement'))">
when a.id=#{item.id} then ifnull(a.designType,0) + #{item.designTypeIncrement}
</when>
</choose>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -261,6 +283,21 @@
#{item}
</foreach>
</delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_xhx_customer_work_design where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_xhx_customer_work_design 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_customer_work_design as a
......@@ -347,12 +384,18 @@
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList')">
<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>
......@@ -368,12 +411,18 @@
${_conditionType_} a.customerId is null
</if>
</if>
<if test="conditionParamRef.containsKey('customerIdList')">
<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>
......@@ -390,12 +439,18 @@
${_conditionType_} a.workDesignName is null
</if>
</if>
<if test="conditionParamRef.containsKey('workDesignNameList')">
<if test="conditionParamRef.containsKey('workDesignNameList') and conditionParamRef.workDesignNameList.size() > 0">
${_conditionType_} a.workDesignName in
<foreach collection="conditionParamRef.workDesignNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('workDesignNameNotList') and conditionParamRef.workDesignNameNotList.size() > 0">
${_conditionType_} a.workDesignName not in
<foreach collection="conditionParamRef.workDesignNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('workDesignStatus')">
<if test="conditionParamRef.workDesignStatus != null ">
${_conditionType_} a.workDesignStatus = #{${_conditionParam_}.workDesignStatus}
......@@ -404,12 +459,18 @@
${_conditionType_} a.workDesignStatus is null
</if>
</if>
<if test="conditionParamRef.containsKey('workDesignStatusList')">
<if test="conditionParamRef.containsKey('workDesignStatusList') and conditionParamRef.workDesignStatusList.size() > 0">
${_conditionType_} a.workDesignStatus in
<foreach collection="conditionParamRef.workDesignStatusList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('workDesignStatusNotList') and conditionParamRef.workDesignStatusNotList.size() > 0">
${_conditionType_} a.workDesignStatus not in
<foreach collection="conditionParamRef.workDesignStatusNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('workDesignStatusStart') and conditionParamRef.workDesignStatusStart != null">
${_conditionType_} a.workDesignStatus <![CDATA[ >= ]]> #{${_conditionParam_}.workDesignStatusStart}
</if>
......@@ -426,12 +487,18 @@
${_conditionType_} a.workDesignDesc is null
</if>
</if>
<if test="conditionParamRef.containsKey('workDesignDescList')">
<if test="conditionParamRef.containsKey('workDesignDescList') and conditionParamRef.workDesignDescList.size() > 0">
${_conditionType_} a.workDesignDesc in
<foreach collection="conditionParamRef.workDesignDescList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('workDesignDescNotList') and conditionParamRef.workDesignDescNotList.size() > 0">
${_conditionType_} a.workDesignDesc not in
<foreach collection="conditionParamRef.workDesignDescNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
......@@ -471,12 +538,18 @@
${_conditionType_} a.pictureIds is null
</if>
</if>
<if test="conditionParamRef.containsKey('pictureIdsList')">
<if test="conditionParamRef.containsKey('pictureIdsList') and conditionParamRef.pictureIdsList.size() > 0">
${_conditionType_} a.pictureIds in
<foreach collection="conditionParamRef.pictureIdsList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pictureIdsNotList') and conditionParamRef.pictureIdsNotList.size() > 0">
${_conditionType_} a.pictureIds not in
<foreach collection="conditionParamRef.pictureIdsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pictureSrcIds')">
<if test="conditionParamRef.pictureSrcIds != null and conditionParamRef.pictureSrcIds != ''">
......@@ -486,12 +559,18 @@
${_conditionType_} a.pictureSrcIds is null
</if>
</if>
<if test="conditionParamRef.containsKey('pictureSrcIdsList')">
<if test="conditionParamRef.containsKey('pictureSrcIdsList') and conditionParamRef.pictureSrcIdsList.size() > 0">
${_conditionType_} a.pictureSrcIds in
<foreach collection="conditionParamRef.pictureSrcIdsList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pictureSrcIdsNotList') and conditionParamRef.pictureSrcIdsNotList.size() > 0">
${_conditionType_} a.pictureSrcIds not in
<foreach collection="conditionParamRef.pictureSrcIdsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pictureBackgroundIds')">
<if test="conditionParamRef.pictureBackgroundIds != null and conditionParamRef.pictureBackgroundIds != ''">
......@@ -501,12 +580,18 @@
${_conditionType_} a.pictureBackgroundIds is null
</if>
</if>
<if test="conditionParamRef.containsKey('pictureBackgroundIdsList')">
<if test="conditionParamRef.containsKey('pictureBackgroundIdsList') and conditionParamRef.pictureBackgroundIdsList.size() > 0">
${_conditionType_} a.pictureBackgroundIds in
<foreach collection="conditionParamRef.pictureBackgroundIdsList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pictureBackgroundIdsNotList') and conditionParamRef.pictureBackgroundIdsNotList.size() > 0">
${_conditionType_} a.pictureBackgroundIds not in
<foreach collection="conditionParamRef.pictureBackgroundIdsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('fontIds')">
<if test="conditionParamRef.fontIds != null and conditionParamRef.fontIds != ''">
......@@ -516,12 +601,18 @@
${_conditionType_} a.fontIds is null
</if>
</if>
<if test="conditionParamRef.containsKey('fontIdsList')">
<if test="conditionParamRef.containsKey('fontIdsList') and conditionParamRef.fontIdsList.size() > 0">
${_conditionType_} a.fontIds in
<foreach collection="conditionParamRef.fontIdsList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('fontIdsNotList') and conditionParamRef.fontIdsNotList.size() > 0">
${_conditionType_} a.fontIds not in
<foreach collection="conditionParamRef.fontIdsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('previewUrl')">
<if test="conditionParamRef.previewUrl != null and conditionParamRef.previewUrl != ''">
......@@ -531,12 +622,18 @@
${_conditionType_} a.previewUrl is null
</if>
</if>
<if test="conditionParamRef.containsKey('previewUrlList')">
<if test="conditionParamRef.containsKey('previewUrlList') and conditionParamRef.previewUrlList.size() > 0">
${_conditionType_} a.previewUrl in
<foreach collection="conditionParamRef.previewUrlList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('previewUrlNotList') and conditionParamRef.previewUrlNotList.size() > 0">
${_conditionType_} a.previewUrl not in
<foreach collection="conditionParamRef.previewUrlNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('draft')">
<if test="conditionParamRef.draft != null and conditionParamRef.draft != ''">
......@@ -546,12 +643,45 @@
${_conditionType_} a.draft is null
</if>
</if>
<if test="conditionParamRef.containsKey('draftList')">
<if test="conditionParamRef.containsKey('draftList') and conditionParamRef.draftList.size() > 0">
${_conditionType_} a.draft in
<foreach collection="conditionParamRef.draftList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('draftNotList') and conditionParamRef.draftNotList.size() > 0">
${_conditionType_} a.draft not in
<foreach collection="conditionParamRef.draftNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('designType')">
<if test="conditionParamRef.designType != null ">
${_conditionType_} a.designType = #{${_conditionParam_}.designType}
</if>
<if test="conditionParamRef.designType == null">
${_conditionType_} a.designType is null
</if>
</if>
<if test="conditionParamRef.containsKey('designTypeList') and conditionParamRef.designTypeList.size() > 0">
${_conditionType_} a.designType in
<foreach collection="conditionParamRef.designTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('designTypeNotList') and conditionParamRef.designTypeNotList.size() > 0">
${_conditionType_} a.designType not in
<foreach collection="conditionParamRef.designTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('designTypeStart') and conditionParamRef.designTypeStart != null">
${_conditionType_} a.designType <![CDATA[ >= ]]> #{${_conditionParam_}.designTypeStart}
</if>
<if test="conditionParamRef.containsKey('designTypeEnd') and conditionParamRef.designTypeEnd != null">
${_conditionType_} a.designType <![CDATA[ <= ]]> #{${_conditionParam_}.designTypeEnd}
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -630,6 +760,11 @@
<if test='orderCol.draft != null and "DESC".equalsIgnoreCase(orderCol.draft)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('designType')">
a.designType
<if test='orderCol.designType != null and "DESC".equalsIgnoreCase(orderCol.designType)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
......
......@@ -21,6 +21,7 @@
<result property="previewUrl" column="previewUrl" />
<result property="draft" column="draft" />
<result property="plateType" column="plateType" />
<result property="designType" column="designType" />
</resultMap>
......@@ -76,23 +77,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('plateType') or colPickMode == 1 and data.containsKey('plateType')))">
a.plateType,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('designType') or colPickMode == 1 and data.containsKey('designType')))">
a.designType,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="DesignMasterplateEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_design_masterplate
(masterplateName,masterplateCode,customerId,customerName,createTime,masterplateDesc,masterplatePath,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,masterplateUseNum,previewUrl,draft,plateType)
(masterplateName,masterplateCode,customerId,customerName,createTime,masterplateDesc,masterplatePath,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,masterplateUseNum,previewUrl,draft,plateType,designType)
VALUES
(#{masterplateName},#{masterplateCode},#{customerId},#{customerName},#{createTime},#{masterplateDesc},#{masterplatePath},#{pictureIds},#{pictureSrcIds},#{pictureBackgroundIds},#{fontIds},#{masterplateUseNum},#{previewUrl},#{draft},#{plateType})
(#{masterplateName},#{masterplateCode},#{customerId},#{customerName},#{createTime},#{masterplateDesc},#{masterplatePath},#{pictureIds},#{pictureSrcIds},#{pictureBackgroundIds},#{fontIds},#{masterplateUseNum},#{previewUrl},#{draft},#{plateType},#{designType})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_design_masterplate
(masterplateName,masterplateCode,customerId,customerName,createTime,masterplateDesc,masterplatePath,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,masterplateUseNum,previewUrl,draft,plateType)
(masterplateName,masterplateCode,customerId,customerName,createTime,masterplateDesc,masterplatePath,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,masterplateUseNum,previewUrl,draft,plateType,designType)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.masterplateName},#{item.masterplateCode},#{item.customerId},#{item.customerName},#{item.createTime},#{item.masterplateDesc},#{item.masterplatePath},#{item.pictureIds},#{item.pictureSrcIds},#{item.pictureBackgroundIds},#{item.fontIds},#{item.masterplateUseNum},#{item.previewUrl},#{item.draft},#{item.plateType})
(#{item.masterplateName},#{item.masterplateCode},#{item.customerId},#{item.customerName},#{item.createTime},#{item.masterplateDesc},#{item.masterplatePath},#{item.pictureIds},#{item.pictureSrcIds},#{item.pictureBackgroundIds},#{item.fontIds},#{item.masterplateUseNum},#{item.previewUrl},#{item.draft},#{item.plateType},#{item.designType})
</foreach>
</insert>
......@@ -159,6 +163,12 @@
<if test="(colPickMode==0 and data.containsKey('plateTypeIncrement')) or (colPickMode==1 and !data.containsKey('plateTypeIncrement'))">
a.plateType=ifnull(a.plateType,0) + #{data.plateTypeIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('designType')) or (colPickMode==1 and !data.containsKey('designType'))">
a.designType=#{data.designType},
</if>
<if test="(colPickMode==0 and data.containsKey('designTypeIncrement')) or (colPickMode==1 and !data.containsKey('designTypeIncrement'))">
a.designType=ifnull(a.designType,0) + #{data.designTypeIncrement},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -296,6 +306,18 @@
</choose>
</foreach>
</trim>
<trim prefix="designType=(case" suffix="ELSE designType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('designType')) or (colPickMode==1 and !item.containsKey('designType'))">
when a.id=#{item.id} then #{item.designType}
</when>
<when test="(colPickMode==0 and item.containsKey('designTypeIncrement')) or (colPickMode==1 and !item.containsKey('designTypeIncrement'))">
when a.id=#{item.id} then ifnull(a.designType,0) + #{item.designTypeIncrement}
</when>
</choose>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -319,6 +341,21 @@
#{item}
</foreach>
</delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_xhx_design_masterplate where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_xhx_design_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_design_masterplate as a
......@@ -405,12 +442,18 @@
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList')">
<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>
......@@ -427,12 +470,18 @@
${_conditionType_} a.masterplateName is null
</if>
</if>
<if test="conditionParamRef.containsKey('masterplateNameList')">
<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('masterplateCode')">
<if test="conditionParamRef.masterplateCode != null ">
${_conditionType_} a.masterplateCode = #{${_conditionParam_}.masterplateCode}
......@@ -441,12 +490,18 @@
${_conditionType_} a.masterplateCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('masterplateCodeList')">
<if test="conditionParamRef.containsKey('masterplateCodeList') and conditionParamRef.masterplateCodeList.size() > 0">
${_conditionType_} a.masterplateCode in
<foreach collection="conditionParamRef.masterplateCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('masterplateCodeNotList') and conditionParamRef.masterplateCodeNotList.size() > 0">
${_conditionType_} a.masterplateCode not in
<foreach collection="conditionParamRef.masterplateCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('masterplateCodeStart') and conditionParamRef.masterplateCodeStart != null">
${_conditionType_} a.masterplateCode <![CDATA[ >= ]]> #{${_conditionParam_}.masterplateCodeStart}
</if>
......@@ -462,12 +517,18 @@
${_conditionType_} a.customerId is null
</if>
</if>
<if test="conditionParamRef.containsKey('customerIdList')">
<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>
......@@ -484,12 +545,18 @@
${_conditionType_} a.customerName is null
</if>
</if>
<if test="conditionParamRef.containsKey('customerNameList')">
<if test="conditionParamRef.containsKey('customerNameList') and conditionParamRef.customerNameList.size() > 0">
${_conditionType_} a.customerName in
<foreach collection="conditionParamRef.customerNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('customerNameNotList') and conditionParamRef.customerNameNotList.size() > 0">
${_conditionType_} a.customerName not in
<foreach collection="conditionParamRef.customerNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
......@@ -514,12 +581,18 @@
${_conditionType_} a.masterplateDesc is null
</if>
</if>
<if test="conditionParamRef.containsKey('masterplateDescList')">
<if test="conditionParamRef.containsKey('masterplateDescList') and conditionParamRef.masterplateDescList.size() > 0">
${_conditionType_} a.masterplateDesc in
<foreach collection="conditionParamRef.masterplateDescList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('masterplateDescNotList') and conditionParamRef.masterplateDescNotList.size() > 0">
${_conditionType_} a.masterplateDesc not in
<foreach collection="conditionParamRef.masterplateDescNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('masterplatePath')">
<if test="conditionParamRef.masterplatePath != null and conditionParamRef.masterplatePath != ''">
......@@ -529,12 +602,18 @@
${_conditionType_} a.masterplatePath is null
</if>
</if>
<if test="conditionParamRef.containsKey('masterplatePathList')">
<if test="conditionParamRef.containsKey('masterplatePathList') and conditionParamRef.masterplatePathList.size() > 0">
${_conditionType_} a.masterplatePath in
<foreach collection="conditionParamRef.masterplatePathList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('masterplatePathNotList') and conditionParamRef.masterplatePathNotList.size() > 0">
${_conditionType_} a.masterplatePath not in
<foreach collection="conditionParamRef.masterplatePathNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pictureIds')">
<if test="conditionParamRef.pictureIds != null and conditionParamRef.pictureIds != ''">
......@@ -544,12 +623,18 @@
${_conditionType_} a.pictureIds is null
</if>
</if>
<if test="conditionParamRef.containsKey('pictureIdsList')">
<if test="conditionParamRef.containsKey('pictureIdsList') and conditionParamRef.pictureIdsList.size() > 0">
${_conditionType_} a.pictureIds in
<foreach collection="conditionParamRef.pictureIdsList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pictureIdsNotList') and conditionParamRef.pictureIdsNotList.size() > 0">
${_conditionType_} a.pictureIds not in
<foreach collection="conditionParamRef.pictureIdsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pictureSrcIds')">
<if test="conditionParamRef.pictureSrcIds != null and conditionParamRef.pictureSrcIds != ''">
......@@ -559,12 +644,18 @@
${_conditionType_} a.pictureSrcIds is null
</if>
</if>
<if test="conditionParamRef.containsKey('pictureSrcIdsList')">
<if test="conditionParamRef.containsKey('pictureSrcIdsList') and conditionParamRef.pictureSrcIdsList.size() > 0">
${_conditionType_} a.pictureSrcIds in
<foreach collection="conditionParamRef.pictureSrcIdsList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pictureSrcIdsNotList') and conditionParamRef.pictureSrcIdsNotList.size() > 0">
${_conditionType_} a.pictureSrcIds not in
<foreach collection="conditionParamRef.pictureSrcIdsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pictureBackgroundIds')">
<if test="conditionParamRef.pictureBackgroundIds != null and conditionParamRef.pictureBackgroundIds != ''">
......@@ -574,12 +665,18 @@
${_conditionType_} a.pictureBackgroundIds is null
</if>
</if>
<if test="conditionParamRef.containsKey('pictureBackgroundIdsList')">
<if test="conditionParamRef.containsKey('pictureBackgroundIdsList') and conditionParamRef.pictureBackgroundIdsList.size() > 0">
${_conditionType_} a.pictureBackgroundIds in
<foreach collection="conditionParamRef.pictureBackgroundIdsList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pictureBackgroundIdsNotList') and conditionParamRef.pictureBackgroundIdsNotList.size() > 0">
${_conditionType_} a.pictureBackgroundIds not in
<foreach collection="conditionParamRef.pictureBackgroundIdsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('fontIds')">
<if test="conditionParamRef.fontIds != null and conditionParamRef.fontIds != ''">
......@@ -589,12 +686,18 @@
${_conditionType_} a.fontIds is null
</if>
</if>
<if test="conditionParamRef.containsKey('fontIdsList')">
<if test="conditionParamRef.containsKey('fontIdsList') and conditionParamRef.fontIdsList.size() > 0">
${_conditionType_} a.fontIds in
<foreach collection="conditionParamRef.fontIdsList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('fontIdsNotList') and conditionParamRef.fontIdsNotList.size() > 0">
${_conditionType_} a.fontIds not in
<foreach collection="conditionParamRef.fontIdsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('masterplateUseNum')">
<if test="conditionParamRef.masterplateUseNum != null ">
${_conditionType_} a.masterplateUseNum = #{${_conditionParam_}.masterplateUseNum}
......@@ -603,12 +706,18 @@
${_conditionType_} a.masterplateUseNum is null
</if>
</if>
<if test="conditionParamRef.containsKey('masterplateUseNumList')">
<if test="conditionParamRef.containsKey('masterplateUseNumList') and conditionParamRef.masterplateUseNumList.size() > 0">
${_conditionType_} a.masterplateUseNum in
<foreach collection="conditionParamRef.masterplateUseNumList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('masterplateUseNumNotList') and conditionParamRef.masterplateUseNumNotList.size() > 0">
${_conditionType_} a.masterplateUseNum not in
<foreach collection="conditionParamRef.masterplateUseNumNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('masterplateUseNumStart') and conditionParamRef.masterplateUseNumStart != null">
${_conditionType_} a.masterplateUseNum <![CDATA[ >= ]]> #{${_conditionParam_}.masterplateUseNumStart}
</if>
......@@ -625,12 +734,18 @@
${_conditionType_} a.previewUrl is null
</if>
</if>
<if test="conditionParamRef.containsKey('previewUrlList')">
<if test="conditionParamRef.containsKey('previewUrlList') and conditionParamRef.previewUrlList.size() > 0">
${_conditionType_} a.previewUrl in
<foreach collection="conditionParamRef.previewUrlList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('previewUrlNotList') and conditionParamRef.previewUrlNotList.size() > 0">
${_conditionType_} a.previewUrl not in
<foreach collection="conditionParamRef.previewUrlNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('draft')">
<if test="conditionParamRef.draft != null and conditionParamRef.draft != ''">
......@@ -640,12 +755,18 @@
${_conditionType_} a.draft is null
</if>
</if>
<if test="conditionParamRef.containsKey('draftList')">
<if test="conditionParamRef.containsKey('draftList') and conditionParamRef.draftList.size() > 0">
${_conditionType_} a.draft in
<foreach collection="conditionParamRef.draftList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('draftNotList') and conditionParamRef.draftNotList.size() > 0">
${_conditionType_} a.draft not in
<foreach collection="conditionParamRef.draftNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('plateType')">
<if test="conditionParamRef.plateType != null ">
${_conditionType_} a.plateType = #{${_conditionParam_}.plateType}
......@@ -654,12 +775,18 @@
${_conditionType_} a.plateType is null
</if>
</if>
<if test="conditionParamRef.containsKey('plateTypeList')">
<if test="conditionParamRef.containsKey('plateTypeList') and conditionParamRef.plateTypeList.size() > 0">
${_conditionType_} a.plateType in
<foreach collection="conditionParamRef.plateTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('plateTypeNotList') and conditionParamRef.plateTypeNotList.size() > 0">
${_conditionType_} a.plateType not in
<foreach collection="conditionParamRef.plateTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('plateTypeStart') and conditionParamRef.plateTypeStart != null">
${_conditionType_} a.plateType <![CDATA[ >= ]]> #{${_conditionParam_}.plateTypeStart}
</if>
......@@ -667,6 +794,33 @@
${_conditionType_} a.plateType <![CDATA[ <= ]]> #{${_conditionParam_}.plateTypeEnd}
</if>
<if test="conditionParamRef.containsKey('designType')">
<if test="conditionParamRef.designType != null ">
${_conditionType_} a.designType = #{${_conditionParam_}.designType}
</if>
<if test="conditionParamRef.designType == null">
${_conditionType_} a.designType is null
</if>
</if>
<if test="conditionParamRef.containsKey('designTypeList') and conditionParamRef.designTypeList.size() > 0">
${_conditionType_} a.designType in
<foreach collection="conditionParamRef.designTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('designTypeNotList') and conditionParamRef.designTypeNotList.size() > 0">
${_conditionType_} a.designType not in
<foreach collection="conditionParamRef.designTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('designTypeStart') and conditionParamRef.designTypeStart != null">
${_conditionType_} a.designType <![CDATA[ >= ]]> #{${_conditionParam_}.designTypeStart}
</if>
<if test="conditionParamRef.containsKey('designTypeEnd') and conditionParamRef.designTypeEnd != null">
${_conditionType_} a.designType <![CDATA[ <= ]]> #{${_conditionParam_}.designTypeEnd}
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -760,6 +914,11 @@
<if test='orderCol.plateType != null and "DESC".equalsIgnoreCase(orderCol.plateType)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('designType')">
a.designType
<if test='orderCol.designType != null and "DESC".equalsIgnoreCase(orderCol.designType)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
......
......@@ -50,14 +50,14 @@
</dependency>
<!-- 引入 Spring Cloud Alibaba Nacos Config 相关依赖,将 Nacos 作为配置中心,并实现对其的自动配置 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.alibaba.cloud</groupId>-->
<!-- <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.alibaba.cloud</groupId>-->
<!-- <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>-->
<!-- </dependency>-->
</dependencies>
......
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