周几可用 以及 模板申请
This commit is contained in:
parent
9881e50176
commit
d430e8dacf
|
|
@ -2,6 +2,7 @@ package com.czg.service.market.service.impl;
|
|||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.czg.TimeQueryParam;
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
|
|
@ -23,10 +24,14 @@ import org.apache.dubbo.config.annotation.DubboReference;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.DayOfWeek;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.DateTimeParseException;
|
||||
import java.time.format.TextStyle;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* 商家满减活动表 服务层实现。
|
||||
|
|
@ -92,6 +97,9 @@ public class MkDiscountActivityServiceImpl extends ServiceImpl<MkDiscountActivit
|
|||
if (activity == null) {
|
||||
return null;
|
||||
}
|
||||
if (!activity.getUseDays().contains(CzgStrUtils.getStrWeek())) {
|
||||
return null;
|
||||
}
|
||||
MkDiscountActivityDTO activityDTO = BeanUtil.toBean(activity, MkDiscountActivityDTO.class);
|
||||
activityDTO.setThresholds(thresholdMapper.selectListByQuery(
|
||||
new QueryWrapper()
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import com.czg.service.market.enums.OrderStatusEnums;
|
|||
import com.czg.service.market.mapper.MkShopCouponRecordMapper;
|
||||
import com.czg.service.market.mapper.ShopCouponMapper;
|
||||
import com.czg.utils.AssertUtil;
|
||||
import com.czg.utils.CzgStrUtils;
|
||||
import com.czg.utils.PageUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
|
@ -288,7 +289,7 @@ public class ShopCouponServiceImpl extends ServiceImpl<ShopCouponMapper, ShopCou
|
|||
public List<UserCouponVo> findCoupon(Long shopId, Long shopUserId, Integer type, Integer isFood) {
|
||||
List<UserCouponVo> tbUserCouponVos = recordService.queryByVipIdAndShopId(shopId, shopUserId, type, isFood);
|
||||
if (CollectionUtil.isNotEmpty(tbUserCouponVos)) {
|
||||
String week = DateUtil.dayOfWeekEnum(new Date()).toChinese("周");
|
||||
String week = CzgStrUtils.getStrWeek();
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss");
|
||||
|
||||
//券id 券使用描述
|
||||
|
|
|
|||
|
|
@ -84,8 +84,9 @@ public class SmsShopTemplateServiceImpl extends ServiceImpl<SmsShopTemplateMappe
|
|||
template.setStatus(0);
|
||||
template.setSort(0);
|
||||
template.setShopUse(1);
|
||||
template.setStatus(2);
|
||||
|
||||
if (template.getShopId().equals(1L)) {
|
||||
template.setStatus(2);
|
||||
}
|
||||
save(template);
|
||||
if (!template.getShopId().equals(1L)) {
|
||||
sendApplyMsg(template.getShopId(), template.getId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue