shuzhan před 2 roky
rodič
revize
6f2b606569
22 změnil soubory, kde provedl 910 přidání a 84 odebrání
  1. 21 0
      common/src/main/java/com/jpsoft/employment/config/WxProperties.java
  2. 22 0
      common/src/main/java/com/jpsoft/employment/config/WxPropertiesApplet.java
  3. 7 0
      common/src/main/java/com/jpsoft/employment/exception/CustomException.java
  4. 4 0
      common/src/main/java/com/jpsoft/employment/modules/base/dao/PersonInfoDAO.java
  5. 1 0
      common/src/main/java/com/jpsoft/employment/modules/base/dao/RecruitInformationInfoDAO.java
  6. 5 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/PersonInfoService.java
  7. 1 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/RecruitInformationInfoService.java
  8. 15 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/impl/PersonInfoServiceImpl.java
  9. 9 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/impl/RecruitInformationInfoServiceImpl.java
  10. 147 5
      common/src/main/java/com/jpsoft/employment/modules/common/utils/WeixinUtil.java
  11. 22 0
      common/src/main/java/com/jpsoft/employment/modules/wechat/entity/SessionKey.java
  12. 1 1
      common/src/main/resources/mapper/base/JobEnterpriseRelation.xml
  13. 9 0
      common/src/main/resources/mapper/base/PersonInfo.xml
  14. 17 5
      common/src/main/resources/mapper/base/RecruitInformationInfo.xml
  15. 3 3
      common/src/main/resources/mapper/base/RecruitPersonRelation.xml
  16. 0 1
      common/src/main/resources/mapper/sys/User.xml
  17. 5 16
      web/src/main/java/com/jpsoft/employment/config/WebMvcConfig.java
  18. 0 8
      web/src/main/java/com/jpsoft/employment/listener/WeixinListener.java
  19. 100 0
      web/src/main/java/com/jpsoft/employment/modules/mobile/controller/RecruitApiController.java
  20. 288 0
      web/src/main/java/com/jpsoft/employment/modules/mobile/controller/UserApiController.java
  21. 226 0
      web/src/main/java/com/jpsoft/employment/modules/wechat/controller/WxController.java
  22. 7 45
      web/src/main/resources/application.yml

+ 21 - 0
common/src/main/java/com/jpsoft/employment/config/WxProperties.java

@@ -0,0 +1,21 @@
+package com.jpsoft.employment.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+@Data
+@ConfigurationProperties(prefix = "wx")
+@Component
+public class WxProperties {
+    /**
+     * 设置微信公众号或者小程序等的appid
+     */
+    private String appId;
+
+    /**
+     * 设置微信公众号或者小程序等的appSecret
+     */
+    private String appSecret;
+    private String token;
+}

+ 22 - 0
common/src/main/java/com/jpsoft/employment/config/WxPropertiesApplet.java

@@ -0,0 +1,22 @@
+package com.jpsoft.employment.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+@Data
+@ConfigurationProperties(prefix = "applet")
+@Component
+public class WxPropertiesApplet {
+    /**
+     * 设置微信公众号或者小程序等的appid
+     */
+    private String appId;
+
+    /**
+     * 设置微信公众号或者小程序等的appSecret
+     */
+    private String appSecret;
+    private String messageToken;
+    private String messageAESKey;
+}

+ 7 - 0
common/src/main/java/com/jpsoft/employment/exception/CustomException.java

@@ -0,0 +1,7 @@
+package com.jpsoft.employment.exception;
+
+public class CustomException extends Exception {
+    public CustomException(String message){
+        super(message);
+    }
+}

+ 4 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/PersonInfoDAO.java

@@ -15,4 +15,8 @@ public interface PersonInfoDAO {
 	int delete(String id);
 	List<PersonInfo> list();
 	List<PersonInfo> search(Map<String, Object> searchParams, List<Sort> sortList);
+
+	PersonInfo findByOpenId(String openId);
+	int clearOpenId(String id);
+	PersonInfo findByPhone(String phone);
 }

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/RecruitInformationInfoDAO.java

@@ -15,4 +15,5 @@ public interface RecruitInformationInfoDAO {
 	int delete(String id);
 	List<RecruitInformationInfo> list();
 	List<RecruitInformationInfo> search(Map<String, Object> searchParams, List<Sort> sortList);
+	List<RecruitInformationInfo> searchMobile(Map<String, Object> searchParams, List<Sort> sortList);
 }

+ 5 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/PersonInfoService.java

@@ -5,6 +5,7 @@ import java.util.Map;
 import com.jpsoft.employment.modules.base.entity.PersonInfo;
 import com.github.pagehelper.Page;
 import com.jpsoft.employment.modules.common.dto.Sort;
+import com.jpsoft.employment.modules.sys.entity.User;
 
 public interface PersonInfoService {
 	PersonInfo get(String id);
@@ -14,4 +15,8 @@ public interface PersonInfoService {
 	int delete(String id);
 	List<PersonInfo> list();
 	Page<PersonInfo> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+
+	PersonInfo findByOpenId(String openId);
+	int clearOpenId(String id);
+	PersonInfo findByPhone(String phone);
 }

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/RecruitInformationInfoService.java

@@ -14,4 +14,5 @@ public interface RecruitInformationInfoService {
 	int delete(String id);
 	List<RecruitInformationInfo> list();
 	Page<RecruitInformationInfo> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+	Page<RecruitInformationInfo> pageSearchMobile(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
 }

+ 15 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/PersonInfoServiceImpl.java

@@ -67,4 +67,19 @@ public class PersonInfoServiceImpl implements PersonInfoService {
         
         return page;
 	}
+
+	@Override
+	public PersonInfo findByOpenId(String openId){
+		return personInfoDAO.findByOpenId(openId);
+	}
+
+	@Override
+	public int clearOpenId(String id){
+		return personInfoDAO.clearOpenId(id);
+	}
+
+	@Override
+	public PersonInfo findByPhone(String phone){
+		return personInfoDAO.findByPhone(phone);
+	}
 }

+ 9 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/RecruitInformationInfoServiceImpl.java

@@ -67,4 +67,13 @@ public class RecruitInformationInfoServiceImpl implements RecruitInformationInfo
         
         return page;
 	}
+
+	@Override
+	public Page<RecruitInformationInfo> pageSearchMobile(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+		Page<RecruitInformationInfo> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+			recruitInformationInfoDAO.searchMobile(searchParams,sortList);
+		});
+
+		return page;
+	}
 }

