Commit bd60990b authored by 张森's avatar 张森

添加单位图片API

parent 104db640
......@@ -234,6 +234,33 @@ public class OrgUsrController extends BaseController {
}
/**
* 获取单位图片
*
* @param id
* @return
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getUnit/{id}/companyPhoto", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取单位图片", notes = "获取单位图片")
public ResponseModel<Map<String, Object>> companyPhoto(HttpServletRequest request, @PathVariable Long id) throws Exception {
OrgUsrFormDto orgUsrFormDto = iOrgUsrService.selectCompanyById(id);
Map<String, Object> map = orgUsrFormDto.getMap();
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("current", 1);
resultMap.put("total", 1);
resultMap.put("records", new ArrayList<>());
if (!ObjectUtils.isEmpty(map)) {
List<Map<String, Object>> list = new ArrayList<>();
HashMap<String, Object> hashMap = new HashMap<>();
hashMap.put("url", map.getOrDefault("companyPhoto", ""));
list.add(hashMap);
resultMap.put("records", list);
return ResponseHelper.buildResponse(resultMap);
}
return ResponseHelper.buildResponse(resultMap);
}
/**
* 根据单位code查询单位
*
* @param code
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment