Browse Source

账户管理以及后台密保问题管理,后台实名认证审核

liusw 8 years ago
parent
commit
317cb81a85
30 changed files with 1533 additions and 149 deletions
  1. 72 0
      src/main/java/com/uas/platform/b2c/common/account/controller/SecQuestionController.java
  2. 151 83
      src/main/java/com/uas/platform/b2c/common/account/controller/UserController.java
  3. 10 0
      src/main/java/com/uas/platform/b2c/common/account/dao/SecQuestionDao.java
  4. 16 0
      src/main/java/com/uas/platform/b2c/common/account/dao/UserQuestionDao.java
  5. 75 0
      src/main/java/com/uas/platform/b2c/common/account/model/SecQuestion.java
  6. 71 0
      src/main/java/com/uas/platform/b2c/common/account/model/User.java
  7. 114 0
      src/main/java/com/uas/platform/b2c/common/account/model/UserQuestion.java
  8. 38 0
      src/main/java/com/uas/platform/b2c/common/account/service/SecQuestionService.java
  9. 24 0
      src/main/java/com/uas/platform/b2c/common/account/service/UserQuestionService.java
  10. 24 2
      src/main/java/com/uas/platform/b2c/common/account/service/UserService.java
  11. 62 0
      src/main/java/com/uas/platform/b2c/common/account/service/impl/SecQuestionServiceImpl.java
  12. 26 0
      src/main/java/com/uas/platform/b2c/common/account/service/impl/UserQuestionServiceImpl.java
  13. 27 0
      src/main/java/com/uas/platform/b2c/common/account/service/impl/UserServiceImpl.java
  14. 3 1
      src/main/webapp/WEB-INF/views/normal/adminWithNav.html
  15. 17 4
      src/main/webapp/resources/js/admin/app.js
  16. 34 0
      src/main/webapp/resources/js/admin/controllers/AuditRealAuthCtrl.js
  17. 102 0
      src/main/webapp/resources/js/admin/controllers/SecQuestionCtrl.js
  18. 26 0
      src/main/webapp/resources/js/common/query/secQuestion.js
  19. 25 0
      src/main/webapp/resources/js/common/query/user.js
  20. 260 37
      src/main/webapp/resources/js/usercenter/controllers/forstore/account_manager_ctrl.js
  21. 121 0
      src/main/webapp/resources/view/admin/audit_realAuth.html
  22. 18 0
      src/main/webapp/resources/view/admin/modal/secQuestion_add_modal.html
  23. 61 0
      src/main/webapp/resources/view/admin/sec_question.html
  24. 10 10
      src/main/webapp/resources/view/usercenter/forstore/account_manager.html
  25. 1 1
      src/main/webapp/resources/view/usercenter/forstore/buyer_transfer.html
  26. 11 6
      src/main/webapp/resources/view/vendor/modal/updatePassword.html
  27. 55 0
      src/main/webapp/resources/view/vendor/modal/updateRealAuth.html
  28. 3 4
      src/main/webapp/resources/view/vendor/modal/updateUserEmail.html
  29. 75 0
      src/main/webapp/resources/view/vendor/modal/updateUserQuestion.html
  30. 1 1
      src/main/webapp/resources/view/vendor/modal/updateUserTel.html

+ 72 - 0
src/main/java/com/uas/platform/b2c/common/account/controller/SecQuestionController.java

@@ -0,0 +1,72 @@
+package com.uas.platform.b2c.common.account.controller;
+
+import com.uas.platform.b2c.common.account.model.SecQuestion;
+import com.uas.platform.b2c.common.account.model.User;
+import com.uas.platform.b2c.common.account.service.SecQuestionService;
+import com.uas.platform.b2c.prod.product.property.model.Property;
+import com.uas.platform.core.model.PageParams;
+import com.uas.platform.core.util.serializer.FlexJsonUtils;
+import com.wordnik.swagger.annotations.ApiOperation;
+import com.wordnik.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping(value = "/user/secQuestion")
+public class SecQuestionController {
+
+    @Autowired
+    private SecQuestionService secQuestionService;
+
+    /**
+     * 添加密保问题
+     * @param secQuestion
+     * @return
+     */
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    public ResponseEntity<String> add(@RequestBody SecQuestion secQuestion) {
+        secQuestionService.save(secQuestion);
+        return new ResponseEntity<String>(HttpStatus.OK);
+    }
+
+    /**
+     * 分页获取密保问题
+     * @param pageInfo
+     * @return
+     */
+    @RequestMapping(value = "/getPageInfo", method = RequestMethod.GET)
+    @ApiOperation(value = "分页获取密保问题", httpMethod = "GET")
+    public Page<SecQuestion> getPageStatusRealAuth(@ApiParam(required = true, value = "分页参数") PageParams pageInfo) {
+        return secQuestionService.getPageSecQuestion(pageInfo);
+    }
+
+    /**
+     * 根据Id获取密保问题信息
+     * @param id
+     * @return
+     */
+    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
+    @ResponseBody
+    public SecQuestion getProperty(@PathVariable("id") Long id) {
+        return secQuestionService.findById(id);
+    }
+
+    /**
+     * 删除密保问题
+     * @param id
+     * @return
+     */
+    @RequestMapping(value = "/delete", method = RequestMethod.GET)
+    public ResponseEntity<String> delete(Long id) {
+        secQuestionService.delete(id);
+        return new ResponseEntity<String>(HttpStatus.OK);
+    }
+}

+ 151 - 83
src/main/java/com/uas/platform/b2c/common/account/controller/UserController.java

@@ -2,14 +2,12 @@ package com.uas.platform.b2c.common.account.controller;
 
 import com.uas.message.mail.service.MailService;
 import com.uas.message.sms.service.SmsService;
-import com.uas.platform.b2c.common.account.model.Enterprise;
-import com.uas.platform.b2c.common.account.model.User;
-import com.uas.platform.b2c.common.account.model.UserInfo;
+import com.uas.platform.b2c.common.account.model.*;
+import com.uas.platform.b2c.common.account.service.UserQuestionService;
 import com.uas.platform.b2c.common.account.service.UserService;
-import com.uas.platform.b2c.core.config.MessageConf;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
-import com.uas.platform.b2c.trade.inquiry.model.TradeCharge;
+import com.uas.platform.b2c.fa.payment.model.BankInfo;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.logging.BufferedLoggerManager;
 import com.uas.platform.core.model.PageInfo;
@@ -17,9 +15,11 @@ import com.uas.platform.core.model.PageParams;
 import com.uas.platform.core.util.StringUtil;
 import com.uas.platform.core.util.encry.Md5Utils;
 import com.uas.platform.core.util.serializer.FlexJsonUtils;
