提交 cefdfec7 authored 作者: liupengfei's avatar liupengfei

--no commit message

上级 f0c0cec1
package com.zrqx.resource.fg.controller.hourlibrary;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
......@@ -9,16 +8,12 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zrqx.core.enums.StatusEnum;
import com.zrqx.core.util.bean.BeanUtils;
import com.zrqx.core.util.response.CallBack;
import com.zrqx.resource.bg.service.ResourceRelationService;
import com.zrqx.resource.bg.service.acupointlibrary.AcupointLibraryService;
import com.zrqx.resource.commons.model.acupointlibrary.AcupointLibrary;
import com.zrqx.resource.commons.model.hourlibrary.HourLibrary;
import com.zrqx.resource.commons.model.resourcerelation.ResourceRelation;
import com.zrqx.resource.commons.vo.bg.hourlibrary.HourLibraryListVO;
import com.zrqx.resource.commons.vo.fg.acupointlibrary.FgAcupointRelationVO;
import com.zrqx.resource.commons.vo.fg.hourlibrary.FgHourLibraryVO;
import com.zrqx.resource.fg.service.hourlibrary.FgHourLibraryService;
......@@ -58,20 +53,6 @@ public class FgHourLibraryController {
HourLibrary entity = service.selectOneByExample(example);
FgHourLibraryVO vo = new FgHourLibraryVO();
BeanUtils.copyProperties(entity,vo);
example = new Example(ResourceRelation.class);
example.createCriteria().andEqualTo("objectId",entity.getId());
List<ResourceRelation> resourceRelationList = resourceRelationService.selectByExample(example);
List<FgAcupointRelationVO> acupointList = new ArrayList<FgAcupointRelationVO>();
resourceRelationList.forEach(f -> {
AcupointLibrary a = new AcupointLibrary();
a.setId(f.getResourceId());
a.setStatus(StatusEnum.ENABLE.getCode());
AcupointLibrary acupointLibrary = acupointLibraryService.selectOne(a);
FgAcupointRelationVO acupointRelationVO = new FgAcupointRelationVO();
BeanUtils.copyProperties(acupointLibrary, acupointRelationVO);
acupointList.add(acupointRelationVO);
});
vo.setAcupointList(acupointList);
return CallBack.success(vo);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论