提交 65b24d59 authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 fd13aeac
......@@ -70,7 +70,9 @@ public class BaseRequestPath {
public static final String CONTENT = "/content";
/** 数据类型 */
public static final String DATATYPE = "/dataType";
/** 数据类型 */
public static final String RELATION = "/relation";
/**
* 最大排序号
......@@ -87,6 +89,8 @@ public class BaseRequestPath {
public static final String BATCH_UPDATE = BATCH + UPDATE;
/** 批量删除 */
public static final String BATCH_DELETE = BATCH + DELETE;
/** 批量删除资源 */
public static final String BATCH_RELATION_DELETE = BATCH + RELATION + DELETE;
/** 批量还原 */
public static final String BATCH_RESTORE = BATCH + RESTORE;
/** 修改指定id对象的属性信息 */
......
......@@ -15,34 +15,63 @@ import com.zrqx.core.model.resource.articlelibrary.ArticleLibraryLabelDiyType;
public class ArticleLibraryOneVO {
@ApiModelProperty("文章id,新增时不需要填写")
private String id;
@ApiModelProperty(value = "文章标题")
private String title;
@ApiModelProperty(value = "文章标题", required = true)
private String name;
@ApiModelProperty("作者id")
private Integer authorId;
private String authorId;
@ApiModelProperty("作者")
private String author;
@ApiModelProperty("所属部门id")
private Integer departmentId;
@ApiModelProperty("所属部门")
private String department;
@ApiModelProperty("来源")
private String source;
@ApiModelProperty("关键词")
private String keywords;
@ApiModelProperty("定价")
private BigDecimal price;
@ApiModelProperty("简介")
private String synopsis;
@ApiModelProperty("正文")
private String text;
@ApiModelProperty("pdf")
private String pdf;
@ApiModelProperty("封面")
private String img;
@ApiModelProperty("状态:0待审核,1审核通过,2审核未通过")
private Integer status;
@ApiModelProperty("图书id")
private String bookId;
@ApiModelProperty("图书名称")
private String bookName;
@ApiModelProperty("文章封面")
private String cover;
@ApiModelProperty("音频文件")
private String audio;
private String audioFile;
@ApiModelProperty("视频文件")
private String video;
@ApiModelProperty("售价")
private BigDecimal realPrice;
@ApiModelProperty("全文阅读权限 0 游客可见 1会员可见")
private Integer readTextPower;
private String videoFile;
@ApiModelProperty("PDF文件")
private String pdfFile;
/**商品信息**/
@ApiModelProperty("商品编号")
private String goosCode;
@ApiModelProperty("数据来源 1:本版 2外版")
private Integer dataSources;
@ApiModelProperty("销售状态 1:可售 2:不可售")
private Integer salesStatus;
@ApiModelProperty("定价")
private BigDecimal price;
@ApiModelProperty("售价状态 ")
private BigDecimal sellingPrice;
@ApiModelProperty("价格状态 1:付费 2:免费")
private Integer priceType;
@ApiModelProperty("相关合同")
private String relatedContracts;
@ApiModelProperty("合同编号")
private String contractNumber;
@ApiModelProperty("合同名称")
private String contractName;
@ApiModelProperty("开始日期")
private String startDate;
@ApiModelProperty("结束日期")
private String endDate;
@ApiModelProperty(value = "自定义分类")
private List<ArticleLibraryDiyType> divType;
......
......@@ -236,4 +236,9 @@ public class AnimationLibraryController {
});
return CallBack.success(resourceService.insertUuidList(recordList));
}
@ApiOperation(value = "批量删除关联资源", notes = "批量删除")
@PostMapping(value = ResourceRequestPath.BATCH_RELATION_DELETE)
public CallBack<Boolean> deleteByResourceIds(@RequestBody List<String> ids) {
return CallBack.success(resourceService.batchDeleteResource(ids));
}
}
......@@ -221,4 +221,9 @@ public class ArticleLibraryController {
});
return CallBack.success(resourceService.insertUuidList(recordList));
}
@ApiOperation(value = "批量删除关联资源", notes = "批量删除")
@PostMapping(value = ResourceRequestPath.BATCH_RELATION_DELETE)
public CallBack<Boolean> deleteByResourceIds(@RequestBody List<String> ids) {
return CallBack.success(resourceService.batchDeleteResource(ids));
}
}
......@@ -255,4 +255,9 @@ public class AudioLibraryController {
return CallBack.success(resourceService.insertUuidList(recordList));
}
@ApiOperation(value = "批量删除关联资源", notes = "批量删除")
@PostMapping(value = ResourceRequestPath.BATCH_RELATION_DELETE)
public CallBack<Boolean> deleteByResourceIds(@RequestBody List<String> ids) {
return CallBack.success(resourceService.batchDeleteResource(ids));
}
}
......@@ -243,4 +243,9 @@ public class CoursewareLibraryController {
});
return CallBack.success(resourceService.insertUuidList(recordList));
}
@ApiOperation(value = "批量删除关联资源", notes = "批量删除")
@PostMapping(value = ResourceRequestPath.BATCH_RELATION_DELETE)
public CallBack<Boolean> deleteByResourceIds(@RequestBody List<String> ids) {
return CallBack.success(resourceService.batchDeleteResource(ids));
}
}
......@@ -256,4 +256,9 @@ public class ImageLibraryController {
});
return CallBack.success(resourceService.insertUuidList(recordList));
}
@ApiOperation(value = "批量删除关联资源", notes = "批量删除")
@PostMapping(value = ResourceRequestPath.BATCH_RELATION_DELETE)
public CallBack<Boolean> deleteByResourceIds(@RequestBody List<String> ids) {
return CallBack.success(resourceService.batchDeleteResource(ids));
}
}
......@@ -227,7 +227,7 @@ public class PdfLibraryController {
@ApiOperation(value = "保存相关资源" , notes ="保存相关资源")
@PostMapping(value = ResourceRequestPath.RELATION_RESOURCE + ResourceRequestPath.SAVE)
public CallBack<Boolean> saveRelation(@RequestBody SaveResourceRelationForm entity){
if(entity.getId()!= null || entity.getResourceIds() == null || entity.getResourceType() == null || entity.getResourceIds().length == 0){
if(entity.getId()!= null || entity.getId()!= "" || entity.getResourceIds() == null || entity.getResourceType() == null || entity.getResourceIds().length == 0){
throw new BaseException("必须指定id、被关联的resourceId、资源类型");
}
List<PdfResource> recordList = new ArrayList<PdfResource>();
......@@ -242,4 +242,9 @@ public class PdfLibraryController {
});
return CallBack.success(resourceService.insertUuidList(recordList));
}
@ApiOperation(value = "批量删除关联资源", notes = "批量删除")
@PostMapping(value = ResourceRequestPath.BATCH_RELATION_DELETE)
public CallBack<Boolean> deleteByResourceIds(@RequestBody List<String> ids) {
return CallBack.success(resourceService.batchDeleteResource(ids));
}
}
......@@ -176,6 +176,11 @@ public class PeriodVolumeLibraryController {
throw new BaseException("无法删除该token");
}
return CallBack.success();
}
@ApiOperation(value = "批量删除关联资源", notes = "批量删除")
@PostMapping(value = ResourceRequestPath.BATCH_RELATION_DELETE)
public CallBack<Boolean> deleteByResourceIds(@RequestBody List<String> ids) {
return CallBack.success(resourceService.batchDeleteResource(ids));
}
}
......@@ -204,14 +204,14 @@ public class ResourceRecycleBinController {
}
@ApiOperation(value = "批量还原", notes = "批量还原")
@PostMapping(value = ResourceRequestPath.BATCH_RESTORE)
public CallBack<Boolean> restoreByIds(@RequestBody List<Integer> ids) {
public CallBack<Boolean> restoreByIds(@RequestBody List<String> ids) {
return CallBack.success(service.batchRestore(ids));
}
@ApiOperation(value = "查询", notes = "根据ID查询")
@GetMapping(value = ResourceRequestPath.GET_OID)
public CallBack<ResourceRecycleBinOneVO> getById(@PathVariable Integer oid) {
public CallBack<ResourceRecycleBinOneVO> getById(@PathVariable String oid) {
Criteria cr=service.createCriteria();
cr.andEqualTo("id", oid);
ResourceRecycleBin entity = service.selectOneByCriteria();
......
......@@ -240,4 +240,9 @@ public class VideoLibraryController {
});
return CallBack.success(resourceService.insertUuidList(recordList));
}
@ApiOperation(value = "批量删除关联资源", notes = "批量删除")
@PostMapping(value = ResourceRequestPath.BATCH_RELATION_DELETE)
public CallBack<Boolean> deleteByResourceIds(@RequestBody List<String> ids) {
return CallBack.success(resourceService.batchDeleteResource(ids));
}
}
......@@ -14,7 +14,7 @@ public interface VideoResourceMapper extends BaseMapper<VideoResource> {
+ "select id ,objectId,name,resourceId,resourceType,createTime from res_video_resource "
+ "where objectId = #{id} "
+ "<if test='resourceType != null'> and resourceType = #{resourceType}</if>"
+ "<if test='name != null'> and name like concat #{name}</if>"
+ "<if test='name != null'> and name like concat ('%',#{name},'%')</if>"
+ "</script>")
List<ResourceRelationVo> queryByIdAndResourceType(QueryResourceRelationForm entity);
}
......@@ -24,6 +24,8 @@ import com.zrqx.core.model.resource.animationlibrary.AnimationGoods;
import com.zrqx.core.model.resource.animationlibrary.AnimationLibrary;
import com.zrqx.core.model.resource.animationlibrary.AnimationLibraryDiyType;
import com.zrqx.core.model.resource.animationlibrary.AnimationLibraryLableDiyType;
import com.zrqx.core.model.resource.animationlibrary.AnimationResource;
import com.zrqx.core.model.resource.pdffilelibrary.PdfResource;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.PageInfo;
import com.zrqx.core.util.PageParam;
......@@ -33,6 +35,7 @@ import com.zrqx.resource.bg.mapper.animationlibrary.AnimationGoodsMapper;
import com.zrqx.resource.bg.mapper.animationlibrary.AnimationLibraryDiyTypeMapper;
import com.zrqx.resource.bg.mapper.animationlibrary.AnimationLibraryLableMapper;
import com.zrqx.resource.bg.mapper.animationlibrary.AnimationLibraryMapper;
import com.zrqx.resource.bg.mapper.animationlibrary.AnimationResourceMapper;
import com.zrqx.resource.bg.service.recycleBin.ResourceRecycleBinService;
/**
......@@ -53,6 +56,8 @@ public class AnimationLibrarySerivceImpl extends BaseServiceImpl<AnimationLibrar
private AnimationLibraryLableMapper lableMapper;
@Autowired
private ResourceRecycleBinService binService;
@Autowired
private AnimationResourceMapper animationResourceMapper;
@Override
public BaseMapper<AnimationLibrary> getMapper() {
......@@ -273,4 +278,5 @@ public class AnimationLibrarySerivceImpl extends BaseServiceImpl<AnimationLibrar
List<AnimationLibraryListVO> list = mapper.queryByTileAndDiyType(form);
return new PageInfo<AnimationLibraryListVO>(list);
}
}
......@@ -67,4 +67,5 @@ public interface AnimationLibraryService extends BaseService<AnimationLibrary,In
*/
boolean Update(UpdateAnimationLibraryForm form);
}
......@@ -18,4 +18,12 @@ public interface AnimationResourceService extends BaseService<AnimationResource,
* @date: 2018年7月24日 上午9:09:34
*/
List<ResourceRelationVo> queryByIdAndResourceType(QueryResourceRelationForm entity, PageParam pageParam);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午4:57:06
*/
boolean batchDeleteResource(List<String> ids);
}
......@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.zrqx.core.exception.BaseException;
import com.zrqx.core.form.resource.bg.QueryResourceRelationForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.animationlibrary.AnimationResource;
......@@ -38,4 +39,16 @@ public class AnimationResourceServiceImpl extends BaseServiceImpl<AnimationResou
// TODO Auto-generated method stub
return animationResourceMapper.queryByIdAndResourceType(entity);
}
@Override
public boolean batchDeleteResource(List<String> ids) {
if (ids.size() == 0) {
throw new BaseException("没有选中任何数据,请重新选择");
}
createCriteria().andIn("id", ids);
List<AnimationResource> list = animationResourceMapper.selectByExample(example);
for (AnimationResource entity : list) {
animationResourceMapper.deleteByPrimaryKey(entity);
}
return true;
}
}
......@@ -18,4 +18,6 @@ public interface ArticleResourceService extends BaseService<ArticleResource, Int
* @date: 2018年7月24日 上午9:09:34
*/
List<ResourceRelationVo> queryByIdAndResourceType(QueryResourceRelationForm entity, PageParam pageParam);
boolean batchDeleteResource(List<String> ids);
}
......@@ -6,8 +6,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.zrqx.core.exception.BaseException;
import com.zrqx.core.form.resource.bg.QueryResourceRelationForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.animationlibrary.AnimationResource;
import com.zrqx.core.model.resource.articlelibrary.ArticleResource;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.PageParam;
......@@ -40,4 +42,17 @@ public class ArticleResourceServiceImpl extends BaseServiceImpl<ArticleResource,
return articleResourceMapper.queryByIdAndResourceType(entity);
}
@Override
public boolean batchDeleteResource(List<String> ids) {
if (ids.size() == 0) {
throw new BaseException("没有选中任何数据,请重新选择");
}
createCriteria().andIn("id", ids);
List<ArticleResource> list = articleResourceMapper.selectByExample(example);
for (ArticleResource entity : list) {
articleResourceMapper.deleteByPrimaryKey(entity);
}
return true;
}
}
......@@ -24,6 +24,7 @@ import com.zrqx.core.model.resource.audiolibrary.AudioGoods;
import com.zrqx.core.model.resource.audiolibrary.AudioLibrary;
import com.zrqx.core.model.resource.audiolibrary.AudioLibraryDiyType;
import com.zrqx.core.model.resource.audiolibrary.AudioLibraryLableDiyType;
import com.zrqx.core.model.resource.audiolibrary.AudioResource;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.PageInfo;
import com.zrqx.core.util.PageParam;
......@@ -33,6 +34,7 @@ import com.zrqx.resource.bg.mapper.audiolibrary.AudioGoodsMapper;
import com.zrqx.resource.bg.mapper.audiolibrary.AudioLibraryDiyTypeMapper;
import com.zrqx.resource.bg.mapper.audiolibrary.AudioLibraryLableMapper;
import com.zrqx.resource.bg.mapper.audiolibrary.AudioLibraryMapper;
import com.zrqx.resource.bg.mapper.audiolibrary.AudioResourceMapper;
import com.zrqx.resource.bg.service.recycleBin.ResourceRecycleBinService;
/**
......@@ -53,6 +55,8 @@ public class AudioLibrarySerivceImpl extends BaseServiceImpl<AudioLibrary,Intege
private AudioLibraryLableMapper audioLibraryLableMapper;
@Autowired
private ResourceRecycleBinService binService;
@Autowired
private AudioResourceMapper audioResourceMapper;
@Override
public BaseMapper<AudioLibrary> getMapper() {
......
......@@ -40,6 +40,7 @@ public interface AudioLibraryService extends BaseService<AudioLibrary,Integer>{
* @date: 2018年11月22日 下午2:39:23
*/
boolean batchDelete(List<String> ids);
/**
* 后台分页查询
* @param form
......@@ -66,5 +67,4 @@ public interface AudioLibraryService extends BaseService<AudioLibrary,Integer>{
* @date: 2019年1月4日 下午3:22:14
*/
public boolean Update(UpdateAudioLibraryForm form);
}
......@@ -18,4 +18,12 @@ public interface AudioResourceService extends BaseService<AudioResource, Integer
* @date: 2018年7月24日 上午9:09:34
*/
List<ResourceRelationVo> queryByIdAndResourceType(QueryResourceRelationForm entity, PageParam pageParam);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午4:07:51
*/
boolean batchDeleteResource(List<String> ids);
}
......@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.zrqx.core.exception.BaseException;
import com.zrqx.core.form.resource.bg.QueryResourceRelationForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.audiolibrary.AudioResource;
......@@ -38,5 +39,16 @@ public class AudioResourceServiceImpl extends BaseServiceImpl<AudioResource, Int
// TODO Auto-generated method stub
return audioResourceapper.queryByIdAndResourceType(entity);
}
@Override
public boolean batchDeleteResource(List<String> ids) {
if (ids.size() == 0) {
throw new BaseException("没有选中任何数据,请重新选择");
}
createCriteria().andIn("id", ids);
List<AudioResource> list = audioResourceapper.selectByExample(example);
for (AudioResource entity : list) {
audioResourceapper.deleteByPrimaryKey(entity);
}
return true;
}
}
......@@ -18,4 +18,12 @@ public interface CoursewareResourceService extends BaseService<CoursewareResourc
* @date: 2018年7月24日 上午9:09:34
*/
List<ResourceRelationVo> queryByIdAndResourceType(QueryResourceRelationForm entity, PageParam pageParam);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午5:20:48
*/
boolean batchDeleteResource(List<String> ids);
}
......@@ -6,8 +6,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.zrqx.core.exception.BaseException;
import com.zrqx.core.form.resource.bg.QueryResourceRelationForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.audiolibrary.AudioResource;
import com.zrqx.core.model.resource.coursewarelibrary.CoursewareResource;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.PageParam;
......@@ -39,4 +41,6 @@ public class CoursewareResourceServiceImpl extends BaseServiceImpl<CoursewareRes
// TODO Auto-generated method stub
return coursewareResourceMapper.queryByIdAndResourceType(entity);
}
}
......@@ -18,5 +18,12 @@ public interface BookResourceService extends BaseService<BookResource, Integer>
* @date: 2018年7月24日 上午9:09:34
*/
List<ResourceRelationVo> queryByIdAndResourceType(QueryResourceRelationForm entity, PageParam pageParam);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午5:20:48
*/
boolean batchDeleteResource(List<String> ids);
}
......@@ -6,9 +6,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.zrqx.core.exception.BaseException;
import com.zrqx.core.form.resource.bg.QueryResourceRelationForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.articlelibrary.ArticleResource;
import com.zrqx.core.model.resource.coursewarelibrary.CoursewareResource;
import com.zrqx.core.model.resource.ebook.BookResource;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.PageParam;
......@@ -41,5 +43,16 @@ public class BookResourceServiceImpl extends BaseServiceImpl<BookResource, Integ
// TODO Auto-generated method stub
return bookResourceMapper.queryByIdAndResourceType(entity);
}
@Override
public boolean batchDeleteResource(List<String> ids) {
if (ids.size() == 0) {
throw new BaseException("没有选中任何数据,请重新选择");
}
createCriteria().andIn("id", ids);
List<BookResource> list = bookResourceMapper.selectByExample(example);
for (BookResource entity : list) {
bookResourceMapper.deleteByPrimaryKey(entity);
}
return true;
}
}
......@@ -19,5 +19,12 @@ public interface ImageResourceService extends BaseService<ImageResource, Integer
* @date: 2018年7月24日 上午9:09:34
*/
List<ResourceRelationVo> queryByIdAndResourceType(QueryResourceRelationForm entity, PageParam pageParam);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午5:20:48
*/
boolean batchDeleteResource(List<String> ids);
}
......@@ -6,8 +6,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.zrqx.core.exception.BaseException;
import com.zrqx.core.form.resource.bg.QueryResourceRelationForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.ebook.BookResource;
import com.zrqx.core.model.resource.imagelibrary.ImageResource;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.PageParam;
......@@ -38,4 +40,16 @@ public class ImageResourceServiceImpl extends BaseServiceImpl<ImageResource, Int
// TODO Auto-generated method stub
return imageResourceMapper.queryByIdAndResourceType(entity);
}
@Override
public boolean batchDeleteResource(List<String> ids) {
if (ids.size() == 0) {
throw new BaseException("没有选中任何数据,请重新选择");
}
createCriteria().andIn("id", ids);
List<ImageResource> list = imageResourceMapper.selectByExample(example);
for (ImageResource entity : list) {
imageResourceMapper.deleteByPrimaryKey(entity);
}
return true;
}
}
......@@ -24,6 +24,8 @@ import com.zrqx.core.model.resource.pdffilelibrary.PdfGoods;
import com.zrqx.core.model.resource.pdffilelibrary.PdfLibrary;
import com.zrqx.core.model.resource.pdffilelibrary.PdfLibraryDiyType;
import com.zrqx.core.model.resource.pdffilelibrary.PdfLibraryLableDiyType;
import com.zrqx.core.model.resource.pdffilelibrary.PdfResource;
import com.zrqx.core.model.resource.periodical.PeriodVolumeResource;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.PageInfo;
import com.zrqx.core.util.PageParam;
......@@ -33,6 +35,7 @@ import com.zrqx.resource.bg.mapper.pdffilelibrary.PdfGoodsMapper;
import com.zrqx.resource.bg.mapper.pdffilelibrary.PdfLibraryDiyTypeMapper;
import com.zrqx.resource.bg.mapper.pdffilelibrary.PdfLibraryLableMapper;
import com.zrqx.resource.bg.mapper.pdffilelibrary.PdfLibraryMapper;
import com.zrqx.resource.bg.mapper.pdffilelibrary.PdfResourceMapper;
import com.zrqx.resource.bg.service.recycleBin.ResourceRecycleBinService;
/**
......@@ -53,6 +56,9 @@ public class PdfLibrarySerivceImpl extends BaseServiceImpl<PdfLibrary,Integer> i
private PdfLibraryLableMapper pdfLibraryLableMapper;
@Autowired
private ResourceRecycleBinService binService;
@Autowired
private PdfResourceMapper pdfResourceMapper;
@Override
public BaseMapper<PdfLibrary> getMapper() {
......@@ -267,6 +273,4 @@ public class PdfLibrarySerivceImpl extends BaseServiceImpl<PdfLibrary,Integer> i
List<PdfLibraryListVO> list = mapper.queryByTileAndDiyType(form);
return new PageInfo<PdfLibraryListVO>(list);
}
}
......@@ -18,4 +18,12 @@ public interface PdfResourceService extends BaseService<PdfResource, Integer> {
* @date: 2018年7月24日 上午9:09:34
*/
List<ResourceRelationVo> queryByIdAndResourceType(QueryResourceRelationForm entity, PageParam pageParam);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午4:22:22
*/
boolean batchDeleteResource(List<String> ids);
}
......@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.zrqx.core.exception.BaseException;
import com.zrqx.core.form.resource.bg.QueryResourceRelationForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.pdffilelibrary.PdfResource;
......@@ -38,4 +39,16 @@ public class PdfResourceServiceImpl extends BaseServiceImpl<PdfResource, Integer
// TODO Auto-generated method stub
return pdfResourceMapper.queryByIdAndResourceType(entity);
}
@Override
public boolean batchDeleteResource(List<String> ids) {
if (ids.size() == 0) {
throw new BaseException("没有选中任何数据,请重新选择");
}
createCriteria().andIn("id", ids);
List<PdfResource> list = pdfResourceMapper.selectByExample(example);
for (PdfResource entity : list) {
pdfResourceMapper.deleteByPrimaryKey(entity);
}
return true;
}
}
......@@ -18,4 +18,12 @@ public interface PeriodVolumeResourceService extends BaseService<PeriodVolumeRes
* @date: 2018年7月24日 上午9:09:34
*/
List<ResourceRelationVo> queryByIdAndResourceType(QueryResourceRelationForm entity, PageParam pageParam);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午4:07:51
*/
boolean batchDeleteResource(List<String> ids);
}
......@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.zrqx.core.exception.BaseException;
import com.zrqx.core.form.resource.bg.QueryResourceRelationForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.periodical.PeriodVolumeResource;
......@@ -38,4 +39,16 @@ public class PeriodVolumeResourceServiceImpl extends BaseServiceImpl<PeriodVolum
// TODO Auto-generated method stub
return resourceMapper.queryByIdAndResourceType(entity);
}
@Override
public boolean batchDeleteResource(List<String> ids) {
if (ids.size() == 0) {
throw new BaseException("没有选中任何数据,请重新选择");
}
createCriteria().andIn("id", ids);
List<PeriodVolumeResource> list = resourceMapper.selectByExample(example);
for (PeriodVolumeResource entity : list) {
resourceMapper.deleteByPrimaryKey(entity);
}
return true;
}
}
......@@ -42,5 +42,7 @@ public interface PeriodVolumeService extends BaseService<PeriodVolume, Integer>
*/
PageInfo<PeriodVolumeListVO> pageByTitleAndDiyType(QueryResourceForPoPForm form, PageParam pageParam);
boolean batchDelete(List<String> ids);
}
......@@ -14,15 +14,21 @@ import com.zrqx.core.form.resource.bg.periodical.QueryPeriodVolumeForm;
import com.zrqx.core.form.resource.bg.periodical.SaveUpdatePeriodVolumeForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.periodical.PeriodVolume;
import com.zrqx.core.model.resource.periodical.PeriodVolumeResource;
import com.zrqx.core.model.resource.videolibrary.VideoResource;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.PageInfo;
import com.zrqx.core.util.PageParam;
import com.zrqx.core.vo.resource.periodicel.PeriodVolumeListVO;
import com.zrqx.resource.bg.mapper.periodical.PeriodVolumeMapper;
import com.zrqx.resource.bg.mapper.periodical.PeriodVolumeResourceMapper;
@Service
public class PeriodVolumeServiceImpl extends BaseServiceImpl<PeriodVolume, Integer> implements PeriodVolumeService{
@Autowired
private PeriodVolumeMapper periodVolumeMapper;
@Autowired
private PeriodVolumeResourceMapper periodVolumeResourceMapper;
@Override
public BaseMapper<PeriodVolume> getMapper() {
......
......@@ -590,7 +590,7 @@ public class ResourceRecycleBinSerivceImpl extends BaseServiceImpl<ResourceRecyc
return new PageInfo<ResourceRecycleBinListVO>(list);
}
@Override
public boolean batchRestore(List<Integer> ids) {
public boolean batchRestore(List<String> ids) {
if (ids.size() == 0) {
throw new BaseException("没有选中任何数据,请重新选择");
}
......
......@@ -44,7 +44,7 @@ public interface ResourceRecycleBinService extends BaseService<ResourceRecycleBi
* @date: 2019年1月16日 下午2:50:21
*/
public boolean batchDeleteAll();
public boolean batchRestore(List<Integer> ids);
public boolean batchRestore(List<String> ids);
public boolean deleteResource(ResourceRecycleBin bin,String type);
}
......@@ -21,10 +21,12 @@ import com.zrqx.core.form.resource.bg.videolibrary.SaveUpdateVideoLibraryForm;
import com.zrqx.core.form.resource.bg.videolibrary.SaveVideoLibraryForm;
import com.zrqx.core.form.resource.bg.videolibrary.UpdateVideoLibraryForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.audiolibrary.AudioResource;
import com.zrqx.core.model.resource.videolibrary.VideoGoods;
import com.zrqx.core.model.resource.videolibrary.VideoLibrary;
import com.zrqx.core.model.resource.videolibrary.VideoLibraryDiyType;
import com.zrqx.core.model.resource.videolibrary.VideoLibraryLableDiyType;
import com.zrqx.core.model.resource.videolibrary.VideoResource;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.PageInfo;
import com.zrqx.core.util.PageParam;
......@@ -34,6 +36,7 @@ import com.zrqx.resource.bg.mapper.videolibrary.VideoGoodsMapper;
import com.zrqx.resource.bg.mapper.videolibrary.VideoLibraryDiyTypeMapper;
import com.zrqx.resource.bg.mapper.videolibrary.VideoLibraryLableMapper;
import com.zrqx.resource.bg.mapper.videolibrary.VideoLibraryMapper;
import com.zrqx.resource.bg.mapper.videolibrary.VideoResourceMapper;
import com.zrqx.resource.bg.service.recycleBin.ResourceRecycleBinService;
/**
......@@ -54,6 +57,8 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,Intege
private ResourceRecycleBinService binService;
@Autowired
private VideoGoodsService videoGoodsService;
@Autowired
private VideoResourceMapper videoResourceMapper;
@Override
public BaseMapper<VideoLibrary> getMapper() {
......@@ -240,6 +245,7 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,Intege
}
return true;
}
/**
* 后台分页查询
* @param form
......
......@@ -66,5 +66,6 @@ public interface VideoLibraryService extends BaseService<VideoLibrary,Integer>{
* @date: 2019年1月3日 下午2:26:13
*/
boolean Update(UpdateVideoLibraryForm form);
}
......@@ -18,4 +18,12 @@ public interface VideoResourceService extends BaseService<VideoResource, Integer
* @date: 2018年7月24日 上午9:09:34
*/
List<ResourceRelationVo> queryByIdAndResourceType(QueryResourceRelationForm entity, PageParam pageParam);
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午4:16:02
*/
boolean batchDeleteResource(List<String> ids);
}
......@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.zrqx.core.exception.BaseException;
import com.zrqx.core.form.resource.bg.QueryResourceRelationForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.videolibrary.VideoResource;
......@@ -38,4 +39,23 @@ public class VideoResourceServiceImpl extends BaseServiceImpl<VideoResource, Int
// TODO Auto-generated method stub
return videoResourceMapper.queryByIdAndResourceType(entity);
}
/**
* 批量删除相关资源
* @param ids
* @return
* @author rjc
* @date: 2019年2月15日 下午4:15:00
*/
@Override
public boolean batchDeleteResource(List<String> ids) {
if (ids.size() == 0) {
throw new BaseException("没有选中任何数据,请重新选择");
}
createCriteria().andIn("id", ids);
List<VideoResource> list = videoResourceMapper.selectByExample(example);
for (VideoResource entity : list) {
videoResourceMapper.deleteByPrimaryKey(entity);
}
return true;
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论