Browse Source

first commit

刘韬 5 years ago
commit
b9534df569
24 changed files with 635 additions and 0 deletions
  1. 34 0
      PacsOnline_Wechat_Doctor/.classpath
  2. 37 0
      PacsOnline_Wechat_Doctor/.project
  3. 13 0
      PacsOnline_Wechat_Doctor/.settings/.jsdtscope
  4. 3 0
      PacsOnline_Wechat_Doctor/.settings/org.eclipse.core.resources.prefs
  5. 11 0
      PacsOnline_Wechat_Doctor/.settings/org.eclipse.jdt.core.prefs
  6. 4 0
      PacsOnline_Wechat_Doctor/.settings/org.eclipse.m2e.core.prefs
  7. 11 0
      PacsOnline_Wechat_Doctor/.settings/org.eclipse.wst.common.component
  8. 7 0
      PacsOnline_Wechat_Doctor/.settings/org.eclipse.wst.common.project.facet.core.xml
  9. 1 0
      PacsOnline_Wechat_Doctor/.settings/org.eclipse.wst.jsdt.ui.superType.container
  10. 1 0
      PacsOnline_Wechat_Doctor/.settings/org.eclipse.wst.jsdt.ui.superType.name
  11. 2 0
      PacsOnline_Wechat_Doctor/.settings/org.eclipse.wst.validation.prefs
  12. 0 0
      PacsOnline_Wechat_Doctor/README.md
  13. 95 0
      PacsOnline_Wechat_Doctor/pom.xml
  14. 154 0
      PacsOnline_Wechat_Doctor/src/main/java/com/zskk/common/ZskkConfig.java
  15. 102 0
      PacsOnline_Wechat_Doctor/src/main/java/com/zskk/controller/WxaUserApiController.java
  16. 15 0
      PacsOnline_Wechat_Doctor/src/main/resources/config.properties
  17. 19 0
      PacsOnline_Wechat_Doctor/src/main/webapp/WEB-INF/web.xml
  18. 5 0
      PacsOnline_Wechat_Doctor/src/main/webapp/index.jsp
  19. BIN
      PacsOnline_Wechat_Doctor/target/classes/com/zskk/common/ZskkConfig.class
  20. BIN
      PacsOnline_Wechat_Doctor/target/classes/com/zskk/controller/WxaUserApiController.class
  21. 15 0
      PacsOnline_Wechat_Doctor/target/classes/config.properties
  22. 4 0
      PacsOnline_Wechat_Doctor/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF
  23. 7 0
      PacsOnline_Wechat_Doctor/target/m2e-wtp/web-resources/META-INF/maven/com.zskk/PacsOnline_Wechat_Doctor/pom.properties
  24. 95 0
      PacsOnline_Wechat_Doctor/target/m2e-wtp/web-resources/META-INF/maven/com.zskk/PacsOnline_Wechat_Doctor/pom.xml

+ 34 - 0
PacsOnline_Wechat_Doctor/.classpath

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="test" value="true"/>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+		<attributes>
+			<attribute name="module" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

+ 37 - 0
PacsOnline_Wechat_Doctor/.project

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>PacsOnline_Wechat_Doctor</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+	</natures>
+</projectDescription>

+ 13 - 0
PacsOnline_Wechat_Doctor/.settings/.jsdtscope

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/webapp"/>
+	<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="target/m2e-wtp/web-resources"/>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+		<attributes>
+			<attribute name="hide" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+	<classpathentry kind="output" path=""/>
+</classpath>

+ 3 - 0
PacsOnline_Wechat_Doctor/.settings/org.eclipse.core.resources.prefs

@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+encoding//src/main/resources=UTF-8
+encoding/<project>=UTF-8

+ 11 - 0
PacsOnline_Wechat_Doctor/.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11

+ 4 - 0
PacsOnline_Wechat_Doctor/.settings/org.eclipse.m2e.core.prefs

@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1

