Commit b9800f32 authored by xinglei's avatar xinglei

*)增加接口

parent 5f5f0b41
......@@ -323,6 +323,22 @@ public class UnitInfoController extends BaseController {
return ResponseHelper.buildResponse(unitInfoVoIPage);
}
/**
* 根据企业名称查询详情
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/queryByOrgName")
@ApiOperation(httpMethod = "GET", value = "根据企业名称查询详情", notes = "根据企业名称查询详情")
public ResponseModel<UnitInfoDto> queryForPage(@RequestParam(value = "orgName") String orgName) {
UnitInfoDto unitInfoDto = new UnitInfoDto();
QueryWrapper<UnitInfo> unitInfoQueryWrapper = new QueryWrapper<UnitInfo>();
setQueryWrapper(unitInfoQueryWrapper, unitInfoDto, null);
List<UnitInfo> list = unitInfoServiceImpl.list(unitInfoQueryWrapper);
unitInfoDto = BeanDtoVoUtils.convert(list.get(0), UnitInfoDto.class);
return ResponseHelper.buildResponse(ValidationUtil.isEmpty(orgName) ? null : unitInfoDto);
}
private QueryWrapper<UnitInfo> setQueryWrapper(QueryWrapper<UnitInfo> queryWrapper, UnitInfoDto unitInfoDto,String sort) {
queryWrapper.eq("is_delete", false);
......
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