From b63e17ce5e3e1cdc1028f94332bb257fe0e6f83d Mon Sep 17 00:00:00 2001 From: dy-hu Date: Mon, 8 Jul 2024 16:58:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=AE=B6=E7=AB=AF=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=BC=9A=E5=91=98=E6=9D=83=E7=9B=8A=E5=A2=9E=E5=88=A0=E6=94=B9?= =?UTF-8?q?=E6=9F=A5=E6=8E=A5=E5=8F=A3=E4=B8=9A=E5=8A=A1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/controller/MemberShipController.java | 119 +++++++++++++++++++++ .../dao/member/CerePlatformMembershipDAO.java | 7 ++ .../param/member/MemberLevelSaveParam.java | 63 +++++++++++ .../param/member/MemberLevelUpdateParam.java | 69 ++++++++++++ .../param/member/MemberLevelgetByIdParam.java | 25 +++++ .../param/member/MembershipGetByIdParam.java | 25 +++++ .../business/param/member/MembershipSaveParam.java | 47 ++++++++ .../param/member/MembershipUpdateParam.java | 49 +++++++++ .../member/CerePlatformMembershipService.java | 18 ++++ .../impl/CerePlatformMembershipServiceImpl.java | 79 ++++++++++++++ .../mapper/member/CerePlatformMembershipDAO.xml | 14 +++ .../domain/member/CerePlatformMembership.java | 6 ++ doc/3.0/update.sql | 4 + 13 files changed, 525 insertions(+) create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/controller/MemberShipController.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MemberLevelSaveParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MemberLevelUpdateParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MemberLevelgetByIdParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MembershipGetByIdParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MembershipSaveParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MembershipUpdateParam.java diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/MemberShipController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/MemberShipController.java new file mode 100644 index 0000000..6e60d2d --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/MemberShipController.java @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.controller; + +import com.shop.cereshop.business.annotation.NoRepeatSubmit; +import com.shop.cereshop.business.annotation.NoRepeatWebLog; +import com.shop.cereshop.business.param.member.MembershipGetByIdParam; +import com.shop.cereshop.business.param.member.MembershipSaveParam; +import com.shop.cereshop.business.param.member.MembershipUpdateParam; +import com.shop.cereshop.business.service.member.CerePlatformMembershipService; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.common.PageParam; +import com.shop.cereshop.commons.domain.member.CerePlatformMembership; +import com.shop.cereshop.commons.exception.CoBusinessException; +import com.shop.cereshop.commons.result.Result; +import com.shop.cereshop.commons.utils.GsonUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; + +/** + * 会员权益 + */ +@RestController +@RequestMapping("membership") +/** + * 注解方式生成日志对象,指定topic生成对象类名 + */ +@Slf4j(topic = "MemberShipController") +@Api(value = "会员模块", tags = "会员模块") +public class MemberShipController { + + @Autowired + private CerePlatformMembershipService cerePlatformMembershipService; + + /** + * 添加会员权益 + * @param param + * @return + */ + @PostMapping(value = "save") + @NoRepeatSubmit + @ApiOperation(value = "添加会员权益") + @NoRepeatWebLog + public Result save(@RequestBody @Validated MembershipSaveParam param, HttpServletRequest request) throws CoBusinessException { + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setBusinessId(user.getBusinessId()); + cerePlatformMembershipService.save(param,user); + return new Result(user.getUsername(),"添加会员权益", GsonUtil.objectToGson(param)); + } + + /** + * 编辑会员权益 + * @param param + * @return + */ + @PostMapping(value = "update") + @NoRepeatSubmit + @ApiOperation(value = "编辑会员权益") + @NoRepeatWebLog + public Result update(@RequestBody MembershipUpdateParam param, HttpServletRequest request) throws CoBusinessException { + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cerePlatformMembershipService.update(param,user); + return new Result(user.getUsername(),"编辑会员权益", GsonUtil.objectToGson(param)); + } + + /** + * 删除会员权益 + * @param param + * @return + */ + @PostMapping(value = "delete") + @NoRepeatSubmit + @ApiOperation(value = "删除会员权益") + @NoRepeatWebLog + public Result delete(@RequestBody MembershipGetByIdParam param, HttpServletRequest request) throws CoBusinessException { + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cerePlatformMembershipService.delete(param,user); + return new Result(user.getUsername(),"删除会员权益", GsonUtil.objectToGson(param)); + } + + /** + * 会员权益详情查询 + * @param param + * @return + */ + @PostMapping(value = "getById") + @ApiOperation(value = "会员权益详情查询") + public Result getById(@RequestBody MembershipGetByIdParam param) throws CoBusinessException { + CerePlatformMembership membership=cerePlatformMembershipService.getById(param); + return new Result(membership); + } + + /** + * 会员权益列表查询 + * @return + */ + @PostMapping(value = "getAll") + @ApiOperation(value = "会员权益列表查询") + public Result> getAll(@RequestBody PageParam param) throws CoBusinessException { + Page page=cerePlatformMembershipService.getAll(param); + return new Result(page); + } +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/member/CerePlatformMembershipDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/member/CerePlatformMembershipDAO.java index 5213943..502c471 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/member/CerePlatformMembershipDAO.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/member/CerePlatformMembershipDAO.java @@ -8,6 +8,9 @@ package com.shop.cereshop.business.dao.member; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.shop.cereshop.commons.domain.member.CerePlatformMembership; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; @Mapper public interface CerePlatformMembershipDAO extends BaseMapper { @@ -20,4 +23,8 @@ public interface CerePlatformMembershipDAO extends BaseMapper getAll(); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MemberLevelSaveParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MemberLevelSaveParam.java new file mode 100644 index 0000000..a255d67 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MemberLevelSaveParam.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.member; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * 添加会员等级请求 + */ +@Data +@ApiModel(value = "MemberLevelSaveParam", description = "添加会员等级请求") +public class MemberLevelSaveParam { + + /** + * 等级名称 + */ + @ApiModelProperty(value = "等级名称") + @NotBlank(message = "等级名称不能为空") + private String memberLevelName; + + /** + * 图标 + */ + @ApiModelProperty(value = "图标") + @NotBlank(message = "图标不能为空") + private String memberLevelIcon; + + /** + * 背景图 + */ + @ApiModelProperty(value = "背景图") + @NotBlank(message = "背景图不能为空") + private String memberLevelBackground; + + /** + * 成长值 + */ + @ApiModelProperty(value = "成长值") + @NotNull(message = "成长值不能为空") + private Integer growth; + + /** + * 会员权益id数组 + */ + @ApiModelProperty(value = "会员权益id数组") + private List ids; + + /** + * 等级说明 + */ + @ApiModelProperty(value = "等级说明") + private String memberLevelReason; + +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MemberLevelUpdateParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MemberLevelUpdateParam.java new file mode 100644 index 0000000..999a4ef --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MemberLevelUpdateParam.java @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.member; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * 编辑会员等级请求 + */ +@Data +@ApiModel(value = "MemberLevelUpdateParam", description = "编辑会员等级请求") +public class MemberLevelUpdateParam { + + /** + * 会员等级id + */ + @ApiModelProperty(value = "会员等级id") + private Long memberLevelId; + + /** + * 等级名称 + */ + @ApiModelProperty(value = "等级名称") + @NotBlank(message = "等级名称不能为空") + private String memberLevelName; + + /** + * 图标 + */ + @ApiModelProperty(value = "图标") + @NotBlank(message = "图标不能为空") + private String memberLevelIcon; + + /** + * 背景图 + */ + @ApiModelProperty(value = "背景图") + @NotBlank(message = "背景图不能为空") + private String memberLevelBackground; + + /** + * 成长值 + */ + @ApiModelProperty(value = "成长值") + @NotNull(message = "成长值不能为空") + private Integer growth; + + /** + * 会员权益id数组 + */ + @ApiModelProperty(value = "会员权益id数组") + private List ids; + + /** + * 等级说明 + */ + @ApiModelProperty(value = "等级说明") + private String memberLevelReason; + +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MemberLevelgetByIdParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MemberLevelgetByIdParam.java new file mode 100644 index 0000000..68c6e6b --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MemberLevelgetByIdParam.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.member; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 编辑会员等级请求 + */ +@Data +@ApiModel(value = "MemberLevelUpdateParam", description = "编辑会员等级请求") +public class MemberLevelgetByIdParam { + + /** + * 会员等级id + */ + @ApiModelProperty(value = "会员等级id") + private Long memberLevelId; + +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MembershipGetByIdParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MembershipGetByIdParam.java new file mode 100644 index 0000000..a75a180 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MembershipGetByIdParam.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.member; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 会员权益详情请求 + */ +@Data +@ApiModel(value = "MembershipGetByIdParam", description = "会员权益详情请求") +public class MembershipGetByIdParam { + + /** + * 权益id + */ + @ApiModelProperty(value = "权益id") + private Long memberId; + +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MembershipSaveParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MembershipSaveParam.java new file mode 100644 index 0000000..958a8c5 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MembershipSaveParam.java @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.member; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 添加会员权益请求 + */ +@Data +@ApiModel(value = "MembershipSaveParam", description = "添加会员权益请求") +public class MembershipSaveParam { + + /** + * 商家id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; + + /** + * 权益名称 + */ + @ApiModelProperty(value = "权益名称") + @NotBlank(message = "权益名称名称不能为空") + private String memberName; + + /** + * 权益图标 + */ + @ApiModelProperty(value = "权益图标") + @NotBlank(message = "权益图标不能为空") + private String memberIcon; + + /** + * 权益说明 + */ + @ApiModelProperty(value = "权益说明") + private String memberReason; + +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MembershipUpdateParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MembershipUpdateParam.java new file mode 100644 index 0000000..c44c406 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/member/MembershipUpdateParam.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.member; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 编辑会员权益请求 + */ +@Data +@ApiModel(value = "MembershipUpdateParam", description = "编辑会员权益请求") +public class MembershipUpdateParam { + + /** + * 权益id + */ + @ApiModelProperty(value = "权益id") + private Long memberId; + + /** + * 商家id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; + + /** + * 权益名称 + */ + @ApiModelProperty(value = "权益名称") + private String memberName; + + /** + * 权益图标 + */ + @ApiModelProperty(value = "权益图标") + private String memberIcon; + + /** + * 权益说明 + */ + @ApiModelProperty(value = "权益说明") + private String memberReason; + +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/CerePlatformMembershipService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/CerePlatformMembershipService.java index d7e52c5..a062fd4 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/CerePlatformMembershipService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/CerePlatformMembershipService.java @@ -5,5 +5,23 @@ */ package com.shop.cereshop.business.service.member; +import com.shop.cereshop.business.param.member.MembershipGetByIdParam; +import com.shop.cereshop.business.param.member.MembershipSaveParam; +import com.shop.cereshop.business.param.member.MembershipUpdateParam; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.common.PageParam; +import com.shop.cereshop.commons.domain.member.CerePlatformMembership; +import com.shop.cereshop.commons.exception.CoBusinessException; + public interface CerePlatformMembershipService { + void save(MembershipSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; + + void update(MembershipUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException; + + CerePlatformMembership getById(MembershipGetByIdParam param) throws CoBusinessException; + + void delete(MembershipGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException; + + Page getAll(PageParam param) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/impl/CerePlatformMembershipServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/impl/CerePlatformMembershipServiceImpl.java index 406889f..bd2afef 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/impl/CerePlatformMembershipServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/impl/CerePlatformMembershipServiceImpl.java @@ -5,14 +5,93 @@ */ package com.shop.cereshop.business.service.member.impl; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import com.shop.cereshop.business.dao.member.CerePlatformMembershipDAO; +import com.shop.cereshop.business.param.member.MembershipGetByIdParam; +import com.shop.cereshop.business.param.member.MembershipSaveParam; +import com.shop.cereshop.business.param.member.MembershipUpdateParam; +import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.member.CerePlatformMembershipService; +import com.shop.cereshop.commons.constant.CoReturnFormat; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.common.PageParam; +import com.shop.cereshop.commons.domain.member.CerePlatformMembership; +import com.shop.cereshop.commons.exception.CoBusinessException; +import com.shop.cereshop.commons.utils.TimeUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; @Service public class CerePlatformMembershipServiceImpl implements CerePlatformMembershipService { @Autowired private CerePlatformMembershipDAO cerePlatformMembershipDAO; + + @Autowired + private CerePlatformLogService cerePlatformLogService; + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void save(MembershipSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { + String time= TimeUtils.yyMMddHHmmss(); + CerePlatformMembership membership=new CerePlatformMembership(); + membership.setBusinessId(param.getBusinessId()); + membership.setMemberName(param.getMemberName()); + membership.setMemberIcon(param.getMemberIcon()); + membership.setMemberReason(param.getMemberReason()); + membership.setCreateTime(time); + cerePlatformMembershipDAO.insert(membership); + //新增日志 + cerePlatformLogService.addLog(user,"会员管理","商家端操作","添加会员权益",membership.getMemberId(),time); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void update(MembershipUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { + String time= TimeUtils.yyMMddHHmmss(); + CerePlatformMembership membership=new CerePlatformMembership(); + membership.setMemberId(param.getMemberId()); + membership.setBusinessId(param.getBusinessId()); + membership.setMemberName(param.getMemberName()); + membership.setMemberIcon(param.getMemberIcon()); + membership.setMemberReason(param.getMemberReason()); + membership.setUpdateTime(time); + cerePlatformMembershipDAO.updateByPrimaryKeySelective(membership); + //新增日志 + cerePlatformLogService.addLog(user,"会员管理","商家端操作","编辑会员权益",membership.getMemberId(),time); + } + + @Override + public CerePlatformMembership getById(MembershipGetByIdParam param) throws CoBusinessException { + return cerePlatformMembershipDAO.selectByPrimaryKey(param.getMemberId()); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void delete(MembershipGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException { + //校验该会员权益是否关联会员等级 + CerePlatformMembership membership=cerePlatformMembershipDAO.check(param.getMemberId()); + if(membership!=null){ + throw new CoBusinessException(CoReturnFormat.MEMBER_SHIP_NOT_DELETE); + } + cerePlatformMembershipDAO.deleteByPrimaryKey(param.getMemberId()); + //新增日志 + cerePlatformLogService.addLog(user,"会员管理","商家端操作","删除会员权益", param.getMemberId(),TimeUtils.yyMMddHHmmss()); + } + + @Override + public Page getAll(PageParam param) throws CoBusinessException { + PageHelper.startPage(param.getPage(),param.getPageSize()); + List list=cerePlatformMembershipDAO.getAll(); + PageInfo pageInfo=new PageInfo<>(list); + Page page=new Page(pageInfo.getList(),pageInfo.getTotal()); + return page; + } } diff --git a/cereshop-business/src/main/resources/mybatis/mapper/member/CerePlatformMembershipDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/member/CerePlatformMembershipDAO.xml index 6caaa1a..913e850 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/member/CerePlatformMembershipDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/member/CerePlatformMembershipDAO.xml @@ -62,6 +62,9 @@ update cere_platform_membership + + business_id = #{businessId,jdbcType=BIGINT}, + member_name = #{memberName,jdbcType=VARCHAR}, @@ -89,4 +92,15 @@ update_time = #{updateTime,jdbcType=VARCHAR} where member_id = #{memberId,jdbcType=BIGINT} + + + + diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/member/CerePlatformMembership.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/member/CerePlatformMembership.java index e8737be..e30adff 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/member/CerePlatformMembership.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/member/CerePlatformMembership.java @@ -26,6 +26,12 @@ public class CerePlatformMembership implements Serializable { private Long memberId; /** + * 商家id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; + + /** * 权益名称 */ @ApiModelProperty(value = "字典id") diff --git a/doc/3.0/update.sql b/doc/3.0/update.sql index 3c2b5a4..f626578 100644 --- a/doc/3.0/update.sql +++ b/doc/3.0/update.sql @@ -295,3 +295,7 @@ ALTER TABLE cere_shop_product ADD plat_shelve_state tinyint(1) DEFAULT 0 COMMENT -- 会员标签表增加商家表关联Id ALTER TABLE `cere_platform_label` ADD COLUMN `business_id` bigint(20) DEFAULT 0 COMMENT '商家Id'; + +-- 会员权益表增加商家表关联Id +ALTER TABLE `cere_platform_membership` + ADD COLUMN `business_id` bigint(20) DEFAULT 0 COMMENT '商家Id';