+ 11 - 0
PacsOnline_Wechat_Doctor/.settings/org.eclipse.wst.common.component

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+    <wb-module deploy-name="wx_doctor">
+        <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
+        <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
+        <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="/WEB-INF/classes" source-path="/src/test/java"/>
+        <property name="java-output-path" value="/PacsOnline_Wechat_Doctor/target/classes"/>
+        <property name="context-root" value="wx_doctor"/>
+    </wb-module>
+</project-modules>

+ 7 - 0
PacsOnline_Wechat_Doctor/.settings/org.eclipse.wst.common.project.facet.core.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <fixed facet="wst.jsdt.web"/>
+  <installed facet="jst.web" version="4.0"/>
+  <installed facet="wst.jsdt.web" version="1.0"/>
+  <installed facet="java" version="11"/>
+</faceted-project>

+ 1 - 0
PacsOnline_Wechat_Doctor/.settings/org.eclipse.wst.jsdt.ui.superType.container

@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary

+ 1 - 0
PacsOnline_Wechat_Doctor/.settings/org.eclipse.wst.jsdt.ui.superType.name

@@ -0,0 +1 @@
+Window

+ 2 - 0
PacsOnline_Wechat_Doctor/.settings/org.eclipse.wst.validation.prefs

@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1

+ 0 - 0
PacsOnline_Wechat_Doctor/README.md


+ 95 - 0
PacsOnline_Wechat_Doctor/pom.xml

@@ -0,0 +1,95 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>com.zskk</groupId>
+  <artifactId>PacsOnline_Wechat_Doctor</artifactId>
+  <packaging>war</packaging>
+  <version>0.0.1-SNAPSHOT</version>
+  <name>PacsOnline_Wechat_Doctor</name>
+  <url>http://maven.apache.org</url>
+  
+  <properties>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<jdk.version>11</jdk.version>
+	</properties>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.junit.jupiter</groupId>
+			<artifactId>junit-jupiter-api</artifactId>
+			<version>5.6.0</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.jfinal</groupId>
+			<artifactId>jfinal-weixin</artifactId>
+			<version>2.4</version>
+		</dependency>
+		<dependency>
+			<groupId>com.jfinal</groupId>
+			<artifactId>jfinal</artifactId>
+			<version>4.8</version>
+		</dependency>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>druid</artifactId>
+			<version>1.1.21</version>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.17</version>
+		</dependency>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+			<version>1.2.62</version>
+		</dependency>
+		<dependency>
+			<groupId>com.squareup.okhttp3</groupId>
+			<artifactId>okhttp</artifactId>
+			<version>4.3.1</version>
+		</dependency>
+		<dependency>
+			<groupId>mysql</groupId>
+			<artifactId>mysql-connector-java</artifactId>
+			<version>8.0.19</version>
+		</dependency>
+		<dependency>
+			<groupId>redis.clients</groupId>
+			<artifactId>jedis</artifactId>
+			<version>2.10.2</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>javax.servlet-api</artifactId>
+			<version>4.0.1</version>
+			<scope>provided</scope>
+		</dependency>
+<!--  		<dependency>
+    <groupId>com.jfinal</groupId>
+    <artifactId>jetty-server</artifactId>
+    <version>2019.3</version>
+    <scope>provided</scope>
+</dependency> -->
+	</dependencies>
+
+	<build>
+		<finalName>wx_doctor</finalName>
+		<plugins>
+			<plugin>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>3.2.3</version>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.8.1</version>
+				<configuration>
+					<source>${jdk.version}</source>
+					<target>${jdk.version}</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>

+ 154 - 0
PacsOnline_Wechat_Doctor/src/main/java/com/zskk/common/ZskkConfig.java

