Просмотр исходного кода

代码修改

Signed-off-by: anderx <312518615@qq.com>
anderx лет назад: 6
Родитель
Сommit
d1ed197f8a

+ 0 - 2
.settings/org.eclipse.wst.common.component

@@ -1,9 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
     <wb-module deploy-name="local">
-        <wb-resource deploy-path="/WEB-INF/web.xml" source-path="/src/main/webapp/WEB-INF/web.xml"/>
         <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
         <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
-        <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
         <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
         <property name="java-output-path" value="/wechat-guessing/target/classes"/>
         <property name="context-root" value="local"/>

+ 35 - 0
src/main/java/com/kede/common/controller/CertifyApiController.java

@@ -0,0 +1,35 @@
+package com.kede.common.controller;
+
+import com.kede.common.bo.Result;
+import com.kede.common.constant.ErrorConstants;
+import com.kede.common.model.User;
+import com.kede.core.shiro.token.TokenManager;
+
+public class CertifyApiController extends BaseApiController {
+
+
+	public boolean checkCertify(Result res, User user) {
+		if (user == null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "用户未指定", "用户"));
+			return false;
+		}
+		return true;
+	}
+
+	public boolean checkAdminLogin(Result res) {
+		if (TokenManager.getAdminToken() == null) {
+			res.getError().add(buildError(ErrorConstants.NON_LOGIN, "找不到登录信息"));
+			return false;
+		}
+		return true;
+	}
+
+	public boolean checkUserLogin(Result res) {
+		if (TokenManager.getUserToken() == null) {
+			res.getError().add(buildError(ErrorConstants.NON_LOGIN, "找不到登录信息"));
+			return false;
+		}
+		return true;
+	}
+
+}

+ 35 - 0
src/main/java/com/kede/common/controller/WebpageController.java

@@ -0,0 +1,35 @@
+package com.kede.common.controller;
+
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+
+@Controller
+public class WebpageController extends BaseController {
+
+	
+	
+
+
+	@RequestMapping(value = "/admin/login", method = RequestMethod.GET)
+	public ModelAndView adminLogin(HttpServletRequest request, ModelAndView modelview) {
+		System.out.println("----------------------------------");
+		modelview.setViewName("admin/login");
+		return modelview;
+	}
+
+	
+	
+	@RequestMapping(value = "/admin/index", method = RequestMethod.GET)
+	public ModelAndView adminHome(HttpServletRequest request, ModelAndView modelview) {
+		modelview.setViewName("/admin/index");
+		return modelview;
+	}
+
+	
+}

+ 2 - 4
src/main/java/com/kede/common/mapper/CustomerCaseMapper.xml

@@ -378,10 +378,8 @@
 			${page_sql}
 	</if>
   </select>
-  <select id="findCustomerCaseList" resultType="com.kede.customerCase.bo.outCustomerCase">
-     select id,name,status, release_status releaseStatus,province,region,
-   date_format(release_time,'%Y-%m-%d %H:%i:%S') as releaseTimeConvert,
-   date_format(create_time,'%Y-%m-%d %H:%i:%S') as createTimeConvert
+  <select id="findCustomerCaseCount" resultType="java.lang.Integer">
+     select count(*)
     from customer_case where 1=1
     <if test="c.id!=null">
     and id = #{c.id}

+ 1 - 1
src/main/java/com/kede/news/controller/AdminNewsApiController.java

@@ -19,7 +19,7 @@ import com.kede.news.service.NewsService;
 
 
 @RestController
