-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yang
authored and
Yang
committed
Mar 29, 2020
1 parent
f507baa
commit bc79ffa
Showing
56 changed files
with
1,357 additions
and
386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,4 +151,5 @@ | |
</plugins> | ||
</build> | ||
|
||
|
||
</project> |
79 changes: 79 additions & 0 deletions
79
src/main/java/com/jryyy/forum/config/AliPayConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
package com.jryyy.forum.config; | ||
|
||
import lombok.Data; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.io.FileWriter; | ||
import java.io.IOException; | ||
|
||
/** | ||
* @author OU | ||
*/ | ||
|
||
@Data | ||
@Component | ||
@ConfigurationProperties(prefix = "alipay") | ||
public class AliPayConfiguration { | ||
/** | ||
* 日志地址,这里在d盘下要创建这个文件,不然会报错 | ||
*/ | ||
private static String log_path = "C:/logs/"; | ||
/** | ||
* 应用ID,您的APPID,收款账号既是您的APPID对应支付宝账号 | ||
*/ | ||
private String appID; | ||
/**例:2016082600317257 | ||
*商户私钥,您的PKCS8格式RSA2私钥 | ||
*/ | ||
private String merchantPrivateKey; | ||
/** | ||
* 支付宝公钥,查看地址:https://openhome.alipay.com/platform/keyManage.htm | ||
* 对应APPID下的支付宝公钥。 | ||
*/ | ||
private String alipayPublicKey ; | ||
/** | ||
* 服务器异步通知页面路径 需http://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问 | ||
* 返回的时候此页面不会返回到用户页面,只会执行你写到控制器里的地址 | ||
*/ | ||
private String notifyUrl; | ||
/** | ||
* 签名方式 | ||
*/ | ||
private String signType = "RSA2"; | ||
/** | ||
* 字符编码格式 | ||
*/ | ||
private String charset = "utf-8"; | ||
/** | ||
* 支付宝网关 | ||
*/ | ||
private String gatewayUrl; | ||
private String sysServiceProviderId = "2088102180418544"; | ||
|
||
/** | ||
* 写日志,方便测试(看网站需求,也可以改成把记录存入数据库) | ||
* | ||
* @param sWord | ||
* 要写入日志里的文本内容 | ||
*/ | ||
public static void logResult(String sWord) { | ||
FileWriter writer = null; | ||
try { | ||
writer = new FileWriter(log_path + "alipay_log_" | ||
+ System.currentTimeMillis() + ".txt"); | ||
writer.write(sWord); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} finally { | ||
if (writer != null) { | ||
try { | ||
writer.close(); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} | ||
} | ||
|
||
} |
67 changes: 0 additions & 67 deletions
67
src/main/java/com/jryyy/forum/config/AlipayConfiguration.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.jryyy.forum.constant; | ||
|
||
/** | ||
* @author OU | ||
*/ | ||
public class WordWeight { | ||
|
||
public static final int default_level_weighting = 0; | ||
|
||
public static final int one_level_weighting = 1; | ||
|
||
public static final int two_level_weighting = 2; | ||
|
||
public static final int three__level_weighting = 3; | ||
|
||
public static final int four__level_weighting = 4; | ||
|
||
public static final int FIVE_LEVEL_WEIGHTING = 5; | ||
|
||
public static final int SIX_LEVEL_WEIGHTING = 6; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/com/jryyy/forum/controller/AliPayController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.jryyy.forum.controller; | ||
|
||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
/** | ||
* @author OU | ||
*/ | ||
@RestController | ||
@RequestMapping("/pay") | ||
public class AliPayController { | ||
|
||
|
||
@PostMapping("/notify") | ||
public void aliPayNotify(HttpServletRequest request, HttpServletResponse response) { | ||
|
||
} | ||
|
||
|
||
} |
Oops, something went wrong.