@@ -0,0 +1,154 @@
+/**
+ * Copyright (c) 2017-2019, lt 北京中世康恺科技有限公司 (www.pacsonline.cn).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ */
+
+package com.zskk.common;
+
+import com.jfinal.config.Constants;
+import com.jfinal.config.Handlers;
+import com.jfinal.config.Interceptors;
+import com.jfinal.config.JFinalConfig;
+import com.jfinal.config.Plugins;
+import com.jfinal.config.Routes;
+import com.jfinal.kit.PropKit;
+import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
+import com.jfinal.plugin.druid.DruidPlugin;
+import com.jfinal.plugin.redis.RedisPlugin;
+import com.jfinal.plugin.redis.serializer.JdkSerializer;
+import com.jfinal.template.Engine;
+import com.jfinal.weixin.sdk.api.ApiConfig;
+import com.jfinal.weixin.sdk.api.ApiConfigKit;
+import com.jfinal.weixin.sdk.cache.RedisAccessTokenCache;
+import com.jfinal.wxaapp.WxaConfig;
+import com.jfinal.wxaapp.WxaConfigKit;
+
+
+public class ZskkConfig extends JFinalConfig {
+	// 本地开发模式
+	private boolean isLocalDev = false;
+
+	/**
+	 * 如果生产环境配置文件存在,则优先加载该配置,否则加载开发环境配置文件
+	 * 
+	 * @param pro 生产环境配置文件
+	 * @param dev 开发环境配置文件
+	 */
+	public void loadProp(String pro, String dev) {
+		try {
+			PropKit.use(pro);
+		} catch (Exception e) {
+			PropKit.use(dev);
+			isLocalDev = true;
+		}
+	}
+
+	public void configConstant(Constants me) {
+		loadProp("config.properties", "a_little_config.txt");
+		me.setDevMode(PropKit.getBoolean("devMode", false));
+
+		// ApiConfigKit 设为开发模式可以在开发阶段输出请求交互的 xml 与 json 数据
+		ApiConfigKit.setDevMode(me.getDevMode());
+	}
+
+	public void configRoute(Routes me) {
+		/**
+		 * jfinal 3.6 新添加的配置项,如果有控制器继承了 MsgController 就必须 要添加下面的配置,该配置才能将超类
+		 * MsgController 中的 index() 方法 映射为 action
+		 * 
+		 * 使用 jfinal 3.6 之前的版本不必理会这项配置
+		 */
+		me.setMappingSuperClass(true);
+
+	}
+
+	public void configPlugin(Plugins me) {
+
+		DruidPlugin druidPlugin = new DruidPlugin(PropKit.get("jdbcUrl"), PropKit.get("user"),
+				PropKit.get("password").trim());
+		me.add(druidPlugin);
+
+		ActiveRecordPlugin arp = new ActiveRecordPlugin(druidPlugin);
+		me.add(arp);
+
+		// 所有配置在 MappingKit 中搞定
+//		_MappingKit.mapping(arp);
+
+		// 使用redis分布accessToken
+		RedisPlugin redisPlugin = new RedisPlugin("weixin_doctor", "10.46.159.65", 6379, 2000, "Zskk_2019", 2);
+		redisPlugin.setSerializer(JdkSerializer.me); // 需要使用fst高性能序列化的用户请删除这一行(Fst jar依赖请查看WIKI)
+		me.add(redisPlugin);
+	}
+
+	public void configInterceptor(Interceptors me) {
+		// 设置默认的 appId 规则,默认值为appId,可采用url挂参数 ?appId=xxx 切换多公众号
+//         ApiInterceptor.setAppIdParser(new AppIdParser.DefaultParameterAppIdParser("appId")); 默认无需设置
+//         MsgInterceptor.setAppIdParser(new AppIdParser.DefaultParameterAppIdParser("appId")); 默认无需设置
+	}
+
+	public void configHandler(Handlers me) {
+
+	}
+
+	@Override
+	public void onStart() {
+		// TODO Auto-generated method stub
+		super.onStart();
+		// 支持redis存储access_token、js_ticket,需要先启动RedisPlugin
+		ApiConfigKit.setAccessTokenCache(new RedisAccessTokenCache("weixin_patient"));
+		// 中世康恺电子胶片平台
+		ApiConfig ac_zskk = new ApiConfig();
+		// 配置微信 API 相关参数
+		ac_zskk.setToken(PropKit.get("token_zskk"));
+		ac_zskk.setAppId(PropKit.get("appId_zskk"));
+		ac_zskk.setAppSecret(PropKit.get("appSecret_zskk"));
+
+		/**
+		 * 是否对消息进行加密,对应于微信平台的消息加解密方式: 1:true进行加密且必须配置 encodingAesKey
+		 * 2:false采用明文模式,同时也支持混合模式
+		 */
+		ac_zskk.setEncryptMessage(Boolean.FALSE);
+
+		/**
+		 * 多个公众号时,重复调用ApiConfigKit.putApiConfig(ac)依次添加即可,第一个添加的是默认。
+		 */
+		
+		ApiConfigKit.putApiConfig(ac_zskk);
+
+		WxaConfig wc = new WxaConfig();
+        wc.setAppId(PropKit.get("appId_xtzd"));
+        wc.setAppSecret(PropKit.get("appSecret_xtzd"));
+        WxaConfigKit.setWxaConfig(wc);
+
+		/**
+		 * 1.9 新增LocalTestTokenCache用于本地和线上同时使用一套appId时避免本地将线上AccessToken冲掉
+		 * 
+		 * 设计初衷:https://www.oschina.net/question/2702126_2237352
+		 * 
+		 * 注意: 1. 上线时应保证此处isLocalDev为false,或者注释掉该不分代码!
+		 * 
+		 * 2. 为了安全起见,此处可以自己添加密钥之类的参数,例如:
+		 * http://localhost/weixin/api/getToken?secret=xxxx
+		 * 然后在WeixinApiController#getToken()方法中判断secret
+		 * 
+		 * @see WeixinApiController#getToken()
+		 */
+//      if (isLocalDev) {
+//          String onLineTokenUrl = "http://localhost/weixin/api/getToken";
+//          ApiConfigKit.setAccessTokenCache(new LocalTestTokenCache(onLineTokenUrl));
+//      }
+//		ServiceFactory.init();
+
+	}
+
+
+//	public static void main(String[] args) {
+//		JFinal.start("src/main/webapp", 10000, "/", 5);
+//	}
+
+	@Override
+	public void configEngine(Engine engine) {
+
+	}
+}

