Commit 06abac86 authored by 廖旭伟's avatar 廖旭伟

产品增加上下架属性

parent d291d231
......@@ -116,3 +116,7 @@ PRIMARY KEY (`id`)
ALTER TABLE mortals_xhx_company ADD COLUMN `background` varchar(256) default '' COMMENT '背景图片';
ALTER TABLE `mortals_xhx_favorites_businesscard` CHANGE `staffId` `bussinesscardId` bigint(20) NOT NULL COMMENT '名片ID, 关联到名片表中的ID,表示这是哪个名片的收藏';
-- ----------------------------
-- 2024-12-26
-- ----------------------------
ALTER TABLE `mortals_xhx_product` ADD COLUMN `shelves` tinyint(1) DEFAULT '1' COMMENT '是否上架(0.否,1.是)';
......@@ -85,6 +85,7 @@ public class ProductApiController extends AbstractBaseController<ProductReq>{
query.setCategoryId(String.valueOf(productReq.getCategoryId()));
}
query.setHot(productReq.getHot());
query.setShelves(1);
query.setOrderColList(Arrays.asList(new OrderCol("publishTime", OrderCol.DESCENDING)));
Result<ProductEntity> result = productService.find(query, pageInfo, context);
List<ProductEntity> collect = result.getList().stream().map(item -> {
......
......@@ -13,70 +13,74 @@ import com.mortals.xhx.module.product.model.vo.ProductVo;
import com.mortals.xhx.module.product.model.ProductQuestionEntity;
import lombok.Data;
/**
* 产品实体对象
*
* @author zxfei
* @date 2023-09-18
*/
* 产品实体对象
*
* @author zxfei
* @date 2024-12-26
*/
@Data
public class ProductEntity extends ProductVo {
private static final long serialVersionUID = 1L;
/**
* 产品名称,名称唯一
*/
* 产品名称,名称唯一
*/
@Excel(name = "产品名称,名称唯一")
private String productName;
/**
* 产品编码
*/
* 产品编码
*/
private String productCode;
/**
* 产品slogan
*/
* 产品slogan
*/
private String productSlogan;
/**
* 产品图标
*/
* 产品图标
*/
private String productLogoPath;
/**
* 产品封面图片
*/
* 产品封面图片
*/
private String productFacePath;
/**
* 产品视频,多个视频逗号分割
*/
* 产品视频,多个视频逗号分割
*/
private String productVideoPath;
/**
* 产品宣传图片,多个视频逗号分割
*/
* 产品宣传图片,多个视频逗号分割
*/
private String productPicPath;
/**
* 产品介绍
*/
* 产品介绍
*/
private String productIntroduction;
/**
* 产品详情
*/
* 产品详情
*/
private String productDetail;
/**
* 发布时间
*/
* 发布时间
*/
private Date publishTime;
/**
* 是否热门(0.否,1.是)
*/
* 是否热门(0.否,1.是)
*/
private Integer hot;
/**
* 备注
*/
* 备注
*/
private String productRemark;
/**
* 产品常见问题信息
*/
* 是否上架(0.否,1.是)
*/
private Integer shelves;
/**
* 产品常见问题信息
*/
private List<ProductQuestionEntity> productQuestionList=new ArrayList<>();;
public List<ProductQuestionEntity> getProductQuestionList(){
return productQuestionList;
return productQuestionList;
}
public void setProductQuestionList(List<ProductQuestionEntity> productQuestionList){
......@@ -84,7 +88,7 @@ public class ProductEntity extends ProductVo {
}
@Override
public int hashCode() {
return this.getId().hashCode();
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
......@@ -92,24 +96,25 @@ public class ProductEntity extends ProductVo {
if (obj instanceof ProductEntity) {
ProductEntity tmp = (ProductEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
return true;
}
}
return false;
}
public void initAttrValue(){
this.productName = "";
this.productCode = "";
this.productSlogan = "";
this.productLogoPath = "";
this.productFacePath = "";
this.productVideoPath = "";
this.productPicPath = "";
this.productIntroduction = "";
this.productDetail = "";
this.publishTime = new Date();
this.hot = 0;
this.productRemark = "";
this.productName = "";
this.productCode = "";
this.productSlogan = "";
this.productLogoPath = "";
this.productFacePath = "";
this.productVideoPath = "";
this.productPicPath = "";
this.productIntroduction = "";
this.productDetail = "";
this.publishTime = new Date();
this.hot = 0;
this.productRemark = "";
this.shelves = 1;
}
}
\ No newline at end of file
......@@ -5,11 +5,11 @@ import java.util.Date;
import java.util.List;
import com.mortals.xhx.module.product.model.ProductEntity;
/**
* 产品查询对象
*
* @author zxfei
* @date 2023-09-18
*/
* 产品查询对象
*
* @author zxfei
* @date 2024-12-26
*/
public class ProductQuery extends ProductEntity {
/** 开始 主键ID,主键,自增长 */
private Long idStart;
......@@ -139,6 +139,21 @@ public class ProductQuery extends ProductEntity {
/** 结束 更新时间 */
private String updateTimeEnd;
/** 开始 是否上架(0.否,1.是) */
private Integer shelvesStart;
/** 结束 是否上架(0.否,1.是) */
private Integer shelvesEnd;
/** 增加 是否上架(0.否,1.是) */
private Integer shelvesIncrement;
/** 是否上架(0.否,1.是)列表 */
private List <Integer> shelvesList;
/** 是否上架(0.否,1.是)排除列表 */
private List <Integer> shelvesNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<ProductQuery> orConditionList;
......@@ -148,1182 +163,1317 @@ public class ProductQuery extends ProductEntity {
public ProductQuery(){}
/**
* 获取 开始 主键ID,主键,自增长
* @return idStart
*/
* 获取 开始 主键ID,主键,自增长
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 主键ID,主键,自增长
* @return $idEnd
*/
* 获取 结束 主键ID,主键,自增长
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 主键ID,主键,自增长
* @return idIncrement
*/
* 获取 增加 主键ID,主键,自增长
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 主键ID,主键,自增长
* @return idList
*/
* 获取 主键ID,主键,自增长
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 主键ID,主键,自增长
* @param idList
*/
* 设置 主键ID,主键,自增长
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 主键ID,主键,自增长
* @return idNotList
*/
* 获取 主键ID,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param idNotList
*/
* 设置 主键ID,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 产品名称,名称唯一
* @return productNameList
*/
* 获取 产品名称,名称唯一
* @return productNameList
*/
public List<String> getProductNameList(){
return this.productNameList;
}
/**
* 设置 产品名称,名称唯一
* @param productNameList
*/
* 设置 产品名称,名称唯一
* @param productNameList
*/
public void setProductNameList(List<String> productNameList){
this.productNameList = productNameList;
}
/**
* 获取 产品名称,名称唯一
* @return productNameNotList
*/
* 获取 产品名称,名称唯一
* @return productNameNotList
*/
public List<String> getProductNameNotList(){
return this.productNameNotList;
}
/**
* 设置 产品名称,名称唯一
* @param productNameNotList
*/
* 设置 产品名称,名称唯一
* @param productNameNotList
*/
public void setProductNameNotList(List<String> productNameNotList){
this.productNameNotList = productNameNotList;
}
/**
* 获取 产品编码
* @return productCodeList
*/
* 获取 产品编码
* @return productCodeList
*/
public List<String> getProductCodeList(){
return this.productCodeList;
}
/**
* 设置 产品编码
* @param productCodeList
*/
* 设置 产品编码
* @param productCodeList
*/
public void setProductCodeList(List<String> productCodeList){
this.productCodeList = productCodeList;
}
/**
* 获取 产品编码
* @return productCodeNotList
*/
* 获取 产品编码
* @return productCodeNotList
*/
public List<String> getProductCodeNotList(){
return this.productCodeNotList;
}
/**
* 设置 产品编码
* @param productCodeNotList
*/
* 设置 产品编码
* @param productCodeNotList
*/
public void setProductCodeNotList(List<String> productCodeNotList){
this.productCodeNotList = productCodeNotList;
}
/**
* 获取 产品slogan
* @return productSloganList
*/
* 获取 产品slogan
* @return productSloganList
*/
public List<String> getProductSloganList(){
return this.productSloganList;
}
/**
* 设置 产品slogan
* @param productSloganList
*/
* 设置 产品slogan
* @param productSloganList
*/
public void setProductSloganList(List<String> productSloganList){
this.productSloganList = productSloganList;
}
/**
* 获取 产品slogan
* @return productSloganNotList
*/
* 获取 产品slogan
* @return productSloganNotList
*/
public List<String> getProductSloganNotList(){
return this.productSloganNotList;
}
/**
* 设置 产品slogan
* @param productSloganNotList
*/
* 设置 产品slogan
* @param productSloganNotList
*/
public void setProductSloganNotList(List<String> productSloganNotList){
this.productSloganNotList = productSloganNotList;
}
/**
* 获取 产品图标
* @return productLogoPathList
*/
* 获取 产品图标
* @return productLogoPathList
*/
public List<String> getProductLogoPathList(){
return this.productLogoPathList;
}
/**
* 设置 产品图标
* @param productLogoPathList
*/
* 设置 产品图标
* @param productLogoPathList
*/
public void setProductLogoPathList(List<String> productLogoPathList){
this.productLogoPathList = productLogoPathList;
}
/**
* 获取 产品图标
* @return productLogoPathNotList
*/
* 获取 产品图标
* @return productLogoPathNotList
*/
public List<String> getProductLogoPathNotList(){
return this.productLogoPathNotList;
}
/**
* 设置 产品图标
* @param productLogoPathNotList
*/
* 设置 产品图标
* @param productLogoPathNotList
*/
public void setProductLogoPathNotList(List<String> productLogoPathNotList){
this.productLogoPathNotList = productLogoPathNotList;
}
/**
* 获取 产品封面图片
* @return productFacePathList
*/
* 获取 产品封面图片
* @return productFacePathList
*/
public List<String> getProductFacePathList(){
return this.productFacePathList;
}
/**
* 设置 产品封面图片
* @param productFacePathList
*/
* 设置 产品封面图片
* @param productFacePathList
*/
public void setProductFacePathList(List<String> productFacePathList){
this.productFacePathList = productFacePathList;
}
/**
* 获取 产品封面图片
* @return productFacePathNotList
*/
* 获取 产品封面图片
* @return productFacePathNotList
*/
public List<String> getProductFacePathNotList(){
return this.productFacePathNotList;
}
/**
* 设置 产品封面图片
* @param productFacePathNotList
*/
* 设置 产品封面图片
* @param productFacePathNotList
*/
public void setProductFacePathNotList(List<String> productFacePathNotList){
this.productFacePathNotList = productFacePathNotList;
}
/**
* 获取 产品视频,多个视频逗号分割
* @return productVideoPathList
*/
* 获取 产品视频,多个视频逗号分割
* @return productVideoPathList
*/
public List<String> getProductVideoPathList(){
return this.productVideoPathList;
}
/**
* 设置 产品视频,多个视频逗号分割
* @param productVideoPathList
*/
* 设置 产品视频,多个视频逗号分割
* @param productVideoPathList
*/
public void setProductVideoPathList(List<String> productVideoPathList){
this.productVideoPathList = productVideoPathList;
}
/**
* 获取 产品视频,多个视频逗号分割
* @return productVideoPathNotList
*/
* 获取 产品视频,多个视频逗号分割
* @return productVideoPathNotList
*/
public List<String> getProductVideoPathNotList(){
return this.productVideoPathNotList;
}
/**
* 设置 产品视频,多个视频逗号分割
* @param productVideoPathNotList
*/
* 设置 产品视频,多个视频逗号分割
* @param productVideoPathNotList
*/
public void setProductVideoPathNotList(List<String> productVideoPathNotList){
this.productVideoPathNotList = productVideoPathNotList;
}
/**
* 获取 产品宣传图片,多个视频逗号分割
* @return productPicPathList
*/
* 获取 产品宣传图片,多个视频逗号分割
* @return productPicPathList
*/
public List<String> getProductPicPathList(){
return this.productPicPathList;
}
/**
* 设置 产品宣传图片,多个视频逗号分割
* @param productPicPathList
*/
* 设置 产品宣传图片,多个视频逗号分割
* @param productPicPathList
*/
public void setProductPicPathList(List<String> productPicPathList){
this.productPicPathList = productPicPathList;
}
/**
* 获取 产品宣传图片,多个视频逗号分割
* @return productPicPathNotList
*/
* 获取 产品宣传图片,多个视频逗号分割
* @return productPicPathNotList
*/
public List<String> getProductPicPathNotList(){
return this.productPicPathNotList;
}
/**
* 设置 产品宣传图片,多个视频逗号分割
* @param productPicPathNotList
*/
* 设置 产品宣传图片,多个视频逗号分割
* @param productPicPathNotList
*/
public void setProductPicPathNotList(List<String> productPicPathNotList){
this.productPicPathNotList = productPicPathNotList;
}
/**
* 获取 产品介绍
* @return productIntroductionList
*/
* 获取 产品介绍
* @return productIntroductionList
*/
public List<String> getProductIntroductionList(){
return this.productIntroductionList;
}
/**
* 设置 产品介绍
* @param productIntroductionList
*/
* 设置 产品介绍
* @param productIntroductionList
*/
public void setProductIntroductionList(List<String> productIntroductionList){
this.productIntroductionList = productIntroductionList;
}
/**
* 获取 产品介绍
* @return productIntroductionNotList
*/
* 获取 产品介绍
* @return productIntroductionNotList
*/
public List<String> getProductIntroductionNotList(){
return this.productIntroductionNotList;
}
/**
* 设置 产品介绍
* @param productIntroductionNotList
*/
* 设置 产品介绍
* @param productIntroductionNotList
*/
public void setProductIntroductionNotList(List<String> productIntroductionNotList){
this.productIntroductionNotList = productIntroductionNotList;
}
/**
* 获取 产品详情
* @return productDetailList
*/
* 获取 产品详情
* @return productDetailList
*/
public List<String> getProductDetailList(){
return this.productDetailList;
}
/**
* 设置 产品详情
* @param productDetailList
*/
* 设置 产品详情
* @param productDetailList
*/
public void setProductDetailList(List<String> productDetailList){
this.productDetailList = productDetailList;
}
/**
* 获取 产品详情
* @return productDetailNotList
*/
* 获取 产品详情
* @return productDetailNotList
*/
public List<String> getProductDetailNotList(){
return this.productDetailNotList;
}
/**
* 设置 产品详情
* @param productDetailNotList
*/
* 设置 产品详情
* @param productDetailNotList
*/
public void setProductDetailNotList(List<String> productDetailNotList){
this.productDetailNotList = productDetailNotList;
}
/**
* 获取 开始 发布时间
* @return publishTimeStart
*/
* 获取 开始 发布时间
* @return publishTimeStart
*/
public String getPublishTimeStart(){
return this.publishTimeStart;
}
/**
* 设置 开始 发布时间
* @param publishTimeStart
*/
* 设置 开始 发布时间
* @param publishTimeStart
*/
public void setPublishTimeStart(String publishTimeStart){
this.publishTimeStart = publishTimeStart;
}
/**
* 获取 结束 发布时间
* @return publishTimeEnd
*/
* 获取 结束 发布时间
* @return publishTimeEnd
*/
public String getPublishTimeEnd(){
return this.publishTimeEnd;
}
/**
* 设置 结束 发布时间
* @param publishTimeEnd
*/
* 设置 结束 发布时间
* @param publishTimeEnd
*/
public void setPublishTimeEnd(String publishTimeEnd){
this.publishTimeEnd = publishTimeEnd;
}
/**
* 获取 开始 是否热门(0.否,1.是)
* @return hotStart
*/
* 获取 开始 是否热门(0.否,1.是)
* @return hotStart
*/
public Integer getHotStart(){
return this.hotStart;
}
/**
* 设置 开始 是否热门(0.否,1.是)
* @param hotStart
*/
* 设置 开始 是否热门(0.否,1.是)
* @param hotStart
*/
public void setHotStart(Integer hotStart){
this.hotStart = hotStart;
}
/**
* 获取 结束 是否热门(0.否,1.是)
* @return $hotEnd
*/
* 获取 结束 是否热门(0.否,1.是)
* @return $hotEnd
*/
public Integer getHotEnd(){
return this.hotEnd;
}
/**
* 设置 结束 是否热门(0.否,1.是)
* @param hotEnd
*/
* 设置 结束 是否热门(0.否,1.是)
* @param hotEnd
*/
public void setHotEnd(Integer hotEnd){
this.hotEnd = hotEnd;
}
/**
* 获取 增加 是否热门(0.否,1.是)
* @return hotIncrement
*/
* 获取 增加 是否热门(0.否,1.是)
* @return hotIncrement
*/
public Integer getHotIncrement(){
return this.hotIncrement;
}
/**
* 设置 增加 是否热门(0.否,1.是)
* @param hotIncrement
*/
* 设置 增加 是否热门(0.否,1.是)
* @param hotIncrement
*/
public void setHotIncrement(Integer hotIncrement){
this.hotIncrement = hotIncrement;
}
/**
* 获取 是否热门(0.否,1.是)
* @return hotList
*/
* 获取 是否热门(0.否,1.是)
* @return hotList
*/
public List<Integer> getHotList(){
return this.hotList;
}
/**
* 设置 是否热门(0.否,1.是)
* @param hotList
*/
* 设置 是否热门(0.否,1.是)
* @param hotList
*/
public void setHotList(List<Integer> hotList){
this.hotList = hotList;
}
/**
* 获取 是否热门(0.否,1.是)
* @return hotNotList
*/
* 获取 是否热门(0.否,1.是)
* @return hotNotList
*/
public List<Integer> getHotNotList(){
return this.hotNotList;
}
/**
* 设置 是否热门(0.否,1.是)
* @param hotNotList
*/
* 设置 是否热门(0.否,1.是)
* @param hotNotList
*/
public void setHotNotList(List<Integer> hotNotList){
this.hotNotList = hotNotList;
}
/**
* 获取 备注
* @return productRemarkList
*/
* 获取 备注
* @return productRemarkList
*/
public List<String> getProductRemarkList(){
return this.productRemarkList;
}
/**
* 设置 备注
* @param productRemarkList
*/
* 设置 备注
* @param productRemarkList
*/
public void setProductRemarkList(List<String> productRemarkList){
this.productRemarkList = productRemarkList;
}
/**
* 获取 备注
* @return productRemarkNotList
*/
* 获取 备注
* @return productRemarkNotList
*/
public List<String> getProductRemarkNotList(){
return this.productRemarkNotList;
}
/**
* 设置 备注
* @param productRemarkNotList
*/
* 设置 备注
* @param productRemarkNotList
*/
public void setProductRemarkNotList(List<String> productRemarkNotList){
this.productRemarkNotList = productRemarkNotList;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
*/
* 获取 开始 创建用户
* @return createUserIdStart
*/
public Long getCreateUserIdStart(){
return this.createUserIdStart;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
* 设置 开始 创建用户
* @param createUserIdStart
*/
public void setCreateUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
}
/**
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
public Long getCreateUserIdEnd(){
return this.createUserIdEnd;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public void setCreateUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
}
/**
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
public Long getCreateUserIdIncrement(){
return this.createUserIdIncrement;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public void setCreateUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
}
/**
* 获取 创建用户
* @return createUserIdList
*/
* 获取 创建用户
* @return createUserIdList
*/
public List<Long> getCreateUserIdList(){
return this.createUserIdList;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
* 设置 创建用户
* @param createUserIdList
*/
public void setCreateUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
}
/**
* 获取 创建用户
* @return createUserIdNotList
*/
* 获取 创建用户
* @return createUserIdNotList
*/
public List<Long> getCreateUserIdNotList(){
return this.createUserIdNotList;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
* 设置 创建用户
* @param createUserIdNotList
*/
public void setCreateUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 获取 开始 更新用户
* @return updateUserIdStart
*/
* 获取 开始 更新用户
* @return updateUserIdStart
*/
public Long getUpdateUserIdStart(){
return this.updateUserIdStart;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public void setUpdateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
}
/**
* 获取 结束 更新用户
* @return $updateUserIdEnd
*/
* 获取 结束 更新用户
* @return $updateUserIdEnd
*/
public Long getUpdateUserIdEnd(){
return this.updateUserIdEnd;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public void setUpdateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
}
/**
* 获取 增加 更新用户
* @return updateUserIdIncrement
*/
* 获取 增加 更新用户
* @return updateUserIdIncrement
*/
public Long getUpdateUserIdIncrement(){
return this.updateUserIdIncrement;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public void setUpdateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
}
/**
* 获取 更新用户
* @return updateUserIdList
*/
* 获取 更新用户
* @return updateUserIdList
*/
public List<Long> getUpdateUserIdList(){
return this.updateUserIdList;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
* 设置 更新用户
* @param updateUserIdList
*/
public void setUpdateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
}
/**
* 获取 更新用户
* @return updateUserIdNotList
*/
* 获取 更新用户
* @return updateUserIdNotList
*/
public List<Long> getUpdateUserIdNotList(){
return this.updateUserIdNotList;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
* 设置 更新用户
* @param updateUserIdNotList
*/
public void setUpdateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
}
/**
* 获取 开始 更新时间
* @return updateTimeStart
*/
* 获取 开始 更新时间
* @return updateTimeStart
*/
public String getUpdateTimeStart(){
return this.updateTimeStart;
}
/**
* 设置 开始 更新时间
* @param updateTimeStart
*/
* 设置 开始 更新时间
* @param updateTimeStart
*/
public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
/**
* 获取 结束 更新时间
* @return updateTimeEnd
*/
* 获取 结束 更新时间
* @return updateTimeEnd
*/
public String getUpdateTimeEnd(){
return this.updateTimeEnd;
}
/**
* 设置 结束 更新时间
* @param updateTimeEnd
*/
* 设置 结束 更新时间
* @param updateTimeEnd
*/
public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
/**
* 设置 主键ID,主键,自增长
* @param id
*/
* 获取 开始 是否上架(0.否,1.是)
* @return shelvesStart
*/
public Integer getShelvesStart(){
return this.shelvesStart;
}
/**
* 设置 开始 是否上架(0.否,1.是)
* @param shelvesStart
*/
public void setShelvesStart(Integer shelvesStart){
this.shelvesStart = shelvesStart;
}
/**
* 获取 结束 是否上架(0.否,1.是)
* @return $shelvesEnd
*/
public Integer getShelvesEnd(){
return this.shelvesEnd;
}
/**
* 设置 结束 是否上架(0.否,1.是)
* @param shelvesEnd
*/
public void setShelvesEnd(Integer shelvesEnd){
this.shelvesEnd = shelvesEnd;
}
/**
* 获取 增加 是否上架(0.否,1.是)
* @return shelvesIncrement
*/
public Integer getShelvesIncrement(){
return this.shelvesIncrement;
}
/**
* 设置 增加 是否上架(0.否,1.是)
* @param shelvesIncrement
*/
public void setShelvesIncrement(Integer shelvesIncrement){
this.shelvesIncrement = shelvesIncrement;
}
/**
* 获取 是否上架(0.否,1.是)
* @return shelvesList
*/
public List<Integer> getShelvesList(){
return this.shelvesList;
}
/**
* 设置 是否上架(0.否,1.是)
* @param shelvesList
*/
public void setShelvesList(List<Integer> shelvesList){
this.shelvesList = shelvesList;
}
/**
* 获取 是否上架(0.否,1.是)
* @return shelvesNotList
*/
public List<Integer> getShelvesNotList(){
return this.shelvesNotList;
}
/**
* 设置 是否上架(0.否,1.是)
* @param shelvesNotList
*/
public void setShelvesNotList(List<Integer> shelvesNotList){
this.shelvesNotList = shelvesNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param id
*/
public ProductQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
setId(id);
return this;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
public ProductQuery idStart(Long idStart){
this.idStart = idStart;
return this;
this.idStart = idStart;
return this;
}
/**
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
public ProductQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
public ProductQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 主键ID,主键,自增长
* @param idList
*/
* 设置 主键ID,主键,自增长
* @param idList
*/
public ProductQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 主键ID,主键,自增长
* @param idNotList
*/
public ProductQuery idNotList(List<Long> idNotList){
return this;
}
/**
* 设置 主键ID,主键,自增长
* @param idNotList
*/
public ProductQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
}
/**
* 设置 产品名称,名称唯一
* @param productName
*/
/**
* 设置 产品名称,名称唯一
* @param productName
*/
public ProductQuery productName(String productName){
setProductName(productName);
return this;
return this;
}
/**
* 设置 产品名称,名称唯一
* @param productNameList
*/
* 设置 产品名称,名称唯一
* @param productNameList
*/
public ProductQuery productNameList(List<String> productNameList){
this.productNameList = productNameList;
return this;
return this;
}
/**
* 设置 产品编码
* @param productCode
*/
/**
* 设置 产品编码
* @param productCode
*/
public ProductQuery productCode(String productCode){
setProductCode(productCode);
return this;
return this;
}
/**
* 设置 产品编码
* @param productCodeList
*/
* 设置 产品编码
* @param productCodeList
*/
public ProductQuery productCodeList(List<String> productCodeList){
this.productCodeList = productCodeList;
return this;
return this;
}
/**
* 设置 产品slogan
* @param productSlogan
*/
/**
* 设置 产品slogan
* @param productSlogan
*/
public ProductQuery productSlogan(String productSlogan){
setProductSlogan(productSlogan);
return this;
return this;
}
/**
* 设置 产品slogan
* @param productSloganList
*/
* 设置 产品slogan
* @param productSloganList
*/
public ProductQuery productSloganList(List<String> productSloganList){
this.productSloganList = productSloganList;
return this;
return this;
}
/**
* 设置 产品图标
* @param productLogoPath
*/
/**
* 设置 产品图标
* @param productLogoPath
*/
public ProductQuery productLogoPath(String productLogoPath){
setProductLogoPath(productLogoPath);
return this;
return this;
}
/**
* 设置 产品图标
* @param productLogoPathList
*/
* 设置 产品图标
* @param productLogoPathList
*/
public ProductQuery productLogoPathList(List<String> productLogoPathList){
this.productLogoPathList = productLogoPathList;
return this;
return this;
}
/**
* 设置 产品封面图片
* @param productFacePath
*/
/**
* 设置 产品封面图片
* @param productFacePath
*/
public ProductQuery productFacePath(String productFacePath){
setProductFacePath(productFacePath);
return this;
return this;
}
/**
* 设置 产品封面图片
* @param productFacePathList
*/
* 设置 产品封面图片
* @param productFacePathList
*/
public ProductQuery productFacePathList(List<String> productFacePathList){
this.productFacePathList = productFacePathList;
return this;
return this;
}
/**
* 设置 产品视频,多个视频逗号分割
* @param productVideoPath
*/
/**
* 设置 产品视频,多个视频逗号分割
* @param productVideoPath
*/
public ProductQuery productVideoPath(String productVideoPath){
setProductVideoPath(productVideoPath);
return this;
return this;
}
/**
* 设置 产品视频,多个视频逗号分割
* @param productVideoPathList
*/
* 设置 产品视频,多个视频逗号分割
* @param productVideoPathList
*/
public ProductQuery productVideoPathList(List<String> productVideoPathList){
this.productVideoPathList = productVideoPathList;
return this;
return this;
}
/**
* 设置 产品宣传图片,多个视频逗号分割
* @param productPicPath
*/
/**
* 设置 产品宣传图片,多个视频逗号分割
* @param productPicPath
*/
public ProductQuery productPicPath(String productPicPath){
setProductPicPath(productPicPath);
return this;
return this;
}
/**
* 设置 产品宣传图片,多个视频逗号分割
* @param productPicPathList
*/
* 设置 产品宣传图片,多个视频逗号分割
* @param productPicPathList
*/
public ProductQuery productPicPathList(List<String> productPicPathList){
this.productPicPathList = productPicPathList;
return this;
return this;
}
/**
* 设置 产品介绍
* @param productIntroduction
*/
/**
* 设置 产品介绍
* @param productIntroduction
*/
public ProductQuery productIntroduction(String productIntroduction){
setProductIntroduction(productIntroduction);
return this;
return this;
}
/**
* 设置 产品介绍
* @param productIntroductionList
*/
* 设置 产品介绍
* @param productIntroductionList
*/
public ProductQuery productIntroductionList(List<String> productIntroductionList){
this.productIntroductionList = productIntroductionList;
return this;
return this;
}
/**
* 设置 产品详情
* @param productDetail
*/
/**
* 设置 产品详情
* @param productDetail
*/
public ProductQuery productDetail(String productDetail){
setProductDetail(productDetail);
return this;
return this;
}
/**
* 设置 产品详情
* @param productDetailList
*/
* 设置 产品详情
* @param productDetailList
*/
public ProductQuery productDetailList(List<String> productDetailList){
this.productDetailList = productDetailList;
return this;
return this;
}
/**
* 设置 是否热门(0.否,1.是)
* @param hot
*/
* 设置 是否热门(0.否,1.是)
* @param hot
*/
public ProductQuery hot(Integer hot){
setHot(hot);
return this;
}
/**
* 设置 开始 是否热门(0.否,1.是)
* @param hotStart
*/
setHot(hot);
return this;
}
/**
* 设置 开始 是否热门(0.否,1.是)
* @param hotStart
*/
public ProductQuery hotStart(Integer hotStart){
this.hotStart = hotStart;
return this;
this.hotStart = hotStart;
return this;
}
/**
* 设置 结束 是否热门(0.否,1.是)
* @param hotEnd
*/
* 设置 结束 是否热门(0.否,1.是)
* @param hotEnd
*/
public ProductQuery hotEnd(Integer hotEnd){
this.hotEnd = hotEnd;
return this;
this.hotEnd = hotEnd;
return this;
}
/**
* 设置 增加 是否热门(0.否,1.是)
* @param hotIncrement
*/
* 设置 增加 是否热门(0.否,1.是)
* @param hotIncrement
*/
public ProductQuery hotIncrement(Integer hotIncrement){
this.hotIncrement = hotIncrement;
return this;
this.hotIncrement = hotIncrement;
return this;
}
/**
* 设置 是否热门(0.否,1.是)
* @param hotList
*/
* 设置 是否热门(0.否,1.是)
* @param hotList
*/
public ProductQuery hotList(List<Integer> hotList){
this.hotList = hotList;
return this;
}
/**
* 设置 是否热门(0.否,1.是)
* @param hotNotList
*/
public ProductQuery hotNotList(List<Integer> hotNotList){
return this;
}
/**
* 设置 是否热门(0.否,1.是)
* @param hotNotList
*/
public ProductQuery hotNotList(List<Integer> hotNotList){
this.hotNotList = hotNotList;
return this;
}
}
/**
* 设置 备注
* @param productRemark
*/
/**
* 设置 备注
* @param productRemark
*/
public ProductQuery productRemark(String productRemark){
setProductRemark(productRemark);
return this;
return this;
}
/**
* 设置 备注
* @param productRemarkList
*/
* 设置 备注
* @param productRemarkList
*/
public ProductQuery productRemarkList(List<String> productRemarkList){
this.productRemarkList = productRemarkList;
return this;
return this;
}
/**
* 设置 创建用户
* @param createUserId
*/
* 设置 创建用户
* @param createUserId
*/
public ProductQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public ProductQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public ProductQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public ProductQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
* 设置 创建用户
* @param createUserIdList
*/
public ProductQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public ProductQuery createUserIdNotList(List<Long> createUserIdNotList){
return this;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public ProductQuery createUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
return this;
}
}
/**
* 设置 更新用户
* @param updateUserId
*/
* 设置 更新用户
* @param updateUserId
*/
public ProductQuery updateUserId(Long updateUserId){
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public ProductQuery updateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
return this;
this.updateUserIdStart = updateUserIdStart;
return this;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public ProductQuery updateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
return this;
this.updateUserIdEnd = updateUserIdEnd;
return this;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public ProductQuery updateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
* 设置 更新用户
* @param updateUserIdList
*/
public ProductQuery updateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public ProductQuery updateUserIdNotList(List<Long> updateUserIdNotList){
return this;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public ProductQuery updateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
return this;
}
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
* 设置 是否上架(0.否,1.是)
* @param shelves
*/
public ProductQuery shelves(Integer shelves){
setShelves(shelves);
return this;
}
/**
* 设置 开始 是否上架(0.否,1.是)
* @param shelvesStart
*/
public ProductQuery shelvesStart(Integer shelvesStart){
this.shelvesStart = shelvesStart;
return this;
}
/**
* 设置 结束 是否上架(0.否,1.是)
* @param shelvesEnd
*/
public ProductQuery shelvesEnd(Integer shelvesEnd){
this.shelvesEnd = shelvesEnd;
return this;
}
/**
* 设置 增加 是否上架(0.否,1.是)
* @param shelvesIncrement
*/
public ProductQuery shelvesIncrement(Integer shelvesIncrement){
this.shelvesIncrement = shelvesIncrement;
return this;
}
/**
* 设置 是否上架(0.否,1.是)
* @param shelvesList
*/
public ProductQuery shelvesList(List<Integer> shelvesList){
this.shelvesList = shelvesList;
return this;
}
/**
* 设置 是否上架(0.否,1.是)
* @param shelvesNotList
*/
public ProductQuery shelvesNotList(List<Integer> shelvesNotList){
this.shelvesNotList = shelvesNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<ProductQuery> getOrConditionList(){
return this.orConditionList;
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<ProductQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<ProductQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<ProductQuery> andConditionList){
this.andConditionList = andConditionList;
}
......
......@@ -76,6 +76,7 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
//过滤热门与非热门
productList = productList.stream().filter(f -> f.getHot() == hot).collect(Collectors.toList());
}
productList = productList.stream().filter(f -> f.getShelves() == 1).collect(Collectors.toList());
productList = productList.stream().sorted(Comparator.comparing(ProductEntity::getPublishTime).reversed())
.collect(Collectors.toList());
productEntityResult.setList(productList);
......@@ -91,6 +92,7 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
//过滤热门与非热门
productList = productList.stream().filter(f -> f.getHot() == hot).collect(Collectors.toList());
}
productList = productList.stream().filter(f -> f.getShelves() == 1).collect(Collectors.toList());
productList = productList.stream().sorted(Comparator.comparing(ProductEntity::getPublishTime).reversed())
.collect(Collectors.toList());
productEntityResult.setList(productList);
......@@ -111,6 +113,7 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
//过滤热门与非热门
collect = collect.stream().filter(f -> f.getHot() == hot).collect(Collectors.toList());
}
collect = collect.stream().filter(f -> f.getShelves() == 1).collect(Collectors.toList());
collect = collect.stream().sorted(Comparator.comparing(ProductEntity::getPublishTime).reversed())
.collect(Collectors.toList());
productEntityResult.setList(collect);
......@@ -155,6 +158,7 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
}
});
}
productList = productList.stream().filter(f -> f.getShelves() == 1).collect(Collectors.toList());
productList = productList.stream().sorted(Comparator.comparing(ProductEntity::getPublishTime).reversed())
.collect(Collectors.toList());
return productList;
......
......@@ -74,6 +74,7 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product
this.addDict(model, "hot", YesNoEnum.getEnumMap());
this.addDict(model, "categoryId", categoryService.find(new CategoryQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName(), (o, n) -> n)));
this.addDict(model, "companyId", companyService.find(new CompanyQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getCompanyName(), (o, n) -> n)));
this.addDict(model, "shelves", YesNoEnum.getEnumMap());
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.product.dao.ibatis.ProductDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="ProductEntity" id="ProductEntity-Map">
<id property="id" column="id" />
<result property="productName" column="productName" />
<result property="productCode" column="productCode" />
<result property="productSlogan" column="productSlogan" />
<result property="productLogoPath" column="productLogoPath" />
<result property="productFacePath" column="productFacePath" />
<result property="productVideoPath" column="productVideoPath" />
<result property="productPicPath" column="productPicPath" />
<result property="productIntroduction" column="productIntroduction" />
<result property="productDetail" column="productDetail" />
<result property="publishTime" column="publishTime" />
<result property="hot" column="hot" />
<result property="productRemark" column="productRemark" />
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<collection property="productQuestionList" column="id" ofType="ProductQuestionEntity" javaType="ArrayList" select="getProductQuestionByProductId"></collection>
<id property="id" column="id" />
<result property="productName" column="productName" />
<result property="productCode" column="productCode" />
<result property="productSlogan" column="productSlogan" />
<result property="productLogoPath" column="productLogoPath" />
<result property="productFacePath" column="productFacePath" />
<result property="productVideoPath" column="productVideoPath" />
<result property="productPicPath" column="productPicPath" />
<result property="productIntroduction" column="productIntroduction" />
<result property="productDetail" column="productDetail" />
<result property="publishTime" column="publishTime" />
<result property="hot" column="hot" />
<result property="productRemark" column="productRemark" />
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<result property="shelves" column="shelves" />
</resultMap>
<resultMap type="ProductQuestionEntity" id="ProductQuestionEntity-Map">
<result property="id" column="id" />
<result property="productId" column="productId" />
<result property="productName" column="productName" />
<result property="question" column="question" />
<result property="answer" column="answer" />
<result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" />
<result property="updateTime" column="updateTime" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productName') or colPickMode == 1 and data.containsKey('productName')))">
a.productName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productCode') or colPickMode == 1 and data.containsKey('productCode')))">
a.productCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productSlogan') or colPickMode == 1 and data.containsKey('productSlogan')))">
a.productSlogan,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productLogoPath') or colPickMode == 1 and data.containsKey('productLogoPath')))">
a.productLogoPath,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productFacePath') or colPickMode == 1 and data.containsKey('productFacePath')))">
a.productFacePath,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productVideoPath') or colPickMode == 1 and data.containsKey('productVideoPath')))">
a.productVideoPath,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productPicPath') or colPickMode == 1 and data.containsKey('productPicPath')))">
a.productPicPath,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productIntroduction') or colPickMode == 1 and data.containsKey('productIntroduction')))">
a.productIntroduction,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productDetail') or colPickMode == 1 and data.containsKey('productDetail')))">
a.productDetail,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('publishTime') or colPickMode == 1 and data.containsKey('publishTime')))">
a.publishTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hot') or colPickMode == 1 and data.containsKey('hot')))">
a.hot,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productRemark') or colPickMode == 1 and data.containsKey('productRemark')))">
a.productRemark,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productName') or colPickMode == 1 and data.containsKey('productName')))">
a.productName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productCode') or colPickMode == 1 and data.containsKey('productCode')))">
a.productCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productSlogan') or colPickMode == 1 and data.containsKey('productSlogan')))">
a.productSlogan,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productLogoPath') or colPickMode == 1 and data.containsKey('productLogoPath')))">
a.productLogoPath,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productFacePath') or colPickMode == 1 and data.containsKey('productFacePath')))">
a.productFacePath,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productVideoPath') or colPickMode == 1 and data.containsKey('productVideoPath')))">
a.productVideoPath,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productPicPath') or colPickMode == 1 and data.containsKey('productPicPath')))">
a.productPicPath,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productIntroduction') or colPickMode == 1 and data.containsKey('productIntroduction')))">
a.productIntroduction,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productDetail') or colPickMode == 1 and data.containsKey('productDetail')))">
a.productDetail,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('publishTime') or colPickMode == 1 and data.containsKey('publishTime')))">
a.publishTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hot') or colPickMode == 1 and data.containsKey('hot')))">
a.hot,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productRemark') or colPickMode == 1 and data.containsKey('productRemark')))">
a.productRemark,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('shelves') or colPickMode == 1 and data.containsKey('shelves')))">
a.shelves,
</if>
</trim>
</sql>
<!-- 子表所有列 -->
......@@ -101,18 +93,18 @@
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="ProductEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_product
(productName,productCode,productSlogan,productLogoPath,productFacePath,productVideoPath,productPicPath,productIntroduction,productDetail,publishTime,hot,productRemark,createUserId,createTime,updateUserId,updateTime)
(productName,productCode,productSlogan,productLogoPath,productFacePath,productVideoPath,productPicPath,productIntroduction,productDetail,publishTime,hot,productRemark,createUserId,createTime,updateUserId,updateTime,shelves)
VALUES
(#{productName},#{productCode},#{productSlogan},#{productLogoPath},#{productFacePath},#{productVideoPath},#{productPicPath},#{productIntroduction},#{productDetail},#{publishTime},#{hot},#{productRemark},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
(#{productName},#{productCode},#{productSlogan},#{productLogoPath},#{productFacePath},#{productVideoPath},#{productPicPath},#{productIntroduction},#{productDetail},#{publishTime},#{hot},#{productRemark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{shelves})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_product
(productName,productCode,productSlogan,productLogoPath,productFacePath,productVideoPath,productPicPath,productIntroduction,productDetail,publishTime,hot,productRemark,createUserId,createTime,updateUserId,updateTime)
(productName,productCode,productSlogan,productLogoPath,productFacePath,productVideoPath,productPicPath,productIntroduction,productDetail,publishTime,hot,productRemark,createUserId,createTime,updateUserId,updateTime,shelves)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.productName},#{item.productCode},#{item.productSlogan},#{item.productLogoPath},#{item.productFacePath},#{item.productVideoPath},#{item.productPicPath},#{item.productIntroduction},#{item.productDetail},#{item.publishTime},#{item.hot},#{item.productRemark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
(#{item.productName},#{item.productCode},#{item.productSlogan},#{item.productLogoPath},#{item.productFacePath},#{item.productVideoPath},#{item.productPicPath},#{item.productIntroduction},#{item.productDetail},#{item.publishTime},#{item.hot},#{item.productRemark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.shelves})
</foreach>
</insert>
......@@ -179,6 +171,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('shelves')) or (colPickMode==1 and !data.containsKey('shelves'))">
a.shelves=#{data.shelves},
</if>
<if test="(colPickMode==0 and data.containsKey('shelvesIncrement')) or (colPickMode==1 and !data.containsKey('shelvesIncrement'))">
a.shelves=ifnull(a.shelves,0) + #{data.shelvesIncrement},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -191,133 +189,145 @@
<update id="updateBatch" parameterType="paramDto">
update mortals_xhx_product as a
<trim prefix="set" suffixOverrides=",">
<trim prefix="productName=(case" suffix="ELSE productName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productName')) or (colPickMode==1 and !item.containsKey('productName'))">
when a.id=#{item.id} then #{item.productName}
</if>
</foreach>
</trim>
<trim prefix="productCode=(case" suffix="ELSE productCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productCode')) or (colPickMode==1 and !item.containsKey('productCode'))">
when a.id=#{item.id} then #{item.productCode}
</if>
</foreach>
</trim>
<trim prefix="productSlogan=(case" suffix="ELSE productSlogan end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productSlogan')) or (colPickMode==1 and !item.containsKey('productSlogan'))">
when a.id=#{item.id} then #{item.productSlogan}
</if>
</foreach>
</trim>
<trim prefix="productLogoPath=(case" suffix="ELSE productLogoPath end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productLogoPath')) or (colPickMode==1 and !item.containsKey('productLogoPath'))">
when a.id=#{item.id} then #{item.productLogoPath}
</if>
</foreach>
</trim>
<trim prefix="productFacePath=(case" suffix="ELSE productFacePath end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productFacePath')) or (colPickMode==1 and !item.containsKey('productFacePath'))">
when a.id=#{item.id} then #{item.productFacePath}
</if>
</foreach>
</trim>
<trim prefix="productVideoPath=(case" suffix="ELSE productVideoPath end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productVideoPath')) or (colPickMode==1 and !item.containsKey('productVideoPath'))">
when a.id=#{item.id} then #{item.productVideoPath}
</if>
</foreach>
</trim>
<trim prefix="productPicPath=(case" suffix="ELSE productPicPath end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productPicPath')) or (colPickMode==1 and !item.containsKey('productPicPath'))">
when a.id=#{item.id} then #{item.productPicPath}
</if>
</foreach>
</trim>
<trim prefix="productIntroduction=(case" suffix="ELSE productIntroduction end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productIntroduction')) or (colPickMode==1 and !item.containsKey('productIntroduction'))">
when a.id=#{item.id} then #{item.productIntroduction}
</if>
</foreach>
</trim>
<trim prefix="productDetail=(case" suffix="ELSE productDetail end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productDetail')) or (colPickMode==1 and !item.containsKey('productDetail'))">
when a.id=#{item.id} then #{item.productDetail}
</if>
</foreach>
</trim>
<trim prefix="publishTime=(case" suffix="ELSE publishTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('publishTime')) or (colPickMode==1 and !item.containsKey('publishTime'))">
when a.id=#{item.id} then #{item.publishTime}
</if>
</foreach>
</trim>
<trim prefix="hot=(case" suffix="ELSE hot end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('hot')) or (colPickMode==1 and !item.containsKey('hot'))">
when a.id=#{item.id} then #{item.hot}
</when>
<when test="(colPickMode==0 and item.containsKey('hotIncrement')) or (colPickMode==1 and !item.containsKey('hotIncrement'))">
when a.id=#{item.id} then ifnull(a.hot,0) + #{item.hotIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="productRemark=(case" suffix="ELSE productRemark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productRemark')) or (colPickMode==1 and !item.containsKey('productRemark'))">
when a.id=#{item.id} then #{item.productRemark}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.id=#{item.id} then #{item.updateUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</if>
</foreach>
</trim>
<trim prefix="productName=(case" suffix="ELSE productName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productName')) or (colPickMode==1 and !item.containsKey('productName'))">
when a.id=#{item.id} then #{item.productName}
</if>
</foreach>
</trim>
<trim prefix="productCode=(case" suffix="ELSE productCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productCode')) or (colPickMode==1 and !item.containsKey('productCode'))">
when a.id=#{item.id} then #{item.productCode}
</if>
</foreach>
</trim>
<trim prefix="productSlogan=(case" suffix="ELSE productSlogan end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productSlogan')) or (colPickMode==1 and !item.containsKey('productSlogan'))">
when a.id=#{item.id} then #{item.productSlogan}
</if>
</foreach>
</trim>
<trim prefix="productLogoPath=(case" suffix="ELSE productLogoPath end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productLogoPath')) or (colPickMode==1 and !item.containsKey('productLogoPath'))">
when a.id=#{item.id} then #{item.productLogoPath}
</if>
</foreach>
</trim>
<trim prefix="productFacePath=(case" suffix="ELSE productFacePath end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productFacePath')) or (colPickMode==1 and !item.containsKey('productFacePath'))">
when a.id=#{item.id} then #{item.productFacePath}
</if>
</foreach>
</trim>
<trim prefix="productVideoPath=(case" suffix="ELSE productVideoPath end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productVideoPath')) or (colPickMode==1 and !item.containsKey('productVideoPath'))">
when a.id=#{item.id} then #{item.productVideoPath}
</if>
</foreach>
</trim>
<trim prefix="productPicPath=(case" suffix="ELSE productPicPath end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productPicPath')) or (colPickMode==1 and !item.containsKey('productPicPath'))">
when a.id=#{item.id} then #{item.productPicPath}
</if>
</foreach>
</trim>
<trim prefix="productIntroduction=(case" suffix="ELSE productIntroduction end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productIntroduction')) or (colPickMode==1 and !item.containsKey('productIntroduction'))">
when a.id=#{item.id} then #{item.productIntroduction}
</if>
</foreach>
</trim>
<trim prefix="productDetail=(case" suffix="ELSE productDetail end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productDetail')) or (colPickMode==1 and !item.containsKey('productDetail'))">
when a.id=#{item.id} then #{item.productDetail}
</if>
</foreach>
</trim>
<trim prefix="publishTime=(case" suffix="ELSE publishTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('publishTime')) or (colPickMode==1 and !item.containsKey('publishTime'))">
when a.id=#{item.id} then #{item.publishTime}
</if>
</foreach>
</trim>
<trim prefix="hot=(case" suffix="ELSE hot end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('hot')) or (colPickMode==1 and !item.containsKey('hot'))">
when a.id=#{item.id} then #{item.hot}
</when>
<when test="(colPickMode==0 and item.containsKey('hotIncrement')) or (colPickMode==1 and !item.containsKey('hotIncrement'))">
when a.id=#{item.id} then ifnull(a.hot,0) + #{item.hotIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="productRemark=(case" suffix="ELSE productRemark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productRemark')) or (colPickMode==1 and !item.containsKey('productRemark'))">
when a.id=#{item.id} then #{item.productRemark}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.id=#{item.id} then #{item.updateUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</if>
</foreach>
</trim>
<trim prefix="shelves=(case" suffix="ELSE shelves end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('shelves')) or (colPickMode==1 and !item.containsKey('shelves'))">
when a.id=#{item.id} then #{item.shelves}
</when>
<when test="(colPickMode==0 and item.containsKey('shelvesIncrement')) or (colPickMode==1 and !item.containsKey('shelvesIncrement'))">
when a.id=#{item.id} then ifnull(a.shelves,0) + #{item.shelvesIncrement}
</when>
</choose>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -379,13 +389,6 @@
<include refid="_orderCols_"/>
</select>
<!-- 获取子列表 -->
<select id="getProductQuestionByProductId" parameterType="java.lang.Long" resultMap="ProductQuestionEntity-Map">
select <include refid="_columns_sub"/>
from mortals_xhx_product_question as b
<trim suffixOverrides="where" suffix="">
where b.productId = #{id}
</trim>
</select>
......@@ -437,474 +440,582 @@
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="permissionSql != null and permissionSql != ''">
${permissionSql}
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
</if>
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if>
<if test="conditionParamRef.containsKey('productName')">
<if test="conditionParamRef.productName != null and conditionParamRef.productName != ''">
${_conditionType_} a.productName like #{${_conditionParam_}.productName}
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
<if test="conditionParamRef.productName == null">
${_conditionType_} a.productName is null
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if>
<if test="conditionParamRef.containsKey('productNameList') and conditionParamRef.productNameList.size() > 0">
${_conditionType_} a.productName in
<foreach collection="conditionParamRef.productNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productNameNotList') and conditionParamRef.productNameNotList.size() > 0">
${_conditionType_} a.productName not in
<foreach collection="conditionParamRef.productNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productCode')">
<if test="conditionParamRef.productCode != null and conditionParamRef.productCode != ''">
${_conditionType_} a.productCode like #{${_conditionParam_}.productCode}
</if>
<if test="conditionParamRef.productCode == null">
${_conditionType_} a.productCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('productCodeList') and conditionParamRef.productCodeList.size() > 0">
${_conditionType_} a.productCode in
<foreach collection="conditionParamRef.productCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productCodeNotList') and conditionParamRef.productCodeNotList.size() > 0">
${_conditionType_} a.productCode not in
<foreach collection="conditionParamRef.productCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productSlogan')">
<if test="conditionParamRef.productSlogan != null and conditionParamRef.productSlogan != ''">
${_conditionType_} a.productSlogan like #{${_conditionParam_}.productSlogan}
</if>
<if test="conditionParamRef.productSlogan == null">
${_conditionType_} a.productSlogan is null
</if>
</if>
<if test="conditionParamRef.containsKey('productSloganList') and conditionParamRef.productSloganList.size() > 0">
${_conditionType_} a.productSlogan in
<foreach collection="conditionParamRef.productSloganList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productSloganNotList') and conditionParamRef.productSloganNotList.size() > 0">
${_conditionType_} a.productSlogan not in
<foreach collection="conditionParamRef.productSloganNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productName')">
<if test="conditionParamRef.productName != null and conditionParamRef.productName != ''">
${_conditionType_} a.productName like #{${_conditionParam_}.productName}
</if>
<if test="conditionParamRef.productName == null">
${_conditionType_} a.productName is null
</if>
<if test="conditionParamRef.containsKey('productLogoPath')">
<if test="conditionParamRef.productLogoPath != null and conditionParamRef.productLogoPath != ''">
${_conditionType_} a.productLogoPath like #{${_conditionParam_}.productLogoPath}
</if>
<if test="conditionParamRef.containsKey('productNameList') and conditionParamRef.productNameList.size() > 0">
${_conditionType_} a.productName in
<foreach collection="conditionParamRef.productNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.productLogoPath == null">
${_conditionType_} a.productLogoPath is null
</if>
<if test="conditionParamRef.containsKey('productNameNotList') and conditionParamRef.productNameNotList.size() > 0">
${_conditionType_} a.productName not in
<foreach collection="conditionParamRef.productNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productLogoPathList') and conditionParamRef.productLogoPathList.size() > 0">
${_conditionType_} a.productLogoPath in
<foreach collection="conditionParamRef.productLogoPathList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productLogoPathNotList') and conditionParamRef.productLogoPathNotList.size() > 0">
${_conditionType_} a.productLogoPath not in
<foreach collection="conditionParamRef.productLogoPathNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productFacePath')">
<if test="conditionParamRef.productFacePath != null and conditionParamRef.productFacePath != ''">
${_conditionType_} a.productFacePath like #{${_conditionParam_}.productFacePath}
</if>
<if test="conditionParamRef.productFacePath == null">
${_conditionType_} a.productFacePath is null
</if>
</if>
<if test="conditionParamRef.containsKey('productFacePathList') and conditionParamRef.productFacePathList.size() > 0">
${_conditionType_} a.productFacePath in
<foreach collection="conditionParamRef.productFacePathList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productFacePathNotList') and conditionParamRef.productFacePathNotList.size() > 0">
${_conditionType_} a.productFacePath not in
<foreach collection="conditionParamRef.productFacePathNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productCode')">
<if test="conditionParamRef.productCode != null and conditionParamRef.productCode != ''">
${_conditionType_} a.productCode like #{${_conditionParam_}.productCode}
</if>
<if test="conditionParamRef.productCode == null">
${_conditionType_} a.productCode is null
</if>
<if test="conditionParamRef.containsKey('productVideoPath')">
<if test="conditionParamRef.productVideoPath != null and conditionParamRef.productVideoPath != ''">
${_conditionType_} a.productVideoPath like #{${_conditionParam_}.productVideoPath}
</if>
<if test="conditionParamRef.containsKey('productCodeList') and conditionParamRef.productCodeList.size() > 0">
${_conditionType_} a.productCode in
<foreach collection="conditionParamRef.productCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.productVideoPath == null">
${_conditionType_} a.productVideoPath is null
</if>
<if test="conditionParamRef.containsKey('productCodeNotList') and conditionParamRef.productCodeNotList.size() > 0">
${_conditionType_} a.productCode not in
<foreach collection="conditionParamRef.productCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productVideoPathList') and conditionParamRef.productVideoPathList.size() > 0">
${_conditionType_} a.productVideoPath in
<foreach collection="conditionParamRef.productVideoPathList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productVideoPathNotList') and conditionParamRef.productVideoPathNotList.size() > 0">
${_conditionType_} a.productVideoPath not in
<foreach collection="conditionParamRef.productVideoPathNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productPicPath')">
<if test="conditionParamRef.productPicPath != null and conditionParamRef.productPicPath != ''">
${_conditionType_} a.productPicPath like #{${_conditionParam_}.productPicPath}
</if>
<if test="conditionParamRef.productPicPath == null">
${_conditionType_} a.productPicPath is null
</if>
</if>
<if test="conditionParamRef.containsKey('productPicPathList') and conditionParamRef.productPicPathList.size() > 0">
${_conditionType_} a.productPicPath in
<foreach collection="conditionParamRef.productPicPathList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productPicPathNotList') and conditionParamRef.productPicPathNotList.size() > 0">
${_conditionType_} a.productPicPath not in
<foreach collection="conditionParamRef.productPicPathNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productSlogan')">
<if test="conditionParamRef.productSlogan != null and conditionParamRef.productSlogan != ''">
${_conditionType_} a.productSlogan like #{${_conditionParam_}.productSlogan}
</if>
<if test="conditionParamRef.productSlogan == null">
${_conditionType_} a.productSlogan is null
</if>
<if test="conditionParamRef.containsKey('productIntroduction')">
<if test="conditionParamRef.productIntroduction != null and conditionParamRef.productIntroduction != ''">
${_conditionType_} a.productIntroduction like #{${_conditionParam_}.productIntroduction}
</if>
<if test="conditionParamRef.containsKey('productSloganList') and conditionParamRef.productSloganList.size() > 0">
${_conditionType_} a.productSlogan in
<foreach collection="conditionParamRef.productSloganList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.productIntroduction == null">
${_conditionType_} a.productIntroduction is null
</if>
<if test="conditionParamRef.containsKey('productSloganNotList') and conditionParamRef.productSloganNotList.size() > 0">
${_conditionType_} a.productSlogan not in
<foreach collection="conditionParamRef.productSloganNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productIntroductionList') and conditionParamRef.productIntroductionList.size() > 0">
${_conditionType_} a.productIntroduction in
<foreach collection="conditionParamRef.productIntroductionList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productIntroductionNotList') and conditionParamRef.productIntroductionNotList.size() > 0">
${_conditionType_} a.productIntroduction not in
<foreach collection="conditionParamRef.productIntroductionNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productDetail')">
<if test="conditionParamRef.productDetail != null and conditionParamRef.productDetail != ''">
${_conditionType_} a.productDetail like #{${_conditionParam_}.productDetail}
</if>
<if test="conditionParamRef.productDetail == null">
${_conditionType_} a.productDetail is null
</if>
</if>
<if test="conditionParamRef.containsKey('productDetailList') and conditionParamRef.productDetailList.size() > 0">
${_conditionType_} a.productDetail in
<foreach collection="conditionParamRef.productDetailList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productDetailNotList') and conditionParamRef.productDetailNotList.size() > 0">
${_conditionType_} a.productDetail not in
<foreach collection="conditionParamRef.productDetailNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productLogoPath')">
<if test="conditionParamRef.productLogoPath != null and conditionParamRef.productLogoPath != ''">
${_conditionType_} a.productLogoPath like #{${_conditionParam_}.productLogoPath}
</if>
<if test="conditionParamRef.productLogoPath == null">
${_conditionType_} a.productLogoPath is null
</if>
<if test="conditionParamRef.containsKey('publishTime')">
<if test="conditionParamRef.publishTime != null ">
${_conditionType_} a.publishTime = #{${_conditionParam_}.publishTime}
</if>
<if test="conditionParamRef.containsKey('productLogoPathList') and conditionParamRef.productLogoPathList.size() > 0">
${_conditionType_} a.productLogoPath in
<foreach collection="conditionParamRef.productLogoPathList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.publishTime == null">
${_conditionType_} a.publishTime is null
</if>
<if test="conditionParamRef.containsKey('productLogoPathNotList') and conditionParamRef.productLogoPathNotList.size() > 0">
${_conditionType_} a.productLogoPath not in
<foreach collection="conditionParamRef.productLogoPathNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('publishTimeStart') and conditionParamRef.publishTimeStart != null and conditionParamRef.publishTimeStart!=''">
${_conditionType_} a.publishTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.publishTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('publishTimeEnd') and conditionParamRef.publishTimeEnd != null and conditionParamRef.publishTimeEnd!=''">
${_conditionType_} a.publishTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.publishTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('hot')">
<if test="conditionParamRef.hot != null ">
${_conditionType_} a.hot = #{${_conditionParam_}.hot}
</if>
<if test="conditionParamRef.hot == null">
${_conditionType_} a.hot is null
</if>
</if>
<if test="conditionParamRef.containsKey('hotList') and conditionParamRef.hotList.size() > 0">
${_conditionType_} a.hot in
<foreach collection="conditionParamRef.hotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('hotNotList') and conditionParamRef.hotNotList.size() > 0">
${_conditionType_} a.hot not in
<foreach collection="conditionParamRef.hotNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('hotStart') and conditionParamRef.hotStart != null">
${_conditionType_} a.hot <![CDATA[ >= ]]> #{${_conditionParam_}.hotStart}
</if>
<if test="conditionParamRef.containsKey('hotEnd') and conditionParamRef.hotEnd != null">
${_conditionType_} a.hot <![CDATA[ <= ]]> #{${_conditionParam_}.hotEnd}
</if>
<if test="conditionParamRef.containsKey('productFacePath')">
<if test="conditionParamRef.productFacePath != null and conditionParamRef.productFacePath != ''">
${_conditionType_} a.productFacePath like #{${_conditionParam_}.productFacePath}
</if>
<if test="conditionParamRef.productFacePath == null">
${_conditionType_} a.productFacePath is null
</if>
<if test="conditionParamRef.containsKey('productRemark')">
<if test="conditionParamRef.productRemark != null and conditionParamRef.productRemark != ''">
${_conditionType_} a.productRemark like #{${_conditionParam_}.productRemark}
</if>
<if test="conditionParamRef.containsKey('productFacePathList') and conditionParamRef.productFacePathList.size() > 0">
${_conditionType_} a.productFacePath in
<foreach collection="conditionParamRef.productFacePathList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.productRemark == null">
${_conditionType_} a.productRemark is null
</if>
<if test="conditionParamRef.containsKey('productFacePathNotList') and conditionParamRef.productFacePathNotList.size() > 0">
${_conditionType_} a.productFacePath not in
<foreach collection="conditionParamRef.productFacePathNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productRemarkList') and conditionParamRef.productRemarkList.size() > 0">
${_conditionType_} a.productRemark in
<foreach collection="conditionParamRef.productRemarkList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productRemarkNotList') and conditionParamRef.productRemarkNotList.size() > 0">
${_conditionType_} a.productRemark not in
<foreach collection="conditionParamRef.productRemarkNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if>
<if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('productVideoPath')">
<if test="conditionParamRef.productVideoPath != null and conditionParamRef.productVideoPath != ''">
${_conditionType_} a.productVideoPath like #{${_conditionParam_}.productVideoPath}
</if>
<if test="conditionParamRef.productVideoPath == null">
${_conditionType_} a.productVideoPath is null
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if>
<if test="conditionParamRef.containsKey('productVideoPathList') and conditionParamRef.productVideoPathList.size() > 0">
${_conditionType_} a.productVideoPath in
<foreach collection="conditionParamRef.productVideoPathList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
<if test="conditionParamRef.containsKey('productVideoPathNotList') and conditionParamRef.productVideoPathNotList.size() > 0">
${_conditionType_} a.productVideoPath not in
<foreach collection="conditionParamRef.productVideoPathNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateUserId')">
<if test="conditionParamRef.updateUserId != null ">
${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
</if>
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdNotList') and conditionParamRef.updateUserIdNotList.size() > 0">
${_conditionType_} a.updateUserId not in
<foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if>
<if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('productPicPath')">
<if test="conditionParamRef.productPicPath != null and conditionParamRef.productPicPath != ''">
${_conditionType_} a.productPicPath like #{${_conditionParam_}.productPicPath}
</if>
<if test="conditionParamRef.productPicPath == null">
${_conditionType_} a.productPicPath is null
</if>
<if test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</if>
<if test="conditionParamRef.containsKey('productPicPathList') and conditionParamRef.productPicPathList.size() > 0">
${_conditionType_} a.productPicPath in
<foreach collection="conditionParamRef.productPicPathList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
</if>
<if test="conditionParamRef.containsKey('productPicPathNotList') and conditionParamRef.productPicPathNotList.size() > 0">
${_conditionType_} a.productPicPath not in
<foreach collection="conditionParamRef.productPicPathNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</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('shelves')">
<if test="conditionParamRef.shelves != null ">
${_conditionType_} a.shelves = #{${_conditionParam_}.shelves}
</if>
<if test="conditionParamRef.containsKey('productIntroduction')">
<if test="conditionParamRef.productIntroduction != null and conditionParamRef.productIntroduction != ''">
${_conditionType_} a.productIntroduction like #{${_conditionParam_}.productIntroduction}
</if>
<if test="conditionParamRef.productIntroduction == null">
${_conditionType_} a.productIntroduction is null
</if>
<if test="conditionParamRef.shelves == null">
${_conditionType_} a.shelves is null
</if>
<if test="conditionParamRef.containsKey('productIntroductionList') and conditionParamRef.productIntroductionList.size() > 0">
${_conditionType_} a.productIntroduction in
<foreach collection="conditionParamRef.productIntroductionList" open="(" close=")" index="index" item="item" separator=",">
</if>
<if test="conditionParamRef.containsKey('shelvesList') and conditionParamRef.shelvesList.size() > 0">
${_conditionType_} a.shelves in
<foreach collection="conditionParamRef.shelvesList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('shelvesNotList') and conditionParamRef.shelvesNotList.size() > 0">
${_conditionType_} a.shelves not in
<foreach collection="conditionParamRef.shelvesNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('shelvesStart') and conditionParamRef.shelvesStart != null">
${_conditionType_} a.shelves <![CDATA[ >= ]]> #{${_conditionParam_}.shelvesStart}
</if>
<if test="conditionParamRef.containsKey('shelvesEnd') and conditionParamRef.shelvesEnd != null">
${_conditionType_} a.shelves <![CDATA[ <= ]]> #{${_conditionParam_}.shelvesEnd}
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('productIntroductionNotList') and conditionParamRef.productIntroductionNotList.size() > 0">
${_conditionType_} a.productIntroduction not in
<foreach collection="conditionParamRef.productIntroductionNotList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('hotList') and conditionParamRef.hotList.size() > 0">
field(a.hot,
<foreach collection="conditionParamRef.hotList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('productDetail')">
<if test="conditionParamRef.productDetail != null and conditionParamRef.productDetail != ''">
${_conditionType_} a.productDetail like #{${_conditionParam_}.productDetail}
</if>
<if test="conditionParamRef.productDetail == null">
${_conditionType_} a.productDetail is null
</if>
</if>
<if test="conditionParamRef.containsKey('productDetailList') and conditionParamRef.productDetailList.size() > 0">
${_conditionType_} a.productDetail in
<foreach collection="conditionParamRef.productDetailList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
field(a.createUserId,
<foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('productDetailNotList') and conditionParamRef.productDetailNotList.size() > 0">
${_conditionType_} a.productDetail not in
<foreach collection="conditionParamRef.productDetailNotList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('publishTime')">
<if test="conditionParamRef.publishTime != null ">
${_conditionType_} a.publishTime = #{${_conditionParam_}.publishTime}
</if>
<if test="conditionParamRef.publishTime == null">
${_conditionType_} a.publishTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('publishTimeStart') and conditionParamRef.publishTimeStart != null and conditionParamRef.publishTimeStart!=''">
${_conditionType_} a.publishTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.publishTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('publishTimeEnd') and conditionParamRef.publishTimeEnd != null and conditionParamRef.publishTimeEnd!=''">
${_conditionType_} a.publishTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.publishTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('hot')">
<if test="conditionParamRef.hot != null ">
${_conditionType_} a.hot = #{${_conditionParam_}.hot}
</if>
<if test="conditionParamRef.hot == null">
${_conditionType_} a.hot is null
</if>
</if>
<if test="conditionParamRef.containsKey('hotList') and conditionParamRef.hotList.size() > 0">
${_conditionType_} a.hot in
<foreach collection="conditionParamRef.hotList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('shelvesList') and conditionParamRef.shelvesList.size() > 0">
field(a.shelves,
<foreach collection="conditionParamRef.shelvesList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('hotNotList') and conditionParamRef.hotNotList.size() > 0">
${_conditionType_} a.hot not in
<foreach collection="conditionParamRef.hotNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
a.${item.colName} ${item.sortKind}
</foreach>
</if>
<if test="conditionParamRef.containsKey('hotStart') and conditionParamRef.hotStart != null">
${_conditionType_} a.hot <![CDATA[ >= ]]> #{${_conditionParam_}.hotStart}
</if>
<if test="conditionParamRef.containsKey('hotEnd') and conditionParamRef.hotEnd != null">
${_conditionType_} a.hot <![CDATA[ <= ]]> #{${_conditionParam_}.hotEnd}
</if>
<if test="conditionParamRef.containsKey('productRemark')">
<if test="conditionParamRef.productRemark != null and conditionParamRef.productRemark != ''">
${_conditionType_} a.productRemark like #{${_conditionParam_}.productRemark}
</if>
<if test="conditionParamRef.productRemark == null">
${_conditionType_} a.productRemark is null
</if>
</if>
<if test="conditionParamRef.containsKey('productRemarkList') and conditionParamRef.productRemarkList.size() > 0">
${_conditionType_} a.productRemark in
<foreach collection="conditionParamRef.productRemarkList" open="(" close=")" index="index" item="item" separator=",">
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('productRemarkNotList') and conditionParamRef.productRemarkNotList.size() > 0">
${_conditionType_} a.productRemark not in
<foreach collection="conditionParamRef.productRemarkNotList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('hotList') and conditionParamRef.hotList.size() > 0">
field(a.hot,
<foreach collection="conditionParamRef.hotList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
,
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
field(a.createUserId,
<foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" 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 test="conditionParamRef.containsKey('shelvesList') and conditionParamRef.shelvesList.size() > 0">
field(a.shelves,
<foreach collection="conditionParamRef.shelvesList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
<if test="orderCol.containsKey('productName')">
a.productName
<if test='orderCol.productName != null and "DESC".equalsIgnoreCase(orderCol.productName)'>DESC</if>
,
</if>
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateUserId')">
<if test="conditionParamRef.updateUserId != null ">
${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
<if test="orderCol.containsKey('productCode')">
a.productCode
<if test='orderCol.productCode != null and "DESC".equalsIgnoreCase(orderCol.productCode)'>DESC</if>
,
</if>
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
<if test="orderCol.containsKey('productSlogan')">
a.productSlogan
<if test='orderCol.productSlogan != null and "DESC".equalsIgnoreCase(orderCol.productSlogan)'>DESC</if>
,
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdNotList') and conditionParamRef.updateUserIdNotList.size() > 0">
${_conditionType_} a.updateUserId not in
<foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if>
<if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
<if test="orderCol.containsKey('productLogoPath')">
a.productLogoPath
<if test='orderCol.productLogoPath != null and "DESC".equalsIgnoreCase(orderCol.productLogoPath)'>DESC</if>
,
</if>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
<if test="orderCol.containsKey('productFacePath')">
a.productFacePath
<if test='orderCol.productFacePath != null and "DESC".equalsIgnoreCase(orderCol.productFacePath)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productVideoPath')">
a.productVideoPath
<if test='orderCol.productVideoPath != null and "DESC".equalsIgnoreCase(orderCol.productVideoPath)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productPicPath')">
a.productPicPath
<if test='orderCol.productPicPath != null and "DESC".equalsIgnoreCase(orderCol.productPicPath)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productIntroduction')">
a.productIntroduction
<if test='orderCol.productIntroduction != null and "DESC".equalsIgnoreCase(orderCol.productIntroduction)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productDetail')">
a.productDetail
<if test='orderCol.productDetail != null and "DESC".equalsIgnoreCase(orderCol.productDetail)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('publishTime')">
a.publishTime
<if test='orderCol.publishTime != null and "DESC".equalsIgnoreCase(orderCol.publishTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('hot')">
a.hot
<if test='orderCol.hot != null and "DESC".equalsIgnoreCase(orderCol.hot)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productRemark')">
a.productRemark
<if test='orderCol.productRemark != null and "DESC".equalsIgnoreCase(orderCol.productRemark)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')">
a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('shelves')">
a.shelves
<if test='orderCol.shelves != null and "DESC".equalsIgnoreCase(orderCol.shelves)'>DESC</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>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productName')">
a.productName
<if test='orderCol.productName != null and "DESC".equalsIgnoreCase(orderCol.productName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productCode')">
a.productCode
<if test='orderCol.productCode != null and "DESC".equalsIgnoreCase(orderCol.productCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productSlogan')">
a.productSlogan
<if test='orderCol.productSlogan != null and "DESC".equalsIgnoreCase(orderCol.productSlogan)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productLogoPath')">
a.productLogoPath
<if test='orderCol.productLogoPath != null and "DESC".equalsIgnoreCase(orderCol.productLogoPath)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productFacePath')">
a.productFacePath
<if test='orderCol.productFacePath != null and "DESC".equalsIgnoreCase(orderCol.productFacePath)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productVideoPath')">
a.productVideoPath
<if test='orderCol.productVideoPath != null and "DESC".equalsIgnoreCase(orderCol.productVideoPath)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productPicPath')">
a.productPicPath
<if test='orderCol.productPicPath != null and "DESC".equalsIgnoreCase(orderCol.productPicPath)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productIntroduction')">
a.productIntroduction
<if test='orderCol.productIntroduction != null and "DESC".equalsIgnoreCase(orderCol.productIntroduction)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productDetail')">
a.productDetail
<if test='orderCol.productDetail != null and "DESC".equalsIgnoreCase(orderCol.productDetail)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('publishTime')">
a.publishTime
<if test='orderCol.publishTime != null and "DESC".equalsIgnoreCase(orderCol.publishTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('hot')">
a.hot
<if test='orderCol.hot != null and "DESC".equalsIgnoreCase(orderCol.hot)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productRemark')">
a.productRemark
<if test='orderCol.productRemark != null and "DESC".equalsIgnoreCase(orderCol.productRemark)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')">
a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
<sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()">
......
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