diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml index 295032f..184ebce 100644 --- a/cereshop-admin/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml +++ b/cereshop-admin/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml @@ -143,7 +143,7 @@ SELECT a.member_level_id,a.member_level_name,a.member_level_icon,a.member_level_background,a.member_level_reason, GROUP_CONCAT(b.member_name) memberIds,a.growth from cere_platform_member_level a LEFT JOIN cere_platform_membership b ON a.member_ids=b.member_id - OR a.member_ids LIKE CONCAT('%,',b.member_id,'%') + OR a.member_ids LIKE CONCAT('%,',b.member_id,'%') where a.business_id=0 GROUP BY a.member_level_id ORDER by a.growth diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/MemberLevelController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/MemberLevelController.java new file mode 100644 index 0000000..ab882df --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/MemberLevelController.java @@ -0,0 +1,125 @@ +/* + * 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.page.member.MemberLevel; +import com.shop.cereshop.business.param.member.MemberLevelSaveParam; +import com.shop.cereshop.business.param.member.MemberLevelUpdateParam; +import com.shop.cereshop.business.param.member.MemberLevelgetByIdParam; +import com.shop.cereshop.business.service.member.CerePlatformMemberLevelService; +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.domain.user.CerePlatformUser; +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("memberlevel") +/** + * 注解方式生成日志对象,指定topic生成对象类名 + */ +@Slf4j(topic = "MemberLevelController") +@Api(value = "会员模块", tags = "会员模块") +public class MemberLevelController { + + @Autowired + private CerePlatformMemberLevelService cerePlatformMemberLevelService; + + /** + * 添加会员等级 + * @param param + * @return + */ + @PostMapping(value = "save") + @NoRepeatSubmit + @ApiOperation(value = "添加会员等级") + @NoRepeatWebLog + public Result save(@RequestBody @Validated MemberLevelSaveParam param, HttpServletRequest request) throws CoBusinessException { + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setBusinessId(user.getBusinessId()); + cerePlatformMemberLevelService.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 MemberLevelUpdateParam param, HttpServletRequest request) throws CoBusinessException { + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setBusinessId(user.getBusinessId()); + cerePlatformMemberLevelService.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 MemberLevelgetByIdParam param, HttpServletRequest request) throws CoBusinessException { + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cerePlatformMemberLevelService.delete(param,user); + return new Result(user.getUsername(),"删除会员等级", GsonUtil.objectToGson(param)); + } + + /** + * 会员等级详情查询 + * @param param + * @return + */ + @PostMapping(value = "getById") + @ApiOperation(value = "会员等级详情查询") + public Result getById(@RequestBody MemberLevelgetByIdParam param) throws CoBusinessException { + MemberLevel memberLevel=cerePlatformMemberLevelService.getById(param); + return new Result(memberLevel); + } + + /** + * 会员等级列表查询 + * @return + */ + @PostMapping(value = "getAll") + @ApiOperation(value = "会员等级列表查询") + public Result> getAll(@RequestBody PageParam param, HttpServletRequest request) throws CoBusinessException { + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + Page page=cerePlatformMemberLevelService.getAll(user.getBusinessId(), param); + return new Result(page); + } +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/member/CerePlatformMemberLevelDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/member/CerePlatformMemberLevelDAO.java index c5d2afe..a4ef8c2 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/member/CerePlatformMemberLevelDAO.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/member/CerePlatformMemberLevelDAO.java @@ -6,8 +6,10 @@ package com.shop.cereshop.business.dao.member; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.shop.cereshop.business.page.member.MemberLevel; import com.shop.cereshop.commons.domain.member.CerePlatformMemberLevel; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -23,5 +25,19 @@ public interface CerePlatformMemberLevelDAO extends BaseMapper findAll(); + List findAll(@Param("businessId") Long businessId); + + CerePlatformMemberLevel check(@Param("memberLevelId") Long memberLevelId); + + MemberLevel getById(@Param("memberLevelId") Long memberLevelId); + + List getAll(@Param("businessId")Long businessId); + + List findOther(@Param("memberLevelId") Long memberLevelId); + + int countMemberLevel(@Param("memberLevelName")String memberLevelName, + @Param("growth")Integer growth, + @Param("excludeMemberLevelId")Long excludeMemberLevelId); + + int countByGrowth(int growth); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/page/member/MemberLevel.java b/cereshop-business/src/main/java/com/shop/cereshop/business/page/member/MemberLevel.java new file mode 100644 index 0000000..01ec1af --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/page/member/MemberLevel.java @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.page.member; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 会员等级返回数据 + */ +@Data +@ApiModel(value = "MemberLevel", description = "会员等级返回数据") +public class MemberLevel { + + /** + * 会员等级id + */ + @ApiModelProperty(value = "会员等级id") + private Long memberLevelId; + + /** + * 等级名称 + */ + @ApiModelProperty(value = "等级名称") + private String memberLevelName; + + /** + * 图标 + */ + @ApiModelProperty(value = "图标") + private String memberLevelIcon; + + /** + * 背景图 + */ + @ApiModelProperty(value = "背景图") + private String memberLevelBackground; + + /** + * 成长值 + */ + @ApiModelProperty(value = "成长值") + private Integer growth; + + /** + * 会员权益id数组 + */ + @ApiModelProperty(value = "会员权益id数组") + private List ids; + + /** + * 等级说明 + */ + @ApiModelProperty(value = "等级说明") + private String memberLevelReason; + + /** + * 等级权益字符串 + */ + @ApiModelProperty(value = "等级权益字符串") + private String memberIds; + +} 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 index a255d67..6c2e38e 100644 --- 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 @@ -20,6 +20,9 @@ import java.util.List; @ApiModel(value = "MemberLevelSaveParam", description = "添加会员等级请求") public class MemberLevelSaveParam { + @ApiModelProperty(value = "等级所属商家id") + private Long businessId; + /** * 等级名称 */ 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 index 999a4ef..8ae4ea0 100644 --- 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 @@ -27,6 +27,12 @@ public class MemberLevelUpdateParam { private Long memberLevelId; /** + * 会员等级所属商家id + */ + @ApiModelProperty(value = "会员等级所属商家id") + private Long businessId; + + /** * 等级名称 */ @ApiModelProperty(value = "等级名称") diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/CerePlatformMemberLevelService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/CerePlatformMemberLevelService.java index 5e8bf1b..1976ab7 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/CerePlatformMemberLevelService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/CerePlatformMemberLevelService.java @@ -5,10 +5,28 @@ */ package com.shop.cereshop.business.service.member; +import com.shop.cereshop.business.page.member.MemberLevel; +import com.shop.cereshop.business.param.member.MemberLevelSaveParam; +import com.shop.cereshop.business.param.member.MemberLevelUpdateParam; +import com.shop.cereshop.business.param.member.MemberLevelgetByIdParam; +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.CerePlatformMemberLevel; +import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CerePlatformMemberLevelService { - List findAll() ; + List findAll(Long businessId) ; + + void save(MemberLevelSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; + + void update(MemberLevelUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException; + + void delete(MemberLevelgetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException; + + MemberLevel getById(MemberLevelgetByIdParam param) throws CoBusinessException; + + Page getAll(Long businessId, PageParam param) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/impl/CerePlatformMemberLevelServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/impl/CerePlatformMemberLevelServiceImpl.java index af2d1fb..486ca62 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/impl/CerePlatformMemberLevelServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/member/impl/CerePlatformMemberLevelServiceImpl.java @@ -5,11 +5,29 @@ */ 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.CerePlatformMemberLevelDAO; +import com.shop.cereshop.business.page.member.MemberLevel; +import com.shop.cereshop.business.param.member.MemberLevelSaveParam; +import com.shop.cereshop.business.param.member.MemberLevelUpdateParam; +import com.shop.cereshop.business.param.member.MemberLevelgetByIdParam; +import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.member.CerePlatformMemberLevelService; +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.CerePlatformMemberLevel; +import com.shop.cereshop.commons.exception.CoBusinessException; +import com.shop.cereshop.commons.utils.EmptyUtils; +import com.shop.cereshop.commons.utils.TimeUtils; +import org.apache.commons.lang3.StringUtils; 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; @@ -19,8 +37,104 @@ public class CerePlatformMemberLevelServiceImpl implements CerePlatformMemberLev @Autowired private CerePlatformMemberLevelDAO cerePlatformMemberLevelDAO; + @Autowired + private CerePlatformLogService cerePlatformLogService; + + @Override + public List findAll(Long businessId) { + return cerePlatformMemberLevelDAO.findAll(businessId); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void save(MemberLevelSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { + String time= TimeUtils.yyMMddHHmmss(); + if (cerePlatformMemberLevelDAO.countMemberLevel(StringUtils.trim(param.getMemberLevelName()), param.getGrowth(), null) > 0) { + throw new CoBusinessException(CoReturnFormat.EXIST_MEMBER_LEVEL); + } + if (param.getGrowth() != 0 && cerePlatformMemberLevelDAO.countByGrowth(0) == 0) { + throw new CoBusinessException(CoReturnFormat.NEED_ZERO_GROWTH); + } + CerePlatformMemberLevel memberLevel=new CerePlatformMemberLevel(); + memberLevel.setBusinessId(param.getBusinessId()); + memberLevel.setMemberLevelName(param.getMemberLevelName()); + memberLevel.setMemberLevelIcon(param.getMemberLevelIcon()); + memberLevel.setMemberLevelBackground(param.getMemberLevelBackground()); + memberLevel.setMemberIds(EmptyUtils.getImage(param.getIds())); + memberLevel.setGrowth(param.getGrowth()); + memberLevel.setMemberLevelReason(param.getMemberLevelReason()); + memberLevel.setCreateTime(time); + cerePlatformMemberLevelDAO.insert(memberLevel); + //新增日志 + cerePlatformLogService.addLog(user,"会员管理","商家端操作","添加会员等级",memberLevel.getMemberLevelId(),time); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void update(MemberLevelUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { + String time= TimeUtils.yyMMddHHmmss(); + if (cerePlatformMemberLevelDAO.countMemberLevel(StringUtils.trim(param.getMemberLevelName()), param.getGrowth(), param.getMemberLevelId()) > 0) { + throw new CoBusinessException(CoReturnFormat.EXIST_MEMBER_LEVEL); + } + CerePlatformMemberLevel oldLevel = cerePlatformMemberLevelDAO.selectByPrimaryKey(param.getMemberLevelId()); + if (oldLevel == null) { + throw new CoBusinessException(CoReturnFormat.PARAM_INVALID); + } + if (oldLevel.getGrowth() == 0 && param.getGrowth() != 0) { + throw new CoBusinessException(CoReturnFormat.NEED_ZERO_GROWTH); + } + CerePlatformMemberLevel memberLevel=new CerePlatformMemberLevel(); + memberLevel.setMemberLevelId(param.getMemberLevelId()); + memberLevel.setBusinessId(param.getBusinessId()); + memberLevel.setMemberLevelName(param.getMemberLevelName()); + memberLevel.setMemberLevelIcon(param.getMemberLevelIcon()); + memberLevel.setMemberLevelBackground(param.getMemberLevelBackground()); + memberLevel.setMemberIds(EmptyUtils.getImage(param.getIds())); + memberLevel.setGrowth(param.getGrowth()); + memberLevel.setMemberLevelReason(param.getMemberLevelReason()); + memberLevel.setUpdateTime(time); + cerePlatformMemberLevelDAO.updateByPrimaryKeySelective(memberLevel); + //新增日志 + cerePlatformLogService.addLog(user,"会员管理","商家端操作","编辑会员等级",memberLevel.getMemberLevelId(),time); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void delete(MemberLevelgetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException { + //校验该会员等级是否关联待开始和进行中状态的场景营销活动 + CerePlatformMemberLevel memberLevel=cerePlatformMemberLevelDAO.check(param.getMemberLevelId()); + if(memberLevel!=null){ + throw new CoBusinessException(CoReturnFormat.MEMBER_LEVEL_NOT_DELETE); + } + //查询当前是否还有其他会员等级数据 + List ids=cerePlatformMemberLevelDAO.findOther(param.getMemberLevelId()); + if(EmptyUtils.isEmpty(ids)){ + throw new CoBusinessException(CoReturnFormat.MEMBER_LEVEL_MUST_ONE); + } + CerePlatformMemberLevel oldLevel = cerePlatformMemberLevelDAO.selectByPrimaryKey(param.getMemberLevelId()); + if (oldLevel != null && oldLevel.getGrowth() == 0) { + throw new CoBusinessException(CoReturnFormat.NEED_ZERO_GROWTH); + } + cerePlatformMemberLevelDAO.deleteByPrimaryKey(param.getMemberLevelId()); + //新增日志 + cerePlatformLogService.addLog(user,"会员管理","商家端操作","删除会员等级",param.getMemberLevelId(),TimeUtils.yyMMddHHmmss()); + } + + @Override + public MemberLevel getById(MemberLevelgetByIdParam param) throws CoBusinessException { + MemberLevel memberLevel=cerePlatformMemberLevelDAO.getById(param.getMemberLevelId()); + if(memberLevel!=null){ + memberLevel.setIds(EmptyUtils.getImages(memberLevel.getMemberIds())); + } + return memberLevel; + } + @Override - public List findAll() { - return cerePlatformMemberLevelDAO.findAll(); + public Page getAll(Long businessId, PageParam param) throws CoBusinessException { + PageHelper.startPage(param.getPage(),param.getPageSize()); + List list=cerePlatformMemberLevelDAO.getAll(businessId); + PageInfo pageInfo=new PageInfo<>(list); + Page page=new Page(pageInfo.getList(),pageInfo.getTotal()); + return page; } } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/scene/impl/CereShopSceneServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/scene/impl/CereShopSceneServiceImpl.java index 5169976..ca3862b 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/scene/impl/CereShopSceneServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/scene/impl/CereShopSceneServiceImpl.java @@ -135,7 +135,7 @@ public class CereShopSceneServiceImpl implements CereShopSceneService { List collect=null; if(IntegerEnum.SCEME_RULE_ALL.getCode().equals(param.getSceneRule())){ //查询所有会员数据 - List memberLevels=cerePlatformMemberLevelService.findAll(); + List memberLevels=cerePlatformMemberLevelService.findAll(user.getBusinessId()); if(!EmptyUtils.isEmpty(memberLevels)&&!EmptyUtils.isEmpty(param.getMemberParams())){ collect=memberLevels.stream().map(a -> { CereShopSceneMember cereShopSceneMember = new CereShopSceneMember(); @@ -257,7 +257,7 @@ public class CereShopSceneServiceImpl implements CereShopSceneService { List collect=null; if(IntegerEnum.SCEME_RULE_ALL.getCode().equals(param.getSceneRule())){ //查询所有会员数据 - List memberLevels=cerePlatformMemberLevelService.findAll(); + List memberLevels=cerePlatformMemberLevelService.findAll(user.getBusinessId()); if(!EmptyUtils.isEmpty(memberLevels)&&!EmptyUtils.isEmpty(param.getMemberParams())){ collect=memberLevels.stream().map(a -> { CereShopSceneMember cereShopSceneMember = new CereShopSceneMember(); diff --git a/cereshop-business/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml index 4c90123..7aa36a1 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml @@ -124,7 +124,46 @@ where member_level_id = #{memberLevelId,jdbcType=BIGINT} - + SELECT * FROM cere_platform_member_level where business_id=#{businessId} + + + + + + + + + + + + + diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/member/CerePlatformMemberLevel.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/member/CerePlatformMemberLevel.java index 4c883a4..2742a3c 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/member/CerePlatformMemberLevel.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/member/CerePlatformMemberLevel.java @@ -24,6 +24,11 @@ public class CerePlatformMemberLevel implements Serializable { private Long memberLevelId; /** + * 所属商家id + */ + private Long businessId; + + /** * 等级名称 */ private String memberLevelName; diff --git a/doc/3.0/update.sql b/doc/3.0/update.sql index f626578..1dceab2 100644 --- a/doc/3.0/update.sql +++ b/doc/3.0/update.sql @@ -299,3 +299,7 @@ ALTER TABLE `cere_platform_label` -- 会员权益表增加商家表关联Id ALTER TABLE `cere_platform_membership` ADD COLUMN `business_id` bigint(20) DEFAULT 0 COMMENT '商家Id'; + +-- 会员等级表增加商家表关联Id +ALTER TABLE `cere_platform_member_level` + ADD COLUMN `business_id` bigint(20) DEFAULT 0 COMMENT '商家Id';