| @@ -151,7 +151,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 || parentWxMall.getSaleType() != 100 | |||||
| if(parentWxMall == null || !EnumSaleType.GROUP.getCode().equals(parentWxMall.getSaleType()) | |||||
| || !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); | ||||
| @@ -174,7 +174,7 @@ public class WxProjectConfigController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initMall"); | logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initMall"); | ||||
| try { | try { | ||||
| //集团版 | //集团版 | ||||
| if(wxMall.getSaleType().equals(100)){ | |||||
| if(EnumSaleType.GROUP.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()); | ||||
| @@ -12,10 +12,6 @@ import lombok.ToString; | |||||
| public class FmInsideCashOutMsg extends BaseMsg{ | public class FmInsideCashOutMsg extends BaseMsg{ | ||||
| private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||||
| private String tenantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="父租户id",name="parentTenantId") | |||||
| private String parentTenantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "提现ID", name = "cashOutId") | @io.swagger.annotations.ApiModelProperty(value = "提现ID", name = "cashOutId") | ||||
| private Long cashOutId; | private Long cashOutId; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "支付方式", name = "payWay") | @io.swagger.annotations.ApiModelProperty(value = "支付方式", name = "payWay") | ||||
| @@ -10,10 +10,6 @@ import lombok.ToString; | |||||
| public class FmInsideCouponVerifyMsg extends BaseMsg{ | public class FmInsideCouponVerifyMsg extends BaseMsg{ | ||||
| private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||||
| private String tenantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="父租户id",name="parentTenantId") | |||||
| private String parentTenantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "券包ID", name = "couponOrderId") | @io.swagger.annotations.ApiModelProperty(value = "券包ID", name = "couponOrderId") | ||||
| private Long couponOrderId; | private Long couponOrderId; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "B端商户ID", name = "merchantId") | @io.swagger.annotations.ApiModelProperty(value = "B端商户ID", name = "merchantId") | ||||
| @@ -9,10 +9,6 @@ import lombok.ToString; | |||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
| public class FmInsideOrderPushMsg extends BaseMsg{ | public class FmInsideOrderPushMsg extends BaseMsg{ | ||||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||||
| private String tenantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="父租户id",name="parentTenantId") | |||||
| private String parentTenantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "", name = "composeOrderId") | @io.swagger.annotations.ApiModelProperty(value = "", name = "composeOrderId") | ||||
| private Long batchOrderId; | private Long batchOrderId; | ||||
| @@ -9,10 +9,6 @@ import lombok.ToString; | |||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
| public class FmInsideOrderRefundMsg extends BaseMsg{ | public class FmInsideOrderRefundMsg extends BaseMsg{ | ||||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||||
| private String tenantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="父租户id",name="parentTenantId") | |||||
| private String parentTenantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "", name = "couponOrderId") | @io.swagger.annotations.ApiModelProperty(value = "", name = "couponOrderId") | ||||
| private Long couponOrderId; | private Long couponOrderId; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "退款订单ID", name = "orderId") | @io.swagger.annotations.ApiModelProperty(value = "退款订单ID", name = "orderId") | ||||
| @@ -9,10 +9,6 @@ import lombok.ToString; | |||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
| public class FmInsideOrderSuccessMsg extends BaseMsg{ | public class FmInsideOrderSuccessMsg extends BaseMsg{ | ||||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||||
| private String tenantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="父租户id",name="parentTenantId") | |||||
| private String parentTenantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "成功订单ID", name = "orderId") | @io.swagger.annotations.ApiModelProperty(value = "成功订单ID", name = "orderId") | ||||
| private Long orderId; | private Long orderId; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "券ID", name = "couponId") | @io.swagger.annotations.ApiModelProperty(value = "券ID", name = "couponId") | ||||
| @@ -0,0 +1,43 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| * Created by Stormeye on 2018/08/09. | |||||
| */ | |||||
| public enum EnumSaleType { | |||||
| // 1-B端, 2-C端, 3-服务号, 4-订阅号 | |||||
| WX_ALL_ROUND(1, "尊享全能版"), | |||||
| WX_MARKETING(2, "尊享营销版"), | |||||
| WX_ENJOY(3,"速享版"), | |||||
| WX_ENJOY_TRY(4, "速享试用版"), | |||||
| TT_ALL_ROUND(11, "抖音尊享版"), | |||||
| GROUP(100, "集团版"), | |||||
| WX_JM_ALL_ROUND(1035001036,"金茂全能版"), | |||||
| ; | |||||
| public static EnumSaleType getEnum(Integer code) { | |||||
| for (EnumSaleType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumSaleType(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -204,7 +204,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||||
| public ResultData addBatch(String type,String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime) { | public ResultData addBatch(String type,String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime) { | ||||
| //如果当前版本是推广版,则线上只能有一个拼团,一个砍价 | //如果当前版本是推广版,则线上只能有一个拼团,一个砍价 | ||||
| WxMall mall = wxMallService.getByTenantId(tenantEntity.getTenantId()); | WxMall mall = wxMallService.getByTenantId(tenantEntity.getTenantId()); | ||||
| if (mall.getSaleType().intValue() == 4 ) { | |||||
| if (EnumSaleType.WX_ENJOY_TRY.getCode().equals(mall.getSaleType())) { | |||||
| if (null != type && (type.equals(String.valueOf(EnumCouponType.COUPON_PRESS.getCode().intValue())) | if (null != type && (type.equals(String.valueOf(EnumCouponType.COUPON_PRESS.getCode().intValue())) | ||||
| || type.equals(String.valueOf(EnumCouponType.COUPON_GROUP.getCode().intValue())) | || type.equals(String.valueOf(EnumCouponType.COUPON_GROUP.getCode().intValue())) | ||||
| || type.equals(String.valueOf(EnumCouponType.COUPON_PREORDER.getCode().intValue())))) { | || type.equals(String.valueOf(EnumCouponType.COUPON_PREORDER.getCode().intValue())))) { | ||||
| @@ -8,6 +8,7 @@ import com.iformall.controller.base.BaseController; | |||||
| import com.iformall.domain.po.MallUserInfo; | import com.iformall.domain.po.MallUserInfo; | ||||
| import com.iformall.domain.po.WxMall; | import com.iformall.domain.po.WxMall; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.enums.EnumSaleType; | |||||
| import com.iformall.enums.EnumYesOrNo; | import com.iformall.enums.EnumYesOrNo; | ||||
| import com.iformall.service.MallUserInfoService; | import com.iformall.service.MallUserInfoService; | ||||
| import com.iformall.service.WxMallService; | import com.iformall.service.WxMallService; | ||||
| @@ -76,7 +77,7 @@ public class WxMallController extends BaseController { | |||||
| } | } | ||||
| wxMall.setServicePhone(wxMall.getAdminPhone()); | wxMall.setServicePhone(wxMall.getAdminPhone()); | ||||
| if(wxMall.getSaleType() == null){ | if(wxMall.getSaleType() == null){ | ||||
| wxMall.setSaleType(1); | |||||
| wxMall.setSaleType(EnumSaleType.WX_ALL_ROUND.getCode()); | |||||
| } | } | ||||
| if(wxMall.getAdminStatus() == null){ | if(wxMall.getAdminStatus() == null){ | ||||
| @@ -12,6 +12,7 @@ import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.vo.WxWeappInfo; | import com.iformall.domain.vo.WxWeappInfo; | ||||
| import com.iformall.enums.EnumGroupSupport; | import com.iformall.enums.EnumGroupSupport; | ||||
| import com.iformall.enums.EnumInvestUserType; | import com.iformall.enums.EnumInvestUserType; | ||||
| import com.iformall.enums.EnumSaleType; | |||||
| import com.iformall.enums.EnumUserAdmin; | import com.iformall.enums.EnumUserAdmin; | ||||
| import com.iformall.service.*; | import com.iformall.service.*; | ||||
| import com.iformall.shiro.PasswordHelper; | import com.iformall.shiro.PasswordHelper; | ||||
| @@ -153,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 || parentWxMall.getSaleType() != 100 | |||||
| if(parentWxMall == null || !EnumSaleType.GROUP.getCode().equals(parentWxMall.getSaleType()) | |||||
| || !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); | ||||
| @@ -176,7 +177,7 @@ public class WxProjectConfigController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initMall"); | logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initMall"); | ||||
| try { | try { | ||||
| //集团版 | //集团版 | ||||
| if(wxMall.getSaleType().equals(100)){ | |||||
| if(EnumSaleType.GROUP.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()); | ||||
| @@ -654,7 +655,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 || parentWxMall.getSaleType() != 100 | |||||
| if(parentWxMall == null || !EnumSaleType.GROUP.getCode().equals(parentWxMall.getSaleType()) | |||||
| || !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); | ||||
| @@ -691,7 +692,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 || parentWxMall.getSaleType() != 100 | |||||
| if(parentWxMall == null || !EnumSaleType.GROUP.getCode().equals(parentWxMall.getSaleType()) | |||||
| || !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); | ||||