提交代码

dev-discount
胡锐 3 years ago
parent 1f5b177447
commit 38d1cfff3d
  1. 69
      hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java
  2. 11
      hai-cweb/src/main/java/com/cweb/controller/pay/UnionPayController.java
  3. 15
      hai-order/pom.xml
  4. 110
      hai-order/src/main/java/com/cweb/config/RedisConfig.java
  5. 23
      hai-order/src/main/java/com/cweb/config/SentinelFilterConfig.java
  6. 44
      hai-order/src/main/java/com/cweb/controller/LoginController.java
  7. 16
      hai-order/src/main/resources/dev/application.yml
  8. 8
      hai-order/src/main/resources/dev/web.xml
  9. 17
      hai-service/src/main/java/com/hai/dao/OutRechargePriceMapper.java
  10. 30
      hai-service/src/main/java/com/hai/dao/OutRechargePriceSqlProvider.java
  11. 36
      hai-service/src/main/java/com/hai/entity/OutRechargePrice.java
  12. 108
      hai-service/src/main/java/com/hai/entity/OutRechargePriceExample.java

@ -388,6 +388,75 @@ public class OrderController {
} }
} }
@RequestMapping(value="/unionPay",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "银联支付")
public ResponseData unionPay(@RequestBody String reqBodyStr,HttpServletRequest request) {
try {
// 用户
SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
if (StringUtils.isBlank(reqBodyStr)) {
log.error("orderToPay error!", "参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
JSONObject jsonObject = JSONObject.parseObject(reqBodyStr);
Long orderId = jsonObject.getLong("orderId");
if (orderId == null) {
log.error("orderToPay error!", "参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
HighOrder order = highOrderService.getOrderById(orderId);
if(order == null) {
log.error("OrderController --> orderToPay() ERROR", "未找到订单信息");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_ORDER, "");
}
//校验订单状态 订单状态:1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消
if(order.getOrderStatus() != 1) {
log.error("OrderController --> orderToPay() ERROR", "订单不处于待支付状态");
throw ErrorHelp.genException(SysCode.System, ErrorCode.ORDER_NO_STAY_PAY, "");
}
/* // 商品类型 1:卡卷 2:金币充值
for (HighChildOrder childOrder : order.getHighChildOrderList()) {
if (childOrder.getGoodsType() == 2) {
HighCoupon coupon = highCouponService.getCouponById(childOrder.getGoodsId());
// 支付类型:1.微信支付 2.金币支付
if (coupon.getPayType() != 2) {
log.error("OrderController --> orderToPay() ERROR", "只支持积分支付");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, coupon.getCouponName() + ",只支持积分支付");
}
}
}*/
new Thread(() -> {
// 查询订单信息
if (order == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_ORDER, "");
}
HighUser highUser = highUserService.findByUserId(order.getMemId());
HighChildOrder presentation = highOrderService.getChildOrderByPresentation(order.getId());
WxMsgConfig.pushOneUser(
presentation.getGoodsName() + "(" + GoodsType.getNameByType(presentation.getGoodsType()) + ")",
String.valueOf(order.getPayPrice()),
order.getOrderNo(),
order.getPayTime(),
PayType.getNameByType(order.getPayType()), order.getId(),
highUser.getOpenId());
}).start();
return ResponseMsgUtil.success("支付成功");
} catch (Exception e) {
log.error("orderToPay error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/qzOrderToPay",method = RequestMethod.POST) @RequestMapping(value="/qzOrderToPay",method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ApiOperation(value = "千猪订单支付发起支付") @ApiOperation(value = "千猪订单支付发起支付")

@ -0,0 +1,11 @@
package com.cweb.controller.pay;
import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping(value = "/unionPay")
@Api(value = "银联支付")
public class UnionPayController {
}

@ -18,6 +18,21 @@
<artifactId>hai-service</artifactId> <artifactId>hai-service</artifactId>
<version>PACKT-SNAPSHOT</version> <version>PACKT-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-core</artifactId>
<version>1.8.2</version>
</dependency>
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-transport-simple-http</artifactId>
<version>1.8.2</version>
</dependency>
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-web-servlet</artifactId>
<version>1.8.2</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

@ -0,0 +1,110 @@
package com.cweb.config;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.*;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
@Configuration
@EnableCaching //开启注解
public class RedisConfig extends CachingConfigurerSupport {
/**
* retemplate相关配置
* @param factory
* @return
*/
@Bean
public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {
RedisTemplate<String, Object> template = new RedisTemplate<>();
// 配置连接工厂
template.setConnectionFactory(factory);
//使用Jackson2JsonRedisSerializer来序列化和反序列化redis的value值(默认使用JDK的序列化方式)
Jackson2JsonRedisSerializer jacksonSeial = new Jackson2JsonRedisSerializer(Object.class);
ObjectMapper om = new ObjectMapper();
// 指定要序列化的域,field,get和set,以及修饰符范围,ANY是都有包括private和public
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
// 指定序列化输入的类型,类必须是非final修饰的,final修饰的类,比如String,Integer等会跑出异常
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
jacksonSeial.setObjectMapper(om);
// 值采用json序列化
template.setValueSerializer(jacksonSeial);
//使用StringRedisSerializer来序列化和反序列化redis的key值
template.setKeySerializer(new StringRedisSerializer());
// 设置hash key 和value序列化模式
template.setHashKeySerializer(new StringRedisSerializer());
template.setHashValueSerializer(jacksonSeial);
template.afterPropertiesSet();
return template;
}
/**
* 对hash类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public HashOperations<String, String, Object> hashOperations(RedisTemplate<String, Object> redisTemplate) {
return redisTemplate.opsForHash();
}
/**
* 对redis字符串类型数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public ValueOperations<String, Object> valueOperations(RedisTemplate<String, Object> redisTemplate) {
return redisTemplate.opsForValue();
}
/**
* 对链表类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public ListOperations<String, Object> listOperations(RedisTemplate<String, Object> redisTemplate) {
return redisTemplate.opsForList();
}
/**
* 对无序集合类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public SetOperations<String, Object> setOperations(RedisTemplate<String, Object> redisTemplate) {
return redisTemplate.opsForSet();
}
/**
* 对有序集合类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public ZSetOperations<String, Object> zSetOperations(RedisTemplate<String, Object> redisTemplate) {
return redisTemplate.opsForZSet();
}
}

@ -0,0 +1,23 @@
package com.cweb.config;
import com.alibaba.csp.sentinel.adapter.servlet.CommonFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.Filter;
@Configuration
public class SentinelFilterConfig {
@Bean
public FilterRegistrationBean sentinelFilterRegistration() {
FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<>();
registration.setFilter(new CommonFilter());
registration.addUrlPatterns("/*");
registration.setName("sentinelFilter");
registration.setOrder(1);
return registration;
}
}

@ -1,11 +1,21 @@
package com.cweb.controller; package com.cweb.controller;
import com.alibaba.csp.sentinel.Entry;
import com.alibaba.csp.sentinel.SphU;
import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.alibaba.csp.sentinel.slots.block.RuleConstant;
import com.alibaba.csp.sentinel.slots.block.flow.FlowRule;
import com.alibaba.csp.sentinel.slots.block.flow.FlowRuleManager;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import java.util.ArrayList;
import java.util.List;
@Controller @Controller
@RequestMapping(value = "/login") @RequestMapping(value = "/login")
@Api(value = "登录") @Api(value = "登录")
@ -13,5 +23,39 @@ public class LoginController {
private static Logger log = LoggerFactory.getLogger(LoginController.class); private static Logger log = LoggerFactory.getLogger(LoginController.class);
@SentinelResource("HelloWorld")
public void helloWorld() {
// 资源中的逻辑
System.out.println("hello world");
}
public static void main(String[] args) {
// 配置规则.
initFlowRules();
int i = 0;
while (i <= 100) {
i++;
// 1.5.0 版本开始可以直接利用 try-with-resources 特性
try (Entry entry = SphU.entry("HelloWorld")) {
// 被保护的逻辑
System.out.println("hello world");
} catch (BlockException ex) {
// 处理被流控的逻辑
System.out.println("blocked!");
}
}
}
private static void initFlowRules(){
List<FlowRule> rules = new ArrayList<>();
FlowRule rule = new FlowRule();
rule.setResource("HelloWorld");
rule.setGrade(RuleConstant.FLOW_GRADE_QPS);
// Set limit QPS to 20.
rule.setCount(20);
rules.add(rule);
FlowRuleManager.loadRules(rules);
}
} }

@ -1,7 +1,7 @@
server: server:
port: 9302 port: 9304
servlet: servlet:
context-path: /brest context-path: /order
#配置是否为debug模式,debug模式下,不开启权限校验 #配置是否为debug模式,debug模式下,不开启权限校验
debug: true debug: true
@ -27,6 +27,18 @@ spring:
testOnReturn: false testOnReturn: false
poolPreparedStatements: true poolPreparedStatements: true
maxOpenPreparedStatements: 20 maxOpenPreparedStatements: 20
redis:
database: 0
host: 139.159.177.244
port: 36379
password: HF123456.Redis
timeout: 1000
jedis:
pool:
max-active: 20
max-wait: -1
max-idle: 10
min-idle: 0
#配置日期返回至前台为时间戳 #配置日期返回至前台为时间戳
jackson: jackson:
serialization: serialization:

@ -0,0 +1,8 @@
<filter>
<filter-name>SentinelCommonFilter</filter-name>
<filter-class>com.alibaba.csp.sentinel.adapter.servlet.CommonFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>SentinelCommonFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

@ -41,10 +41,12 @@ public interface OutRechargePriceMapper extends OutRechargePriceMapperExt {
@Insert({ @Insert({
"insert into out_recharge_price (`type`, price, ", "insert into out_recharge_price (`type`, price, ",
"real_price, create_time, ", "real_price, create_time, ",
"goods_id, discount, channel)", "goods_id, discount, sort, ",
"`status`)",
"values (#{type,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, ", "values (#{type,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, ",
"#{realPrice,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, ", "#{realPrice,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{goodsId,jdbcType=BIGINT}, #{discount,jdbcType=REAL}, #{channel,jdbcType=BIGINT})" "#{goodsId,jdbcType=BIGINT}, #{discount,jdbcType=REAL}, #{sort,jdbcType=INTEGER}, ",
"#{status,jdbcType=INTEGER})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(OutRechargePrice record); int insert(OutRechargePrice record);
@ -62,13 +64,14 @@ public interface OutRechargePriceMapper extends OutRechargePriceMapperExt {
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
@Result(column="discount", property="discount", jdbcType=JdbcType.REAL), @Result(column="discount", property="discount", jdbcType=JdbcType.REAL),
@Result(column="channel", property="channel", jdbcType=JdbcType.BIGINT) @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER)
}) })
List<OutRechargePrice> selectByExample(OutRechargePriceExample example); List<OutRechargePrice> selectByExample(OutRechargePriceExample example);
@Select({ @Select({
"select", "select",
"id, `type`, price, real_price, create_time, goods_id, discount, channel", "id, `type`, price, real_price, create_time, goods_id, discount, sort, `status`",
"from out_recharge_price", "from out_recharge_price",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -80,7 +83,8 @@ public interface OutRechargePriceMapper extends OutRechargePriceMapperExt {
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
@Result(column="discount", property="discount", jdbcType=JdbcType.REAL), @Result(column="discount", property="discount", jdbcType=JdbcType.REAL),
@Result(column="channel", property="channel", jdbcType=JdbcType.BIGINT) @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER)
}) })
OutRechargePrice selectByPrimaryKey(Long id); OutRechargePrice selectByPrimaryKey(Long id);
@ -101,7 +105,8 @@ public interface OutRechargePriceMapper extends OutRechargePriceMapperExt {
"create_time = #{createTime,jdbcType=TIMESTAMP},", "create_time = #{createTime,jdbcType=TIMESTAMP},",
"goods_id = #{goodsId,jdbcType=BIGINT},", "goods_id = #{goodsId,jdbcType=BIGINT},",
"discount = #{discount,jdbcType=REAL},", "discount = #{discount,jdbcType=REAL},",
"channel = #{channel,jdbcType=BIGINT}", "sort = #{sort,jdbcType=INTEGER},",
"`status` = #{status,jdbcType=INTEGER}",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
int updateByPrimaryKey(OutRechargePrice record); int updateByPrimaryKey(OutRechargePrice record);

@ -52,8 +52,12 @@ public class OutRechargePriceSqlProvider {
sql.VALUES("discount", "#{discount,jdbcType=REAL}"); sql.VALUES("discount", "#{discount,jdbcType=REAL}");
} }
if (record.getChannel() != null) { if (record.getSort() != null) {
sql.VALUES("channel", "#{channel,jdbcType=BIGINT}"); sql.VALUES("sort", "#{sort,jdbcType=INTEGER}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
} }
return sql.toString(); return sql.toString();
@ -72,7 +76,8 @@ public class OutRechargePriceSqlProvider {
sql.SELECT("create_time"); sql.SELECT("create_time");
sql.SELECT("goods_id"); sql.SELECT("goods_id");
sql.SELECT("discount"); sql.SELECT("discount");
sql.SELECT("channel"); sql.SELECT("sort");
sql.SELECT("`status`");
sql.FROM("out_recharge_price"); sql.FROM("out_recharge_price");
applyWhere(sql, example, false); applyWhere(sql, example, false);
@ -118,8 +123,12 @@ public class OutRechargePriceSqlProvider {
sql.SET("discount = #{record.discount,jdbcType=REAL}"); sql.SET("discount = #{record.discount,jdbcType=REAL}");
} }
if (record.getChannel() != null) { if (record.getSort() != null) {
sql.SET("channel = #{record.channel,jdbcType=BIGINT}"); sql.SET("sort = #{record.sort,jdbcType=INTEGER}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
} }
applyWhere(sql, example, true); applyWhere(sql, example, true);
@ -137,7 +146,8 @@ public class OutRechargePriceSqlProvider {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}");
sql.SET("discount = #{record.discount,jdbcType=REAL}"); sql.SET("discount = #{record.discount,jdbcType=REAL}");
sql.SET("channel = #{record.channel,jdbcType=BIGINT}"); sql.SET("sort = #{record.sort,jdbcType=INTEGER}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
OutRechargePriceExample example = (OutRechargePriceExample) parameter.get("example"); OutRechargePriceExample example = (OutRechargePriceExample) parameter.get("example");
applyWhere(sql, example, true); applyWhere(sql, example, true);
@ -172,8 +182,12 @@ public class OutRechargePriceSqlProvider {
sql.SET("discount = #{discount,jdbcType=REAL}"); sql.SET("discount = #{discount,jdbcType=REAL}");
} }
if (record.getChannel() != null) { if (record.getSort() != null) {
sql.SET("channel = #{channel,jdbcType=BIGINT}"); sql.SET("sort = #{sort,jdbcType=INTEGER}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
} }
sql.WHERE("id = #{id,jdbcType=BIGINT}"); sql.WHERE("id = #{id,jdbcType=BIGINT}");

@ -20,7 +20,7 @@ public class OutRechargePrice implements Serializable {
private Long id; private Long id;
/** /**
* 1 话费充值 2. 中石化 3. 中石油 * 1 电信 2.移动 3.联通
*/ */
private Integer type; private Integer type;
@ -50,9 +50,14 @@ public class OutRechargePrice implements Serializable {
private Float discount; private Float discount;
/** /**
* 提供商编号 * 排序
*/ */
private Long channel; private Integer sort;
/**
* 0下架 1上线
*/
private Integer status;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -112,12 +117,20 @@ public class OutRechargePrice implements Serializable {
this.discount = discount; this.discount = discount;
} }
public Long getChannel() { public Integer getSort() {
return channel; return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Integer getStatus() {
return status;
} }
public void setChannel(Long channel) { public void setStatus(Integer status) {
this.channel = channel; this.status = status;
} }
@Override @Override
@ -139,7 +152,8 @@ public class OutRechargePrice implements Serializable {
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId())) && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
&& (this.getDiscount() == null ? other.getDiscount() == null : this.getDiscount().equals(other.getDiscount())) && (this.getDiscount() == null ? other.getDiscount() == null : this.getDiscount().equals(other.getDiscount()))
&& (this.getChannel() == null ? other.getChannel() == null : this.getChannel().equals(other.getChannel())); && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
} }
@Override @Override
@ -153,7 +167,8 @@ public class OutRechargePrice implements Serializable {
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
result = prime * result + ((getDiscount() == null) ? 0 : getDiscount().hashCode()); result = prime * result + ((getDiscount() == null) ? 0 : getDiscount().hashCode());
result = prime * result + ((getChannel() == null) ? 0 : getChannel().hashCode()); result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
return result; return result;
} }
@ -170,7 +185,8 @@ public class OutRechargePrice implements Serializable {
sb.append(", createTime=").append(createTime); sb.append(", createTime=").append(createTime);
sb.append(", goodsId=").append(goodsId); sb.append(", goodsId=").append(goodsId);
sb.append(", discount=").append(discount); sb.append(", discount=").append(discount);
sb.append(", channel=").append(channel); sb.append(", sort=").append(sort);
sb.append(", status=").append(status);
sb.append(", serialVersionUID=").append(serialVersionUID); sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();

@ -546,63 +546,123 @@ public class OutRechargePriceExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andChannelIsNull() { public Criteria andSortIsNull() {
addCriterion("channel is null"); addCriterion("sort is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andChannelIsNotNull() { public Criteria andSortIsNotNull() {
addCriterion("channel is not null"); addCriterion("sort is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andChannelEqualTo(Long value) { public Criteria andSortEqualTo(Integer value) {
addCriterion("channel =", value, "channel"); addCriterion("sort =", value, "sort");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andChannelNotEqualTo(Long value) { public Criteria andSortNotEqualTo(Integer value) {
addCriterion("channel <>", value, "channel"); addCriterion("sort <>", value, "sort");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andChannelGreaterThan(Long value) { public Criteria andSortGreaterThan(Integer value) {
addCriterion("channel >", value, "channel"); addCriterion("sort >", value, "sort");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andChannelGreaterThanOrEqualTo(Long value) { public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("channel >=", value, "channel"); addCriterion("sort >=", value, "sort");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andChannelLessThan(Long value) { public Criteria andSortLessThan(Integer value) {
addCriterion("channel <", value, "channel"); addCriterion("sort <", value, "sort");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andChannelLessThanOrEqualTo(Long value) { public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("channel <=", value, "channel"); addCriterion("sort <=", value, "sort");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andChannelIn(List<Long> values) { public Criteria andSortIn(List<Integer> values) {
addCriterion("channel in", values, "channel"); addCriterion("sort in", values, "sort");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andChannelNotIn(List<Long> values) { public Criteria andSortNotIn(List<Integer> values) {
addCriterion("channel not in", values, "channel"); addCriterion("sort not in", values, "sort");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andChannelBetween(Long value1, Long value2) { public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("channel between", value1, value2, "channel"); addCriterion("sort between", value1, value2, "sort");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andChannelNotBetween(Long value1, Long value2) { public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("channel not between", value1, value2, "channel"); addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("`status` is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("`status` is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("`status` =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("`status` <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("`status` >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("`status` >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("`status` <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("`status` <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("`status` in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("`status` not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("`status` between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("`status` not between", value1, value2, "status");
return (Criteria) this; return (Criteria) this;
} }
} }

Loading…
Cancel
Save