企业菜窖规则
This commit is contained in:
@@ -35,7 +35,7 @@ public class AppletNoticeService extends MybatisBaseService<AppletNoticeMapper,
|
|||||||
|
|
||||||
IPage<AppletNotice> page = PagerUtil.queryToPage(pq);
|
IPage<AppletNotice> page = PagerUtil.queryToPage(pq);
|
||||||
QueryWrapper<AppletNotice> qw = new QueryWrapper<>();
|
QueryWrapper<AppletNotice> qw = new QueryWrapper<>();
|
||||||
if (StringUtils.isNotBlank(query.getCountNumber())) {
|
if (StringUtils.isNotBlank(query.getName())) {
|
||||||
qw.like("title", query.getName());
|
qw.like("title", query.getName());
|
||||||
}
|
}
|
||||||
IPage<AppletNoticeVo> pagging = baseMapper.pageList(page, qw);
|
IPage<AppletNoticeVo> pagging = baseMapper.pageList(page, qw);
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class CustomerStoreService extends MybatisBaseService<CustomerStoreMapper
|
|||||||
LocalDate sunday = now.with(DayOfWeek.SUNDAY);
|
LocalDate sunday = now.with(DayOfWeek.SUNDAY);
|
||||||
do {
|
do {
|
||||||
if (CollectionUtils.isEmpty(weekMap)) {
|
if (CollectionUtils.isEmpty(weekMap)) {
|
||||||
weekMap.add(saturday.toString());
|
weekMap.add(sunday.toString());
|
||||||
} else {
|
} else {
|
||||||
weekMap.add(sunday.toString());
|
weekMap.add(sunday.toString());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,6 +178,8 @@ public class ShoppingCartService extends MybatisBaseService<ShoppingCartMapper,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return vo;
|
return vo;
|
||||||
|
}else if(vo.getAffiliation().equals("1001020")){
|
||||||
|
return vo;
|
||||||
};
|
};
|
||||||
vo.setRemarks("已减免附加额");
|
vo.setRemarks("已减免附加额");
|
||||||
if (weight <= 99) {
|
if (weight <= 99) {
|
||||||
|
|||||||
@@ -12,11 +12,13 @@ import com.yxt.common.base.utils.StringUtils;
|
|||||||
import com.yxt.common.core.query.PagerQuery;
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
import com.yxt.common.core.result.ResultBean;
|
import com.yxt.common.core.result.ResultBean;
|
||||||
import com.yxt.common.core.vo.PagerVo;
|
import com.yxt.common.core.vo.PagerVo;
|
||||||
|
import com.yxt.yythmall.api.cannotreservedictionary.CannotReserveDictionary;
|
||||||
import com.yxt.yythmall.api.lpkgoods.LpkGoods;
|
import com.yxt.yythmall.api.lpkgoods.LpkGoods;
|
||||||
import com.yxt.yythmall.api.lpkreserveorder.LpkReserveOrderQuery;
|
import com.yxt.yythmall.api.lpkreserveorder.LpkReserveOrderQuery;
|
||||||
import com.yxt.yythmall.api.lpkstore.LpkStore;
|
import com.yxt.yythmall.api.lpkstore.LpkStore;
|
||||||
import com.yxt.yythmall.api.vegecallerreservedetails.VegeCellarReserveDetails;
|
import com.yxt.yythmall.api.vegecallerreservedetails.VegeCellarReserveDetails;
|
||||||
import com.yxt.yythmall.api.vegecallerreserveorder.*;
|
import com.yxt.yythmall.api.vegecallerreserveorder.*;
|
||||||
|
import com.yxt.yythmall.biz.cannotreservedictionary.CannotReserveDictionaryService;
|
||||||
import com.yxt.yythmall.biz.lpkgiftcard.generateRule.UniqueIdGenerator;
|
import com.yxt.yythmall.biz.lpkgiftcard.generateRule.UniqueIdGenerator;
|
||||||
import com.yxt.yythmall.biz.lpkgoods.LpkGoodsService;
|
import com.yxt.yythmall.biz.lpkgoods.LpkGoodsService;
|
||||||
import com.yxt.yythmall.biz.lpkstore.LpkStoreService;
|
import com.yxt.yythmall.biz.lpkstore.LpkStoreService;
|
||||||
@@ -43,6 +45,8 @@ public class VegeCellarReserveOrderService extends MybatisBaseService<VegeCellar
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private LpkGoodsService lpkGoodsService;
|
private LpkGoodsService lpkGoodsService;
|
||||||
|
@Autowired
|
||||||
|
CannotReserveDictionaryService cannotReserveDictionaryService;
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public ResultBean submission(VegeCellarReserveOrderDto dto) {
|
public ResultBean submission(VegeCellarReserveOrderDto dto) {
|
||||||
@@ -69,48 +73,6 @@ public class VegeCellarReserveOrderService extends MybatisBaseService<VegeCellar
|
|||||||
return rb;
|
return rb;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResultBean addGoodsOrder(VegeCellarReserveOrderDto dto) {
|
|
||||||
ResultBean rb = new ResultBean().fail();
|
|
||||||
boolean b = isSatAndSun(dto.getReserveDate());
|
|
||||||
if (!b) {
|
|
||||||
return rb.setMsg("周六、周日不能预约提货");
|
|
||||||
}
|
|
||||||
VegeCellarReserveOrder order = new VegeCellarReserveOrder();
|
|
||||||
order = baseMapper.selectList(new QueryWrapper<VegeCellarReserveOrder>().eq("customerSid", dto.getCustomerSid())
|
|
||||||
.eq("affiliation", dto.getAffiliation()).eq("state", "0")).get(0);
|
|
||||||
if (order == null) {
|
|
||||||
BeanUtil.copyProperties(dto, order, "id", "sid");
|
|
||||||
order.setStoreSid(dto.getStoreSid());
|
|
||||||
// order.setCardSid(dto.getSid());
|
|
||||||
order.setCreateTime(new DateTime());
|
|
||||||
baseMapper.insert(order);
|
|
||||||
}
|
|
||||||
dto.setOrderSid(order.getSid());
|
|
||||||
vegeCellarReserveDetailsService.addDetail(dto);
|
|
||||||
return rb.success().setData("预约成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
public ResultBean minusGoodsOrder(VegeCellarReserveOrderDto dto) {
|
|
||||||
ResultBean rb = new ResultBean().fail();
|
|
||||||
boolean b = isSatAndSun(dto.getReserveDate());
|
|
||||||
if (!b) {
|
|
||||||
return rb.setMsg("周六、周日不能预约提货");
|
|
||||||
}
|
|
||||||
VegeCellarReserveOrder order = new VegeCellarReserveOrder();
|
|
||||||
order = baseMapper.selectList(new QueryWrapper<VegeCellarReserveOrder>().eq("customerSid", dto.getCustomerSid())
|
|
||||||
.eq("affiliation", dto.getAffiliation()).eq("state", "0")).get(0);
|
|
||||||
if (order == null) {
|
|
||||||
BeanUtil.copyProperties(dto, order, "id", "sid");
|
|
||||||
order.setStoreSid(dto.getStoreSid());
|
|
||||||
// order.setCardSid(dto.getSid());
|
|
||||||
order.setCreateTime(new DateTime());
|
|
||||||
baseMapper.insert(order);
|
|
||||||
}
|
|
||||||
dto.setOrderSid(order.getSid());
|
|
||||||
vegeCellarReserveDetailsService.addDetail(dto);
|
|
||||||
return rb.success().setData("预约成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public boolean isSatAndSun(String date) {
|
public boolean isSatAndSun(String date) {
|
||||||
DateTime dateTime = DateUtil.parse(date);
|
DateTime dateTime = DateUtil.parse(date);
|
||||||
@@ -123,7 +85,13 @@ public class VegeCellarReserveOrderService extends MybatisBaseService<VegeCellar
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public boolean isSatAndSun1(String date) {
|
||||||
|
List<CannotReserveDictionary>l =cannotReserveDictionaryService.list(new QueryWrapper<CannotReserveDictionary>().eq("unavailableTime",date));
|
||||||
|
if (l.size()>0){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
// @Test
|
// @Test
|
||||||
// public void isSatAndSun(){
|
// public void isSatAndSun(){
|
||||||
// String date="2023-12-11";
|
// String date="2023-12-11";
|
||||||
|
|||||||
Reference in New Issue
Block a user