Commit 787ee02e authored by 廖旭伟's avatar 廖旭伟

客户试用申请修改,客户状态bug修改

parent 9100c632
...@@ -1000,8 +1000,9 @@ size|Integer|否|每页条数,值为-1,查询所有记录 ...@@ -1000,8 +1000,9 @@ size|Integer|否|每页条数,值为-1,查询所有记录
**请求样例:** **请求样例:**
``` ```
{ {
"page":1, "query": "a",
"size":10 "page": 1,
"size": 6
} }
``` ```
...@@ -1151,16 +1152,24 @@ dict|object|字典对象 ...@@ -1151,16 +1152,24 @@ dict|object|字典对象
参数名称|类型|必填|描述 参数名称|类型|必填|描述
:---|:---|:---|:------- :---|:---|:---|:-------
customerId|Long|是|客户ID memberLevel|Integer|是|会员等级,,0:未开启,1:试用客户,2:VIP,3:设计师,默认0
memberLevel|Integer|是|申请会员等级,1:试用客户,2:VIP,3:设计师 custName|String|是|客户真实名称
isAccept|Integer|是|受理状态,0:未受理,1:同意,2:不同意。默认:0 organization|String|是|单位名称
contactTelphone|String|是|联系电话
sex|Integer|是|性别
mailbox|String|是|邮箱
job|String|是|职位
**请求样例:** **请求样例:**
``` ```
{ {
"customerId":6633, "contactTelphone": "13888888888",
"memberLevel":5866, "custName": "测试",
"isAccept":6478, "job": "总监",
"mailbox": "qqq@123.com",
"organization": "测试公司",
"memberLevel":1,
"sex":1
} }
``` ```
...@@ -1171,15 +1180,6 @@ isAccept|Integer|是|受理状态,0:未受理,1:同意,2:不同意。默 ...@@ -1171,15 +1180,6 @@ isAccept|Integer|是|受理状态,0:未受理,1:同意,2:不同意。默
code|Integer|结果码(-1.失败,1.成功) code|Integer|结果码(-1.失败,1.成功)
msg|String|消息 msg|String|消息
data|object|数据对象 data|object|数据对象
 id|Long|保存后主键id
 entity|object|保存更新实体
  id|Long|主键ID,主键,自增长
  customerId|Long|客户ID
  memberLevel|Integer|申请会员等级,1:试用客户,2:VIP,3:设计师
  isAccept|Integer|受理状态,0:未受理,1:同意,2:不同意。默认:0
  createUserId|Long|受理用户
  createTime|Date|提交时间
  updateTime|Date|受理时间
