会员免单时间转换
This commit is contained in:
parent
4fc29e3ad8
commit
ea1252ecc0
|
|
@ -66,11 +66,12 @@ public class OrderController {
|
|||
return orderService.mineCoupons(userId,status,page,size);
|
||||
}
|
||||
@GetMapping("/findCoupons")
|
||||
private Result findCoupons(@RequestHeader String token,@RequestParam String type,
|
||||
private Result findCoupons(@RequestHeader String token,String type,
|
||||
@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "size", required = false, defaultValue = "1") Integer size) throws IOException {
|
||||
return orderService.findCoupons(type,page,size);
|
||||
}
|
||||
|
||||
@GetMapping("/findWiningUser")
|
||||
private Result findWiningUser(){
|
||||
return orderService.findWiningUser();
|
||||
|
|
@ -87,8 +88,4 @@ public class OrderController {
|
|||
private Result yhqDouble(@RequestParam Integer conponsId){
|
||||
return orderService.yhqDouble(conponsId);
|
||||
}
|
||||
// @GetMapping("/testPay")
|
||||
// private Result testPay(@RequestParam Integer orderId){
|
||||
// return orderService.testPay(orderId);
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class TbYhqParams implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
|
|
@ -13,46 +16,5 @@ public class TbYhqParams implements Serializable {
|
|||
private BigDecimal maxPrice;
|
||||
|
||||
private String status;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name == null ? null : name.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getMinPrice() {
|
||||
return minPrice;
|
||||
}
|
||||
|
||||
public void setMinPrice(BigDecimal minPrice) {
|
||||
this.minPrice = minPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxPrice() {
|
||||
return maxPrice;
|
||||
}
|
||||
|
||||
public void setMaxPrice(BigDecimal maxPrice) {
|
||||
this.maxPrice = maxPrice;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status == null ? null : status.trim();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.chaozhanggui.system.cashierservice.entity.vo;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.config.FieldDescription;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbOrderDetail;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -11,9 +12,17 @@ import java.util.List;
|
|||
*/
|
||||
@Data
|
||||
public class IntegralVo {
|
||||
//openId
|
||||
@FieldDescription("用户openId")
|
||||
private String openId;
|
||||
//数量
|
||||
@FieldDescription("数量")
|
||||
private BigDecimal num;
|
||||
//类型
|
||||
@FieldDescription("类型")
|
||||
private String type;
|
||||
//签名
|
||||
@FieldDescription("签名")
|
||||
private String sign;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class TaskScheduler {
|
|||
}
|
||||
|
||||
|
||||
@Scheduled(fixedRate = 200000)
|
||||
@Scheduled(cron = "0 1 0 * * ?")
|
||||
public void winningUser() {
|
||||
String day = DateUtils.getDay();
|
||||
List<TbWiningParams> list = winingParamsMapper.selectAll();
|
||||
|
|
@ -119,7 +119,7 @@ public class TaskScheduler {
|
|||
}
|
||||
for (int i = 0; i < noUserNum; i++) {
|
||||
long endDate = DateUtils.convertDate1(day + " 00:00:00").getTime();
|
||||
long startDate = DateUtils.convertDate1(DateUtils.getTimes(DateUtils.getNewDate(new Date(), 3, -1)) + " 00:00:00").getTime();
|
||||
long startDate = DateUtils.convertDate1(DateUtils.getSdfDayTimes(DateUtils.getNewDate(new Date(), 3, -1))+" 00:00:00").getTime();
|
||||
String orderNo = generateOrderNumber(startDate, endDate);
|
||||
String userName = NicknameGenerator.generateRandomWeChatNickname();
|
||||
BigDecimal orderAmount = RandomUtil.getRandomBigDecimal(winingParams.getMinPrice(), winingParams.getMaxPrice());
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ public class DateUtils {
|
|||
public static String getTimes(Date date){
|
||||
return sdfday.format(date);
|
||||
}
|
||||
public static String getSdfDayTimes(Date date){
|
||||
return sdfDay.format(date);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue