提交 0c69eb40 authored 作者: liupengfei's avatar liupengfei

--no commit message

上级 293a883f
package com.zrqx.resource.bg.controller.hourlibrary; package com.zrqx.resource.bg.controller.hourlibrary;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -18,16 +17,12 @@ import com.zrqx.resource.bg.service.ResourceRelationService; ...@@ -18,16 +17,12 @@ import com.zrqx.resource.bg.service.ResourceRelationService;
import com.zrqx.resource.bg.service.acupointlibrary.AcupointLibraryService; import com.zrqx.resource.bg.service.acupointlibrary.AcupointLibraryService;
import com.zrqx.resource.bg.service.hourlibrary.HourLibraryService; import com.zrqx.resource.bg.service.hourlibrary.HourLibraryService;
import com.zrqx.resource.commons.form.bg.hourlibrary.SaveUpdateHourLibraryForm; import com.zrqx.resource.commons.form.bg.hourlibrary.SaveUpdateHourLibraryForm;
import com.zrqx.resource.commons.model.acupointlibrary.AcupointLibrary;
import com.zrqx.resource.commons.model.hourlibrary.HourLibrary; import com.zrqx.resource.commons.model.hourlibrary.HourLibrary;
import com.zrqx.resource.commons.model.resourcerelation.ResourceRelation;
import com.zrqx.resource.commons.vo.bg.acupointlibrary.AcupointRelationVO;
import com.zrqx.resource.commons.vo.bg.hourlibrary.HourLibraryListVO; import com.zrqx.resource.commons.vo.bg.hourlibrary.HourLibraryListVO;
import com.zrqx.resource.commons.vo.bg.hourlibrary.HourLibraryVO; import com.zrqx.resource.commons.vo.bg.hourlibrary.HourLibraryVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import tk.mybatis.mapper.entity.Example;
/** /**
* 时辰库Controller * 时辰库Controller
...@@ -70,18 +65,6 @@ public class HourLibraryController { ...@@ -70,18 +65,6 @@ public class HourLibraryController {
HourLibrary entity = service.selectByPrimaryKey(oid); HourLibrary entity = service.selectByPrimaryKey(oid);
HourLibraryVO vo = new HourLibraryVO(); HourLibraryVO vo = new HourLibraryVO();
BeanUtils.copyProperties(entity,vo); BeanUtils.copyProperties(entity,vo);
Example example = new Example(ResourceRelation.class);
example.createCriteria().andEqualTo("objectId",oid);
List<ResourceRelation> resourceRelationList = resourceRelationService.selectByExample(example);
List<AcupointRelationVO> acupointList = new ArrayList<AcupointRelationVO>();
resourceRelationList.forEach(f -> {
AcupointLibrary acupointLibrary = acupointLibraryService.selectByPrimaryKey(f.getResourceId());
AcupointRelationVO acupointRelationVO = new AcupointRelationVO();
BeanUtils.copyProperties(acupointLibrary, acupointRelationVO);
acupointRelationVO.setRelationId(f.getId());
acupointList.add(acupointRelationVO);
});
vo.setAcupointList(acupointList);
return CallBack.success(vo); return CallBack.success(vo);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论