|
|
@@ -1,20 +1,5 @@
|
|
|
package com.goafanti.user.controller;
|
|
|
|
|
|
-import java.util.Calendar;
|
|
|
-import java.util.UUID;
|
|
|
-
|
|
|
-import javax.annotation.Resource;
|
|
|
-import javax.validation.Valid;
|
|
|
-
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.apache.log4j.Logger;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.validation.BindingResult;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
-
|
|
|
-import com.goafanti.admin.service.AdminService;
|
|
|
import com.goafanti.common.bo.Result;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.constant.ErrorConstants;
|
|
|
@@ -28,6 +13,17 @@ import com.goafanti.common.utils.VerifyCodeUtils;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.user.bo.InputUser;
|
|
|
import com.goafanti.user.service.UserService;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.validation.BindingResult;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.validation.Valid;
|
|
|
+import java.util.Calendar;
|
|
|
+import java.util.UUID;
|
|
|
|
|
|
@Controller
|
|
|
public class UserRegisterController extends BaseController {
|
|
|
@@ -35,13 +31,11 @@ public class UserRegisterController extends BaseController {
|
|
|
private UserService userService;
|
|
|
@Resource(name = "passwordUtil")
|
|
|
private PasswordUtil passwordUtil;
|
|
|
- @Resource
|
|
|
- private AdminService adminService;
|
|
|
- Logger logger = Logger.getLogger(UserRegisterController.class);
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 网站用户注册
|
|
|
- *
|
|
|
+ *
|
|
|
* @param user
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -105,11 +99,11 @@ public class UserRegisterController extends BaseController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* APP用户注册
|
|
|
- *
|
|
|
+ *
|
|
|
* @param user
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -169,10 +163,10 @@ public class UserRegisterController extends BaseController {
|
|
|
us.setIdentifyName(StringUtils.isBlank(user.getUnitName())?"":user.getUnitName());
|
|
|
us.setLvl(UserLevel.GENERAL.getCode());
|
|
|
userService.insertRegister(us,user.getUnitName(),user.getUsername());
|
|
|
- userService.selectByPrimaryKey(us.getId());
|
|
|
+ userService.selectByPrimaryKey(us.getId());
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
}
|