Commit 4c25d0df authored by 冯秋丽's avatar 冯秋丽

首页接口

parent a6a21383
......@@ -103,6 +103,11 @@
<artifactId>lombok</artifactId>
<version>1.18.12</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-common</artifactId>
<version>2.9.2</version>
</dependency>
</dependencies>
......
package com.servicemall.loyalty.data;
import team.bangbang.config.data.Item;
import java.util.Date;
import team.bangbang.common.CommonMPI;
......@@ -22,6 +21,12 @@ public class Plan {
/* 购买数量限制 */
private Integer buyAmountLimit = null;
/* 是否显示在精选位置{0:否 1:是} */
private Integer selectedStatus = null;
/* 核销时是否绑定车辆使用{0:否 1:是} */
private Integer bindingUseStatus = null;
/* 厂家价格,单位 元 */
private Double factoryGuidePrice = null;
......@@ -31,12 +36,6 @@ public class Plan {
/* 统一售价,单位 元 */
private Double uniformPrice = null;
/* 是否显示在精选位置{0:否 1:是} */
private Integer selectedStatus = null;
/* 核销时是否绑定车辆使用{0:否 1:是} */
private Integer bindingUseStatus = null;
/* 付款方式{1:定金 2:全款} */
private Integer payTypeFlag = null;
......@@ -64,18 +63,18 @@ public class Plan {
/* 活动轮播图 */
private String activityImage = null;
/* 创建人编号 */
private Long creatorId = null;
/* 修改人编号 */
private Long updatorId = null;
/* 删除状态{0:否 1:是} */
private Integer delStatus = null;
/* 生效状态{1:待生效 2:生效中 3:已暂停 4:已结束} */
private Integer activeStatus = null;
/* 创建人编号 */
private Long creatorId = null;
/* 修改人编号 */
private Long updatorId = null;
/* 购买起始时间 */
private Date buyStartTime = null;
/* 购买起始时间 (查询上线) */
......@@ -156,6 +155,34 @@ public class Plan {
this.buyAmountLimit = buyAmountLimit;
}
/**
* @return 是否显示在精选位置{0:否 1:是}
*/
public Integer getSelectedStatus() {
return selectedStatus;
}
/**
* @param selectedStatus 是否显示在精选位置{0:否 1:是}
*/
public void setSelectedStatus(Integer selectedStatus) {
this.selectedStatus = selectedStatus;
}
/**
* @return 核销时是否绑定车辆使用{0:否 1:是}
*/
public Integer getBindingUseStatus() {
return bindingUseStatus;
}
/**
* @param bindingUseStatus 核销时是否绑定车辆使用{0:否 1:是}
*/
public void setBindingUseStatus(Integer bindingUseStatus) {
this.bindingUseStatus = bindingUseStatus;
}
/**
* @return 厂家价格,单位 元
*/
......@@ -206,34 +233,6 @@ public class Plan {
this.uniformPrice = uniformPrice;
}
/**
* @return 是否显示在精选位置{0:否 1:是}
*/
public Integer getSelectedStatus() {
return selectedStatus;
}
/**
* @param selectedStatus 是否显示在精选位置{0:否 1:是}
*/
public void setSelectedStatus(Integer selectedStatus) {
this.selectedStatus = selectedStatus;
}
/**
* @return 核销时是否绑定车辆使用{0:否 1:是}
*/
public Integer getBindingUseStatus() {
return bindingUseStatus;
}
/**
* @param bindingUseStatus 核销时是否绑定车辆使用{0:否 1:是}
*/
public void setBindingUseStatus(Integer bindingUseStatus) {
this.bindingUseStatus = bindingUseStatus;
}
/**
* @return 付款方式{1:定金 2:全款}
*/
......@@ -369,59 +368,59 @@ public class Plan {
}
/**
* @return 创建人编号
* @return 删除状态{0:否 1:是}
*/
public Long getCreatorId() {
return creatorId;
public Integer getDelStatus() {
return delStatus;
}
/**
* @param creatorId 创建人编号
* @param delStatus 删除状态{0:否 1:是}
*/
public void setCreatorId(Long creatorId) {
this.creatorId = creatorId;
public void setDelStatus(Integer delStatus) {
this.delStatus = delStatus;
}
/**
* @return 修改人编号
* @return 生效状态{1:待生效 2:生效中 3:已暂停 4:已结束}
*/
public Long getUpdatorId() {
return updatorId;
public Integer getActiveStatus() {
return activeStatus;
}
/**
* @param updatorId 修改人编号
* @param activeStatus 生效状态{1:待生效 2:生效中 3:已暂停 4:已结束}
*/
public void setUpdatorId(Long updatorId) {
this.updatorId = updatorId;
public void setActiveStatus(Integer activeStatus) {
this.activeStatus = activeStatus;
}
/**
* @return 删除状态{0:否 1:是}
* @return 创建人编号
*/
public Integer getDelStatus() {
return delStatus;
public Long getCreatorId() {
return creatorId;
}
/**
* @param delStatus 删除状态{0:否 1:是}
* @param creatorId 创建人编号
*/
public void setDelStatus(Integer delStatus) {
this.delStatus = delStatus;
public void setCreatorId(Long creatorId) {
this.creatorId = creatorId;
}
/**
* @return 生效状态{1:待生效 2:生效中 3:已暂停 4:已结束}
* @return 修改人编号
*/
public Integer getActiveStatus() {
return activeStatus;
public Long getUpdatorId() {
return updatorId;
}
/**
* @param activeStatus 生效状态{1:待生效 2:生效中 3:已暂停 4:已结束}
* @param updatorId 修改人编号
*/
public void setActiveStatus(Integer activeStatus) {
this.activeStatus = activeStatus;
public void setUpdatorId(Long updatorId) {
this.updatorId = updatorId;
}
/**
......
package com.servicemall.loyalty.data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* 礼遇计划 - POJO
* 对应数据库表:loyalty_plan_base
*
* @author qiuli.feng
* @version 1.0 2020-12-08
*/
public class Selected implements Serializable {
/* 编号(关键字) */
@ApiModelProperty(value="编号", required = true)
private Long id = null;
/* 精选名称(计划/活动/产品(只含轮胎)) */
@ApiModelProperty(value="精选名称(计划/活动/产品(只含轮胎)", required = true)
private String name = null;
/* 图片 */
@ApiModelProperty(value="图片" , required = true)
private String image = null;
/* 精选类型 */
@ApiModelProperty(value="精选类型{1:计划2:活动3:轮胎}" , required = true)
private Integer type = null;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}
package com.servicemall.loyalty.dto;
import com.sun.istack.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
@ApiModel(value="演示类",description="请求参数类" )
public class DemoDto implements Serializable {
private static final long serialVersionUID = 1L;
@NotNull
@ApiModelProperty(value = "defaultStr",example="mockStrValue")
private String strDemo;
@NotNull
@ApiModelProperty(example="1234343523",required = true)
private Long longNum;
@NotNull
@ApiModelProperty(example="111111.111")
private Double doubleNum;
@NotNull
@ApiModelProperty(example="2018-12-04T13:46:56.711Z")
private Date date;
}
package com.servicemall.loyalty.dto;
import com.sun.istack.NotNull;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;
@Data
public class DemoOutputDto {
private String res;
@NotNull
@ApiModelProperty(value = "defaultOutputStr",example="mockOutputStrValue")
private String outputStrDemo;
@NotNull
@ApiModelProperty(example="6666666",required = true)
private Long outputLongNum;
@NotNull
@ApiModelProperty(example="88888.888")
private Double outputDoubleNum;
@NotNull
@ApiModelProperty(example="2018-12-12T11:11:11.111Z")
private Date outputDate;
}
package com.servicemall.loyalty.micro;
import com.servicemall.loyalty.data.Selected;
import com.servicemall.loyalty.service.SeletedService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import team.bangbang.common.data.Pagination;
import team.bangbang.common.data.response.DataResponse;
import team.bangbang.common.data.response.ResponseBase;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 精选 -
*
* 对应
*
* @author 帮帮组
* @version 1.0 2020-12-08
*/
@Api(description = "ServiceMall首页精选API接口")
@RestController
@CrossOrigin(allowCredentials="true", allowedHeaders="*", origins="*", maxAge=3600)
@RequestMapping("/microservice/loyalty/")
public class SelectedMicro {
/**
* 查询精选列表 计划/活动/产品(只含轮胎),并转化为相应的POJO对象列表
*
*
* @return 返回结果记录,并转化为相应的POJO对象列表
*/
@PostMapping("/selectedlist")
@ApiOperation(value = "获取精选列表", notes = "精选包含计划/活动/轮胎等", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "pageNo", value = "分页参数 - 页号,默认为1", dataType = "Integer"),
@ApiImplicitParam(paramType = "query", name = "pageSize", value = "分页参数 - 每页最大记录数量,默认为10", dataType = "Integer")
})
public ResponseBase list(Integer pageNo, Integer pageSize) {
if(pageNo == null) pageNo = 1;
if(pageSize == null) pageSize = 10;
// 分页数据
Pagination pagination = new Pagination();
pagination.setRecordCount(Integer.MAX_VALUE);
pagination.setMaxResults(pageSize);
pagination.setPageNo(pageNo);
// 统计符合条件的结果记录数量
int recordCount = 0;
pagination.setRecordCount(recordCount);
List<Selected> selectedList = SeletedService.list();
DataResponse<Map<String, Object>> result = new DataResponse<Map<String, Object>>();
Map<String, Object> datas = new HashMap<String, Object>();
datas.put("list", selectedList);
datas.put("pagination", pagination);
result.setData(datas);
return result;
}
}
package com.servicemall.loyalty.service;
import com.servicemall.loyalty.data.Selected;
import java.util.ArrayList;
import java.util.List;
/**
* 精选 - Service
*
* @author qiuli.feng
* @version 1.0 2020-12-08
*/
public class SeletedService {
/**
* 查询
*/
public static List<Selected> list() {
List<Selected> selectedList = new ArrayList<>();
Selected selected = new Selected();
selected.setId(1l);
selected.setImage("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1607427778447&di=b0d30539b93ff6e7394b9c80801e11c7&imgtype=0&src=http%3A%2F%2Fimg000.hc360.cn%2Fm6%2FM04%2F58%2F6A%2FwKhQolWVsnmEGYk8AAAAAIA_Z48561.jpg");
selected.setName("轮胎");
selectedList.add(selected);
return selectedList;
}
}
package com.servicemall.right.data;
import java.util.Date;
import team.bangbang.common.CommonMPI;
/**
* 优惠权益 - POJO
* 对应数据库表:right_coupon_base
*
* @author qiuli.feng
* @version 1.0 2020-12-08
*/
public class Coupon {
/* 权益编号(关键字) */
private Long id = null;
/* 礼遇编号 */
private Long loyaltyId = null;
/* 权益名称 */
private String rightName = null;
/* 有效期类型标识{1:按日期期间 2:按有效期} */
private Integer activeTypeFlag = null;
/* 有效期-月数{-1无限制} */
private Integer activeMonth = null;
/* 核销类型{1:订单核销 2:快速核销} */
private Integer usedTypeFlag = null;
/* 是否可核销多次{1:是 2:否} */
private Integer useNumTypeFlag = null;
/* 阶段性可核销次数 */
private Integer phasedUseNum = null;
/* 每{1:不限制 2:年 3:季度 4:月} */
private Integer phaseTypeFlag = null;
/* 共可核销次数{-1不限制} */
private Integer totalUseNum = null;
/* 权益使用必须完成订单次数 */
private Integer useLimitOrderNum = null;
/* 权益类型{1:满减券金额类-整单减2:满减券金额类-每满减3:满减券产品类-整单减4:满减券产品类-每满减 5:折扣券6赠品券7免单券8代金券9动态折扣券} */
private Integer rightTypeFlag = null;
/* 权益内容 */
private String rightContent = null;
/* 权益描述 */
private String description = null;
/* 使用说明 */
private String useDescription = null;
/* 排序值 */
private Integer sortValue = null;
/* 创建人编号 */
private Long creatorId = null;
/* 修改人编号 */
private Long updatorId = null;
/* 删除状态{0:未删除1:已删除} */
private Integer delStatus = null;
/* 有效状态{1:有效 2:暂停} */
private Integer activeStatus = null;
/* 有效期-开始时间 */
private Date activeStartTime = null;
/* 有效期-开始时间 (查询上线) */
private Date activeStartTimeTop = null;
/* 有效期-开始时间 (查询下线) */
private Date activeStartTimeBottom = null;
/* 有效期-结束时间 */
private Date activeEndTime = null;
/* 有效期-结束时间 (查询上线) */
private Date activeEndTimeTop = null;
/* 有效期-结束时间 (查询下线) */
private Date activeEndTimeBottom = null;
/* 创建时间 */
private Date createAt = null;
/* 创建时间 (查询上线) */
private Date createAtTop = null;
/* 创建时间 (查询下线) */
private Date createAtBottom = null;
/* 更新时间 */
private Date updateAt = null;
/* 更新时间 (查询上线) */
private Date updateAtTop = null;
/* 更新时间 (查询下线) */
private Date updateAtBottom = null;
/*
* 固定数据字典 有效期类型{1:按日期期间 2:按有效期}
*/
public static final String[] activeTypeFlags = { "有效期类型{1:按日期期间 2:按有效期}" };
/*
* 固定数据字典 核销类型{1:订单核销 2:快速核销}
*/
public static final String[] usedTypeFlags = { "核销类型{1:订单核销 2:快速核销}" };
/*
* 固定数据字典 是否可核销多次{1:是 2:否}
*/
public static final String[] useNumTypeFlags = { "是否可核销多次{1:是 2:否}" };
/*
* 固定数据字典 每{1:不限制 2:年 3:季度 4:月}
*/
public static final String[] phaseTypeFlags = { "每{1:不限制 2:年 3:季度 4:月}" };
/*
* 固定数据字典 权益类型{1:满减券金额类-整单减2:满减券金额类-每满减3:满减券产品类-整单减4:满减券产品类-每满减 5:折扣券6赠品券7免单券8代金券9动态折扣券}
*/
public static final String[] rightTypeFlags = { "权益类型{1:满减券金额类-整单减2:满减券金额类-每满减3:满减券产品类-整单减4:满减券产品类-每满减 5:折扣券6赠品券7免单券8代金券9动态折扣券}" };
/**
* @return 权益编号
*/
public Long getId() {
return id;
}
/**
* @param id 权益编号
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return 礼遇编号
*/
public Long getLoyaltyId() {
return loyaltyId;
}
/**
* @param loyaltyId 礼遇编号
*/
public void setLoyaltyId(Long loyaltyId) {
this.loyaltyId = loyaltyId;
}
/**
* @return 权益名称
*/
public String getRightName() {
return rightName;
}
/**
* @param rightName 权益名称
*/
public void setRightName(String rightName) {
this.rightName = rightName;
}
/**
* @return 有效期类型标识{1:按日期期间 2:按有效期}
*/
public Integer getActiveTypeFlag() {
return activeTypeFlag;
}
/**
* @param activeTypeFlag 有效期类型标识{1:按日期期间 2:按有效期}
*/
public void setActiveTypeFlag(Integer activeTypeFlag) {
this.activeTypeFlag = activeTypeFlag;
}
/**
* @return 有效期类型{1:按日期期间 2:按有效期}名称
*/
public String getActiveTypeName() {
Integer nFlag = getActiveTypeFlag();
return CommonMPI.getDictionaryName(activeTypeFlags, nFlag);
}
/**
* @return 有效期-月数{-1无限制}
*/
public Integer getActiveMonth() {
return activeMonth;
}
/**
* @param activeMonth 有效期-月数{-1无限制}
*/
public void setActiveMonth(Integer activeMonth) {
this.activeMonth = activeMonth;
}
/**
* @return 核销类型{1:订单核销 2:快速核销}
*/
public Integer getUsedTypeFlag() {
return usedTypeFlag;
}
/**
* @param usedTypeFlag 核销类型{1:订单核销 2:快速核销}
*/
public void setUsedTypeFlag(Integer usedTypeFlag) {
this.usedTypeFlag = usedTypeFlag;
}
/**
* @return 核销类型{1:订单核销 2:快速核销}名称
*/
public String getUsedTypeName() {
Integer nFlag = getUsedTypeFlag();
return CommonMPI.getDictionaryName(usedTypeFlags, nFlag);
}
/**
* @return 是否可核销多次{1:是 2:否}
*/
public Integer getUseNumTypeFlag() {
return useNumTypeFlag;
}
/**
* @param useNumTypeFlag 是否可核销多次{1:是 2:否}
*/
public void setUseNumTypeFlag(Integer useNumTypeFlag) {
this.useNumTypeFlag = useNumTypeFlag;
}
/**
* @return 是否可核销多次{1:是 2:否}名称
*/
public String getUseNumTypeName() {
Integer nFlag = getUseNumTypeFlag();
return CommonMPI.getDictionaryName(useNumTypeFlags, nFlag);
}
/**
* @return 阶段性可核销次数
*/
public Integer getPhasedUseNum() {
return phasedUseNum;
}
/**
* @param phasedUseNum 阶段性可核销次数
*/
public void setPhasedUseNum(Integer phasedUseNum) {
this.phasedUseNum = phasedUseNum;
}
/**
* @return 每{1:不限制 2:年 3:季度 4:月}
*/
public Integer getPhaseTypeFlag() {
return phaseTypeFlag;
}
/**
* @param phaseTypeFlag 每{1:不限制 2:年 3:季度 4:月}
*/
public void setPhaseTypeFlag(Integer phaseTypeFlag) {
this.phaseTypeFlag = phaseTypeFlag;
}
/**
* @return 每{1:不限制 2:年 3:季度 4:月}名称
*/
public String getPhaseTypeName() {
Integer nFlag = getPhaseTypeFlag();
return CommonMPI.getDictionaryName(phaseTypeFlags, nFlag);
}
/**
* @return 共可核销次数{-1不限制}
*/
public Integer getTotalUseNum() {
return totalUseNum;
}
/**
* @param totalUseNum 共可核销次数{-1不限制}
*/
public void setTotalUseNum(Integer totalUseNum) {
this.totalUseNum = totalUseNum;
}
/**
* @return 权益使用必须完成订单次数
*/
public Integer getUseLimitOrderNum() {
return useLimitOrderNum;
}
/**
* @param useLimitOrderNum 权益使用必须完成订单次数
*/
public void setUseLimitOrderNum(Integer useLimitOrderNum) {
this.useLimitOrderNum = useLimitOrderNum;
}
/**
* @return 权益类型{1:满减券金额类-整单减2:满减券金额类-每满减3:满减券产品类-整单减4:满减券产品类-每满减 5:折扣券6赠品券7免单券8代金券9动态折扣券}
*/
public Integer getRightTypeFlag() {
return rightTypeFlag;
}
/**
* @param rightTypeFlag 权益类型{1:满减券金额类-整单减2:满减券金额类-每满减3:满减券产品类-整单减4:满减券产品类-每满减 5:折扣券6赠品券7免单券8代金券9动态折扣券}
*/
public void setRightTypeFlag(Integer rightTypeFlag) {
this.rightTypeFlag = rightTypeFlag;
}
/**
* @return 权益类型{1:满减券金额类-整单减2:满减券金额类-每满减3:满减券产品类-整单减4:满减券产品类-每满减 5:折扣券6赠品券7免单券8代金券9动态折扣券}名称
*/
public String getRightTypeName() {
Integer nFlag = getRightTypeFlag();
return CommonMPI.getDictionaryName(rightTypeFlags, nFlag);
}
/**
* @return 权益内容
*/
public String getRightContent() {
return rightContent;
}
/**
* @param rightContent 权益内容
*/
public void setRightContent(String rightContent) {
this.rightContent = rightContent;
}
/**
* @return 权益描述
*/
public String getDescription() {
return description;
}
/**
* @param description 权益描述
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return 使用说明
*/
public String getUseDescription() {
return useDescription;
}
/**
* @param useDescription 使用说明
*/
public void setUseDescription(String useDescription) {
this.useDescription = useDescription;
}
/**
* @return 排序值
*/
public Integer getSortValue() {
return sortValue;
}
/**
* @param sortValue 排序值
*/
public void setSortValue(Integer sortValue) {
this.sortValue = sortValue;
}
/**
* @return 创建人编号
*/
public Long getCreatorId() {
return creatorId;
}
/**
* @param creatorId 创建人编号
*/
public void setCreatorId(Long creatorId) {
this.creatorId = creatorId;
}
/**
* @return 修改人编号
*/
public Long getUpdatorId() {
return updatorId;
}
/**
* @param updatorId 修改人编号
*/
public void setUpdatorId(Long updatorId) {
this.updatorId = updatorId;
}
/**
* @return 删除状态{0:未删除1:已删除}
*/
public Integer getDelStatus() {
return delStatus;
}
/**
* @param delStatus 删除状态{0:未删除1:已删除}
*/
public void setDelStatus(Integer delStatus) {
this.delStatus = delStatus;
}
/**
* @return 有效状态{1:有效 2:暂停}
*/
public Integer getActiveStatus() {
return activeStatus;
}
/**
* @param activeStatus 有效状态{1:有效 2:暂停}
*/
public void setActiveStatus(Integer activeStatus) {
this.activeStatus = activeStatus;
}
/**
* @return 有效期-开始时间
*/
public Date getActiveStartTime() {
return activeStartTime;
}
/**
* @param activeStartTime 有效期-开始时间
*/
public void setActiveStartTime(Date activeStartTime) {
this.activeStartTime = activeStartTime;
}
/**
* @return 有效期-开始时间(查询上线)
*/
public Date getActiveStartTimeTop() {
return activeStartTimeTop;
}
/**
* @param activeStartTimeTop 有效期-开始时间(查询上线)
*/
public void setActiveStartTimeTop(Date activeStartTimeTop) {
this.activeStartTimeTop = activeStartTimeTop;
}
/**
* @return 有效期-开始时间(查询下线)
*/
public Date getActiveStartTimeBottom() {
return activeStartTimeBottom;
}
/**
* @param activeStartTimeBottom 有效期-开始时间(查询下线)
*/
public void setActiveStartTimeBottom(Date activeStartTimeBottom) {
this.activeStartTimeBottom = activeStartTimeBottom;
}
/**
* @return 有效期-结束时间
*/
public Date getActiveEndTime() {
return activeEndTime;
}
/**
* @param activeEndTime 有效期-结束时间
*/
public void setActiveEndTime(Date activeEndTime) {
this.activeEndTime = activeEndTime;
}
/**
* @return 有效期-结束时间(查询上线)
*/
public Date getActiveEndTimeTop() {
return activeEndTimeTop;
}
/**
* @param activeEndTimeTop 有效期-结束时间(查询上线)
*/
public void setActiveEndTimeTop(Date activeEndTimeTop) {
this.activeEndTimeTop = activeEndTimeTop;
}
/**
* @return 有效期-结束时间(查询下线)
*/
public Date getActiveEndTimeBottom() {
return activeEndTimeBottom;
}
/**
* @param activeEndTimeBottom 有效期-结束时间(查询下线)
*/
public void setActiveEndTimeBottom(Date activeEndTimeBottom) {
this.activeEndTimeBottom = activeEndTimeBottom;
}
/**
* @return 创建时间
*/
public Date getCreateAt() {
return createAt;
}
/**
* @param createAt 创建时间
*/
public void setCreateAt(Date createAt) {
this.createAt = createAt;
}
/**
* @return 创建时间(查询上线)
*/
public Date getCreateAtTop() {
return createAtTop;
}
/**
* @param createAtTop 创建时间(查询上线)
*/
public void setCreateAtTop(Date createAtTop) {
this.createAtTop = createAtTop;
}
/**
* @return 创建时间(查询下线)
*/
public Date getCreateAtBottom() {
return createAtBottom;
}
/**
* @param createAtBottom 创建时间(查询下线)
*/
public void setCreateAtBottom(Date createAtBottom) {
this.createAtBottom = createAtBottom;
}
/**
* @return 更新时间
*/
public Date getUpdateAt() {
return updateAt;
}
/**
* @param updateAt 更新时间
*/
public void setUpdateAt(Date updateAt) {
this.updateAt = updateAt;
}
/**
* @return 更新时间(查询上线)
*/
public Date getUpdateAtTop() {
return updateAtTop;
}
/**
* @param updateAtTop 更新时间(查询上线)
*/
public void setUpdateAtTop(Date updateAtTop) {
this.updateAtTop = updateAtTop;
}
/**
* @return 更新时间(查询下线)
*/
public Date getUpdateAtBottom() {
return updateAtBottom;
}
/**
* @param updateAtBottom 更新时间(查询下线)
*/
public void setUpdateAtBottom(Date updateAtBottom) {
this.updateAtBottom = updateAtBottom;
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
return (getId() == null)?0:getId().toString().hashCode();
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals(Object obj) {
if(getId() == null || obj == null || !(obj instanceof Coupon)) {
return false;
}
return getId().equals(((Coupon)obj).getId());
}
}
package com.servicemall.right.feign;
import org.springframework.cloud.openfeign.FeignClient;
import team.bangbang.spring.microservice.IFeign;
import com.servicemall.right.data.Coupon;
/**
* 优惠权益 - FeignClient
* 对应微服务:com.servicemall.right.micro.CouponMicro
*
* 使用时请按照以下2步执行:
* <pre>
* 1. FeignClien注解的value值替换为微服务提供者的工程名称;
* 即提供者工程application.properties中的spring.application.name配置
* 注意工程名称不能含有下划线,但可以使用减号
*
* 2. 提取本类及相关的POJO文件并放入调用者工程中,别的类及文件不需要带入。具体为:
* com.servicemall.right.data.Coupon
* com.servicemall.right.feign.CouponFeign
* </pre>
*
* @author 帮帮组
* @version 1.0 2020-12-08
*/
@FeignClient(value="[TODO:此处要填入固定值,不可引用配置]", path="/microservice/coupon")
public interface CouponFeign extends IFeign<Coupon> {
/**************************************************************************
* !!除非设计、指导人员有特别说明,否则此处不得随意增加、修改、删除!!
* ------------------------------------
*
*************************************************************************/
}
package com.servicemall.right.mapper;
import team.bangbang.spring.db.IMapper;
import org.apache.ibatis.annotations.Mapper;
import com.servicemall.right.data.Coupon;
/**
* 优惠权益 - Mapper
* 对应数据库表:right_coupon_base
*
* @author 帮帮组
* @version 1.0 2020-12-08
*/
@Mapper
public interface CouponMapper extends IMapper<Coupon> {
/**************************************************************************
* !!除非设计、指导人员有特别说明,否则此处不得随意增加、修改、删除!!
* ------------------------------------
*
* 如确需添加自定义方法,相应的mapper.xml中应配置SQL块,注意3点:
*
* 1. SQL块的id须与方法名保持一致;
*
* 2. 方法中的参数添加@Param注解;
*
* 3. SQL块中的参数对象名与@Param注解内名称一致。
*
*************************************************************************/
}
package com.servicemall.right.micro;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import com.servicemall.loyalty.data.Selected;
import com.servicemall.loyalty.service.SeletedService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import team.bangbang.common.data.Pagination;
import team.bangbang.common.data.response.ResponseBase;
import team.bangbang.common.data.response.DataResponse;
import team.bangbang.common.log.OperationLog;
import team.bangbang.common.utility.LogicUtility;
import team.bangbang.spring.parameter.EntityParam;
import com.servicemall.right.data.Coupon;
import com.servicemall.right.service.CouponService;
/**
* 优惠权益 - 微服务
*
* 对应Feign:com.servicemall.right.feign.CouponFeign
*
* @author 帮帮组
* @version 1.0 2020-12-08
*/
@RestController
@CrossOrigin(allowCredentials="true", allowedHeaders="*", origins="*", maxAge=3600)
@RequestMapping("/microservice/right/coupon")
public final class CouponMicro {
/**************************************************************************
* !!除非设计、指导人员有特别说明,否则此处不得随意增加、修改、删除!!
* ------------------------------------
*
*************************************************************************/
/**
* 插入一条优惠权益
*
* @param coupon 插入的数据,不能为null
* @param request HTTP请求
*
* @return 1:成功 其它:失败
*/
@PostMapping("/insert")
public ResponseBase insert(@RequestBody Coupon coupon, HttpServletRequest request) {
// 是否存在重复记录?
if(exist(coupon)) {
return ResponseBase.DATA_DUPLICATE;
}
int n = CouponService.insert(coupon);
if(n != 1) {
return ResponseBase.ERROR_LOGIC;
}
// 记录日志
OperationLog log = new OperationLog();
log.setType("新增优惠权益");
log.setBizData(coupon);
request.setAttribute("log", log);
DataResponse<Coupon> result = new DataResponse<Coupon>();
result.setData(coupon);
return result;
}
/**
* 删除优惠权益
*
* @param coupon 删除条件,必须包含关键字段
* @param request HTTP请求
*
* @return 成功删除的记录数量
*/
@PostMapping("/delete")
public ResponseBase delete(@RequestBody Coupon coupon, HttpServletRequest request) {
if(coupon.getId() == null || coupon.getId() == 0L) {
return ResponseBase.DATA_NOT_FOUND;
}
// 获取待删除的对象,用于日志记录
coupon = CouponService.getObject(coupon, null);
if(coupon == null) {
return ResponseBase.DATA_NOT_FOUND;
}
// 限定条件
Coupon where = new Coupon();
where.setId(coupon.getId());
int result = CouponService.delete(where, null);
if(result != 1) {
return ResponseBase.DATA_NOT_FOUND;
}
// 记录日志
OperationLog log = new OperationLog();
log.setType("删除优惠权益");
log.setBizData(where);
request.setAttribute("log", log);
return ResponseBase.SUCCESS;
}
/**
* 修改优惠权益
*
* @param coupon 更新条件,不能为null
* @param request HTTP请求
*
* @return 成功修改的记录数量
*/
@PostMapping("/update")
public ResponseBase update(@RequestBody Coupon coupon, HttpServletRequest request) {
// 为防止更新意外,必须传入id才能更新
Long id = coupon.getId();
if(id == null || id == 0L) {
return ResponseBase.DATA_NOT_FOUND;
}
// 是否存在重复记录?
if(exist(coupon)) {
return ResponseBase.DATA_DUPLICATE;
}
// 第1个参数coupon,取关键字段coupon.id为条件
// 第3个参数coupon,取coupon内关键字段以外其它属性数据
int n = CouponService.update(coupon, null, coupon);
if(n != 1) {
return ResponseBase.DATA_NOT_FOUND;
}
// 记录日志
OperationLog log = new OperationLog();
log.setType("修改优惠权益");
log.setBizData(coupon);
request.setAttribute("log", log);
// 重新查询,返回到前端
coupon = CouponService.getObject(coupon, null);
DataResponse<Coupon> result = new DataResponse<Coupon>();
result.setData(coupon);
return result;
}
/**
* 查询一条优惠权益,并转化为相应的POJO对象
*
* @param coupon 查询条件,不能为null
*
* @return 返回结果记录,并转化为相应的POJO对象
*/
@PostMapping("/get")
public ResponseBase get(@RequestBody Coupon coupon) {
if(coupon.getId() == null || coupon.getId() == 0L) {
return ResponseBase.DATA_NOT_FOUND;
}
// 查询
coupon = CouponService.getObject(coupon, null);
DataResponse<Coupon> result = new DataResponse<Coupon>();
result.setData(coupon);
return result;
}
/**
* 查询多条优惠权益,并转化为相应的POJO对象列表
*
* @param coupon 更新条件,不能为null
*
* @return 返回结果记录,并转化为相应的POJO对象列表
*/
@PostMapping("/list")
public ResponseBase list(@RequestBody Coupon coupon, @EntityParam Pagination pagination) {
// 附加限定条件,这里可以修改附加限定条件
String appendix = null;
List<Coupon> couponList = CouponService.list(coupon, appendix, pagination);
// 统计符合条件的结果记录数量
int recordCount = CouponService.count(coupon, appendix);
pagination.setRecordCount(recordCount);
DataResponse<Map<String, Object>> result = new DataResponse<Map<String, Object>>();
Map<String, Object> datas = new HashMap<String, Object>();
datas.put("list", couponList);
datas.put("pagination", pagination);
result.setData(datas);
return result;
}
/**
* 获得符合条件的优惠权益数量
*
* @param coupon 查询条件,不能为null
*
* @return 返回记录数量
*/
@PostMapping("/count")
public ResponseBase count(@RequestBody Coupon coupon) {
// 附加限定条件,这里可以修改附加限定条件
String appendix = null;
int n = CouponService.count(coupon, appendix);
DataResponse<Integer> result = new DataResponse<Integer>();
result.setData(n);
return result;
}
/**
* 用在新增、修改时检查数据库中是否存在重复记录(请务必保留该方法)
*
* @param temp
* 将要修改的优惠权益POJO
* @return true:已经存在 false:不存在
*/
private boolean exist(Coupon temp) {
// 检查修改的优惠权益是否有重复记录
Coupon form = new Coupon();
// 关键字限定条件
String str = (temp.getId() == null ? null : "Id != " + temp.getId());
// 其它信息限定条件
// 礼遇编号
form.setLoyaltyId(temp.getLoyaltyId());
// 权益名称
form.setRightName(temp.getRightName());
// 有效期类型标识{1:按日期期间 2:按有效期}
form.setActiveTypeFlag(temp.getActiveTypeFlag());
// 有效期-开始时间
form.setActiveStartTime(temp.getActiveStartTime());
// 有效期-结束时间
form.setActiveEndTime(temp.getActiveEndTime());
// 有效期-月数{-1无限制}
form.setActiveMonth(temp.getActiveMonth());
// 核销类型{1:订单核销 2:快速核销}
form.setUsedTypeFlag(temp.getUsedTypeFlag());
// 是否可核销多次{1:是 2:否}
form.setUseNumTypeFlag(temp.getUseNumTypeFlag());
// 阶段性可核销次数
form.setPhasedUseNum(temp.getPhasedUseNum());
// 每{1:不限制 2:年 3:季度 4:月}
form.setPhaseTypeFlag(temp.getPhaseTypeFlag());
// 共可核销次数{-1不限制}
form.setTotalUseNum(temp.getTotalUseNum());
// 权益使用必须完成订单次数
form.setUseLimitOrderNum(temp.getUseLimitOrderNum());
// 权益类型{1:满减券金额类-整单减2:满减券金额类-每满减3:满减券产品类-整单减4:满减券产品类-每满减 5:折扣券6赠品券7免单券8代金券9动态折扣券}
form.setRightTypeFlag(temp.getRightTypeFlag());
// 权益内容
form.setRightContent(temp.getRightContent());
// 权益描述
form.setDescription(temp.getDescription());
// 使用说明
form.setUseDescription(temp.getUseDescription());
// 创建时间
form.setCreateAt(temp.getCreateAt());
// 更新时间
form.setUpdateAt(temp.getUpdateAt());
// 排序值
form.setSortValue(temp.getSortValue());
// 创建人编号
form.setCreatorId(temp.getCreatorId());
// 修改人编号
form.setUpdatorId(temp.getUpdatorId());
// 删除状态{0:未删除1:已删除}
form.setDelStatus(temp.getDelStatus());
// 有效状态{1:有效 2:暂停}
form.setActiveStatus(temp.getActiveStatus());
return (CouponService.getObject(form, str) != null);
}
/**
* 查询优惠券列表
*
*
* @return
*/
@PostMapping("/querycouponlist")
@ApiOperation(value = "获取优惠券列表", notes = "优惠券列表", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "dms_code", value = "经销商code", dataType = "String"),
@ApiImplicitParam(paramType = "query", name = "pageNo", value = "分页参数 - 页号,默认为1", dataType = "Integer"),
@ApiImplicitParam(paramType = "query", name = "pageSize", value = "分页参数 - 每页最大记录数量,默认为10", dataType = "Integer")
})
public ResponseBase list(String dms_code,Integer pageNo, Integer pageSize) {
if(pageNo == null) pageNo = 1;
if(pageSize == null) pageSize = 10;
// 分页数据
Pagination pagination = new Pagination();
pagination.setRecordCount(Integer.MAX_VALUE);
pagination.setMaxResults(pageSize);
pagination.setPageNo(pageNo);
// 统计符合条件的结果记录数量
int recordCount = 0;
pagination.setRecordCount(recordCount);
List<Coupon> couponList = CouponService.queryCouponList(dms_code,pagination);
DataResponse<Map<String, Object>> result = new DataResponse<Map<String, Object>>();
Map<String, Object> datas = new HashMap<String, Object>();
datas.put("list", couponList);
datas.put("pagination", pagination);
result.setData(datas);
return result;
}
}
package com.servicemall.right.service;
import java.util.*;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import team.bangbang.common.CommonMPI;
import team.bangbang.common.data.KeyValue;
import team.bangbang.common.data.Pagination;
import com.servicemall.right.data.Coupon;
import com.servicemall.right.mapper.CouponMapper;
import org.springframework.stereotype.Service;
/**
* 优惠权益 - Service
*
* @author 帮帮组
* @version 1.0 2020-12-08
*/
@Service
public final class CouponService {
/* 优惠权益(Coupon)Mapper */
@Resource
private CouponMapper _couponMapper = null;
/* 设置static的Mapper对象,主要是为了兼顾Service层的static方法需要 */
private static CouponMapper couponMapper = null;
@PostConstruct
public void init() {
// 设置static的Mapper对象,主要是为了兼顾Service层的static方法需要
couponMapper = _couponMapper;
}
/**
* 得到指定的优惠权益
*
* @param id
* 指定的权益编号
* @return 优惠权益
*/
public static Coupon getObject(Long id) {
if(couponMapper == null) {
return null;
}
// 参数校验
if(id == null || id == 0L) {
return null;
}
// 查询条件
Coupon form = new Coupon();
form.setId(id);
return getObject(form, null);
}
/**
* 查询一条优惠权益,并转化为相应的POJO对象
*
* @param coupon
* 查询条件,不能为null
* @param appendix
* 附加限定条件
* @return 返回结果记录,并转化为相应的POJO对象
*/
public static Coupon getObject(Coupon coupon, String appendix) {
if(couponMapper == null) {
return null;
}
// 参数校验
if(coupon == null && (appendix == null || appendix.trim().length() == 0)) {
return null;
}
return couponMapper.getObject(coupon, appendix);
}
/**
* 插入一条优惠权益
*
* @param data
* 插入的数据,不能为null
* @return 1:成功 其它:失败
*/
public static int insert(Coupon data) {
if(couponMapper == null) {
return 0;
}
if (data.getId() == null) {
// 返回创建的关键字的值,如果是系统自动生成的,则此处不返回
long id = CommonMPI.generateSequenceId();
data.setId(id);
}
return couponMapper.insert(data);
}
/**
* 删除优惠权益
*
* @param where
* 删除条件,不能为null
* @param appendix
* 附加限定条件
* @return 成功删除的记录数量
*/
public static int delete(Coupon where, String appendix) {
if(couponMapper == null) {
return 0;
}
return couponMapper.delete(where, appendix);
}
/**
* 修改优惠权益
*
* @param where
* 更新条件,不能为null
* @param appendix
* 附加限定条件
* @param data
* 更新数据,不能为null
* @return 成功修改的记录数量
*/
public static int update(Coupon where, String appendix, Coupon data) {
if(couponMapper == null) {
return 0;
}
return couponMapper.update(where, appendix, data);
}
/**
* 查询多条优惠权益,并转化为相应的POJO对象列表
*
* @param where
* 更新条件,不能为null
* @param appendix
* 附加限定条件
* @param pagination
* 分页参数,如果分页参数为空,表示不分页
* @return 返回结果记录,并转化为相应的POJO对象列表
*/
public static List<Coupon> list(Coupon where, String appendix, Pagination pagination) {
if(couponMapper == null) {
return Collections.emptyList();
}
return couponMapper.list(where, appendix, pagination);
}
/**
* 获得符合条件的优惠权益数量
*
* @param where
* 查询条件,不能为null
* @param appendix
* 附加限定条件
* @return 返回记录数量
*/
public static int count(Coupon where, String appendix) {
if(couponMapper == null) {
return 0;
}
return couponMapper.count(where, appendix);
}
/**
* 获得有效期类型{1:按日期期间 2:按有效期}列表
*
* @return 有效期类型{1:按日期期间 2:按有效期}列表
*/
public static List<KeyValue> getActiveTypeList() {
return CommonMPI.getDictionaryList(Coupon.activeTypeFlags);
}
/**
* 获得核销类型{1:订单核销 2:快速核销}列表
*
* @return 核销类型{1:订单核销 2:快速核销}列表
*/
public static List<KeyValue> getUsedTypeList() {
return CommonMPI.getDictionaryList(Coupon.usedTypeFlags);
}
/**
* 获得是否可核销多次{1:是 2:否}列表
*
* @return 是否可核销多次{1:是 2:否}列表
*/
public static List<KeyValue> getUseNumTypeList() {
return CommonMPI.getDictionaryList(Coupon.useNumTypeFlags);
}
/**
* 获得每{1:不限制 2:年 3:季度 4:月}列表
*
* @return 每{1:不限制 2:年 3:季度 4:月}列表
*/
public static List<KeyValue> getPhaseTypeList() {
return CommonMPI.getDictionaryList(Coupon.phaseTypeFlags);
}
/**
* 获得权益类型{1:满减券金额类-整单减2:满减券金额类-每满减3:满减券产品类-整单减4:满减券产品类-每满减 5:折扣券6赠品券7免单券8代金券9动态折扣券}列表
*
* @return 权益类型{1:满减券金额类-整单减2:满减券金额类-每满减3:满减券产品类-整单减4:满减券产品类-每满减 5:折扣券6赠品券7免单券8代金券9动态折扣券}列表
*/
public static List<KeyValue> getRightTypeList() {
return CommonMPI.getDictionaryList(Coupon.rightTypeFlags);
}
public static List<Coupon> queryCouponList(String dms_code,Pagination pagination){
List<Coupon> couponList = new ArrayList<>();
Coupon coupon = new Coupon();
coupon.setActiveEndTime(new Date());
coupon.setActiveStartTime(new Date());
coupon.setRightName("代金券");
coupon.setUsedTypeFlag(1);
coupon.setTotalUseNum(-1);
coupon.setId(1l);
coupon.setSortValue(1);
Map<String,Integer> map = new HashMap<String,Integer>();
map.put("price",10);
coupon.setRightContent(map.toString());
couponList.add(coupon);
return couponList;
}
}
......@@ -23,6 +23,9 @@ public class Slider {
/* 轮播图图片地址 */
private String imageUrl = null;
/* 双击图片放大 */
private String dblclickImage = null;
/* 排序 */
private Integer sortNo = null;
......@@ -308,6 +311,14 @@ public class Slider {
this.createTimeBottom = createTimeBottom;
}
public String getDblclickImage() {
return dblclickImage;
}
public void setDblclickImage(String dblclickImage) {
this.dblclickImage = dblclickImage;
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
......
......@@ -6,7 +6,9 @@ import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import com.servicemall.website.service.SliderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
......@@ -43,15 +45,14 @@ public final class SliderMicro {
*
* @return 返回结果记录,并转化为相应的POJO对象列表
*/
@ApiOperation(value = "轮播图", notes = "首页轮播图", httpMethod = "POST")
@PostMapping("/slidelist")
@ResponseBody
public ResponseBase slidelist() {
DataResponse<Map<String, Object>> result = new DataResponse<Map<String, Object>>();
Map<String, Object> datas = new HashMap<String, Object>();
datas.put("list", "sliderList");
Slider slider = new Slider();
List<Slider> sliderList = SliderService.list();
datas.put("list", sliderList);
result.setData(datas);
return result;
......
package com.servicemall.website.service;
import com.servicemall.website.data.Slider;
import java.util.ArrayList;
import java.util.List;
/**
* 轮播图 - Service
*
* @author qiuli.feng
* @version 1.0 2020-12-08
*/
public class SliderService {
/**
* 查询轮播图
*/
public static List<Slider> list() {
List<Slider> sliderList = new ArrayList<>();
Slider slider = new Slider();
slider.setId(1l);
slider.setImageUrl("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1607427778447&di=b0d30539b93ff6e7394b9c80801e11c7&imgtype=0&src=http%3A%2F%2Fimg000.hc360.cn%2Fm6%2FM04%2F58%2F6A%2FwKhQolWVsnmEGYk8AAAAAIA_Z48561.jpg");
slider.setJumpUrl("轮胎");
slider.setSortNo(1);
sliderList.add(slider);
return sliderList;
}
}
......@@ -21,8 +21,8 @@ file.attachment.manager.qiniu.bucket=static
#file.attachment.manager.qiniu.root=http://static.nari.js.cn/
# database config (1)
application.druid.url=jdbc:postgresql://123.59.55.239:5432/sevicemall_dev
application.druid.driver-class=com.postgresql.jdbc.Driver
application.druid.url=jdbc:postgresql://123.59.55.239:5432/servicemall_dev
application.druid.driver-class=org.postgresql.Driver
application.druid.username=postgres
application.druid.password=postgres
application.druid.initial-size=1
......
......@@ -13,12 +13,14 @@
<resultMap id="planMap" type="com.servicemall.loyalty.data.Plan">
<id property="id" column="id"/>
<result property="loyaltyName" column="loyalty_name"/>
<result property="buyStartTime" column="buy_start_time"/>
<result property="buyEndTime" column="buy_end_time"/>
<result property="buyAmountLimit" column="buy_amount_limit"/>
<result property="selectedStatus" column="selected_status"/>
<result property="bindingUseStatus" column="binding_use_status"/>
<result property="factoryGuidePrice" column="factory_guide_price"/>
<result property="priceTypeFlag" column="price_type_flag"/>
<result property="uniformPrice" column="uniform_price"/>
<result property="selectedStatus" column="selected_status"/>
<result property="bindingUseStatus" column="binding_use_status"/>
<result property="payTypeFlag" column="pay_type_flag"/>
<result property="depositRatio" column="deposit_ratio"/>
<result property="depositPrice" column="deposit_price"/>
......@@ -26,16 +28,14 @@
<result property="cartEnableStatus" column="cart_enable_status"/>
<result property="description" column="description"/>
<result property="buyLimitDescription" column="buy_limit_description"/>
<result property="buyStartTime" column="buy_start_time"/>
<result property="buyEndTime" column="buy_end_time"/>
<result property="createAt" column="create_at"/>
<result property="updateAt" column="update_at"/>
<result property="planImage" column="plan_image"/>
<result property="activityImage" column="activity_image"/>
<result property="creatorId" column="creator_id"/>
<result property="updatorId" column="updator_id"/>
<result property="delStatus" column="del_status"/>
<result property="activeStatus" column="active_status"/>
<result property="createAt" column="create_at"/>
<result property="updateAt" column="update_at"/>
<result property="creatorId" column="creator_id"/>
<result property="updatorId" column="updator_id"/>
<!-- 对象数据嵌套 -->
<!--
......@@ -48,7 +48,7 @@
<!-- 查询单条礼遇计划信息 -->
<select id="getObject" resultMap="planMap">
SELECT
T1.id, T1.loyalty_name, T1.buy_amount_limit, T1.factory_guide_price, T1.price_type_flag, T1.uniform_price, T1.selected_status, T1.binding_use_status, T1.pay_type_flag, T1.deposit_ratio, T1.deposit_price, T1.apply_old, T1.cart_enable_status, T1.description, T1.buy_limit_description, T1.buy_start_time, T1.buy_end_time, T1.create_at, T1.update_at, T1.plan_image, T1.activity_image, T1.creator_id, T1.updator_id, T1.del_status, T1.active_status
T1.id, T1.loyalty_name, T1.buy_start_time, T1.buy_end_time, T1.buy_amount_limit, T1.selected_status, T1.binding_use_status, T1.factory_guide_price, T1.price_type_flag, T1.uniform_price, T1.pay_type_flag, T1.deposit_ratio, T1.deposit_price, T1.apply_old, T1.cart_enable_status, T1.description, T1.buy_limit_description, T1.plan_image, T1.activity_image, T1.del_status, T1.active_status, T1.create_at, T1.update_at, T1.creator_id, T1.updator_id
FROM loyalty_plan_base T1
<trim prefix="WHERE" prefixOverrides="AND|OR">
<choose>
......@@ -63,10 +63,26 @@
AND T1.loyalty_name = #{where.loyaltyName}
</if>
<if test="where != null and where.buyStartTime != null">
<![CDATA[ AND DATE_FORMAT(T1.buy_start_time, '%Y-%m-%d') = DATE_FORMAT(#{where.buyStartTime}, '%Y-%m-%d') ]]>
</if>
<if test="where != null and where.buyEndTime != null">
<![CDATA[ AND DATE_FORMAT(T1.buy_end_time, '%Y-%m-%d') = DATE_FORMAT(#{where.buyEndTime}, '%Y-%m-%d') ]]>
</if>
<if test="where != null and where.buyAmountLimit != null">
AND T1.buy_amount_limit = #{where.buyAmountLimit}
</if>
<if test="where != null and where.selectedStatus != null">
AND T1.selected_status = #{where.selectedStatus}
</if>
<if test="where != null and where.bindingUseStatus != null">
AND T1.binding_use_status = #{where.bindingUseStatus}
</if>
<if test="where != null and where.factoryGuidePrice != null">
AND T1.factory_guide_price = #{where.factoryGuidePrice}
</if>
......@@ -79,14 +95,6 @@
AND T1.uniform_price = #{where.uniformPrice}
</if>
<if test="where != null and where.selectedStatus != null">
AND T1.selected_status = #{where.selectedStatus}
</if>
<if test="where != null and where.bindingUseStatus != null">
AND T1.binding_use_status = #{where.bindingUseStatus}
</if>
<if test="where != null and where.payTypeFlag != null">
AND T1.pay_type_flag = #{where.payTypeFlag}
</if>
......@@ -115,28 +123,28 @@
AND T1.buy_limit_description = #{where.buyLimitDescription}
</if>
<if test="where != null and where.buyStartTime != null">
<![CDATA[ AND DATE_FORMAT(T1.buy_start_time, '%Y-%m-%d') = DATE_FORMAT(#{where.buyStartTime}, '%Y-%m-%d') ]]>
<if test="where != null and where.planImage != null and where.planImage != ''">
AND T1.plan_image = #{where.planImage}
</if>
<if test="where != null and where.buyEndTime != null">
<![CDATA[ AND DATE_FORMAT(T1.buy_end_time, '%Y-%m-%d') = DATE_FORMAT(#{where.buyEndTime}, '%Y-%m-%d') ]]>
<if test="where != null and where.activityImage != null and where.activityImage != ''">
AND T1.activity_image = #{where.activityImage}
</if>
<if test="where != null and where.createAt != null">
<![CDATA[ AND DATE_FORMAT(T1.create_at, '%Y-%m-%d') = DATE_FORMAT(#{where.createAt}, '%Y-%m-%d') ]]>
<if test="where != null and where.delStatus != null">
AND T1.del_status = #{where.delStatus}
</if>
<if test="where != null and where.updateAt != null">
<![CDATA[ AND DATE_FORMAT(T1.update_at, '%Y-%m-%d') = DATE_FORMAT(#{where.updateAt}, '%Y-%m-%d') ]]>
<if test="where != null and where.activeStatus != null">
AND T1.active_status = #{where.activeStatus}
</if>
<if test="where != null and where.planImage != null and where.planImage != ''">
AND T1.plan_image = #{where.planImage}
<if test="where != null and where.createAt != null">
<![CDATA[ AND DATE_FORMAT(T1.create_at, '%Y-%m-%d') = DATE_FORMAT(#{where.createAt}, '%Y-%m-%d') ]]>
</if>
<if test="where != null and where.activityImage != null and where.activityImage != ''">
AND T1.activity_image = #{where.activityImage}
<if test="where != null and where.updateAt != null">
<![CDATA[ AND DATE_FORMAT(T1.update_at, '%Y-%m-%d') = DATE_FORMAT(#{where.updateAt}, '%Y-%m-%d') ]]>
</if>
<if test="where != null and where.creatorId != null">
......@@ -147,27 +155,19 @@
AND T1.updator_id = #{where.updatorId}
</if>
<if test="where != null and where.delStatus != null">
AND T1.del_status = #{where.delStatus}
</if>
<if test="where != null and where.activeStatus != null">
AND T1.active_status = #{where.activeStatus}
</if>
<if test="appendix != null and appendix != ''">
AND ${appendix}
</if>
</otherwise>
</choose>
</trim>
ORDER BY T1.id DESC limit 0, 1
ORDER BY T1.id DESC limit 1 offset 0
</select>
<!-- 查询多条礼遇计划信息 -->
<select id="list" resultMap="planMap">
SELECT
T1.id, T1.loyalty_name, T1.buy_amount_limit, T1.factory_guide_price, T1.price_type_flag, T1.uniform_price, T1.selected_status, T1.binding_use_status, T1.pay_type_flag, T1.deposit_ratio, T1.deposit_price, T1.apply_old, T1.cart_enable_status, T1.description, T1.buy_limit_description, T1.buy_start_time, T1.buy_end_time, T1.create_at, T1.update_at, T1.plan_image, T1.activity_image, T1.creator_id, T1.updator_id, T1.del_status, T1.active_status
T1.id, T1.loyalty_name, T1.buy_start_time, T1.buy_end_time, T1.buy_amount_limit, T1.selected_status, T1.binding_use_status, T1.factory_guide_price, T1.price_type_flag, T1.uniform_price, T1.pay_type_flag, T1.deposit_ratio, T1.deposit_price, T1.apply_old, T1.cart_enable_status, T1.description, T1.buy_limit_description, T1.plan_image, T1.activity_image, T1.del_status, T1.active_status, T1.create_at, T1.update_at, T1.creator_id, T1.updator_id
FROM loyalty_plan_base T1
<trim prefix="WHERE" prefixOverrides="AND|OR">
<choose>
......@@ -182,10 +182,32 @@
AND T1.loyalty_name like concat('%', #{where.loyaltyName}, '%')
</if>
<if test="where != null and where.buyStartTimeTop != null">
<![CDATA[ AND DATE_FORMAT(T1.buy_start_time, '%Y-%m-%d %H:%i') <= DATE_FORMAT(#{where.buyStartTimeTop}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyStartTimeBottom != null">
<![CDATA[ AND DATE_FORMAT(T1.buy_start_time, '%Y-%m-%d %H:%i') >= DATE_FORMAT(#{where.buyStartTimeBottom}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyEndTimeTop != null">
<![CDATA[ AND DATE_FORMAT(T1.buy_end_time, '%Y-%m-%d %H:%i') <= DATE_FORMAT(#{where.buyEndTimeTop}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyEndTimeBottom != null">
<![CDATA[ AND DATE_FORMAT(T1.buy_end_time, '%Y-%m-%d %H:%i') >= DATE_FORMAT(#{where.buyEndTimeBottom}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyAmountLimit != null">
AND T1.buy_amount_limit = #{where.buyAmountLimit}
</if>
<if test="where != null and where.selectedStatus != null">
AND T1.selected_status = #{where.selectedStatus}
</if>
<if test="where != null and where.bindingUseStatus != null">
AND T1.binding_use_status = #{where.bindingUseStatus}
</if>
<if test="where != null and where.factoryGuidePrice != null">
AND T1.factory_guide_price = #{where.factoryGuidePrice}
</if>
......@@ -198,14 +220,6 @@
AND T1.uniform_price = #{where.uniformPrice}
</if>
<if test="where != null and where.selectedStatus != null">
AND T1.selected_status = #{where.selectedStatus}
</if>
<if test="where != null and where.bindingUseStatus != null">
AND T1.binding_use_status = #{where.bindingUseStatus}
</if>
<if test="where != null and where.payTypeFlag != null">
AND T1.pay_type_flag = #{where.payTypeFlag}
</if>
......@@ -234,18 +248,20 @@
AND T1.buy_limit_description like concat('%', #{where.buyLimitDescription}, '%')
</if>
<if test="where != null and where.buyStartTimeTop != null">
<![CDATA[ AND DATE_FORMAT(T1.buy_start_time, '%Y-%m-%d %H:%i') <= DATE_FORMAT(#{where.buyStartTimeTop}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.planImage != null and where.planImage != ''">
AND T1.plan_image like concat('%', #{where.planImage}, '%')
</if>
<if test="where != null and where.buyStartTimeBottom != null">
<![CDATA[ AND DATE_FORMAT(T1.buy_start_time, '%Y-%m-%d %H:%i') >= DATE_FORMAT(#{where.buyStartTimeBottom}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.activityImage != null and where.activityImage != ''">
AND T1.activity_image like concat('%', #{where.activityImage}, '%')
</if>
<if test="where != null and where.buyEndTimeTop != null">
<![CDATA[ AND DATE_FORMAT(T1.buy_end_time, '%Y-%m-%d %H:%i') <= DATE_FORMAT(#{where.buyEndTimeTop}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.delStatus != null">
AND T1.del_status = #{where.delStatus}
</if>
<if test="where != null and where.buyEndTimeBottom != null">
<![CDATA[ AND DATE_FORMAT(T1.buy_end_time, '%Y-%m-%d %H:%i') >= DATE_FORMAT(#{where.buyEndTimeBottom}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.activeStatus != null">
AND T1.active_status = #{where.activeStatus}
</if>
<if test="where != null and where.createAtTop != null">
......@@ -262,14 +278,6 @@
<![CDATA[ AND DATE_FORMAT(T1.update_at, '%Y-%m-%d %H:%i') >= DATE_FORMAT(#{where.updateAtBottom}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.planImage != null and where.planImage != ''">
AND T1.plan_image like concat('%', #{where.planImage}, '%')
</if>
<if test="where != null and where.activityImage != null and where.activityImage != ''">
AND T1.activity_image like concat('%', #{where.activityImage}, '%')
</if>
<if test="where != null and where.creatorId != null">
AND T1.creator_id = #{where.creatorId}
</if>
......@@ -278,14 +286,6 @@
AND T1.updator_id = #{where.updatorId}
</if>
<if test="where != null and where.delStatus != null">
AND T1.del_status = #{where.delStatus}
</if>
<if test="where != null and where.activeStatus != null">
AND T1.active_status = #{where.activeStatus}
</if>
<if test="appendix != null and appendix != ''">
AND ${appendix}
</if>
......@@ -301,7 +301,7 @@
<if test="pagination.dataSort.direction == -1">DESC</if>
</if>
<if test="pagination != null">
limit #{pagination.startPosition}, #{pagination.maxResults}
limit #{ pagination.maxResults} offset #{pagination.startPosition}
</if>
</select>
......@@ -323,10 +323,32 @@
AND loyalty_name like concat('%', #{where.loyaltyName}, '%')
</if>
<if test="where != null and where.buyStartTimeTop != null">
<![CDATA[ AND buy_start_time <= DATE_FORMAT(#{where.buyStartTimeTop}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyStartTimeBottom != null">
<![CDATA[ AND buy_start_time >= DATE_FORMAT(#{where.buyStartTimeBottom}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyEndTimeTop != null">
<![CDATA[ AND buy_end_time <= DATE_FORMAT(#{where.buyEndTimeTop}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyEndTimeBottom != null">
<![CDATA[ AND buy_end_time >= DATE_FORMAT(#{where.buyEndTimeBottom}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyAmountLimit != null">
AND buy_amount_limit = #{where.buyAmountLimit}
</if>
<if test="where != null and where.selectedStatus != null">
AND selected_status = #{where.selectedStatus}
</if>
<if test="where != null and where.bindingUseStatus != null">
AND binding_use_status = #{where.bindingUseStatus}
</if>
<if test="where != null and where.factoryGuidePrice != null">
AND factory_guide_price = #{where.factoryGuidePrice}
</if>
......@@ -339,14 +361,6 @@
AND uniform_price = #{where.uniformPrice}
</if>
<if test="where != null and where.selectedStatus != null">
AND selected_status = #{where.selectedStatus}
</if>
<if test="where != null and where.bindingUseStatus != null">
AND binding_use_status = #{where.bindingUseStatus}
</if>
<if test="where != null and where.payTypeFlag != null">
AND pay_type_flag = #{where.payTypeFlag}
</if>
......@@ -375,18 +389,20 @@
AND buy_limit_description like concat('%', #{where.buyLimitDescription}, '%')
</if>
<if test="where != null and where.buyStartTimeTop != null">
<![CDATA[ AND buy_start_time <= DATE_FORMAT(#{where.buyStartTimeTop}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.planImage != null and where.planImage != ''">
AND plan_image like concat('%', #{where.planImage}, '%')
</if>
<if test="where != null and where.buyStartTimeBottom != null">
<![CDATA[ AND buy_start_time >= DATE_FORMAT(#{where.buyStartTimeBottom}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.activityImage != null and where.activityImage != ''">
AND activity_image like concat('%', #{where.activityImage}, '%')
</if>
<if test="where != null and where.buyEndTimeTop != null">
<![CDATA[ AND buy_end_time <= DATE_FORMAT(#{where.buyEndTimeTop}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.delStatus != null">
AND del_status = #{where.delStatus}
</if>
<if test="where != null and where.buyEndTimeBottom != null">
<![CDATA[ AND buy_end_time >= DATE_FORMAT(#{where.buyEndTimeBottom}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.activeStatus != null">
AND active_status = #{where.activeStatus}
</if>
<if test="where != null and where.createAtTop != null">
......@@ -403,14 +419,6 @@
<![CDATA[ AND update_at >= DATE_FORMAT(#{where.updateAtBottom}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.planImage != null and where.planImage != ''">
AND plan_image like concat('%', #{where.planImage}, '%')
</if>
<if test="where != null and where.activityImage != null and where.activityImage != ''">
AND activity_image like concat('%', #{where.activityImage}, '%')
</if>
<if test="where != null and where.creatorId != null">
AND creator_id = #{where.creatorId}
</if>
......@@ -419,14 +427,6 @@
AND updator_id = #{where.updatorId}
</if>
<if test="where != null and where.delStatus != null">
AND del_status = #{where.delStatus}
</if>
<if test="where != null and where.activeStatus != null">
AND active_status = #{where.activeStatus}
</if>
<if test="appendix != null and appendix != ''">
AND ${appendix}
</if>
......@@ -437,24 +437,28 @@
<!-- 新增会员 -->
<insert id="insert">
INSERT INTO loyalty_plan_base(id, loyalty_name, buy_amount_limit, factory_guide_price, price_type_flag, uniform_price, selected_status, binding_use_status, pay_type_flag, deposit_ratio, deposit_price, apply_old, cart_enable_status, description, buy_limit_description, buy_start_time, buy_end_time, create_at, update_at, plan_image, activity_image, creator_id, updator_id, del_status, active_status)
INSERT INTO loyalty_plan_base(id, loyalty_name, buy_start_time, buy_end_time, buy_amount_limit, selected_status, binding_use_status, factory_guide_price, price_type_flag, uniform_price, pay_type_flag, deposit_ratio, deposit_price, apply_old, cart_enable_status, description, buy_limit_description, plan_image, activity_image, del_status, active_status, create_at, update_at, creator_id, updator_id)
VALUES (
#{data.id},
#{data.loyaltyName},
#{data.buyStartTime},
#{data.buyEndTime},
#{data.buyAmountLimit},
#{data.selectedStatus},
#{data.bindingUseStatus},
#{data.factoryGuidePrice},
#{data.priceTypeFlag},
#{data.uniformPrice},
#{data.selectedStatus},
#{data.bindingUseStatus},
#{data.payTypeFlag},
#{data.depositRatio},
......@@ -469,25 +473,21 @@
#{data.buyLimitDescription},
#{data.buyStartTime},
#{data.planImage},
#{data.buyEndTime},
#{data.activityImage},
#{data.createAt},
#{data.delStatus},
#{data.updateAt},
#{data.activeStatus},
#{data.planImage},
#{data.createAt},
#{data.activityImage},
#{data.updateAt},
#{data.creatorId},
#{data.updatorId},
#{data.delStatus},
#{data.activeStatus}
#{data.updatorId}
)
</insert>
......@@ -505,10 +505,26 @@
loyalty_name = #{data.loyaltyName},
</if>
<if test="data.buyStartTime != null">
buy_start_time = #{data.buyStartTime},
</if>
<if test="data.buyEndTime != null">
buy_end_time = #{data.buyEndTime},
</if>
<if test="data.buyAmountLimit != null">
buy_amount_limit = #{data.buyAmountLimit},
</if>
<if test="data.selectedStatus != null">
selected_status = #{data.selectedStatus},
</if>
<if test="data.bindingUseStatus != null">
binding_use_status = #{data.bindingUseStatus},
</if>
<if test="data.factoryGuidePrice != null">
factory_guide_price = #{data.factoryGuidePrice},
</if>
......@@ -521,14 +537,6 @@
uniform_price = #{data.uniformPrice},
</if>
<if test="data.selectedStatus != null">
selected_status = #{data.selectedStatus},
</if>
<if test="data.bindingUseStatus != null">
binding_use_status = #{data.bindingUseStatus},
</if>
<if test="data.payTypeFlag != null">
pay_type_flag = #{data.payTypeFlag},
</if>
......@@ -557,13 +565,21 @@
buy_limit_description = #{data.buyLimitDescription},
</if>
<if test="data.buyStartTime != null">
buy_start_time = #{data.buyStartTime},
</if>
<if test="data.planImage != null">
plan_image = #{data.planImage},
</if>
<if test="data.buyEndTime != null">
buy_end_time = #{data.buyEndTime},
</if>
<if test="data.activityImage != null">
activity_image = #{data.activityImage},
</if>
<if test="data.delStatus != null">
del_status = #{data.delStatus},
</if>
<if test="data.activeStatus != null">
active_status = #{data.activeStatus},
</if>
<if test="data.createAt != null">
create_at = #{data.createAt},
......@@ -573,14 +589,6 @@
update_at = #{data.updateAt},
</if>
<if test="data.planImage != null">
plan_image = #{data.planImage},
</if>
<if test="data.activityImage != null">
activity_image = #{data.activityImage},
</if>
<if test="data.creatorId != null">
creator_id = #{data.creatorId},
</if>
......@@ -589,14 +597,6 @@
updator_id = #{data.updatorId},
</if>
<if test="data.delStatus != null">
del_status = #{data.delStatus},
</if>
<if test="data.activeStatus != null">
active_status = #{data.activeStatus},
</if>
</trim>
<trim prefix="where" prefixOverrides="AND|OR">
<choose>
......@@ -611,10 +611,32 @@
AND loyalty_name = #{where.loyaltyName}
</if>
<if test="where != null and where.buyStartTimeTop != null">
<![CDATA[ AND buy_start_time <= DATE_FORMAT(#{where.buyStartTimeTop}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where.buyStartTimeBottom != null">
<![CDATA[ AND buy_start_time >= DATE_FORMAT(#{where.buyStartTimeBottom}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyEndTimeTop != null">
<![CDATA[ AND buy_end_time <= DATE_FORMAT(#{where.buyEndTimeTop}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where.buyEndTimeBottom != null">
<![CDATA[ AND buy_end_time >= DATE_FORMAT(#{where.buyEndTimeBottom}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyAmountLimit != null">
AND buy_amount_limit = #{where.buyAmountLimit}
</if>
<if test="where != null and where.selectedStatus != null">
AND selected_status = #{where.selectedStatus}
</if>
<if test="where != null and where.bindingUseStatus != null">
AND binding_use_status = #{where.bindingUseStatus}
</if>
<if test="where != null and where.factoryGuidePrice != null">
AND factory_guide_price = #{where.factoryGuidePrice}
</if>
......@@ -627,14 +649,6 @@
AND uniform_price = #{where.uniformPrice}
</if>
<if test="where != null and where.selectedStatus != null">
AND selected_status = #{where.selectedStatus}
</if>
<if test="where != null and where.bindingUseStatus != null">
AND binding_use_status = #{where.bindingUseStatus}
</if>
<if test="where != null and where.payTypeFlag != null">
AND pay_type_flag = #{where.payTypeFlag}
</if>
......@@ -663,18 +677,20 @@
AND buy_limit_description = #{where.buyLimitDescription}
</if>
<if test="where != null and where.buyStartTimeTop != null">
<![CDATA[ AND buy_start_time <= DATE_FORMAT(#{where.buyStartTimeTop}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.planImage != null">
AND plan_image = #{where.planImage}
</if>
<if test="where.buyStartTimeBottom != null">
<![CDATA[ AND buy_start_time >= DATE_FORMAT(#{where.buyStartTimeBottom}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.activityImage != null">
AND activity_image = #{where.activityImage}
</if>
<if test="where != null and where.buyEndTimeTop != null">
<![CDATA[ AND buy_end_time <= DATE_FORMAT(#{where.buyEndTimeTop}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.delStatus != null">
AND del_status = #{where.delStatus}
</if>
<if test="where.buyEndTimeBottom != null">
<![CDATA[ AND buy_end_time >= DATE_FORMAT(#{where.buyEndTimeBottom}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.activeStatus != null">
AND active_status = #{where.activeStatus}
</if>
<if test="where != null and where.createAtTop != null">
......@@ -691,14 +707,6 @@
<![CDATA[ AND update_at >= DATE_FORMAT(#{where.updateAtBottom}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.planImage != null">
AND plan_image = #{where.planImage}
</if>
<if test="where != null and where.activityImage != null">
AND activity_image = #{where.activityImage}
</if>
<if test="where != null and where.creatorId != null">
AND creator_id = #{where.creatorId}
</if>
......@@ -707,14 +715,6 @@
AND updator_id = #{where.updatorId}
</if>
<if test="where != null and where.delStatus != null">
AND del_status = #{where.delStatus}
</if>
<if test="where != null and where.activeStatus != null">
AND active_status = #{where.activeStatus}
</if>
<if test="appendix != null and appendix != ''">
AND ${appendix}
</if>
......@@ -739,10 +739,32 @@
AND loyalty_name = #{where.loyaltyName}
</if>
<if test="where != null and where.buyStartTimeTop != null">
<![CDATA[ AND buy_start_time <= DATE_FORMAT(#{where.buyStartTimeTop}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyStartTimeBottom != null">
<![CDATA[ AND buy_start_time >= DATE_FORMAT(#{where.buyStartTimeBottom}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyEndTimeTop != null">
<![CDATA[ AND buy_end_time <= DATE_FORMAT(#{where.buyEndTimeTop}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyEndTimeBottom != null">
<![CDATA[ AND buy_end_time >= DATE_FORMAT(#{where.buyEndTimeBottom}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.buyAmountLimit != null">
AND buy_amount_limit = #{where.buyAmountLimit}
</if>
<if test="where != null and where.selectedStatus != null">
AND selected_status = #{where.selectedStatus}
</if>
<if test="where != null and where.bindingUseStatus != null">
AND binding_use_status = #{where.bindingUseStatus}
</if>
<if test="where != null and where.factoryGuidePrice != null">
AND factory_guide_price = #{where.factoryGuidePrice}
</if>
......@@ -755,14 +777,6 @@
AND uniform_price = #{where.uniformPrice}
</if>
<if test="where != null and where.selectedStatus != null">
AND selected_status = #{where.selectedStatus}
</if>
<if test="where != null and where.bindingUseStatus != null">
AND binding_use_status = #{where.bindingUseStatus}
</if>
<if test="where != null and where.payTypeFlag != null">
AND pay_type_flag = #{where.payTypeFlag}
</if>
......@@ -791,18 +805,20 @@
AND buy_limit_description = #{where.buyLimitDescription}
</if>
<if test="where != null and where.buyStartTimeTop != null">
<![CDATA[ AND buy_start_time <= DATE_FORMAT(#{where.buyStartTimeTop}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.planImage != null">
AND plan_image = #{where.planImage}
</if>
<if test="where != null and where.buyStartTimeBottom != null">
<![CDATA[ AND buy_start_time >= DATE_FORMAT(#{where.buyStartTimeBottom}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.activityImage != null">
AND activity_image = #{where.activityImage}
</if>
<if test="where != null and where.buyEndTimeTop != null">
<![CDATA[ AND buy_end_time <= DATE_FORMAT(#{where.buyEndTimeTop}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.delStatus != null">
AND del_status = #{where.delStatus}
</if>
<if test="where != null and where.buyEndTimeBottom != null">
<![CDATA[ AND buy_end_time >= DATE_FORMAT(#{where.buyEndTimeBottom}, '%Y-%m-%d %H:%i') ]]>
<if test="where != null and where.activeStatus != null">
AND active_status = #{where.activeStatus}
</if>
<if test="where != null and where.createAtTop != null">
......@@ -819,14 +835,6 @@
<![CDATA[ AND update_at >= DATE_FORMAT(#{where.updateAtBottom}, '%Y-%m-%d %H:%i') ]]>
</if>
<if test="where != null and where.planImage != null">
AND plan_image = #{where.planImage}
</if>
<if test="where != null and where.activityImage != null">
AND activity_image = #{where.activityImage}
</if>
<if test="where != null and where.creatorId != null">
AND creator_id = #{where.creatorId}
</if>
......@@ -835,14 +843,6 @@
AND updator_id = #{where.updatorId}
</if>
<if test="where != null and where.delStatus != null">
AND del_status = #{where.delStatus}
</if>
<if test="where != null and where.activeStatus != null">
AND active_status = #{where.activeStatus}
</if>
<if test="appendix != null and appendix != ''">
AND ${appendix}
</if>
......
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