commit
ee79b19d20
@ -48,6 +48,11 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
|
||||
"iv",
|
||||
"mail",
|
||||
"sell",
|
||||
"id",
|
||||
"price",
|
||||
"prop",
|
||||
"reply",
|
||||
"profile",
|
||||
"privateKey",
|
||||
"wechatpay",
|
||||
};
|
||||
|
@ -63,7 +63,7 @@ public class ElasticsearchConfig extends AbstractElasticsearchConfiguration {
|
||||
restBuilder.setRequestConfigCallback(requestConfigBuilder ->
|
||||
requestConfigBuilder.setConnectTimeout(1000) //time until a connection with the server is established.
|
||||
.setSocketTimeout(12 * 1000) //time of inactivity to wait for packets[data] to receive.
|
||||
.setConnectionRequestTimeout(2 * 1000)); //time to fetch a connection from the connection pool 0 for infinite.
|
||||
.setConnectionRequestTimeout(-1)); //time to fetch a connection from the connection pool 0 for infinite.
|
||||
|
||||
client = new RestHighLevelClient(restBuilder);
|
||||
return client;
|
||||
|
@ -131,9 +131,9 @@ public class GoodsSearchParams extends PageVO {
|
||||
if (CharSequenceUtil.isNotEmpty(price)) {
|
||||
String[] s = price.split("_");
|
||||
if (s.length > 1) {
|
||||
queryWrapper.ge("price", s[1]);
|
||||
queryWrapper.between("price", s[0], s[1]);
|
||||
} else {
|
||||
queryWrapper.le("price", s[0]);
|
||||
queryWrapper.ge("price", s[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
package cn.lili.modules.order.aftersale.entity.vo;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.security.enums.UserEnums;
|
||||
import cn.lili.common.utils.StringUtils;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
@ -17,6 +18,7 @@ import java.util.Date;
|
||||
* @author paulG
|
||||
* @since 2020/12/4
|
||||
**/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class AfterSaleSearchParams extends PageVO {
|
||||
|
||||
@ -44,6 +46,9 @@ public class AfterSaleSearchParams extends PageVO {
|
||||
@ApiModelProperty(value = "实际退款金额,可以为范围,如10_1000")
|
||||
private String actualRefundPrice;
|
||||
|
||||
@ApiModelProperty(value = "总价格,可以为范围,如10_1000")
|
||||
private String flowPrice;
|
||||
|
||||
/**
|
||||
* @see cn.lili.modules.order.trade.entity.enums.AfterSaleTypeEnum
|
||||
*/
|
||||
@ -66,33 +71,33 @@ public class AfterSaleSearchParams extends PageVO {
|
||||
|
||||
public <T> QueryWrapper<T> queryWrapper() {
|
||||
QueryWrapper<T> queryWrapper = new QueryWrapper<>();
|
||||
if (StringUtils.isNotEmpty(sn)) {
|
||||
if (CharSequenceUtil.isNotEmpty(sn)) {
|
||||
queryWrapper.like("sn", sn);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(orderSn)) {
|
||||
if (CharSequenceUtil.isNotEmpty(orderSn)) {
|
||||
queryWrapper.like("order_sn", orderSn);
|
||||
}
|
||||
//按买家查询
|
||||
if (StringUtils.equals(UserContext.getCurrentUser().getRole().name(), UserEnums.MEMBER.name())) {
|
||||
if (CharSequenceUtil.equals(UserContext.getCurrentUser().getRole().name(), UserEnums.MEMBER.name())) {
|
||||
queryWrapper.eq("member_id", UserContext.getCurrentUser().getId());
|
||||
}
|
||||
//按卖家查询
|
||||
if (StringUtils.equals(UserContext.getCurrentUser().getRole().name(), UserEnums.STORE.name())) {
|
||||
if (CharSequenceUtil.equals(UserContext.getCurrentUser().getRole().name(), UserEnums.STORE.name())) {
|
||||
queryWrapper.eq("store_id", UserContext.getCurrentUser().getStoreId());
|
||||
}
|
||||
|
||||
if (StringUtils.equals(UserContext.getCurrentUser().getRole().name(), UserEnums.MANAGER.name())
|
||||
&& StringUtils.isNotEmpty(storeId)
|
||||
if (CharSequenceUtil.equals(UserContext.getCurrentUser().getRole().name(), UserEnums.MANAGER.name())
|
||||
&& CharSequenceUtil.isNotEmpty(storeId)
|
||||
) {
|
||||
queryWrapper.eq("store_id", storeId);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(memberName)) {
|
||||
if (CharSequenceUtil.isNotEmpty(memberName)) {
|
||||
queryWrapper.like("member_name", memberName);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(storeName)) {
|
||||
if (CharSequenceUtil.isNotEmpty(storeName)) {
|
||||
queryWrapper.like("store_name", storeName);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(goodsName)) {
|
||||
if (CharSequenceUtil.isNotEmpty(goodsName)) {
|
||||
queryWrapper.like("goods_name", goodsName);
|
||||
}
|
||||
//按时间查询
|
||||
@ -102,10 +107,10 @@ public class AfterSaleSearchParams extends PageVO {
|
||||
if (endDate != null) {
|
||||
queryWrapper.le("create_time", endDate);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(serviceStatus)) {
|
||||
if (CharSequenceUtil.isNotEmpty(serviceStatus)) {
|
||||
queryWrapper.eq("service_status", serviceStatus);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(serviceType)) {
|
||||
if (CharSequenceUtil.isNotEmpty(serviceType)) {
|
||||
queryWrapper.eq("service_type", serviceType);
|
||||
}
|
||||
this.betweenWrapper(queryWrapper);
|
||||
@ -114,20 +119,28 @@ public class AfterSaleSearchParams extends PageVO {
|
||||
}
|
||||
|
||||
private <T> void betweenWrapper(QueryWrapper<T> queryWrapper) {
|
||||
if (StringUtils.isNotEmpty(applyRefundPrice)) {
|
||||
if (CharSequenceUtil.isNotEmpty(applyRefundPrice)) {
|
||||
String[] s = applyRefundPrice.split("_");
|
||||
if (s.length > 1) {
|
||||
queryWrapper.ge("apply_refund_price", s[1]);
|
||||
queryWrapper.between("apply_refund_price", s[0], s[1]);
|
||||
} else {
|
||||
queryWrapper.le("apply_refund_price", s[0]);
|
||||
queryWrapper.ge("apply_refund_price", s[0]);
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(actualRefundPrice)) {
|
||||
if (CharSequenceUtil.isNotEmpty(actualRefundPrice)) {
|
||||
String[] s = actualRefundPrice.split("_");
|
||||
if (s.length > 1) {
|
||||
queryWrapper.ge("actual_refund_price", s[1]);
|
||||
queryWrapper.between("actual_refund_price", s[0], s[1]);
|
||||
} else {
|
||||
queryWrapper.le("actual_refund_price", s[0]);
|
||||
queryWrapper.ge("actual_refund_price", s[0]);
|
||||
}
|
||||
}
|
||||
if (CharSequenceUtil.isNotEmpty(flowPrice)) {
|
||||
String[] s = flowPrice.split("_");
|
||||
if (s.length > 1) {
|
||||
queryWrapper.between("flow_price", s[0], s[1]);
|
||||
} else {
|
||||
queryWrapper.ge("flow_price", s[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -106,6 +106,9 @@ public class OrderSearchParams extends PageVO {
|
||||
@ApiModelProperty(value = "是否为某订单类型的订单,如果是则为订单类型的id,否则为空")
|
||||
private String promotionId;
|
||||
|
||||
@ApiModelProperty(value = "总价格,可以为范围,如10_1000")
|
||||
private String flowPrice;
|
||||
|
||||
/**
|
||||
* @see OrderPromotionTypeEnum
|
||||
*/
|
||||
@ -209,6 +212,14 @@ public class OrderSearchParams extends PageVO {
|
||||
|
||||
wrapper.eq(CharSequenceUtil.isNotEmpty(orderPromotionType), "o.order_promotion_type", orderPromotionType);
|
||||
|
||||
if (CharSequenceUtil.isNotEmpty(flowPrice)) {
|
||||
String[] s = flowPrice.split("_");
|
||||
if (s.length > 1) {
|
||||
wrapper.between("o.flow_price", s[0], s[1]);
|
||||
} else {
|
||||
wrapper.ge("o.flow_price", s[0]);
|
||||
}
|
||||
}
|
||||
wrapper.eq("o.delete_flag", false);
|
||||
return wrapper;
|
||||
}
|
||||
|
@ -797,8 +797,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
||||
if (count == 1) {
|
||||
//如果为开团订单,则发布一个一小时的延时任务,时间到达后,如果未成团则自动结束(未开启虚拟成团的情况下)
|
||||
PintuanOrderMessage pintuanOrderMessage = new PintuanOrderMessage();
|
||||
// long startTime = DateUtil.offsetHour(new Date(), 1).getTime();
|
||||
long startTime = DateUtil.offsetMinute(new Date(), 2).getTime();
|
||||
long startTime = DateUtil.offsetHour(new Date(), 1).getTime();
|
||||
pintuanOrderMessage.setOrderSn(parentOrderSn);
|
||||
pintuanOrderMessage.setPintuanId(pintuanId);
|
||||
TimeTriggerMsg timeTriggerMsg = new TimeTriggerMsg(TimeExecuteConstant.PROMOTION_EXECUTOR,
|
||||
|
@ -115,25 +115,25 @@ public class CouponSearchParams extends BasePromotionsSearchParams implements Se
|
||||
if (CharSequenceUtil.isNotEmpty(publishNum)) {
|
||||
String[] s = publishNum.split("_");
|
||||
if (s.length > 1) {
|
||||
queryWrapper.ge("publish_num", s[1]);
|
||||
queryWrapper.between("publish_num", s[0], s[1]);
|
||||
} else {
|
||||
queryWrapper.le("publish_num", publishNum);
|
||||
queryWrapper.ge("publish_num", s[0]);
|
||||
}
|
||||
}
|
||||
if (CharSequenceUtil.isNotEmpty(price)) {
|
||||
String[] s = price.split("_");
|
||||
if (s.length > 1) {
|
||||
queryWrapper.ge(PRICE_COLUMN, s[1]);
|
||||
queryWrapper.between(PRICE_COLUMN, s[0], s[1]);
|
||||
} else {
|
||||
queryWrapper.le(PRICE_COLUMN, s[0]);
|
||||
queryWrapper.ge(PRICE_COLUMN, s[0]);
|
||||
}
|
||||
}
|
||||
if (CharSequenceUtil.isNotEmpty(receivedNum)) {
|
||||
String[] s = receivedNum.split("_");
|
||||
if (s.length > 1) {
|
||||
queryWrapper.ge("received_num", s[1]);
|
||||
queryWrapper.between("received_num", s[0], s[1]);
|
||||
} else {
|
||||
queryWrapper.le("received_num", s[0]);
|
||||
queryWrapper.ge("received_num", s[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,9 +84,9 @@ public class MemberCouponSearchParams extends BasePromotionsSearchParams impleme
|
||||
if (CharSequenceUtil.isNotEmpty(price)) {
|
||||
String[] s = price.split("_");
|
||||
if (s.length > 1) {
|
||||
queryWrapper.ge(PRICE_COLUMN, s[1]);
|
||||
queryWrapper.between(PRICE_COLUMN, s[0], s[1]);
|
||||
} else {
|
||||
queryWrapper.le(PRICE_COLUMN, s[0]);
|
||||
queryWrapper.ge(PRICE_COLUMN, s[0]);
|
||||
}
|
||||
}
|
||||
if (this.getStartTime() != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user