Selaa lähdekoodia

新增修改专家信息接口,修改html头部replace

liliang4869 7 vuotta sitten
vanhempi
commit
b57e1d4c0d
25 muutettua tiedostoa jossa 113 lisäystä ja 67 poistoa
  1. 1 0
      src/main/java/com/goafanti/portal/controller/PortalNewsController.java
  2. 33 0
      src/main/java/com/goafanti/user/bo/ExpertUserIdentity.java
  3. 51 0
      src/main/java/com/goafanti/user/controller/UserApiController.java
  4. 1 1
      src/main/webapp/WEB-INF/views/admin/achievement.html
  5. 1 1
      src/main/webapp/WEB-INF/views/admin/demand.html
  6. 1 1
      src/main/webapp/WEB-INF/views/admin/index.html
  7. 1 1
      src/main/webapp/WEB-INF/views/admin/login.html
  8. 1 1
      src/main/webapp/WEB-INF/views/admin/set.html
  9. 1 1
      src/main/webapp/WEB-INF/views/admin/userManage.html
  10. 1 1
      src/main/webapp/WEB-INF/views/admin/userOrder.html
  11. 4 11
      src/main/webapp/WEB-INF/views/common.html
  12. 2 2
      src/main/webapp/WEB-INF/views/portal/index.html
  13. 1 1
      src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html
  14. 1 34
      src/main/webapp/WEB-INF/views/portal/technologyTrading/achievement.html
  15. 1 1
      src/main/webapp/WEB-INF/views/user/account/achievement.html
  16. 1 1
      src/main/webapp/WEB-INF/views/user/account/demand.html
  17. 1 1
      src/main/webapp/WEB-INF/views/user/account/index.html
  18. 1 1
      src/main/webapp/WEB-INF/views/user/account/services.html
  19. 1 1
      src/main/webapp/WEB-INF/views/user/account/set.html
  20. 1 1
      src/main/webapp/WEB-INF/views/user/certify.html
  21. 1 1
      src/main/webapp/WEB-INF/views/user/groupCertify.html
  22. 1 1
      src/main/webapp/WEB-INF/views/user/index.html
  23. 1 1
      src/main/webapp/WEB-INF/views/user/login.html
  24. 1 1
      src/main/webapp/WEB-INF/views/user/msignIn.html
  25. 3 2
      src/main/webapp/WEB-INF/views/user/subscriberDetail.html

+ 1 - 0
src/main/java/com/goafanti/portal/controller/PortalNewsController.java

