提交 32172a6a authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 f2c9547d
package com.zrqx.resource.bg.service.imagelibrary;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
......@@ -10,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zrqx.core.enums.resource.LibraryStatusEnum;
import com.zrqx.core.enums.resource.PriceOptionEnum;
import com.zrqx.core.exception.ParameterValidateException;
import com.zrqx.core.form.resource.bg.QueryResourceForPoPForm;
import com.zrqx.core.form.resource.bg.imagelibrary.QueryImageLibraryForm;
......@@ -22,10 +20,7 @@ import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.page.PageInfo;
import com.zrqx.core.util.page.PageParam;
import com.zrqx.core.vo.resource.imagelibrary.ImageLibraryListVO;
import com.zrqx.resource.bg.mapper.ResourceRelationMapper;
import com.zrqx.resource.bg.mapper.imagelibrary.ImageLibraryDiyTypeMapper;
import com.zrqx.resource.bg.mapper.imagelibrary.ImageLibraryMapper;
import com.zrqx.resource.bg.mapper.record.RecordMapper;
import tk.mybatis.mapper.entity.Example;
......@@ -37,12 +32,6 @@ public class ImageLibrarySerivceImpl extends BaseServiceImpl<ImageLibrary,String
@Autowired
private ImageLibraryMapper mapper;
@Autowired
private ImageLibraryDiyTypeMapper idrMapper;
@Autowired
private RecordMapper recordMapper;
@Autowired
private ResourceRelationMapper resourceRelationMapper;
@Override
public BaseMapper<ImageLibrary> getMapper() {
return mapper;
......
package com.zrqx.resource.fg.controller.diytype;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import tk.mybatis.mapper.entity.Example;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -14,18 +9,21 @@ import org.springframework.web.bind.annotation.RestController;
import com.github.pagehelper.PageHelper;
import com.zrqx.core.constant.resource.ResourceRequestPath;
import com.zrqx.core.enums.ResponseCodeEnum;
import com.zrqx.core.enums.resource.diytype.DiyTypeStatusEnum;
import com.zrqx.core.exception.ParameterValidateException;
import com.zrqx.core.form.resource.fg.resource.FgQueryLibraryForm;
import com.zrqx.core.model.resource.diytype.DiyType;
import com.zrqx.core.util.bean.Copy;
import com.zrqx.core.util.response.CallBack;
import com.zrqx.core.vo.resource.diytype.DiyTypeVO;
import com.zrqx.core.vo.resource.fg.diytype.FgDiyTypeRelationListVo;
import com.zrqx.core.vo.resource.fg.diytype.FgDiyTypeVo;
import com.zrqx.core.vo.resource.fg.imagelibrary.FgImageLibraryVO;
import com.zrqx.resource.fg.service.diytype.FgDiyTypeService;
import com.zrqx.resource.fg.service.resource.FgResourceLibraryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import tk.mybatis.mapper.entity.Example;
/**
* 前台-分类-controller
* @author lw
......@@ -85,7 +83,7 @@ public class FgDiyTypeController {
@ApiOperation(value = "查询精彩瞬间" , notes ="查询精彩瞬间")
@GetMapping(value = ResourceRequestPath.LIST)
public CallBack<List<FgDiyTypeVo>> List(){
return CallBack.success(fgResourceLibraryService.list());
public CallBack<List<FgDiyTypeRelationListVo>> List(FgQueryLibraryForm form){
return CallBack.success(fgResourceLibraryService.list(form));
}
}
......@@ -7,11 +7,10 @@ import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.zrqx.core.form.resource.fg.articlelibrary.FgQueryArticleLibraryForm;
import com.zrqx.core.form.resource.fg.ebook.FgQueryOtherEbookForm;
import com.zrqx.core.form.resource.fg.ebook.FgQueryEbookForm;
import com.zrqx.core.form.resource.fg.ebook.FgQueryOtherEbookForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.ebook.Ebook;
import com.zrqx.core.vo.resource.fg.articlelibrary.FgArticleLibraryListVO;
import com.zrqx.core.vo.resource.fg.ebook.FgEbookListVO;
/**
......
package com.zrqx.resource.fg.mapper.resourcerelation;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import com.zrqx.core.form.resource.fg.resource.FgQueryLibraryForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.resourcerelation.ResourceRelation;
import com.zrqx.core.vo.resource.fg.diytype.FgDiyTypeRelationListVo;
@Mapper
public interface FgResourceRelationMapper extends BaseMapper<ResourceRelation> {
@Select("<script>"
+ "select distinct a.id,a.name,a.image "
+ "from res_resource_relation a left join res_Diy_Type_Relation ad "
+ " on a.id = ad.resId "
+ "where 1=1 "
+ "<if test='form.dtId != null'>"
+ "and ad.dtId = #{form.dtId}"
+ "</if>"
+ " order by a.sort asc"
+ "</script>")
List<FgDiyTypeRelationListVo> list(FgQueryLibraryForm form);
}
......@@ -2,10 +2,13 @@ package com.zrqx.resource.fg.service.resource;
import java.util.List;
import com.zrqx.core.vo.resource.fg.diytype.FgDiyTypeVo;
import com.zrqx.core.form.resource.fg.resource.FgQueryLibraryForm;
import com.zrqx.core.model.resource.resourcerelation.ResourceRelation;
import com.zrqx.core.service.BaseService;
import com.zrqx.core.vo.resource.fg.diytype.FgDiyTypeRelationListVo;
public interface FgResourceLibraryService {
public interface FgResourceLibraryService extends BaseService<ResourceRelation,String>{
List<FgDiyTypeVo> list();
List<FgDiyTypeRelationListVo> list(FgQueryLibraryForm form);
}
......@@ -2,17 +2,28 @@ package com.zrqx.resource.fg.service.resource;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zrqx.core.vo.resource.fg.diytype.FgDiyTypeVo;
import com.zrqx.core.form.resource.fg.resource.FgQueryLibraryForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.resourcerelation.ResourceRelation;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.vo.resource.fg.diytype.FgDiyTypeRelationListVo;
import com.zrqx.resource.fg.mapper.resourcerelation.FgResourceRelationMapper;
@Service
public class FgResourceLibraryServiceImpl implements FgResourceLibraryService {
public class FgResourceLibraryServiceImpl extends BaseServiceImpl<ResourceRelation, String> implements FgResourceLibraryService {
@Autowired
private FgResourceRelationMapper mapper;
@Override
public BaseMapper<ResourceRelation> getMapper() {
return mapper;
}
@Override
public List<FgDiyTypeVo> list() {
// TODO Auto-generated method stub
return null;
public List<FgDiyTypeRelationListVo> list(FgQueryLibraryForm form) {
List<FgDiyTypeRelationListVo> list =mapper.list(form);
return list;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论