+ 102 - 0
PacsOnline_Wechat_Doctor/src/main/java/com/zskk/controller/WxaUserApiController.java

@@ -0,0 +1,102 @@
+package com.zskk.controller;
+
+import com.jfinal.aop.Duang;
+import com.jfinal.kit.Kv;
+import com.jfinal.kit.StrKit;
+import com.jfinal.weixin.sdk.api.ApiConfigKit;
+import com.jfinal.weixin.sdk.api.ApiResult;
+import com.jfinal.weixin.sdk.cache.IAccessTokenCache;
+import com.jfinal.wxaapp.api.WxaUserApi;
+import com.jfinal.wxaapp.jfinal.WxaController;
+
+/**
+ * 微信小程序用户api接口
+ * @author L.cm
+ */
+public class WxaUserApiController extends WxaController {
+	/**
+	 * 登陆接口
+	 */
+	public void login() {
+		String jsCode = getPara("code");
+		if (StrKit.isBlank(jsCode)) {
+			Kv data = Kv.by("errcode", 500)
+					.set("errmsg", "code is blank");
+			renderJson(data);
+			return;
+		}
+		// 获取SessionKey
+		WxaUserApi wxaUserApi = Duang.duang(WxaUserApi.class);
+		ApiResult apiResult = wxaUserApi.getSessionKey(jsCode);
+		// 返回{"session_key":"nzoqhc3OnwHzeTxJs+inbQ==","expires_in":2592000,"openid":"oVBkZ0aYgDMDIywRdgPW8-joxXc4"}
+		if (!apiResult.isSucceed()) {
+			renderJson(apiResult.getJson());
+			return;
+		}
+		// 利用 appId 与 accessToken 建立关联,支持多账户
+		IAccessTokenCache accessTokenCache = ApiConfigKit.getAccessTokenCache();
+		String sessionId = StrKit.getRandomUUID();
+		
+		accessTokenCache.set("wxa:session:" + sessionId, apiResult.getJson());
+		renderJson("sessionId", sessionId);
+	}
+	
+	/**
+	 * 服务端解密用户信息接口
+	 * 获取unionId
+	 */
+	public void info() {
+		String signature = getPara("signature");
+		String rawData = getPara("rawData");
+		
+		String encryptedData = getPara("encryptedData");
+		String iv = getPara("iv");
+		
+		// 参数空校验 不做演示
+		// 利用 appId 与 accessToken 建立关联,支持多账户
+		IAccessTokenCache accessTokenCache = ApiConfigKit.getAccessTokenCache();
+		String sessionId = getHeader("wxa-sessionid");
+		if (StrKit.isBlank(sessionId)) {
+			Kv data = Kv.by("errcode", 500)
+					.set("errmsg", "wxa_session Header is blank");
+			renderJson(data);
+			return;
+		}
+		String sessionJson = accessTokenCache.get("wxa:session:" + sessionId);
+		if (StrKit.isBlank(sessionJson)) {
+			Kv data = Kv.by("errcode", 500)
+					.set("errmsg", "wxa_session sessionJson is blank");
+			renderJson(data);
+			return;
+		}
+		ApiResult sessionResult = ApiResult.create(sessionJson);
+		// 获取sessionKey
+		String sessionKey = sessionResult.get("session_key");
+		if (StrKit.isBlank(sessionKey)) {
+			Kv data = Kv.by("errcode", 500)
+					.set("errmsg", "sessionKey is blank");
+			renderJson(data);
+			return;
+		}
+		// 用户信息校验
+		WxaUserApi wxaUserApi = Duang.duang(WxaUserApi.class);
+		boolean check = wxaUserApi.checkUserInfo(sessionKey, rawData, signature);
+		if (!check) {
+			Kv data = Kv.by("errcode", 500)
+					.set("errmsg", "UserInfo check fail");
+			renderJson(data);
+			return;
+		}
+		// 服务端解密用户信息
+		ApiResult apiResult = wxaUserApi.getUserInfo(sessionKey, encryptedData, iv);
+		if (!apiResult.isSucceed()) {
+			renderJson(apiResult.getJson());
+			return;
+		}
+		// 如果开发者拥有多个移动应用、网站应用、和公众帐号(包括小程序),可通过unionid来区分用户的唯一性
+		// 同一用户,对同一个微信开放平台下的不同应用,unionid是相同的。
+		String unionId = apiResult.get("unionId");
+		renderJson("{}");
+	}
+
+}

