提交 750c6b53 authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 a1e21b20
......@@ -53,6 +53,7 @@ import com.zrqx.core.model.resource.ebook.BookIssued;
import com.zrqx.core.model.resource.ebook.BookLibraryLabel;
import com.zrqx.core.model.resource.ebook.BookResource;
import com.zrqx.core.model.resource.ebook.Ebook;
import com.zrqx.core.model.resource.imagelibrary.ImageGoods;
import com.zrqx.core.model.resource.imagelibrary.ImageLibrary;
import com.zrqx.core.model.resource.imagelibrary.ImageLibraryDiyType;
import com.zrqx.core.model.resource.pdflibrary.PdfLibrary;
......@@ -69,6 +70,7 @@ import com.zrqx.core.vo.resource.ebook.EbookVO;
import com.zrqx.core.vo.resource.ebook.EpubVo;
import com.zrqx.core.vo.resource.ebook.ImportExcelBookVO;
import com.zrqx.core.vo.resource.label.LabelAndContentByDataTypeVO;
import com.zrqx.resource.bg.mapper.imagelibrary.ImageGoodsMapper;
import com.zrqx.resource.bg.service.ResourceRelationService;
import com.zrqx.resource.bg.service.animationlibrary.AnimationLibraryService;
import com.zrqx.resource.bg.service.articlelibrary.ArticleLibraryDiyTypeService;
......@@ -84,6 +86,7 @@ import com.zrqx.resource.bg.service.ebook.BookLabelContentDiyTypeService;
import com.zrqx.resource.bg.service.ebook.BookResourceService;
import com.zrqx.resource.bg.service.ebook.BookService;
import com.zrqx.resource.bg.service.ebook.EbookService;
import com.zrqx.resource.bg.service.imagelibrary.ImageGoodsService;
import com.zrqx.resource.bg.service.imagelibrary.ImageLibraryDiyTypeRelationService;
import com.zrqx.resource.bg.service.imagelibrary.ImageLibraryService;
import com.zrqx.resource.bg.service.label.LabelContentDiyTypeService;
......@@ -125,6 +128,8 @@ public class EbookLibraryController {
@Autowired
private ImageLibraryDiyTypeRelationService ildtrService;
@Autowired
private ImageGoodsService imageGoodsService;
@Autowired
private BookGoodsService bookGoodsService;
@Autowired
private BookIssuedService bookIssuedService;
......@@ -434,6 +439,11 @@ public class EbookLibraryController {
ildt.setCode(ev.getCode());
ildt.setObjectId(image.getId());
ildtrService.insertSelective(ildt);
//商品信息
ImageGoods goods=new ImageGoods();
goods.setObjectId(image.getId());
goods.setDataSources(1);
imageGoodsService.insertSelective(goods);
});
try {
......
......@@ -4,6 +4,8 @@
*/
package com.zrqx.resource.bg.service.achievementLibrary;
import io.swagger.annotations.Example;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -50,8 +52,9 @@ public class AchievementResourceServiceImpl extends BaseServiceImpl<AchievementR
}
createCriteria().andIn("id", form.getIds());
List<AchievementResource> list = mapper.selectByExample(example);
for (AchievementResource entity : list) {
entity.setObjectId(form.getObjectId());
entity.setObjectId(entity.getId());
mapper.delete(entity);
}
return true;
......
......@@ -41,7 +41,7 @@ public class PaperResourceServiceImpl extends BaseServiceImpl<PaperResource, Int
createCriteria().andIn("id", form.getIds());
List<PaperResource> list = mapper.selectByExample(example);
for (PaperResource entity : list) {
entity.setObjectId(form.getObjectId());
entity.setId(entity.getId());
mapper.delete(entity);
}
return true;
......
......@@ -50,7 +50,7 @@ public class PatentResourceServiceImpl extends BaseServiceImpl<PatentResource, I
createCriteria().andIn("id", form.getIds());
List<PatentResource> list = mapper.selectByExample(example);
for (PatentResource entity : list) {
entity.setObjectId(form.getObjectId());
entity.setId(entity.getId());
mapper.delete(entity);
}
return true;
......
......@@ -48,7 +48,7 @@ public class PeriodVolumeResourceServiceImpl extends BaseServiceImpl<PeriodVolum
createCriteria().andIn("id", form.getIds());
List<PeriodVolumeResource> list = resourceMapper.selectByExample(example);
for (PeriodVolumeResource entity : list) {
entity.setObjectId(form.getObjectId());
entity.setId(entity.getId());
resourceMapper.delete(entity);
}
return true;
......
package com.zrqx.resource.commons.config;
import java.util.ArrayList;
import java.util.List;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.CrossOrigin;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.service.Parameter;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
......@@ -44,13 +50,24 @@ public class Swagger2Config {
@Bean
public Docket createRestApi() {
//添加head参数start
ParameterBuilder tokenPar = new ParameterBuilder();
List<Parameter> pars = new ArrayList<Parameter>();
tokenPar.name("y-token").description("y令牌").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
pars.add(tokenPar.build());
tokenPar.name("x-token").description("x令牌").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
pars.add(tokenPar.build());
//添加head参数end
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
//为当前包路径
.apis(RequestHandlerSelectors.basePackage("com.zrqx"))
.paths(PathSelectors.any())
.build();
.build()
.globalOperationParameters(pars);
}
//构建 api文档的详细信息函数
private ApiInfo apiInfo() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论