@@ -63,6 +63,7 @@ public class AiVideoServiceImpl implements AiVideoService { | |||||
SaveServiceVideoRecordDTO saveServiceVideoRecordDTO = SaveServiceVideoRecordDTO.builder() | SaveServiceVideoRecordDTO saveServiceVideoRecordDTO = SaveServiceVideoRecordDTO.builder() | ||||
.serviceId(serviceId) | .serviceId(serviceId) | ||||
.videoTime(String.valueOf(video.getDuration())) | .videoTime(String.valueOf(video.getDuration())) | ||||
.videoUrl(video.getUrl()) | |||||
.build(); | .build(); | ||||
serviceVideoRecordService.saveServiceVideoRecord(saveServiceVideoRecordDTO); | serviceVideoRecordService.saveServiceVideoRecord(saveServiceVideoRecordDTO); | ||||
} | } | ||||
@@ -14,6 +14,8 @@ public class PageServiceVedioRecordVO { | |||||
private Long serviceId; | private Long serviceId; | ||||
@ApiModelProperty("视频时长") | @ApiModelProperty("视频时长") | ||||
private String videoTime; | private String videoTime; | ||||
@ApiModelProperty("视频链接") | |||||
private String videoUrl; | |||||
@ApiModelProperty("创建时间") | @ApiModelProperty("创建时间") | ||||
private Date createDate; | private Date createDate; | ||||
@@ -23,6 +25,7 @@ public class PageServiceVedioRecordVO { | |||||
vo.setServiceId(serviceVideoRecord.getServiceId()); | vo.setServiceId(serviceVideoRecord.getServiceId()); | ||||
vo.setVideoTime(serviceVideoRecord.getVideoTime()); | vo.setVideoTime(serviceVideoRecord.getVideoTime()); | ||||
vo.setCreateDate(serviceVideoRecord.getCreateTime()); | vo.setCreateDate(serviceVideoRecord.getCreateTime()); | ||||
vo.setVideoUrl(serviceVideoRecord.getVideoUrl()); | |||||
return vo; | return vo; | ||||
} | } | ||||
} | } |
@@ -16,6 +16,7 @@ import com.iformall.domain.po.MallUserInfo; | |||||
import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
import com.iformall.domain.po.sm.PersonMould; | import com.iformall.domain.po.sm.PersonMould; | ||||
import com.iformall.domain.po.sm.ServiceInfo; | import com.iformall.domain.po.sm.ServiceInfo; | ||||
import com.iformall.domain.po.sm.ServiceVideoRecord; | |||||
import com.iformall.enums.EnumProject; | import com.iformall.enums.EnumProject; | ||||
import com.iformall.enums.EnumUserAdmin; | import com.iformall.enums.EnumUserAdmin; | ||||
import com.iformall.enums.EnumYesOrNo; | import com.iformall.enums.EnumYesOrNo; | ||||
@@ -24,6 +25,8 @@ import com.iformall.exception.BizException; | |||||
import com.iformall.service.MallUserInfoService; | import com.iformall.service.MallUserInfoService; | ||||
import com.iformall.service.sm.PersonMouldService; | import com.iformall.service.sm.PersonMouldService; | ||||
import com.iformall.service.sm.ServiceInfoService; | import com.iformall.service.sm.ServiceInfoService; | ||||
import com.iformall.service.sm.ServiceVideoRecordService; | |||||
import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
import io.swagger.annotations.ApiImplicitParams; | import io.swagger.annotations.ApiImplicitParams; | ||||
@@ -46,6 +49,9 @@ public class ServiceInfoController extends MallUserInfoBaseController{ | |||||
@Autowired | @Autowired | ||||
private PersonMouldService personMouldService; | private PersonMouldService personMouldService; | ||||
@Autowired | |||||
private ServiceVideoRecordService serviceVideoRecordService; | |||||
@ApiVersion(group = SwaggerConstant.V_1_0_0) | @ApiVersion(group = SwaggerConstant.V_1_0_0) | ||||
@ApiOperation("分页查询合作商") | @ApiOperation("分页查询合作商") | ||||
@@ -149,11 +155,26 @@ public class ServiceInfoController extends MallUserInfoBaseController{ | |||||
} | } | ||||
@ApiVersion(group = SwaggerConstant.V_1_0_0) | @ApiVersion(group = SwaggerConstant.V_1_0_0) | ||||
@ApiOperation("设置关联模板") | |||||
@PostMapping("/current") | |||||
@ApiOperation("当前") | |||||
@GetMapping("/current") | |||||
public ResultData currentInfo() { | public ResultData currentInfo() { | ||||
MallUserInfo user = this.getUser(); | MallUserInfo user = this.getUser(); | ||||
ServiceInfo si = serviceInfoService.getServiceInfoByMallUserInfo(user.getId()); | ServiceInfo si = serviceInfoService.getServiceInfoByMallUserInfo(user.getId()); | ||||
return new ResultData(si); | return new ResultData(si); | ||||
} | } | ||||
@ApiVersion(group = SwaggerConstant.V_1_0_0) | |||||
@ApiOperation("当前") | |||||
@GetMapping("/currentVideoRecords") | |||||
@ApiImplicitParams({ | |||||
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||||
public ResultData currentVideoRecords(Integer pageNum, Integer pageSize) { | |||||
MallUserInfo user = this.getUser(); | |||||
ServiceInfo si = serviceInfoService.getServiceInfoByMallUserInfo(user.getId()); | |||||
ServiceVideoRecord svr = new ServiceVideoRecord(); | |||||
svr.setServiceId(si.getId()); | |||||
PageInfo<ServiceVideoRecord> personMouldPage = serviceVideoRecordService.listAsPage(svr, pageNum, pageSize); | |||||
return new ResultData(personMouldPage); | |||||
} | |||||
} | } |
@@ -43,3 +43,7 @@ CREATE TABLE `service_person_mould` ( | |||||
UNIQUE KEY `id_UNIQUE` (`id`) USING BTREE | UNIQUE KEY `id_UNIQUE` (`id`) USING BTREE | ||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='接入方关联模板'; | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='接入方关联模板'; | ||||
ALTER TABLE `service_video_record` | |||||
ADD COLUMN video_url varchar(300) COMMENT '视频链接'; | |||||
@@ -21,6 +21,8 @@ public class SaveServiceVideoRecordDTO { | |||||
private Long serviceId; | private Long serviceId; | ||||
@ApiModelProperty("视频时长") | @ApiModelProperty("视频时长") | ||||
private String videoTime; | private String videoTime; | ||||
@ApiModelProperty("视频链接") | |||||
private String videoUrl; | |||||
public static ServiceVideoRecord mapping(SaveServiceVideoRecordDTO dto) { | public static ServiceVideoRecord mapping(SaveServiceVideoRecordDTO dto) { | ||||
ServiceVideoRecord serviceVideoRecord = new ServiceVideoRecord(); | ServiceVideoRecord serviceVideoRecord = new ServiceVideoRecord(); | ||||
@@ -29,6 +31,7 @@ public class SaveServiceVideoRecordDTO { | |||||
serviceVideoRecord.setUpdateTime(new Date()); | serviceVideoRecord.setUpdateTime(new Date()); | ||||
serviceVideoRecord.setServiceId(dto.getServiceId()); | serviceVideoRecord.setServiceId(dto.getServiceId()); | ||||
serviceVideoRecord.setVideoTime(dto.getVideoTime()); | serviceVideoRecord.setVideoTime(dto.getVideoTime()); | ||||
serviceVideoRecord.setVideoUrl(dto.getVideoUrl()); | |||||
return serviceVideoRecord; | return serviceVideoRecord; | ||||
} | } | ||||
} | } |
@@ -40,4 +40,10 @@ public class ServiceVideoRecord extends BaseEntity{ | |||||
*/ | */ | ||||
@TableField("video_time") | @TableField("video_time") | ||||
private String videoTime; | private String videoTime; | ||||
/** | |||||
* 视频链接 | |||||
*/ | |||||
@TableField("video_url") | |||||
private String videoUrl; | |||||
} | } |