|
|
|
@@ -5,9 +5,11 @@ import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxMerchant; |
|
|
|
import com.iformall.domain.po.tt.TtCoupon; |
|
|
|
import com.iformall.enums.EnumTtCouponStatus; |
|
|
|
import com.iformall.enums.EnumYesOrNo; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.WxMerchantService; |
|
|
|
import com.iformall.service.tt.TtCouponService; |
|
|
|
import com.iformall.service.tt.TtOrderService; |
|
|
|
import com.iformall.video.VideoFactory; |
|
|
|
import com.iformall.video.entity.VideUploadResult; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
@@ -32,6 +34,9 @@ public class TtCouponController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private WxMerchantService wxMerchantService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private TtOrderService ttOrderService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private VideoFactory videoFactory; |
|
|
|
|
|
|
|
@@ -58,8 +63,25 @@ public class TtCouponController extends BaseController { |
|
|
|
if (id == null) { |
|
|
|
return new ResultData(ResultData.ERROR, "缺少id"); |
|
|
|
} |
|
|
|
TtCoupon detail = ttCouponService.detail(id); |
|
|
|
if(detail == null){ |
|
|
|
new ResultData(); |
|
|
|
} |
|
|
|
if(detail.getIsPayment().equals(EnumYesOrNo.YES.getCode())){ |
|
|
|
try { |
|
|
|
if(ttOrderService.isByMember(getMemberId(),id)){ |
|
|
|
detail.setView(true); |
|
|
|
}else{ |
|
|
|
detail.setView(false); |
|
|
|
} |
|
|
|
} catch (MallinkException e) { |
|
|
|
detail.setView(false); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
detail.setView(true); |
|
|
|
} |
|
|
|
ttCouponService.addSeeCount(id); |
|
|
|
return new ResultData(ttCouponService.detail(id)); |
|
|
|
return new ResultData(detail); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping(value = "/videoDetial") |
|
|
|
|