Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg
This commit is contained in:
commit
46845dd4b9
@ -71,7 +71,7 @@ public class TimedTaskJobHandler {
|
||||
try {
|
||||
everyHourExecutes.get(i).execute();
|
||||
} catch (Exception e) {
|
||||
log.error("每分钟任务异常", e);
|
||||
log.error("每小时任务异常", e);
|
||||
}
|
||||
}
|
||||
return ReturnT.SUCCESS;
|
||||
@ -94,7 +94,7 @@ public class TimedTaskJobHandler {
|
||||
try {
|
||||
everyDayExecutes.get(i).execute();
|
||||
} catch (Exception e) {
|
||||
log.error("每分钟任务异常", e);
|
||||
log.error("每日任务异常", e);
|
||||
}
|
||||
}
|
||||
return ReturnT.SUCCESS;
|
||||
|
@ -278,11 +278,6 @@ public enum ResultCode {
|
||||
COUPON_RECEIVE_ERROR(41005, "当前优惠券已经被领取完了,下次要早点来哦"),
|
||||
COUPON_NUM_INSUFFICIENT_ERROR(41006, "优惠券剩余领取数量不足"),
|
||||
COUPON_NOT_EXIST(41007, "当前优惠券不存在"),
|
||||
COUPON_DO_NOT_RECEIVER(41030, "当前优惠券不允许主动领取"),
|
||||
COUPON_ACTIVITY_NOT_EXIST(410022, "当前优惠券活动不存在"),
|
||||
COUPON_SAVE_ERROR(41020, "保存优惠券失败"),
|
||||
COUPON_ACTIVITY_SAVE_ERROR(41023, "保存优惠券活动失败"),
|
||||
COUPON_DELETE_ERROR(41021, "删除优惠券失败"),
|
||||
COUPON_LIMIT_NUM_LESS_THAN_0(41008, "领取限制数量不能为负数"),
|
||||
COUPON_LIMIT_GREATER_THAN_PUBLISH(41009, "领取限制数量超出发行数量"),
|
||||
COUPON_DISCOUNT_ERROR(41010, "优惠券折扣必须小于10且大于0"),
|
||||
@ -293,8 +288,15 @@ public enum ResultCode {
|
||||
COUPON_MEMBER_NOT_EXIST(41015, "没有当前会员优惠券"),
|
||||
COUPON_MEMBER_STATUS_ERROR(41016, "当前会员优惠券已过期/作废无法变更状态!"),
|
||||
|
||||
SPECIAL_CANT_USE(41020, "特殊商品不能使用优惠券,不能使用"),
|
||||
SPECIAL_CANT_USE(41019, "特殊商品不能使用优惠券,不能使用"),
|
||||
|
||||
COUPON_SAVE_ERROR(41020, "保存优惠券失败"),
|
||||
COUPON_DELETE_ERROR(41021, "删除优惠券失败"),
|
||||
COUPON_ACTIVITY_NOT_EXIST(41022, "当前优惠券活动不存在"),
|
||||
COUPON_ACTIVITY_SAVE_ERROR(41023, "保存优惠券活动失败"),
|
||||
COUPON_ACTIVITY_MAX_NUM(41024, "优惠券活动赠券数量最多为3"),
|
||||
|
||||
COUPON_DO_NOT_RECEIVER(41030, "当前优惠券不允许主动领取"),
|
||||
|
||||
/**
|
||||
* 拼团
|
||||
|
@ -5,6 +5,7 @@ import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.lili.cache.Cache;
|
||||
import cn.lili.cache.CachePrefix;
|
||||
import cn.lili.common.aop.annotation.DemoSite;
|
||||
import cn.lili.common.context.ThreadContextHolder;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.SwitchEnum;
|
||||
@ -264,6 +265,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
@DemoSite
|
||||
public Member modifyPass(String oldPassword, String newPassword) {
|
||||
AuthUser tokenUser = UserContext.getCurrentUser();
|
||||
if (tokenUser == null) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package cn.lili.modules.store.entity.dto;
|
||||
|
||||
import cn.lili.common.validation.Mobile;
|
||||
import cn.lili.common.validation.Phone;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -49,7 +48,6 @@ public class StoreEditDTO {
|
||||
@ApiModelProperty(value = "公司地址地区")
|
||||
private String companyAddressPath;
|
||||
|
||||
@Mobile
|
||||
@ApiModelProperty(value = "公司电话")
|
||||
private String companyPhone;
|
||||
|
||||
|
@ -75,7 +75,7 @@ public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> impleme
|
||||
Region region = this.getOne(lambdaQueryWrapper, false);
|
||||
if (region != null) {
|
||||
sql.append(region.getPath()).append(",").append(region.getId());
|
||||
return sql.toString().replace(",0,","");
|
||||
return sql.toString().replace(",0,", "");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -92,9 +92,9 @@ public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> impleme
|
||||
@Override
|
||||
public Map<String, Object> getRegion(String cityCode, String townName) {
|
||||
//获取地址信息
|
||||
Region region = this.baseMapper.selectOne(new QueryWrapper<Region>()
|
||||
Region region = this.getOne(new QueryWrapper<Region>()
|
||||
.eq("city_code", cityCode)
|
||||
.eq("name", townName));
|
||||
.eq("name", townName), false);
|
||||
if (region != null) {
|
||||
//获取它的层级关系
|
||||
String path = region.getPath();
|
||||
|
@ -6,6 +6,7 @@ import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.promotion.entity.dos.CouponActivity;
|
||||
import cn.lili.modules.promotion.entity.dos.CouponActivityItem;
|
||||
import cn.lili.modules.promotion.entity.dto.CouponActivityDTO;
|
||||
import cn.lili.modules.promotion.entity.vos.CouponActivityVO;
|
||||
import cn.lili.modules.promotion.service.CouponActivityService;
|
||||
@ -49,8 +50,12 @@ public class CouponActivityManagerController {
|
||||
|
||||
@ApiOperation(value = "添加优惠券活动")
|
||||
@PostMapping
|
||||
@PutMapping(consumes = "application/json", produces = "application/json")
|
||||
public ResultMessage<CouponActivity> addCouponActivity(@RequestBody(required = false) CouponActivityDTO couponActivityDTO) {
|
||||
for (CouponActivityItem couponActivityItem : couponActivityDTO.getCouponActivityItems()) {
|
||||
if (couponActivityItem.getNum() > 3) {
|
||||
throw new ServiceException(ResultCode.COUPON_ACTIVITY_MAX_NUM);
|
||||
}
|
||||
}
|
||||
if (couponActivityService.savePromotions(couponActivityDTO)) {
|
||||
return ResultUtil.data(couponActivityDTO);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user