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