Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop
This commit is contained in:
commit
caacb9e201
@ -16,7 +16,7 @@ import java.util.List;
|
||||
public class GoodsParamsGroupVO implements Serializable {
|
||||
private static final long serialVersionUID = 1450550797436233753L;
|
||||
@ApiModelProperty("参数组关联的参数集合")
|
||||
private List<GoodsParamsDTOVO> params;
|
||||
private List<GoodsParamsVO> params;
|
||||
@ApiModelProperty("参数组名称")
|
||||
private String groupName;
|
||||
@ApiModelProperty("参数组id")
|
||||
|
@ -12,7 +12,7 @@ import lombok.Data;
|
||||
* @date 2020-02-26 23:24:13
|
||||
*/
|
||||
@Data
|
||||
public class GoodsParamsDTOVO extends GoodsParamsDTO {
|
||||
public class GoodsParamsVO extends GoodsParamsDTO {
|
||||
|
||||
private static final long serialVersionUID = -4904700751774005326L;
|
||||
@ApiModelProperty("1 输入项 2 选择项")
|
@ -9,7 +9,7 @@ import cn.lili.modules.goods.entity.dos.Category;
|
||||
import cn.lili.modules.goods.entity.dos.CategoryParameterGroup;
|
||||
import cn.lili.modules.goods.entity.vos.CategoryVO;
|
||||
import cn.lili.modules.goods.entity.vos.GoodsParamsGroupVO;
|
||||
import cn.lili.modules.goods.entity.vos.GoodsParamsDTOVO;
|
||||
import cn.lili.modules.goods.entity.vos.GoodsParamsVO;
|
||||
import cn.lili.modules.goods.mapper.CategoryMapper;
|
||||
import cn.lili.modules.goods.service.CategoryService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@ -268,13 +268,13 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> i
|
||||
* @param paramList 参数列表
|
||||
* @return 拼装后的返回值
|
||||
*/
|
||||
private List<GoodsParamsGroupVO> convertParamList(List<CategoryParameterGroup> groupList, List<GoodsParamsDTOVO> paramList) {
|
||||
Map<String, List<GoodsParamsDTOVO>> map = new HashMap<>(16);
|
||||
for (GoodsParamsDTOVO param : paramList) {
|
||||
private List<GoodsParamsGroupVO> convertParamList(List<CategoryParameterGroup> groupList, List<GoodsParamsVO> paramList) {
|
||||
Map<String, List<GoodsParamsVO>> map = new HashMap<>(16);
|
||||
for (GoodsParamsVO param : paramList) {
|
||||
if (map.get(param.getGroupId()) != null) {
|
||||
map.get(param.getGroupId()).add(param);
|
||||
} else {
|
||||
List<GoodsParamsDTOVO> list = new ArrayList<>();
|
||||
List<GoodsParamsVO> list = new ArrayList<>();
|
||||
list.add(param);
|
||||
map.put(param.getGroupId(), list);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package cn.lili.modules.member.entity.aop.interceptor;
|
||||
import cn.lili.common.utils.CurrencyUtil;
|
||||
import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.entity.dos.MemberPointsHistory;
|
||||
import cn.lili.modules.member.entity.enums.PointTypeEnum;
|
||||
import cn.lili.modules.member.service.MemberPointsHistoryService;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -55,9 +56,10 @@ public class PointLogInterceptor {
|
||||
MemberPointsHistory memberPointsHistory = new MemberPointsHistory();
|
||||
memberPointsHistory.setMemberId(member.getId());
|
||||
memberPointsHistory.setMemberName(member.getUsername());
|
||||
memberPointsHistory.setPointType(type ? 1 : 0);
|
||||
memberPointsHistory.setPointType(type ? PointTypeEnum.INCREASE.name() : PointTypeEnum.REDUCE.name());
|
||||
|
||||
memberPointsHistory.setVariablePoint(point);
|
||||
memberPointsHistory.setBeforePoint(new Double(CurrencyUtil.sub(member.getPoint(), point)).longValue());
|
||||
memberPointsHistory.setBeforePoint(true ? new Double(CurrencyUtil.sub(member.getPoint(), point)).longValue() : new Double(CurrencyUtil.add(member.getPoint(), point)).longValue());
|
||||
memberPointsHistory.setPoint(member.getPoint());
|
||||
memberPointsHistory.setContent(obj[3] == null ? "" : obj[3].toString());
|
||||
memberPointsHistory.setCreateBy("系统");
|
||||
|
@ -73,9 +73,10 @@ public class MemberPointsHistory {
|
||||
@ApiModelProperty(value = "content")
|
||||
private String content;
|
||||
|
||||
@Min(message = "最小值为0", value = 0)
|
||||
@Max(message = "最大值为1", value = 1)
|
||||
@ApiModelProperty(value = "消费积分类型,1为增加,0为消费")
|
||||
private Integer pointType;
|
||||
/**
|
||||
* @see cn.lili.modules.member.entity.enums.PointTypeEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "消费积分类型")
|
||||
private String pointType;
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package cn.lili.modules.member.entity.enums;
|
||||
|
||||
/**
|
||||
* 积分类型枚举
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2021/3/20 10:44
|
||||
*/
|
||||
|
||||
public enum PointTypeEnum {
|
||||
/**
|
||||
* 增加
|
||||
*/
|
||||
INCREASE("增加"),
|
||||
/**
|
||||
* 减少
|
||||
*/
|
||||
REDUCE("减少");
|
||||
|
||||
private String description;
|
||||
|
||||
public String description() {
|
||||
return description;
|
||||
}
|
||||
|
||||
PointTypeEnum(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
}
|
@ -10,3 +10,7 @@ INSERT INTO `lilishop`.`li_menu`(`id`, `create_by`, `create_time`, `delete_flag`
|
||||
|
||||
/** 促销商品添加商品类型**/
|
||||
ALTER TABLE li_promotion_goods ADD goods_type varchar (200);
|
||||
/** 修改历史积分积分类型的字段类型 **/
|
||||
alter table li_member_points_history modify column point_type varchar(50);
|
||||
update li_member_points_history set point_type = 'INCREASE' where point_type=1;
|
||||
update li_member_points_history set point_type = 'REDUCE' where point_type=0;
|
Loading…
x
Reference in New Issue
Block a user