|
|
@@ -0,0 +1,36 @@
|
|
|
+package com.uas.platform.b2b.erp.controller;
|
|
|
+
|
|
|
+import com.uas.platform.b2b.service.UserService;
|
|
|
+import com.uas.platform.b2b.support.UsageBufferedLogger;
|
|
|
+import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
+import java.net.URLDecoder;
|
|
|
+
|
|
|
+/**
|
|
|
+ * Created by wangmh on 2017/8/9.
|
|
|
+ */
|
|
|
+@Controller("erp.UserController")
|
|
|
+@RequestMapping("erp/account/user")
|
|
|
+public class UserController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private UserService userService;
|
|
|
+
|
|
|
+ private final static UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
|
|
|
+
|
|
|
+ @RequestMapping(value = "/{uu}", method = RequestMethod.DELETE)
|
|
|
+ public ResponseEntity<String> removeUser(@PathVariable("uu") Long uu)throws UnsupportedEncodingException {
|
|
|
+ if (uu == null) {
|
|
|
+ return new ResponseEntity<String>(HttpStatus.NOT_MODIFIED);
|
|
|
+ }
|
|
|
+ userService.removeUser(uu);
|
|
|
+ logger.log("用户信息", "删除用户,UU:" + uu);
|
|
|
+ return new ResponseEntity<String>(HttpStatus.OK);
|
|
|
+ }
|
|
|
+}
|