-@RequestMapping(value = "/api/admin/news")
+@RequestMapping(value = "/open/admin/news")
 public class AdminNewsApiController extends BaseApiController {
 	@Resource
  	private NewsService	newsService;

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

@@ -1,87 +1,87 @@
-#Driver
-jdbc.driverClassName=com.mysql.jdbc.Driver
-#本地
-jdbc.url=jdbc\:mysql\://localhost\:3306/aft_ow?useUnicode\=true&characterEncoding\=UTF-8&autoReconnect\=true&useSSL\=false
-jdbc.username=dev
-jdbc.password=123456
-#测试
-#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft20181217?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-#jdbc.username=root
-#jdbc.password=aftdev
-#\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
-jdbc.validationQuery=SELECT 'x'
-#\u521d\u59cb\u8fde\u63a5\u6570
-jdbc.initialSize=3
-#\u6700\u5927\u8fde\u63a5\u6c60\u6570\u91cf
-jdbc.maxActive=20
-#\u53bb\u6389\uff0c\u914d\u7f6e\u6587\u4ef6\u5bf9\u5e94\u53bb\u6389
-#jdbc.maxIdle=20
-#\u914d\u7f6e0,\u5f53\u7ebf\u7a0b\u6c60\u6570\u91cf\u4e0d\u8db3\uff0c\u81ea\u52a8\u8865\u5145\u3002
-jdbc.minIdle=0
-#\u83b7\u53d6\u94fe\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a1\u5206\u949f\uff0c\u5355\u4f4d\u4e3a\u6beb\u79d2\u3002
-jdbc.maxWait=120000
-#\u83b7\u53d6\u94fe\u63a5\u7684\u65f6\u5019\uff0c\u4e0d\u6821\u9a8c\u662f\u5426\u53ef\u7528\uff0c\u5f00\u542f\u4f1a\u6709\u635f\u6027\u80fd\u3002
-jdbc.testOnBorrow=false
-#\u5f52\u8fd8\u94fe\u63a5\u5230\u8fde\u63a5\u6c60\u7684\u65f6\u5019\u6821\u9a8c\u94fe\u63a5\u662f\u5426\u53ef\u7528\u3002
-jdbc.testOnReturn=false
-#\u6b64\u9879\u914d\u7f6e\u4e3atrue\u5373\u53ef\uff0c\u4e0d\u5f71\u54cd\u6027\u80fd\uff0c\u5e76\u4e14\u4fdd\u8bc1\u5b89\u5168\u6027\u3002\u610f\u4e49\u4e3a\uff1a\u7533\u8bf7\u8fde\u63a5\u7684\u65f6\u5019\u68c0\u6d4b\uff0c\u5982\u679c\u7a7a\u95f2\u65f6\u95f4\u5927\u4e8etimeBetweenEvictionRunsMillis\uff0c\u6267\u884cvalidationQuery\u68c0\u6d4b\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002
-jdbc.testWhileIdle=true
-#1.Destroy\u7ebf\u7a0b\u4f1a\u68c0\u6d4b\u8fde\u63a5\u7684\u95f4\u9694\u65f6\u95f4
-#2.testWhileIdle\u7684\u5224\u65ad\u4f9d\u636e
-jdbc.timeBetweenEvictionRunsMillis=60000
-#\u4e00\u4e2a\u94fe\u63a5\u751f\u5b58\u7684\u65f6\u95f4\uff08\u4e4b\u524d\u7684\u503c\uff1a25200000\uff0c\u8fd9\u4e2a\u65f6\u95f4\u6709\u70b9BT\uff0c\u8fd9\u4e2a\u7ed3\u679c\u4e0d\u77e5\u9053\u662f\u600e\u4e48\u6765\u7684\uff0c\u6362\u7b97\u540e\u7684\u7ed3\u679c\u662f\uff1a25200000/1000/60/60 = 7\u4e2a\u5c0f\u65f6\uff09
-jdbc.minEvictableIdleTimeMillis=300000
-#\u94fe\u63a5\u4f7f\u7528\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u662f\u5426\u56de\u6536
-jdbc.removeAbandoned=true
-#\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u65f6\u95f4\uff08\u5355\u4f4d\u79d2\uff09\uff0c\u76ee\u524d\u4e3a5\u5206\u949f\uff0c\u5982\u679c\u6709\u4e1a\u52a1\u5904\u7406\u65f6\u95f4\u8d85\u8fc75\u5206\u949f\uff0c\u53ef\u4ee5\u9002\u5f53\u8c03\u6574\u3002
-jdbc.removeAbandonedTimeout=300
-#\u94fe\u63a5\u56de\u6536\u7684\u65f6\u5019\u63a7\u5236\u53f0\u6253\u5370\u4fe1\u606f\uff0c\u6d4b\u8bd5\u73af\u5883\u53ef\u4ee5\u52a0\u4e0atrue\uff0c\u7ebf\u4e0a\u73af\u5883false\u3002\u4f1a\u5f71\u54cd\u6027\u80fd\u3002
-jdbc.logAbandoned=true
-#\u7edf\u8ba1\u76d1\u63a7
-jdbc.filters=stat
-
-logging.level.com.goafanti=DEBUG
-
-jedis.host=localhost
-jedis.port=6379
-jedis.timeout=5000
-jedis.password=aft123456
-
-pwd.hash_algorithm_name=md5
-pwd.hash_iterations=2
-
-session.timeout=12000000
-session.validate.timespan=18000000
-
-app.name=AFT
-template.cacheable=false
-
-
-portal.host=//sf.jishutao.com/portal/2.0.6
-avatar.upload.host=//sb.jishutao.com/upload
-#连接开发
-static.host=//sb.jishutao.com/1.1.06
-avatar.host=//sb.jishutao.com
-
-#连生产
-#avatar.host=//static.kedexinxi.com
-#static.host=//s.kedexinxi.com/1.1.06
-
-upload.path=F:/data/public/upload
-upload.private.path=F:/data/private/upload
-
-accessKey=LTAIqTgQLLwz252Z
-accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9
-aesSecretKey=aft1234567890123
-
-mobileCodeTemplate=SMS_37845022
-mobileRemindCodeTemplate=SMS_137421952
-patentTemplate=SMS_72005286
-
-easemob.client.url=https://a1.easemob.com/1117170814115609/jitao
-easemob.client.id=YXA6RUDGkIDSEeemq9_4PWzcNA
-easemob.client.secret=YXA61NHE0renI5N8gEgizoI5ivM9SYE
-
-jiguang.appKey=dbcea43366e038073452a04e
-jiguang.masterSecret=59792298288e4f635c737def
-jiguang.pushUrl=https://api.jpush.cn/v3/push
+#Driver
+jdbc.driverClassName=com.mysql.jdbc.Driver
+#本地
+jdbc.url=jdbc\:mysql\://localhost\:3306/aft_ow?useUnicode\=true&characterEncoding\=UTF-8&autoReconnect\=true&useSSL\=false
+jdbc.username=dev
+jdbc.password=123456
+#测试
+#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft20181217?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#jdbc.username=root
+#jdbc.password=aftdev
+#\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
+jdbc.validationQuery=SELECT 'x'
+#\u521d\u59cb\u8fde\u63a5\u6570
+jdbc.initialSize=3
+#\u6700\u5927\u8fde\u63a5\u6c60\u6570\u91cf
+jdbc.maxActive=20
+#\u53bb\u6389\uff0c\u914d\u7f6e\u6587\u4ef6\u5bf9\u5e94\u53bb\u6389
+#jdbc.maxIdle=20
+#\u914d\u7f6e0,\u5f53\u7ebf\u7a0b\u6c60\u6570\u91cf\u4e0d\u8db3\uff0c\u81ea\u52a8\u8865\u5145\u3002
+jdbc.minIdle=0
+#\u83b7\u53d6\u94fe\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a1\u5206\u949f\uff0c\u5355\u4f4d\u4e3a\u6beb\u79d2\u3002
+jdbc.maxWait=120000
+#\u83b7\u53d6\u94fe\u63a5\u7684\u65f6\u5019\uff0c\u4e0d\u6821\u9a8c\u662f\u5426\u53ef\u7528\uff0c\u5f00\u542f\u4f1a\u6709\u635f\u6027\u80fd\u3002
+jdbc.testOnBorrow=false
+#\u5f52\u8fd8\u94fe\u63a5\u5230\u8fde\u63a5\u6c60\u7684\u65f6\u5019\u6821\u9a8c\u94fe\u63a5\u662f\u5426\u53ef\u7528\u3002
+jdbc.testOnReturn=false
+#\u6b64\u9879\u914d\u7f6e\u4e3atrue\u5373\u53ef\uff0c\u4e0d\u5f71\u54cd\u6027\u80fd\uff0c\u5e76\u4e14\u4fdd\u8bc1\u5b89\u5168\u6027\u3002\u610f\u4e49\u4e3a\uff1a\u7533\u8bf7\u8fde\u63a5\u7684\u65f6\u5019\u68c0\u6d4b\uff0c\u5982\u679c\u7a7a\u95f2\u65f6\u95f4\u5927\u4e8etimeBetweenEvictionRunsMillis\uff0c\u6267\u884cvalidationQuery\u68c0\u6d4b\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002
+jdbc.testWhileIdle=true
+#1.Destroy\u7ebf\u7a0b\u4f1a\u68c0\u6d4b\u8fde\u63a5\u7684\u95f4\u9694\u65f6\u95f4
+#2.testWhileIdle\u7684\u5224\u65ad\u4f9d\u636e
+jdbc.timeBetweenEvictionRunsMillis=60000
+#\u4e00\u4e2a\u94fe\u63a5\u751f\u5b58\u7684\u65f6\u95f4\uff08\u4e4b\u524d\u7684\u503c\uff1a25200000\uff0c\u8fd9\u4e2a\u65f6\u95f4\u6709\u70b9BT\uff0c\u8fd9\u4e2a\u7ed3\u679c\u4e0d\u77e5\u9053\u662f\u600e\u4e48\u6765\u7684\uff0c\u6362\u7b97\u540e\u7684\u7ed3\u679c\u662f\uff1a25200000/1000/60/60 = 7\u4e2a\u5c0f\u65f6\uff09
+jdbc.minEvictableIdleTimeMillis=300000
+#\u94fe\u63a5\u4f7f\u7528\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u662f\u5426\u56de\u6536
+jdbc.removeAbandoned=true
+#\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u65f6\u95f4\uff08\u5355\u4f4d\u79d2\uff09\uff0c\u76ee\u524d\u4e3a5\u5206\u949f\uff0c\u5982\u679c\u6709\u4e1a\u52a1\u5904\u7406\u65f6\u95f4\u8d85\u8fc75\u5206\u949f\uff0c\u53ef\u4ee5\u9002\u5f53\u8c03\u6574\u3002
+jdbc.removeAbandonedTimeout=300
+#\u94fe\u63a5\u56de\u6536\u7684\u65f6\u5019\u63a7\u5236\u53f0\u6253\u5370\u4fe1\u606f\uff0c\u6d4b\u8bd5\u73af\u5883\u53ef\u4ee5\u52a0\u4e0atrue\uff0c\u7ebf\u4e0a\u73af\u5883false\u3002\u4f1a\u5f71\u54cd\u6027\u80fd\u3002
+jdbc.logAbandoned=true
+#\u7edf\u8ba1\u76d1\u63a7
+jdbc.filters=stat
+
+logging.level.com.kede=DEBUG
+
+jedis.host=localhost
+jedis.port=6379
+jedis.timeout=5000
+jedis.password=aft123456
+
+pwd.hash_algorithm_name=md5
+pwd.hash_iterations=2
+
+session.timeout=12000000
+session.validate.timespan=18000000
+
+app.name=AFT
+template.cacheable=false
+
+
+portal.host=//sf.jishutao.com/portal/2.0.6
+avatar.upload.host=//sb.jishutao.com/upload
+#连接开发
+static.host=//sb.jishutao.com/1.0.4
+avatar.host=//sb.jishutao.com
+
+#连生产
+#avatar.host=//static.kedexinxi.com
+#static.host=//s.kedexinxi.com/1.1.06
+
+upload.path=F:/data/public/upload
+upload.private.path=F:/data/private/upload
+
+accessKey=LTAIqTgQLLwz252Z
+accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9
+aesSecretKey=aft1234567890123
+
+mobileCodeTemplate=SMS_37845022
+mobileRemindCodeTemplate=SMS_137421952
+patentTemplate=SMS_72005286
+
+easemob.client.url=https://a1.easemob.com/1117170814115609/jitao
+easemob.client.id=YXA6RUDGkIDSEeemq9_4PWzcNA
+easemob.client.secret=YXA61NHE0renI5N8gEgizoI5ivM9SYE
+
+jiguang.appKey=dbcea43366e038073452a04e
+jiguang.masterSecret=59792298288e4f635c737def
+jiguang.pushUrl=https://api.jpush.cn/v3/push

+ 3 - 35
src/main/webapp/WEB-INF/views/common.html

@@ -11,13 +11,13 @@
 <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>
+<title>科德官网后台管理</title>
 <th:block th:replace="${link}" />
 <body>
 	<th:block th:fragment="nav(mainM,subM)">
 		<div class="container">
 			<div class="logo">
-				<a th:href="${basePath + '/portal/index.html'}"> <img th:src="${portalHost+'/img/Logo111.png'}" alt="" title="技淘" />
+				<a th:href="${basePath + '/portal/index.html'}"> <img th:src="${portalHost+'/img/Logo111.png'}" alt="" title="科德" />
 				</a>
 			</div>
 			<div class="logo_right"></div>
@@ -361,40 +361,8 @@
 		<script th:inline="javascript" th:if="${adminData!=null}">
 			/*<![CDATA[*/
 			window.adminData = {
-				mobile : /*[[${adminData.mobile}]]*/'',
+				account : /*[[${adminData.account}]]*/'',
 				name : /*[[${adminData.name}]]*/'',
-				email : /*[[${adminData.email}]]*/'',
-				createTime : /*[[${adminData.createTime}]]*/'',
-				uid : /*[[${adminData.id}]]*/'',
-				departmentId : /*[[${adminData.departmentId}]]*/'',
-				isSuperAdmin : /*[[${shiro.hasRole('999999')}]]*/false,
-				isApprovalDecision : /*[[${shiro.hasRole('99999')}]]*/false
-			}
-			window.showUserManage = /*[[${shiro.hasRole('999999') || shiro.isPermitted('admin/userManage')}]]*/false;
-			window.showServices = /*[[${shiro.hasRole('999999') || shiro.isPermitted('admin/services')}]]*/false;
-			window.showAchievement = /*[[${shiro.hasRole('999999') || shiro.isPermitted('admin/achievement')}]]*/false;
-			window.showDemand = /*[[${shiro.hasRole('999999') || shiro.isPermitted('admin/demand')}]]*/false;
-			window.showIdea = /*[[${shiro.hasRole('999999') || shiro.isPermitted('admin/idea')}]]*/false;
-			window.showCustomer = /*[[${shiro.hasRole('999999') || shiro.isPermitted('admin/customer')}]]*/false;
-			window.showUserList = /*[[${shiro.hasRole('999999') || shiro.isPermitted('api/admin/userList')}]]*/false;
-			window.showOrgList = /*[[${shiro.hasRole('999999') || shiro.isPermitted('api/admin/orgList')}]]*/false;
-			window.showPermissionList = /*[[${shiro.hasRole('999999') || shiro.isPermitted('api/admin/permissionList')}]]*/false;
-			window.showRoleList = /*[[${shiro.hasRole('999999') || shiro.isPermitted('api/admin/roleList')}]]*/false;
-			window.showAuditStatus = /*[[${shiro.hasRole('999999') || shiro.isPermitted('api/admin/auditStatus')}]]*/false;
-			window.showUserOrderList = /*[[${shiro.hasRole('999999') || shiro.isPermitted('admin/userOrder')}]]*/false;
-			window.showSystem = /*[[${shiro.hasRole('999999') || shiro.isPermitted('admin/system')}]]*/false;
-			/*]]>*/
-		</script>
-		<script th:inline="javascript" th:if="${userData!=null}">
-			/*<![CDATA[*/
-			window.userData = {
-				mobile : /*[[${userData.mobile}]]*/'',
-				nickname : /*[[${userData == null} ? null : ${userData.nickname}]]*/'',
-				number : /*[[${userData == null} ? null : ${userData.number}]]*/'',
-				type : /*[[${userData == null} ? null : ${userData.type}]]*/'',
-				email : /*[[${userData == null} ? null : ${userData.email}]]*/'',
-				createTime : /*[[${userData == null} ? null : ${userData.createTime}]]*/'',
-				lvl : /*[[${userData == null} ? null : ${userData.lvl}]]*/''
 			}
 			/*]]>*/
 		</script>

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

@@ -2,11 +2,11 @@
 <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{})">
-    <title>技淘--我的技术和科技服务交易平台</title>
+    <title>科德咨询有限公司</title>
 </head>
 <body>
 <p>错误信息:</p>
-<div th:if="${exception instanceOf T(com.goafanti.common.error.BusinessException)}">
+<div th:if="${exception instanceOf T(com.kede.common.error.BusinessException)}">
     <p th:text="${exception?.field}"></p>
     <p th:text="${exception?.message}"></p>
 </div>

+ 0 - 5
src/main/webapp/index.jsp

@@ -1,5 +0,0 @@
-<html>
-<body>
-<h2>Hello World!</h2>
-</body>
-</html>