提交 2f93c5fe authored 作者: yucaiwei's avatar yucaiwei

--no commit message

上级 4c3dd31e
......@@ -29,12 +29,12 @@ import com.zrqx.core.form.member.bg.organ.QueryOrganForm;
import com.zrqx.core.form.member.bg.organ.SaveOrUpdateOrganForm;
import com.zrqx.core.form.resource.bg.diytype.SaveDiyTypeForm;
import com.zrqx.core.model.member.Organ;
import com.zrqx.core.model.resource.diytype.DiyType;
import com.zrqx.core.util.datatype.ArrayUtils;
import com.zrqx.core.util.page.PageInfo;
import com.zrqx.core.util.page.PageParam;
import com.zrqx.core.util.response.CallBack;
import com.zrqx.core.vo.member.bg.organ.OrganVO;
import com.zrqx.core.vo.resource.diytype.DiyTypeOneVO;
import com.zrqx.member.bg.client.resource.ResourceClient;
import com.zrqx.member.bg.organ.service.OrganService;
import com.zrqx.member.commons.redis.Redis;
......@@ -98,21 +98,21 @@ public class OrganController {
@ApiOperation(value = "查询", notes = "根据ID查询")
@GetMapping(value = MemberRequestPath.OID)
public CallBack<OrganVO> getById(@PathVariable Integer oid) {
List<DiyType>list = new ArrayList<DiyType>();
Organ entity = service.selectByPrimaryKey(oid);
OrganVO vo = new OrganVO();
BeanUtils.copyProperties(entity,vo);
String code = entity.getRelatedResourceTypes();
if(StringUtils.isNotBlank(code)){
String[] arr = code.split(",");
if(arr != null && arr.length != 0){
for (String string : arr) {
DiyType diytype = resourceClient.selectDiyTypeByCode(string).getData();
list.add(diytype);
List<DiyTypeOneVO> list = new ArrayList<DiyTypeOneVO>();
if(StringUtils.isNotBlank(vo.getRelatedResourceTypes())){
String[] arr = vo.getRelatedResourceTypes().split(",");
if(arr != null && arr.length > 0){
for(String s : arr){
DiyTypeOneVO one = new DiyTypeOneVO();
one.setCode(s);
list.add(one);
}
}
}
vo.setDiyType(list);
vo.setDiyTypeCode(list);
return CallBack.success(vo);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论