Selaa lähdekoodia

Merge branch 'master' of ssh://git.jishutao.com:55555/jishutao/jitao-server

# Conflicts:
#	src/main/webapp/WEB-INF/views/common.html
liliang4869 7 vuotta sitten
vanhempi
commit
3834a7c09b

+ 2 - 2
src/main/java/com/goafanti/achievement/controller/UserAchievementApiController.java

@@ -396,13 +396,13 @@ public class UserAchievementApiController extends CertifyApiController {
 		if (ids == null || ids.length != 1) {
 		if (ids == null || ids.length != 1) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
 		} else {
 		} else {
-			List<AchievementOrder> list = achievementOrderService.selectAchievementOrderByAchievementId(ids[0]);
+			/*List<AchievementOrder> list = achievementOrderService.selectAchievementOrderByAchievementId(ids[0]);
 			for (AchievementOrder order : list) {
 			for (AchievementOrder order : list) {
 				if (!AchievementOrderStatus.UNPAYED.getCode().equals(order.getStatus())) {
 				if (!AchievementOrderStatus.UNPAYED.getCode().equals(order.getStatus())) {
 					res.getError().add(buildError("", "当前科技成果有订单,无法删除!"));
 					res.getError().add(buildError("", "当前科技成果有订单,无法删除!"));
 					return res;
 					return res;
 				}
 				}
-			}
+			}*/
 			res.setData(achievementService.deleteByPrimaryKey(Arrays.asList(ids)));
 			res.setData(achievementService.deleteByPrimaryKey(Arrays.asList(ids)));
 		}
 		}
 		return res;
 		return res;