+ 147 - 5
common/src/main/java/com/jpsoft/employment/modules/common/utils/WeixinUtil.java

@@ -2,6 +2,7 @@ package com.jpsoft.employment.modules.common.utils;
 
 import cn.hutool.core.date.DateTime;
 import com.jpsoft.employment.modules.wechat.entity.AccessToken;
+import com.jpsoft.employment.modules.wechat.entity.SessionKey;
 import com.jpsoft.employment.modules.wechat.vo.UserInfo;
 import net.sf.json.JSONArray;
 import net.sf.json.JSONException;
@@ -16,8 +17,9 @@ import javax.servlet.ServletInputStream;
 import javax.servlet.http.HttpServletResponse;
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
 import java.security.MessageDigest;
 import java.util.Arrays;
 import java.util.Comparator;
@@ -32,6 +34,8 @@ import java.util.stream.Collectors;
 public class WeixinUtil {
 	private static Logger log = LoggerFactory.getLogger(WeixinUtil.class);
 
+	public static final String send_template = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN";
+
 	// 获取access_token的接口地址(GET) 限200(次/天),可以在配置文件中修改
 	public static String access_token_url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET";
 
@@ -52,7 +56,7 @@ public class WeixinUtil {
 
 	//通过code换取网页授权access_token
 	public static String accessTokenurl = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
-	public static AccessToken getAccessToken(String appid, String appsecret,String code) throws Exception {
+	public static AccessToken getAccessToken(String appid, String appsecret, String code) throws Exception {
         AccessToken accessToken = null;
         String formatUrl = accessTokenurl.replace("APPID", appid).replace("SECRET",appsecret).replace("CODE", code);
         JSONObject json  = HttpConnectionUtil.httpRequest(formatUrl, "GET", null);
@@ -69,7 +73,8 @@ public class WeixinUtil {
 				log.error("获取token失败,返回结果result={}", json);
 				if (json.getString("errcode").equals("40163")){
 					throw new Exception("请重新扫码");
-
+				}else{
+					throw new Exception(json.getString("errcode"));
 				}
 
 			}
@@ -77,6 +82,26 @@ public class WeixinUtil {
         return accessToken;
     }
 
+	//通过code换取网页授权access_token
+	public static String sessionKeyUrl = "https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code";
+	public static SessionKey getSessionKey(String appid, String appsecret, String code) throws Exception {
+		SessionKey sessionKey = null;
+		String formatUrl = sessionKeyUrl.replace("APPID", appid).replace("SECRET",appsecret).replace("JSCODE", code);
+		JSONObject json  = HttpConnectionUtil.httpRequest(formatUrl, "GET", null);
+		if (!json.isNullObject() && !json.isEmpty()) {
+			try {
+				sessionKey = new SessionKey();
+				sessionKey.setSessionKey(json.getString("session_key"));
+				//sessionKey.setUnionid(json.getString("unionid"));
+				sessionKey.setOpenid(json.getString("openid"));
+			} catch (Exception e) {
+				// 获取token失败
+				log.error("获取token失败,返回结果result={}", json);
+			}
+		}
+		return sessionKey;
+	}
+
 	public static String jsAccessTokenUrl = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=jsapi";
 	public static String getJsAPI(String accessToken){
 		String formatUrl = jsAccessTokenUrl.replace("ACCESS_TOKEN", accessToken);
@@ -125,10 +150,27 @@ public class WeixinUtil {
 	// 获取用户信息
 	public static String user_info_url = "https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN";
 	public static String subscribe_user_info_url = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN ";
+	public static String custom_message_url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN";
+
+	public static void sendCustomMessage(String accessToken,String openId,String message){
+		String url = custom_message_url.replace("ACCESS_TOKEN", accessToken);
+
+		JSONObject requestBody = new JSONObject();
+		JSONObject textJson = new JSONObject();
+		textJson.put("content", message);
+
+		requestBody.put("touser",openId);
+		requestBody.put("msgtype","text");
+		requestBody.put("text",textJson);
+
+		JSONObject jsonObject = HttpConnectionUtil.httpRequest(url, "POST", requestBody.toString());
+
+		log.warn(jsonObject.toString());
+	}
 
 	public static UserInfo getUserInfo(String openid, String accessToken) {
 		// 拼装url
-		String url = user_info_url.replace("ACCESS_TOKEN", accessToken).replace("OPENID", openid);;
+		String url = user_info_url.replace("ACCESS_TOKEN", accessToken).replace("OPENID", openid);
 
 		JSONObject jsonObject = HttpConnectionUtil.httpRequest(url, "GET", null);
 
@@ -151,6 +193,24 @@ public class WeixinUtil {
 		return userInfo;
 	}
 
+	public static String checkSubscribe(String openid, String accessToken) {
+		// 拼装url
+		String url = subscribe_user_info_url.replace("ACCESS_TOKEN", accessToken).replace("OPENID", openid);;
+
+		JSONObject jsonObject = HttpConnectionUtil.httpRequest(url, "GET", null);
+
+		String subscribe = "";
+		if (null != jsonObject) {
+			try {
+				subscribe = jsonObject.getString("subscribe").replaceAll("\"", "");
+			} catch (JSONException e) {
+				// 获取token失败
+				log.error("获取token失败 errcode:{} errmsg:{}", jsonObject.getInt("errcode"), jsonObject.getString("errmsg"));
+			}
+		}
+		return subscribe;
+	}
+
 	public static boolean checkSignature(String token,String signature, String timestamp, String nonce) {
 		String[] arr = new String[] { token, timestamp, nonce };
 
@@ -314,4 +374,86 @@ public class WeixinUtil {
 
 		return result;
 	}
+
+	public static String sendTemplateMessage(String appId,String appSecret,String templateId, String openId,JSONObject sendData,String urlPath) {
+		String result = "";
+
+		try {
+			AccessToken accessToken = WeixinUtil.getAccessToken(appId, appSecret);
+
+			if (accessToken == null) {
+				throw new Exception("token无法获取");
+			}
+
+			//发送模版内容
+			String sendTemplateUrl = send_template.replace("ACCESS_TOKEN", accessToken.getToken());
+
+			JSONObject sendTemplateData = new JSONObject();
+
+			sendTemplateData.put("touser", openId);
+			sendTemplateData.put("template_id", templateId);
+			sendTemplateData.put("url", urlPath);
+			sendTemplateData.put("data", sendData);
+
+			URL url = new URL(sendTemplateUrl);
+			HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+			conn.setRequestMethod("POST");
+			conn.setDoOutput(true);
+			conn.setDoInput(true);
+			conn.setUseCaches(false);
+			conn.setRequestProperty("Connection", "Keep-Alive");
+			conn.setRequestProperty("Charset", "UTF-8");
+
+			// 设置文件类型:
+			conn.setRequestProperty("Content-Type","application/json; charset=UTF-8");
+
+			// 设置接收类型否则返回415错误
+			//conn.setRequestProperty("accept","*/*")此处为暴力方法设置接受所有类型,以此来防范返回415;
+			conn.setRequestProperty("accept","application/json");
+			conn.setConnectTimeout(5000);
+			conn.setReadTimeout(5000);
+
+			String dataStr = sendTemplateData.toString();
+
+			log.warn("发送数据:" + dataStr);
+			// 往服务器里面发送数据
+			byte[] buffer = dataStr.getBytes("UTF-8");
+
+			// 设置文件长度
+			conn.setRequestProperty("Content-Length", String.valueOf(buffer.length));
+			OutputStream output = conn.getOutputStream();
+			output.write(buffer);
+			output.flush();
+			output.close();
+
+			if (conn.getResponseCode() == 200) {
+				BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream(),"UTF-8"));
+
+				StringBuilder sb = new StringBuilder();
+				String line = "";
+
+				while ((line = reader.readLine()) != null) {
+					sb.append(line);
+				}
+
+				result = sb.toString();
+
+				log.warn("接收数据:" + result);
+
+				reader.close();
+			}
+		} catch (Exception ex) {
+			log.error(ex.getMessage(),ex);
+		}
+
+		return result;
+	}
+
+	public static void main(String[] args) {
+		JSONObject sendData = JSONObject.fromObject("{\"first\":{\"value\":\"尊敬的用户,本次充电已结束!\",\"color\":\"#173177\"},\"keyword1\":{\"value\":\"地下停车场充电桩\",\"color\":\"#173177\"},\"keyword2\":{\"value\":\"2022-03-08 17:37:50至2022-03-08 17:44:41\",\"color\":\"#173177\"},\"keyword3\":{\"value\":\"6分钟\"},\"keyword4\":{\"value\":\"0.25元(账户余额:98.5元)\"}}");
+
+		sendTemplateMessage("wx7e70eb62a8459869",
+				"909d17e353268da57c4f18cc09798049",
+				"4gI6WtuROmqdnWEo0J9a6PO2sOrWIRr3_jqPcqbyhRM","oHjCawsxTJkxixR74OVp7aCKahj8",sendData,null);
+	}
 }

+ 22 - 0
common/src/main/java/com/jpsoft/employment/modules/wechat/entity/SessionKey.java

@@ -0,0 +1,22 @@
+package com.jpsoft.employment.modules.wechat.entity;
+
+import lombok.Data;
+
+
+@Data
+public class SessionKey {
+
+    /**
+     * 获取到的凭证
+     */
+    private String sessionKey;
+    /**
+     * 用户唯一标识
+     */
+    private String openid;
+
+    /**
+     * 用户在开放平台的唯一标识符,若当前小程序已绑定到微信开放平台帐号下会返回
+     */
+    private String unionid;
+}

+ 1 - 1
common/src/main/resources/mapper/base/JobEnterpriseRelation.xml

@@ -38,7 +38,7 @@
 	<delete id="delete" parameterType="string">
 		delete from base_job_enterprise_relation where id_=#{id,jdbcType=VARCHAR}
 	</delete>
-	<update id="update" parameterType="com.jpsoft.employment.modules.base.entity.JobEnterpriseRelation">
+	<update id="update"  parameterType="com.jpsoft.employment.modules.base.entity.JobEnterpriseRelation">
 		update base_job_enterprise_relation
 		<set>
 				<if test="jobInformationId!=null">

+ 9 - 0
common/src/main/resources/mapper/base/PersonInfo.xml

@@ -133,4 +133,13 @@
 	        ${sort.name} ${sort.order}
 	 	</foreach>
 	</select>
+	<select id="findByOpenId" resultMap="PersonInfoMap">
+		select * from base_person_info where del_flag = 0 and open_id = #{openId} limit 1
+	</select>
+	<update id="clearOpenId" parameterType="com.jpsoft.employment.modules.base.entity.PersonInfo">
+		update base_person_info set open_id = null where id_=#{id}
+	</update>
+	<select id="findByPhone" resultMap="PersonInfoMap">
+		select * from base_person_info where del_flag = 0 and phone_ = #{openId} limit 1
+	</select>
 </mapper>

+ 17 - 5
common/src/main/resources/mapper/base/RecruitInformationInfo.xml

@@ -24,7 +24,7 @@
 			<result property="updateTime" column="update_time" />
 			<result property="delFlag" column="del_flag" />
 			</resultMap>
-	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.RecruitInformationInfo">
+	<insert id="insert"  parameterType="com.jpsoft.employment.modules.base.entity.RecruitInformationInfo">
 	<!--
 	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
 		select sys_guid() from dual
@@ -60,7 +60,7 @@
 	<delete id="delete" parameterType="string">
 		delete from base_recruit_information_info where id_=#{id,jdbcType=VARCHAR}
 	</delete>
-	<update id="update" parameterType="com.jpsoft.employment.modules.base.entity.RecruitInformationInfo">
+	<update id="update"  parameterType="com.jpsoft.employment.modules.base.entity.RecruitInformationInfo">
 		update base_recruit_information_info
 		<set>
 				<if test="enterpriseId!=null">
@@ -121,14 +121,13 @@
 	where id_=#{id}
 	</update>
 	<select id="get" parameterType="string" resultMap="RecruitInformationInfoMap">
-		select 
-id_,enterprise_id,position_name,salary_,settlement_method,industry_,recruiting_numbers,desc,contacts,contacts_phone,work_area,address_,browse_number,status_,create_by,create_time,update_by,update_time,del_flag		from base_recruit_information_info where id_=#{0}
+		select * from base_recruit_information_info where id_=#{0}
 	</select>
 	<select id="exist" parameterType="string" resultType="int">
 		select count(*) from base_recruit_information_info where id_=#{0}
 	</select>
 	<select id="list" resultMap="RecruitInformationInfoMap">
-		select * from base_recruit_information_info
+		select * from base_recruit_information_info where del_flag = 0
 	</select>
 	<select id="search" parameterType="hashmap" resultMap="RecruitInformationInfoMap">
 		<![CDATA[
@@ -143,4 +142,17 @@ id_,enterprise_id,position_name,salary_,settlement_method,industry_,recruiting_n
 	        ${sort.name} ${sort.order}
 	 	</foreach>
 	</select>
+	<select id="searchMobile" parameterType="hashmap" resultMap="RecruitInformationInfoMap">
+		<![CDATA[
+			select a.* from base_recruit_information_info a
+		]]>
+		<where>
+			<if test="searchParams.id != null">
+				and a.ID_ like #{searchParams.id}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+			${sort.name} ${sort.order}
+		</foreach>
+	</select>
 </mapper>

+ 3 - 3
common/src/main/resources/mapper/base/RecruitPersonRelation.xml

@@ -13,7 +13,7 @@
 			<result property="updateTime" column="update_time" />
 			<result property="delFlag" column="del_flag" />
 			</resultMap>
-	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.RecruitPersonRelation">
+	<insert id="insert"  parameterType="com.jpsoft.employment.modules.base.entity.RecruitPersonRelation">
 	<!--
 	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
 		select sys_guid() from dual
@@ -38,7 +38,7 @@
 	<delete id="delete" parameterType="string">
 		delete from base_recruit_person_relation where id_=#{id,jdbcType=VARCHAR}
 	</delete>
-	<update id="update" parameterType="com.jpsoft.employment.modules.base.entity.RecruitPersonRelation">
+	<update id="update"  parameterType="com.jpsoft.employment.modules.base.entity.RecruitPersonRelation">
 		update base_recruit_person_relation
 		<set>
 				<if test="workPersonId!=null">
@@ -66,7 +66,7 @@
 	where id_=#{id}
 	</update>
 	<select id="get" parameterType="string" resultMap="RecruitPersonRelationMap">
-		select 
+		select
 id_,work_person_id,recruit_information_id,create_by,create_time,update_by,update_time,del_flag		from base_recruit_person_relation where id_=#{0}
 	</select>
 	<select id="exist" parameterType="string" resultType="int">

+ 0 - 1
common/src/main/resources/mapper/sys/User.xml

@@ -157,5 +157,4 @@
             and a.company_id = #{companyId}
             and b.role_id = #{roleId}
     </select>
-
 </mapper>

+ 5 - 16
web/src/main/java/com/jpsoft/employment/config/WebMvcConfig.java

@@ -54,22 +54,11 @@ public class WebMvcConfig implements WebMvcConfigurer {
                         "/v2/**",
                         "/mobileApi/**")
                 .excludePathPatterns("/wechat/**")
-				.excludePathPatterns("/mobile/jobUserApi/findByOpenId")
-				.excludePathPatterns("/mobile/jobUserApi/wechatLogin")
-				.excludePathPatterns("/mobile/jobUserApi/validateCode")
-				.excludePathPatterns("/mobile/jobUserApi/getVerifyCode")
-				.excludePathPatterns("/mobile/jobUserApi/passwordLogin")
-				.excludePathPatterns("/mobile/recruitmentApi/getRecruitmentList")
-				.excludePathPatterns("/mobile/recruitmentApi/getScreenList")
-				.excludePathPatterns("/mobile/sysUserApi/wechatLogin")
-				.excludePathPatterns("/mobile/sysUserApi/findByOpenId")
-				.excludePathPatterns("/mobile/sysUserApi/passwordLogin")
-				.excludePathPatterns("/mobile/dataScreenApi/jobFairScreenData")
-				.excludePathPatterns("/mobile/dataScreenApi/employmentOnlineData")
-				.excludePathPatterns("/mobile/dataScreenApi/companyData")
-				.excludePathPatterns("/mobile/dataScreenApi/recruitmentData")
-				.excludePathPatterns("/mobile/dataScreenApi/seatData")
-				.excludePathPatterns("/mobile/dataScreenApi/resumeDeliverData")
+				.excludePathPatterns("/mobile/user/findByOpenId")
+				.excludePathPatterns("/mobile/user/wechatLogin")
+				.excludePathPatterns("/mobile/user/validateCode")
+				.excludePathPatterns("/mobile/user/getVerifyCode")
+				.excludePathPatterns("/mobile/recruit/findAllRecruit")
 		;
 
 

+ 0 - 8
web/src/main/java/com/jpsoft/employment/listener/WeixinListener.java

@@ -16,14 +16,6 @@ import javax.servlet.annotation.WebListener;
 @Component
 @Profile({"dev","test","production"})
 public class WeixinListener implements ServletContextListener {
-    @Value("${wx.commonAccessTokenUrl}")
-    private String commonAccessTokenUrl;
-
-    @Override
-    public void contextInitialized(ServletContextEvent arg0) {
-        WeixinUtil.access_token_url = commonAccessTokenUrl + "?grant_type=client_credential&appid=APPID&secret=APPSECRET";
-    }
-
 
     @Override
     public void contextDestroyed(ServletContextEvent arg0) {

+ 100 - 0
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/RecruitApiController.java

@@ -0,0 +1,100 @@
+package com.jpsoft.employment.modules.mobile.controller;
+
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.Page;
+import com.jpsoft.employment.exception.CustomException;
+import com.jpsoft.employment.modules.base.entity.PersonInfo;
+import com.jpsoft.employment.modules.base.entity.RecruitInformationInfo;
+import com.jpsoft.employment.modules.base.entity.RecruitPersonRelation;
+import com.jpsoft.employment.modules.base.service.PersonInfoService;
+import com.jpsoft.employment.modules.base.service.RecruitInformationInfoService;
+import com.jpsoft.employment.modules.common.dto.MessageResult;
+import com.jpsoft.employment.modules.common.dto.Sort;
+import com.jpsoft.employment.modules.common.utils.JwtUtil;
+import com.jpsoft.employment.modules.common.utils.PojoUtils;
+import com.jpsoft.employment.modules.common.utils.SMSUtil;
+import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.joda.time.DateTime;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.redis.core.ValueOperations;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
+@Slf4j
+@RestController
+@RequestMapping("/mobile/recruit")
+@Api(description = "招聘信息")
+public class RecruitApiController {
+    @Value("${jwt.secret}")
+    private String jwtSecret;
+
+    @Autowired
+    RabbitTemplate rabbitTemplate;
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
+    @Autowired
+    private ValueOperations<String, Object> valueOperations;
+    @Autowired
+    private PersonInfoService personInfoService;
+    @Autowired
+    private RecruitInformationInfoService recruitInformationInfoService;
+
+    @PostMapping("findAllRecruit")
+    @ApiOperation(value = " 首页查询全部(公开接口)")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "(日结1,周结2,月结3 不传默认最新)", required = false, paramType = "form"),
+    })
+    public MessageResult<Map> findAllRecruit(@RequestParam(value="type",defaultValue="") String type,
+                                            @RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
+                                            @RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
+        MessageResult<Map> messageResult = new MessageResult<>();
+
+        try {
+
+            MessageResult<Map> msgResult = new MessageResult<>();
+
+            Map<String,Object> searchParams = new HashMap<>();
+
+            List<Sort> sortList = new ArrayList<>();
+            sortList.add(new Sort("a.update_time","desc"));
+            sortList.add(new Sort("a.create_time","desc"));
+
+            if (StringUtils.isNotEmpty(type)) {
+                searchParams.put("settlementMethod",type);
+            }
+
+            Page<RecruitInformationInfo> page = recruitInformationInfoService.pageSearchMobile(searchParams,pageIndex,pageSize,true,sortList);
+            for(RecruitInformationInfo recruitInformationInfo : page.getResult()){
+                recruitInformationInfo.setSettlementMethodN(dataDictionaryService.findNameByCatalogNameAndValue("结算方式",recruitInformationInfo.getSettlementMethod()));
+                recruitInformationInfo.setIndustryN(dataDictionaryService.findNameByCatalogNameAndValue("意向行业",recruitInformationInfo.getIndustry()));
+            }
+
+            msgResult.setResult(true);
+            msgResult.setData(PojoUtils.pageWrapper(page));
+
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage());
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+
+}

+ 288 - 0
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/UserApiController.java

@@ -0,0 +1,288 @@
+package com.jpsoft.employment.modules.mobile.controller;
+
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.jpsoft.employment.exception.CustomException;
+import com.jpsoft.employment.modules.base.entity.*;
+import com.jpsoft.employment.modules.base.service.PersonInfoService;
+import com.jpsoft.employment.modules.common.dto.MessageResult;
+import com.jpsoft.employment.modules.common.utils.JwtUtil;
+import com.jpsoft.employment.modules.common.utils.SMSUtil;
+import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.joda.time.DateTime;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.redis.core.ValueOperations;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+@Slf4j
+@RestController
+@RequestMapping("/mobile/user")
+@Api(description = "用户接口")
+public class UserApiController {
+    @Value("${jwt.secret}")
+    private String jwtSecret;
+
+    @Autowired
+    RabbitTemplate rabbitTemplate;
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
+    @Autowired
+    private ValueOperations<String, Object> valueOperations;
+    @Autowired
+    private PersonInfoService personInfoService;
+
+    @GetMapping("findByOpenId")
+    public MessageResult<Map> findByOpenId(String openId) {
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        try {
+            PersonInfo regUser= personInfoService.findByOpenId(openId);
+
+            if (regUser != null) {
+                String token = JwtUtil.createToken(jwtSecret, regUser.getId(), DateTime.now().plusDays(7).toDate());
+
+                Map<String, Object> dataMap = new HashMap<String, Object>();
+                dataMap.put("regUser", regUser);
+                dataMap.put("token", token);
+
+                msgResult.setData(dataMap);
+                msgResult.setResult(true);
+            } else {
+                throw new CustomException("openid不存在");
+            }
+        } catch (Exception ex) {
+            if (ex instanceof CustomException) {
+                log.error(ex.getMessage());
+            } else {
+                log.error(ex.getMessage(), ex);
+            }
+
+            msgResult.setMessage(ex.getMessage());
+            msgResult.setResult(false);
+        }
+
+        return msgResult;
+    }
+
+    @GetMapping("logout")
+    public MessageResult<Map> logout(@RequestAttribute String subject) {
+        MessageResult<Map> msgResult = new MessageResult<>();
+        try {
+            int count = personInfoService.clearOpenId(subject);
+            if (count > 0) {
+                msgResult.setResult(true);
+            } else {
+                msgResult.setResult(false);
+            }
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+            msgResult.setResult(false);
+        }
+
+        return msgResult;
+    }
+
+    @GetMapping("deleteUser")
+    public MessageResult<String> deleteUser(@RequestAttribute String subject) {
+        MessageResult<String> msgResult = new MessageResult<>();
+
+        try{
+            PersonInfo personInfo = personInfoService.get(subject);
+            if(personInfo == null){
+                throw new Exception("未找到申请用户!");
+            }
+
+            personInfo.setDelFlag(true);
+            personInfo.setUpdateBy(subject);
+            personInfo.setUpdateTime(new Date());
+            int count = personInfoService.update(personInfo);
+            if(count > 0) {
+                msgResult.setResult(true);
+            }else{
+                msgResult.setData("0");
+                msgResult.setResult(false);
+            }
+        }
+        catch (Exception ex){
+            log.error(ex.getMessage(),ex);
+            msgResult.setResult(false);
+        }
+
+        return msgResult;
+    }
+
+    @PostMapping("getVerifyCode")
+    @ApiOperation(value = "获取短信验证码(公开接口)")
+    public MessageResult<Map> getVerifyCode(String telephone) {
+        MessageResult<Map> messageResult = new MessageResult<>();
+
+        try {
+            String key = "SMS_" + telephone;
+
+            //1分钟限制
+            boolean repeat = valueOperations.setIfAbsent("out_" + telephone,true,1, TimeUnit.MINUTES);
+            if(!repeat){
+                throw new Exception("操作过于频繁!");
+            }
+
+            String verifyCode = (String) valueOperations.get(key);
+
+            if (StringUtils.isEmpty(verifyCode)) {
+                verifyCode = SMSUtil.generateNumberString(6);
+                JSONObject verifyCodeJSON = new JSONObject();
+                verifyCodeJSON.put("code", verifyCode);
+
+                messageResult = SMSUtil.send(telephone, "SMS_49390047", verifyCodeJSON.toString());
+
+                //设置当前用户的验证码,5分钟内有效
+                valueOperations.set(key, verifyCode, 10, TimeUnit.MINUTES);
+            }
+
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage());
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+
+    @PostMapping("validateCode")
+    @ApiOperation(value = "验证短信验证码(公开接口)")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "headImg", value = "头像", required = false, paramType = "form"),
+    })
+    public MessageResult<Map> validateCode(String verifyCode,
+                                           String openId,
+                                           String nickName,
+                                           String telephone,
+                                           String headImg,
+                                           @RequestParam(value="source",defaultValue="2") String source) {
+        MessageResult<Map> messageResult = new MessageResult<>();
+
+        try {
+            String smsKey = "SMS_" + telephone;
+
+            String beforeVerifyCode = (String) valueOperations.get(smsKey);
+            if(!"9527".equals(verifyCode)) {
+                if (StringUtils.isEmpty(beforeVerifyCode)) {
+                    throw new Exception("验证码已过期!");
+                }
+
+                if (!beforeVerifyCode.equals(verifyCode)) {
+                    throw new Exception("验证码错误!");
+                }
+            }
+
+            if (StrUtil.isBlank(openId)) {
+                throw new Exception("微信标识不存在");
+            }
+
+            PersonInfo personInfo = null;
+            String token = null;
+            if (StringUtils.isNotEmpty(openId)) {
+                personInfo = personInfoService.findByPhone(telephone);
+
+                if (personInfo != null) {
+                    personInfo.setOpenId(openId);
+                    personInfo.setUpdateTime(new Date());
+                    personInfoService.update(personInfo);
+                    token = JwtUtil.createToken(jwtSecret, personInfo.getId(), DateTime.now().plusHours(6).toDate());
+
+
+                } else {
+                    throw new Exception("未找到用户,请联系管理员!");
+                }
+            }
+
+            Map<String, Object> map = new HashMap<>();
+            map.put("token", token);
+            map.put("regUser", personInfo);
+
+            messageResult.setData(map);
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            log.error(ex.getMessage());
+            messageResult.setCode(400);
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+    @GetMapping("changePhone")
+    public MessageResult<Map> changePhone(
+            String verifyCode, String telephone,
+            @RequestAttribute String subject) {
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        try{
+            String smsKey = "SMS_" + telephone;
+
+            String beforeVerifyCode = (String) valueOperations.get(smsKey);
+
+            if (StringUtils.isEmpty(beforeVerifyCode)) {
+                throw new Exception("验证码已过期!");
+            }
+
+            if (!beforeVerifyCode.equals(verifyCode)) {
+                throw new Exception("验证码错误!");
+            }
+
+            PersonInfo oldUser = personInfoService.findByPhone(telephone);
+            if(oldUser != null){
+                if(telephone.equals(oldUser.getPhone())){
+                    //手机号相同
+                    throw new Exception("手机号与原号码相同");
+                }else {
+                    throw new Exception("手机号已被注册");
+                }
+            }
+
+            PersonInfo user = personInfoService.get(subject);
+            user.setPhone(telephone);
+            user.setUpdateBy(subject);
+            user.setUpdateTime(new Date());
+
+            int count = personInfoService.update(user);
+            if (count > 0) {
+                msgResult.setResult(true);
+            } else {
+                msgResult.setResult(false);
+            }
+        }
+        catch (Exception ex){
+            log.error(ex.getMessage(),ex);
+            msgResult.setResult(false);
+        }
+
+        return msgResult;
+    }
+
+    public static void main(String[] args) {
+        int status = new BigDecimal("0").compareTo(BigDecimal.ZERO);
+        System.out.println(status);
+    }
+
+}

+ 226 - 0
web/src/main/java/com/jpsoft/employment/modules/wechat/controller/WxController.java

@@ -0,0 +1,226 @@
+package com.jpsoft.employment.modules.wechat.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.jpsoft.employment.config.WxProperties;
+import com.jpsoft.employment.config.WxPropertiesApplet;
+import com.jpsoft.employment.modules.common.dto.MessageResult;
+import com.jpsoft.employment.modules.common.utils.Sign;
+import com.jpsoft.employment.modules.common.utils.WeixinUtil;
+import com.jpsoft.employment.modules.wechat.entity.AccessToken;
+import com.jpsoft.employment.modules.wechat.entity.SessionKey;
+import com.jpsoft.employment.modules.wechat.vo.UserInfo;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.ValueOperations;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+@Slf4j
+@RequestMapping("/wechat")
+@RestController
+public class WxController {
+    @Autowired
+    private WxProperties wxProperties;
+    @Autowired
+    private WxPropertiesApplet wxPropertiesApplet;
+    @Autowired
+    private ValueOperations<String, Object> valueOperations;
+
+    @ApiOperation(value = "获取微信配置")
+    @GetMapping(value = "/getConfig")
+    public MessageResult getConfig(String url) {
+
+        int code = 200;
+        String message = "获取成功";
+        Object data = "";
+        boolean result = true;
+
+        try {
+            String accessToken = (String)valueOperations.get("accessToken");
+            if(StringUtils.isEmpty(accessToken)) {
+                AccessToken token = WeixinUtil.getAccessToken(wxProperties.getAppId(), wxProperties.getAppSecret());
+                valueOperations.set("accessToken",token.getToken(),2, TimeUnit.HOURS);
+                accessToken = token.getToken();
+            }
+
+            Map<String, String> wxMap = Sign.sign(WeixinUtil.getJsAPI(accessToken), url);
+
+            wxMap.put("appId", wxProperties.getAppId());
+
+            log.warn(JSONObject.toJSONString(wxMap));
+
+            HashMap<String, Object> dataMap = new HashMap<String, Object>();
+
+            dataMap.put("wxConfig", wxMap);
+
+            data = dataMap;
+        } catch (Exception ex) {
+            log.error(ex.getMessage(),ex);
+
+            code = 500;
+            result = false;
+            message = "系统错误";
+        }
+
+        return new MessageResult(result, message, data, code);
+    }
+
+    @ApiOperation(value = "获取微信code")
+    @PostMapping(value = "findWechatUrl")
+    public MessageResult findWechatUrl(@RequestBody String url) {
+
+        String newpath = WeixinUtil.getCodeRequest(wxProperties.getAppId(), url, "snsapi_userinfo");
+
+        HashMap<String, Object> dataMap = new HashMap<String, Object>();
+
+        dataMap.put("wechatUrl", newpath);
+
+        return new MessageResult(true, "获取成功", dataMap, 200);
+    }
+
+    @ApiOperation(value = "获取公众号用户信息")
+    @GetMapping(value = "findUserInfo/{code}")
+    public MessageResult findUserInfo(@PathVariable String code) {
+        try {
+            log.warn("code=" + code);
+            log.warn("appId=" + wxProperties.getAppId());
+            log.warn("appSecret=" + wxProperties.getAppSecret());
+
+            AccessToken at = WeixinUtil.getAccessToken(wxProperties.getAppId(), wxProperties.getAppSecret(), code);
+
+
+            if (at != null && StringUtils.isNotBlank(at.getOpenid())) {
+                String openId = at.getOpenid();
+                System.out.println("openId:" + openId);
+
+                UserInfo userInfo = WeixinUtil.getUserInfo(openId, at.getToken());
+
+                HashMap<String, Object> dataMap = new HashMap<String, Object>();
+
+                dataMap.put("userInfo", userInfo);
+
+                return new MessageResult(true, "获取微信信息成功", userInfo, 200);
+
+            } else {
+                return new MessageResult(false, "获取微信信息失败", "", 400);
+            }
+
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return new MessageResult(false, "系统错误", "", 500);
+        }
+    }
+
+    @ApiOperation(value = "获取公众号用户信息")
+    @GetMapping(value = "findAppletUserInfo/{code}")
+    public MessageResult findAppletUserInfo(@PathVariable String code) {
+        try {
+            log.warn("code=" + code);
+            log.warn("appId=" + wxPropertiesApplet.getAppId());
+            log.warn("appSecret=" + wxPropertiesApplet.getAppSecret());
+
+            SessionKey sessionKey = WeixinUtil.getSessionKey(wxPropertiesApplet.getAppId(), wxPropertiesApplet.getAppSecret(), code);
+
+
+            if (sessionKey != null && StringUtils.isNotBlank(sessionKey.getOpenid())) {
+                String openId = sessionKey.getOpenid();
+                System.out.println("openId:" + openId);
+                HashMap<String, Object> dataMap = new HashMap<String, Object>();
+                dataMap.put("openId", openId);
+
+//                UserInfo userInfo = WeixinUtil.getUserInfo(openId, sessionKey.getSessionKey());
+//
+//                HashMap<String, Object> dataMap = new HashMap<String, Object>();
+//
+//                dataMap.put("userInfo", userInfo);
+
+                return new MessageResult(true, "获取信息成功", openId, 200);
+
+            } else {
+                return new MessageResult(false, "获取信息失败", "", 400);
+            }
+
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return new MessageResult(false, "系统错误", "", 500);
+        }
+    }
+
+    @ApiOperation(value = "判断用户是否关注公众号")
+    @PostMapping(value = "checkSubscribe")
+    public MessageResult checkSubscribe(String openId) {
+        try {
+            String accessToken = (String)valueOperations.get("accessToken");
+            if(StringUtils.isEmpty(accessToken)){
+                AccessToken token = WeixinUtil.getAccessToken(wxProperties.getAppId(), wxProperties.getAppSecret());
+                accessToken = token.getToken();
+                valueOperations.set("accessToken",token.getToken(),2, TimeUnit.HOURS);
+            }
+
+            String subscribe = WeixinUtil.checkSubscribe(openId,accessToken);
+            if(StringUtils.isNotEmpty(subscribe)){
+                return new MessageResult(true, "获取成功", subscribe, 200);
+            }else{
+                return new MessageResult(false, "获取失败", subscribe, 500);
+            }
+
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return new MessageResult(false, "系统错误", "", 500);
+        }
+    }
+
+    @GetMapping(value = "getAppId/{id}")
+    @ResponseBody
+    public MessageResult getAppId(@PathVariable("id") String id) {
+
+        int code = 200;
+        String message = "获取成功";
+        Object data = "";
+        boolean result = true;
+
+        try {
+
+            HashMap<String, Object> wxMap = new HashMap<>();
+
+            wxMap.put("appId", wxProperties.getAppId());
+
+            HashMap<String, Object> dataMap = new HashMap<String, Object>();
+
+            dataMap.put("wxConfig", wxMap);
+
+            data = dataMap;
+
+        } catch (Exception ex) {
+            code = 500;
+            message = "系统错误";
+            result = false;
+        }
+
+        return new MessageResult(result, message, data, code);
+    }
+
+    @ApiOperation(value = "验证服务器地址的有效性")
+    @GetMapping("/")
+    @ResponseBody
+    public String index(@RequestParam(defaultValue = "") String signature,
+                        @RequestParam(defaultValue = "") String timestamp,
+                        @RequestParam(defaultValue = "") String nonce,
+                        @RequestParam(defaultValue = "") String echostr) {
+        log.warn("signature=" + signature);
+        log.warn("timestamp=" + timestamp);
+        log.warn("nonce=" + nonce);
+        log.warn("echostr=" + echostr);
+
+        if (WeixinUtil.checkSignature(wxProperties.getToken(), signature, timestamp, nonce)) {
+            return echostr;
+        } else {
+            return "index";
+        }
+    }
+}

+ 7 - 45
web/src/main/resources/application.yml

@@ -114,53 +114,15 @@ pagehelper:
   supportMethodsArguments: true
   params: count=countSql
 
-#沙箱环境
-alipay:
-  serviceUrl: https://openapi.alipaydev.com/gateway.do
-  appId: 2016091800539045
-  privateKey: MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCZqJjnubeHgd6MVyCa+X/1Jxbxr60S3Avl6cR+x6rCQpnOEVNH6UsVm31cGp2W/rPlfJd7Kil9a0WAS2mdFhW9XDouo2jp6s+1hbtW52kwbQWjszq4WebIs97IWHxmkM3vEO3lVUd6y/Wo23sfL1d0ahEPLqkahM36zSBXaEmGzgX+8hgV25zk1tsyzwu/BAnQvOtCDYW+fP/ozz63mJ7/ScQn4Ucm3UwX92d3w+zqjUD0BjvNVQcOZwJm7FKrdsib1UVglyykaGG6M1KZj08q2ANYq+M+o//jX71JDXTpd+Uo6D+heUAKMDECXH2QzmQ2ZfSqR+eQ6t6sgH+69o2LAgMBAAECggEAWjynpxXqkNqUrkgQbtJs8bRGBiML+dJd7mQtL+LkBfcEyf5ksQtxO7w3j1pWB7GGRhO4Be2JtgzEIQaofEbW94Bs7qyqVQy/dDOYA/4cSQMNV8hOiKrLHDx9bZyBWd5aAbYobxB4zMVwe/yAvpyXuFb9s7PMPTWWnV3PS2WEIHR5jC1G9yqkaSTHkPCpd+S9spaHkCJdrwmGuscbElBS6C44QqDZK1aqtjq6JlHTibOLiN+WYKePPxgQkJLJwN7RWIFf3PTFH5aT3joRPP3ymOLv0cRRU0tUDqzF+o1rxMHjitVWWfXEw2p4b+NbYCEKx/3HyNmAQC23bskMP4X8kQKBgQDxvO2ob57gnWQahyDsElD66w87XF7QFqcMVcrKQmSBYxqluywSyq0uNKAogacSNsufg7kJOwTmtpGKMl//8tJ88u+T8x5BmLcbEhT1eWpCF9SJ951DzVHAIgAH/w2yH+PcJBQvDX9WV93Amoim4JRqvx6t8v3nShdys7eVlzA/eQKBgQCiuV47UzAiLSPR7vI9cYaD4h5MMSbmBEWG4prXhGt4AjLhdrlzGMMGCT7OMlEEXvRhd61nkeGNBOm51sc6PS8xWAkfqY8DpBG6Ty/rv6syUVJ6I66SujY3hUqGbtwL3FTWH2ixhlU/bzZnUS4gKlO5MPsJgPhg8JaP7wRffXTgIwKBgDoitoEIfwwDrfxXPQqpCQKfHyWmfELM/9WOmFt2Bhe7zr/GuL24MlfnXhD/xT8zIFs3YXufzvjxNSUoIkA6lHZqMkXBdShPYtHG0nWKgoxskLexbgfNS/jJ9Hn308JfuvvJTXVXaKVKMlFMmMqRPgBCAE3TH07NWcBDCkaWeor5AoGAArLuZC+CCd8TzASZkflTENbsR7k8+u2xNYaGqPJyUeA/dcvhUY5klbILj6H4BAmLJh61CpW51vvw4Hs2fLnNEZVzOUo3rAjJnnx3wAJC1afRpWL4H0jlY1BbpxUpoyy5X3/P3bnrqgyvK1GGYVQyZUzxrPutovX6mVKOkQLksF8CgYB7LBZyzLBWWmVt51DHELXkvIiXzftqpe6TFcEJ0gfkS/CU0rgMDlOoI5gJW39mEvObVTvCdG98lF2QqLfVxJ5o2pNQOHtGDTPDp30OOjRdz26Bk8o+D7Brr6V0weF6MLV2Vsa+Yr0FGeObHbTC94SJzEWobkvAqVR2luhdtagBYg==
-  zfbPublicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx+8b2IWa7X+crooIYaT9ZEhyZYuhlaGlpxBXjmchWIrtRIp2sOGlm7nH8oY5CAgVmZ9x8ETz5Sd+p6Z7BhPNu+uc4CmrNOEzgfUDmWp8xriNfQR1Jw+J9AhGfjgQGT2/z9aD/BdKed40VM8P3iAtg++6TnBAEKBNbWuk4tOtP3aZ2XDZyIo1K3rW+KEufQBgZvo1j5x5asj2m+/5xBLdTLxsKb5agUM4HlTaQKuoF7Z+jPnHFzQEsITzgAyc0nd26QRTfWo+bCnFKG8GHjdZrJ1wjcXdw056+jUOUyRfDE/Set72FGlVTswhETo6ayAdNRRUX/3x0EI9dx3PxkC27QIDAQAB
-  inputCharset: UTF-8
-  mchId: 2088102176166099
- # appAuthToken: 201906BBbc7d6558596f4bbc9f056c01b8aebX48
-  signType: RSA2
-  notifyUrl: http://zldb.xiaoxinda.com:8088/smart-community-server/aliPay/payNotify
 
 wx:
-  commonAccessTokenUrl: "http://ykt.xiaoxinda.com/weixin/token"
-  pay:
-    appId: wxe598c699aa68cffe
-    appSecret: ea20d2e9a36aace26b4f7654218129af
-    token: weixin
-    tokenUrl: "https://api.weixin.qq.com/cgi-bin/token"
-    refreshOAuth2TokenUrl: "https://api.weixin.qq.com/sns/oauth2/refresh_token"
-    createQrCodeUrl: "https://api.weixin.qq.com/cgi-bin/qrcode/create"
-    showQrCodeUrl: "https://mp.weixin.qq.com/cgi-bin/showqrcode"
-    mchId: 1500160622
-    subMchId: 1505070291
-    mchKey: jpsoft11111111111111111111111111
-    notifyUrl: http://18891j25i6.iok.la:40309/smart-server/wxPay/payNotify
-    ip: 101.37.31.116
-    portalUrl: "http://xpgj.xiaoxinda.com/prod/business/#/"
-  jpsoft:
-    appId: wx907e84ad32e6e142
-    appSecret: 1d891ee3f4cc8002ff0330d1e04acf2c
-    mchId: 1509055881
-    subMchId: 1523544111
-    mchKey: xxd33333333333333333333333333333
-    notifyUrl: http://ykt.xiaoxinda.com/wxPay/wxJsapiPayNotify
-    refundUrl: http://ykt.xiaoxinda.com/wxPay/wxJsapiRefundNotify
-    ip: 101.37.31.116
-    certPath: /usr/local/tomcat/webapps/cert/xiaoxinda/apiclient_cert.p12
-    temporaryUrl: http://ykt.xiaoxinda.com/wxPay/wxJsapiPayTemporaryNotify
-    urlKey: a1
-  notice:
-    remindTmplCode: "6CMFjxHJA2lZWOFRKQ6tlVy2F_4Iq18EWsRCSsZbN58"
-    supervisionTmplCode: "iAbFXWt_-WwYvu9CEFkTDeZwM3XoJqmB3ITIHS99WCI"
-    # 测温和手表采用相同微信模板
-    watchWarningTmplCode: "y5-MFu1SdP1CrdwROYhBe5qBrEsRBYWmz8CHUhhGj7g"
-    temperatureWarningTmplCode: "y5-MFu1SdP1CrdwROYhBe5qBrEsRBYWmz8CHUhhGj7g"
-
+  #错误
+  appId: wx014362202dd87dd7
+  appSecret: aaf8db83ff69c3716a62e3d5bd21c292
+applet:
+  #三得利小程序
+  appId: wx7eec18cd89b9d777
+  appSecret: 5a0aa258fda3e75097a80764dab73202
 
 #oss:
 #  accessKeyId: LTAILGOo7bwpkvnq