**响应消息样例:** **响应消息样例:**
``` ```
...@@ -4634,13 +4634,15 @@ data|object|数据对象 ...@@ -4634,13 +4634,15 @@ data|object|数据对象
id|Long|是|作品id id|Long|是|作品id
masterplateName|String|是|模板名称 masterplateName|String|是|模板名称
frontCover|String|是|封面图片地址(相对地址) frontCover|String|是|封面图片地址(相对地址)
plateType|int|是|板式
**请求样例:** **请求样例:**
``` ```
{ {
"id":6797, "id":6797,
"masterplateName":"c42lp8", "masterplateName":"c42lp8",
"frontCover":"g3odxd" "frontCover":"g3odxd",
"plateType":1
} }
``` ```
......
...@@ -16,5 +16,4 @@ import java.util.List; ...@@ -16,5 +16,4 @@ import java.util.List;
*/ */
public interface CustomerTrialDao extends ICRUDDao<CustomerTrialEntity,Long>{ public interface CustomerTrialDao extends ICRUDDao<CustomerTrialEntity,Long>{
Result<CustomerTrialEntityExt> getListExt(CustomerTrialEntity params, PageInfo pageInfo);
} }
...@@ -23,40 +23,4 @@ import java.util.List; ...@@ -23,40 +23,4 @@ import java.util.List;
@Repository("customerTrialDao") @Repository("customerTrialDao")
public class CustomerTrialDaoImpl extends BaseCRUDDaoMybatis<CustomerTrialEntity,Long> implements CustomerTrialDao { public class CustomerTrialDaoImpl extends BaseCRUDDaoMybatis<CustomerTrialEntity,Long> implements CustomerTrialDao {
@Override
public Result<CustomerTrialEntityExt> getListExt(CustomerTrialEntity param, PageInfo pageInfo) {
ParamDto paramDto = this.getQueryParam(param);
Result result = new Result();
List list = null;
if (pageInfo.isCountPage()) {
int count = this.getCount(paramDto, "getListExtCount");
if (count == 0) {
list = new ArrayList();
} else if (pageInfo.getPrePageResult() == -1) {
list = this.getSqlSession().selectList(this.getSqlId("getListExt"), paramDto);
} else {
RowBounds rowBounds = new RowBounds(pageInfo.getBeginIndex(), pageInfo.getPrePageResult());
list = this.getSqlSession().selectList(this.getSqlId("getListExt"), this.cpyQueryParamDto(paramDto), rowBounds);
}
pageInfo.setTotalResult(count);
result.setPageInfo(pageInfo);
result.setList((List)list);
} else {
if (pageInfo.getPrePageResult() == -1) {
list = this.getSqlSession().selectList(this.getSqlId("getListExt"), paramDto);
} else {
RowBounds rowBounds = new RowBounds(pageInfo.getBeginIndex(), pageInfo.getPrePageResult());
list = this.getSqlSession().selectList(this.getSqlId("getListExt"), this.cpyQueryParamDto(paramDto), rowBounds);
}
pageInfo.setTotalResult(-1);
result.setPageInfo(pageInfo);
result.setList(list);
}
return result;
}
} }
...@@ -7,80 +7,170 @@ import com.mortals.framework.annotation.Excel; ...@@ -7,80 +7,170 @@ import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.customer.model.vo.CustomerTrialVo; import com.mortals.xhx.module.customer.model.vo.CustomerTrialVo;
/** /**
* 客户试用申请实体对象 * 客户试用申请实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-06-08 * @date 2022-07-26
*/ */
public class CustomerTrialEntity extends CustomerTrialVo { public class CustomerTrialEntity extends CustomerTrialVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 客户ID * 申请会员等级,1:试用客户,2:VIP,3:设计师
*/ */
private Long customerId;
/**
* 申请会员等级,1:试用客户,2:VIP,3:设计师
*/
private Integer memberLevel; private Integer memberLevel;
/** /**
* 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 受理状态,0:未受理,1:同意,2:不同意。默认:0
*/ */
private Integer isAccept; private Integer isAccept;
/**
* 客户真实名称
*/
private String custName;
/**
* 单位名称
*/
private String organization;
/**
* 联系电话
*/
private String contactTelphone;
/**
* 性别
*/
private Integer sex;
/**
* 邮箱
*/
private String mailbox;
/**
* 职位
*/
private String job;
public CustomerTrialEntity(){} public CustomerTrialEntity(){}
/** /**
* 获取 客户ID * 获取 申请会员等级,1:试用客户,2:VIP,3:设计师
* @return Long * @return Integer
*/ */
public Long getCustomerId(){
return customerId;
}
/**
* 设置 客户ID
* @param customerId
*/
public void setCustomerId(Long customerId){
this.customerId = customerId;
}
/**
* 获取 申请会员等级,1:试用客户,2:VIP,3:设计师
* @return Integer
*/
public Integer getMemberLevel(){ public Integer getMemberLevel(){
return memberLevel; return memberLevel;
} }
/** /**
* 设置 申请会员等级,1:试用客户,2:VIP,3:设计师 * 设置 申请会员等级,1:试用客户,2:VIP,3:设计师
* @param memberLevel * @param memberLevel
*/ */
public void setMemberLevel(Integer memberLevel){ public void setMemberLevel(Integer memberLevel){
this.memberLevel = memberLevel; this.memberLevel = memberLevel;
} }
/** /**
* 获取 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 获取 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @return Integer * @return Integer
*/ */
public Integer getIsAccept(){ public Integer getIsAccept(){
return isAccept; return isAccept;
} }
/** /**
* 设置 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 设置 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @param isAccept * @param isAccept
*/ */
public void setIsAccept(Integer isAccept){ public void setIsAccept(Integer isAccept){
this.isAccept = isAccept; this.isAccept = isAccept;
} }
/**
* 获取 客户真实名称
* @return String
*/
public String getCustName(){
return custName;
}
/**
* 设置 客户真实名称
* @param custName
*/
public void setCustName(String custName){
this.custName = custName;
}
/**
* 获取 单位名称
* @return String
*/
public String getOrganization(){
return organization;
}
/**
* 设置 单位名称
* @param organization
*/
public void setOrganization(String organization){
this.organization = organization;
}
/**
* 获取 联系电话
* @return String
*/
public String getContactTelphone(){
return contactTelphone;
}
/**
* 设置 联系电话
* @param contactTelphone
*/
public void setContactTelphone(String contactTelphone){
this.contactTelphone = contactTelphone;
}
/**
* 获取 性别
* @return Integer
*/
public Integer getSex(){
return sex;
}
/**
* 设置 性别
* @param sex
*/
public void setSex(Integer sex){
this.sex = sex;
}
/**
* 获取 邮箱
* @return String
*/
public String getMailbox(){
return mailbox;
}
/**
* 设置 邮箱
* @param mailbox
*/
public void setMailbox(String mailbox){
this.mailbox = mailbox;
}
/**
* 获取 职位
* @return String
*/
public String getJob(){
return job;
}
/**
* 设置 职位
* @param job
*/
public void setJob(String job){
this.job = job;
}
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
...@@ -88,7 +178,7 @@ public class CustomerTrialEntity extends CustomerTrialVo { ...@@ -88,7 +178,7 @@ public class CustomerTrialEntity extends CustomerTrialVo {
if (obj instanceof CustomerTrialEntity) { if (obj instanceof CustomerTrialEntity) {
CustomerTrialEntity tmp = (CustomerTrialEntity) obj; CustomerTrialEntity tmp = (CustomerTrialEntity) obj;
if (this.getId() == tmp.getId()) { if (this.getId() == tmp.getId()) {
return true; return true;
} }
} }
return false; return false;
...@@ -96,18 +186,33 @@ public class CustomerTrialEntity extends CustomerTrialVo { ...@@ -96,18 +186,33 @@ public class CustomerTrialEntity extends CustomerTrialVo {
public String toString(){ public String toString(){
StringBuilder sb = new StringBuilder(""); StringBuilder sb = new StringBuilder("");
sb.append(",customerId:").append(getCustomerId());
sb.append(",memberLevel:").append(getMemberLevel()); sb.append(",memberLevel:").append(getMemberLevel());
sb.append(",isAccept:").append(getIsAccept()); sb.append(",isAccept:").append(getIsAccept());
sb.append(",custName:").append(getCustName());
sb.append(",organization:").append(getOrganization());
sb.append(",contactTelphone:").append(getContactTelphone());
sb.append(",sex:").append(getSex());
sb.append(",mailbox:").append(getMailbox());
sb.append(",job:").append(getJob());
return sb.toString(); return sb.toString();
} }
public void initAttrValue(){ public void initAttrValue(){
this.customerId = null; this.memberLevel = null;
this.isAccept = null;
this.custName = "";
this.organization = "";
this.contactTelphone = "";
this.sex = null;
this.memberLevel = null; this.mailbox = "";
this.isAccept = null; this.job = "";
} }
} }
\ No newline at end of file
...@@ -3,11 +3,11 @@ package com.mortals.xhx.module.customer.model; ...@@ -3,11 +3,11 @@ package com.mortals.xhx.module.customer.model;
import java.util.List; import java.util.List;
import com.mortals.xhx.module.customer.model.CustomerTrialEntity; import com.mortals.xhx.module.customer.model.CustomerTrialEntity;
/** /**
* 客户试用申请查询对象 * 客户试用申请查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-06-08 * @date 2022-07-26
*/ */
public class CustomerTrialQuery extends CustomerTrialEntity { public class CustomerTrialQuery extends CustomerTrialEntity {
/** 开始 主键ID,主键,自增长 */ /** 开始 主键ID,主键,自增长 */
private Long idStart; private Long idStart;
...@@ -21,18 +21,6 @@ public class CustomerTrialQuery extends CustomerTrialEntity { ...@@ -21,18 +21,6 @@ public class CustomerTrialQuery extends CustomerTrialEntity {
/** 主键ID,主键,自增长列表 */ /** 主键ID,主键,自增长列表 */
private List <Long> idList; private List <Long> idList;
/** 开始 客户ID */
private Long customerIdStart;
/** 结束 客户ID */
private Long customerIdEnd;
/** 增加 客户ID */
private Long customerIdIncrement;
/** 客户ID列表 */
private List <Long> customerIdList;
/** 开始 申请会员等级,1:试用客户,2:VIP,3:设计师 */ /** 开始 申请会员等级,1:试用客户,2:VIP,3:设计师 */
private Integer memberLevelStart; private Integer memberLevelStart;
...@@ -81,679 +69,852 @@ public class CustomerTrialQuery extends CustomerTrialEntity { ...@@ -81,679 +69,852 @@ public class CustomerTrialQuery extends CustomerTrialEntity {
/** 结束 受理时间 */ /** 结束 受理时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 客户真实名称 */
private List<String> custNameList;
/** 单位名称 */
private List<String> organizationList;
/** 联系电话 */
private List<String> contactTelphoneList;
/** 开始 性别 */
private Integer sexStart;
/** 结束 性别 */
private Integer sexEnd;
/** 增加 性别 */
private Integer sexIncrement;
/** 性别列表 */
private List <Integer> sexList;
/** 邮箱 */
private List<String> mailboxList;
/** 职位 */
private List<String> jobList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<CustomerTrialQuery> orConditionList; private List<CustomerTrialQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */ /** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<CustomerTrialQuery> andConditionList; private List<CustomerTrialQuery> andConditionList;
/**
* 客户真实名称
*/
private String custName;
/**
* 联系电话
*/
private String contactTelphone;
public CustomerTrialQuery(){} public CustomerTrialQuery(){}
/** /**
* 获取 开始 主键ID,主键,自增长 * 获取 开始 主键ID,主键,自增长
* @return idStart * @return idStart
*/ */
public Long getIdStart(){ public Long getIdStart(){
return this.idStart; return this.idStart;
} }
/** /**
* 设置 开始 主键ID,主键,自增长 * 设置 开始 主键ID,主键,自增长
* @param idStart * @param idStart
*/ */
public void setIdStart(Long idStart){ public void setIdStart(Long idStart){
this.idStart = idStart; this.idStart = idStart;
} }
/** /**
* 获取 结束 主键ID,主键,自增长 * 获取 结束 主键ID,主键,自增长
* @return $idEnd * @return $idEnd
*/ */
public Long getIdEnd(){ public Long getIdEnd(){
return this.idEnd; return this.idEnd;
} }
/** /**
* 设置 结束 主键ID,主键,自增长 * 设置 结束 主键ID,主键,自增长
* @param idEnd * @param idEnd
*/ */
public void setIdEnd(Long idEnd){ public void setIdEnd(Long idEnd){
this.idEnd = idEnd; this.idEnd = idEnd;
} }
/** /**
* 获取 增加 主键ID,主键,自增长 * 获取 增加 主键ID,主键,自增长
* @return idIncrement * @return idIncrement
*/ */
public Long getIdIncrement(){ public Long getIdIncrement(){
return this.idIncrement; return this.idIncrement;
} }
/** /**
* 设置 增加 主键ID,主键,自增长 * 设置 增加 主键ID,主键,自增长
* @param idIncrement * @param idIncrement
*/ */
public void setIdIncrement(Long idIncrement){ public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement; this.idIncrement = idIncrement;
} }
/** /**
* 获取 主键ID,主键,自增长 * 获取 主键ID,主键,自增长
* @return idList * @return idList
*/ */
public List<Long> getIdList(){ public List<Long> getIdList(){
return this.idList; return this.idList;
} }
/** /**
* 设置 主键ID,主键,自增长 * 设置 主键ID,主键,自增长
* @param idList * @param idList
*/ */
public void setIdList(List<Long> idList){ public void setIdList(List<Long> idList){
this.idList = idList; this.idList = idList;
} }
/** /**
* 获取 开始 客户ID * 获取 开始 申请会员等级,1:试用客户,2:VIP,3:设计师
* @return customerIdStart * @return memberLevelStart
*/ */
public Long getCustomerIdStart(){
return this.customerIdStart;
}
/**
* 设置 开始 客户ID
* @param customerIdStart
*/
public void setCustomerIdStart(Long customerIdStart){
this.customerIdStart = customerIdStart;
}
/**
* 获取 结束 客户ID
* @return $customerIdEnd
*/
public Long getCustomerIdEnd(){
return this.customerIdEnd;
}
/**
* 设置 结束 客户ID
* @param customerIdEnd
*/
public void setCustomerIdEnd(Long customerIdEnd){
this.customerIdEnd = customerIdEnd;
}
/**
* 获取 增加 客户ID
* @return customerIdIncrement
*/
public Long getCustomerIdIncrement(){
return this.customerIdIncrement;
}
/**
* 设置 增加 客户ID
* @param customerIdIncrement
*/
public void setCustomerIdIncrement(Long customerIdIncrement){
this.customerIdIncrement = customerIdIncrement;
}
/**
* 获取 客户ID
* @return customerIdList
*/
public List<Long> getCustomerIdList(){
return this.customerIdList;
}
/**
* 设置 客户ID
* @param customerIdList
*/
public void setCustomerIdList(List<Long> customerIdList){
this.customerIdList = customerIdList;
}
/**
* 获取 开始 申请会员等级,1:试用客户,2:VIP,3:设计师
* @return memberLevelStart
*/
public Integer getMemberLevelStart(){ public Integer getMemberLevelStart(){
return this.memberLevelStart; return this.memberLevelStart;
} }
/** /**
* 设置 开始 申请会员等级,1:试用客户,2:VIP,3:设计师 * 设置 开始 申请会员等级,1:试用客户,2:VIP,3:设计师
* @param memberLevelStart * @param memberLevelStart
*/ */
public void setMemberLevelStart(Integer memberLevelStart){ public void setMemberLevelStart(Integer memberLevelStart){
this.memberLevelStart = memberLevelStart; this.memberLevelStart = memberLevelStart;
} }
/** /**
* 获取 结束 申请会员等级,1:试用客户,2:VIP,3:设计师 * 获取 结束 申请会员等级,1:试用客户,2:VIP,3:设计师
* @return $memberLevelEnd * @return $memberLevelEnd
*/ */
public Integer getMemberLevelEnd(){ public Integer getMemberLevelEnd(){
return this.memberLevelEnd; return this.memberLevelEnd;
} }
/** /**
* 设置 结束 申请会员等级,1:试用客户,2:VIP,3:设计师 * 设置 结束 申请会员等级,1:试用客户,2:VIP,3:设计师
* @param memberLevelEnd * @param memberLevelEnd
*/ */
public void setMemberLevelEnd(Integer memberLevelEnd){ public void setMemberLevelEnd(Integer memberLevelEnd){
this.memberLevelEnd = memberLevelEnd; this.memberLevelEnd = memberLevelEnd;
} }
/** /**
* 获取 增加 申请会员等级,1:试用客户,2:VIP,3:设计师 * 获取 增加 申请会员等级,1:试用客户,2:VIP,3:设计师
* @return memberLevelIncrement * @return memberLevelIncrement
*/ */
public Integer getMemberLevelIncrement(){ public Integer getMemberLevelIncrement(){
return this.memberLevelIncrement; return this.memberLevelIncrement;
} }
/** /**
* 设置 增加 申请会员等级,1:试用客户,2:VIP,3:设计师 * 设置 增加 申请会员等级,1:试用客户,2:VIP,3:设计师
* @param memberLevelIncrement * @param memberLevelIncrement
*/ */
public void setMemberLevelIncrement(Integer memberLevelIncrement){ public void setMemberLevelIncrement(Integer memberLevelIncrement){
this.memberLevelIncrement = memberLevelIncrement; this.memberLevelIncrement = memberLevelIncrement;
} }
/** /**
* 获取 申请会员等级,1:试用客户,2:VIP,3:设计师 * 获取 申请会员等级,1:试用客户,2:VIP,3:设计师
* @return memberLevelList * @return memberLevelList
*/ */
public List<Integer> getMemberLevelList(){ public List<Integer> getMemberLevelList(){
return this.memberLevelList; return this.memberLevelList;
} }
/** /**
* 设置 申请会员等级,1:试用客户,2:VIP,3:设计师 * 设置 申请会员等级,1:试用客户,2:VIP,3:设计师
* @param memberLevelList * @param memberLevelList
*/ */
public void setMemberLevelList(List<Integer> memberLevelList){ public void setMemberLevelList(List<Integer> memberLevelList){
this.memberLevelList = memberLevelList; this.memberLevelList = memberLevelList;
} }
/** /**
* 获取 开始 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 获取 开始 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @return isAcceptStart * @return isAcceptStart
*/ */
public Integer getIsAcceptStart(){ public Integer getIsAcceptStart(){
return this.isAcceptStart; return this.isAcceptStart;
} }
/** /**
* 设置 开始 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 设置 开始 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @param isAcceptStart * @param isAcceptStart
*/ */
public void setIsAcceptStart(Integer isAcceptStart){ public void setIsAcceptStart(Integer isAcceptStart){
this.isAcceptStart = isAcceptStart; this.isAcceptStart = isAcceptStart;
} }
/** /**
* 获取 结束 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 获取 结束 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @return $isAcceptEnd * @return $isAcceptEnd
*/ */
public Integer getIsAcceptEnd(){ public Integer getIsAcceptEnd(){
return this.isAcceptEnd; return this.isAcceptEnd;
} }
/** /**
* 设置 结束 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 设置 结束 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @param isAcceptEnd * @param isAcceptEnd
*/ */
public void setIsAcceptEnd(Integer isAcceptEnd){ public void setIsAcceptEnd(Integer isAcceptEnd){
this.isAcceptEnd = isAcceptEnd; this.isAcceptEnd = isAcceptEnd;
} }
/** /**
* 获取 增加 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 获取 增加 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @return isAcceptIncrement * @return isAcceptIncrement
*/ */
public Integer getIsAcceptIncrement(){ public Integer getIsAcceptIncrement(){
return this.isAcceptIncrement; return this.isAcceptIncrement;
} }
/** /**
* 设置 增加 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 设置 增加 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @param isAcceptIncrement * @param isAcceptIncrement
*/ */
public void setIsAcceptIncrement(Integer isAcceptIncrement){ public void setIsAcceptIncrement(Integer isAcceptIncrement){
this.isAcceptIncrement = isAcceptIncrement; this.isAcceptIncrement = isAcceptIncrement;
} }
/** /**
* 获取 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 获取 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @return isAcceptList * @return isAcceptList
*/ */
public List<Integer> getIsAcceptList(){ public List<Integer> getIsAcceptList(){
return this.isAcceptList; return this.isAcceptList;
} }
/** /**
* 设置 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 设置 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @param isAcceptList * @param isAcceptList
*/ */
public void setIsAcceptList(List<Integer> isAcceptList){ public void setIsAcceptList(List<Integer> isAcceptList){
this.isAcceptList = isAcceptList; this.isAcceptList = isAcceptList;
} }
/** /**
* 获取 开始 受理用户 * 获取 开始 受理用户
* @return createUserIdStart * @return createUserIdStart
*/ */
public Long getCreateUserIdStart(){ public Long getCreateUserIdStart(){
return this.createUserIdStart; return this.createUserIdStart;
} }
/** /**
* 设置 开始 受理用户 * 设置 开始 受理用户
* @param createUserIdStart * @param createUserIdStart
*/ */
public void setCreateUserIdStart(Long createUserIdStart){ public void setCreateUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart; this.createUserIdStart = createUserIdStart;
} }
/** /**
* 获取 结束 受理用户 * 获取 结束 受理用户
* @return $createUserIdEnd * @return $createUserIdEnd
*/ */
public Long getCreateUserIdEnd(){ public Long getCreateUserIdEnd(){
return this.createUserIdEnd; return this.createUserIdEnd;
} }
/** /**
* 设置 结束 受理用户 * 设置 结束 受理用户
* @param createUserIdEnd * @param createUserIdEnd
*/ */
public void setCreateUserIdEnd(Long createUserIdEnd){ public void setCreateUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd; this.createUserIdEnd = createUserIdEnd;
} }
/** /**
* 获取 增加 受理用户 * 获取 增加 受理用户
* @return createUserIdIncrement * @return createUserIdIncrement
*/ */
public Long getCreateUserIdIncrement(){ public Long getCreateUserIdIncrement(){
return this.createUserIdIncrement; return this.createUserIdIncrement;
} }
/** /**
* 设置 增加 受理用户 * 设置 增加 受理用户
* @param createUserIdIncrement * @param createUserIdIncrement
*/ */
public void setCreateUserIdIncrement(Long createUserIdIncrement){ public void setCreateUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement; this.createUserIdIncrement = createUserIdIncrement;
} }
/** /**
* 获取 受理用户 * 获取 受理用户
* @return createUserIdList * @return createUserIdList
*/ */
public List<Long> getCreateUserIdList(){ public List<Long> getCreateUserIdList(){
return this.createUserIdList; return this.createUserIdList;
} }
/** /**
* 设置 受理用户 * 设置 受理用户
* @param createUserIdList * @param createUserIdList
*/ */
public void setCreateUserIdList(List<Long> createUserIdList){ public void setCreateUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList; this.createUserIdList = createUserIdList;
} }
/** /**
* 获取 开始 提交时间 * 获取 开始 提交时间
* @return createTimeStart * @return createTimeStart
*/ */
public String getCreateTimeStart(){ public String getCreateTimeStart(){
return this.createTimeStart; return this.createTimeStart;
} }
/** /**
* 设置 开始 提交时间 * 设置 开始 提交时间
* @param createTimeStart * @param createTimeStart
*/ */
public void setCreateTimeStart(String createTimeStart){ public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart; this.createTimeStart = createTimeStart;
} }
/** /**
* 获取 结束 提交时间 * 获取 结束 提交时间
* @return createTimeEnd * @return createTimeEnd
*/ */
public String getCreateTimeEnd(){ public String getCreateTimeEnd(){
return this.createTimeEnd; return this.createTimeEnd;
} }
/** /**
* 设置 结束 提交时间 * 设置 结束 提交时间
* @param createTimeEnd * @param createTimeEnd
*/ */
public void setCreateTimeEnd(String createTimeEnd){ public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd; this.createTimeEnd = createTimeEnd;
} }
/** /**
* 获取 开始 受理时间 * 获取 开始 受理时间
* @return updateTimeStart * @return updateTimeStart
*/ */
public String getUpdateTimeStart(){ public String getUpdateTimeStart(){
return this.updateTimeStart; return this.updateTimeStart;
} }
/** /**
* 设置 开始 受理时间 * 设置 开始 受理时间
* @param updateTimeStart * @param updateTimeStart
*/ */
public void setUpdateTimeStart(String updateTimeStart){ public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart; this.updateTimeStart = updateTimeStart;
} }
/** /**
* 获取 结束 受理时间 * 获取 结束 受理时间
* @return updateTimeEnd * @return updateTimeEnd
*/ */
public String getUpdateTimeEnd(){ public String getUpdateTimeEnd(){
return this.updateTimeEnd; return this.updateTimeEnd;
} }
/** /**
* 设置 结束 受理时间 * 设置 结束 受理时间
* @param updateTimeEnd * @param updateTimeEnd
*/ */
public void setUpdateTimeEnd(String updateTimeEnd){ public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/** /**
* 设置 主键ID,主键,自增长 * 获取 客户真实名称
* @param id * @return custNameList
*/ */
public CustomerTrialQuery id(Long id){ public List<String> getCustNameList(){
setId(id); return this.custNameList;
return this;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
public CustomerTrialQuery idStart(Long idStart){
this.idStart = idStart;
return this;
} }
/** /**
* 设置 结束 主键ID,主键,自增长 * 设置 客户真实名称
* @param idEnd * @param custNameList
*/ */
public CustomerTrialQuery idEnd(Long idEnd){ public void setCustNameList(List<String> custNameList){
this.idEnd = idEnd; this.custNameList = custNameList;
return this; }
/**
* 获取 单位名称
* @return organizationList
*/
public List<String> getOrganizationList(){
return this.organizationList;
} }
/** /**
* 设置 增加 主键ID,主键,自增长 * 设置 单位名称
* @param idIncrement * @param organizationList
*/ */
public CustomerTrialQuery idIncrement(Long idIncrement){ public void setOrganizationList(List<String> organizationList){
this.idIncrement = idIncrement; this.organizationList = organizationList;
return this; }
/**
* 获取 联系电话
* @return contactTelphoneList
*/
public List<String> getContactTelphoneList(){
return this.contactTelphoneList;
} }
/** /**
* 设置 主键ID,主键,自增长 * 设置 联系电话
* @param idList * @param contactTelphoneList
*/ */
public CustomerTrialQuery idList(List<Long> idList){ public void setContactTelphoneList(List<String> contactTelphoneList){
this.idList = idList; this.contactTelphoneList = contactTelphoneList;
return this; }
} /**
* 获取 开始 性别
* @return sexStart
*/
public Integer getSexStart(){
return this.sexStart;
}
/**
* 设置 开始 性别
* @param sexStart
*/
public void setSexStart(Integer sexStart){
this.sexStart = sexStart;
}
/**
* 获取 结束 性别
* @return $sexEnd
*/
public Integer getSexEnd(){
return this.sexEnd;
}
/**
* 设置 结束 性别
* @param sexEnd
*/
public void setSexEnd(Integer sexEnd){
this.sexEnd = sexEnd;
}
/**
* 获取 增加 性别
* @return sexIncrement
*/
public Integer getSexIncrement(){
return this.sexIncrement;
}
/**
* 设置 增加 性别
* @param sexIncrement
*/
public void setSexIncrement(Integer sexIncrement){
this.sexIncrement = sexIncrement;
}
/** /**
* 设置 客户ID * 获取 性别
* @param customerId * @return sexList
*/ */
public CustomerTrialQuery customerId(Long customerId){ public List<Integer> getSexList(){
setCustomerId(customerId); return this.sexList;
return this;
} }
/** /**
* 设置 开始 客户ID * 设置 性别
* @param customerIdStart * @param sexList
*/ */
public CustomerTrialQuery customerIdStart(Long customerIdStart){ public void setSexList(List<Integer> sexList){
this.customerIdStart = customerIdStart; this.sexList = sexList;
return this;
} }
/** /**
* 设置 结束 客户ID * 获取 邮箱
* @param customerIdEnd * @return mailboxList
*/ */
public CustomerTrialQuery customerIdEnd(Long customerIdEnd){ public List<String> getMailboxList(){
this.customerIdEnd = customerIdEnd; return this.mailboxList;
return this;
} }
/** /**
* 设置 增加 客户ID * 设置 邮箱
* @param customerIdIncrement * @param mailboxList
*/ */
public CustomerTrialQuery customerIdIncrement(Long customerIdIncrement){ public void setMailboxList(List<String> mailboxList){
this.customerIdIncrement = customerIdIncrement; this.mailboxList = mailboxList;
return this; }
/**
* 获取 职位
* @return jobList
*/
public List<String> getJobList(){
return this.jobList;
} }
/** /**
* 设置 客户ID * 设置 职位
* @param customerIdList * @param jobList
*/ */
public CustomerTrialQuery customerIdList(List<Long> customerIdList){ public void setJobList(List<String> jobList){
this.customerIdList = customerIdList; this.jobList = jobList;
return this; }
} /**
* 设置 主键ID,主键,自增长
* @param id
*/
public CustomerTrialQuery id(Long id){
setId(id);
return this;
}
/** /**
* 设置 申请会员等级,1:试用客户,2:VIP,3:设计师 * 设置 开始 主键ID,主键,自增长
* @param memberLevel * @param idStart
*/ */
public CustomerTrialQuery idStart(Long idStart){
this.idStart = idStart;
return this;
}
/**
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
public CustomerTrialQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
public CustomerTrialQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 主键ID,主键,自增长
* @param idList
*/
public CustomerTrialQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 申请会员等级,1:试用客户,2:VIP,3:设计师
* @param memberLevel
*/
public CustomerTrialQuery memberLevel(Integer memberLevel){ public CustomerTrialQuery memberLevel(Integer memberLevel){
setMemberLevel(memberLevel); setMemberLevel(memberLevel);
return this; return this;
} }
/** /**
* 设置 开始 申请会员等级,1:试用客户,2:VIP,3:设计师 * 设置 开始 申请会员等级,1:试用客户,2:VIP,3:设计师
* @param memberLevelStart * @param memberLevelStart
*/ */
public CustomerTrialQuery memberLevelStart(Integer memberLevelStart){ public CustomerTrialQuery memberLevelStart(Integer memberLevelStart){
this.memberLevelStart = memberLevelStart; this.memberLevelStart = memberLevelStart;
return this; return this;
} }
/** /**
* 设置 结束 申请会员等级,1:试用客户,2:VIP,3:设计师 * 设置 结束 申请会员等级,1:试用客户,2:VIP,3:设计师
* @param memberLevelEnd * @param memberLevelEnd
*/ */
public CustomerTrialQuery memberLevelEnd(Integer memberLevelEnd){ public CustomerTrialQuery memberLevelEnd(Integer memberLevelEnd){
this.memberLevelEnd = memberLevelEnd; this.memberLevelEnd = memberLevelEnd;
return this; return this;
} }
/** /**
* 设置 增加 申请会员等级,1:试用客户,2:VIP,3:设计师 * 设置 增加 申请会员等级,1:试用客户,2:VIP,3:设计师
* @param memberLevelIncrement * @param memberLevelIncrement
*/ */
public CustomerTrialQuery memberLevelIncrement(Integer memberLevelIncrement){ public CustomerTrialQuery memberLevelIncrement(Integer memberLevelIncrement){
this.memberLevelIncrement = memberLevelIncrement; this.memberLevelIncrement = memberLevelIncrement;
return this; return this;
} }
/** /**
* 设置 申请会员等级,1:试用客户,2:VIP,3:设计师 * 设置 申请会员等级,1:试用客户,2:VIP,3:设计师
* @param memberLevelList * @param memberLevelList
*/ */
public CustomerTrialQuery memberLevelList(List<Integer> memberLevelList){ public CustomerTrialQuery memberLevelList(List<Integer> memberLevelList){
this.memberLevelList = memberLevelList; this.memberLevelList = memberLevelList;
return this; return this;
} }
/** /**
* 设置 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 设置 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @param isAccept * @param isAccept
*/ */
public CustomerTrialQuery isAccept(Integer isAccept){ public CustomerTrialQuery isAccept(Integer isAccept){
setIsAccept(isAccept); setIsAccept(isAccept);
return this; return this;
} }
/** /**
* 设置 开始 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 设置 开始 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @param isAcceptStart * @param isAcceptStart
*/ */
public CustomerTrialQuery isAcceptStart(Integer isAcceptStart){ public CustomerTrialQuery isAcceptStart(Integer isAcceptStart){
this.isAcceptStart = isAcceptStart; this.isAcceptStart = isAcceptStart;
return this; return this;
} }
/** /**
* 设置 结束 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 设置 结束 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @param isAcceptEnd * @param isAcceptEnd
*/ */
public CustomerTrialQuery isAcceptEnd(Integer isAcceptEnd){ public CustomerTrialQuery isAcceptEnd(Integer isAcceptEnd){
this.isAcceptEnd = isAcceptEnd; this.isAcceptEnd = isAcceptEnd;
return this; return this;
} }
/** /**
* 设置 增加 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 设置 增加 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @param isAcceptIncrement * @param isAcceptIncrement
*/ */
public CustomerTrialQuery isAcceptIncrement(Integer isAcceptIncrement){ public CustomerTrialQuery isAcceptIncrement(Integer isAcceptIncrement){
this.isAcceptIncrement = isAcceptIncrement; this.isAcceptIncrement = isAcceptIncrement;
return this; return this;
} }
/** /**
* 设置 受理状态,0:未受理,1:同意,2:不同意。默认:0 * 设置 受理状态,0:未受理,1:同意,2:不同意。默认:0
* @param isAcceptList * @param isAcceptList
*/ */
public CustomerTrialQuery isAcceptList(List<Integer> isAcceptList){ public CustomerTrialQuery isAcceptList(List<Integer> isAcceptList){
this.isAcceptList = isAcceptList; this.isAcceptList = isAcceptList;
return this; return this;
} }
/** /**
* 设置 受理用户 * 设置 受理用户
* @param createUserId * @param createUserId
*/ */
public CustomerTrialQuery createUserId(Long createUserId){ public CustomerTrialQuery createUserId(Long createUserId){
setCreateUserId(createUserId); setCreateUserId(createUserId);
return this; return this;
} }
/** /**
* 设置 开始 受理用户 * 设置 开始 受理用户
* @param createUserIdStart * @param createUserIdStart
*/ */
public CustomerTrialQuery createUserIdStart(Long createUserIdStart){ public CustomerTrialQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart; this.createUserIdStart = createUserIdStart;
return this; return this;
} }
/** /**
* 设置 结束 受理用户 * 设置 结束 受理用户
* @param createUserIdEnd * @param createUserIdEnd
*/ */
public CustomerTrialQuery createUserIdEnd(Long createUserIdEnd){ public CustomerTrialQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd; this.createUserIdEnd = createUserIdEnd;
return this; return this;
} }
/** /**
* 设置 增加 受理用户 * 设置 增加 受理用户
* @param createUserIdIncrement * @param createUserIdIncrement
*/ */
public CustomerTrialQuery createUserIdIncrement(Long createUserIdIncrement){ public CustomerTrialQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement; this.createUserIdIncrement = createUserIdIncrement;
return this; return this;
} }
/** /**
* 设置 受理用户 * 设置 受理用户
* @param createUserIdList * @param createUserIdList
*/ */
public CustomerTrialQuery createUserIdList(List<Long> createUserIdList){ public CustomerTrialQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList; this.createUserIdList = createUserIdList;
return this; return this;
} }
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 设置 客户真实名称
* @return orConditionList * @param custName
*/ */
public List<CustomerTrialQuery> getOrConditionList(){ public CustomerTrialQuery custName(String custName){
return this.orConditionList; setCustName(custName);
return this;
} }
/** /**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 设置 客户真实名称
* @param orConditionList * @param custNameList
*/ */
public void setOrConditionList(List<CustomerTrialQuery> orConditionList){ public CustomerTrialQuery custNameList(List<String> custNameList){
this.orConditionList = orConditionList; this.custNameList = custNameList;
return this;
} }
/** /**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) * 设置 单位名称
* @return andConditionList * @param organization
*/ */
public List<CustomerTrialQuery> getAndConditionList(){ public CustomerTrialQuery organization(String organization){
return this.andConditionList; setOrganization(organization);
return this;
} }
/** /**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) * 设置 单位名称
* @param andConditionList * @param organizationList
*/ */
public void setAndConditionList(List<CustomerTrialQuery> andConditionList){ public CustomerTrialQuery organizationList(List<String> organizationList){
this.andConditionList = andConditionList; this.organizationList = organizationList;
return this;
}
/**
* 设置 联系电话
* @param contactTelphone
*/
public CustomerTrialQuery contactTelphone(String contactTelphone){
setContactTelphone(contactTelphone);
return this;
}
/**
* 设置 联系电话
* @param contactTelphoneList
*/
public CustomerTrialQuery contactTelphoneList(List<String> contactTelphoneList){
this.contactTelphoneList = contactTelphoneList;
return this;
}
/**
* 设置 性别
* @param sex
*/
public CustomerTrialQuery sex(Integer sex){
setSex(sex);
return this;
}
/**
* 设置 开始 性别
* @param sexStart
*/
public CustomerTrialQuery sexStart(Integer sexStart){
this.sexStart = sexStart;
return this;
}
/**
* 设置 结束 性别
* @param sexEnd
*/
public CustomerTrialQuery sexEnd(Integer sexEnd){
this.sexEnd = sexEnd;
return this;
}
/**
* 设置 增加 性别
* @param sexIncrement
*/
public CustomerTrialQuery sexIncrement(Integer sexIncrement){
this.sexIncrement = sexIncrement;
return this;
}
/**
* 设置 性别
* @param sexList
*/
public CustomerTrialQuery sexList(List<Integer> sexList){
this.sexList = sexList;
return this;
} }
public String getCustName() {
return custName; /**
* 设置 邮箱
* @param mailbox
*/
public CustomerTrialQuery mailbox(String mailbox){
setMailbox(mailbox);
return this;
}
/**
* 设置 邮箱
* @param mailboxList
*/
public CustomerTrialQuery mailboxList(List<String> mailboxList){
this.mailboxList = mailboxList;
return this;
}
/**
* 设置 职位
* @param job
*/
public CustomerTrialQuery job(String job){
setJob(job);
return this;
}
/**
* 设置 职位
* @param jobList
*/
public CustomerTrialQuery jobList(List<String> jobList){
this.jobList = jobList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<CustomerTrialQuery> getOrConditionList(){
return this.orConditionList;
} }
public void setCustName(String custName) { /**
this.custName = custName; * 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<CustomerTrialQuery> orConditionList){
this.orConditionList = orConditionList;
} }
public String getContactTelphone() { /**
return contactTelphone; * 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<CustomerTrialQuery> getAndConditionList(){
return this.andConditionList;
} }
public void setContactTelphone(String contactTelphone) { /**
this.contactTelphone = contactTelphone; * 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<CustomerTrialQuery> andConditionList){
this.andConditionList = andConditionList;
} }
} }
\ No newline at end of file
...@@ -17,8 +17,6 @@ import com.mortals.xhx.module.customer.model.CustomerTrialEntityExt; ...@@ -17,8 +17,6 @@ import com.mortals.xhx.module.customer.model.CustomerTrialEntityExt;
*/ */
public interface CustomerTrialService extends ICRUDService<CustomerTrialEntity,Long>{ public interface CustomerTrialService extends ICRUDService<CustomerTrialEntity,Long>{
Result<CustomerTrialEntityExt> findExt(CustomerTrialEntity params, PageInfo pageInfo, Context context) throws AppException;
/** /**
* 受理客户试用申请 * 受理客户试用申请
* @param entity * @param entity
......
...@@ -8,6 +8,8 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; ...@@ -8,6 +8,8 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.DateUtils; import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.SecurityUtil; import com.mortals.framework.util.SecurityUtil;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.CustomerSatusEnum;
import com.mortals.xhx.common.code.UserStatus;
import com.mortals.xhx.module.customer.dao.CustomerDao; import com.mortals.xhx.module.customer.dao.CustomerDao;
import com.mortals.xhx.module.customer.model.CustomerEntity; import com.mortals.xhx.module.customer.model.CustomerEntity;
import com.mortals.xhx.module.customer.model.CustomerEntityExt; import com.mortals.xhx.module.customer.model.CustomerEntityExt;
...@@ -86,6 +88,9 @@ public class CustomerServiceImpl extends AbstractCRUDServiceImpl<CustomerDao, Cu ...@@ -86,6 +88,9 @@ public class CustomerServiceImpl extends AbstractCRUDServiceImpl<CustomerDao, Cu
if (user == null || !user.getLoginName().equals(loginName)) { if (user == null || !user.getLoginName().equals(loginName)) {
throw new AppException("用户名不存在!"); throw new AppException("用户名不存在!");
} }
if(user.getStatus()!= CustomerSatusEnum.NORMAL.getValue()){
throw new AppException("该账号已被禁用!");
}
try { try {
if (!user.getPassword().equals(SecurityUtil.md5DoubleEncoding(password))) { if (!user.getPassword().equals(SecurityUtil.md5DoubleEncoding(password))) {
throw new AppException("登录密码错误!"); throw new AppException("登录密码错误!");
......
...@@ -5,20 +5,20 @@ import com.mortals.framework.model.PageInfo; ...@@ -5,20 +5,20 @@ import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
import com.mortals.framework.util.SecurityUtil; import com.mortals.framework.util.SecurityUtil;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.CustomerSatusEnum;
import com.mortals.xhx.common.code.CustomerSrcEnum;
import com.mortals.xhx.common.code.TrialAcceptEnum; import com.mortals.xhx.common.code.TrialAcceptEnum;
import com.mortals.xhx.module.customer.dao.CustomerDao; import com.mortals.xhx.module.customer.dao.CustomerDao;
import com.mortals.xhx.module.customer.model.CustomerEntity; import com.mortals.xhx.module.customer.model.*;
import com.mortals.xhx.module.customer.model.CustomerTrialEntityExt;
import com.mortals.xhx.module.customer.model.CustomerTrialQuery;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.customer.dao.CustomerTrialDao; import com.mortals.xhx.module.customer.dao.CustomerTrialDao;
import com.mortals.xhx.module.customer.model.CustomerTrialEntity;
import com.mortals.xhx.module.customer.service.CustomerTrialService; import com.mortals.xhx.module.customer.service.CustomerTrialService;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -35,23 +35,28 @@ public class CustomerTrialServiceImpl extends AbstractCRUDServiceImpl<CustomerTr ...@@ -35,23 +35,28 @@ public class CustomerTrialServiceImpl extends AbstractCRUDServiceImpl<CustomerTr
private CustomerDao customerDao; private CustomerDao customerDao;
@Override @Override
public Result<CustomerTrialEntityExt> findExt(CustomerTrialEntity params, PageInfo pageInfo, Context context) throws AppException { protected CustomerTrialEntity findBefore(CustomerTrialEntity entity, PageInfo pageInfo, Context context) throws AppException {
CustomerTrialQuery query = new CustomerTrialQuery(); CustomerTrialQuery query = new CustomerTrialQuery();
BeanUtils.copyProperties(params,query); BeanUtils.copyProperties(entity,query);
if(StringUtils.isNotEmpty(params.getQuery())){ if(StringUtils.isNotEmpty(entity.getQuery())){
StringBuffer condition = new StringBuffer("%"); StringBuffer condition = new StringBuffer("%");
condition.append(params.getQuery()).append("%"); condition.append(entity.getQuery()).append("%");
CustomerTrialQuery condition1 = new CustomerTrialQuery(); CustomerTrialQuery condition1 = new CustomerTrialQuery();
CustomerTrialQuery condition2 = new CustomerTrialQuery(); CustomerTrialQuery condition2 = new CustomerTrialQuery();
condition1.setContactTelphone(condition.toString());
condition1.setCustName(condition.toString()); condition2.setCustName(condition.toString());
condition2.setContactTelphone(condition.toString());
List<CustomerTrialQuery> orConditionList = new ArrayList<>(); List<CustomerTrialQuery> orConditionList = new ArrayList<>();
orConditionList.add(condition1); orConditionList.add(condition1);
orConditionList.add(condition2); orConditionList.add(condition2);
query.setOrConditionList(orConditionList); query.setOrConditionList(orConditionList);
} }
return getDao().getListExt(query,pageInfo); return query;
}
@Override
protected void saveBefore(CustomerTrialEntity entity, Context context) throws AppException {
entity.setIsAccept(TrialAcceptEnum.NOT_ACCEPTED.getValue());
super.saveBefore(entity, context);
} }
@Override @Override
...@@ -73,16 +78,29 @@ public class CustomerTrialServiceImpl extends AbstractCRUDServiceImpl<CustomerTr ...@@ -73,16 +78,29 @@ public class CustomerTrialServiceImpl extends AbstractCRUDServiceImpl<CustomerTr
if(StringUtils.isEmpty(entity.getPassword())){ if(StringUtils.isEmpty(entity.getPassword())){
throw new AppException("登录密码不能为空"); throw new AppException("登录密码不能为空");
} }
if(StringUtils.isEmpty(entity.getEnterpriseConsultant())){
throw new AppException("企业顾问不能为空");
}
CustomerEntity customerEntity = new CustomerEntity(); CustomerEntity customerEntity = new CustomerEntity();
customerEntity.setId(customerTrialEntity.getCustomerId()); customerEntity.setJob(entity.getJob());
customerEntity.setCustName(entity.getCustName());
customerEntity.setMemberLevel(entity.getMemberLevel());
customerEntity.setOrganization(entity.getOrganization());
customerEntity.setContactTelphone(entity.getContactTelphone());
customerEntity.setSex(entity.getSex());
customerEntity.setMailbox(entity.getMailbox());
customerEntity.setCustomerSrc(1l);
customerEntity.setStatus(CustomerSatusEnum.NORMAL.getValue());
customerEntity.setEnterpriseConsultant(entity.getEnterpriseConsultant());
customerEntity.setCreateUserId(this.getContextUserId(context));
customerEntity.setCreateTime(new Date());
customerEntity.setLoginName(entity.getLoginName()); customerEntity.setLoginName(entity.getLoginName());
try { try {
customerEntity.setPassword(SecurityUtil.md5DoubleEncoding(entity.getPassword())); customerEntity.setPassword(SecurityUtil.md5DoubleEncoding(entity.getPassword()));
} catch (Exception e) { } catch (Exception e) {
throw new AppException("密码转换异常!", e); throw new AppException("密码转换异常!", e);
} }
customerEntity.setMemberLevel(customerTrialEntity.getMemberLevel()); customerDao.insert(customerEntity);
customerDao.update(customerEntity);
} }
CustomerTrialEntity update = new CustomerTrialEntity(); CustomerTrialEntity update = new CustomerTrialEntity();
update.setId(customerTrialEntity.getId()); update.setId(customerTrialEntity.getId());
......
...@@ -56,35 +56,35 @@ public class CustomerTrialController extends BaseCRUDJsonBodyMappingController<C ...@@ -56,35 +56,35 @@ public class CustomerTrialController extends BaseCRUDJsonBodyMappingController<C
super.init(model, context); super.init(model, context);
} }
@Override // @Override
public Rest<Object> list(@RequestBody(required = false) CustomerTrialEntity query) { // public Rest<Object> list(@RequestBody(required = false) CustomerTrialEntity query) {
Map<String, Object> model = new HashMap(); // Map<String, Object> model = new HashMap();
Rest<Object> ret = new Rest(); // Rest<Object> ret = new Rest();
Context context = this.getContext(); // Context context = this.getContext();
String busiDesc = "查询" + this.getModuleDesc(); // String busiDesc = "查询" + this.getModuleDesc();
//
int code; // int code;
try { // try {
PageInfo pageInfo = this.buildPageInfo(query); // PageInfo pageInfo = this.buildPageInfo(query);
this.doListBefore(query, model, context); // this.doListBefore(query, model, context);
Result result = this.getService().findExt(query, pageInfo, context); // Result result = this.getService().findExt(query, pageInfo, context);
model.put("data", result.getList()); // model.put("data", result.getList());
model.put("pageInfo", result.getPageInfo()); // model.put("pageInfo", result.getPageInfo());
this.parsePageInfo(model, result.getPageInfo()); // this.parsePageInfo(model, result.getPageInfo());
code = this.doListAfter(query, model, context); // code = this.doListAfter(query, model, context);
this.recordSysLog(this.request, busiDesc + " 【成功】"); // this.recordSysLog(this.request, busiDesc + " 【成功】");
} catch (Exception var9) { // } catch (Exception var9) {
code = -1; // code = -1;
this.doException(this.request, busiDesc, model, var9); // this.doException(this.request, busiDesc, model, var9);
} // }
//
this.init(model, context); // this.init(model, context);
ret.setCode(code); // ret.setCode(code);
ret.setData(model); // ret.setData(model);
ret.setDict(model.get("dict") == null ? null : (Map)model.remove("dict")); // ret.setDict(model.get("dict") == null ? null : (Map)model.remove("dict"));
ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString()); // ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString());
return ret; // return ret;
} // }
@PostMapping({"accept"}) @PostMapping({"accept"})
public String accept(@RequestBody CustomerTrialEntity entity) { public String accept(@RequestBody CustomerTrialEntity entity) {
......
...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.design.model.vo.DesignMasterplateVo; ...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.design.model.vo.DesignMasterplateVo;
* 模版管理实体对象 * 模版管理实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-07-08 * @date 2022-07-26
*/ */
public class DesignMasterplateEntity extends DesignMasterplateVo { public class DesignMasterplateEntity extends DesignMasterplateVo {
...@@ -68,6 +68,10 @@ public class DesignMasterplateEntity extends DesignMasterplateVo { ...@@ -68,6 +68,10 @@ public class DesignMasterplateEntity extends DesignMasterplateVo {
* 设计草稿 * 设计草稿
*/ */
private String draft; private String draft;
/**
* 版式。1:横版2竖版默认:1
*/
private Integer plateType;
...@@ -254,6 +258,20 @@ public class DesignMasterplateEntity extends DesignMasterplateVo { ...@@ -254,6 +258,20 @@ public class DesignMasterplateEntity extends DesignMasterplateVo {
public void setDraft(String draft){ public void setDraft(String draft){
this.draft = 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;
}
...@@ -289,6 +307,7 @@ public class DesignMasterplateEntity extends DesignMasterplateVo { ...@@ -289,6 +307,7 @@ public class DesignMasterplateEntity extends DesignMasterplateVo {
sb.append(",masterplateUseNum:").append(getMasterplateUseNum()); sb.append(",masterplateUseNum:").append(getMasterplateUseNum());
sb.append(",previewUrl:").append(getPreviewUrl()); sb.append(",previewUrl:").append(getPreviewUrl());
sb.append(",draft:").append(getDraft()); sb.append(",draft:").append(getDraft());
sb.append(",plateType:").append(getPlateType());
return sb.toString(); return sb.toString();
} }
...@@ -319,5 +338,7 @@ public class DesignMasterplateEntity extends DesignMasterplateVo { ...@@ -319,5 +338,7 @@ public class DesignMasterplateEntity extends DesignMasterplateVo {
this.previewUrl = ""; this.previewUrl = "";
this.draft = ""; this.draft = "";
this.plateType = null;
} }
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.design.model.DesignMasterplateEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.design.model.DesignMasterplateEntity;
* 模版管理查询对象 * 模版管理查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-07-08 * @date 2022-07-26
*/ */
public class DesignMasterplateQuery extends DesignMasterplateEntity { public class DesignMasterplateQuery extends DesignMasterplateEntity {
/** 开始 主键ID,主键,自增长 */ /** 开始 主键ID,主键,自增长 */
...@@ -93,6 +93,18 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity { ...@@ -93,6 +93,18 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
/** 设计草稿 */ /** 设计草稿 */
private List<String> draftList; private List<String> draftList;
/** 开始 版式。1:横版2竖版默认:1 */
private Integer plateTypeStart;
/** 结束 版式。1:横版2竖版默认:1 */
private Integer plateTypeEnd;
/** 增加 版式。1:横版2竖版默认:1 */
private Integer plateTypeIncrement;
/** 版式。1:横版2竖版默认:1列表 */
private List <Integer> plateTypeList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<DesignMasterplateQuery> orConditionList; private List<DesignMasterplateQuery> orConditionList;
...@@ -539,6 +551,70 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity { ...@@ -539,6 +551,70 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
public void setDraftList(List<String> draftList){ public void setDraftList(List<String> draftList){
this.draftList = draftList; this.draftList = draftList;
} }
/**
* 获取 开始 版式。1:横版2竖版默认:1
* @return plateTypeStart
*/
public Integer getPlateTypeStart(){
return this.plateTypeStart;
}
/**
* 设置 开始 版式。1:横版2竖版默认:1
* @param plateTypeStart
*/
public void setPlateTypeStart(Integer plateTypeStart){
this.plateTypeStart = plateTypeStart;
}
/**
* 获取 结束 版式。1:横版2竖版默认:1
* @return $plateTypeEnd
*/
public Integer getPlateTypeEnd(){
return this.plateTypeEnd;
}
/**
* 设置 结束 版式。1:横版2竖版默认:1
* @param plateTypeEnd
*/
public void setPlateTypeEnd(Integer plateTypeEnd){
this.plateTypeEnd = plateTypeEnd;
}
/**
* 获取 增加 版式。1:横版2竖版默认:1
* @return plateTypeIncrement
*/
public Integer getPlateTypeIncrement(){
return this.plateTypeIncrement;
}
/**
* 设置 增加 版式。1:横版2竖版默认:1
* @param plateTypeIncrement
*/
public void setPlateTypeIncrement(Integer plateTypeIncrement){
this.plateTypeIncrement = plateTypeIncrement;
}
/**
* 获取 版式。1:横版2竖版默认:1
* @return plateTypeList
*/
public List<Integer> getPlateTypeList(){
return this.plateTypeList;
}
/**
* 设置 版式。1:横版2竖版默认:1
* @param plateTypeList
*/
public void setPlateTypeList(List<Integer> plateTypeList){
this.plateTypeList = plateTypeList;
}
/** /**
* 设置 主键ID,主键,自增长 * 设置 主键ID,主键,自增长
* @param id * @param id
...@@ -910,6 +986,51 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity { ...@@ -910,6 +986,51 @@ public class DesignMasterplateQuery extends DesignMasterplateEntity {
return this; return this;
} }
/**
* 设置 版式。1:横版2竖版默认:1
* @param plateType
*/
public DesignMasterplateQuery plateType(Integer plateType){
setPlateType(plateType);
return this;
}
/**
* 设置 开始 版式。1:横版2竖版默认:1
* @param plateTypeStart
*/
public DesignMasterplateQuery plateTypeStart(Integer plateTypeStart){
this.plateTypeStart = plateTypeStart;
return this;
}
/**
* 设置 结束 版式。1:横版2竖版默认:1
* @param plateTypeEnd
*/
public DesignMasterplateQuery plateTypeEnd(Integer plateTypeEnd){
this.plateTypeEnd = plateTypeEnd;
return this;
}
/**
* 设置 增加 版式。1:横版2竖版默认:1
* @param plateTypeIncrement
*/
public DesignMasterplateQuery plateTypeIncrement(Integer plateTypeIncrement){
this.plateTypeIncrement = plateTypeIncrement;
return this;
}
/**
* 设置 版式。1:横版2竖版默认:1
* @param plateTypeList
*/
public DesignMasterplateQuery plateTypeList(List<Integer> plateTypeList){
this.plateTypeList = plateTypeList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -34,8 +34,8 @@ mybatis: ...@@ -34,8 +34,8 @@ mybatis:
application: application:
auth: auth:
unloginUrl: /refresh,/error,/login/login,/login/index,/login/logout,/customer/login/login,customer/login/logout,/securitycode/createCode,/file/common/*,/file/preview/*,/test*,/api/asset/*,/api/*,/zwfw/*,/ws/*,/swagger-ui*,/topic/*,/uploads/* unloginUrl: /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/*
uncheckUrl: /refresh,/error,/login/login,/login/index,/login/logout,/customer/login/login,customer/login/logout,/securitycode/createCode,/file/common/*,/file/preview/*,/test*,/api/asset/*,/api/*,/zwfw/*,/ws/*,/swagger-ui*,/topic/*,/uploads/* 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: workflow:
tenantId: ${spring.application.name} tenantId: ${spring.application.name}
token: token:
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!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.CustomerTrialDaoImpl"> <mapper namespace="com.mortals.xhx.module.customer.dao.ibatis.CustomerTrialDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
<resultMap type="CustomerTrialEntity" id="CustomerTrialEntity-Map"> <resultMap type="CustomerTrialEntity" id="CustomerTrialEntity-Map">
<id property="id" column="id" /> <id property="id" column="id" />
<result property="customerId" column="customerId" /> <result property="memberLevel" column="memberLevel" />
<result property="memberLevel" column="memberLevel" /> <result property="isAccept" column="isAccept" />
<result property="isAccept" column="isAccept" /> <result property="createUserId" column="createUserId" />
<result property="createUserId" column="createUserId" /> <result property="createTime" column="createTime" />
<result property="createTime" column="createTime" /> <result property="updateTime" column="updateTime" />
<result property="updateTime" column="updateTime" /> <result property="custName" column="custName" />
<result property="organization" column="organization" />
<result property="contactTelphone" column="contactTelphone" />
<result property="sex" column="sex" />
<result property="mailbox" column="mailbox" />
<result property="job" column="job" />
</resultMap> </resultMap>
<!-- 表所有列 --> <!-- 表所有列 -->
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id, a.id,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('customerId') or colPickMode == 1 and data.containsKey('customerId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('memberLevel') or colPickMode == 1 and data.containsKey('memberLevel')))">
a.customerId, a.memberLevel,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('memberLevel') or colPickMode == 1 and data.containsKey('memberLevel')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('isAccept') or colPickMode == 1 and data.containsKey('isAccept')))">
a.memberLevel, a.isAccept,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('isAccept') or colPickMode == 1 and data.containsKey('isAccept')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.isAccept, a.createUserId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createUserId, a.createTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.createTime, a.updateTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('custName') or colPickMode == 1 and data.containsKey('custName')))">
a.updateTime, a.custName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('organization') or colPickMode == 1 and data.containsKey('organization')))">
a.organization,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('contactTelphone') or colPickMode == 1 and data.containsKey('contactTelphone')))">
a.contactTelphone,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sex') or colPickMode == 1 and data.containsKey('sex')))">
a.sex,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('mailbox') or colPickMode == 1 and data.containsKey('mailbox')))">
a.mailbox,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('job') or colPickMode == 1 and data.containsKey('job')))">
a.job,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="CustomerTrialEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="CustomerTrialEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_customer_trial insert into mortals_xhx_customer_trial
(customerId,memberLevel,isAccept,createUserId,createTime,updateTime) (memberLevel,isAccept,createUserId,createTime,updateTime,custName,organization,contactTelphone,sex,mailbox,job)
VALUES VALUES
(#{customerId},#{memberLevel},#{isAccept},#{createUserId},#{createTime},#{updateTime}) (#{memberLevel},#{isAccept},#{createUserId},#{createTime},#{updateTime},#{custName},#{organization},#{contactTelphone},#{sex},#{mailbox},#{job})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_customer_trial insert into mortals_xhx_customer_trial
(customerId,memberLevel,isAccept,createUserId,createTime,updateTime) (memberLevel,isAccept,createUserId,createTime,updateTime,custName,organization,contactTelphone,sex,mailbox,job)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.customerId},#{item.memberLevel},#{item.isAccept},#{item.createUserId},#{item.createTime},#{item.updateTime}) (#{item.memberLevel},#{item.isAccept},#{item.createUserId},#{item.createTime},#{item.updateTime},#{item.custName},#{item.organization},#{item.contactTelphone},#{item.sex},#{item.mailbox},#{item.job})
</foreach> </foreach>
</insert> </insert>
...@@ -66,12 +86,6 @@ ...@@ -66,12 +86,6 @@
update mortals_xhx_customer_trial as a update mortals_xhx_customer_trial as a
set set
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(colPickMode==0 and data.containsKey('customerId')) or (colPickMode==1 and !data.containsKey('customerId'))">
a.customerId=#{data.customerId},
</if>
<if test="(colPickMode==0 and data.containsKey('customerIdIncrement')) or (colPickMode==1 and !data.containsKey('customerIdIncrement'))">
a.customerId=ifnull(a.customerId,0) + #{data.customerIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('memberLevel')) or (colPickMode==1 and !data.containsKey('memberLevel'))"> <if test="(colPickMode==0 and data.containsKey('memberLevel')) or (colPickMode==1 and !data.containsKey('memberLevel'))">
a.memberLevel=#{data.memberLevel}, a.memberLevel=#{data.memberLevel},
</if> </if>
...@@ -96,6 +110,27 @@ ...@@ -96,6 +110,27 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))"> <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime}, a.updateTime=#{data.updateTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('custName')) or (colPickMode==1 and !data.containsKey('custName'))">
a.custName=#{data.custName},
</if>
<if test="(colPickMode==0 and data.containsKey('organization')) or (colPickMode==1 and !data.containsKey('organization'))">
a.organization=#{data.organization},
</if>
<if test="(colPickMode==0 and data.containsKey('contactTelphone')) or (colPickMode==1 and !data.containsKey('contactTelphone'))">
a.contactTelphone=#{data.contactTelphone},
</if>
<if test="(colPickMode==0 and data.containsKey('sex')) or (colPickMode==1 and !data.containsKey('sex'))">
a.sex=#{data.sex},
</if>
<if test="(colPickMode==0 and data.containsKey('sexIncrement')) or (colPickMode==1 and !data.containsKey('sexIncrement'))">
a.sex=ifnull(a.sex,0) + #{data.sexIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('mailbox')) or (colPickMode==1 and !data.containsKey('mailbox'))">
a.mailbox=#{data.mailbox},
</if>
<if test="(colPickMode==0 and data.containsKey('job')) or (colPickMode==1 and !data.containsKey('job'))">
a.job=#{data.job},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -108,68 +143,103 @@ ...@@ -108,68 +143,103 @@
<update id="updateBatch" parameterType="paramDto"> <update id="updateBatch" parameterType="paramDto">
update mortals_xhx_customer_trial as a update mortals_xhx_customer_trial as a
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<trim prefix="customerId=(case" suffix="ELSE customerId end),"> <trim prefix="memberLevel=(case" suffix="ELSE memberLevel end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('customerId')) or (colPickMode==1 and !item.containsKey('customerId'))"> <when test="(colPickMode==0 and item.containsKey('memberLevel')) or (colPickMode==1 and !item.containsKey('memberLevel'))">
when a.id=#{item.id} then #{item.customerId} when a.id=#{item.id} then #{item.memberLevel}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('customerIdIncrement')) or (colPickMode==1 and !item.containsKey('customerIdIncrement'))"> <when test="(colPickMode==0 and item.containsKey('memberLevelIncrement')) or (colPickMode==1 and !item.containsKey('memberLevelIncrement'))">
when a.id=#{item.id} then ifnull(a.customerId,0) + #{item.customerIdIncrement} when a.id=#{item.id} then ifnull(a.memberLevel,0) + #{item.memberLevelIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="memberLevel=(case" suffix="ELSE memberLevel end),"> <trim prefix="isAccept=(case" suffix="ELSE isAccept end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('memberLevel')) or (colPickMode==1 and !item.containsKey('memberLevel'))"> <when test="(colPickMode==0 and item.containsKey('isAccept')) or (colPickMode==1 and !item.containsKey('isAccept'))">
when a.id=#{item.id} then #{item.memberLevel} when a.id=#{item.id} then #{item.isAccept}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('memberLevelIncrement')) or (colPickMode==1 and !item.containsKey('memberLevelIncrement'))"> <when test="(colPickMode==0 and item.containsKey('isAcceptIncrement')) or (colPickMode==1 and !item.containsKey('isAcceptIncrement'))">
when a.id=#{item.id} then ifnull(a.memberLevel,0) + #{item.memberLevelIncrement} when a.id=#{item.id} then ifnull(a.isAccept,0) + #{item.isAcceptIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="isAccept=(case" suffix="ELSE isAccept end),"> <trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('isAccept')) or (colPickMode==1 and !item.containsKey('isAccept'))"> <when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.isAccept} when a.id=#{item.id} then #{item.createUserId}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('isAcceptIncrement')) or (colPickMode==1 and !item.containsKey('isAcceptIncrement'))"> <when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.isAccept,0) + #{item.isAcceptIncrement} when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),"> <trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))"> when a.id=#{item.id} then #{item.createTime}
when a.id=#{item.id} then #{item.createUserId} </if>
</when> </foreach>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))"> </trim>
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement} <trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
</when> <foreach collection="data.dataList" item="item" index="index" separator="" >
</choose> <if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
</foreach> when a.id=#{item.id} then #{item.updateTime}
</trim> </if>
<trim prefix="createTime=(case" suffix="ELSE createTime end),"> </foreach>
<foreach collection="data.dataList" item="item" index="index" separator="" > </trim>
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))"> <trim prefix="custName=(case" suffix="ELSE custName end),">
when a.id=#{item.id} then #{item.createTime} <foreach collection="data.dataList" item="item" index="index" separator="" >
</if> <if test="(colPickMode==0 and item.containsKey('custName')) or (colPickMode==1 and !item.containsKey('custName'))">
</foreach> when a.id=#{item.id} then #{item.custName}
</trim> </if>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),"> </foreach>
<foreach collection="data.dataList" item="item" index="index" separator="" > </trim>
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))"> <trim prefix="organization=(case" suffix="ELSE organization end),">
when a.id=#{item.id} then #{item.updateTime} <foreach collection="data.dataList" item="item" index="index" separator="" >
</if> <if test="(colPickMode==0 and item.containsKey('organization')) or (colPickMode==1 and !item.containsKey('organization'))">
</foreach> when a.id=#{item.id} then #{item.organization}
</trim> </if>
</foreach>
</trim>
<trim prefix="contactTelphone=(case" suffix="ELSE contactTelphone end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('contactTelphone')) or (colPickMode==1 and !item.containsKey('contactTelphone'))">
when a.id=#{item.id} then #{item.contactTelphone}
</if>
</foreach>
</trim>
<trim prefix="sex=(case" suffix="ELSE sex end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('sex')) or (colPickMode==1 and !item.containsKey('sex'))">
when a.id=#{item.id} then #{item.sex}
</when>
<when test="(colPickMode==0 and item.containsKey('sexIncrement')) or (colPickMode==1 and !item.containsKey('sexIncrement'))">
when a.id=#{item.id} then ifnull(a.sex,0) + #{item.sexIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="mailbox=(case" suffix="ELSE mailbox end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('mailbox')) or (colPickMode==1 and !item.containsKey('mailbox'))">
when a.id=#{item.id} then #{item.mailbox}
</if>
</foreach>
</trim>
<trim prefix="job=(case" suffix="ELSE job end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('job')) or (colPickMode==1 and !item.containsKey('job'))">
when a.id=#{item.id} then #{item.job}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -271,189 +341,289 @@ ...@@ -271,189 +341,289 @@
${_conditionType_} a.id=#{${_conditionParam_}.id} ${_conditionType_} a.id=#{${_conditionParam_}.id}
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('id')"> <if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null "> <if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id} ${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
</if> </if>
<if test="conditionParamRef.containsKey('idList')"> <if test="conditionParamRef.id == null">
${_conditionType_} a.id in ${_conditionType_} a.id is null
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null"> </if>
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart} <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>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if>
<if test="conditionParamRef.containsKey('memberLevel')">
<if test="conditionParamRef.memberLevel != null ">
${_conditionType_} a.memberLevel = #{${_conditionParam_}.memberLevel}
</if> </if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null"> <if test="conditionParamRef.memberLevel == null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd} ${_conditionType_} a.memberLevel is null
</if> </if>
</if>
<if test="conditionParamRef.containsKey('memberLevelList')">
${_conditionType_} a.memberLevel in
<foreach collection="conditionParamRef.memberLevelList" 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>
<if test="conditionParamRef.containsKey('memberLevelEnd') and conditionParamRef.memberLevelEnd != null">
${_conditionType_} a.memberLevel <![CDATA[ <= ]]> #{${_conditionParam_}.memberLevelEnd}
</if>
<if test="conditionParamRef.containsKey('customerId')"> <if test="conditionParamRef.containsKey('isAccept')">
<if test="conditionParamRef.customerId != null "> <if test="conditionParamRef.isAccept != null ">
${_conditionType_} a.customerId = #{${_conditionParam_}.customerId} ${_conditionType_} a.isAccept = #{${_conditionParam_}.isAccept}
</if>
<if test="conditionParamRef.customerId == null">
${_conditionType_} a.customerId is null
</if>
</if> </if>
<if test="conditionParamRef.containsKey('customerIdList')"> <if test="conditionParamRef.isAccept == null">
${_conditionType_} a.customerId in ${_conditionType_} a.isAccept is null
<foreach collection="conditionParamRef.customerIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="conditionParamRef.containsKey('customerIdStart') and conditionParamRef.customerIdStart != null"> </if>
${_conditionType_} a.customerId <![CDATA[ >= ]]> #{${_conditionParam_}.customerIdStart} <if test="conditionParamRef.containsKey('isAcceptList')">
${_conditionType_} a.isAccept in
<foreach collection="conditionParamRef.isAcceptList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('isAcceptStart') and conditionParamRef.isAcceptStart != null">
${_conditionType_} a.isAccept <![CDATA[ >= ]]> #{${_conditionParam_}.isAcceptStart}
</if>
<if test="conditionParamRef.containsKey('isAcceptEnd') and conditionParamRef.isAcceptEnd != null">
${_conditionType_} a.isAccept <![CDATA[ <= ]]> #{${_conditionParam_}.isAcceptEnd}
</if>
<if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if> </if>
<if test="conditionParamRef.containsKey('customerIdEnd') and conditionParamRef.customerIdEnd != null"> <if test="conditionParamRef.createUserId == null">
${_conditionType_} a.customerId <![CDATA[ <= ]]> #{${_conditionParam_}.customerIdEnd} ${_conditionType_} a.createUserId is null
</if> </if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList')">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if>
<if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('memberLevel')">
<if test="conditionParamRef.memberLevel != null "> <if test="conditionParamRef.containsKey('createTime')">
${_conditionType_} a.memberLevel = #{${_conditionParam_}.memberLevel} <if test="conditionParamRef.createTime != null ">
</if> ${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
<if test="conditionParamRef.memberLevel == null">
${_conditionType_} a.memberLevel is null
</if>
</if> </if>
<if test="conditionParamRef.containsKey('memberLevelList')"> <if test="conditionParamRef.createTime == null">
${_conditionType_} a.memberLevel in ${_conditionType_} a.createTime is null
<foreach collection="conditionParamRef.memberLevelList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="conditionParamRef.containsKey('memberLevelStart') and conditionParamRef.memberLevelStart != null"> </if>
${_conditionType_} a.memberLevel <![CDATA[ >= ]]> #{${_conditionParam_}.memberLevelStart} <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('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</if> </if>
<if test="conditionParamRef.containsKey('memberLevelEnd') and conditionParamRef.memberLevelEnd != null"> <if test="conditionParamRef.updateTime == null">
${_conditionType_} a.memberLevel <![CDATA[ <= ]]> #{${_conditionParam_}.memberLevelEnd} ${_conditionType_} a.updateTime is null
</if> </if>
</if>
<if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('isAccept')"> <if test="conditionParamRef.containsKey('custName')">
<if test="conditionParamRef.isAccept != null "> <if test="conditionParamRef.custName != null and conditionParamRef.custName != ''">
${_conditionType_} a.isAccept = #{${_conditionParam_}.isAccept} ${_conditionType_} a.custName like #{${_conditionParam_}.custName}
</if>
<if test="conditionParamRef.isAccept == null">
${_conditionType_} a.isAccept is null
</if>
</if> </if>
<if test="conditionParamRef.containsKey('isAcceptList')"> <if test="conditionParamRef.custName == null">
${_conditionType_} a.isAccept in ${_conditionType_} a.custName is null
<foreach collection="conditionParamRef.isAcceptList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="conditionParamRef.containsKey('isAcceptStart') and conditionParamRef.isAcceptStart != null"> </if>
${_conditionType_} a.isAccept <![CDATA[ >= ]]> #{${_conditionParam_}.isAcceptStart} <if test="conditionParamRef.containsKey('custNameList')">
${_conditionType_} a.custName in
<foreach collection="conditionParamRef.custNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('organization')">
<if test="conditionParamRef.organization != null and conditionParamRef.organization != ''">
${_conditionType_} a.organization like #{${_conditionParam_}.organization}
</if> </if>
<if test="conditionParamRef.containsKey('isAcceptEnd') and conditionParamRef.isAcceptEnd != null"> <if test="conditionParamRef.organization == null">
${_conditionType_} a.isAccept <![CDATA[ <= ]]> #{${_conditionParam_}.isAcceptEnd} ${_conditionType_} a.organization is null
</if> </if>
</if>
<if test="conditionParamRef.containsKey('organizationList')">
${_conditionType_} a.organization in
<foreach collection="conditionParamRef.organizationList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserId')"> <if test="conditionParamRef.containsKey('contactTelphone')">
<if test="conditionParamRef.createUserId != null "> <if test="conditionParamRef.contactTelphone != null and conditionParamRef.contactTelphone != ''">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId} ${_conditionType_} a.contactTelphone like #{${_conditionParam_}.contactTelphone}
</if>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
</if> </if>
<if test="conditionParamRef.containsKey('createUserIdList')"> <if test="conditionParamRef.contactTelphone == null">
${_conditionType_} a.createUserId in ${_conditionType_} a.contactTelphone is null
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null"> </if>
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart} <if test="conditionParamRef.containsKey('contactTelphoneList')">
${_conditionType_} a.contactTelphone in
<foreach collection="conditionParamRef.contactTelphoneList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sex')">
<if test="conditionParamRef.sex != null ">
${_conditionType_} a.sex = #{${_conditionParam_}.sex}
</if> </if>
<if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null"> <if test="conditionParamRef.sex == null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd} ${_conditionType_} a.sex is null
</if> </if>
</if>
<if test="conditionParamRef.containsKey('sexList')">
${_conditionType_} a.sex in
<foreach collection="conditionParamRef.sexList" 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>
<if test="conditionParamRef.containsKey('sexEnd') and conditionParamRef.sexEnd != null">
${_conditionType_} a.sex <![CDATA[ <= ]]> #{${_conditionParam_}.sexEnd}
</if>
<if test="conditionParamRef.containsKey('createTime')"> <if test="conditionParamRef.containsKey('mailbox')">
<if test="conditionParamRef.createTime != null "> <if test="conditionParamRef.mailbox != null and conditionParamRef.mailbox != ''">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime} ${_conditionType_} a.mailbox like #{${_conditionParam_}.mailbox}
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''"> <if test="conditionParamRef.mailbox == null">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.mailbox is null
</if> </if>
</if>
<if test="conditionParamRef.containsKey('mailboxList')">
${_conditionType_} a.mailbox in
<foreach collection="conditionParamRef.mailboxList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateTime')"> <if test="conditionParamRef.containsKey('job')">
<if test="conditionParamRef.updateTime != null "> <if test="conditionParamRef.job != null and conditionParamRef.job != ''">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime} ${_conditionType_} a.job like #{${_conditionParam_}.job}
</if>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> <if test="conditionParamRef.job == null">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.job is null
</if> </if>
</if>
<if test="conditionParamRef.containsKey('jobList')">
${_conditionType_} a.job in
<foreach collection="conditionParamRef.jobList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
order by order by
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=","> <foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind} ${item.colName} ${item.sortKind}
</foreach> </foreach>
</trim> </trim>
</if> </if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()"> <if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by order by
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')"> <if test="orderCol.containsKey('id')">
a.id a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if> <if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('customerId')"> <if test="orderCol.containsKey('memberLevel')">
a.customerId a.memberLevel
<if test='orderCol.customerId != null and "DESC".equalsIgnoreCase(orderCol.customerId)'>DESC</if> <if test='orderCol.memberLevel != null and "DESC".equalsIgnoreCase(orderCol.memberLevel)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('memberLevel')"> <if test="orderCol.containsKey('isAccept')">
a.memberLevel a.isAccept
<if test='orderCol.memberLevel != null and "DESC".equalsIgnoreCase(orderCol.memberLevel)'>DESC</if> <if test='orderCol.isAccept != null and "DESC".equalsIgnoreCase(orderCol.isAccept)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('isAccept')"> <if test="orderCol.containsKey('createUserId')">
a.isAccept a.createUserId
<if test='orderCol.isAccept != null and "DESC".equalsIgnoreCase(orderCol.isAccept)'>DESC</if> <if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('createUserId')"> <if test="orderCol.containsKey('createTime')">
a.createUserId a.createTime
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if> <if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('createTime')"> <if test="orderCol.containsKey('updateTime')">
a.createTime a.updateTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if> <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('updateTime')"> <if test="orderCol.containsKey('custName')">
a.updateTime a.custName
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> <if test='orderCol.custName != null and "DESC".equalsIgnoreCase(orderCol.custName)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('organization')">
a.organization
<if test='orderCol.organization != null and "DESC".equalsIgnoreCase(orderCol.organization)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('contactTelphone')">
a.contactTelphone
<if test='orderCol.contactTelphone != null and "DESC".equalsIgnoreCase(orderCol.contactTelphone)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('sex')">
a.sex
<if test='orderCol.sex != null and "DESC".equalsIgnoreCase(orderCol.sex)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('mailbox')">
a.mailbox
<if test='orderCol.mailbox != null and "DESC".equalsIgnoreCase(orderCol.mailbox)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('job')">
a.job
<if test='orderCol.job != null and "DESC".equalsIgnoreCase(orderCol.job)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<result property="masterplateUseNum" column="masterplateUseNum" /> <result property="masterplateUseNum" column="masterplateUseNum" />
<result property="previewUrl" column="previewUrl" /> <result property="previewUrl" column="previewUrl" />
<result property="draft" column="draft" /> <result property="draft" column="draft" />
<result property="plateType" column="plateType" />
</resultMap> </resultMap>
...@@ -72,23 +73,26 @@ ...@@ -72,23 +73,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('draft') or colPickMode == 1 and data.containsKey('draft')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('draft') or colPickMode == 1 and data.containsKey('draft')))">
a.draft, a.draft,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('plateType') or colPickMode == 1 and data.containsKey('plateType')))">
a.plateType,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="DesignMasterplateEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="DesignMasterplateEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_design_masterplate insert into mortals_xhx_design_masterplate
(masterplateName,masterplateCode,customerId,customerName,createTime,masterplateDesc,masterplatePath,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,masterplateUseNum,previewUrl,draft) (masterplateName,masterplateCode,customerId,customerName,createTime,masterplateDesc,masterplatePath,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,masterplateUseNum,previewUrl,draft,plateType)
VALUES VALUES
(#{masterplateName},#{masterplateCode},#{customerId},#{customerName},#{createTime},#{masterplateDesc},#{masterplatePath},#{pictureIds},#{pictureSrcIds},#{pictureBackgroundIds},#{fontIds},#{masterplateUseNum},#{previewUrl},#{draft}) (#{masterplateName},#{masterplateCode},#{customerId},#{customerName},#{createTime},#{masterplateDesc},#{masterplatePath},#{pictureIds},#{pictureSrcIds},#{pictureBackgroundIds},#{fontIds},#{masterplateUseNum},#{previewUrl},#{draft},#{plateType})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_design_masterplate insert into mortals_xhx_design_masterplate
(masterplateName,masterplateCode,customerId,customerName,createTime,masterplateDesc,masterplatePath,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,masterplateUseNum,previewUrl,draft) (masterplateName,masterplateCode,customerId,customerName,createTime,masterplateDesc,masterplatePath,pictureIds,pictureSrcIds,pictureBackgroundIds,fontIds,masterplateUseNum,previewUrl,draft,plateType)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <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.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})
</foreach> </foreach>
</insert> </insert>
...@@ -149,6 +153,12 @@ ...@@ -149,6 +153,12 @@
<if test="(colPickMode==0 and data.containsKey('draft')) or (colPickMode==1 and !data.containsKey('draft'))"> <if test="(colPickMode==0 and data.containsKey('draft')) or (colPickMode==1 and !data.containsKey('draft'))">
a.draft=#{data.draft}, a.draft=#{data.draft},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('plateType')) or (colPickMode==1 and !data.containsKey('plateType'))">
a.plateType=#{data.plateType},
</if>
<if test="(colPickMode==0 and data.containsKey('plateTypeIncrement')) or (colPickMode==1 and !data.containsKey('plateTypeIncrement'))">
a.plateType=ifnull(a.plateType,0) + #{data.plateTypeIncrement},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -274,6 +284,18 @@ ...@@ -274,6 +284,18 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="plateType=(case" suffix="ELSE plateType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('plateType')) or (colPickMode==1 and !item.containsKey('plateType'))">
when a.id=#{item.id} then #{item.plateType}
</when>
<when test="(colPickMode==0 and item.containsKey('plateTypeIncrement')) or (colPickMode==1 and !item.containsKey('plateTypeIncrement'))">
when a.id=#{item.id} then ifnull(a.plateType,0) + #{item.plateTypeIncrement}
</when>
</choose>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -624,6 +646,27 @@ ...@@ -624,6 +646,27 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('plateType')">
<if test="conditionParamRef.plateType != null ">
${_conditionType_} a.plateType = #{${_conditionParam_}.plateType}
</if>
<if test="conditionParamRef.plateType == null">
${_conditionType_} a.plateType is null
</if>
</if>
<if test="conditionParamRef.containsKey('plateTypeList')">
${_conditionType_} a.plateType in
<foreach collection="conditionParamRef.plateTypeList" 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>
<if test="conditionParamRef.containsKey('plateTypeEnd') and conditionParamRef.plateTypeEnd != null">
${_conditionType_} a.plateType <![CDATA[ <= ]]> #{${_conditionParam_}.plateTypeEnd}
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -712,6 +755,11 @@ ...@@ -712,6 +755,11 @@
<if test='orderCol.draft != null and "DESC".equalsIgnoreCase(orderCol.draft)'>DESC</if> <if test='orderCol.draft != null and "DESC".equalsIgnoreCase(orderCol.draft)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('plateType')">
a.plateType
<if test='orderCol.plateType != null and "DESC".equalsIgnoreCase(orderCol.plateType)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
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