Sfoglia il codice sorgente

Accept Merge Request #167 merge : (master -> test)

Merge Request: merge
Created By: @Antiloveg
Accepted By: @Antiloveg
URL: https://coding.net/t/aft/p/AFT/git/merge/167
Antiloveg 8 anni fa
parent
commit
f9e3ac43dd

+ 1 - 1
src/main/java/com/goafanti/achievement/bo/InputAchievement.java

@@ -77,7 +77,7 @@ public class InputAchievement {
 	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		ownerIdNumber;
 
-	@Size(min = 0, max = 12, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		ownerMobile;
 
 	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")

+ 5 - 1
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -124,7 +124,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		now.set(Calendar.MILLISECOND, 0);
 
 		if (TokenManager.getToken() instanceof Admin) {
-			a.setSalesmanId(TokenManager.getAdminId());
+			a.setTechBrokerId(TokenManager.getAdminId());
 		}
 		a.setReleaseStatus(AchievementReleaseStatus.UNRELEASE.getCode());
 
@@ -259,6 +259,10 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		if (null != releaseStatus) {
 			params.put("releaseStatus", releaseStatus);
 		}
+		
+		if (TokenManager.hasPermission(AFTConstants.TECHBROKER)){
+			params.put("techBrokerId", TokenManager.getAdminId());
+		}
 
 		return params;
 	}

+ 16 - 4
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -685,6 +685,9 @@
 	<if test="releaseStatus != null">
 	   and  a.release_status = #{releaseStatus,jdbcType=INTEGER}
 	</if>
+	<if test="techBrokerId != null">
+	   and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
+	</if>
 	order by a.serial_number desc
 	<if test="page_sql!=null">
 			${page_sql}
@@ -726,6 +729,9 @@
 	<if test="releaseStatus != null">
 	   and  release_status = #{releaseStatus,jdbcType=INTEGER}
 	</if>
+	<if test="techBrokerId != null">
+	   and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
+	</if>
   </select>
   
   
@@ -770,6 +776,9 @@
 	<if test="releaseStatus != null">
 	   and  a.release_status = #{releaseStatus,jdbcType=INTEGER}
 	</if>
+	<if test="techBrokerId != null">
+	   and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
+	</if>
 	order by serial_number desc
 	<if test="page_sql!=null">
 			${page_sql}
@@ -811,6 +820,9 @@
 	<if test="releaseStatus != null">
 	   and  a.release_status = #{releaseStatus,jdbcType=INTEGER}
 	</if>
+	<if test="techBrokerId != null">
+	   and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
+	</if>
   </select>
   
   
@@ -1147,11 +1159,11 @@
 		a.transfer_mode as transferMode,
 		interest.id as interestId,
 		u.lvl as level,
-		ui.username as ownerName
+		a.owner_name as ownerName
 	FROM
 		achievement a
 	LEFT JOIN <![CDATA[ user ]]> u on u.id = a.owner_id
-	LEFT JOIN user_identity ui ON a.owner_id = ui.uid
+	LEFT JOIN user_identity ui on ui.uid = a.owner_id
 	LEFT JOIN district_glossory dg on dg.id = ui.province
 	LEFT JOIN district_glossory dgg on dgg.id = ui.city
 	LEFT JOIN field_glossory fg on fg.id = a.field_a
@@ -1180,11 +1192,11 @@
 		a.transfer_mode as transferMode,
 		interest.id as interestId,
 		u.lvl as level,
-		oi.unit_name as ownerName
+		a.owner_name as ownerName
 	FROM
 		achievement a
 	LEFT JOIN <![CDATA[ user ]]> u on u.id = a.owner_id
-	LEFT JOIN organization_identity oi ON a.owner_id = oi.uid
+	LEFT JOIN organization_identity ui on oi.uid = a.owner_id
 	LEFT JOIN district_glossory dg on dg.id = oi.licence_province
 	LEFT JOIN district_glossory dgg on dgg.id = oi.licence_city
 	LEFT JOIN field_glossory fg on fg.id = a.field_a

+ 4 - 4
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -1050,12 +1050,12 @@
 		dg.name AS province,
 		dgg.name AS city,
 		interest.id as interestId,
-		ui.username as employerName,
+		d.employer_name as employerName,
 		u.lvl as level
 	FROM
 		demand d
 	LEFT JOIN <![CDATA[ user ]]> u on u.id = d.employer_id
-	LEFT JOIN user_identity ui ON d.employer_id = ui.uid
+	LEFT JOIN user_identity ui on ui.uid = d.employer_id
 	LEFT JOIN district_glossory dg ON dg.id = ui.province
 	LEFT JOIN district_glossory dgg ON dgg.id = ui.city
 	LEFT JOIN field_glossory fg on fg.id = d.industry_category_a
@@ -1078,12 +1078,12 @@
 		dg.name AS province,
 		dgg.name AS city,
 		interest.id as interestId,
-		oi.unit_name as employerName,
+		d.employer_name as employerName,
 		u.lvl as level
 	FROM
 		demand d
 	LEFT JOIN <![CDATA[ user ]]> u on u.id = d.employer_id
-	LEFT JOIN organization_identity oi ON d.employer_id = oi.uid
+	LEFT JOIN organization_identity oi on oi.uid = d.employer_id
 	LEFT JOIN district_glossory dg ON dg.id = oi.licence_province
 	LEFT JOIN district_glossory dgg ON dgg.id = oi.licence_city
 	LEFT JOIN field_glossory fg on fg.id = d.industry_category_a

+ 1 - 1
src/main/java/com/goafanti/demand/bo/InputDemand.java

@@ -99,7 +99,7 @@ public class InputDemand {
 	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		employerContacts;
 	
-	@Size(min = 0, max = 11, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		employerContactsMobile;
 	
 	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")

File diff suppressed because it is too large
+ 1 - 0
src/main/webapp/WEB-INF/views/portal/activity/activityIndex.html


File diff suppressed because it is too large
+ 1 - 0
src/main/webapp/WEB-INF/views/portal/activity/details.html


+ 1 - 1
src/main/webapp/WEB-INF/views/portal/detail/demandDetail.html

@@ -15,7 +15,7 @@
 		<div class="container">
 			<div class="lt">欢迎进入科技认知计算交易平台!</div>
 			<div class="rt" th:if="${!isLogin}">
-				<a th:href="${basePath + '/user/login.html'}" class="login">登录</a> <a
+				<a th:href="${basePath + '/user/login.html'}">登录</a> <a
 					th:href="${basePath + '/user/signIn.html'}">注册</a>
 			</div>
 			<div class="rt" th:if="${isLogin}">