+ 15 - 0
PacsOnline_Wechat_Doctor/src/main/resources/config.properties

@@ -0,0 +1,15 @@
+#Database
+jdbcUrl  = jdbc:mysql://10.46.2.149:3306/pacsonline_pro?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
+user     = pacs_pro
+password = Zskk@2019~!@#
+devMode  = true
+
+
+#Wechat-gzh
+appId_zskk    = wx6a54bf0e98ecd2c7
+appSecret_zskk= f4b4e2b054d84157565ace97a43275e8
+token_zskk    = zhongshikangkai2019
+
+#Wechat-xcx
+appId_xtzd    = wxa0eab5cd7048d3d9
+appSecret_xtzd= ebbb0daa3c71c4c82245038debc784cf

+ 19 - 0
PacsOnline_Wechat_Doctor/src/main/webapp/WEB-INF/web.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0">
+  <display-name>PacsOnline_Wechat_Patient</display-name>
+  <filter>
+    <filter-name>jfinal</filter-name>
+    <filter-class>com.jfinal.core.JFinalFilter</filter-class>
+    <init-param>
+      <param-name>configClass</param-name>
+      <param-value>com.zskk.common.ZskkConfig</param-value>
+    </init-param>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>jfinal</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+</web-app>
+
+

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

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

BIN
PacsOnline_Wechat_Doctor/target/classes/com/zskk/common/ZskkConfig.class


