|
|
|
@@ -6,6 +6,8 @@ import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.simple.common.ErrorCode; |
|
|
|
import com.simple.common.Result; |
|
|
|
import com.simple.common.ResultData; |
|
|
|
import com.simple.domain.dto.WxCounponDto; |
|
|
|
import com.simple.domain.dto.WxCouponCarDto; |
|
|
|
import com.simple.domain.po.*; |
|
|
|
import com.simple.domain.vo.WxCouponCarVo; |
|
|
|
import com.simple.enums.EnumCarCmd; |
|
|
|
@@ -313,9 +315,13 @@ public class WxCarController extends BaseController |
|
|
|
try { |
|
|
|
WxCouponCarVo couponCarVo = wxCouponCarService.getByCoupon(coupon); |
|
|
|
if (couponCarVo != null) { |
|
|
|
return new ResultData(couponCarVo); |
|
|
|
WxCouponCarDto dto = new WxCouponCarDto(); |
|
|
|
org.springframework.beans.BeanUtils.copyProperties(couponCarVo, dto); |
|
|
|
WxMerchant merchant = wxMerchantService.getById(couponCarVo.getMerchantId()); |
|
|
|
dto.setWxMerchant(merchant); |
|
|
|
return new ResultData(dto); |
|
|
|
} else { |
|
|
|
return new ResultData(ErrorCode.COUPON_IS_EMPTY.getCode(), "券不存在"); |
|
|
|
return new ResultData(ErrorCode.COUPON_IS_EMPTY); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
|