Commit 3459a90f authored by joy's avatar joy

增加查询条件

parent 16ad5b47
package cn.iocoder.yudao.framework.common.pojo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* @author Administrator
*/
@ApiModel("时间段")
@Data
public class TimeSlot {
@ApiModelProperty(value = "开始时间", required = false)
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String after;
@ApiModelProperty(value = "结束时间", required = false)
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String before;
}
......@@ -195,6 +195,25 @@ public interface OfferMapper extends BaseMapperX<OfferDO> {
"<when test = 'pageVO.beginEndTime != null and pageVO.endEndTime != null '>",
"AND o.`end_time` between #{pageVO.beginEndTime} and #{pageVO.endEndTime}",
"</when>",
"<when test = 'pageVO.expired != null and pageVO.expired.after != null and pageVO.expired.before != null'>",
"AND o.`end_time` between #{pageVO.expired.after} and #{pageVO.expired.before}",
"</when>",
"<when test = 'pageVO.importances != null and pageVO.importances.size() > 0'>",
"AND o.`importance` IN ",
"<foreach item='importance' collection='pageVO.importances' open='(' close=')' separator=','> #{importance} </foreach>)",
"</when>",
"<when test = 'pageVO.salesmanIds != null and pageVO.salesmanIds.size() > 0'>",
"AND o.`follow_up_salesman_id` IN ",
"<foreach item='id' collection='pageVO.salesmanIds' open='(' close=')' separator=','> #{id} </foreach>)",
"</when>",
"<when test = 'pageVO.statusList != null and pageVO.statusList.size() > 0'>",
"AND o.`status` IN ",
"<foreach item='it' collection='pageVO.statusList' open='(' close=')' separator=','> #{it} </foreach>)",
"</when>",
"<when test = 'pageVO.channelIds != null and pageVO.channelIds.size() > 0'>",
"AND o.`channel_id` IN ",
"<foreach item='it' collection='pageVO.channelIds' open='(' close=')' separator=','> #{it} </foreach>)",
"</when>",
"<when test = 'pageVO.beginStopTime != null and pageVO.endStopTime != null '>",
"AND o.`stop_time` between #{pageVO.beginStopTime} and #{pageVO.endStopTime}",
"</when>",
......@@ -303,6 +322,25 @@ public interface OfferMapper extends BaseMapperX<OfferDO> {
"<when test = 'pageVO.beginStopTime != null and pageVO.endStopTime != null '>",
"AND o.`stop_time` between #{pageVO.beginStopTime} and #{pageVO.endStopTime}",
"</when>",
"<when test = 'pageVO.expired != null and pageVO.expired.after != null and pageVO.expired.before != null'>",
"AND o.`end_time` between #{pageVO.expired.after} and #{pageVO.expired.before}",
"</when>",
"<when test = 'pageVO.importances != null and pageVO.importances.size() > 0'>",
"AND o.`importance` IN ",
"<foreach item='importance' collection='pageVO.importances' open='(' close=')' separator=','> #{importance} </foreach>)",
"</when>",
"<when test = 'pageVO.salesmanIds != null and pageVO.salesmanIds.size() > 0'>",
"AND o.`follow_up_salesman_id` IN ",
"<foreach item='id' collection='pageVO.salesmanIds' open='(' close=')' separator=','> #{id} </foreach>)",
"</when>",
"<when test = 'pageVO.statusList != null and pageVO.statusList.size() > 0'>",
"AND o.`status` IN ",
"<foreach item='it' collection='pageVO.statusList' open='(' close=')' separator=','> #{it} </foreach>)",
"</when>",
"<when test = 'pageVO.channelIds != null and pageVO.channelIds.size() > 0'>",
"AND o.`channel_id` IN ",
"<foreach item='it' collection='pageVO.channelIds' open='(' close=')' separator=','> #{it} </foreach>)",
"</when>",
"<when test = 'pageVO.relationId != null'>",
"AND o.`relation_id` = #{pageVO.relationId}",
"</when>",
......
package cn.iocoder.yudao.module.sale.vo.offer;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.TimeSlot;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
......@@ -175,4 +177,19 @@ public class OfferPageReqVO extends PageParam {
@ApiModelProperty(value = "目的仓ID集合")
private List<Long> destWarehouseIds;
@ApiModelProperty(value = "有效期")
private TimeSlot expired;
@ApiModelProperty(value = "重要程度")
private List<Integer> importances;
@ApiModelProperty(value = "客户经理列表")
private List<Long> salesmanIds;
@ApiModelProperty(value = "阶段列表")
private List<Integer> statusList;
@ApiModelProperty(value = "出货渠道列表")
private List<Long> channelIds;
}
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