+ 3 - 2
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -138,7 +138,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	private void disposeAchievementPublish(Achievement a,List<String> webPages,List<String> appPages,boolean delete){
 	private void disposeAchievementPublish(Achievement a,List<String> webPages,List<String> appPages,boolean delete){
 		if(delete){
 		if(delete){
 			if(null != webPages && webPages.size()>0){
 			if(null != webPages && webPages.size()>0){
-				achievementPublishMapper.batchDeleteByAchievementId(a.getId());
+				achievementPublishMapper.deleteByAchievementId(a.getId());
 			}
 			}
 		}
 		}
 		AchievementPublish ap = null;
 		AchievementPublish ap = null;
@@ -200,6 +200,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	public int deleteByPrimaryKey(List<String> id) {
 	public int deleteByPrimaryKey(List<String> id) {
 		achievementKeywordMapper.batchDeleteByAchievementIds(id);
 		achievementKeywordMapper.batchDeleteByAchievementIds(id);
 		achievementDemandMapper.batchDeleteByAchievementIds(id);
 		achievementDemandMapper.batchDeleteByAchievementIds(id);
+		achievementPublishMapper.batchDeleteByAchievementIds(id);
 		for (String s : id) {
 		for (String s : id) {
 			Achievement a = achievementMapper.selectByPrimaryKey(s);
 			Achievement a = achievementMapper.selectByPrimaryKey(s);
 			if (null != a && AchievementAuditStatus.AUDITED.getCode().equals(a.getAuditStatus())
 			if (null != a && AchievementAuditStatus.AUDITED.getCode().equals(a.getAuditStatus())
@@ -408,7 +409,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 //		}
 //		}
 		achievementDemandMapper.deleteByAchievementId(a.getId());
 		achievementDemandMapper.deleteByAchievementId(a.getId());
 		achievementKeywordMapper.batchDeleteByAchievementId(a.getId());
 		achievementKeywordMapper.batchDeleteByAchievementId(a.getId());
-		achievementPublishMapper.batchDeleteByAchievementId(a.getId());
+		achievementPublishMapper.deleteByAchievementId(a.getId());
 		int i=0;
 		int i=0;
 		i=achievementMapper.updateByPrimaryKeySelective(a);
 		i=achievementMapper.updateByPrimaryKeySelective(a);
 		if (StringUtils.isNotBlank(a.getOwnerId())) {
 		if (StringUtils.isNotBlank(a.getOwnerId())) {

+ 3 - 1
src/main/java/com/goafanti/common/dao/AchievementPublishMapper.java

@@ -96,7 +96,9 @@ public interface AchievementPublishMapper {
 
 
 	int checkExisting(AchievementPublish a);
 	int checkExisting(AchievementPublish a);
 	
 	
-	int batchDeleteByAchievementId(String id) ;
+	int batchDeleteByAchievementIds(List<String> id) ;
 	
 	
 	List<String>getPublishPagesById(String id);
 	List<String>getPublishPagesById(String id);
+
+	int deleteByAchievementId(String id);
 }
 }

+ 3 - 1
src/main/java/com/goafanti/common/dao/DemandPublishMapper.java

@@ -78,5 +78,7 @@ public interface DemandPublishMapper {
 	
 	
 	List<DemandPublish> selectPublishPages(String demandId);
 	List<DemandPublish> selectPublishPages(String demandId);
 
 
-	int batchDeleteByDemandId(String id);
+	int batchDeleteByDemandIds(List<String> id);
+
+	int deleteByDemandId(String id);
 }
 }

+ 8 - 1
src/main/java/com/goafanti/common/mapper/AchievementPublishMapper.xml

@@ -436,10 +436,17 @@ where 1=1
 	 	and publish_page= #{publishPage,jdbcType=VARCHAR}
 	 	and publish_page= #{publishPage,jdbcType=VARCHAR}
 	 </select>
 	 </select>
 	 
 	 
-	  <delete id="batchDeleteByAchievementId" parameterType="java.lang.String">
+	  <delete id="deleteByAchievementId" parameterType="java.lang.String">
 	 	delete from achievement_publish where achievement_id = #{id,jdbcType=VARCHAR}
 	 	delete from achievement_publish where achievement_id = #{id,jdbcType=VARCHAR}
 	 </delete>
 	 </delete>
 	 
 	 
+	 <delete id="batchDeleteByAchievementIds" parameterType="java.util.List">
+	 	 delete from achievement_publish where achievement_id in
+        <foreach item="item" collection="list" open="(" separator="," close=")">
+            #{item}
+        </foreach>
+	 </delete>
+	 
 	 <select id="getPublishPagesById" resultType="java.lang.String">
 	 <select id="getPublishPagesById" resultType="java.lang.String">
 	 select publish_page from achievement_publish ap
 	 select publish_page from achievement_publish ap
 	 where ap.achievement_id = #{id}
 	 where ap.achievement_id = #{id}

+ 8 - 1
src/main/java/com/goafanti/common/mapper/DemandPublishMapper.xml

@@ -442,7 +442,14 @@ where 1=1
 	 	select id,publish_client,publish_page from demand_publish where demand_id = #{demandId,jdbcType=VARCHAR}
 	 	select id,publish_client,publish_page from demand_publish where demand_id = #{demandId,jdbcType=VARCHAR}
 	 </select>
 	 </select>
 	 
 	 
-	 <delete id="batchDeleteByDemandId" parameterType="java.lang.String">
+	 <delete id="batchDeleteByDemandIds" parameterType="java.lang.String">
+	 	 delete from demand_publish where demand_id in
+        <foreach item="item" collection="list" open="(" separator="," close=")">
+            #{item}
+        </foreach>
+	 </delete>
+	 
+	  <delete id="deleteByDemandId" parameterType="java.lang.String">
 	 	delete from demand_publish where demand_id = #{demandId,jdbcType=VARCHAR}
 	 	delete from demand_publish where demand_id = #{demandId,jdbcType=VARCHAR}
 	 </delete>
 	 </delete>
 </mapper>
 </mapper>

+ 2 - 2
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -688,9 +688,9 @@
     from 
     from 
     	user
     	user
     where 
     where 
-    	username = ${username} 
+    	username = #{username} 
 	    <if test="type != null">
 	    <if test="type != null">
-	    	and type = ${type}
+	    	and type = #{type}
 	    </if>
 	    </if>
 	    and source = 0
 	    and source = 0
   </select>
   </select>

+ 2 - 2
src/main/java/com/goafanti/demand/controller/UserDemandApiController.java

@@ -301,13 +301,13 @@ public class UserDemandApiController extends CertifyApiController {
 		if (ids == null || ids.length != 1) {
 		if (ids == null || ids.length != 1) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
 		} else {
 		} else {
-			List<DemandOrder> list = demandOrderService.selectDemandOrderByDemandId(ids[0]);
+			/*	List<DemandOrder> list = demandOrderService.selectDemandOrderByDemandId(ids[0]);
 			for (DemandOrder order : list){
 			for (DemandOrder order : list){
 				if (!DemandOrderStatus.CREATE.getCode().equals(order.getStatus())){
 				if (!DemandOrderStatus.CREATE.getCode().equals(order.getStatus())){
 					res.getError().add(buildError("", "当前科技需求有订单,无法删除!"));
 					res.getError().add(buildError("", "当前科技需求有订单,无法删除!"));
 					return res;
 					return res;
 				}
 				}
-			}
+			}*/
 			res.setData(demandService.deleteByPrimaryKey(Arrays.asList(ids)));
 			res.setData(demandService.deleteByPrimaryKey(Arrays.asList(ids)));
 		}
 		}
 		return res;
 		return res;

+ 2 - 1
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -135,6 +135,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	public int deleteByPrimaryKey(List<String> id) {
 	public int deleteByPrimaryKey(List<String> id) {
 		demandKeywordMapper.batchDeleteByDemandIds(id);
 		demandKeywordMapper.batchDeleteByDemandIds(id);
 		achievementDemandMapper.batchDeleteByDemandIds(id);
 		achievementDemandMapper.batchDeleteByDemandIds(id);
+		demandPublishMapper.batchDeleteByDemandIds(id);
 		for (String s : id) {
 		for (String s : id) {
 			Demand d = demandMapper.selectByPrimaryKey(s);
 			Demand d = demandMapper.selectByPrimaryKey(s);
 			if (null != d && DemandAuditStatus.AUDITED.getCode().equals(d.getAuditStatus())
 			if (null != d && DemandAuditStatus.AUDITED.getCode().equals(d.getAuditStatus())
@@ -498,7 +499,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	private void disposeDemandPublish(Demand d,List<String> webPages,List<String> appPages,boolean delete){
 	private void disposeDemandPublish(Demand d,List<String> webPages,List<String> appPages,boolean delete){
 		if(delete){
 		if(delete){
 			if(null != webPages && webPages.size()>0){
 			if(null != webPages && webPages.size()>0){
-				demandPublishMapper.batchDeleteByDemandId(d.getId());
+				demandPublishMapper.deleteByDemandId(d.getId());
 			}
 			}
 		}
 		}
 		DemandPublish dp = null;
 		DemandPublish dp = null;

+ 2 - 2
src/main/resources/props/config_local.properties

@@ -54,8 +54,8 @@ session.validate.timespan=18000000
 app.name=AFT
 app.name=AFT
 template.cacheable=false
 template.cacheable=false
 
 
-static.host=//sclient.jishutao.com/client/1.0.50
-portal.host=//sportal.jishutao.com/portal/2.0.6
+static.host=//sclient.jishutao.com/client/1.0.0
+portal.host=//sportal.jishutao.com/portal/1.0.0
 avatar.host=//sclient.jishutao.com
 avatar.host=//sclient.jishutao.com
 avatar.upload.host=//sclient.jishutao.com/upload
 avatar.upload.host=//sclient.jishutao.com/upload
 
 

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -55,7 +55,7 @@ session.validate.timespan=18000000
 app.name=AFT
 app.name=AFT
 template.cacheable=false
 template.cacheable=false
 
 
-static.host=//statics.jishutao.com/1.0.0
+static.host=//statics.jishutao.com/client/1.0.0
 portal.host=//statics.jishutao.com/portal/1.0.0
 portal.host=//statics.jishutao.com/portal/1.0.0
 avatar.host=//statics.jishutao.com
 avatar.host=//statics.jishutao.com
 avatar.upload.host=//statics.jishutao.com/upload
 avatar.upload.host=//statics.jishutao.com/upload

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

@@ -1,16 +1,20 @@
 <!DOCTYPE html>
 <!DOCTYPE html>
-<html>
-	<head>
-		<meta charset="utf-8" />
-		<link rel="icon" href="../img/ico_logo.ico">
-		<meta name="keywords" content=""/>
-		<meta name="Description" content=""/>
-		<meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1,user-scalable=no">
-		<meta http-equiv="x-ua-compatible" content="ie=edge">
-		<title>首页</title>
-		
-	<link th:href="${portalHost+'/vendors.css'}" rel="stylesheet"><link th:href="${portalHost+'/index.css'}" rel="stylesheet"></head>	
-	<body>
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+<meta charset="utf-8" />
+<link rel="icon" th:href="${portalHost+'/img/ico_logo.ico'}">
+<meta name="keywords" content="" />
+<meta name="Description" content="" />
+<meta name="viewport"
+	content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1,user-scalable=no">
+<meta http-equiv="x-ua-compatible" content="ie=edge">
+<title>首页</title>
+<link th:href="${portalHost+'/vendors.css'}" rel="stylesheet">
+<link th:href="${portalHost+'/index.css'}" rel="stylesheet">
+</head>
+<body>
 		<header>
 		<header>
 		<div th:replace="common::nav('','')"></div>
 		<div th:replace="common::nav('','')"></div>
 	</header>
 	</header>

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


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


+ 3 - 2
src/main/webapp/WEB-INF/views/portal/service/serviceList.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <!DOCTYPE html>
-<html lang="en">
-
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
 <head>
 <head>
     <meta charset="UTF-8">
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">

+ 5 - 7
src/main/webapp/WEB-INF/views/portal/technologyTrading/achievement.html

@@ -1,11 +1,9 @@
 <!DOCTYPE html>
 <!DOCTYPE html>
-<html lang="en">
-
-<head>
-    <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>
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head th:replace="common::header(~{::title},~{::link})">
+<title>科技成果</title>
 <link th:href="${portalHost+ '/vendors.css'}" rel="stylesheet">
 <link th:href="${portalHost+ '/vendors.css'}" rel="stylesheet">
 <link th:href="${portalHost+ '/newMenu/achievement.css'}" rel="stylesheet">
 <link th:href="${portalHost+ '/newMenu/achievement.css'}" rel="stylesheet">
 </head>
 </head>

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


+ 4 - 6
src/main/webapp/WEB-INF/views/portal/technologyTrading/demand.html

@@ -1,10 +1,8 @@
 <!DOCTYPE html>
 <!DOCTYPE html>
-<html lang="en">
-
-<head>
-<meta charset="UTF-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta http-equiv="X-UA-Compatible" content="ie=edge">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head th:replace="common::header(~{::title},~{::link})">
 <title>科技需求</title>
 <title>科技需求</title>
 <link th:href="${portalHost+ '/vendors.css'}" rel="stylesheet">
 <link th:href="${portalHost+ '/vendors.css'}" rel="stylesheet">
 <link th:href="${portalHost+'/newMenu/demand.css'}" rel="stylesheet">
 <link th:href="${portalHost+'/newMenu/demand.css'}" rel="stylesheet">

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