+import com.wordnik.swagger.annotations.ApiOperation;
+import com.wordnik.swagger.annotations.ApiParam;
+import org.jboss.logging.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
-import org.springframework.data.jpa.domain.Specification;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
@@ -27,10 +27,6 @@ import org.springframework.ui.ModelMap;
 import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.*;
 
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 import java.util.*;
@@ -54,6 +50,9 @@ public class UserController {
 	@Autowired
 	private SmsService smsService;
 
+	@Autowired
+	private UserQuestionService uqService;
+
 	private final static UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
 
 	/**
@@ -91,7 +90,7 @@ public class UserController {
 	 * @param password 用户输入密码
 	 */
 	@RequestMapping(value = "/checkPassword", method = RequestMethod.GET)
-	public ResponseEntity<String> checkPassword(String password) {
+	public ResponseEntity<String> checkPassword(final String password) {
 		User sysUser = SystemSession.getUser();
 		User user = userService.findUserPwdByUserUU(sysUser.getUserUU());
 		if (!StringUtils.isEmpty(password)) {
@@ -111,8 +110,8 @@ public class UserController {
 	 * @param password	用户输入密码
 	 */
 	@RequestMapping(value = "/updatePassword", method = RequestMethod.POST)
-	public ResponseEntity<String> updatePassword(HttpSession session, String password, String newPassword) {
-		if (password.equals(newPassword)){
+	public ResponseEntity<String> updatePassword(final HttpSession session, final String password, final String newPassword) {
+		if (password.equals(newPassword)) {
 			throw new IllegalOperatorException("新密码与旧密码相同");
 		}
 		User sysUser = SystemSession.getUser();
@@ -136,7 +135,7 @@ public class UserController {
 	 * @param userEmail 用户输入邮箱地址
 	 */
 	@RequestMapping(value = "/checkUserEmail", method = RequestMethod.GET)
-	public ResponseEntity<String> checkUserEmail(String userEmail) {
+	public ResponseEntity<String> checkUserEmail(final String userEmail) {
 		User sysUser = SystemSession.getUser();
 		User user = userService.findUserPwdByUserUU(sysUser.getUserUU());
 		if (!StringUtils.isEmpty(userEmail)) {
@@ -156,19 +155,18 @@ public class UserController {
 	 * @param newUserEmail 用户输入新邮箱地址
 	 */
 	@RequestMapping(value = "/sendCheckCode", method = RequestMethod.GET)
-	public ResponseEntity<String> sendCheckCode(String newUserEmail,HttpServletRequest request) {
+	public ResponseEntity<String> sendCheckCode(final String newUserEmail, final HttpSession session) {
 		User sysUser = SystemSession.getUser();
 		User user = userService.findUserPwdByUserUU(sysUser.getUserUU());
 		if (!StringUtils.isEmpty(newUserEmail)) {
-			HttpSession session = request.getSession();
 			//发送邮件
 			ModelMap data = new ModelMap();
-			String checkCode = String.valueOf((int)((Math.random()*9+1)*100000));
+			String checkCode = String.valueOf((int) ((Math.random() * 9 + 1) * 100000));
 			data.put("checkcode", checkCode);
 			try {
 				mailService.send("a4c45a22-436a-430c-9667-4edfd7d04a27", newUserEmail, data);
-				session.setAttribute("checkCode",checkCode);
-				session.setAttribute("checkTime",new Date().getTime());
+				session.setAttribute("checkCode", checkCode);
+				session.setAttribute("checkTime", new Date().getTime());
 				return new ResponseEntity<>(HttpStatus.OK);
 			} catch (Exception e) {
 				e.printStackTrace();
@@ -186,34 +184,33 @@ public class UserController {
 	 * @return
 	 */
 	@RequestMapping(value = "/validCheckCode", method = RequestMethod.GET)
-	public Map<String,Object> validCheckCode(String checkCode, HttpServletRequest request) {
+	public Map<String, Object> validCheckCode(final String checkCode, final HttpServletRequest request) {
 		HttpSession session = request.getSession();
 		Map<String,Object> result = new HashMap<String,Object>();
-		if(checkCode!=null){
-			Long checkTime = (Long)session.getAttribute("checkTime");
-			Long nowTime = new Date().getTime();
-			String _checkCode = (String)session.getAttribute("checkCode");
+		if (checkCode != null) {
+			Long checkTime = (Long) session.getAttribute("checkTime");
+			Long nowTime = new Date().getTime();			String _checkCode = (String) session.getAttribute("checkCode");
 			//验证码失效
-			if((nowTime-checkTime)>10*60*1000 || _checkCode==null){
-				result.put("status",2);
-				result.put("message","验证码失效");
+			if((nowTime-checkTime)>10 * 60 * 1000 || _checkCode == null) {
+				result.put("status", 2);
+				result.put("message", "验证码失效");
 				return result;
 			}
 			//验证码错误
-			if(!_checkCode.equals(checkCode)) {
-				result.put("status",0);
-				result.put("message","验证码错误");
+			if (!_checkCode.equals(checkCode)) {
+				result.put("status", 0);
+				result.put("message", "验证码错误");
 				return result;
 			}
 			//验证码正确
-			if(_checkCode.equals(checkCode)) {
-				result.put("status",1);
-				result.put("message","验证码正确");
+			if (_checkCode.equals(checkCode)) {
+				result.put("status", 1);
+				result.put("message", "验证码正确");
 				return result;
 			}
 		}
-		result.put("status",0);
-		result.put("message","验证码错误");
+		result.put("status", 0);
+		result.put("message", "验证码错误");
 		return result;
 	}
 
@@ -225,14 +222,14 @@ public class UserController {
 	 * @return
 	 */
 	@RequestMapping(value = "/updateUserEmail", method = RequestMethod.POST)
-	public ResponseEntity<String> updateUserEmail(HttpSession session, String userEmail, String newUserEmail) {
-		if (userEmail.equals(newUserEmail)){
+	public ResponseEntity<String> updateUserEmail(final HttpSession session, final String userEmail, final String newUserEmail) {
+		if (userEmail.equals(newUserEmail)) {
 			throw new IllegalOperatorException("新邮箱地址与旧邮箱地址相同");
 		}
 		User sysUser = SystemSession.getUser();
 		User user = userService.findUserPwdByUserUU(sysUser.getUserUU());
 		if (!StringUtils.isEmpty(newUserEmail)) {
-			if(!userService.isEmailUseable(newUserEmail)){
+			if (!userService.isEmailUseable(newUserEmail)) {
 				throw new IllegalOperatorException("邮箱已被注册...");
 			}
 			user.setUserEmail(newUserEmail);
@@ -252,7 +249,7 @@ public class UserController {
 	 * @return
 	 */
 	@RequestMapping(value = "/checkUserTel", method = RequestMethod.GET)
-	public ResponseEntity<String> checkUserTel(String userTel) {
+	public ResponseEntity<String> checkUserTel(final String userTel) {
 		User sysUser = SystemSession.getUser();
 		User user = userService.findUserPwdByUserUU(sysUser.getUserUU());
 		if (!StringUtils.isEmpty(userTel)) {
@@ -268,26 +265,24 @@ public class UserController {
 
 	/**
 	 * 发送手机验证码
-	 *
 	 * @param newUserTel 用户输入新手机号
+	 * @param session
 	 */
 	@RequestMapping(value = "/sendTelCheckCode", method = RequestMethod.GET)
-	public ResponseEntity<String> sendTelCheckCode(String newUserTel,HttpServletRequest request) {
+	public ResponseEntity<String> sendTelCheckCode(final String newUserTel, final HttpSession session) {
 		User sysUser = SystemSession.getUser();
 		User user = userService.findUserPwdByUserUU(sysUser.getUserUU());
 		if (!StringUtils.isEmpty(newUserTel)) {
-			HttpSession session = request.getSession();
 			//页面Token校验
-			String pageToken = (String)session.getAttribute("pageToken");
-			if(pageToken == null || pageToken.equals("")){
+			String pageToken = (String) session.getAttribute("pageToken");
+			if (pageToken == null || pageToken.equals("")) {
 				throw new IllegalOperatorException("页面信息获取失败!");
 			}
-			String checkCode = String.valueOf((int)((Math.random()*9+1)*100000));
-			System.out.println(checkCode);
+			String checkCode = String.valueOf((int) ((Math.random() * 9 + 1) * 100000));
 			try {
-				smsService.send("1eba04ae-f3d9-4105-ad32-0196309fabb3", newUserTel, new Object[] { checkCode });
-				session.setAttribute("telCheckCode",checkCode);
-				session.setAttribute("telCheckTime",new Date().getTime());
+				smsService.send("1eba04ae-f3d9-4105-ad32-0196309fabb3", newUserTel, new Object[] {checkCode});
+				session.setAttribute("telCheckCode", checkCode);
+				session.setAttribute("telCheckTime", new Date().getTime());
 				return new ResponseEntity<>(HttpStatus.OK);
 			} catch (Exception e) {
 				e.printStackTrace();
@@ -301,38 +296,37 @@ public class UserController {
 	/**
 	 * 校验手机验证码
 	 * @param telCheckCode
-	 * @param request
+	 * @param session
 	 * @return
 	 */
 	@RequestMapping(value = "/validTelCheckCode", method = RequestMethod.GET)
-	public Map<String,Object> validTelCheckCode(String telCheckCode, HttpServletRequest request) {
-		HttpSession session = request.getSession();
-		Map<String,Object> result = new HashMap<String,Object>();
-		if(!StringUtils.isEmpty(telCheckCode)){
-			Long checkTime = (Long)session.getAttribute("telCheckTime");
+	public Map<String, Object> validTelCheckCode(final String telCheckCode, final HttpSession session) {
+		Map<String, Object> result = new HashMap<String, Object>();
+		if (!StringUtils.isEmpty(telCheckCode)) {
+			Long checkTime = (Long) session.getAttribute("telCheckTime");
 			Long nowTime = new Date().getTime();
-			String _checkCode = (String)session.getAttribute("telCheckCode");
+			String _checkCode = (String) session.getAttribute("telCheckCode");
 			//验证码失效
-			if((nowTime-checkTime)>10*60*1000 || _checkCode==null){
-				result.put("status",2);
-				result.put("message","验证码失效");
+			if ((nowTime - checkTime) > 10 * 60 * 1000 || _checkCode == null) {
+				result.put("status", 2);
+				result.put("message", "验证码失效");
 				return result;
 			}
 			//验证码错误
-			if(!_checkCode.equals(telCheckCode)) {
+			if (!_checkCode.equals(telCheckCode)) {
 				result.put("status",0);
-				result.put("message","验证码错误");
+				result.put("message", "验证码错误");
 				return result;
 			}
 			//验证码正确
-			if(_checkCode.equals(telCheckCode)) {
-				result.put("status",1);
-				result.put("message","验证码正确");
+			if (_checkCode.equals(telCheckCode)) {
+				result.put("status", 1);
+				result.put("message", "验证码正确");
 				return result;
 			}
 		}
-		result.put("status",0);
-		result.put("message","验证码错误");
+		result.put("status", 0);
+		result.put("message", "验证码错误");
 		return result;
 	}
 
@@ -344,14 +338,14 @@ public class UserController {
 	 * @return
 	 */
 	@RequestMapping(value = "/updateUserTel", method = RequestMethod.POST)
-	public ResponseEntity<String> updateUserTel(HttpSession session, String userTel, String newUserTel) {
-		if (userTel.equals(newUserTel)){
+	public ResponseEntity<String> updateUserTel(final HttpSession session, final String userTel, final String newUserTel) {
+		if (userTel.equals(newUserTel)) {
 			throw new IllegalOperatorException("新手机号与旧手机号相同");
 		}
 		User sysUser = SystemSession.getUser();
 		User user = userService.findUserPwdByUserUU(sysUser.getUserUU());
 		if (!StringUtils.isEmpty(newUserTel)) {
-			if(!userService.isTelUseable(newUserTel)){
+			if (!userService.isTelUseable(newUserTel)) {
 				throw new IllegalOperatorException("手机号不可用...");
 			}
 			user.setUserTel(newUserTel);
@@ -378,9 +372,9 @@ public class UserController {
 		if (!StringUtils.isEmpty(user.getUserPay())) {
 			assert logger != null;
 			logger.log("用户信息", "是否设置支付密码,UU:" + user.getUserUU());
-			return new ResponseEntity<>(true,headers,HttpStatus.OK);
+			return new ResponseEntity<>(true, headers, HttpStatus.OK);
 		}
-		return new ResponseEntity<>(false,headers,HttpStatus.OK);
+		return new ResponseEntity<>(false, headers, HttpStatus.OK);
 	}
 
 	/**
@@ -389,7 +383,7 @@ public class UserController {
 	 * @return
 	 */
 	@RequestMapping(value = "/checkUserPay", method = RequestMethod.GET)
-	public ResponseEntity<String> checkUserPay(String userPay) {
+	public ResponseEntity<String> checkUserPay(final String userPay) {
 		User sysUser = SystemSession.getUser();
 		User user = userService.findUserPwdByUserUU(sysUser.getUserUU());
 		if (!StringUtils.isEmpty(userPay)) {
@@ -411,14 +405,14 @@ public class UserController {
 	 * @return
 	 */
 	@RequestMapping(value = "/updateUserPay", method = RequestMethod.POST)
-	public ResponseEntity<String> updateUserPay(HttpSession session, String userPay, String newUserPay) {
-		if (userPay!=null && userPay.equals(newUserPay)){
+	public ResponseEntity<String> updateUserPay(final HttpSession session, final String userPay, final String newUserPay) {
+		if (userPay != null && userPay.equals(newUserPay)) {
 			throw new IllegalOperatorException("新密码与旧密码相同");
 		}
 		User sysUser = SystemSession.getUser();
 		User user = userService.findUserPwdByUserUU(sysUser.getUserUU());
 		if (!StringUtils.isEmpty(newUserPay)) {
-			user = userService.updateUserPay(user,userPay,newUserPay);
+			user = userService.updateUserPay(user, userPay, newUserPay);
 			session.setAttribute("user", user);
 			SystemSession.setUser(user);
 			assert logger != null;
@@ -428,13 +422,63 @@ public class UserController {
 			throw new IllegalOperatorException("新密码不能为空");
 	}
 
+	/**
+	 * 查询当前用户的密保问题
+	 * @return
+	 */
+	@RequestMapping(value = "/getUserQuestion", method = RequestMethod.GET)
+	public List<UserQuestion> getUserQuestion() {
+		User sysUser = SystemSession.getUser();
+		HttpHeaders headers = new HttpHeaders();
+		headers.add("Content-Type", "application/json; charset=utf-8");
+		List<UserQuestion> questions = uqService.findUserQuestionByUserUUOrderBySortAsc(sysUser.getUserUU());
+		Map<String, List<UserQuestion>> result = new HashMap<String, List<UserQuestion>>();
+		result.put("questions", questions);
+		return questions;
+	}
+
+	/**
+	 * 设置密保问题
+	 * @param userQuestions
+	 * @return
+	 */
+	@RequestMapping(value = "/updateUserQuestion", method = RequestMethod.POST)
+	public ResponseEntity<String> updateUserQuestion(@RequestBody final List<UserQuestion> userQuestions) {
+		User sysUser = SystemSession.getUser();
+		for (UserQuestion uq : userQuestions) {
+			uq.setUser(sysUser);
+			uq.setUserUU(sysUser.getUserUU());
+			uqService.save(uq);
+		}
+		return new ResponseEntity<>(HttpStatus.OK);
+	}
+
+	/**
+	 * 实名认证
+	 * @param userName
+	 * @param userIdcode
+	 * @param idImgUrl
+	 * @return
+	 */
+	@RequestMapping(value = "/updateRealAuth", method = RequestMethod.POST)
+	public ResponseEntity<String> updateRealAuth(final String userName, final String userIdcode, final String idImgUrl) {
+		User sysUser = SystemSession.getUser();
+		sysUser.setUserName(userName);
+		sysUser.setUserIccode(userIdcode);
+		sysUser.setIdImgUrl(idImgUrl);
+		sysUser.setIdEnable((short)2);
+		sysUser.setIdDate(new Date());
+		userService.saveRealAuth(sysUser);
+		return new ResponseEntity<>(HttpStatus.OK);
+	}
+
 	/**
 	 * 根据UU获取该企业所有人员信息
 	 * @param enuu 企业uu号
 	 * @return 完整的企业人员信息
 	 */
 	@RequestMapping(value = "/enterprise/info",method = RequestMethod.GET)
-	public Page<User> getEnterpriseAllUsersInfo(PageParams params, Long enuu){
+	public Page<User> getEnterpriseAllUsersInfo(final PageParams params,Long enuu){
 		PageInfo pageInfo = new PageInfo(params);
 		return userService.findUsersPageByEnUU(pageInfo,enuu);
 	}
@@ -449,6 +493,7 @@ public class UserController {
 		PageInfo pageInfo = new PageInfo(params);
 		return userService.findUsersPageByEnUUAndKeyword(pageInfo,enuu,keyword);
 	}
+
 	/**
 	 * 新增用户
 	 *
@@ -500,7 +545,7 @@ public class UserController {
 	 */
 	@RequestMapping(value = "/searchUser", method = RequestMethod.GET)
 	@ResponseBody
-	public UserInfo getUser(String keyWord) {
+	public UserInfo getUser(final String keyWord) {
 		return userService.findUserByKeyWord(keyWord);
 	}
 
@@ -513,7 +558,7 @@ public class UserController {
 	 */
 	@RequestMapping(value = "/bindUser", method = RequestMethod.GET)
 	@ResponseBody
-	public ResponseEntity<String> bindUser(Long userUU) {
+	public ResponseEntity<String> bindUser(final Long userUU) {
 		userService.bindUserToMyEnterprise(userUU);
 		return new ResponseEntity<String>(HttpStatus.OK);
 	}
@@ -524,12 +569,12 @@ public class UserController {
 	 * @return
 	 */
 	@RequestMapping(value = "/telEnable", method = RequestMethod.GET)
-	public ResponseEntity<Boolean> telEnable(String tel) {
+	public ResponseEntity<Boolean> telEnable(final String tel) {
 		if (tel == null) {
 			throw new IllegalOperatorException("手机号不能为空!");
 		} else {
 			HttpHeaders headers = new HttpHeaders();
-			headers.add("Content-Type", "application/text; charset=utf-8");
+			headers.add("Content-Type", "application/json; charset=utf-8");
 			return new ResponseEntity<Boolean>(userService.isTelUseable(tel.replaceAll("\\s*", "")), headers,
 					HttpStatus.OK);
 		}
@@ -542,7 +587,7 @@ public class UserController {
 	 * @return
 	 */
 	@RequestMapping(value = "/emailEnable", method = RequestMethod.GET)
-	public ResponseEntity<Boolean> emailEnable(String email) {
+	public ResponseEntity<Boolean> emailEnable(final String email) {
 		if (email == null) {
 			throw new IllegalOperatorException("邮箱不能为空");
 		} else {
@@ -559,10 +604,33 @@ public class UserController {
 	 * @return
 	 */
 	@RequestMapping(value = "/getPageToken", method = RequestMethod.GET)
-	public ResponseEntity<String> getPageToken(HttpServletRequest request) {
+	public ResponseEntity<String> getPageToken(final HttpServletRequest request) {
 		String pageToken = StringUtil.uuid();
 		HttpSession session = request.getSession();
-		session.setAttribute("pageToken",pageToken);
+		session.setAttribute("pageToken", pageToken);
+		return new ResponseEntity<String>(HttpStatus.OK);
+	}
+
+	/**
+	 * 分页获取实名认证
+	 * @param pageInfo
+	 * @param status
+	 * @return
+	 */
+	@RequestMapping(value = "/getPageStatusRealAuth", method = RequestMethod.GET)
+	@ApiOperation(value = "分页获取实名认证", httpMethod = "GET")
+	public Page<User> getPageStatusRealAuth(@ApiParam(required = true, value = "分页参数") PageParams pageInfo, @ApiParam(required = true, value = "用户状态") Short status) {
+		return userService.getPageStatusRealAuth(pageInfo, status);
+	}
+
+	/**
+	 * 审核实名认证
+	 * @param user
+	 * @return
+	 */
+	@RequestMapping(value = "/updateIdEnable", method = RequestMethod.GET)
+	public ResponseEntity<String> updateIdEnable(final User user) {
+		userService.saveRealAuth(user);
 		return new ResponseEntity<String>(HttpStatus.OK);
 	}
 }

+ 10 - 0
src/main/java/com/uas/platform/b2c/common/account/dao/SecQuestionDao.java

@@ -0,0 +1,10 @@
+package com.uas.platform.b2c.common.account.dao;
+
+import com.uas.platform.b2c.common.account.model.SecQuestion;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+public interface SecQuestionDao extends JpaSpecificationExecutor<SecQuestion>,
+        JpaRepository<SecQuestion, Long> {
+
+}

+ 16 - 0
src/main/java/com/uas/platform/b2c/common/account/dao/UserQuestionDao.java

@@ -0,0 +1,16 @@
+package com.uas.platform.b2c.common.account.dao;
+
+import com.uas.platform.b2c.common.account.model.UserQuestion;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.QueryHints;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.QueryHint;
+import java.util.List;
+
+@Repository
+public interface UserQuestionDao extends JpaSpecificationExecutor<UserQuestion>, JpaRepository<UserQuestion, Long> {
+    @QueryHints({ @QueryHint(name = "org.hibernate.cacheable", value = "true") })
+    public List<UserQuestion> findUserQuestionByUserUUOrderBySortAsc(Long userUU);
+}

+ 75 - 0
src/main/java/com/uas/platform/b2c/common/account/model/SecQuestion.java

@@ -0,0 +1,75 @@
+package com.uas.platform.b2c.common.account.model;
+
+import java.io.Serializable;
+import javax.persistence.Cacheable;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import org.hibernate.annotations.Cache;
+import org.hibernate.annotations.CacheConcurrencyStrategy;
+
+/**
+ * 密保问题
+ */
+@Entity
+@Table(name = "sec$secquestion")
+@Cacheable
+@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "com.uas.platform.b2b.model.User")
+public class SecQuestion implements Serializable {
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+    public SecQuestion() {
+    }
+
+    /**
+     * id
+     */
+    @Id
+    @Column(name = "sq_id")
+    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "secquestion_gen")
+    @SequenceGenerator(name = "secquestion_gen", sequenceName = "secquestion_seq", allocationSize = 1)
+    private Long id;
+
+    /**
+     * 问题内容
+     */
+    @Column(name = "sq_question")
+    private String question;
+
+    /**
+     * 问题类型
+     */
+    @Column(name = "sq_type")
+    private Long type;
+
+    public Long getId() {
+        return id;
+    }
+
+    public String getQuestion() {
+        return question;
+    }
+
+    public Long getType() {
+        return type;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public void setQuestion(String question) {
+        this.question = question;
+    }
+
+    public void setType(Long type) {
+        this.type = type;
+    }
+}

+ 71 - 0
src/main/java/com/uas/platform/b2c/common/account/model/User.java

@@ -2,6 +2,7 @@ package com.uas.platform.b2c.common.account.model;
 
 import com.alibaba.fastjson.annotation.JSONField;
 import com.uas.platform.core.model.Constant;
+import java.util.Date;
 import org.codehaus.jackson.annotate.JsonIgnore;
 import org.hibernate.annotations.Cache;
 import org.hibernate.annotations.CacheConcurrencyStrategy;
@@ -159,6 +160,76 @@ public class User implements Serializable {
 	@Column(name = "user_imageurl")
 	private String imageUrl;
 
+	/**
+	 * 实名认证的身份证照片地址
+	 */
+	@Column(name = "user_idimgurl")
+	private String idImgUrl;
+
+	/**
+	 * 是否通过审核  1:通过  0:未认证  2:正在审核
+	 */
+	@Column(name = "user_idenable")
+	private Short idEnable;
+
+	/**
+	 * 实名认证申请时间
+	 */
+	@Column(name = "user_iddate")
+	private Date idDate;
+
+	/**
+	 * 账户安全等级
+	 */
+	@Column(name = "user_seclevel")
+	private Short secLevel;
+
+	/**
+	 * 密码安全等级(1、低,2、中,3、高)
+	 */
+	@Column(name = "user_pwdseclevel")
+	private Short pwdSecLevel;
+
+	public Short getPwdSecLevel() {
+		return pwdSecLevel;
+	}
+
+	public void setPwdSecLevel(Short pwdSecLevel) {
+		this.pwdSecLevel = pwdSecLevel;
+	}
+
+	public Short getSecLevel() {
+		return secLevel;
+	}
+
+	public void setSecLevel(Short secLevel) {
+		this.secLevel = secLevel;
+	}
+
+	public Date getIdDate() {
+		return idDate;
+	}
+
+	public void setIdDate(Date idDate) {
+		this.idDate = idDate;
+	}
+
+	public Short getIdEnable() {
+		return idEnable;
+	}
+
+	public void setIdEnable(Short idEnable) {
+		this.idEnable = idEnable;
+	}
+
+	public String getIdImgUrl() {
+		return idImgUrl;
+	}
+
+	public void setIdImgUrl(String idImgUrl) {
+		this.idImgUrl = idImgUrl;
+	}
+
 	public String getImageUrl() {
 		return imageUrl;
 	}

+ 114 - 0
src/main/java/com/uas/platform/b2c/common/account/model/UserQuestion.java

@@ -0,0 +1,114 @@
+package com.uas.platform.b2c.common.account.model;
+
+import org.hibernate.annotations.Cache;
+import org.hibernate.annotations.CacheConcurrencyStrategy;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+/**
+ * 用户密保问题
+ * @author liusw
+ */
+@Entity
+@Table(name = "sec$userquestion")
+@Cacheable
+@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "com.uas.platform.b2b.model.User")
+public class UserQuestion implements Serializable {
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+    public UserQuestion() {
+    }
+
+    /**
+     * id
+     */
+    @Id
+    @Column(name = "uq_id")
+    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "userquestion_gen")
+    @SequenceGenerator(name = "userquestion_gen", sequenceName = "userquestion_seq", allocationSize = 1)
+    private Long id;
+
+    /**
+     * 用户uu
+     */
+    @OneToOne(cascade = { CascadeType.REFRESH })
+    @JoinColumn(name = "uq_useruu", insertable = false, updatable = false)
+    private User user;
+
+    /**
+     * 密保用户的UU号
+     */
+    @Column(name = "uq_useruu")
+    private Long userUU;
+
+
+    /**
+     * 密保问题
+     */
+    @Column(name = "uq_question")
+    private String question;
+
+    /**
+     * 密保答案
+     */
+    @Column(name = "uq_answer")
+    private String answer;
+
+    /**
+     * 排序
+     */
+    @Column(name = "uq_sort")
+    private Short sort;
+
+    public Long getId() {
+        return id;
+    }
+
+    public String getQuestion() {
+        return question;
+    }
+
+    public String getAnswer() {
+        return answer;
+    }
+
+    public Short getSort() {
+        return sort;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public User getUser() {
+        return user;
+    }
+
+    public void setUser(User user) {
+        this.user = user;
+    }
+
+    public void setQuestion(String question) {
+        this.question = question;
+    }
+
+    public void setAnswer(String answer) {
+        this.answer = answer;
+    }
+
+    public void setSort(Short sort) {
+        this.sort = sort;
+    }
+
+    public Long getUserUU() {
+        return userUU;
+    }
+
+    public void setUserUU(Long userUU) {
+        this.userUU = userUU;
+    }
+}

+ 38 - 0
src/main/java/com/uas/platform/b2c/common/account/service/SecQuestionService.java

@@ -0,0 +1,38 @@
+package com.uas.platform.b2c.common.account.service;
+
+import com.uas.platform.b2c.common.account.dao.SecQuestionDao;
+import com.uas.platform.b2c.common.account.model.SecQuestion;
+import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
+import java.util.List;
+import org.springframework.data.domain.Page;
+
+public interface SecQuestionService {
+
+    /**
+     * 保存密保问题
+     * @param secQuestion
+     * @return
+     */
+    SecQuestion save(SecQuestion secQuestion);
+
+    /**
+     * 分页获取所有密保问题
+     * @return
+     */
+    Page<SecQuestion> getPageSecQuestion(PageParams pageInfo);
+
+    /**
+     * 根据id查询密保问题
+     * @param id
+     * @return
+     */
+    SecQuestion findById(Long id);
+
+    /**
+     * 根据id删除密保问题
+     * @param id
+     * @return
+     */
+    void delete(Long id);
+}

+ 24 - 0
src/main/java/com/uas/platform/b2c/common/account/service/UserQuestionService.java

@@ -0,0 +1,24 @@
+package com.uas.platform.b2c.common.account.service;
+
+import com.uas.platform.b2c.common.account.model.UserQuestion;
+
+import java.util.List;
+
+/**
+ * 密保问题
+ */
+public interface UserQuestionService {
+    /**
+     * 设置密保问题
+     * @param userQuestion
+     * @return
+     */
+    UserQuestion save(UserQuestion userQuestion);
+
+    /**
+     * 通过userUU查询当前用户密保问题
+     * @param userUU
+     * @return
+     */
+    List<UserQuestion> findUserQuestionByUserUUOrderBySortAsc(Long userUU);
+}

+ 24 - 2
src/main/java/com/uas/platform/b2c/common/account/service/UserService.java

@@ -4,10 +4,12 @@ package com.uas.platform.b2c.common.account.service;
 import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.common.account.model.UserInfo;
 import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
 import org.springframework.data.domain.Page;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.List;
+import org.springframework.data.repository.query.Param;
 
 public interface UserService {
 
@@ -73,7 +75,12 @@ public interface UserService {
 	 * @return
 	 */
 	List<User> findAll();
-	
+
+	/**
+	 * 保存用户信息(邮箱,手机,姓名)
+	 * @param user
+	 * @return
+	 */
 	User save(User user);
 
 	/**
@@ -111,5 +118,20 @@ public interface UserService {
 	 * @param newUserPay
 	 * @return
 	 */
-	User updateUserPay(User user, String userPay, String newUserPay);
+	User updateUserPay( User user, String userPay, String newUserPay);
+
+	/**
+	 * 保存用户实名认证信息
+	 * @param user
+	 * @return
+	 */
+	User saveRealAuth(User user);
+
+	/**
+	 * 分页获取实名认证信息
+	 * @param pageInfo
+	 * @param idEnable
+	 * @return
+	 */
+	Page<User> getPageStatusRealAuth(final PageParams pageInfo, Short idEnable);
 }

+ 62 - 0
src/main/java/com/uas/platform/b2c/common/account/service/impl/SecQuestionServiceImpl.java

@@ -0,0 +1,62 @@
+package com.uas.platform.b2c.common.account.service.impl;
+
+import com.uas.account.entity.UserDetail;
+import com.uas.account.util.AccountUtils;
+import com.uas.platform.b2c.common.account.dao.SecQuestionDao;
+import com.uas.platform.b2c.common.account.model.SecQuestion;
+import com.uas.platform.b2c.common.account.model.User;
+import com.uas.platform.b2c.common.account.service.SecQuestionService;
+import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Order;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Sort.Direction;
+import org.springframework.data.jpa.domain.Specification;
+import org.springframework.stereotype.Service;
+
+@Service
+public class SecQuestionServiceImpl implements SecQuestionService {
+
+    @Autowired
+    private SecQuestionDao secQuestionDao;
+
+    @Override
+    public SecQuestion save(SecQuestion secQuestion) {
+        postToAccountCenter(secQuestion);
+        return secQuestionDao.save(secQuestion);
+    }
+
+    @Override
+    public Page<SecQuestion> getPageSecQuestion(PageParams pageInfo) {
+        final PageInfo info = new PageInfo(pageInfo);
+        //info.filter("idEnable", idEnable);
+        info.sorting(Direction.ASC,new String[]{"type"});
+        return secQuestionDao.findAll(new Specification<SecQuestion>() {
+            @Override
+            public Predicate toPredicate(Root<SecQuestion> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
+                query.where(info.getPredicates(root, query, cb));
+                return null;
+            }
+        }, info);
+    }
+
+    @Override
+    public SecQuestion findById(Long id) {
+        return secQuestionDao.findOne(id);
+    }
+
+    @Override
+    public void delete(Long id) {
+       secQuestionDao.delete(id);
+    }
+
+    public void postToAccountCenter(SecQuestion secQuestion){
+
+    }
+}

+ 26 - 0
src/main/java/com/uas/platform/b2c/common/account/service/impl/UserQuestionServiceImpl.java

@@ -0,0 +1,26 @@
+package com.uas.platform.b2c.common.account.service.impl;
+
+import com.uas.platform.b2c.common.account.dao.UserQuestionDao;
+import com.uas.platform.b2c.common.account.model.UserQuestion;
+import com.uas.platform.b2c.common.account.service.UserQuestionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class UserQuestionServiceImpl implements UserQuestionService {
+
+    @Autowired
+    private UserQuestionDao userQuestionDao;
+
+    @Override
+    public UserQuestion save(UserQuestion userQuestion) {
+        return userQuestionDao.save(userQuestion);
+    }
+
+    @Override
+    public List<UserQuestion> findUserQuestionByUserUUOrderBySortAsc(Long userUU) {
+        return userQuestionDao.findUserQuestionByUserUUOrderBySortAsc(userUU);
+    }
+}

+ 27 - 0
src/main/java/com/uas/platform/b2c/common/account/service/impl/UserServiceImpl.java

@@ -12,12 +12,17 @@ import com.uas.platform.b2c.common.account.service.UserService;
 import com.uas.platform.b2c.common.base.dao.CommonDao;
 import com.uas.platform.b2c.core.config.MessageConf;
 import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.fa.payment.model.BankInfo;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.exception.SystemException;
 import com.uas.platform.core.model.Constant;
 import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
 import com.uas.platform.core.model.Status;
 import com.uas.platform.core.model.Token;
+import com.uas.platform.core.persistence.criteria.CriterionExpression;
+import com.uas.platform.core.persistence.criteria.LogicalExpression;
+import com.uas.platform.core.persistence.criteria.SimpleExpression;
 import com.uas.platform.core.util.AgentUtils;
 import com.uas.platform.core.util.encry.Md5Utils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -397,4 +402,26 @@ public class UserServiceImpl implements UserService {
 			throw new IllegalOperatorException("原密码验证错误");
 		}
 	}
+
+	@Override
+	public User saveRealAuth(User user) {
+		User sysUser = userDao.findOne(user.getUserUU());
+		if(sysUser==null){
+			throw new IllegalOperatorException("找不到用户");
+		}
+		return userDao.save(user);
+	}
+
+	@Override
+	public Page<User> getPageStatusRealAuth(PageParams pageInfo, Short idEnable) {
+		final PageInfo info = new PageInfo(pageInfo);
+		info.filter("idEnable", idEnable);
+		return userDao.findAll(new Specification<User>() {
+			@Override
+			public Predicate toPredicate(Root<User> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
+				query.where(info.getPredicates(root, query, cb));
+				return null;
+			}
+		}, info);
+	}
 }

+ 3 - 1
src/main/webapp/WEB-INF/views/normal/adminWithNav.html

@@ -146,7 +146,7 @@
 			<li class="nav-node"><a href="#product/componentCrawl/upload"><i
 				class="fa fa-upload"></i><span> 器件数据上传</span></a></li>
 			<li class="nav-node"><a href="#audit/bankinfo"><i class="fa fa-bank"></i><span> 银行账户信息</span></a></li>
-
+			<li class="nav-node"><a href="#audit/realAuth"><i class="glyphicon glyphicon-user"></i><span> 实名认证审核</span></a></li>
 			<li class="nav-header">维护</li>
 			<li class="nav-node"><a href="#/store/company"><i
 					class="fa fa-flag"></i><span> 寄售管理</span></a></li>
@@ -164,6 +164,8 @@
 					class="fa fa-flag"></i><span> 批量修改器件类目</span></a></li>
 			<li class="nav-node"><a href="#/kindAdvice"><i
 					class="fa fa-flag"></i><span> 用户类目维护建议</span></a></li>
+			<li class="nav-node"><a href="#/secQuestion"><i
+					class="fa fa-flag"></i><span> 密保问题维护</span></a></li>
 
 			<li class="nav-header">禁用信息</li>
 			<li class="nav-node"><a href="#/disable/brand"><i

+ 17 - 4
src/main/webapp/resources/js/admin/app.js

@@ -1,4 +1,4 @@
- define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage'], function(angularAMD) {
+ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion'], function(angularAMD) {
 	'use strict';
 
 	 /**
@@ -8,7 +8,7 @@
 		 return this.length > 0 ? this[this.length - 1] : null;
 	 };
 
-	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery' ,'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices']);
+	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery' ,'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices']);
 	app.init = function() {
 		angularAMD.bootstrap(app);
 	};
@@ -388,7 +388,13 @@
 			templateUrl: 'static/view/admin/bankInfo/auditBankInfo.html',
 			controller: 'AuditBankInfoCtrl',
 			controllerUrl: 'app/controllers/bankInfo/AuditBankInfoCtrl'
-		})).state('uploadComponentCrawl', angularAMD.route({
+		})).state('audit_realAuth', angularAMD.route({
+      // 实名认证审核
+      url: '/audit/realAuth',
+      templateUrl: 'static/view/admin/audit_realAuth.html',
+      controller: 'AuditRealAuthCtrl',
+      controllerUrl: 'app/controllers/AuditRealAuthCtrl'
+    })).state('uploadComponentCrawl', angularAMD.route({
 			// 上传爬取数据页面
 			url: '/product/componentCrawl/upload',
 			templateUrl : 'static/view/admin/product/uploadComponentCrawl.html',
@@ -591,7 +597,14 @@
 			controller: 'SlideImageCtrl',
 			controllerUrl: 'app/controllers/operation/SlideImageCtrl',
 			title: '轮播图片管理'
-		})).state('logisticsCompany', angularAMD.route({
+		})).state('secQuestion', angularAMD.route({
+      // 密保问题维护
+      url: '/secQuestion',
+      templateUrl: 'static/view/admin/sec_question.html',
+      controller: 'SecQuestionCtrl',
+      controllerUrl: 'app/controllers/SecQuestionCtrl',
+      title: '密保问题维护'
+    })).state('logisticsCompany', angularAMD.route({
 			// 首页展示(快递公司管理)
 			url: '/logistics/company',
 			templateUrl: 'static/view/admin/logistics/logistics_company.html',

+ 34 - 0
src/main/webapp/resources/js/admin/controllers/AuditRealAuthCtrl.js

@@ -0,0 +1,34 @@
+define(['app/app'], function (app) {
+  'use strict';
+  app.register.controller('AuditRealAuthCtrl', ['$scope', 'ngTableParams', 'User', 'toaster', 'BaseService', function ($scope, ngTableParams, User, toaster, BaseService) {
+    $scope.active = 'tobeAudit';
+    $scope.status = 2;
+    //table设置
+    $scope.realAuthTableParams = new ngTableParams({
+      page : 1,
+      count : 5
+    }, {
+      total : 0,
+      getData : function ($defer, params) {
+        const param = BaseService.parseParams(params.url());
+        param.status = $scope.status;
+        //param.keyword = $scope.keyword;
+        User.getPageStatusRealAuth(param, function (data) {
+          params.total(data.totalElements);
+          $defer.resolve(data.content);
+        }, function (response) {
+          toaster.pop('error', '获取账户信息失败');
+        });
+      }
+    });
+
+    $scope.updateIdEnable = function(idEnable,info){
+        info.idEnable = idEnable;
+        User.updateIdEnable(info,function(data){
+            location.reload();
+        },function(response){
+
+        });
+    }
+  }]);
+});

+ 102 - 0
src/main/webapp/resources/js/admin/controllers/SecQuestionCtrl.js

@@ -0,0 +1,102 @@
+define(['app/app'], function (app) {
+  'use strict';
+  app.register.controller('SecQuestionCtrl', ['$scope', 'ngTableParams', 'secQuestion', 'toaster', 'BaseService','$modal', function ($scope, ngTableParams, secQuestion, toaster, BaseService,$modal) {
+    //table设置
+    $scope.secQuestionTableParams = new ngTableParams({
+      page : 1,
+      count : 5
+    }, {
+      total : 0,
+      getData : function ($defer, params) {
+        const param = BaseService.parseParams(params.url());
+        //param.status = $scope.status;
+        //param.keyword = $scope.keyword;
+        secQuestion.getPageInfo(param, function (data) {
+          params.total(data.totalElements);
+          $defer.resolve(data.content);
+        }, function (response) {
+          toaster.pop('error', '获取账户信息失败');
+        });
+      }
+    });
+
+    // 添加密保问题
+    $scope.add = function() {
+      openModal(null) ;
+    }
+
+    //编辑密保问题
+    $scope.edit = function(id) {
+      console.info(id);
+      openModal(id) ;
+    }
+    var openModal = function(id) {
+      var modalInstance = $modal.open({
+        templateUrl : 'static/view/admin/modal/secQuestion_add_modal.html',  //指向上面创建的视图
+        controller : 'SecQuestionEditCtrl',// 初始化模态范围
+        size : 'sm', // 大小配置
+        resolve: {
+          id: function() {
+            return id;
+          }
+        }
+      });
+      modalInstance.opened.then(function(){// 模态窗口打开之后执行的函数
+
+      });
+      modalInstance.result.then(function(updatedProperty){
+        $scope.propertiesTableParams.reload();
+      }, function(res){
+      });
+    }
+
+    //删除密保问题
+    $scope.delete = function (id) {
+      secQuestion.delete({id:id},function(){
+        toaster.pop('success', '提示', '删除密保问题成功');
+        location.reload();
+      },function(response){
+        toaster.pop('error', '提示', res.data);
+      });
+    }
+  }]);
+
+  app.register.controller('SecQuestionEditCtrl', ['$scope','id', '$modalInstance','ngTableParams', 'secQuestion', 'toaster', 'BaseService', function ($scope, id,$modalInstance,ngTableParams, secQuestion, toaster, BaseService) {
+    $scope.addModal = true;
+    $scope.updateModal = false;
+    if (id) {
+      secQuestion.get({id : id}, function(data) {
+        $scope.secQuestion = data
+        $scope.addModal = false;
+        $scope.updateModal = true;
+      }, function(res) {
+        toaster.pop('error', '提示', '获取密保问题失败,请刷新页面');
+      });
+    }
+    // 确认
+    $scope.confirm = function() {
+      // 更新属性
+      if ($scope.secQuestion.id) {
+        secQuestion.update({}, $scope.secQuestion, function(data) {
+          toaster.pop('success', '提示', '修改密保问题成功');
+          $modalInstance.close();
+          location.reload();
+        }, function(res) {
+          toaster.pop('error', '提示', res.data);
+        });
+      } else {
+        secQuestion.add({}, $scope.secQuestion, function(data) {
+          toaster.pop('success', '提示', '添加密保问题成功');
+          $modalInstance.close();
+          location.reload();
+        }, function(res) {
+          toaster.pop('error', '提示', res.data);
+        });
+      }
+    };
+
+    $scope.cancel = function() {
+      $modalInstance.dismiss();
+    }
+  }]);
+});

+ 26 - 0
src/main/webapp/resources/js/common/query/secQuestion.js

@@ -0,0 +1,26 @@
+define([ 'ngResource' ], function() {
+	angular.module('secQuestionServices', [ 'ngResource' ]).factory('secQuestion', ['$resource', 'BaseService', function($resource, BaseService) {
+		const rootPath = BaseService.getRootPath();
+		return $resource('user/secQuestion/:id', {}, {
+      add : {
+        url : 'user/secQuestion/add',
+        method : 'POST'
+      },
+			getPageInfo:{
+        url : 'user/secQuestion/getPageInfo',
+        method : 'GET'
+			},
+      update : {
+        url : 'user/secQuestion/add',
+        method : 'POST'
+      },get : {
+        url : 'user/secQuestion/:id',
+        method : 'GET'
+      },
+      delete : {
+        url : 'user/secQuestion/delete',
+        method : 'GET'
+      }
+		});
+}])
+});

+ 25 - 0
src/main/webapp/resources/js/common/query/user.js

@@ -131,6 +131,31 @@ define([ 'angular', 'ui-bootstrap', 'ngResource' ], function(angular) {
             updateUserPay:{
                 url: 'basic/user/updateUserPay',
                 method: 'POST'
+			},
+            updateUserQuestion:{
+                url: 'basic/user/updateUserQuestion',
+            	  method: 'POST'
+			},
+            getUserQuestion:{
+							 url: 'basic/user/getUserQuestion',
+                method: 'GET',
+              isArray : true
+						},
+      updateRealAuth:{
+        url: 'basic/user/updateRealAuth',
+        method: 'POST'
+			},
+      getPageStatusRealAuth:{
+        url: 'basic/user/getPageStatusRealAuth',
+        method: 'GET'
+			},
+			updateIdEnable:{
+        url: 'basic/user/updateIdEnable',
+        method: 'GET'
+			},
+			getAllSecQuestion:{
+				url:'user/secQuestion/getPageInfo',
+				method:'GET'
 			}
 		});
 	}]);

+ 260 - 37
src/main/webapp/resources/js/usercenter/controllers/forstore/account_manager_ctrl.js

@@ -460,6 +460,36 @@ define(['app/app'], function(app) {
             }, function(){
             });
         };
+
+        $scope.updateUserQuestion = function(){
+            var modalInstance = $modal.open({
+                animation: true,
+                templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updateUserQuestion.html',
+                controller: 'UserQuestionCtrl',
+                resolve: {
+                    user: function(){return angular.copy($rootScope.userInfo);}
+                }
+            });
+
+            modalInstance.result.then(function(){
+            }, function(){
+            });
+        };
+
+        $scope.updateRealAuth = function(){
+            var modalInstance = $modal.open({
+                animation: true,
+                templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updateRealAuth.html',
+                controller: 'UserRealAuthCtrl',
+                resolve: {
+                    user: function(){return angular.copy($rootScope.userInfo);}
+                }
+            });
+
+            modalInstance.result.then(function(){
+            }, function(){
+            });
+        };
 	}]);
 
 	// 修改密码Controller
@@ -482,6 +512,35 @@ define(['app/app'], function(app) {
 			});
 		};
 
+		//对新密码进行校验
+    $scope.checkSuccess1 = false;
+    $scope.checkFailed1 = false;
+		$scope.checkNewPassword = function (newPassword){
+      var reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,20}$/;
+				if(newPassword==null || !reg.test(newPassword)){
+          //toaster.pop('error', '错误', '密码为8-20字符的英文、数字混合');
+          $scope.checkSuccess1 = false;
+          $scope.checkFailed1 = true;
+          return;
+				}else{
+          $scope.checkSuccess1 = true;
+          $scope.checkFailed1 = false;
+				}
+		}
+
+    //校验确认密码是否与新密码相同
+    $scope.checkSuccess2 = false;
+    $scope.checkFailed2 = false;
+    $scope.checkNewPassword1 = function(){
+      if($scope.checkSuccess1==true && ($scope.user.newPassword == $scope.user.newPassword1)){
+        $scope.checkSuccess2 = true;
+        $scope.checkFailed2 = false;
+        return;
+      }
+      $scope.checkSuccess2 = false;
+      $scope.checkFailed2 = true;
+    }
+
 		//修改密码
 		$scope.ok = function () {
 			if($scope.user.newPassword == $scope.user.password){
@@ -497,6 +556,10 @@ define(['app/app'], function(app) {
 					$scope.checking = false;
 					$scope.checkSuccess = false;
 					$scope.checkFailed = false;
+          $scope.checkSuccess1 = false;
+          $scope.checkFailed1 = false;
+          $scope.checkSuccess2 = false;
+          $scope.checkFailed2 = false;
 					$modalInstance.close();
 				}, function(response){
 					toaster.pop('error', '错误', response.data);
@@ -518,40 +581,37 @@ define(['app/app'], function(app) {
         $scope.user = user;
         $scope.user.userEmail = null;
         $scope.user.newUserEmail = null;
-        $scope.checking = false;
         //验证用户输入的旧邮箱地址是否正确
         $scope.checkUserEmail = function(userEmail) {
-            $scope.checking = true;
             $scope.checkSuccess = false;
             $scope.checkFailed = false;
             User.checkUserEmail({userEmail: userEmail}, function(){
                 $scope.checkSuccess = true;
-                $scope.checking = false;
                 $scope.checkFailed = false;
             }, function(){
                 $scope.checkFailed = true;
-                $scope.checking = false;
                 $scope.checkSuccess = false;
             });
         };
 
         //验证用户新输入的邮箱是否可用
-        $scope.emailSuccess = false;
-        $scope.emailFailed = false;
+        $scope.checkSuccess1 = false;
+        $scope.checkFailed1 = false;
         $scope.emailEnable = function(newUserEmail) {
             User.emailEnable({email: newUserEmail}, function(data){
-            	if(data.data == "true"){//邮箱可用
-                    $scope.emailSuccess = true;
-                    $scope.sendSuccess = true;
-                    $scope.emailFailed = false;
-				}else{//邮箱不可用
-                    $scope.emailSuccess = false;
-                    $scope.emailFailed = true;
-                    $scope.sendSuccess = false;
-				}
+								if(data.data == "true"){//邮箱可用
+                  $scope.checkSuccess1 = true;
+                  $scope.checkFailed1 = false;
+                  $scope.sendSuccess = true;
+								}else{//邮箱不可用
+                  $scope.checkSuccess1 = false;
+                  $scope.checkFailed1 = true;
+									$scope.sendSuccess = false;
+							}
             }, function(){
-                $scope.emailSuccess = false;
-                $scope.sendSuccess = false;
+              $scope.checkSuccess1 = false;
+              $scope.checkFailed1 = true;
+              $scope.sendSuccess = false;
             });
         };
 
@@ -597,26 +657,28 @@ define(['app/app'], function(app) {
 
 
         //修改邮箱地址
-        $scope.ok = function () {
-            if($scope.user.newUserEmail == $scope.user.userEmail){
-                toaster.pop('error', '错误', '新邮箱地址与旧邮箱地址相同');
-                return;
-            }
-			User.updateUserEmail({userEmail:$scope.user.userEmail,newUserEmail:$scope.user.newUserEmail}, {}, function(){
-				toaster.pop('success', '成功', '修改邮箱成功。');
-				$scope.user.userEmail = null;
-				$scope.user.newUserEmail = null;
-				$scope.checking = false;
-				$scope.checkSuccess = false;
-				$scope.checkFailed = false;
-                $scope.emailSuccess = false;
-                $scope.codeSuccess = false;
-                $scope.validSuccess = false;
-				$modalInstance.close();
-			}, function(response){
-				toaster.pop('error', '错误', response.data);
-				$modalInstance.close();
-			});
+			$scope.ok = function () {
+				if($scope.user.newUserEmail == $scope.user.userEmail){
+					toaster.pop('error', '错误', '新邮箱地址与旧邮箱地址相同');
+					return;
+				}
+					User.updateUserEmail({userEmail:$scope.user.userEmail,newUserEmail:$scope.user.newUserEmail}, {}, function(){
+						toaster.pop('success', '成功', '修改邮箱成功。');
+						$scope.user.userEmail = null;
+						$scope.user.newUserEmail = null;
+						$scope.checking = false;
+						$scope.checkSuccess = false;
+						$scope.checkFailed = false;
+						$scope.codeSuccess = false;
+						$scope.validSuccess = false;
+						$scope.checkSuccess1 = false;
+						$scope.checkFailed1 = false;
+						$scope.sendSuccess = false;
+						$modalInstance.close();
+					}, function(response){
+						toaster.pop('error', '错误', response.data);
+						$modalInstance.close();
+					});
         };
 
         $scope.cancel = function () {
@@ -848,4 +910,165 @@ define(['app/app'], function(app) {
             $modalInstance.close();
         };
     }]);
+
+    // 设置密保问题Controller
+    app.register.controller('UserQuestionCtrl', ['$scope', '$modalInstance', 'user', 'User', 'toaster', function($scope, $modalInstance, user, User, toaster){
+    	//查询所有的密保问题
+			$scope.pageInfo={page:1,size:100};
+			User.getAllSecQuestion({pageInfo:$scope.pageInfo},{},function(data){
+				$scope.secQuestions = data.content;
+        //查询当前用户密保问题
+        User.getUserQuestion(function(data){
+          $scope.uq[0]=data[0];
+          $scope.uq[1]=data[1];
+        });
+			});
+			//选择问题 校验
+			$scope.checkSuccess = false;
+      $scope.checkFailed = false;
+      $scope.checkSuccess2 = false;
+      $scope.checkFailed2 = false;
+			$scope.choose = function(){
+				  if($scope.uq[0].question!=""){
+            $scope.checkSuccess = true;
+            $scope.checkFailed = false;
+				  }else {
+            $scope.checkSuccess = false;
+            $scope.checkFailed = true;
+          }
+      }
+
+      $scope.choose1 = function(){
+        if($scope.uq[1].question!=""){
+          $scope.checkSuccess2 = true;
+          $scope.checkFailed2 = false;
+        }else {
+          $scope.checkSuccess2 = false;
+          $scope.checkFailed2 = true;
+        }
+      }
+
+    	//答案校验 不超过30个字符
+      $scope.checkSuccess1 = false;
+      $scope.checkFailed1 = false;
+      $scope.checkSuccess3 = false;
+      $scope.checkFailed3 = false;
+			$scope.inputAnswer = function(){
+        if($scope.uq[0].answer!=null && $scope.uq[0].answer.length<=30){
+          $scope.checkSuccess1 = true;
+          $scope.checkFailed1 = false;
+        }else {
+          $scope.checkSuccess1 = false;
+          $scope.checkFailed1 = true;
+        }
+      }
+
+      $scope.inputAnswer1 = function(){
+        if($scope.uq[1].answer!=null && $scope.uq[1].answer.length<=30){
+          $scope.checkSuccess3 = true;
+          $scope.checkFailed3 = false;
+        }else {
+          $scope.checkSuccess3 = false;
+          $scope.checkFailed3 = true;
+        }
+      }
+
+
+		//保存密保
+        $scope.ok = function () {
+        	var arr = [];
+        	for(var key in $scope.uq){
+            $scope.uq[key].sort=key;
+							arr[key]=$scope.uq[key];
+					}
+            User.updateUserQuestion({},arr, function(){
+                toaster.pop('success', '成功', '密保问题设置成功。');
+                $modalInstance.close();
+                $scope.uq=null;
+            }, function(response){
+                toaster.pop('error', '错误', response.data);
+                $modalInstance.close();
+            });
+        };
+        $scope.cancel = function () {
+            $modalInstance.close();
+        };
+    }]);
+
+    // 实名认证Controller
+    app.register.controller('UserRealAuthCtrl', ['$scope', '$modalInstance', 'user', 'User', 'toaster', function($scope,$modalInstance, user, User, toaster){
+    	$scope.user  = user ;
+    	//姓名验证  不超过20个字符
+      $scope.checkSuccess = false;
+      $scope.checkFailed = false;
+      $scope.checkUserName = function(userName){
+					if(userName==null){
+            toaster.pop('error', '请输入您的真实姓名');
+            $scope.checkSuccess = false;
+            $scope.checkFailed = true;
+            return ;
+					}else if(userName.length>20){
+            toaster.pop('error', '请勿超过20个字符');
+            $scope.checkSuccess = false;
+            $scope.checkFailed = true;
+            return ;
+					}else{
+						$scope.checkSuccess = true;
+            $scope.checkFailed = false;
+					}
+			}
+
+			//检查身份证
+      $scope.checkSuccess1 = false;
+      $scope.checkFailed1 = false;
+      $scope.checkUserIdcode = function(userIdcode){
+        if(userIdcode==null){
+          toaster.pop('error', '请输入您的身份证号');
+          $scope.checkSuccess1 = false;
+          $scope.checkFailed1 = true;
+          return ;
+        }else if(userIdcode.length!=20){
+          toaster.pop('error', '请输入18位的身份证号');
+          $scope.checkSuccess1 = false;
+          $scope.checkFailed1 = true;
+          return ;
+        }else{
+          $scope.checkSuccess1 = true;
+          $scope.checkFailed1 = false;
+        }
+      }
+
+
+			//图片上传
+			$scope.checkSuccess2 = false;
+      $scope.onUploadID = function ($data) {
+        if (!$data || !$data.path) {
+          toaster.pop('error', '图片上传失败');
+          $scope.checkSuccess2 = true;
+          return ;
+        }
+        $scope.user.idImgUrl = $data.path;
+      };
+    	//身份证验证
+
+		//保存
+      $scope.ok = function () {
+        User.updateRealAuth({userName:$scope.user.userName,userIdcode:$scope.user.userIdcode,idImgUrl:$scope.user.idImgUrl},{},function(){
+          toaster.pop('success', '成功', '密保问题设置成功。');
+          $modalInstance.close();
+          $scope.checkSuccess2 = false;
+          $scope.checkSuccess1 = false;
+          $scope.checkFailed1 = false;
+          $scope.checkSuccess = false;
+          $scope.checkFailed = false;
+        }, function(response){
+          toaster.pop('error', '错误', response.data);
+          $modalInstance.close();
+        });
+      };
+
+        $scope.cancel = function () {
+            $modalInstance.close();
+        };
+    }]);
 });

+ 121 - 0
src/main/webapp/resources/view/admin/audit_realAuth.html

@@ -0,0 +1,121 @@
+<style>
+	.box-header {
+		height: 35px;
+		line-height: 26px;
+		font-size: 14px;
+	}
+	.audit-fail {
+		display: block !important;
+		position: fixed;
+		background-color: white;
+		opacity: 1;
+		width: 300px;
+		height: 155px;
+		top: 250px;
+		left: 50%;
+		margin-left: -150px;
+		border: 1px solid #d9d5ce;
+		z-index: 10;
+		padding-bottom: 10px;
+	}
+	.audit-fail .title{
+		line-height: 31px;
+		height: 31px;
+		font-size: 14px;
+		background-color: #3a76e4;
+		color: white;
+		text-align: left;
+		padding-left: 15px;
+	}
+	.audit-fail  .content{
+		margin: 10px 0;
+	}
+	.audit-fail  .btn{
+		width: 90px;
+		padding: 5px 10px;
+		border: none;
+		font-size: 14px;
+		border-radius: 0;
+	}
+	.audit-fail  .btn-default{
+		background: #D9D5CE;
+		color: #333;
+	}
+	.audit-fail .btn-primary{
+		background: #3A76E4;
+		color: white;
+		margin-right: 10px;
+	}
+	.audit-fail  .btn:hover{
+		background: #5078cb;
+		color: #fff;
+	}
+	.table-bordered>tbody>tr>td{
+		vertical-align: middle;
+	}
+</style>
+<div class="box" id="realAuthAudit">
+	<div class="box-header well" data-original-title>
+		<i class="icon-user"></i> 实名认证审核
+	</div>
+	<div class="box-content">
+		<!-- ng-tableStart -->
+		<div class="fullscreen" style="padding: 10px;">
+			<div class="row">
+				<!--
+				<div class="col-sm-1">
+					共<span class="badge">{{bankInfoTableParams.total()}} </span>条
+				</div>
+				<div class="col-sm-5">
+					<div class="btn-group" role="group" aria-label="...">
+						<button type="button" class="btn btn-default" ng-class="{'btn-primary':active=='tobeAudit'}" ng-click="setActive('tobeAudit')">未审核</button>
+						<button type="button" class="btn btn-default" ng-class="{'btn-primary':active=='pass'}" ng-click="setActive('pass')">已通过</button>
+					</div>
+				</div>
+
+				<div class="col-sm-6">
+					<div class="col-sm-9 text-right">
+						<div class="input-group">
+							<input type="search" class="form-control ng-pristine ng-valid ng-touched" ng-model="keyword"
+										 ng-search="onSearch()" placeholder="根据银行、企业名称、银行账号搜索">
+							<div class="input-group-btn">
+								<button ng-click="onSearch()" class="btn btn-primary" type="button">搜索</button>
+							</div>
+						</div>
+					</div>
+				</div>-->
+			</div>
+			<table ng-table="realAuthTableParams" class="table table-bordered table-striped" style="margin-top: 10px;">
+				<thead>
+				<tr>
+					<th width="30">序号</th>
+					<th width="100">姓名</th>
+					<th width="100">身份证</th>
+					<th width="100">查看文件</th>
+					<th width="100">申请时间</th>
+					<th width="100">状态</th>
+					<th width="80" ng-if="active=='tobeAudit'">操作</th>
+				</tr>
+				</thead>
+				<tbody>
+				<tr ng-repeat="info in $data">
+					<td>{{$index + 1}}</td>
+					<td ng-bind="::info.userName"></td>
+					<td ng-bind="::info.userIdcode"></td>
+					<td><a target="_blank" ng-href="{{info.idImgUrl}}">查看文件</a></td>
+					<td ng-bind="::info.idDate | date : 'yyyy-MM-dd'"></td>
+					<td ng-bind="::info.idEnable"></td>
+					<td ng-if="active=='tobeAudit'" class="text-center" style="position: relative;">
+						<a class="btn btn-sm btn-primary" ng-click="updateIdEnable(1,info)">审核通过</a>
+						<a class="btn btn-sm btn-default" ng-click="updateIdEnable(0,info)">审核未通过</a>
+					</td>
+				</tr>
+				<tr ng-if="$data.length == 0">
+					<td colspan="10" class="text-center" style="line-height: 40px; font-size: 20px;"><i class="fa fa-smile-o fa-lg"></i> 没有实名认证需要审核</td>
+				</tr>
+				</tbody>
+			</table>
+		</div>
+		<!-- ng-tableEnd -->
+	</div>
+</div>

+ 18 - 0
src/main/webapp/resources/view/admin/modal/secQuestion_add_modal.html

@@ -0,0 +1,18 @@
+<div class="modal-header">
+	<h3 class="modal-title" ng-hide="!addModal">添加密保问题</h3>
+	<h3 class="modal-title" ng-hide="!updateModal">编辑密保问题</h3>
+</div>
+<div class="modal-body">
+	<div class="form-group">
+		<sapn>问题内容:</sapn>
+		<input type="text" ng-model="secQuestion.question"/>
+	</div>
+	<div class="form-group">
+		<sapn>问题类型:</sapn>
+		<input type="text" ng-model="secQuestion.type"/>
+	</div>
+</div>
+<div class="modal-footer">
+	<button  class="btn btn-success" ng-click="confirm()">确认</button>
+	<button class="btn btn-default" ng-click="cancel()">取消</button>
+</div>

+ 61 - 0
src/main/webapp/resources/view/admin/sec_question.html

@@ -0,0 +1,61 @@
+<style>
+.row {
+	margin-bottom: 10px;
+}
+</style>
+<div>
+	<div class="box-header well">
+		密保问题维护
+	</div>
+	<div  class="box-content">
+		<!--
+		<div class="row">
+			<div class="col-xs-1">
+				<p style="margin-top: 8px; font-weight: bold;">
+					共<span class="totalNum">{{propertiesTableParams.total()}}</span>条
+				</p>
+			</div>
+			<div class="col-xs-offset-4 col-xs-7">
+				<div class="input-group">
+				<input type="search" class="form-control" ng-model="keyword"
+					ng-search="onSearch()" placeholder=请输入属性中文名查询>
+				<span class="input-group-btn">
+					<button ng-click="onSearch()" class="btn btn-primary" type="button">搜索</button>
+				</span>
+			</div>
+			</div>
+		</div>-->
+		<div class="row">
+			<div class="col-xs-offset-11 col-xs-1">
+				<a class="btn btn-primary" ng-click="add()"><i class="fa fa-plus"></i>添加密保问题</a>
+			</div>
+		</div>
+		<p ng-model="test"></p>
+		<table ng-table="secQuestionTableParams"
+			class="table table-bordered table-striped table-hover">
+			<thead>
+				<tr class="tr-default">
+					<th width="20" class="text-center">
+						<div>序号</div>
+					</th>
+					<th width="150" class="text-center">问题内容</th>
+					<th width="150" class="text-center">问题类型</th>
+					<th width="50" class="text-center">操作</th>
+				</tr>
+			</thead>
+			<tbody ng-repeat="secQuestion in $data">
+				<tr class="text-center">
+					<td class="tdcenter">
+						<div ng-bind="secQuestion.id"></div>
+					</td>
+					<td><span ng-bind="secQuestion.question"></span></td>
+					<td><span ng-bind="secQuestion.type"></span></td>
+					<td>
+						<button class="btn btn-primary" ng-click="edit(secQuestion.id)">编辑</button>
+						<button class="btn btn-primary" ng-click="delete(secQuestion.id)">删除</button>
+					</td>
+				</tr>
+			</tbody>
+		</table>
+	</div>
+</div>

+ 10 - 10
src/main/webapp/resources/view/usercenter/forstore/account_manager.html

@@ -126,34 +126,34 @@
 			<li>
 				<span>
 					<h5><img src="static/img/user/images/ok.png"/><p>已完成</p></h5>
-					<font>身份认证</font>
-					<span class="gray">用于提升账号的安全性和信任级别。认证后的有卖家记录的账号不能修改认证信息。</span>
+					<font>实名认证</font>
+					<span class="gray">实名认证后,可通过实名信息找回支付密码、修改手机号等,提高账户安全性。</span>
 				</span>
-				<!--<a href="javascript:void(0)">查看</a>-->
+				<a ng-click="updateRealAuth()">立即认证</a>
 			</li>
 			<li>
 				<span>
 					<h5><img src="static/img/user/images/ok.png"/><p>已完成</p></h5>
 					<font>登录密码</font>
-					<span class="gray">安全性高的密码可以使账号更安全。建议您定期更换密码,且设置一个包含数字和字母,并长度超过6位以上的密码。</span>
+					<span class="gray">安全性高的密码可以使账号更安全,建议您定期更换密码,并且设置一个包含数字和字母,长度超过8位以上的密码。</span>
 				</span>
 				<a ng-click="updatePassword()">修改</a>
 			</li>
 			<li>
 				<span>
 					<h5><img src="static/img/user/images/ok.png"/><p>已完成</p></h5>
-					<font>邮箱认证</font>
-					<span class="gray">您当前的邮箱:529010777@qq.com</span>
+					<font>密保问题</font>
+					<span class="gray">是您找回登录密码的方式之一。建议您设置一个容易记住,且最不容易被他人获取的问题及答案,更有效保障您的密...</span>
 				</span>
-				<a ng-click="updateUserEmail()">修改</a>
+				<a ng-click="updateUserQuestion()">立即设置</a>
 			</li>
 			<li>
 				<span>
 					<h5><img src="static/img/user/images/ok.png"/><p>已完成</p></h5>
-					<font>密保问题</font>
-					<span class="gray">是您找回登录密码的方式之一。建议您设置一个容易记住,且最不容易被他人获取的问题及答案,更有效保障您的密...</span>
+					<font>邮箱认证</font>
+					<span class="gray">您当前的邮箱:529010777@qq.com</span>
 				</span>
-				<!--<a href="javascript:void(0)">维护</a>-->
+				<a ng-click="updateUserEmail()">修改</a>
 			</li>
 			<li>
 				<span>

+ 1 - 1
src/main/webapp/resources/view/usercenter/forstore/buyer_transfer.html

@@ -589,7 +589,7 @@ table>tbody>tr>td .btn-primary {
 					<div class="marginltb">
 						<label>付款截图:</label>
 						<div>
-							<div  image-upload data-src="static/img/vendor/images/upload.png" on-success="onUploadPayment($data)"></div>
+							<div image-upload data-src="static/img/vendor/images/upload.png" on-success="onUploadPayment($data)"></div>
 							<span class="help-block font-size-12 text-inverse">建议图片大小在3M以内,支持图片格式jpg、png、gif</span>
 						</div>
 					</div>

+ 11 - 6
src/main/webapp/resources/view/vendor/modal/updatePassword.html

@@ -22,25 +22,30 @@
 				<i ng-show="checkFailed" class="fa fa-close" style="color:#CC3333;"></i>
 			</div>
 		</div>
-		<div class="row">
+		<div class="row" ng-class=""{'has-success': checkSuccess1, 'has-error': checkFailed1}">
 			<label class="col-md-4 col-sm-4 col text-right">新密码:</label>
 			<div class="col-md-4 col-sm-4 col">
-				<input ng-model="user.newPassword" ng-pattern="/^([\w~!@#$%^&\*\(\)-_\+=,.;\[\]{}\<\>]){8,20}$/" class="form-control input-sm" type="password" required  placeholder="8~20位字母、数字、符号">
+				<input ng-model="user.newPassword" ng-keyup="checkNewPassword(user.newPassword)" class="form-control input-sm" type="password" required  placeholder="8~20位字母、数字、符号">
 				<!-- <div>密码复杂度</div> -->
 			</div>
 			<div class="col-md-4 col-sm-4 col">
-
+				<i ng-show="checkSuccess1" class="fa fa-check" style="color:#339933"></i>
+				<i ng-show="checkFailed1" class="fa fa-close" style="color:#CC3333;"></i>
 			</div>
 		</div>
-		<div class="row line" ng-class="{'has-success': user.newPassword1 && (user.newPassword1==user.newPassword)}">
+		<div class="row line">
 			<label ng-model="user.newPassword1" class="col-md-4 col-sm-4 col text-right">重复新密码:</label>
 			<div class="col-md-4 col-sm-4 col">
-				<input ng-pattern="/^[\S]{6,}$/" ng-model="user.newPassword1" class="form-control input-sm" type="password" required placeholder="重复新密码">
+				<input ng-model="user.newPassword1" ng-keyup="checkNewPassword1(user.newPassword1)" class="form-control input-sm" type="password" required placeholder="重复新密码">
+			</div>
+			<div class="col-md-4 col-sm-4 col">
+				<i ng-show="checkSuccess2" class="fa fa-check" style="color:#339933"></i>
+				<i ng-show="checkFailed2" class="fa fa-close" style="color:#CC3333;"></i>
 			</div>
 		</div>
 	</div>
 	<div class="modal-footer">
-		<button class="btn btn-primary" ng-disabled="!checkSuccess" type="submit">确认修改</button>
+		<button class="btn btn-primary" ng-disabled="!checkSuccess || !checkSuccess1 || !checkSuccess2" type="submit">确认修改</button>
 		<button class="btn btn-default" ng-click="cancel()" type="button">取消</button>
 	</div>
 </form>

+ 55 - 0
src/main/webapp/resources/view/vendor/modal/updateRealAuth.html

@@ -0,0 +1,55 @@
+<style>
+    .realAuth .modal-body .row {
+        line-height: 34px;
+        font-size: 14px;
+    }
+    .previewImage{
+        width:100px;
+        height: 100px;
+    }
+</style>
+<div class="modal-header">
+    <h3 class="f14 modal-title"><i class="fa fa-lock fa-fw"></i>实名认证</h3>
+</div>
+<form class="realAuth" name="sampleSendForm" ng-submit="ok()">
+    <div class="modal-body">
+        <div class="row line oldUserPay">
+            <label class="col-md-4 col-sm-4 col text-right">真实姓名:</label>
+            <div class="col-md-4 col-sm-4 col"><input ng-model="user.userName" class="form-control input-sm"
+                                                       name="uesrName" ng-blur="checkUserName(user.userName)" required
+                                                      ></div>
+            <div class="col-md-4 col-sm-4 col">
+                <i ng-show="checkSuccess" class="fa fa-check" style="color:#339933"></i>
+                <i ng-show="checkFailed" class="fa fa-close" style="color:#CC3333;"></i>
+            </div>
+        </div>
+        <div class="row">
+            <label class="col-md-4 col-sm-4 col text-right">身份证号:</label>
+            <div class="col-md-4 col-sm-4 col">
+                <input ng-model="user.userIdcode"
+                       class="form-control input-sm" name="userIdcode" ng-blur="checkUserIdcode(user.userIdcode)" required>
+                <!-- <div>密码复杂度</div> -->
+            </div>
+            <div class="col-md-4 col-sm-4 col">
+                <i ng-show="checkSuccess1" class="fa fa-check" style="color:#339933"></i>
+                <i ng-show="checkFailed1" class="fa fa-close" style="color:#CC3333;"></i>
+            </div>
+        </div>
+        <div class="row">
+            <label class="col-md-6 col-sm-6 col text-right">请上传一张本人手持身份证照片:</label>
+            <br>
+            <input type="hidden" name="idImgUrl" ng-model="user.idImgUrl"/>
+            <div style="width:100px;height: 100px;"  image-upload data-src="static/img/vendor/images/upload.png" on-success="onUploadID($data)"></div>
+            <span class="help-block font-size-12 text-inverse">建议图片大小在3M以内,支持图片格式jpg、png、gif</span>
+            </div>
+            <div class="col-md-4 col-sm-4 col">
+                <i ng-show="checkSuccess2" class="fa fa-check" style="color:#339933"></i>
+                <i ng-show="checkFailed2" class="fa fa-close" style="color:#CC3333;"></i>
+            </div>
+        </div>
+    </div>
+    <div class="modal-footer">
+        <button class="btn btn-primary" ng-disabled="!checkSuccess || !checkSuccess1 || !checkSuccess2" type="submit">确认修改</button>
+        <button class="btn btn-default" ng-click="cancel()" type="button">取消</button>
+    </div>
+</form>

+ 3 - 4
src/main/webapp/resources/view/vendor/modal/updateUserEmail.html

@@ -20,7 +20,6 @@
                                                       type="userEmail" ng-blur="checkUserEmail(user.userEmail)" required
                                                       placeholder="当前邮箱地址"></div>
             <div class="col-md-4 col-sm-4 col">
-                <span ng-show="checking">验证邮箱地址...</span>
                 <i ng-show="checkSuccess" class="fa fa-check" style="color:#339933"></i>
                 <i ng-show="checkFailed" class="fa fa-close" style="color:#CC3333;"></i>
             </div>
@@ -33,8 +32,8 @@
                 <!-- <div>密码复杂度</div> -->
             </div>
             <div class="col-md-4 col-sm-4 col">
-                <i ng-show="emailSuccess" class="fa fa-check" style="color:#339933"></i>
-                <i ng-show="emailFailed" class="fa fa-close" style="color:#cc3333;"></i>
+                <i ng-show="checkSuccess1" class="fa fa-check" style="color:#339933"></i>
+                <i ng-show="checkFailed1" class="fa fa-close" style="color:#cc3333;"></i>
             </div>
         </div>
         <div class="row">
@@ -49,7 +48,7 @@
         </div>
     </div>
     <div class="modal-footer">
-        <button class="btn btn-primary" ng-disabled="!validSuccess" type="submit">确认修改</button>
+        <button class="btn btn-primary" ng-disabled="!validSuccess || !checkSuccess || !checkSuccess1" type="submit">确认修改</button>
         <button class="btn btn-default" ng-click="cancel()" type="button">取消</button>
     </div>
 </form>

+ 75 - 0
src/main/webapp/resources/view/vendor/modal/updateUserQuestion.html

@@ -0,0 +1,75 @@
+<style>
+    .userQuestion .modal-body .row {
+        line-height: 34px;
+        font-size: 14px;
+    }
+</style>
+<div class="modal-header">
+    <h3 class="f14 modal-title"><i class="fa fa-lock fa-fw"></i>密保问题</h3>
+</div>
+<form class="userQuestion" name="sampleSendForm" ng-submit="ok()">
+    <div class="modal-body">
+        <div class="row line">
+            <input type="hidden" name="sort" ng-model="uq[0].sort" ng-init="uq[0].sort=1"/>
+            <label class="col-md-4 col-sm-4 col text-right">问题1:</label>
+            <div class="col-md-4 col-sm-4 col">
+                <input ng-model="uq[0].id" type="hidden"/>
+                <!--
+                <input ng-model="uq[0].question" class="form-control input-sm" name="uq[0].question" required>
+                -->
+                <select class="form-control" ng-blur="choose()"  style="opacity: unset;" ng-repeat="info in secQuestions" ng-if="info.type==1"  ng-model="uq[0].question">
+                    <option value="">请选择一个问题</option>
+                    <option value="{{info.question}}">{{info.question}}</option>
+                </select>
+            </div>
+            <div class="col-md-4 col-sm-4 col">
+                <i ng-show="checkSuccess" class="fa fa-check" style="color:#339933"></i>
+                <i ng-show="checkFailed" class="fa fa-close" style="color:#CC3333;"></i>
+            </div>
+        </div>
+        <div class="row">
+            <label class="col-md-4 col-sm-4 col text-right">答案:</label>
+            <div class="col-md-4 col-sm-4 col">
+                <input ng-model="uq[0].answer" ng-blur="inputAnswer()"  class="form-control input-sm" name="uq[0].answer" required>
+                <!-- <div>密码复杂度</div> -->
+            </div>
+            <div class="col-md-4 col-sm-4 col">
+                <i ng-show="checkSuccess1" class="fa fa-check" style="color:#339933"></i>
+                <i ng-show="checkFailed1" class="fa fa-close" style="color:#CC3333;"></i>
+            </div>
+        </div>
+        <div class="row">
+            <input type="hidden" name="sort" ng-model="uq[1].sort" ng-init="uq[1].sort=2"/>
+            <label class="col-md-4 col-sm-4 col text-right">问题2:</label>
+            <div class="col-md-4 col-sm-4 col">
+                <input ng-model="uq[1].id" type="hidden"/>
+                <!--
+                <input ng-model="uq[1].question"  class="form-control input-sm" name="uq[1].question" required>
+                -->
+                <select class="form-control" ng-blur="choose1()"  style="opacity: unset;" ng-repeat="info in secQuestions" ng-if="info.type==2"  ng-model="uq[1].question">
+                    <option value="">请选择一个问题</option>
+                    <option value="{{info.question}}">{{info.question}}</option>
+                </select>
+            </div>
+            <div class="col-md-4 col-sm-4 col">
+                <i ng-show="checkSuccess2" class="fa fa-check" style="color:#339933"></i>
+                <i ng-show="checkFailed2" class="fa fa-close" style="color:#CC3333;"></i>
+            </div>
+        </div>
+        <div class="row">
+            <label class="col-md-4 col-sm-4 col text-right">答案:</label>
+            <div class="col-md-4 col-sm-4 col">
+                <input  ng-model="uq[1].answer" ng-blur="inputAnswer1()" class="form-control input-sm" name="uq[1].answer" required>
+                <!-- <div>密码复杂度</div> -->
+            </div>
+            <div class="col-md-4 col-sm-4 col">
+                <i ng-show="checkSuccess3" class="fa fa-check" style="color:#339933"></i>
+                <i ng-show="checkFailed3" class="fa fa-close" style="color:#CC3333;"></i>
+            </div>
+        </div>
+    </div>
+    <div class="modal-footer">
+        <button class="btn btn-primary" ng-disabled="!checkSuccess || !checkSuccess1 || !checkSuccess2 || !checkSuccess3" type="submit">确认修改</button>
+        <button class="btn btn-default" ng-click="cancel()" type="button">取消</button>
+    </div>
+</form>

+ 1 - 1
src/main/webapp/resources/view/vendor/modal/updateUserTel.html

@@ -46,7 +46,7 @@
         </div>
     </div>
     <div class="modal-footer">
-        <button class="btn btn-primary" ng-disabled="!validSuccess" type="submit">确认修改</button>
+        <button class="btn btn-primary" ng-disabled="!validSuccess || !checkSuccess || !checkSuccess1" type="submit">确认修改</button>
         <button class="btn btn-default" ng-click="cancel()" type="button">取消</button>
     </div>
 </form>