| @@ -2,6 +2,8 @@ package com.iformall.controller.basic; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.annotation.TenantIgnore; | |||||
| import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.Result; | import com.iformall.common.Result; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| @@ -49,7 +51,7 @@ public class WxBrandController extends BaseController { | |||||
| if (null == wxBrand) { | if (null == wxBrand) { | ||||
| wxBrand = new WxBrand(); | wxBrand = new WxBrand(); | ||||
| } | } | ||||
| wxBrand.updateTenantInfo(getTenantInfo()); | |||||
| wxBrand.setTenantId(getTenantInfo().getFinalTenantId()); | |||||
| wxBrand.setSortColumns(BaseEntity.SortField.Id_DESC); | wxBrand.setSortColumns(BaseEntity.SortField.Id_DESC); | ||||
| final PageInfo<WxBrand> page = wxBrandService.listAsPage(wxBrand, pageNum, pageSize); | final PageInfo<WxBrand> page = wxBrandService.listAsPage(wxBrand, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| @@ -59,20 +61,24 @@ public class WxBrandController extends BaseController { | |||||
| @SystemControllerLog(description = "品牌-增加") | @SystemControllerLog(description = "品牌-增加") | ||||
| public ResultData add(@RequestBody WxBrand wxBrand) { | public ResultData add(@RequestBody WxBrand wxBrand) { | ||||
| logger.debug("[" + getIpAddr() + "] WxBrandController::add"); | logger.debug("[" + getIpAddr() + "] WxBrandController::add"); | ||||
| wxBrand.updateTenantInfo(getTenantInfo()); | |||||
| wxBrand.setTenantId(getTenantInfo().getFinalTenantId()); | |||||
| return wxBrandService.save(wxBrand); | return wxBrandService.save(wxBrand); | ||||
| } | } | ||||
| @TenantIgnore | |||||
| @PostMapping("update") | @PostMapping("update") | ||||
| @SystemControllerLog(description = "品牌-更新") | @SystemControllerLog(description = "品牌-更新") | ||||
| public ResultData update(@RequestBody WxBrand wxBrand) { | public ResultData update(@RequestBody WxBrand wxBrand) { | ||||
| logger.debug("[" + getIpAddr() + "] WxBrandController::update"); | logger.debug("[" + getIpAddr() + "] WxBrandController::update"); | ||||
| wxBrand.updateTenantInfo(getTenantInfo()); | |||||
| if(wxBrand.getId() == null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(EnumDelFlag.YES.getCode().equals(wxBrand.getIsDel())){ | if(EnumDelFlag.YES.getCode().equals(wxBrand.getIsDel())){ | ||||
| //判断是否解绑商户 | //判断是否解绑商户 | ||||
| WxMerchant wxMerchant = new WxMerchant(); | WxMerchant wxMerchant = new WxMerchant(); | ||||
| wxMerchant.updateTenantInfo(wxBrand); | |||||
| // wxMerchant.updateTenantInfo(wxBrand); | |||||
| wxMerchant.setIsDel(EnumYesOrNo.NO.getCode()); | wxMerchant.setIsDel(EnumYesOrNo.NO.getCode()); | ||||
| wxMerchant.setBrand(wxBrand.getId()); | wxMerchant.setBrand(wxBrand.getId()); | ||||
| @@ -118,10 +124,10 @@ public class WxBrandController extends BaseController { | |||||
| public ResultData hasBrand(String name, Long id) { | public ResultData hasBrand(String name, Long id) { | ||||
| logger.debug("[" + getIpAddr() + "] WxBrandController::hasBrand"); | logger.debug("[" + getIpAddr() + "] WxBrandController::hasBrand"); | ||||
| WxBrand wxBrand = new WxBrand(); | WxBrand wxBrand = new WxBrand(); | ||||
| wxBrand.updateTenantInfo(getTenantInfo()); | |||||
| wxBrand.setId(id); | |||||
| wxBrand.setTenantId(getTenantInfo().getFinalTenantId()); | |||||
| wxBrand.setName(name); | wxBrand.setName(name); | ||||
| wxBrand.setId(id); | |||||
| return wxBrandService.hasBrand(wxBrand); | return wxBrandService.hasBrand(wxBrand); | ||||
| } | } | ||||
| @@ -154,7 +154,7 @@ public class WxProjectConfigController extends BaseController { | |||||
| tenantEntity.setTenantId(wxMall.getId().toString()); | tenantEntity.setTenantId(wxMall.getId().toString()); | ||||
| WxMall parentWxMall = wxMallService.getByTenantInfo(tenantEntity); | WxMall parentWxMall = wxMallService.getByTenantInfo(tenantEntity); | ||||
| if(parentWxMall == null || !EnumSaleType.GROUP.getCode().equals(parentWxMall.getSaleType()) | |||||
| if(parentWxMall == null | |||||
| || !parentWxMall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode()) | || !parentWxMall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode()) | ||||
| || StringUtils.isNotBlank(parentWxMall.getParentTenantId())){ | || StringUtils.isNotBlank(parentWxMall.getParentTenantId())){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | ||||
| @@ -177,7 +177,8 @@ public class WxProjectConfigController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initMall"); | logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initMall"); | ||||
| try { | try { | ||||
| //集团版 | //集团版 | ||||
| if(EnumSaleType.GROUP.getCode().equals(wxMall.getSaleType())){ | |||||
| if(EnumSaleType.GROUP.getCode().equals(wxMall.getSaleType()) | |||||
| || EnumSaleType.GROUP_v1.getCode().equals(wxMall.getSaleType())){ | |||||
| wxMall.setGroupSupport(EnumGroupSupport.SUPPORT.getCode()); | wxMall.setGroupSupport(EnumGroupSupport.SUPPORT.getCode()); | ||||
| }else{ | }else{ | ||||
| wxMall.setGroupSupport(EnumGroupSupport.NOT_SUPPORT.getCode()); | wxMall.setGroupSupport(EnumGroupSupport.NOT_SUPPORT.getCode()); | ||||
| @@ -22,6 +22,7 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| "mall_permission", | "mall_permission", | ||||
| "mall_sale_type", | "mall_sale_type", | ||||
| "mall_user_role", | "mall_user_role", | ||||
| "wx_brand", | |||||
| "wx_channel", | "wx_channel", | ||||
| "wx_business", | "wx_business", | ||||
| "wx_sub_business", | "wx_sub_business", | ||||
| @@ -74,6 +75,7 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| "wx_mall", | "wx_mall", | ||||
| "wx_appinfo", | "wx_appinfo", | ||||
| "wx_authorizer_info", | "wx_authorizer_info", | ||||
| "wx_brand", | |||||
| "wx_c_user", | "wx_c_user", | ||||
| "tt_c_user", | "tt_c_user", | ||||
| "wx_user_visit", | "wx_user_visit", | ||||
| @@ -0,0 +1,4 @@ | |||||
| --历史品牌数据 | |||||
| UPDATE `mallink`.`wx_brand` SET `tenant_id` = `parent_tenant_id` WHERE `parent_tenant_id` is not null and `parent_tenant_id` != ''; | |||||
| UPDATE `mallink`.`wx_brand` SET `parent_tenant_id` = null; | |||||
| @@ -23,6 +23,7 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| "mall_permission", | "mall_permission", | ||||
| "mall_sale_type", | "mall_sale_type", | ||||
| "mall_user_role", | "mall_user_role", | ||||
| "wx_brand", | |||||
| "wx_channel", | "wx_channel", | ||||
| "wx_business", | "wx_business", | ||||
| "wx_coupon_type", | "wx_coupon_type", | ||||
| @@ -62,6 +63,7 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| "wx_mall", | "wx_mall", | ||||
| "wx_appinfo", | "wx_appinfo", | ||||
| "wx_authorizer_info", | "wx_authorizer_info", | ||||
| "wx_brand", | |||||
| "wx_c_user", | "wx_c_user", | ||||
| "tt_c_user", | "tt_c_user", | ||||
| "wx_user_visit", | "wx_user_visit", | ||||
| @@ -23,6 +23,7 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| "mall_permission", | "mall_permission", | ||||
| "mall_sale_type", | "mall_sale_type", | ||||
| "mall_user_role", | "mall_user_role", | ||||
| "wx_brand", | |||||
| "wx_channel", | "wx_channel", | ||||
| "wx_business", | "wx_business", | ||||
| "wx_coupon_type", | "wx_coupon_type", | ||||
| @@ -67,6 +68,7 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| "wx_mall", | "wx_mall", | ||||
| "wx_appinfo", | "wx_appinfo", | ||||
| "wx_authorizer_info", | "wx_authorizer_info", | ||||
| "wx_brand", | |||||
| "wx_c_user", | "wx_c_user", | ||||
| "tt_c_user", | "tt_c_user", | ||||
| "wx_user_visit", | "wx_user_visit", | ||||
| @@ -23,6 +23,7 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| "mall_permission", | "mall_permission", | ||||
| "mall_sale_type", | "mall_sale_type", | ||||
| "mall_user_role", | "mall_user_role", | ||||
| "wx_brand", | |||||
| "wx_channel", | "wx_channel", | ||||
| "wx_business", | "wx_business", | ||||
| "wx_coupon_type", | "wx_coupon_type", | ||||
| @@ -67,6 +68,7 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| "wx_mall", | "wx_mall", | ||||
| "wx_appinfo", | "wx_appinfo", | ||||
| "wx_authorizer_info", | "wx_authorizer_info", | ||||
| "wx_brand", | |||||
| "wx_c_user", | "wx_c_user", | ||||
| "tt_c_user", | "tt_c_user", | ||||
| "wx_user_visit", | "wx_user_visit", | ||||
| @@ -113,6 +113,7 @@ public enum ErrorCode{ | |||||
| MERCHANT_BUSER_NOT_VALID(2016, "商户用户不存在或已被禁用"), | MERCHANT_BUSER_NOT_VALID(2016, "商户用户不存在或已被禁用"), | ||||
| MERCHANT_HASRENTCONTRACT(2017,"该商户存在计租中合同"), | MERCHANT_HASRENTCONTRACT(2017,"该商户存在计租中合同"), | ||||
| MERCHANT_CODE_IS_FOUND(2018, "商户编码已存在"), | MERCHANT_CODE_IS_FOUND(2018, "商户编码已存在"), | ||||
| MERCHANT_BRAND_IS_FOUND(2019, "品牌商户已存在"), | |||||
| /** | /** | ||||
| * 券 | * 券 | ||||
| @@ -13,6 +13,7 @@ public enum EnumSaleType { | |||||
| WX_ENJOY_TRY(4, "速享试用版"), | WX_ENJOY_TRY(4, "速享试用版"), | ||||
| TT_ALL_ROUND(11, "抖音尊享版"), | TT_ALL_ROUND(11, "抖音尊享版"), | ||||
| GROUP(100, "集团版"), | GROUP(100, "集团版"), | ||||
| GROUP_v1(101, "集团版"), | |||||
| WX_JM_ALL_ROUND(1035001036,"金茂全能版"), | WX_JM_ALL_ROUND(1035001036,"金茂全能版"), | ||||
| ; | ; | ||||
| @@ -30,6 +30,7 @@ public interface WxMerchantMapper extends CommonMapper<WxMerchant, Long> { | |||||
| int hasMerchant(WxMerchant wxMerchant); | int hasMerchant(WxMerchant wxMerchant); | ||||
| int hasMerchantEncode(WxMerchant wxMerchant); | int hasMerchantEncode(WxMerchant wxMerchant); | ||||
| int hasMerchantBrand(WxMerchant wxMerchant); | |||||
| void updateCreditLocked(WxMerchant wxMerchant); | void updateCreditLocked(WxMerchant wxMerchant); | ||||
| @@ -56,4 +57,5 @@ public interface WxMerchantMapper extends CommonMapper<WxMerchant, Long> { | |||||
| Map<String,Object> findShopMerchant(@Param("id")Long id); | Map<String,Object> findShopMerchant(@Param("id")Long id); | ||||
| int deleteByUpdate(Long id); | int deleteByUpdate(Long id); | ||||
| } | } | ||||
| @@ -160,6 +160,7 @@ public interface WxMerchantService { | |||||
| boolean hasMerchant(WxMerchant wxMerchant); | boolean hasMerchant(WxMerchant wxMerchant); | ||||
| boolean hasMerchantEncode(WxMerchant wxMerchant); | boolean hasMerchantEncode(WxMerchant wxMerchant); | ||||
| boolean hasMerchantBrand(WxMerchant wxMerchant); | |||||
| WxMerchant getMerchantByEncode(String encode); | WxMerchant getMerchantByEncode(String encode); | ||||
| @@ -101,7 +101,7 @@ public class WxBrandServiceImpl implements WxBrandService { | |||||
| @Override | @Override | ||||
| public List<Map<String,Object>> queryBrand(TenantEntity tenantEntity) { | public List<Map<String,Object>> queryBrand(TenantEntity tenantEntity) { | ||||
| WxBrand wxBrand = new WxBrand(); | WxBrand wxBrand = new WxBrand(); | ||||
| wxBrand.updateTenantInfo(tenantEntity); | |||||
| wxBrand.setTenantId(tenantEntity.getFinalTenantId()); | |||||
| return wxBrandMapper.queryBrandByTenant(wxBrand); | return wxBrandMapper.queryBrandByTenant(wxBrand); | ||||
| } | } | ||||
| @@ -115,7 +115,7 @@ public class WxBrandServiceImpl implements WxBrandService { | |||||
| @Override | @Override | ||||
| public Map<Long, WxBrand> getAllMap(TenantEntity tenantEntity) { | public Map<Long, WxBrand> getAllMap(TenantEntity tenantEntity) { | ||||
| WxBrand brandQ = new WxBrand(); | WxBrand brandQ = new WxBrand(); | ||||
| brandQ.updateTenantInfo(tenantEntity); | |||||
| brandQ.setTenantId(tenantEntity.getFinalTenantId()); | |||||
| List<WxBrand> brandList = wxBrandMapper.findList(brandQ); | List<WxBrand> brandList = wxBrandMapper.findList(brandQ); | ||||
| Map<Long,WxBrand> map = new HashMap<Long,WxBrand>(); | Map<Long,WxBrand> map = new HashMap<Long,WxBrand>(); | ||||
| if (null != brandList) { | if (null != brandList) { | ||||
| @@ -203,7 +203,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||||
| } | } | ||||
| //清除缓存 | //清除缓存 | ||||
| clearCache(record); | clearCache(record); | ||||
| return new ResultData(); | |||||
| return new ResultData(record); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -509,9 +509,14 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| if (hasMerchant(wxMerchant)) { | if (hasMerchant(wxMerchant)) { | ||||
| return new ResultData(ErrorCode.MERCHANT_NAME_IS_FOUND); | return new ResultData(ErrorCode.MERCHANT_NAME_IS_FOUND); | ||||
| } | } | ||||
| //检查商户唯一编码 | |||||
| if (hasMerchantEncode(wxMerchant)) { | if (hasMerchantEncode(wxMerchant)) { | ||||
| return new ResultData(ErrorCode.MERCHANT_CODE_IS_FOUND); | return new ResultData(ErrorCode.MERCHANT_CODE_IS_FOUND); | ||||
| } | } | ||||
| //检查品牌 | |||||
| if (hasMerchantBrand(wxMerchant)) { | |||||
| return new ResultData(ErrorCode.MERCHANT_BRAND_IS_FOUND); | |||||
| } | |||||
| //保存商户商铺的关联 | //保存商户商铺的关联 | ||||
| List<Long> shopidlist = wxMerchant.getShopids(); | List<Long> shopidlist = wxMerchant.getShopids(); | ||||
| if (shopidlist.isEmpty()) { | if (shopidlist.isEmpty()) { | ||||
| @@ -1026,6 +1031,15 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| } | } | ||||
| } | } | ||||
| @Override | |||||
| public boolean hasMerchantBrand(WxMerchant wxMerchant) { | |||||
| if(wxMerchant.getBrand() != null && wxMallService.isgroupSupport(wxMerchant)){ | |||||
| wxMerchant.setStatus(EnumMerchantStatus.VALID.getCode()); | |||||
| return wxMerchantMapper.hasMerchantBrand(wxMerchant) > 0 ? true : false; | |||||
| } | |||||
| return false; | |||||
| } | |||||
| @Override | @Override | ||||
| public WxMerchant getMerchantByEncode(String encode){ | public WxMerchant getMerchantByEncode(String encode){ | ||||
| return wxMerchantMapper.getMerchantByEncode(encode); | return wxMerchantMapper.getMerchantByEncode(encode); | ||||
| @@ -101,6 +101,7 @@ public class WxRentPropertyContractServiceImpl implements WxRentPropertyContract | |||||
| data.put("status", wfr.getStatus()); | data.put("status", wfr.getStatus()); | ||||
| data.put("userName", wfr.getUserName()); | data.put("userName", wfr.getUserName()); | ||||
| data.put("remark", wfr.getRemark()); | data.put("remark", wfr.getRemark()); | ||||
| data.put("updateDate",wfr.getUpdateDate()); | |||||
| result.add(data); | result.add(data); | ||||
| } | } | ||||
| return new ResultData(result); | return new ResultData(result); | ||||
| @@ -313,10 +313,24 @@ | |||||
| <select id="hasMerchantEncode" parameterType="com.iformall.domain.po.WxMerchant" resultType="int"> | <select id="hasMerchantEncode" parameterType="com.iformall.domain.po.WxMerchant" resultType="int"> | ||||
| select count(1) from wx_merchant where `encode`=#{encode} | select count(1) from wx_merchant where `encode`=#{encode} | ||||
| <if test=" null != status "> | |||||
| and `status` = #{status} | |||||
| </if> | |||||
| <if test=" null != id"> | |||||
| and `id` != #{id} | |||||
| </if> | |||||
| </select> | |||||
| <select id="hasMerchantBrand" parameterType="com.iformall.domain.po.WxMerchant" resultType="int"> | |||||
| select count(1) from wx_merchant where `brand`=#{brand} | |||||
| <if test=" null != status "> | |||||
| and `status` = #{status} | |||||
| </if> | |||||
| <if test=" null != id"> | <if test=" null != id"> | ||||
| and `id` != #{id} | and `id` != #{id} | ||||
| </if> | </if> | ||||
| </select> | </select> | ||||
| <update id="updateCreditLocked" parameterType="com.iformall.domain.po.WxMerchant"> | <update id="updateCreditLocked" parameterType="com.iformall.domain.po.WxMerchant"> | ||||
| update wx_merchant set credit_locked = #{creditLocked} where tenant_id = #{tenantId} | update wx_merchant set credit_locked = #{creditLocked} where tenant_id = #{tenantId} | ||||
| @@ -2,6 +2,8 @@ package com.iformall.controller.basic; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.annotation.TenantIgnore; | |||||
| import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.Result; | import com.iformall.common.Result; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| @@ -9,6 +11,7 @@ import com.iformall.domain.po.base.BaseEntity; | |||||
| import com.iformall.domain.po.WxBrand; | import com.iformall.domain.po.WxBrand; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.enums.EnumDelFlag; | import com.iformall.enums.EnumDelFlag; | ||||
| import com.iformall.enums.EnumYesOrNo; | |||||
| import com.iformall.service.WxBrandService; | import com.iformall.service.WxBrandService; | ||||
| import com.iformall.service.WxMerchantService; | import com.iformall.service.WxMerchantService; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| @@ -48,7 +51,7 @@ public class WxBrandController extends BaseController { | |||||
| if (null == wxBrand) { | if (null == wxBrand) { | ||||
| wxBrand = new WxBrand(); | wxBrand = new WxBrand(); | ||||
| } | } | ||||
| wxBrand.updateTenantInfo(getTenantInfo()); | |||||
| wxBrand.setTenantId(getTenantInfo().getFinalTenantId()); | |||||
| wxBrand.setSortColumns(BaseEntity.SortField.Id_DESC); | wxBrand.setSortColumns(BaseEntity.SortField.Id_DESC); | ||||
| final PageInfo<WxBrand> page = wxBrandService.listAsPage(wxBrand, pageNum, pageSize); | final PageInfo<WxBrand> page = wxBrandService.listAsPage(wxBrand, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| @@ -58,22 +61,26 @@ public class WxBrandController extends BaseController { | |||||
| @SystemControllerLog(description = "品牌-增加") | @SystemControllerLog(description = "品牌-增加") | ||||
| public ResultData add(@RequestBody WxBrand wxBrand) { | public ResultData add(@RequestBody WxBrand wxBrand) { | ||||
| logger.debug("[" + getIpAddr() + "] WxBrandController::add"); | logger.debug("[" + getIpAddr() + "] WxBrandController::add"); | ||||
| wxBrand.updateTenantInfo(getTenantInfo()); | |||||
| wxBrand.setTenantId(getTenantInfo().getFinalTenantId()); | |||||
| return wxBrandService.save(wxBrand); | return wxBrandService.save(wxBrand); | ||||
| } | } | ||||
| @TenantIgnore | |||||
| @PostMapping("update") | @PostMapping("update") | ||||
| @SystemControllerLog(description = "品牌-更新") | @SystemControllerLog(description = "品牌-更新") | ||||
| public ResultData update(@RequestBody WxBrand wxBrand) { | public ResultData update(@RequestBody WxBrand wxBrand) { | ||||
| logger.debug("[" + getIpAddr() + "] WxBrandController::update"); | logger.debug("[" + getIpAddr() + "] WxBrandController::update"); | ||||
| wxBrand.updateTenantInfo(getTenantInfo()); | |||||
| if(wxBrand.getId() == null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(EnumDelFlag.YES.getCode().equals(wxBrand.getIsDel())){ | if(EnumDelFlag.YES.getCode().equals(wxBrand.getIsDel())){ | ||||
| //判断是否解绑商户 | //判断是否解绑商户 | ||||
| WxMerchant wxMerchant = new WxMerchant(); | WxMerchant wxMerchant = new WxMerchant(); | ||||
| wxMerchant.setIsDel(0); | |||||
| // wxMerchant.updateTenantInfo(wxBrand); | |||||
| wxMerchant.setIsDel(EnumYesOrNo.NO.getCode()); | |||||
| wxMerchant.setBrand(wxBrand.getId()); | wxMerchant.setBrand(wxBrand.getId()); | ||||
| wxMerchant.updateTenantInfo(wxBrand); | |||||
| List<WxMerchant> merchantList = wxMerchantService.findList(wxMerchant); | List<WxMerchant> merchantList = wxMerchantService.findList(wxMerchant); | ||||
| if(CollectionUtils.isNotEmpty(merchantList)){ | if(CollectionUtils.isNotEmpty(merchantList)){ | ||||
| @@ -117,9 +124,10 @@ public class WxBrandController extends BaseController { | |||||
| public ResultData hasBrand(String name, Long id) { | public ResultData hasBrand(String name, Long id) { | ||||
| logger.debug("[" + getIpAddr() + "] WxBrandController::hasBrand"); | logger.debug("[" + getIpAddr() + "] WxBrandController::hasBrand"); | ||||
| WxBrand wxBrand = new WxBrand(); | WxBrand wxBrand = new WxBrand(); | ||||
| wxBrand.updateTenantInfo(getTenantInfo()); | |||||
| wxBrand.setName(name); | |||||
| wxBrand.setId(id); | wxBrand.setId(id); | ||||
| wxBrand.setTenantId(getTenantInfo().getFinalTenantId()); | |||||
| wxBrand.setName(name); | |||||
| return wxBrandService.hasBrand(wxBrand); | return wxBrandService.hasBrand(wxBrand); | ||||
| } | } | ||||
| @@ -174,7 +174,8 @@ public class WxProjectConfigController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initMall"); | logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initMall"); | ||||
| try { | try { | ||||
| //集团版 | //集团版 | ||||
| if(EnumSaleType.GROUP.getCode().equals(wxMall.getSaleType())){ | |||||
| if(EnumSaleType.GROUP.getCode().equals(wxMall.getSaleType()) | |||||
| || EnumSaleType.GROUP_v1.getCode().equals(wxMall.getSaleType())){ | |||||
| wxMall.setGroupSupport(EnumGroupSupport.SUPPORT.getCode()); | wxMall.setGroupSupport(EnumGroupSupport.SUPPORT.getCode()); | ||||
| }else{ | }else{ | ||||
| wxMall.setGroupSupport(EnumGroupSupport.NOT_SUPPORT.getCode()); | wxMall.setGroupSupport(EnumGroupSupport.NOT_SUPPORT.getCode()); | ||||
| @@ -653,7 +654,7 @@ public class WxProjectConfigController extends BaseController { | |||||
| TenantEntity tenantEntity = new TenantEntity(); | TenantEntity tenantEntity = new TenantEntity(); | ||||
| tenantEntity.setTenantId(tenantId); | tenantEntity.setTenantId(tenantId); | ||||
| WxMall parentWxMall = wxMallService.getByTenantInfo(tenantEntity); | WxMall parentWxMall = wxMallService.getByTenantInfo(tenantEntity); | ||||
| if(parentWxMall == null || !EnumSaleType.GROUP.getCode().equals(parentWxMall.getSaleType()) | |||||
| if(parentWxMall == null | |||||
| || !parentWxMall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode()) | || !parentWxMall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode()) | ||||
| || StringUtils.isNotBlank(parentWxMall.getParentTenantId())){ | || StringUtils.isNotBlank(parentWxMall.getParentTenantId())){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | ||||
| @@ -690,7 +691,7 @@ public class WxProjectConfigController extends BaseController { | |||||
| tenantEntity.setTenantId(tenantId); | tenantEntity.setTenantId(tenantId); | ||||
| WxMall parentWxMall = wxMallService.getByTenantInfo(tenantEntity); | WxMall parentWxMall = wxMallService.getByTenantInfo(tenantEntity); | ||||
| if(parentWxMall == null || !EnumSaleType.GROUP.getCode().equals(parentWxMall.getSaleType()) | |||||
| if(parentWxMall == null | |||||
| || !parentWxMall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode()) | || !parentWxMall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode()) | ||||
| || StringUtils.isNotBlank(parentWxMall.getParentTenantId())){ | || StringUtils.isNotBlank(parentWxMall.getParentTenantId())){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | ||||