yml
This commit is contained in:
@@ -32,4 +32,5 @@ public class LpkGiftBag {
|
||||
private String boundaryPrice;
|
||||
private String iconUrl;
|
||||
private String isGrounding;
|
||||
private String isSel;
|
||||
}
|
||||
|
||||
@@ -106,15 +106,15 @@ public class AppletVo {
|
||||
return time;
|
||||
}
|
||||
|
||||
public boolean isShowBtn() {
|
||||
if(states.equals("5")){
|
||||
if(isReservation.equals("1")){
|
||||
this.state="已完成";
|
||||
showBtn=false;
|
||||
}
|
||||
}
|
||||
return showBtn;
|
||||
}
|
||||
// public boolean isShowBtn() {
|
||||
// if(states.equals("5")){
|
||||
// if(isReservation.equals("1")){
|
||||
// this.state="已完成";
|
||||
// showBtn=false;
|
||||
// }
|
||||
// }
|
||||
// return showBtn;
|
||||
// }
|
||||
|
||||
public String getState() {
|
||||
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
@@ -36,5 +36,6 @@ public class LpkGiftCard {
|
||||
private String recordId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date bindDate;
|
||||
private String isItInvalid;
|
||||
private String isReservation ;//是否超过预约时间 0 否 1是
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public interface LpkGiftCardMapper extends BaseMapper<LpkGiftCard> {
|
||||
@Select("select count(id) from lpk_giftcard where recordSid=#{recordSid} and grantRecordSid is not null")
|
||||
Integer cardGrantCount(@Param("recordSid") String recordSid);
|
||||
|
||||
@Select("update lpk_giftcard set isItInvalid='1' where giftbagSid=#{giftbagSid} and state!=#{state} ")
|
||||
@Select("update lpk_giftcard set isItInvalid='1',state='5',isReservation='1' where giftbagSid=#{giftbagSid} and state!=#{state} ")
|
||||
Integer updateIsItInvalid(@Param("giftbagSid") String giftbagSid, @Param("state") String state);
|
||||
|
||||
// List<LpkGiftCardWordVo> selGiftCard(@Param("serialNumbers") List<Integer> serialNumbers);
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.yxt.yyth.biz.lpkgiftbag.LpkGiftBagService;
|
||||
import com.yxt.yyth.biz.lpkgiftcard.LpkGiftCardMapper;
|
||||
import com.yxt.yyth.biz.lpkgiftcard.LpkGiftCardService;
|
||||
import com.yxt.yyth.biz.lpkreserveorder.LpkReserveOrderService;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -32,7 +33,7 @@ public class scheduledRest {
|
||||
LpkReserveOrderService lpkReserveOrderService;
|
||||
@Scheduled(cron = "0 0 1 * * ? ")
|
||||
public void updateIsItInvalid() {
|
||||
List<LpkGiftBag> lpkGiftBags = lpkGiftBagService.list(new QueryWrapper<LpkGiftBag>());
|
||||
List<LpkGiftBag> lpkGiftBags = lpkGiftBagService.list(new QueryWrapper<LpkGiftBag>().eq("isSel","1"));
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
for (LpkGiftBag lpkGiftBag : lpkGiftBags) {
|
||||
//1>2 1 、1<2 -1 、1=2 0
|
||||
@@ -40,6 +41,8 @@ public class scheduledRest {
|
||||
if (String.valueOf(in).equals("-1")) {
|
||||
Integer i = lpkGiftCardMapper.selectCount(new QueryWrapper<LpkGiftCard>().eq("giftbagSid", lpkGiftBag.getSid()).ne("state", "5"));
|
||||
if (i != 0) {
|
||||
lpkGiftBag.setIsSel("2");
|
||||
lpkGiftBagService.updateById(lpkGiftBag);
|
||||
lpkGiftCardMapper.updateIsItInvalid(lpkGiftBag.getSid(), "5");
|
||||
}
|
||||
} else {
|
||||
@@ -50,6 +53,9 @@ public class scheduledRest {
|
||||
if (null != LpkReserveOrderVo) {
|
||||
int c = DateUtil.parse(sdf.format(LpkReserveOrderVo.getReserveDate())).compareTo(DateUtil.parse(sdf.format(new Date())));
|
||||
if (String.valueOf(c).equals("-1")) {
|
||||
if(card.getState().equals("5")){
|
||||
card.setIsItInvalid("1");
|
||||
}
|
||||
card.setIsReservation("1");
|
||||
lpkGiftCardMapper.updateById(card);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ public class SaTokenConfigure implements WebMvcConfigurer {
|
||||
.excludePathPatterns("/lpkgoods/goodsDetails/**")
|
||||
.excludePathPatterns("/lpkstore/getAllStoreByQuery")
|
||||
.excludePathPatterns("/lpkgiftcard/getCardByBank")
|
||||
.excludePathPatterns("/empcardgift/shareEmpCard/**")
|
||||
.excludePathPatterns("/lpkcustomer/wxSilentLogin");
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user