|
@@ -2,8 +2,10 @@ package com.hssx.cloudmodel.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.hssx.cloudmodel.entity.Company;
|
|
import com.hssx.cloudmodel.entity.Company;
|
|
|
|
+import com.hssx.cloudmodel.entity.Role;
|
|
import com.hssx.cloudmodel.entity.User;
|
|
import com.hssx.cloudmodel.entity.User;
|
|
import com.hssx.cloudmodel.service.CompanyService;
|
|
import com.hssx.cloudmodel.service.CompanyService;
|
|
|
|
+import com.hssx.cloudmodel.service.RoleService;
|
|
import com.hssx.cloudmodel.service.UserService;
|
|
import com.hssx.cloudmodel.service.UserService;
|
|
import com.hssx.cloudmodel.util.HttpRespMsg;
|
|
import com.hssx.cloudmodel.util.HttpRespMsg;
|
|
import com.hssx.cloudmodel.util.MD5Util;
|
|
import com.hssx.cloudmodel.util.MD5Util;
|
|
@@ -37,6 +39,8 @@ public class UserController {
|
|
private UserService userService;
|
|
private UserService userService;
|
|
@Autowired
|
|
@Autowired
|
|
private CompanyService companyService;
|
|
private CompanyService companyService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private RoleService roleService;
|
|
|
|
|
|
/**
|
|
/**
|
|
*
|
|
*
|
|
@@ -63,7 +67,21 @@ public class UserController {
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public HttpRespMsg getCompanyList(){
|
|
public HttpRespMsg getCompanyList(){
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
- List<Company> list = companyService.list();
|
|
|
|
|
|
+ List<Company> list = companyService.getIdAndNamelist();
|
|
|
|
+ msg.data = list;
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 创建账号是所获取的角色列表
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation(value = "获取角色列表")
|
|
|
|
+ @RequestMapping("getRoleList")
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public HttpRespMsg getRoleList(){
|
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
|
|
+ List<Role> list = roleService.getIdAndNamelist();
|
|
msg.data = list;
|
|
msg.data = list;
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
@@ -72,7 +90,7 @@ public class UserController {
|
|
*
|
|
*
|
|
* 参数:account 账号 username 用户名(账号使用者的名字)
|
|
* 参数:account 账号 username 用户名(账号使用者的名字)
|
|
* password 密码 ,mobile 手机号 ,roleType 角色类型, companyId 所属公司id
|
|
* password 密码 ,mobile 手机号 ,roleType 角色类型, companyId 所属公司id
|
|
- * team_name 团体名称 :客户方、供应方
|
|
|
|
|
|
+ * teamName 团体名称 :客户方、供应方
|
|
* flag 0-添加,1-修改
|
|
* flag 0-添加,1-修改
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|