|
|
@@ -33,7 +33,11 @@ import com.uas.platform.core.util.serializer.FlexJsonUtils;
|
|
|
*
|
|
|
* @author suntg
|
|
|
* @date 2015年3月10日17:37:37
|
|
|
+ *
|
|
|
+ * @since 2016-9-26 21:18:35 账户中心统一管理;部分功能保留,但转移到v2目录
|
|
|
+ * @see com.uas.platform.b2b.v2.controller.UserController
|
|
|
*/
|
|
|
+@Deprecated
|
|
|
@Controller
|
|
|
@RequestMapping(value = "/account/user")
|
|
|
public class UserController {
|
|
|
@@ -54,12 +58,13 @@ public class UserController {
|
|
|
logger.log("用户信息", "查看用户信息");
|
|
|
return userService.findAll();
|
|
|
}
|
|
|
-
|
|
|
- @RequestMapping(value="/customer/{uu}",method = RequestMethod.POST)
|
|
|
+
|
|
|
+ @RequestMapping(value = "/customer/{uu}", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
- public List<User> getUsersAndDistribute(@PathVariable("uu") Long custUu) {
|
|
|
- return userService.findUserInfoDistribute(custUu);
|
|
|
- }
|
|
|
+ public List<User> getUsersAndDistribute(@PathVariable("uu") Long custUu) {
|
|
|
+ return userService.findUserInfoDistribute(custUu);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 手机号是否可用
|
|
|
*
|
|
|
@@ -211,7 +216,7 @@ public class UserController {
|
|
|
userService.bindUserToMyEnterprise(userUU);
|
|
|
return new ResponseEntity<String>(HttpStatus.OK);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 为用户分配客户权限,查询客户(管理员才能操作)
|
|
|
*
|
|
|
@@ -224,7 +229,7 @@ public class UserController {
|
|
|
public List<Vendor> findVendor(@PathVariable("uu") Long userUU) {
|
|
|
return userService.findVendorToUser(userUU);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 为用户分配客户权限,保存绑定(管理员才能操作)
|
|
|
*
|
|
|
@@ -233,27 +238,28 @@ public class UserController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/addVendor/{uu}", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
- public ResponseEntity<String> bindVendor(@PathVariable("uu") Long userUU , @RequestBody String json) {
|
|
|
+ public ResponseEntity<String> bindVendor(@PathVariable("uu") Long userUU, @RequestBody String json) {
|
|
|
List<Vendor> ids = FlexJsonUtils.fromJsonArray(json, Vendor.class);
|
|
|
- boolean result = userService.addVendorToUser(userUU,ids);
|
|
|
- if(result) {
|
|
|
+ boolean result = userService.addVendorToUser(userUU, ids);
|
|
|
+ if (result) {
|
|
|
return new ResponseEntity<String>(HttpStatus.OK);
|
|
|
} else {
|
|
|
return new ResponseEntity<String>(HttpStatus.INTERNAL_SERVER_ERROR);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@RequestMapping(value = "/bindUserToVendor/{uu}", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
- public ResponseEntity<String> bindUserToVendor(@PathVariable("uu") Long custUU , @RequestBody String json) {
|
|
|
+ public ResponseEntity<String> bindUserToVendor(@PathVariable("uu") Long custUU, @RequestBody String json) {
|
|
|
List<User> users = FlexJsonUtils.fromJsonArray(json, User.class);
|
|
|
boolean result = userService.addUserToVendor(custUU, users);
|
|
|
- if(result) {
|
|
|
+ if (result) {
|
|
|
return new ResponseEntity<String>(HttpStatus.OK);
|
|
|
} else {
|
|
|
return new ResponseEntity<String>(HttpStatus.INTERNAL_SERVER_ERROR);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 为用户分配客户权限,删除被选中客户(管理员才能操作)
|
|
|
*
|
|
|
@@ -266,13 +272,13 @@ public class UserController {
|
|
|
public ResponseEntity<String> removeChooseVendor(@PathVariable("uu") Long userUU, @RequestBody String json) {
|
|
|
List<Long> ids = FlexJsonUtils.fromJsonArray(json, Long.class);
|
|
|
boolean result = userService.removeChooseVendor(userUU, ids);
|
|
|
- if(result) {
|
|
|
+ if (result) {
|
|
|
return new ResponseEntity<String>(HttpStatus.OK);
|
|
|
} else {
|
|
|
return new ResponseEntity<String>(HttpStatus.INTERNAL_SERVER_ERROR);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 为用户分配客户权限,查询被选中客户(管理员才能操作)
|
|
|
*
|
|
|
@@ -285,8 +291,10 @@ public class UserController {
|
|
|
public List<Vendor> findChooseVendor(@PathVariable("uu") Long userUU) {
|
|
|
return userService.findChooseVendor(userUU);
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 查询当前登录用户的分分配企业
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/findDistribute", method = RequestMethod.GET)
|