根据nick_name查询部门名称
This commit is contained in:
@@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.List;
|
||||
import com.ruoyi.fadapp.domain.vo.NickDeptVo;
|
||||
|
||||
/**
|
||||
* FAD APP认证控制器
|
||||
@@ -51,4 +53,22 @@ public class FadAppAuthController {
|
||||
authService.logout(token);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户名查部门名称
|
||||
*/
|
||||
@GetMapping("/dept-name")
|
||||
public R<String> getDeptNameByUserName(@RequestParam String userName) {
|
||||
String deptName = authService.getDeptNameByUserName(userName);
|
||||
return R.ok(deptName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量根据昵称查询部门名称
|
||||
*/
|
||||
@PostMapping("/dept-names-by-nicks")
|
||||
public R<List<NickDeptVo>> getDeptNamesByNickNames(@RequestBody List<String> nickNames) {
|
||||
List<NickDeptVo> result = authService.getDeptNamesByNickNames(nickNames);
|
||||
return R.ok(result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user