|
|
|
@@ -8,6 +8,8 @@ import com.iformall.enums.EnumTtCouponStatus; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.WxMerchantService; |
|
|
|
import com.iformall.service.tt.TtCouponService; |
|
|
|
import com.iformall.video.VideoFactory; |
|
|
|
import com.iformall.video.entity.VideUploadResult; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
@@ -30,6 +32,12 @@ public class TtCouponController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private WxMerchantService wxMerchantService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private VideoFactory videoFactory; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
String videoType; |
|
|
|
|
|
|
|
@ApiOperation("分页列表接口") |
|
|
|
@GetMapping("list") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@@ -50,9 +58,25 @@ public class TtCouponController extends BaseController { |
|
|
|
if (id == null) { |
|
|
|
return new ResultData(ResultData.ERROR, "缺少id"); |
|
|
|
} |
|
|
|
ttCouponService.addSeeCount(id); |
|
|
|
return new ResultData(ttCouponService.detail(id)); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping(value = "/videoDetial") |
|
|
|
@ApiOperation("上传视频详情") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "videoId", value = "视频编号", dataType = "String", paramType = "query", required = true)}) |
|
|
|
public ResultData videoDetial(String videoId) { |
|
|
|
try { |
|
|
|
VideUploadResult videoDetail = videoFactory.getExcutor(videoType).getVideoDetail(videoId); |
|
|
|
return new ResultData(videoDetail); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
return new ResultData(ErrorCode.PICTURE_ANALYZING_ERROR); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("是否收藏") |
|
|
|
@GetMapping("/iscollect") |
|
|
|
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) |
|
|
|
|