修复营销活动及会员等级
This commit is contained in:
@@ -97,6 +97,7 @@ public class AppStoreOrderController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 计算订单金额
|
||||
*/
|
||||
|
||||
@@ -110,7 +110,7 @@ public interface ShopConstants {
|
||||
/**
|
||||
* 秒杀时间段
|
||||
*/
|
||||
String ZSW_SECKILL_TIME = "zsw_seckill_time";
|
||||
String ZSW_SECKILL_TIME = "yshop_seckill_time";
|
||||
/**
|
||||
* 签到天数
|
||||
*/
|
||||
|
||||
+1
-1
@@ -363,7 +363,7 @@ public class YxStoreCombinationServiceImpl extends BaseServiceImpl<YxStoreCombin
|
||||
.orElse(0);
|
||||
|
||||
if(stock <= 0) {
|
||||
throw new YshopException("库存不能低于0");
|
||||
throw new YshopException("活动库存不能低于0");
|
||||
}
|
||||
|
||||
return ProductResultDto.builder()
|
||||
|
||||
@@ -79,8 +79,11 @@ public class YxSystemUserLevel extends BaseDomain {
|
||||
@NotBlank(message = "请上传会员图标")
|
||||
private String icon;
|
||||
|
||||
/** 会员权益说明 */
|
||||
@TableField(value = "`benefit`")
|
||||
private String benefit;
|
||||
|
||||
/** 说明 */
|
||||
/** 规格说明 */
|
||||
@TableField(value = "`explain`")
|
||||
private String explain;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ package co.yixiang.modules.shop.rest;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.iocoder.yudao.framework.common.exception.YshopException;
|
||||
import co.yixiang.constant.ShopConstants;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.logging.aop.log.Log;
|
||||
@@ -85,7 +86,7 @@ public class SystemGroupDataController {
|
||||
yxSeckillTime.forEach(item -> {
|
||||
Map map = JSONUtil.toBean(item.getValue(), Map.class);
|
||||
if (Objects.nonNull(jsonObject.getInteger("time")) && jsonObject.getInteger("time").equals(map.get("time"))) {
|
||||
throw new BadRequestException("不能同时开启同一时间点");
|
||||
throw new YshopException("已存在相同时间配置,不能同时开启同一时间点");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -116,7 +117,9 @@ public class SystemGroupDataController {
|
||||
yshop_seckill_time.forEach(item -> {
|
||||
Map map = JSONUtil.toBean(item.getValue(), Map.class);
|
||||
if (jsonObject.getInteger("time").equals(map.get("time"))) {
|
||||
throw new BadRequestException("不能同时开启同一时间点");
|
||||
// throw new BadRequestException("不能同时开启同一时间点");
|
||||
throw new YshopException("已存在相同时间配置,不能同时开启同一时间点");
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
-1
@@ -84,7 +84,6 @@ public class YxSystemGroupDataServiceImpl extends BaseServiceImpl<SystemGroupDat
|
||||
Map<String, Object> map = new LinkedHashMap<>(2);
|
||||
List<YxSystemGroupDataDto> systemGroupDataDTOS = new ArrayList<>();
|
||||
for (YxSystemGroupData systemGroupData : page.getList()) {
|
||||
|
||||
YxSystemGroupDataDto systemGroupDataDTO = generator.convert(systemGroupData,YxSystemGroupDataDto.class);
|
||||
systemGroupDataDTO.setMap(JSON.parseObject(systemGroupData.getValue()));
|
||||
systemGroupDataDTOS.add(systemGroupDataDTO);
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package co.yixiang.modules.user.domain;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDomain;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
/***
|
||||
@auther sj
|
||||
@Date 2022-9-29
|
||||
*/
|
||||
public class YxSystemUserLevel extends BaseDomain {
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
|
||||
/** 任务名称 */
|
||||
private String name;
|
||||
|
||||
|
||||
/** 配置原名 */
|
||||
private String realName;
|
||||
|
||||
|
||||
/** 任务类型 */
|
||||
private String taskType;
|
||||
|
||||
|
||||
/** 限定数 */
|
||||
private Integer number;
|
||||
|
||||
|
||||
/** 等级id */
|
||||
private Integer levelId;
|
||||
|
||||
|
||||
/** 排序 */
|
||||
private Integer sort;
|
||||
|
||||
|
||||
/** 是否显示 */
|
||||
private Integer isShow;
|
||||
|
||||
|
||||
/** 是否务必达成任务,1务必达成,0=满足其一 */
|
||||
private Integer isMust;
|
||||
|
||||
|
||||
/** 任务说明 */
|
||||
private String illustrate;
|
||||
|
||||
|
||||
public void copy(YxSystemUserLevel source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
}
|
||||
@@ -52,9 +52,11 @@ public class YxSystemUserLevelDto implements Serializable {
|
||||
/** 会员图标 */
|
||||
private String icon;
|
||||
|
||||
/** 说明 */
|
||||
/** 规则说明 */
|
||||
private String explain;
|
||||
|
||||
/** 权益说明 */
|
||||
private String benefit;
|
||||
/** 添加时间 */
|
||||
private Integer addTime;
|
||||
|
||||
|
||||
+2
-1
@@ -194,7 +194,8 @@ public class YxSystemUserLevelServiceImpl extends BaseServiceImpl<SystemUserLeve
|
||||
map.put("享受折扣", yxSystemUserLevel.getDiscount());
|
||||
map.put("会员卡背景", yxSystemUserLevel.getImage());
|
||||
map.put("会员图标", yxSystemUserLevel.getIcon());
|
||||
map.put("说明", yxSystemUserLevel.getExplain());
|
||||
map.put("规则说明", yxSystemUserLevel.getExplain());
|
||||
map.put("会员权益说明", yxSystemUserLevel.getBenefit());
|
||||
map.put("添加时间", yxSystemUserLevel.getAddTime());
|
||||
map.put("是否删除.1=删除,0=未删除", yxSystemUserLevel.getIsDel());
|
||||
list.add(map);
|
||||
|
||||
@@ -49,9 +49,12 @@ public class YxSystemUserLevelQueryVo implements Serializable {
|
||||
@ApiModelProperty(value = "会员图标")
|
||||
private String icon;
|
||||
|
||||
@ApiModelProperty(value = "说明")
|
||||
@ApiModelProperty(value = "规则说明")
|
||||
private String explain;
|
||||
|
||||
@ApiModelProperty(value = "会员权益说明")
|
||||
private String benefit;
|
||||
|
||||
@ApiModelProperty(value = "添加时间")
|
||||
private Integer addTime;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user