|
@@ -52,7 +52,7 @@ import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 类注释
|
|
|
|
|
|
+ * {@link StatusException} 状态码范围:010XXX<br>
|
|
*
|
|
*
|
|
* @author WANGWEI
|
|
* @author WANGWEI
|
|
* @date 2018年8月23日
|
|
* @date 2018年8月23日
|
|
@@ -135,7 +135,28 @@ public class OrgCloudServiceProvider extends ControllerSupport implements OrgClo
|
|
@PostMapping("getOrgsByIdList")
|
|
@PostMapping("getOrgsByIdList")
|
|
@Override
|
|
@Override
|
|
public GetOrgsByIdListResp getOrgsByIdList(@RequestBody GetOrgsByIdListReq req) {
|
|
public GetOrgsByIdListResp getOrgsByIdList(@RequestBody GetOrgsByIdListReq req) {
|
|
- return null;
|
|
|
|
|
|
+
|
|
|
|
+ List<Long> orgIdList = req.getOrgIdList();
|
|
|
|
+
|
|
|
|
+ final List<OrgBean> orgList = Lists.newArrayList();
|
|
|
|
+ for (Long cur : orgIdList) {
|
|
|
|
+ OrgEntity org = GlobalHelper.getEntity(orgRepo, cur, OrgEntity.class);
|
|
|
|
+ if (null == org) {
|
|
|
|
+ throw new StatusException("010001", "no org. [id=" + cur + "]");
|
|
|
|
+ }
|
|
|
|
+ OrgBean orgBean = new OrgBean();
|
|
|
|
+ orgBean.setId(org.getId());
|
|
|
|
+ orgBean.setName(org.getName());
|
|
|
|
+ orgBean.setCode(org.getCode());
|
|
|
|
+ orgBean.setParentId(org.getParentId());
|
|
|
|
+ orgBean.setRootId(org.getRootId());
|
|
|
|
+ orgBean.setEnable(org.getEnable());
|
|
|
|
+
|
|
|
|
+ orgList.add(orgBean);
|
|
|
|
+ }
|
|
|
|
+ GetOrgsByIdListResp resp = new GetOrgsByIdListResp();
|
|
|
|
+ resp.setOrgList(orgList);
|
|
|
|
+ return resp;
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "查询所有机构")
|
|
@ApiOperation(value = "查询所有机构")
|