diff --git a/open-api/src/main/java/com/iformall/controller/ai/AiVideoController.java b/open-api/src/main/java/com/iformall/controller/ai/AiVideoController.java index 470ba4b..ff1d3d0 100644 --- a/open-api/src/main/java/com/iformall/controller/ai/AiVideoController.java +++ b/open-api/src/main/java/com/iformall/controller/ai/AiVideoController.java @@ -5,6 +5,7 @@ import com.iformall.controller.BaseController; import com.iformall.dto.GenerateVideoDTO; import com.iformall.dto.PreviewVideoDTO; import com.iformall.service.AiVideoService; +import com.iformall.sm.AiVideoParam; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -29,7 +30,7 @@ public class AiVideoController extends BaseController { @ApiOperation("生成视频") @PostMapping("generateVideo") - public ResultData generateVideo(@RequestBody GenerateVideoDTO dto) { - return new ResultData(aiVideoService.generateVideo(dto.getAiVideoParam(), dto.getId(), getServiceId())); + public ResultData generateVideo(@RequestBody AiVideoParam aiVideoParam) { + return new ResultData(aiVideoService.generateVideo(aiVideoParam, getServiceId())); } } diff --git a/open-api/src/main/java/com/iformall/service/AiVideoService.java b/open-api/src/main/java/com/iformall/service/AiVideoService.java index 16577f8..63e6757 100644 --- a/open-api/src/main/java/com/iformall/service/AiVideoService.java +++ b/open-api/src/main/java/com/iformall/service/AiVideoService.java @@ -23,5 +23,5 @@ public interface AiVideoService { * @param aiVideoParam * @return {@link AiVideoResult} */ - AiVideoResult generateVideo(AiVideoParam aiVideoParam, Long taskId, Long serviceId); + AiVideoResult generateVideo(AiVideoParam aiVideoParam, Long serviceId); } diff --git a/open-api/src/main/java/com/iformall/service/impl/AiVideoServiceImpl.java b/open-api/src/main/java/com/iformall/service/impl/AiVideoServiceImpl.java index 29c851d..6e5b9f0 100644 --- a/open-api/src/main/java/com/iformall/service/impl/AiVideoServiceImpl.java +++ b/open-api/src/main/java/com/iformall/service/impl/AiVideoServiceImpl.java @@ -25,8 +25,8 @@ public class AiVideoServiceImpl implements AiVideoService { } @Override - public AiVideoResult generateVideo(AiVideoParam aiVideoParam, Long taskId, Long serviceId) { - AiVideoResult video = AiVideoHelper.createVideo(aiVideoParam, taskId); + public AiVideoResult generateVideo(AiVideoParam aiVideoParam, Long serviceId) { + AiVideoResult video = AiVideoHelper.createVideo(aiVideoParam); if (video.isSuccess()) { // 记录时长 SaveServiceVideoRecordDTO dto = SaveServiceVideoRecordDTO.builder() diff --git a/suimangAdmin/src/main/java/com/iformall/controller/sm/ServiceInfoController.java b/suimangAdmin/src/main/java/com/iformall/controller/sm/ServiceInfoController.java index 9aaf8ed..3da3f8c 100644 --- a/suimangAdmin/src/main/java/com/iformall/controller/sm/ServiceInfoController.java +++ b/suimangAdmin/src/main/java/com/iformall/controller/sm/ServiceInfoController.java @@ -2,6 +2,7 @@ package com.iformall.controller.sm; import com.github.pagehelper.PageInfo; import com.iformall.annotation.ApiVersion; +import com.iformall.common.ErrorCode; import com.iformall.common.R; import com.iformall.common.ResultData; import com.iformall.constant.SwaggerConstant; @@ -10,12 +11,15 @@ import com.iformall.domain.dto.sm.SaveServiceInfoDTO; import com.iformall.domain.dto.sm.UpdateServiceInfoDTO; import com.iformall.domain.dto.sm.UpdateServiceInfoStatusDTO; import com.iformall.domain.po.sm.ServiceInfo; +import com.iformall.exception.BizException; import com.iformall.service.sm.ServiceInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.List; + @RestController @RequestMapping("/serviceInfo") @Api(tags = "合作商接口") @@ -31,6 +35,16 @@ public class ServiceInfoController extends BaseController { return R.ok(serviceInfoService.pageServiceInfo(serviceInfo, pageNum, pageSize)); } + @ApiVersion(group = SwaggerConstant.V_1_0_0) + @ApiOperation("单个查询合作商") + @GetMapping("/get") + public R getServiceInfo(Long id) { + if (id == null) { + throw new BizException(ErrorCode.SYS_PARAMETER_NOT_NULL); + } + return R.ok(serviceInfoService.getServiceInfo(id)); + } + @ApiVersion(group = SwaggerConstant.V_1_0_0) @ApiOperation("新增合作商") @PostMapping("/save") diff --git a/suimangCApi/src/main/java/com/iformall/controller/UserLiveController.java b/suimangCApi/src/main/java/com/iformall/controller/UserLiveController.java index 91a228d..dcf8ebf 100644 --- a/suimangCApi/src/main/java/com/iformall/controller/UserLiveController.java +++ b/suimangCApi/src/main/java/com/iformall/controller/UserLiveController.java @@ -77,6 +77,7 @@ public class UserLiveController extends BaseController { @Autowired private WxCUserAuthorityService wxCUserAuthorityService; + @Autowired private VoiceInfoService voiceInfoService; diff --git a/suimangService/src/main/java/com/iformall/domain/po/UserLevelCreditLog.java b/suimangService/src/main/java/com/iformall/domain/po/UserLevelCreditLog.java new file mode 100644 index 0000000..0f9430f --- /dev/null +++ b/suimangService/src/main/java/com/iformall/domain/po/UserLevelCreditLog.java @@ -0,0 +1,61 @@ +package com.iformall.domain.po; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.iformall.domain.po.base.TenantEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.util.Date; +import java.util.List; + +@TableName(value = "user_level_credit_log") +@Data +@ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) +public class UserLevelCreditLog extends TenantEntity { + + protected Long id; + + @io.swagger.annotations.ApiModelProperty(value="",name="userId") + private Long userId; + + @io.swagger.annotations.ApiModelProperty(value="EnumProject ",name="projectType") + private Integer projectType; + + @io.swagger.annotations.ApiModelProperty(value="EnumPropertyLogType ",name="type") + private Integer type; + + @io.swagger.annotations.ApiModelProperty(value="",name="befourCredit") + private Integer befourCredit; + + @io.swagger.annotations.ApiModelProperty(value="",name="cieditNum") + private Integer creditNum; + + @io.swagger.annotations.ApiModelProperty(value="",name="afterCredit") + private Integer afterCredit; + + @io.swagger.annotations.ApiModelProperty(value="记录对应的业务ID",name="extraId") + private Long extraId; + + @io.swagger.annotations.ApiModelProperty(value="",name="remark") + private String remark; + + @io.swagger.annotations.ApiModelProperty(value="",name="detail") + private String detail; + + @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") + private Date createDate; + + @TableField(exist = false) + @io.swagger.annotations.ApiModelProperty(value="",name="extraIds") + private List extraIds; + + @TableField(exist = false) + private Date startDate; + + @TableField(exist = false) + private Date endDate; + +} diff --git a/suimangService/src/main/java/com/iformall/mapper/UserLevelCreditLogMapper.java b/suimangService/src/main/java/com/iformall/mapper/UserLevelCreditLogMapper.java new file mode 100644 index 0000000..585cd54 --- /dev/null +++ b/suimangService/src/main/java/com/iformall/mapper/UserLevelCreditLogMapper.java @@ -0,0 +1,12 @@ +package com.iformall.mapper; + +import com.iformall.common.CommonMapper; +import com.iformall.domain.po.UserLevelCreditLog; + +import java.util.List; + +public interface UserLevelCreditLogMapper extends CommonMapper{ + + List findList(UserLevelCreditLog record); + +} diff --git a/suimangService/src/main/java/com/iformall/service/impl/WxCUserAuthorityServiceImpl.java b/suimangService/src/main/java/com/iformall/service/impl/WxCUserAuthorityServiceImpl.java index 1c823fc..2094de3 100644 --- a/suimangService/src/main/java/com/iformall/service/impl/WxCUserAuthorityServiceImpl.java +++ b/suimangService/src/main/java/com/iformall/service/impl/WxCUserAuthorityServiceImpl.java @@ -20,7 +20,6 @@ public class WxCUserAuthorityServiceImpl implements WxCUserAuthorityService { @Override public Map getAuthor(Long id, String code, Integer type, Long resourceId) { - HashMap authorVos = new HashMap<>(); List resultList = new ArrayList(); if (type == 0) { diff --git a/suimangService/src/main/java/com/iformall/service/sm/ServiceInfoService.java b/suimangService/src/main/java/com/iformall/service/sm/ServiceInfoService.java index abd0179..66f7e48 100644 --- a/suimangService/src/main/java/com/iformall/service/sm/ServiceInfoService.java +++ b/suimangService/src/main/java/com/iformall/service/sm/ServiceInfoService.java @@ -7,6 +7,8 @@ import com.iformall.domain.dto.sm.UpdateServiceInfoStatusDTO; import com.iformall.domain.po.sm.ServiceInfo; import com.iformall.domain.vo.neuver.PageServiceInfoVO; +import java.util.List; + /** * 接入商service * @@ -44,4 +46,6 @@ public interface ServiceInfoService { * @param dto */ void updateServiceInfoStatus(UpdateServiceInfoStatusDTO dto); + + ServiceInfo getServiceInfo(Long id); } diff --git a/suimangService/src/main/java/com/iformall/service/sm/impl/ServiceInfoServiceImpl.java b/suimangService/src/main/java/com/iformall/service/sm/impl/ServiceInfoServiceImpl.java index 4aea26b..3d3c2cd 100644 --- a/suimangService/src/main/java/com/iformall/service/sm/impl/ServiceInfoServiceImpl.java +++ b/suimangService/src/main/java/com/iformall/service/sm/impl/ServiceInfoServiceImpl.java @@ -14,10 +14,13 @@ import com.iformall.mapper.ServiceInfoMapper; import com.iformall.mapper.WxThirdPartyApiMapper; import com.iformall.service.WxThirdPartyApiService; import com.iformall.service.sm.ServiceInfoService; +import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.List; + @Service public class ServiceInfoServiceImpl implements ServiceInfoService { @@ -76,4 +79,12 @@ public class ServiceInfoServiceImpl implements ServiceInfoService { .eq(WxThirdPartyApi::getServiceId, dto.getId())); } } + + @Override + public ServiceInfo getServiceInfo(Long id) { + ServiceInfo serviceInfo = new ServiceInfo(); + serviceInfo.setId(id); + List serviceInfos = serviceInfoMapper.listServiceInfo(serviceInfo); + return !CollectionUtils.isEmpty(serviceInfos) ? serviceInfos.get(0) : null; + } } diff --git a/suimangService/src/main/java/com/iformall/service/sm/impl/UserMouldVideoServiceImpl.java b/suimangService/src/main/java/com/iformall/service/sm/impl/UserMouldVideoServiceImpl.java index cf9ab7b..06a023f 100644 --- a/suimangService/src/main/java/com/iformall/service/sm/impl/UserMouldVideoServiceImpl.java +++ b/suimangService/src/main/java/com/iformall/service/sm/impl/UserMouldVideoServiceImpl.java @@ -351,6 +351,7 @@ public class UserMouldVideoServiceImpl implements UserMouldVideoService { try{ AiVideoParam videoParam = new AiVideoParam(); + videoParam.setTask_id(mouldVideo.getId()); videoParam.setGen_txt(paperwork.replaceAll(Constant.text_pause, "[*]")); videoParam.setVideo_template_id(personMouldSmId); videoParam.setSubtitle(subtitleMap); diff --git a/suimangService/src/main/java/com/iformall/sm/AiVideoHelper.java b/suimangService/src/main/java/com/iformall/sm/AiVideoHelper.java index b3df8fb..279a812 100644 --- a/suimangService/src/main/java/com/iformall/sm/AiVideoHelper.java +++ b/suimangService/src/main/java/com/iformall/sm/AiVideoHelper.java @@ -61,10 +61,14 @@ public class AiVideoHelper { } - public static AiVideoResult createVideo(AiVideoParam videoParam,Long taskId) { + public static AiVideoResult createVideo(AiVideoParam videoParam) { - videoParam.setTask_id(taskId); - videoParam.setCallback_url(callbackUrl + "/callback/oral/broadcasting"); +// videoParam.setTask_id(taskId); + if (StringUtils.isNotBlank(videoParam.getCallback_url())) { + videoParam.setCallback_url(videoParam.getCallback_url()); + } else { + videoParam.setCallback_url(callbackUrl + "/callback/oral/broadcasting"); + } log.info("生成视频start request:" + videoParam.neglectImgString()); log.info("完整参数:{}", JSONObject.toJSONString(videoParam)); diff --git a/suimangService/src/main/resources/mapper/UserLevelCreditLogMapper.xml b/suimangService/src/main/resources/mapper/UserLevelCreditLogMapper.xml new file mode 100644 index 0000000..03a243d --- /dev/null +++ b/suimangService/src/main/resources/mapper/UserLevelCreditLogMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + `id`,`tenant_id`,`parent_tenant_id`,`user_id`, + `project_type`,`type`,`befour_credit`,`credit_num`,`after_credit`, + `extra_id`,`remark`,`detail`,`create_date` + + + + where 1 = 1 + and `id` = #{id} + + and `tenant_id` = #{tenantId} + + + and `parent_tenant_id` = #{parentTenantId} + + and `user_id` = #{userId} + and `project_type` = #{projectType} + and `type` = #{type} + + and `extra_id` = #{extraId} + + + + and `create_date` >= #{startDate} + + + and `create_date` <= #{endDate} + + + + and id in + + #{idItem} + + + + + and extra_id in + + #{extIdItem} + + + order by ${sortColumns} + + + + +