@@ -128,6 +128,7 @@ public class PortalNewsController extends BaseController {
 	public ModelAndView portalHighTechEvaluateIprInfo(HttpServletRequest request, ModelAndView modelview, Long id,Integer type) {
 		modelview.setViewName("/portal/news/newsDetail");
 		modelview.addObject("type",type); 
+		if(type ==null )type=1;
 		if(type ==1) {
 		Pagination<NewsPortalList> newsList = newsService.portalNewsList(6, 1, 5, null, null, null);
 		News newsDetail = newsService.findNewsDetail(id);

+ 33 - 0
src/main/java/com/goafanti/user/bo/ExpertUserIdentity.java

@@ -0,0 +1,33 @@
+package com.goafanti.user.bo;
+
+public class ExpertUserIdentity extends InputUserIdentity {
+String graduateSchool;
+String majorCategory;
+String qualification;
+String professionalTitle;
+public String getGraduateSchool() {
+	return graduateSchool;
+}
+public void setGraduateSchool(String graduateSchool) {
+	this.graduateSchool = graduateSchool;
+}
+public String getMajorCategory() {
+	return majorCategory;
+}
+public void setMajorCategory(String majorCategory) {
+	this.majorCategory = majorCategory;
+}
+public String getQualification() {
+	return qualification;
+}
+public void setQualification(String qualification) {
+	this.qualification = qualification;
+}
+public String getProfessionalTitle() {
+	return professionalTitle;
+}
+public void setProfessionalTitle(String professionalTitle) {
+	this.professionalTitle = professionalTitle;
+}
+
+}

+ 51 - 0
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -41,6 +41,7 @@ import com.goafanti.common.utils.TimeUtils;
 import com.goafanti.common.utils.VerifyCodeUtils;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.easemob.EasemobUtils;
+import com.goafanti.user.bo.ExpertUserIdentity;
 import com.goafanti.user.bo.InputOrgPro;
 import com.goafanti.user.bo.InputOrganizationIdentity;
 import com.goafanti.user.bo.InputOrganizationTech;
@@ -439,6 +440,56 @@ public class UserApiController extends BaseApiController {
 	}
 	
 	/**
+	 * 更新专家信息
+	 * 
+	 * @param userIdentity
+	 * @param bindingResult
+	 * @return
+	 */
+	@RequestMapping(value = "/updateExpertDetail", method = RequestMethod.POST)
+	public Result updateExpertDetail(@Valid ExpertUserIdentity userIdentity, BindingResult bindingResult) {
+		Result res = new Result();
+		if (bindingResult.hasErrors()) {
+			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
+					UserIdentityFields.getFieldDesc(bindingResult.getFieldError().getField())));
+			return res;
+		}
+		if(StringUtils.isBlank(userIdentity.getUid())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "用户ID"));
+			return res;
+		}
+		if(userIdentity.getAuthentication().intValue() == UserAuthentication.AUTHENTICATION.getCode().intValue()
+				&& userIdentity.getType().intValue() == UserType.ORGANIZATION.getCode().intValue()){
+			res.getError().add(buildError(null, "", "用户已经企业认证"));
+			return res;
+		}else if(userIdentity.getAuthentication().intValue() == UserAuthentication.UN_AUTHENTICATION.getCode().intValue()){
+			userIdentity.setType(UserType.PERSONAL.getCode());
+			userIdentity.setAuthentication(UserAuthentication.AUTHENTICATION.getCode());
+		}
+		if (res.getError().isEmpty()) {
+			UserIdentity ui = new UserIdentity();
+			User user = new User();
+			userIdentity.setExpert(1);//直接变为专家
+			BeanUtils.copyProperties(userIdentity, ui);
+			BeanUtils.copyProperties(userIdentity, user);
+			ui.setExpertAudit(2);//直接审核通过
+			UserIdentity u = userIdentityService.selectUserIdentityByUserId(TokenManager.getUserId());
+			if (null == u) {
+				ui.setId(UUID.randomUUID().toString());
+				ui.setUid(TokenManager.getUserId());
+				userIdentityService.insert(ui);
+			} else {
+				ui.setId(u.getId());
+				userIdentityService.updateByPrimaryKeySelective(ui);
+			}
+			user.setId(TokenManager.getUserId());
+			userService.updateByPrimaryKeySelective(user);
+		}
+		res.setData(userIdentity);
+		return res;
+	}
+	
+	/**
 	 * 企业信息详情
 	 * @return
 	 */

+ 1 - 1
src/main/webapp/WEB-INF/views/admin/achievement.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 	<title>科技成果页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/achievement.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/admin/demand.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head>
 	<title>科技需求页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/demand.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/admin/index.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 	<title>管理中心首页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/index.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/admin/login.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 	<title>登录页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/login.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/admin/set.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 	<title>设置页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/set.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/admin/userManage.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 	<title>用户管理页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/userManage.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/admin/userOrder.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 	<title>科技思想页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/userOrder.css'}" rel="stylesheet">

+ 4 - 11
src/main/webapp/WEB-INF/views/common.html

@@ -7,8 +7,8 @@
   <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <title>技术服务列表</title>
-<link th:href="${portalHost+'/vendors.css'}" rel="stylesheet"><link th:href="${portalHost+'/serviceDetails.css'}" rel="stylesheet"></head>
+    <title></title>
+</head>
 
 <th:block th:replace="${link}" />
 <body>
@@ -57,14 +57,7 @@
                     <li>
                         <a th:href="@{/portal/service/serviceIndex}">科技服务</a>
                         <img th:src="${portalHost+'/img/hot.png'}">
-                        <ol class="subnavigation">
-                            <li>
-                                <a th:href="@{/portal/service/serviceIndex}">高企认定</a>
-                            </li>
-                            <li>
-                                <a th:href="@{/portal/service/serviceIndex}">知识产权</a>
-                            </li>
-                        </ol>
+                       
                     </li>
                     <li>
                         <a href="#">技术交易</a>
@@ -240,7 +233,7 @@
 					</div>
 				</div>
 				<div class="login_right">
