Commit a6c50668 authored by tangtuo's avatar tangtuo

v1.0.0功能开发

parent 14afe01e
...@@ -22,6 +22,7 @@ import com.fzm.common.service.*; ...@@ -22,6 +22,7 @@ import com.fzm.common.service.*;
import com.fzm.common.utils.OssUtil; import com.fzm.common.utils.OssUtil;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -37,6 +38,7 @@ import java.util.concurrent.ExecutionException; ...@@ -37,6 +38,7 @@ import java.util.concurrent.ExecutionException;
* @author tangtuo * @author tangtuo
* @date 2021/12/9 11:40 * @date 2021/12/9 11:40
*/ */
@Slf4j
@Service @Service
@Transactional(rollbackFor = RuntimeException.class) @Transactional(rollbackFor = RuntimeException.class)
public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper, CopyrightApply> implements CopyrightApplyService { public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper, CopyrightApply> implements CopyrightApplyService {
...@@ -264,6 +266,7 @@ public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper, ...@@ -264,6 +266,7 @@ public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper,
} }
copyrightApplyOwnerRelationService.saveBatch(owners); copyrightApplyOwnerRelationService.saveBatch(owners);
} }
copyrightApply.setRegisterState(CopyrightApplyState.TO_BE_REVIEWED.getCode());
return updateById(copyrightApply); return updateById(copyrightApply);
} }
...@@ -309,7 +312,10 @@ public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper, ...@@ -309,7 +312,10 @@ public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper,
CopyrightVo detail = this.getDetail(id); CopyrightVo detail = this.getDetail(id);
OpusCategory category = opusCategoryService.getById(detail.getOpusCategoryId()); OpusCategory category = opusCategoryService.getById(detail.getOpusCategoryId());
CopyrightRequest copyrightRequest = new CopyrightRequest(detail, category); CopyrightRequest copyrightRequest = new CopyrightRequest(detail, category);
String response = HttpUtil.post("https://p.yareiot.com/ccct/api/copyright/create", JSONUtil.toJsonStr(copyrightRequest), 10000); String json = JSONUtil.toJsonStr(copyrightRequest);
log.info("请求版权局接口, 请求参数:{}", json);
String response = HttpUtil.post("https://p.yareiot.com/ccct/api/copyright/create", json, 10000);
log.info("版权局响应内容:{}", response );
if (StringUtils.isBlank(response)) { if (StringUtils.isBlank(response)) {
throw GlobalException.newException(ResultCode.COPYRIGHT_FAILED, "版权局接口无响应,请稍后重试"); throw GlobalException.newException(ResultCode.COPYRIGHT_FAILED, "版权局接口无响应,请稍后重试");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment