ソースを参照

用户绑定企业的修改

zhaohongpeng 8 年 前
コミット
a679f3c137

+ 30 - 2
src/main/java/com/uas/platform/b2c/common/account/controller/EnterpriseController.java

@@ -13,6 +13,7 @@ import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.sso.entity.ApplyUserSpaceView;
 import com.uas.sso.entity.UserSpaceDetail;
 import com.uas.sso.entity.UserSpaceView;
+import com.uas.sso.entity.UserView;
 import com.uas.sso.support.Page;
 import com.uas.sso.util.AccountUtils;
 import org.apache.commons.collections.CollectionUtils;
@@ -168,7 +169,7 @@ public class EnterpriseController {
 	 * @param enName
 	 */
 	@RequestMapping(value = "/findByName/{enName}", method = RequestMethod.GET)
-	public UserSpaceView findByName(@PathVariable("enName") String enName) {
+	public UserSpaceDetail findByName(@PathVariable("enName") String enName) {
 		UserSpaceView userSpaceView =null;
 		if (StringUtils.isEmpty(enName)) {
 			throw new IllegalArgumentException("信息未填写完整!");
@@ -178,9 +179,36 @@ public class EnterpriseController {
 		} catch (Exception e) {
 			throw new IllegalArgumentException("账户中心异常!");
 		}
-		return userSpaceView;
+		UserSpaceDetail userSpaceDetail = new UserSpaceDetail();
+		if (userSpaceView != null) {
+			userSpaceDetail.setUu(userSpaceView.getSpaceUU());
+			userSpaceDetail.setName(userSpaceView.getSpaceName());
+			userSpaceDetail.setCorporation(userSpaceView.getCorporation());
+			userSpaceDetail.setRegisterDate(userSpaceView.getRegisterDate());
+			Long adminUU = userSpaceView.getAdminUU();
+			if (adminUU == null) {
+				throw new IllegalArgumentException("账户中心管理员数据缺失!");
+			}
+			User admin = userService.findUserByUserUU(userSpaceView.getAdminUU());
+			userSpaceDetail.setAdminEmail(admin.getUserEmail());
+			userSpaceDetail.setAdminName(admin.getUserName());
+			userSpaceDetail.setAdminTel(admin.getUserTel());
+			userSpaceDetail.setBusinessCode(userSpaceView.getBusinessCode());
+			userSpaceDetail.setBusinessCodeImage(userSpaceView.getBusinessCodeImage());
+			userSpaceDetail.setAddress(userSpaceView.getRegAddress());
+			//userSpaceView.getValidCode();
+			userSpaceDetail.setLogoImage(userSpaceView.getLogoImage());
+			userSpaceDetail.setTel(userSpaceView.getTelephone());
+			userSpaceDetail.setProfession(userSpaceView.getProfession());
+			userSpaceDetail.setTags(userSpaceView.getTags());
+			//userSpaceView.getArea();
+		}
+		return userSpaceDetail;
 	}
 
+
+	/*UserSpaceDetailConvertuserSpaceView*/
+
 	/**
 	 * 发起绑定个人到企业的申请
 	 * @param phone

+ 6 - 4
src/main/webapp/resources/view/vendor/forstore/vendor_account_management.html

@@ -668,15 +668,17 @@
         </li>
         <li ng-switch="userInfo.idEnable">
 				<span>
-					<h5 ng-switch-when="1"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-switch-when="2"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
 					<h5 ng-switch-when="0"><img src="static/img/user/images/safe.png"/></h5>
-					<h5 ng-switch-when="2"><img src="static/img/user/images/safe.png"/></h5>
+					<h5 ng-switch-when="1"><img src="static/img/user/images/safe.png"/></h5>
+                    <h5 ng-switch-when="3"><img src="static/img/user/images/safe.png"/></h5>
 					<font>实名认证:</font>
 					<span>实名认证后,可通过实名信息找回支付密码、修改手机号等,提高账户安全性。</span>
 				</span>
           <a ng-switch-when="0" ng-click="updateRealAuth()" class="mall-btn-default">立即设置</a>
-          <a ng-switch-when="1">审核通过</a>
-          <a ng-switch-when="2">待审核</a>
+          <a ng-switch-when="2">审核通过</a>
+          <a ng-switch-when="1">待审核</a>
+          <a ng-switch-when="3">重新设置</a>
         </li>
        <!-- <li>
 				<span>