-					<h5>用户登陆<a href="">免费注册有好礼呦!!</a></h5>
+					<h5>用户登陆<a th:href="@{/user/signIn}">免费注册有好礼呦!!</a></h5>
 					<form  id="form_login">
 						<div class="login_uesr">
 							<label for="uesname"><img th:src="${portalHost+'/img/login_use.png'}"/></label>

+ 2 - 2
src/main/webapp/WEB-INF/views/portal/index.html

@@ -340,8 +340,8 @@
 			<div class="indexExpert">
 				<div class="indexExpert_cont">
 				
-					<a href="" >
-						<div th:each="e:${experts}">
+					<a  th:each="e:${experts}" th:href="@{/portal/subscriberDetail(uid=${e.uid},type=0)}" >
+						<div>
 							<img th:src="${e.headPortraitUrl}==null?${portalHost+'/img/indexNew14.jpg'}:${avatarUploadHost+headPortraitUrl}" alt="" />
 							<div class="indexExpert_basc">
 								<h3 th:text="${e.username}">张三</h3>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html


+ 1 - 34
src/main/webapp/WEB-INF/views/portal/technologyTrading/achievement.html

@@ -259,40 +259,7 @@
                     </ol>
                 </div>
             </div>
-            <div class="practicalRight">
-                <h4>技淘百科</h4>
-                <ul>
-                    <li>
-                        <img th:src="${portalHost+'/img/newMenu/achievement_21.jpg'}" alt="">
-                        <div>
-                            <p>高新服务流程如何</p>
-                            <hr />
-                        </div>
-                    </li>
-                    <li>
-                        <img th:src="${portalHost+'/img/newMenu/achievement_22.jpg'}" alt="">
-                        <div>
-                            <p>高新服务流程如何</p>
-                            <hr />
-                        </div>
-                    </li>
-                    <li>
-                        <img th:src="${portalHost+'/img/newMenu/achievement_23.jpg'}" alt="">
-                        <div>
-                            <p>高新服务流程如何</p>
-                            <hr />
-                        </div>
-                    </li>
-                    <li>
-                        <img th:src="${portalHost+'/img/newMenu/achievement_24.jpg'}" alt="">
-                        <div>
-                            <p>高新服务流程如何</p>
-                            <hr />
-                        </div>
-                    </li>
-                </ul>
-                <a href="#" class="float-right">查看更多 > </a>
-            </div>
+           
         </div>
         <div class="studyT" id="transactionTitle">
             <h4>知识产权交易政策

+ 1 - 1
src/main/webapp/WEB-INF/views/user/account/achievement.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head>
 	<title>科技成果页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/user/account/achievement.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/user/account/demand.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 	<title>科技需求页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/user/account/demand.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/user/account/index.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head>
 	<title>用户页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/user/account/index.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/user/account/services.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 	<title>科技服务页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/user/account/services.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/user/account/set.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 	<title>用户设置页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/user/account/set.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/user/certify.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 	<title>个人用户认证页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/user/certify.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/user/groupCertify.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 	<title>团体用户认证页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/user/groupCertify.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/user/index.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 	<title>个人中心首页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/user/index.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/user/login.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 	<title>登录页</title>
 	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/user/login.css'}" rel="stylesheet">

+ 1 - 1
src/main/webapp/WEB-INF/views/user/msignIn.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:th="http://www.thymeleaf.org">
-<head th:replace="common::header(~{::title},~{::link})">
+<head >
 		<meta charset="UTF-8">		
 		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
 		<title>手机注册</title>

+ 3 - 2
src/main/webapp/WEB-INF/views/user/subscriberDetail.html

@@ -3,15 +3,16 @@
 	xmlns:th="http://www.thymeleaf.org"
 	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
 <head>
-<title>用户详情页</title>
+
 <link th:href="${portalHost + '/vendors.css'}" rel="stylesheet">
 <link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 <link th:href="${portalHost + '/thinkTank/thinkerDetail.css'}"
 	rel="stylesheet">
+	<title>用户详情页</title>
 </head>
 <body>
 	<header>
-		<div th:replace="common::nav('user','subscriberDetail')"></div>
+		<div th:replace="common::nav('','')"></div>
 	</header>
 	<div class="banner">
 		<img th:src="${portalHost + '/img/thinkerDetail_banner01.jpg'}" alt="" />