|
|
|
@@ -9,9 +9,11 @@ import com.iformall.annotation.TenantIgnore; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.common.SysConfigConstant; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.domain.vo.WxCUserVo; |
|
|
|
import com.iformall.domain.vo.WxCouponOrderCVo; |
|
|
|
import com.iformall.domain.vo.WxLevelMerchantCVo; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
@@ -92,6 +94,9 @@ public class WxUserGrantController extends BaseController { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private QrCodeService qrCodeService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
SysConfigService sysConfigService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@@ -772,9 +777,16 @@ public class WxUserGrantController extends BaseController { |
|
|
|
levelMerchant.updateTenantInfo(getTenantInfo()); |
|
|
|
levelMerchant.setLevelId(levelId); |
|
|
|
List<WxLevelMerchantCVo> levelMerchantList = wxLevelConfigService.findListCVo(levelMerchant); |
|
|
|
|
|
|
|
SysConfig sysConfig = sysConfigService.getByKey(SysConfigConstant.member_seconds_key, getTenantInfo()); |
|
|
|
if (null == sysConfig || StringUtils.isBlank(sysConfig.getConfigItemValue())) { |
|
|
|
return new ResultData(ErrorCode.SYS_CONFIG_VIERFY_SECODES_UNSET); |
|
|
|
} |
|
|
|
|
|
|
|
Map<String, Object> result = new HashMap(); |
|
|
|
result.put("id", member.getId()); |
|
|
|
result.put("dynamicId", WxCouponOrderCVo.calcuteExpiredCouponOrderId(String.valueOf(member.getId()),Integer.parseInt(sysConfig.getConfigItemValue()),null)); |
|
|
|
result.put("expiredSeconds", Integer.parseInt(sysConfig.getConfigItemValue())); |
|
|
|
result.put("level", level); |
|
|
|
result.put("levelMerchantList", levelMerchantList); |
|
|
|
return new ResultData(result); |
|
|
|
|