|
|
|
@@ -7,7 +7,10 @@ import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
|
|
|
|
import com.iformall.domain.po.WxMerchant; |
|
|
|
import com.iformall.domain.po.WxMiniappThemeValue; |
|
|
|
import com.iformall.enums.EnumCouponType; |
|
|
|
import com.iformall.utils.RedisCacheUtils; |
|
|
|
import org.apache.commons.beanutils.BeanUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
@@ -56,6 +59,10 @@ public class WxCouponController extends BaseController { |
|
|
|
@Qualifier("couponDetailRedisTemplate") |
|
|
|
RedisTemplate<String, WxCouponCVo> cdRedisTemplate; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Qualifier("objectCommonRedisTemplate") |
|
|
|
RedisTemplate<String, Object> objectCommonRedisTemplate; |
|
|
|
|
|
|
|
@ApiOperation("根据id(couponChannel)查询接口") |
|
|
|
@GetMapping("/detail") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@@ -201,6 +208,32 @@ public class WxCouponController extends BaseController { |
|
|
|
|
|
|
|
return new ResultData(wxCouponCVo); |
|
|
|
} |
|
|
|
|
|
|
|
// @ApiOperation("根据id(couponId)查询接口") |
|
|
|
// @GetMapping("/getMerchantList") |
|
|
|
// @ApiImplicitParams({ |
|
|
|
// @ApiImplicitParam(name = "couponId", value = "couponId", dataType = "String", paramType = "query", required = true) |
|
|
|
// }) |
|
|
|
// public ResultData getMerchantList(Long couponId) { |
|
|
|
// |
|
|
|
// if (couponId == null) { |
|
|
|
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); |
|
|
|
// } |
|
|
|
// |
|
|
|
// String key = Constant.coupon_merchants_key+getTenantInfo().getTenantId()+":"+couponId; |
|
|
|
// |
|
|
|
// List<WxMerchantVo> valueList = RedisCacheUtils.getCacheListObject(objectCommonRedisTemplate, key, WxMerchantVo.class); |
|
|
|
// if(valueList != null && valueList.size() > 0){ |
|
|
|
// return new ResultData(valueList); |
|
|
|
// } |
|
|
|
// valueList = couponService.getCouponMerchantList(getTenantInfo(),couponId); |
|
|
|
// if(valueList == null || valueList.size() == 0){ |
|
|
|
// return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); |
|
|
|
// } |
|
|
|
// |
|
|
|
// RedisCacheUtils.cache(objectCommonRedisTemplate,key,valueList,3600l); |
|
|
|
// return new ResultData(valueList); |
|
|
|
// } |
|
|
|
|
|
|
|
private WxCouponCVo generateWxCouponCVo(Long couponChannelIdL,String tenantId) { |
|
|
|
WxCouponChannel cc = wxCouponChannelService.getById(couponChannelIdL,tenantId); |
|
|
|
|