BIN
PacsOnline_Wechat_Doctor/target/classes/com/zskk/controller/WxaUserApiController.class


+ 15 - 0
PacsOnline_Wechat_Doctor/target/classes/config.properties

@@ -0,0 +1,15 @@
+#Database
+jdbcUrl  = jdbc:mysql://10.46.2.149:3306/pacsonline_pro?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
+user     = pacs_pro
+password = Zskk@2019~!@#
+devMode  = true
+
+
+#Wechat-gzh
+appId_zskk    = wx6a54bf0e98ecd2c7
+appSecret_zskk= f4b4e2b054d84157565ace97a43275e8
+token_zskk    = zhongshikangkai2019
+
+#Wechat-xcx
+appId_xtzd    = wxa0eab5cd7048d3d9
+appSecret_xtzd= ebbb0daa3c71c4c82245038debc784cf

+ 4 - 0
PacsOnline_Wechat_Doctor/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF

@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Build-Jdk-Spec: 11
+Created-By: Maven Integration for Eclipse
+

+ 7 - 0
PacsOnline_Wechat_Doctor/target/m2e-wtp/web-resources/META-INF/maven/com.zskk/PacsOnline_Wechat_Doctor/pom.properties

@@ -0,0 +1,7 @@
+#Generated by Maven Integration for Eclipse
+#Fri Feb 21 01:01:02 CST 2020
+m2e.projectLocation=/Users/liutao/Desktop/eclipse-workspace/PacsOnline_Wechat_Doctor
+m2e.projectName=PacsOnline_Wechat_Doctor
+groupId=com.zskk
+artifactId=PacsOnline_Wechat_Doctor
+version=0.0.1-SNAPSHOT

+ 95 - 0
PacsOnline_Wechat_Doctor/target/m2e-wtp/web-resources/META-INF/maven/com.zskk/PacsOnline_Wechat_Doctor/pom.xml

@@ -0,0 +1,95 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>com.zskk</groupId>
+  <artifactId>PacsOnline_Wechat_Doctor</artifactId>
+  <packaging>war</packaging>
+  <version>0.0.1-SNAPSHOT</version>
+  <name>PacsOnline_Wechat_Doctor</name>
+  <url>http://maven.apache.org</url>
+  
+  <properties>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<jdk.version>11</jdk.version>
+	</properties>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.junit.jupiter</groupId>
+			<artifactId>junit-jupiter-api</artifactId>
+			<version>5.6.0</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.jfinal</groupId>
+			<artifactId>jfinal-weixin</artifactId>
+			<version>2.4</version>
+		</dependency>
+		<dependency>
+			<groupId>com.jfinal</groupId>
+			<artifactId>jfinal</artifactId>
+			<version>4.8</version>
+		</dependency>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>druid</artifactId>
+			<version>1.1.21</version>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.17</version>
+		</dependency>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+			<version>1.2.62</version>
+		</dependency>
+		<dependency>
+			<groupId>com.squareup.okhttp3</groupId>
+			<artifactId>okhttp</artifactId>
+			<version>4.3.1</version>
+		</dependency>
+		<dependency>
+			<groupId>mysql</groupId>
+			<artifactId>mysql-connector-java</artifactId>
+			<version>8.0.19</version>
+		</dependency>
+		<dependency>
+			<groupId>redis.clients</groupId>
+			<artifactId>jedis</artifactId>
+			<version>2.10.2</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>javax.servlet-api</artifactId>
+			<version>4.0.1</version>
+			<scope>provided</scope>
+		</dependency>
+<!--  		<dependency>
+    <groupId>com.jfinal</groupId>
+    <artifactId>jetty-server</artifactId>
+    <version>2019.3</version>
+    <scope>provided</scope>
+</dependency> -->
+	</dependencies>
+
+	<build>
+		<finalName>wx_doctor</finalName>
+		<plugins>
+			<plugin>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>3.2.3</version>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.8.1</version>
+				<configuration>
+					<source>${jdk.version}</source>
+					<target>${jdk.version}</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>