Commit 888f2386 authored by 廖旭伟's avatar 廖旭伟

客户管理增加图片视频作品数量展示

parent 5e961dd5
package com.mortals.xhx.module.customer.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.module.customer.model.CustomerEntity;
import java.util.List;
import com.mortals.xhx.module.customer.model.CustomerEntityExt;
/**
* 客户管理Dao
* 客户管理 DAO接口
......@@ -12,5 +14,5 @@ import java.util.List;
*/
public interface CustomerDao extends ICRUDDao<CustomerEntity,Long>{
Result<CustomerEntityExt> getListExt(CustomerEntity params, PageInfo pageInfo);
}
package com.mortals.xhx.module.customer.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity;
import java.util.List;
/**
* 客户收藏信息Dao
* 客户收藏信息 DAO接口
*
* @author zxfei
* @date 2022-06-13
*/
public interface CustomerWorkCollectDao extends ICRUDDao<CustomerWorkCollectEntity,Long>{
}
......@@ -8,7 +8,7 @@ import java.util.List;
* 客户作品信息 DAO接口
*
* @author zxfei
* @date 2022-06-08
* @date 2022-06-13
*/
public interface CustomerWorkDesignDao extends ICRUDDao<CustomerWorkDesignEntity,Long>{
......
package com.mortals.xhx.module.customer.dao.ibatis;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.ParamDto;
import com.mortals.framework.model.Result;
import com.mortals.xhx.module.customer.model.CustomerEntityExt;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.customer.dao.CustomerDao;
import com.mortals.xhx.module.customer.model.CustomerEntity;
import java.util.ArrayList;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
......@@ -17,5 +24,39 @@ import java.util.List;
public class CustomerDaoImpl extends BaseCRUDDaoMybatis<CustomerEntity,Long> implements CustomerDao {
@Override
public Result<CustomerEntityExt> getListExt(CustomerEntity params, PageInfo pageInfo) {
ParamDto paramDto = this.getQueryParam(params);
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;
}
}
package com.mortals.xhx.module.customer.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.customer.dao.CustomerWorkCollectDao;
import com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 客户收藏信息DaoImpl DAO接口
*
* @author zxfei
* @date 2022-06-13
*/
@Repository("customerWorkCollectDao")
public class CustomerWorkCollectDaoImpl extends BaseCRUDDaoMybatis<CustomerWorkCollectEntity,Long> implements CustomerWorkCollectDao {
}
......@@ -11,7 +11,7 @@ import java.util.List;
* 客户作品信息DaoImpl DAO接口
*
* @author zxfei
* @date 2022-06-08
* @date 2022-06-13
*/
@Repository("customerWorkDesignDao")
public class CustomerWorkDesignDaoImpl extends BaseCRUDDaoMybatis<CustomerWorkDesignEntity,Long> implements CustomerWorkDesignDao {
......
package com.mortals.xhx.module.customer.model;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.customer.model.vo.CustomerVo;
/**
* 客户管理实体对象
*
* @author zxfei
* @date 2022-06-08
*/
* 客户管理实体对象
*
* @author zxfei
* @date 2022-06-13
*/
public class CustomerEntity extends CustomerVo {
private static final long serialVersionUID = 1L;
......@@ -68,6 +71,15 @@ public class CustomerEntity extends CustomerVo {
* 使用状态,1:正常,0:禁用,默认:0
*/
private Integer status;
/**
* 最后一次登录时间
*/
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date lastLoginTime;
/**
* 最后一次登录地址
*/
private String lastLoginAddress;
......@@ -254,6 +266,34 @@ public class CustomerEntity extends CustomerVo {
public void setStatus(Integer status){
this.status = status;
}
/**
* 获取 最后一次登录时间
* @return Date
*/
public Date getLastLoginTime(){
return lastLoginTime;
}
/**
* 设置 最后一次登录时间
* @param lastLoginTime
*/
public void setLastLoginTime(Date lastLoginTime){
this.lastLoginTime = lastLoginTime;
}
/**
* 获取 最后一次登录地址
* @return String
*/
public String getLastLoginAddress(){
return lastLoginAddress;
}
/**
* 设置 最后一次登录地址
* @param lastLoginAddress
*/
public void setLastLoginAddress(String lastLoginAddress){
this.lastLoginAddress = lastLoginAddress;
}
......@@ -289,6 +329,8 @@ public class CustomerEntity extends CustomerVo {
sb.append(",job:").append(getJob());
sb.append(",customerSrc:").append(getCustomerSrc());
sb.append(",status:").append(getStatus());
sb.append(",lastLoginTime:").append(getLastLoginTime());
sb.append(",lastLoginAddress:").append(getLastLoginAddress());
return sb.toString();
}
......@@ -298,7 +340,7 @@ public class CustomerEntity extends CustomerVo {
this.password = "";
this.memberLevel = null;
this.memberLevel = 0;
this.custName = "";
......@@ -318,6 +360,10 @@ public class CustomerEntity extends CustomerVo {
this.customerSrc = null;
this.status = null;
this.status = 0;
this.lastLoginTime = null;
this.lastLoginAddress = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.customer.model;
import lombok.Data;
@Data
public class CustomerEntityExt extends CustomerEntity {
/**
* 客户设计图片数量
*/
private Integer customerDesignPictures;
/**
* 客户设计视频数量
*/
private Integer customerDesignVideos;
private String createTimeStr;
}
package com.mortals.xhx.module.customer.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.customer.model.vo.CustomerWorkCollectVo;
/**
* 客户收藏信息实体对象
*
* @author zxfei
* @date 2022-06-13
*/
public class CustomerWorkCollectEntity extends CustomerWorkCollectVo {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private Long customerId;
/**
* 模版ID
*/
private Long masterplateId;
public CustomerWorkCollectEntity(){}
/**
* 获取 客户ID
* @return Long
*/
public Long getCustomerId(){
return customerId;
}
/**
* 设置 客户ID
* @param customerId
*/
public void setCustomerId(Long customerId){
this.customerId = customerId;
}
/**
* 获取 模版ID
* @return Long
*/
public Long getMasterplateId(){
return masterplateId;
}
/**
* 设置 模版ID
* @param masterplateId
*/
public void setMasterplateId(Long masterplateId){
this.masterplateId = masterplateId;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof CustomerWorkCollectEntity) {
CustomerWorkCollectEntity tmp = (CustomerWorkCollectEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",customerId:").append(getCustomerId());
sb.append(",masterplateId:").append(getMasterplateId());
return sb.toString();
}
public void initAttrValue(){
this.customerId = null;
this.masterplateId = null;
}
}
\ No newline at end of file
package com.mortals.xhx.module.customer.model;
import java.util.List;
import com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity;
/**
* 客户收藏信息查询对象
*
* @author zxfei
* @date 2022-06-13
*/
public class CustomerWorkCollectQuery extends CustomerWorkCollectEntity {
/** 开始 主键ID,主键,自增长 */
private Long idStart;
/** 结束 主键ID,主键,自增长 */
private Long idEnd;
/** 增加 主键ID,主键,自增长 */
private Long idIncrement;
/** 主键ID,主键,自增长列表 */
private List <Long> idList;
/** 开始 客户ID */
private Long customerIdStart;
/** 结束 客户ID */
private Long customerIdEnd;
/** 增加 客户ID */
private Long customerIdIncrement;
/** 客户ID列表 */
private List <Long> customerIdList;
/** 开始 模版ID */
private Long masterplateIdStart;
/** 结束 模版ID */
private Long masterplateIdEnd;
/** 增加 模版ID */
private Long masterplateIdIncrement;
/** 模版ID列表 */
private List <Long> masterplateIdList;
/** 开始 收藏时间 */
private String createTimeStart;
/** 结束 收藏时间 */
private String createTimeEnd;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<CustomerWorkCollectQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<CustomerWorkCollectQuery> andConditionList;
public CustomerWorkCollectQuery(){}
/**
* 获取 开始 主键ID,主键,自增长
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 主键ID,主键,自增长
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 主键ID,主键,自增长
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 主键ID,主键,自增长
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 主键ID,主键,自增长
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 开始 客户ID
* @return customerIdStart
*/
public Long getCustomerIdStart(){
return this.customerIdStart;
}
/**
* 设置 开始 客户ID
* @param customerIdStart
*/
public void setCustomerIdStart(Long customerIdStart){
this.customerIdStart = customerIdStart;
}
/**
* 获取 结束 客户ID
* @return $customerIdEnd
*/
public Long getCustomerIdEnd(){
return this.customerIdEnd;
}
/**
* 设置 结束 客户ID
* @param customerIdEnd
*/
public void setCustomerIdEnd(Long customerIdEnd){
this.customerIdEnd = customerIdEnd;
}
/**
* 获取 增加 客户ID
* @return customerIdIncrement
*/
public Long getCustomerIdIncrement(){
return this.customerIdIncrement;
}
/**
* 设置 增加 客户ID
* @param customerIdIncrement
*/
public void setCustomerIdIncrement(Long customerIdIncrement){
this.customerIdIncrement = customerIdIncrement;
}
/**
* 获取 客户ID
* @return customerIdList
*/
public List<Long> getCustomerIdList(){
return this.customerIdList;
}
/**
* 设置 客户ID
* @param customerIdList
*/
public void setCustomerIdList(List<Long> customerIdList){
this.customerIdList = customerIdList;
}
/**
* 获取 开始 模版ID
* @return masterplateIdStart
*/
public Long getMasterplateIdStart(){
return this.masterplateIdStart;
}
/**
* 设置 开始 模版ID
* @param masterplateIdStart
*/
public void setMasterplateIdStart(Long masterplateIdStart){
this.masterplateIdStart = masterplateIdStart;
}
/**
* 获取 结束 模版ID
* @return $masterplateIdEnd
*/
public Long getMasterplateIdEnd(){
return this.masterplateIdEnd;
}
/**
* 设置 结束 模版ID
* @param masterplateIdEnd
*/
public void setMasterplateIdEnd(Long masterplateIdEnd){
this.masterplateIdEnd = masterplateIdEnd;
}
/**
* 获取 增加 模版ID
* @return masterplateIdIncrement
*/
public Long getMasterplateIdIncrement(){
return this.masterplateIdIncrement;
}
/**
* 设置 增加 模版ID
* @param masterplateIdIncrement
*/
public void setMasterplateIdIncrement(Long masterplateIdIncrement){
this.masterplateIdIncrement = masterplateIdIncrement;
}
/**
* 获取 模版ID
* @return masterplateIdList
*/
public List<Long> getMasterplateIdList(){
return this.masterplateIdList;
}
/**
* 设置 模版ID
* @param masterplateIdList
*/
public void setMasterplateIdList(List<Long> masterplateIdList){
this.masterplateIdList = masterplateIdList;
}
/**
* 获取 开始 收藏时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 收藏时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 收藏时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 收藏时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 设置 主键ID,主键,自增长
* @param id
*/
public CustomerWorkCollectQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
public CustomerWorkCollectQuery idStart(Long idStart){
this.idStart = idStart;
return this;
}
/**
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
public CustomerWorkCollectQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
public CustomerWorkCollectQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 主键ID,主键,自增长
* @param idList
*/
public CustomerWorkCollectQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 客户ID
* @param customerId
*/
public CustomerWorkCollectQuery customerId(Long customerId){
setCustomerId(customerId);
return this;
}
/**
* 设置 开始 客户ID
* @param customerIdStart
*/
public CustomerWorkCollectQuery customerIdStart(Long customerIdStart){
this.customerIdStart = customerIdStart;
return this;
}
/**
* 设置 结束 客户ID
* @param customerIdEnd
*/
public CustomerWorkCollectQuery customerIdEnd(Long customerIdEnd){
this.customerIdEnd = customerIdEnd;
return this;
}
/**
* 设置 增加 客户ID
* @param customerIdIncrement
*/
public CustomerWorkCollectQuery customerIdIncrement(Long customerIdIncrement){
this.customerIdIncrement = customerIdIncrement;
return this;
}
/**
* 设置 客户ID
* @param customerIdList
*/
public CustomerWorkCollectQuery customerIdList(List<Long> customerIdList){
this.customerIdList = customerIdList;
return this;
}
/**
* 设置 模版ID
* @param masterplateId
*/
public CustomerWorkCollectQuery masterplateId(Long masterplateId){
setMasterplateId(masterplateId);
return this;
}
/**
* 设置 开始 模版ID
* @param masterplateIdStart
*/
public CustomerWorkCollectQuery masterplateIdStart(Long masterplateIdStart){
this.masterplateIdStart = masterplateIdStart;
return this;
}
/**
* 设置 结束 模版ID
* @param masterplateIdEnd
*/
public CustomerWorkCollectQuery masterplateIdEnd(Long masterplateIdEnd){
this.masterplateIdEnd = masterplateIdEnd;
return this;
}
/**
* 设置 增加 模版ID
* @param masterplateIdIncrement
*/
public CustomerWorkCollectQuery masterplateIdIncrement(Long masterplateIdIncrement){
this.masterplateIdIncrement = masterplateIdIncrement;
return this;
}
/**
* 设置 模版ID
* @param masterplateIdList
*/
public CustomerWorkCollectQuery masterplateIdList(List<Long> masterplateIdList){
this.masterplateIdList = masterplateIdList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<CustomerWorkCollectQuery> getOrConditionList(){
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<CustomerWorkCollectQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<CustomerWorkCollectQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<CustomerWorkCollectQuery> andConditionList){
this.andConditionList = andConditionList;
}
}
\ No newline at end of file
......@@ -10,7 +10,7 @@ import com.mortals.xhx.module.customer.model.vo.CustomerWorkDesignVo;
* 客户作品信息实体对象
*
* @author zxfei
* @date 2022-06-08
* @date 2022-06-13
*/
public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
......@@ -21,9 +21,33 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
*/
private Long customerId;
/**
* 模版ID
* 作品名称
*/
private Long masterplateId;
private String workDesignName;
/**
* 作品状态:0:草稿,1:发布
*/
private Integer workDesignStatus;
/**
* 作品描述
*/
private String workDesignDesc;
/**
* 模版引用的图片
*/
private Long pictureId;
/**
* 模版引用的素材
*/
private Long pictureSrcId;
/**
* 模版引用的背景
*/
private Long pictureBackgroundId;
/**
* 作品引用的字体
*/
private Long fontId;
......@@ -43,18 +67,102 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
this.customerId = customerId;
}
/**
* 获取 模版ID
* 获取 作品名称
* @return String
*/
public String getWorkDesignName(){
return workDesignName;
}
/**
* 设置 作品名称
* @param workDesignName
*/
public void setWorkDesignName(String workDesignName){
this.workDesignName = workDesignName;
}
/**
* 获取 作品状态:0:草稿,1:发布
* @return Integer
*/
public Integer getWorkDesignStatus(){
return workDesignStatus;
}
/**
* 设置 作品状态:0:草稿,1:发布
* @param workDesignStatus
*/
public void setWorkDesignStatus(Integer workDesignStatus){
this.workDesignStatus = workDesignStatus;
}
/**
* 获取 作品描述
* @return String
*/
public String getWorkDesignDesc(){
return workDesignDesc;
}
/**
* 设置 作品描述
* @param workDesignDesc
*/
public void setWorkDesignDesc(String workDesignDesc){
this.workDesignDesc = workDesignDesc;
}
/**
* 获取 模版引用的图片
* @return Long
*/
public Long getPictureId(){
return pictureId;
}
/**
* 设置 模版引用的图片
* @param pictureId
*/
public void setPictureId(Long pictureId){
this.pictureId = pictureId;
}
/**
* 获取 模版引用的素材
* @return Long
*/
public Long getPictureSrcId(){
return pictureSrcId;
}
/**
* 设置 模版引用的素材
* @param pictureSrcId
*/
public void setPictureSrcId(Long pictureSrcId){
this.pictureSrcId = pictureSrcId;
}
/**
* 获取 模版引用的背景
* @return Long
*/
public Long getPictureBackgroundId(){
return pictureBackgroundId;
}
/**
* 设置 模版引用的背景
* @param pictureBackgroundId
*/
public void setPictureBackgroundId(Long pictureBackgroundId){
this.pictureBackgroundId = pictureBackgroundId;
}
/**
* 获取 作品引用的字体
* @return Long
*/
public Long getMasterplateId(){
return masterplateId;
public Long getFontId(){
return fontId;
}
/**
* 设置 模版ID
* @param masterplateId
* 设置 作品引用的字体
* @param fontId
*/
public void setMasterplateId(Long masterplateId){
this.masterplateId = masterplateId;
public void setFontId(Long fontId){
this.fontId = fontId;
}
......@@ -79,7 +187,13 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",customerId:").append(getCustomerId());
sb.append(",masterplateId:").append(getMasterplateId());
sb.append(",workDesignName:").append(getWorkDesignName());
sb.append(",workDesignStatus:").append(getWorkDesignStatus());
sb.append(",workDesignDesc:").append(getWorkDesignDesc());
sb.append(",pictureId:").append(getPictureId());
sb.append(",pictureSrcId:").append(getPictureSrcId());
sb.append(",pictureBackgroundId:").append(getPictureBackgroundId());
sb.append(",fontId:").append(getFontId());
return sb.toString();
}
......@@ -87,6 +201,18 @@ public class CustomerWorkDesignEntity extends CustomerWorkDesignVo {
this.customerId = null;
this.masterplateId = null;
this.workDesignName = "";
this.workDesignStatus = null;
this.workDesignDesc = "";
this.pictureId = null;
this.pictureSrcId = null;
this.pictureBackgroundId = null;
this.fontId = null;
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ import com.mortals.xhx.module.customer.model.CustomerWorkDesignEntity;
* 客户作品信息查询对象
*
* @author zxfei
* @date 2022-06-08
* @date 2022-06-13
*/
public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
/** 开始 主键ID,主键,自增长 */
......@@ -33,23 +33,83 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
/** 客户ID列表 */
private List <Long> customerIdList;
/** 开始 收藏时间 */
/** 开始 创建时间 */
private String createTimeStart;
/** 结束 收藏时间 */
/** 结束 创建时间 */
private String createTimeEnd;
/** 开始 模版ID */
private Long masterplateIdStart;
/** 作品名称 */
private List<String> workDesignNameList;
/** 结束 模版ID */
private Long masterplateIdEnd;
/** 开始 作品状态:0:草稿,1:发布 */
private Integer workDesignStatusStart;
/** 增加 模版ID */
private Long masterplateIdIncrement;
/** 结束 作品状态:0:草稿,1:发布 */
private Integer workDesignStatusEnd;
/** 模版ID列表 */
private List <Long> masterplateIdList;
/** 增加 作品状态:0:草稿,1:发布 */
private Integer workDesignStatusIncrement;
/** 作品状态:0:草稿,1:发布列表 */
private List <Integer> workDesignStatusList;
/** 作品描述 */
private List<String> workDesignDescList;
/** 开始 更新时间 */
private String updateTimeStart;
/** 结束 更新时间 */
private String updateTimeEnd;
/** 开始 模版引用的图片 */
private Long pictureIdStart;
/** 结束 模版引用的图片 */
private Long pictureIdEnd;
/** 增加 模版引用的图片 */
private Long pictureIdIncrement;
/** 模版引用的图片列表 */
private List <Long> pictureIdList;
/** 开始 模版引用的素材 */
private Long pictureSrcIdStart;
/** 结束 模版引用的素材 */
private Long pictureSrcIdEnd;
/** 增加 模版引用的素材 */
private Long pictureSrcIdIncrement;
/** 模版引用的素材列表 */
private List <Long> pictureSrcIdList;
/** 开始 模版引用的背景 */
private Long pictureBackgroundIdStart;
/** 结束 模版引用的背景 */
private Long pictureBackgroundIdEnd;
/** 增加 模版引用的背景 */
private Long pictureBackgroundIdIncrement;
/** 模版引用的背景列表 */
private List <Long> pictureBackgroundIdList;
/** 开始 作品引用的字体 */
private Long fontIdStart;
/** 结束 作品引用的字体 */
private Long fontIdEnd;
/** 增加 作品引用的字体 */
private Long fontIdIncrement;
/** 作品引用的字体列表 */
private List <Long> fontIdList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<CustomerWorkDesignQuery> orConditionList;
......@@ -188,7 +248,7 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
}
/**
* 获取 开始 收藏时间
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
......@@ -196,7 +256,7 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
}
/**
* 设置 开始 收藏时间
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
......@@ -204,7 +264,7 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
}
/**
* 获取 结束 收藏时间
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
......@@ -212,7 +272,7 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
}
/**
* 设置 结束 收藏时间
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
......@@ -220,67 +280,385 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
}
/**
* 获取 开始 模版ID
* @return masterplateIdStart
* 获取 作品名称
* @return workDesignNameList
*/
public List<String> getWorkDesignNameList(){
return this.workDesignNameList;
}
/**
* 设置 作品名称
* @param workDesignNameList
*/
public void setWorkDesignNameList(List<String> workDesignNameList){
this.workDesignNameList = workDesignNameList;
}
/**
* 获取 开始 作品状态:0:草稿,1:发布
* @return workDesignStatusStart
*/
public Integer getWorkDesignStatusStart(){
return this.workDesignStatusStart;
}
/**
* 设置 开始 作品状态:0:草稿,1:发布
* @param workDesignStatusStart
*/
public void setWorkDesignStatusStart(Integer workDesignStatusStart){
this.workDesignStatusStart = workDesignStatusStart;
}
/**
* 获取 结束 作品状态:0:草稿,1:发布
* @return $workDesignStatusEnd
*/
public Integer getWorkDesignStatusEnd(){
return this.workDesignStatusEnd;
}
/**
* 设置 结束 作品状态:0:草稿,1:发布
* @param workDesignStatusEnd
*/
public void setWorkDesignStatusEnd(Integer workDesignStatusEnd){
this.workDesignStatusEnd = workDesignStatusEnd;
}
/**
* 获取 增加 作品状态:0:草稿,1:发布
* @return workDesignStatusIncrement
*/
public Integer getWorkDesignStatusIncrement(){
return this.workDesignStatusIncrement;
}
/**
* 设置 增加 作品状态:0:草稿,1:发布
* @param workDesignStatusIncrement
*/
public void setWorkDesignStatusIncrement(Integer workDesignStatusIncrement){
this.workDesignStatusIncrement = workDesignStatusIncrement;
}
/**
* 获取 作品状态:0:草稿,1:发布
* @return workDesignStatusList
*/
public List<Integer> getWorkDesignStatusList(){
return this.workDesignStatusList;
}
/**
* 设置 作品状态:0:草稿,1:发布
* @param workDesignStatusList
*/
public void setWorkDesignStatusList(List<Integer> workDesignStatusList){
this.workDesignStatusList = workDesignStatusList;
}
/**
* 获取 作品描述
* @return workDesignDescList
*/
public List<String> getWorkDesignDescList(){
return this.workDesignDescList;
}
/**
* 设置 作品描述
* @param workDesignDescList
*/
public Long getMasterplateIdStart(){
return this.masterplateIdStart;
public void setWorkDesignDescList(List<String> workDesignDescList){
this.workDesignDescList = workDesignDescList;
}
/**
* 获取 开始 更新时间
* @return updateTimeStart
*/
public String getUpdateTimeStart(){
return this.updateTimeStart;
}
/**
* 设置 开始 模版ID
* @param masterplateIdStart
* 设置 开始 更新时间
* @param updateTimeStart
*/
public void setMasterplateIdStart(Long masterplateIdStart){
this.masterplateIdStart = masterplateIdStart;
public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
/**
* 获取 结束 模版ID
* @return $masterplateIdEnd
* 获取 结束 更新时间
* @return updateTimeEnd
*/
public Long getMasterplateIdEnd(){
return this.masterplateIdEnd;
public String getUpdateTimeEnd(){
return this.updateTimeEnd;
}
/**
* 设置 结束 模版ID
* @param masterplateIdEnd
* 设置 结束 更新时间
* @param updateTimeEnd
*/
public void setMasterplateIdEnd(Long masterplateIdEnd){
this.masterplateIdEnd = masterplateIdEnd;
public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
/**
* 获取 增加 模版ID
* @return masterplateIdIncrement
* 获取 开始 模版引用的图片
* @return pictureIdStart
*/
public Long getMasterplateIdIncrement(){
return this.masterplateIdIncrement;
public Long getPictureIdStart(){
return this.pictureIdStart;
}
/**
* 设置 增加 模版ID
* @param masterplateIdIncrement
* 设置 开始 模版引用的图片
* @param pictureIdStart
*/
public void setMasterplateIdIncrement(Long masterplateIdIncrement){
this.masterplateIdIncrement = masterplateIdIncrement;
public void setPictureIdStart(Long pictureIdStart){
this.pictureIdStart = pictureIdStart;
}
/**
* 获取 模版ID
* @return masterplateIdList
* 获取 结束 模版引用的图片
* @return $pictureIdEnd
*/
public List<Long> getMasterplateIdList(){
return this.masterplateIdList;
public Long getPictureIdEnd(){
return this.pictureIdEnd;
}
/**
* 设置 模版ID
* @param masterplateIdList
* 设置 结束 模版引用的图片
* @param pictureIdEnd
*/
public void setMasterplateIdList(List<Long> masterplateIdList){
this.masterplateIdList = masterplateIdList;
public void setPictureIdEnd(Long pictureIdEnd){
this.pictureIdEnd = pictureIdEnd;
}
/**
* 获取 增加 模版引用的图片
* @return pictureIdIncrement
*/
public Long getPictureIdIncrement(){
return this.pictureIdIncrement;
}
/**
* 设置 增加 模版引用的图片
* @param pictureIdIncrement
*/
public void setPictureIdIncrement(Long pictureIdIncrement){
this.pictureIdIncrement = pictureIdIncrement;
}
/**
* 获取 模版引用的图片
* @return pictureIdList
*/
public List<Long> getPictureIdList(){
return this.pictureIdList;
}
/**
* 设置 模版引用的图片
* @param pictureIdList
*/
public void setPictureIdList(List<Long> pictureIdList){
this.pictureIdList = pictureIdList;
}
/**
* 获取 开始 模版引用的素材
* @return pictureSrcIdStart
*/
public Long getPictureSrcIdStart(){
return this.pictureSrcIdStart;
}
/**
* 设置 开始 模版引用的素材
* @param pictureSrcIdStart
*/
public void setPictureSrcIdStart(Long pictureSrcIdStart){
this.pictureSrcIdStart = pictureSrcIdStart;
}
/**
* 获取 结束 模版引用的素材
* @return $pictureSrcIdEnd
*/
public Long getPictureSrcIdEnd(){
return this.pictureSrcIdEnd;
}
/**
* 设置 结束 模版引用的素材
* @param pictureSrcIdEnd
*/
public void setPictureSrcIdEnd(Long pictureSrcIdEnd){
this.pictureSrcIdEnd = pictureSrcIdEnd;
}
/**
* 获取 增加 模版引用的素材
* @return pictureSrcIdIncrement
*/
public Long getPictureSrcIdIncrement(){
return this.pictureSrcIdIncrement;
}
/**
* 设置 增加 模版引用的素材
* @param pictureSrcIdIncrement
*/
public void setPictureSrcIdIncrement(Long pictureSrcIdIncrement){
this.pictureSrcIdIncrement = pictureSrcIdIncrement;
}
/**
* 获取 模版引用的素材
* @return pictureSrcIdList
*/
public List<Long> getPictureSrcIdList(){
return this.pictureSrcIdList;
}
/**
* 设置 模版引用的素材
* @param pictureSrcIdList
*/
public void setPictureSrcIdList(List<Long> pictureSrcIdList){
this.pictureSrcIdList = pictureSrcIdList;
}
/**
* 获取 开始 模版引用的背景
* @return pictureBackgroundIdStart
*/
public Long getPictureBackgroundIdStart(){
return this.pictureBackgroundIdStart;
}
/**
* 设置 开始 模版引用的背景
* @param pictureBackgroundIdStart
*/
public void setPictureBackgroundIdStart(Long pictureBackgroundIdStart){
this.pictureBackgroundIdStart = pictureBackgroundIdStart;
}
/**
* 获取 结束 模版引用的背景
* @return $pictureBackgroundIdEnd
*/
public Long getPictureBackgroundIdEnd(){
return this.pictureBackgroundIdEnd;
}
/**
* 设置 结束 模版引用的背景
* @param pictureBackgroundIdEnd
*/
public void setPictureBackgroundIdEnd(Long pictureBackgroundIdEnd){
this.pictureBackgroundIdEnd = pictureBackgroundIdEnd;
}
/**
* 获取 增加 模版引用的背景
* @return pictureBackgroundIdIncrement
*/
public Long getPictureBackgroundIdIncrement(){
return this.pictureBackgroundIdIncrement;
}
/**
* 设置 增加 模版引用的背景
* @param pictureBackgroundIdIncrement
*/
public void setPictureBackgroundIdIncrement(Long pictureBackgroundIdIncrement){
this.pictureBackgroundIdIncrement = pictureBackgroundIdIncrement;
}
/**
* 获取 模版引用的背景
* @return pictureBackgroundIdList
*/
public List<Long> getPictureBackgroundIdList(){
return this.pictureBackgroundIdList;
}
/**
* 设置 模版引用的背景
* @param pictureBackgroundIdList
*/
public void setPictureBackgroundIdList(List<Long> pictureBackgroundIdList){
this.pictureBackgroundIdList = pictureBackgroundIdList;
}
/**
* 获取 开始 作品引用的字体
* @return fontIdStart
*/
public Long getFontIdStart(){
return this.fontIdStart;
}
/**
* 设置 开始 作品引用的字体
* @param fontIdStart
*/
public void setFontIdStart(Long fontIdStart){
this.fontIdStart = fontIdStart;
}
/**
* 获取 结束 作品引用的字体
* @return $fontIdEnd
*/
public Long getFontIdEnd(){
return this.fontIdEnd;
}
/**
* 设置 结束 作品引用的字体
* @param fontIdEnd
*/
public void setFontIdEnd(Long fontIdEnd){
this.fontIdEnd = fontIdEnd;
}
/**
* 获取 增加 作品引用的字体
* @return fontIdIncrement
*/
public Long getFontIdIncrement(){
return this.fontIdIncrement;
}
/**
* 设置 增加 作品引用的字体
* @param fontIdIncrement
*/
public void setFontIdIncrement(Long fontIdIncrement){
this.fontIdIncrement = fontIdIncrement;
}
/**
* 获取 作品引用的字体
* @return fontIdList
*/
public List<Long> getFontIdList(){
return this.fontIdList;
}
/**
* 设置 作品引用的字体
* @param fontIdList
*/
public void setFontIdList(List<Long> fontIdList){
this.fontIdList = fontIdList;
}
/**
......@@ -374,48 +752,267 @@ public class CustomerWorkDesignQuery extends CustomerWorkDesignEntity {
}
/**
* 设置 作品名称
* @param workDesignName
*/
public CustomerWorkDesignQuery workDesignName(String workDesignName){
setWorkDesignName(workDesignName);
return this;
}
/**
* 设置 作品名称
* @param workDesignNameList
*/
public CustomerWorkDesignQuery workDesignNameList(List<String> workDesignNameList){
this.workDesignNameList = workDesignNameList;
return this;
}
/**
* 设置 作品状态:0:草稿,1:发布
* @param workDesignStatus
*/
public CustomerWorkDesignQuery workDesignStatus(Integer workDesignStatus){
setWorkDesignStatus(workDesignStatus);
return this;
}
/**
* 设置 开始 作品状态:0:草稿,1:发布
* @param workDesignStatusStart
*/
public CustomerWorkDesignQuery workDesignStatusStart(Integer workDesignStatusStart){
this.workDesignStatusStart = workDesignStatusStart;
return this;
}
/**
* 设置 结束 作品状态:0:草稿,1:发布
* @param workDesignStatusEnd
*/
public CustomerWorkDesignQuery workDesignStatusEnd(Integer workDesignStatusEnd){
this.workDesignStatusEnd = workDesignStatusEnd;
return this;
}
/**
* 设置 增加 作品状态:0:草稿,1:发布
* @param workDesignStatusIncrement
*/
public CustomerWorkDesignQuery workDesignStatusIncrement(Integer workDesignStatusIncrement){
this.workDesignStatusIncrement = workDesignStatusIncrement;
return this;
}
/**
* 设置 作品状态:0:草稿,1:发布
* @param workDesignStatusList
*/
public CustomerWorkDesignQuery workDesignStatusList(List<Integer> workDesignStatusList){
this.workDesignStatusList = workDesignStatusList;
return this;
}
/**
* 设置 作品描述
* @param workDesignDesc
*/
public CustomerWorkDesignQuery workDesignDesc(String workDesignDesc){
setWorkDesignDesc(workDesignDesc);
return this;
}
/**
* 设置 作品描述
* @param workDesignDescList
*/
public CustomerWorkDesignQuery workDesignDescList(List<String> workDesignDescList){
this.workDesignDescList = workDesignDescList;
return this;
}
/**
* 设置 模版引用的图片
* @param pictureId
*/
public CustomerWorkDesignQuery pictureId(Long pictureId){
setPictureId(pictureId);
return this;
}
/**
* 设置 开始 模版引用的图片
* @param pictureIdStart
*/
public CustomerWorkDesignQuery pictureIdStart(Long pictureIdStart){
this.pictureIdStart = pictureIdStart;
return this;
}
/**
* 设置 结束 模版引用的图片
* @param pictureIdEnd
*/
public CustomerWorkDesignQuery pictureIdEnd(Long pictureIdEnd){
this.pictureIdEnd = pictureIdEnd;
return this;
}
/**
* 设置 增加 模版引用的图片
* @param pictureIdIncrement
*/
public CustomerWorkDesignQuery pictureIdIncrement(Long pictureIdIncrement){
this.pictureIdIncrement = pictureIdIncrement;
return this;
}
/**
* 设置 模版引用的图片
* @param pictureIdList
*/
public CustomerWorkDesignQuery pictureIdList(List<Long> pictureIdList){
this.pictureIdList = pictureIdList;
return this;
}
/**
* 设置 模版引用的素材
* @param pictureSrcId
*/
public CustomerWorkDesignQuery pictureSrcId(Long pictureSrcId){
setPictureSrcId(pictureSrcId);
return this;
}
/**
* 设置 开始 模版引用的素材
* @param pictureSrcIdStart
*/
public CustomerWorkDesignQuery pictureSrcIdStart(Long pictureSrcIdStart){
this.pictureSrcIdStart = pictureSrcIdStart;
return this;
}
/**
* 设置 结束 模版引用的素材
* @param pictureSrcIdEnd
*/
public CustomerWorkDesignQuery pictureSrcIdEnd(Long pictureSrcIdEnd){
this.pictureSrcIdEnd = pictureSrcIdEnd;
return this;
}
/**
* 设置 增加 模版引用的素材
* @param pictureSrcIdIncrement
*/
public CustomerWorkDesignQuery pictureSrcIdIncrement(Long pictureSrcIdIncrement){
this.pictureSrcIdIncrement = pictureSrcIdIncrement;
return this;
}
/**
* 设置 模版引用的素材
* @param pictureSrcIdList
*/
public CustomerWorkDesignQuery pictureSrcIdList(List<Long> pictureSrcIdList){
this.pictureSrcIdList = pictureSrcIdList;
return this;
}
/**
* 设置 模版引用的背景
* @param pictureBackgroundId
*/
public CustomerWorkDesignQuery pictureBackgroundId(Long pictureBackgroundId){
setPictureBackgroundId(pictureBackgroundId);
return this;
}
/**
* 设置 开始 模版引用的背景
* @param pictureBackgroundIdStart
*/
public CustomerWorkDesignQuery pictureBackgroundIdStart(Long pictureBackgroundIdStart){
this.pictureBackgroundIdStart = pictureBackgroundIdStart;
return this;
}
/**
* 设置 结束 模版引用的背景
* @param pictureBackgroundIdEnd
*/
public CustomerWorkDesignQuery pictureBackgroundIdEnd(Long pictureBackgroundIdEnd){
this.pictureBackgroundIdEnd = pictureBackgroundIdEnd;
return this;
}
/**
* 设置 增加 模版引用的背景
* @param pictureBackgroundIdIncrement
*/
public CustomerWorkDesignQuery pictureBackgroundIdIncrement(Long pictureBackgroundIdIncrement){
this.pictureBackgroundIdIncrement = pictureBackgroundIdIncrement;
return this;
}
/**
* 设置 模版引用的背景
* @param pictureBackgroundIdList
*/
public CustomerWorkDesignQuery pictureBackgroundIdList(List<Long> pictureBackgroundIdList){
this.pictureBackgroundIdList = pictureBackgroundIdList;
return this;
}
/**
* 设置 模版ID
* @param masterplateId
* 设置 作品引用的字体
* @param fontId
*/
public CustomerWorkDesignQuery masterplateId(Long masterplateId){
setMasterplateId(masterplateId);
public CustomerWorkDesignQuery fontId(Long fontId){
setFontId(fontId);
return this;
}
/**
* 设置 开始 模版ID
* @param masterplateIdStart
* 设置 开始 作品引用的字体
* @param fontIdStart
*/
public CustomerWorkDesignQuery masterplateIdStart(Long masterplateIdStart){
this.masterplateIdStart = masterplateIdStart;
public CustomerWorkDesignQuery fontIdStart(Long fontIdStart){
this.fontIdStart = fontIdStart;
return this;
}
/**
* 设置 结束 模版ID
* @param masterplateIdEnd
* 设置 结束 作品引用的字体
* @param fontIdEnd
*/
public CustomerWorkDesignQuery masterplateIdEnd(Long masterplateIdEnd){
this.masterplateIdEnd = masterplateIdEnd;
public CustomerWorkDesignQuery fontIdEnd(Long fontIdEnd){
this.fontIdEnd = fontIdEnd;
return this;
}
/**
* 设置 增加 模版ID
* @param masterplateIdIncrement
* 设置 增加 作品引用的字体
* @param fontIdIncrement
*/
public CustomerWorkDesignQuery masterplateIdIncrement(Long masterplateIdIncrement){
this.masterplateIdIncrement = masterplateIdIncrement;
public CustomerWorkDesignQuery fontIdIncrement(Long fontIdIncrement){
this.fontIdIncrement = fontIdIncrement;
return this;
}
/**
* 设置 模版ID
* @param masterplateIdList
* 设置 作品引用的字体
* @param fontIdList
*/
public CustomerWorkDesignQuery masterplateIdList(List<Long> masterplateIdList){
this.masterplateIdList = masterplateIdList;
public CustomerWorkDesignQuery fontIdList(List<Long> fontIdList){
this.fontIdList = fontIdList;
return this;
}
......
package com.mortals.xhx.module.customer.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* 客户收藏信息视图对象
*
* @author zxfei
* @date 2022-06-13
*/
@Data
public class CustomerWorkCollectVo extends BaseEntityLong {
}
\ No newline at end of file
......@@ -9,7 +9,7 @@ import java.util.List;
* 客户作品信息视图对象
*
* @author zxfei
* @date 2022-06-08
* @date 2022-06-13
*/
@Data
public class CustomerWorkDesignVo extends BaseEntityLong {
......
package com.mortals.xhx.module.customer.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.customer.model.CustomerEntity;
import com.mortals.xhx.module.customer.model.CustomerEntityExt;
/**
* CustomerService
*
......@@ -11,4 +18,6 @@ import com.mortals.xhx.module.customer.model.CustomerEntity;
*/
public interface CustomerService extends ICRUDService<CustomerEntity,Long>{
Result<CustomerEntityExt> findExt(CustomerEntity params, PageInfo pageInfo, Context context) throws AppException;
}
\ No newline at end of file
package com.mortals.xhx.module.customer.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity;
/**
* CustomerWorkCollectService
*
* 客户收藏信息 service接口
*
* @author zxfei
* @date 2022-06-13
*/
public interface CustomerWorkCollectService extends ICRUDService<CustomerWorkCollectEntity,Long>{
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ import com.mortals.xhx.module.customer.model.CustomerWorkDesignEntity;
* 客户作品信息 service接口
*
* @author zxfei
* @date 2022-06-08
* @date 2022-06-13
*/
public interface CustomerWorkDesignService extends ICRUDService<CustomerWorkDesignEntity,Long>{
......
......@@ -2,8 +2,12 @@ package com.mortals.xhx.module.customer.service.impl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.customer.model.CustomerEntityExt;
import com.mortals.xhx.module.customer.model.CustomerQuery;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
......@@ -45,4 +49,17 @@ public class CustomerServiceImpl extends AbstractCRUDServiceImpl<CustomerDao, Cu
}
return query;
}
@Override
public Result<CustomerEntityExt> findExt(CustomerEntity params, PageInfo pageInfo, Context context) throws AppException {
CustomerEntity query = this.findBefore(params, pageInfo, context);
Result<CustomerEntityExt> result = getDao().getListExt(query,pageInfo);
List<CustomerEntityExt> list = result.getList();
if(CollectionUtils.isNotEmpty(list)){
list.stream().forEach(item->{
item.setCreateTimeStr(DateUtils.getDateTime(item.getCreateTime(),DateUtils.P_yyyy_MM_dd_HH_mm_ss));
});
}
return result;
}
}
\ No newline at end of file
package com.mortals.xhx.module.customer.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.customer.dao.CustomerWorkCollectDao;
import com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity;
import com.mortals.xhx.module.customer.service.CustomerWorkCollectService;
/**
* CustomerWorkCollectService
* 客户收藏信息 service实现
*
* @author zxfei
* @date 2022-06-13
*/
@Service("customerWorkCollectService")
public class CustomerWorkCollectServiceImpl extends AbstractCRUDServiceImpl<CustomerWorkCollectDao, CustomerWorkCollectEntity, Long> implements CustomerWorkCollectService {
}
\ No newline at end of file
......@@ -9,7 +9,7 @@ import com.mortals.xhx.module.customer.service.CustomerWorkDesignService;
* 客户作品信息 service实现
*
* @author zxfei
* @date 2022-06-08
* @date 2022-06-13
*/
@Service("customerWorkDesignService")
public class CustomerWorkDesignServiceImpl extends AbstractCRUDServiceImpl<CustomerWorkDesignDao, CustomerWorkDesignEntity, Long> implements CustomerWorkDesignService {
......
package com.mortals.xhx.module.customer.web;
import com.mortals.framework.common.IBaseEnum;
import com.mortals.framework.common.code.UserType;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.CustomerSatusEnum;
import com.mortals.xhx.common.code.CustomerSrcEnum;
import com.mortals.xhx.common.code.MemberLevelEnum;
import com.mortals.xhx.common.code.SexEnum;
import com.mortals.xhx.module.customer.model.CustomerTrialEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -51,6 +54,36 @@ public class CustomerController extends BaseCRUDJsonBodyMappingController<Custom
super.init(model, context);
}
@Override
public String list(@RequestBody(required = false) CustomerEntity query) {
Map<String, Object> model = new HashMap();
JSONObject ret = new JSONObject();
Context context = this.getContext();
String busiDesc = "查询" + this.getModuleDesc();
int code;
try {
PageInfo pageInfo = this.buildPageInfo(query);
this.doListBefore(query, model, context);
Result result = this.getService().findExt(query, pageInfo, context);
model.put("data", result.getList());
model.put("pageInfo", result.getPageInfo());
this.parsePageInfo(model, result.getPageInfo());
code = this.doListAfter(query, model, context);
this.recordSysLog(this.request, busiDesc + " 【成功】");
} catch (Exception var9) {
code = -1;
this.doException(this.request, busiDesc, model, var9);
}
this.init(model, context);
ret.put("code", code);
ret.put("msg", model.remove("message_info"));
ret.put("dict", model.remove("dict"));
ret.put("data", model);
return ret.toJSONString();
}
@GetMapping({"status/enable"})
public String enableStatus(Long[] id) {
Context context = this.getContext();
......
package com.mortals.xhx.module.customer.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity;
import com.mortals.xhx.module.customer.model.CustomerWorkCollectQuery;
import com.mortals.xhx.module.customer.service.CustomerWorkCollectService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 客户收藏信息
*
* @author zxfei
* @date 2022-06-13
*/
@RestController
@RequestMapping("customer/work/collect")
public class CustomerWorkCollectController extends BaseCRUDJsonBodyMappingController<CustomerWorkCollectService,CustomerWorkCollectEntity,Long> {
@Autowired
private ParamService paramService;
public CustomerWorkCollectController(){
super.setModuleDesc( "客户收藏信息");
}
@Override
protected void init(Map<String, Object> model, Context context) {
super.init(model, context);
}
}
\ No newline at end of file
......@@ -28,7 +28,7 @@ import static com.mortals.framework.ap.SysConstains.*;
* 客户作品信息
*
* @author zxfei
* @date 2022-06-08
* @date 2022-06-13
*/
@RestController
@RequestMapping("customer/work/design")
......@@ -43,6 +43,7 @@ public class CustomerWorkDesignController extends BaseCRUDJsonBodyMappingControl
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "workDesignStatus", paramService.getParamBySecondOrganize("CustomerWorkDesign","workDesignStatus"));
super.init(model, context);
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.customer.dao.ibatis.CustomerDaoImpl">
<!-- 字段和属性映射 -->
......@@ -22,6 +22,8 @@
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateTime" column="updateTime" />
<result property="lastLoginTime" column="lastLoginTime" />
<result property="lastLoginAddress" column="lastLoginAddress" />
</resultMap>
......@@ -80,23 +82,29 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginTime') or colPickMode == 1 and data.containsKey('lastLoginTime')))">
a.lastLoginTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginAddress') or colPickMode == 1 and data.containsKey('lastLoginAddress')))">
a.lastLoginAddress,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="CustomerEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_customer
(loginName,password,memberLevel,custName,organization,contactTelphone,enterpriseConsultant,siteId,sex,mailbox,job,customerSrc,status,createUserId,createTime,updateTime)
(loginName,password,memberLevel,custName,organization,contactTelphone,enterpriseConsultant,siteId,sex,mailbox,job,customerSrc,status,createUserId,createTime,updateTime,lastLoginTime,lastLoginAddress)
VALUES
(#{loginName},#{password},#{memberLevel},#{custName},#{organization},#{contactTelphone},#{enterpriseConsultant},#{siteId},#{sex},#{mailbox},#{job},#{customerSrc},#{status},#{createUserId},#{createTime},#{updateTime})
(#{loginName},#{password},#{memberLevel},#{custName},#{organization},#{contactTelphone},#{enterpriseConsultant},#{siteId},#{sex},#{mailbox},#{job},#{customerSrc},#{status},#{createUserId},#{createTime},#{updateTime},#{lastLoginTime},#{lastLoginAddress})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_customer
(loginName,password,memberLevel,custName,organization,contactTelphone,enterpriseConsultant,siteId,sex,mailbox,job,customerSrc,status,createUserId,createTime,updateTime)
(loginName,password,memberLevel,custName,organization,contactTelphone,enterpriseConsultant,siteId,sex,mailbox,job,customerSrc,status,createUserId,createTime,updateTime,lastLoginTime,lastLoginAddress)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.loginName},#{item.password},#{item.memberLevel},#{item.custName},#{item.organization},#{item.contactTelphone},#{item.enterpriseConsultant},#{item.siteId},#{item.sex},#{item.mailbox},#{item.job},#{item.customerSrc},#{item.status},#{item.createUserId},#{item.createTime},#{item.updateTime})
(#{item.loginName},#{item.password},#{item.memberLevel},#{item.custName},#{item.organization},#{item.contactTelphone},#{item.enterpriseConsultant},#{item.siteId},#{item.sex},#{item.mailbox},#{item.job},#{item.customerSrc},#{item.status},#{item.createUserId},#{item.createTime},#{item.updateTime},#{item.lastLoginTime},#{item.lastLoginAddress})
</foreach>
</insert>
......@@ -172,6 +180,12 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
<if test="(colPickMode==0 and data.containsKey('lastLoginTime')) or (colPickMode==1 and !data.containsKey('lastLoginTime'))">
a.lastLoginTime=#{data.lastLoginTime},
</if>
<if test="(colPickMode==0 and data.containsKey('lastLoginAddress')) or (colPickMode==1 and !data.containsKey('lastLoginAddress'))">
a.lastLoginAddress=#{data.lastLoginAddress},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -326,6 +340,20 @@
</if>
</foreach>
</trim>
<trim prefix="lastLoginTime=(case" suffix="ELSE lastLoginTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('lastLoginTime')) or (colPickMode==1 and !item.containsKey('lastLoginTime'))">
when a.id=#{item.id} then #{item.lastLoginTime}
</if>
</foreach>
</trim>
<trim prefix="lastLoginAddress=(case" suffix="ELSE lastLoginAddress end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('lastLoginAddress')) or (colPickMode==1 and !item.containsKey('lastLoginAddress'))">
when a.id=#{item.id} then #{item.lastLoginAddress}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -724,6 +752,36 @@
<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('lastLoginTime')">
<if test="conditionParamRef.lastLoginTime != null ">
${_conditionType_} a.lastLoginTime = #{${_conditionParam_}.lastLoginTime}
</if>
<if test="conditionParamRef.lastLoginTime == null">
${_conditionType_} a.lastLoginTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('lastLoginTimeStart') and conditionParamRef.lastLoginTimeStart != null and conditionParamRef.lastLoginTimeStart!=''">
${_conditionType_} a.lastLoginTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.lastLoginTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('lastLoginTimeEnd') and conditionParamRef.lastLoginTimeEnd != null and conditionParamRef.lastLoginTimeEnd!=''">
${_conditionType_} a.lastLoginTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.lastLoginTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('lastLoginAddress')">
<if test="conditionParamRef.lastLoginAddress != null and conditionParamRef.lastLoginAddress != ''">
${_conditionType_} a.lastLoginAddress like #{${_conditionParam_}.lastLoginAddress}
</if>
<if test="conditionParamRef.lastLoginAddress == null">
${_conditionType_} a.lastLoginAddress is null
</if>
</if>
<if test="conditionParamRef.containsKey('lastLoginAddressList')">
${_conditionType_} a.lastLoginAddress in
<foreach collection="conditionParamRef.lastLoginAddressList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -822,6 +880,16 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('lastLoginTime')">
a.lastLoginTime
<if test='orderCol.lastLoginTime != null and "DESC".equalsIgnoreCase(orderCol.lastLoginTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('lastLoginAddress')">
a.lastLoginAddress
<if test='orderCol.lastLoginAddress != null and "DESC".equalsIgnoreCase(orderCol.lastLoginAddress)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.customer.dao.ibatis.CustomerDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="CustomerEntityExt" id="CustomerEntityExt-Map">
<id property="id" column="id" />
<result property="loginName" column="loginName" />
<result property="password" column="password" />
<result property="memberLevel" column="memberLevel" />
<result property="custName" column="custName" />
<result property="organization" column="organization" />
<result property="contactTelphone" column="contactTelphone" />
<result property="enterpriseConsultant" column="enterpriseConsultant" />
<result property="siteId" column="siteId" />
<result property="sex" column="sex" />
<result property="mailbox" column="mailbox" />
<result property="job" column="job" />
<result property="customerSrc" column="customerSrc" />
<result property="status" column="status" />
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateTime" column="updateTime" />
<result property="lastLoginTime" column="lastLoginTime" />
<result property="lastLoginAddress" column="lastLoginAddress" />
<result property="customerDesignPictures" column="customerDesignPictures" />
<result property="customerDesignVideos" column="customerDesignVideos" />
</resultMap>
<!-- 获取列表 -->
<select id="getListExt" parameterType="paramDto" resultMap="CustomerEntityExt-Map">
select *
from (
SELECT
c.*, ifnull(s.customerDesignPictures,0) as customerDesignPictures,
ifnull(s.customerDesignVideos,0) as customerDesignVideos
FROM
mortals_xhx_customer c
LEFT JOIN mortals_xhx_customer_work_design_stat s ON c.id = s.customerId
) as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
<include refid="_orderCols_"/>
</select>
<!-- 获取 -->
<select id="getListExtCount" parameterType="paramDto" resultType="int">
select count(1)
from (
SELECT
c.*, ifnull(s.customerDesignPictures,0) as customerDesignPictures,
ifnull(s.customerDesignVideos,0) as customerDesignVideos
FROM
mortals_xhx_customer c
LEFT JOIN mortals_xhx_customer_work_design_stat s ON c.id = s.customerId
) as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment