修改钱包余额 迭代2

pull/2/head
shaowenhao 2023-10-27 20:34:57 +08:00
parent 3ab455a8c1
commit b1de15ac8b
11 changed files with 313 additions and 10 deletions

23
pom.xml
View File

@ -117,6 +117,12 @@
<version>3.6.8</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>health-common-security</artifactId>
@ -125,7 +131,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.7.13</version>
<version>2.7.13</version><!--autoconfigure-->
</dependency>
<!--支付宝沙箱依赖-->
@ -160,6 +166,21 @@
<artifactId>alipay-easysdk</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-core</artifactId>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
<version>0.0.20131108.vaadin1</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.3</version>
</dependency>
<!-- FastDFS图片上传 -->
<!-- <dependency>-->

View File

@ -0,0 +1,18 @@
package com.ruoyi.mybasic.common.domain.ailPay;
import lombok.Data;
/**
* @ClassName AilPay
* @Description
* @Author WenHao.Sao
*/
@Data
public class AliPay {
private String traceNo;//轨迹号
private double totalAmount;//订单的总金额
private String subject;//主题
private String alipayTraceNo;//支付宝跟踪号
// private String amount;//前台传入金额
}

View File

@ -0,0 +1,25 @@
package com.ruoyi.mybasic.common.domain.ailPay;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* @ClassName AlipayConfig
* @Description
* @Author WenHao.Sao
*/
@Data
@Component
@ConfigurationProperties(prefix="alipay")//用于映射在这个字段开头的类的值
public class AliPayConfig {
/**
*
*/
private String appId;//
private String appPrivateKey;//
private String alipayPublicKey;//
private String notifyUrl;//
private String returnUrl;//
}

View File

@ -24,4 +24,6 @@ public class PurseRequest extends PurseResponse {
private int status;//状态 1支出 2 收入
private String orderId;//支付宝订单Id
}

View File

@ -12,7 +12,7 @@ import java.util.Date;
@Data
public class PurseResponse {
// private String userId;//用户编号
private String userId;//用户编号
private Double balanceFee;//钱包总可用余额
@ -25,4 +25,6 @@ public class PurseResponse {
}

View File

@ -1,27 +1,58 @@
package com.ruoyi.mybasic.controller;
import cn.hutool.json.JSONObject;
import com.alipay.api.AlipayApiException;
import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;
import com.alipay.api.internal.util.AlipaySignature;
import com.alipay.api.request.AlipayTradePagePayRequest;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.mybasic.common.domain.ailPay.AliPay;
import com.ruoyi.mybasic.common.domain.ailPay.AliPayConfig;
import com.ruoyi.mybasic.common.domain.request.PurseRequest;
import com.ruoyi.mybasic.common.domain.response.PurseResponse;
import com.ruoyi.mybasic.service.PurseService;
import com.ruoyi.mybasic.service.PurseServiceTwo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.security.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @ClassName PurseControllerTwo
* @Description
* @Author WenHao.Sao
*/
//@CrossOrigin(origins = "*")
@RestController
@RequestMapping("purse")
@RequestMapping("purse")//purse
//@MapperScan("com.ruoyi.mybasic.mapper")
public class PurseControllerTwo {
private static final String GATEWAY_URL = "https://openapi-sandbox.dl.alipaydev.com/gateway.do";
private static final String FORMAT = "JSON";
private static final String CHARSET = "UTF-8";
//签名方式
private static final String SIGN_TYPE = "RSA2";
@Resource
private AliPayConfig aliPayConfig;
@Autowired
private PurseServiceTwo purseServiceTwo;
/**
*
*/
@GetMapping("/purseList")
public R<List<PurseRequest>> purseList(){
return purseServiceTwo.purseListAll();
}
/**
*
*
@ -48,6 +79,146 @@ public class PurseControllerTwo {
* id
*/
@GetMapping("/pay") // &subject=xxx&traceNo=xxx&totalAmount=xxx
public void pay(AliPay aliPay, HttpServletResponse httpResponse) throws Exception {
// 1. 创建Client通用SDK提供的Client负责调用支付宝的API
AlipayClient alipayClient = new DefaultAlipayClient(GATEWAY_URL, aliPayConfig.getAppId(),
aliPayConfig.getAppPrivateKey(), FORMAT, CHARSET, aliPayConfig.getAlipayPublicKey(), SIGN_TYPE);
// 2. 创建 Request并设置Request参数
AlipayTradePagePayRequest request = new AlipayTradePagePayRequest(); // 发送请求的 Request类
request.setNotifyUrl(aliPayConfig.getNotifyUrl());
request.setReturnUrl(aliPayConfig.getReturnUrl());
JSONObject bizContent = new JSONObject();
bizContent.set("out_trade_no", aliPay.getTraceNo()); // 我们自己生成的订单编号
bizContent.set("total_amount", aliPay.getTotalAmount()); // 订单的总金额
bizContent.set("subject", aliPay.getSubject()); // 支付的名称
bizContent.set("product_code", "FAST_INSTANT_TRADE_PAY"); // 固定配置
request.setBizContent(bizContent.toString());
// 执行请求,拿到响应的结果,返回给浏览器
String form = "";
try {
form = alipayClient.pageExecute(request).getBody(); // 调用SDK生成表单
} catch (AlipayApiException e) {
e.printStackTrace();
}
httpResponse.setContentType("text/html;charset=" + CHARSET);
httpResponse.getWriter().write(form);// 直接将完整的表单html输出到页面
httpResponse.getWriter().flush();
httpResponse.getWriter().close();
}
// @GetMapping("/pay")
// public void pay(AilPay ailPay , HttpServletResponse httpServletResponse) throws IOException, AlipayApiException {
// // 1. 创建Client通用SDK提供的Client负责调用支付宝的API
// AlipayClient alipayClient = new DefaultAlipayClient(GATEWAY_URL, alipayConfig.getAppId(),
// alipayConfig.getAppPrivateKey(), FORMAT, CHARSET, alipayConfig.getAlipayPublicKey(), SIGN_TYPE);
// // 2. 创建 Request并设置Request参数
// AlipayTradePagePayRequest request = new AlipayTradePagePayRequest(); // 发送请求的 Request类
// request.setNotifyUrl(alipayConfig.getNotifyUrl());
// request.setReturnUrl(alipayConfig.getReturnUrl());
//
// JSONObject jsonObject = new JSONObject();
// int alipayNo;//支付宝订单号
// jsonObject.set("out_trade_no", "111111"); // 我们自己生成的订单编号
// jsonObject.set("total_amount", 12); // 订单的总金额
// jsonObject.set("subject","测试"); // 支付的名称
// jsonObject.set("product_code", "FAST_INSTANT_TRADE_PAY"); // 固定配置
//// jsonObject.set("", ailPay.getStatus());
// request.setBizContent(jsonObject.toString());
//
// JSONArray goodsDerail = new JSONArray();
// JSONObject entries = new JSONObject();
// entries.set("user_id" , "goodsNo1");
// entries.set("goods_name","善商品");
// entries.set("amount",11);
// entries.set("price",111);
// goodsDerail.add(entries);
// jsonObject.set("en_tries",entries);
// //扩展信息
// JSONObject entries1 = new JSONObject();
// entries1.set("sys_service_provider_id","666666");
// jsonObject.set("entr_ies1",entries1);
// request.setBizContent(jsonObject.toString());
// AlipayTradePagePayResponse response = alipayClient.pageExecute(request);
// if (response.isSuccess()){
// System.out.println("调用成功");
// }else{
// System.out.println("调用失败");
//
// }
//// //
//// Long userId = SecurityUtils.getUserId();
//// R<PurseResponse> purseResponseR = purseServiceTwo.purseObject(userId);
//// double totalAmount = ailPay.getTotalAmount();
////// purseResponseR.getData().setBalanceFee(totalAmount * 100);
//// //创建一个新的对象
//// PurseRequest purseRequest = new PurseRequest();
//// //获取到当前的登录用户赋值
//// purseRequest.setUserId(userId + "");
//// //空余额 赋予新值
//// purseRequest.setBalanceFee(totalAmount * 100);
//// //修改余额
//// purseServiceTwo.updPurseHBi(purseRequest);
//
//
// //执行请求,拿到响应的结果 ,返回给浏览器
// String form = "";
// try {
// form = alipayClient.pageExecute(request).getBody();//调用SDK生成表单
// } catch (AlipayApiException e) {
// e.printStackTrace();
// } //设置方式 UTF-8
// httpServletResponse.setContentType("text/html;charset=" + CHARSET);
// httpServletResponse.getWriter().write(form); //直接将完整的的表单生成到html中
// httpServletResponse.getWriter().flush();
// httpServletResponse.getWriter().close();
// }
/**
*
*/
@PostMapping("/notify")//这里是post接口
public String payNotify(HttpServletRequest request){
if (request.getParameter("trade_status").equals("TRADE_SUCCUSS")){
System.out.println("========支付宝异步回调==========");
HashMap<String, String> params = new HashMap<>();
Map<String, String[]> parameterMap = request.getParameterMap();
for (String name : parameterMap.keySet()) {
params.put(name,request.getParameter(name));
}
String outTradeNo = params.get("out_trade_no");
String gmtPayment = params.get("gmt_payment");
String tradeNo = params.get("trade_no");
String sign = params.get("trade_no");
String contentV1 = AlipaySignature.getSignCheckContentV1(params);
try {
boolean b = AlipaySignature.rsa256CheckContent(contentV1, sign, aliPayConfig.getAlipayPublicKey(), "UTF-8");//验证签名
//支付宝验签
if (b){
//验证通过
System.out.println("支付宝交易凭证号: " + params.get("trade_no"));
System.out.println("商户订单号: " + params.get("out_trade_no"));
System.out.println("交易金额: " + params.get("total_amount"));
//查询订单
QueryWrapper<Object> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("order_id",outTradeNo);
}
} catch (AlipayApiException e) {
e.printStackTrace();
}
}
return "success";
}
/**
*
@ -61,6 +232,9 @@ public class PurseControllerTwo {
*/
/**
*
* (userId,,/)

View File

@ -5,16 +5,19 @@ import com.ruoyi.mybasic.common.domain.request.MoneyLogsRequest;
import com.ruoyi.mybasic.common.domain.request.PurseRequest;
import com.ruoyi.mybasic.common.domain.response.PurseResponse;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @ClassName PurseMapperTwo
* @Description
* @Author WenHao.Sao
*/
@Mapper
public interface PurseMapperTwo {
public interface PurseMapperTwo{
//根据当前登录人的userId获取到钱包的对象
PurseResponse purseObject(@Param("userId") Long userId);
@ -33,4 +36,9 @@ public interface PurseMapperTwo {
//查询钱包里面的用户id
Integer purseUserId(@Param("userId") String userId);
void updPurseHBi(PurseRequest purseRequest);
List<PurseRequest> purseListAll();
}

View File

@ -1,5 +1,6 @@
package com.ruoyi.mybasic.service.Impl;
import com.dtflys.forest.annotation.Get;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.mybasic.common.domain.request.MoneyLogsRequest;
import com.ruoyi.mybasic.common.domain.request.PurseRequest;
@ -8,8 +9,11 @@ import com.ruoyi.mybasic.mapper.PurseMapperTwo;
import com.ruoyi.mybasic.service.PurseServiceTwo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
/**
* @ClassName PurseServiceTwoImpl
@ -23,6 +27,16 @@ public class PurseServiceTwoImpl implements PurseServiceTwo {
@Autowired
private PurseMapperTwo purseMapperTwo;
@Override
public R<List<PurseRequest>> purseListAll() {
List<PurseRequest> show = purseMapperTwo.purseListAll();
R<List<PurseRequest>> ok = R.ok(show);
return ok;
}
/**
* userId
*
@ -112,6 +126,13 @@ public class PurseServiceTwoImpl implements PurseServiceTwo {
return R.ok("金额修改成功");
}
@Override
public void updPurseHBi(PurseRequest purseRequest) {
purseMapperTwo.updPurseHBi(purseRequest);
}
/**
* userId
* @param userId
@ -123,9 +144,11 @@ public class PurseServiceTwoImpl implements PurseServiceTwo {
if (purseUserId != null ){
return R.fail("已有该用户,请重新创建");
}else{
Date date = new Date();
PurseRequest purseRequest = new PurseRequest();
purseRequest.setUserId(userId);
purseRequest.setUpdateTime(new Date());
purseRequest.setOrderId(new SimpleDateFormat("yyyyMMdd").format(date) + System.currentTimeMillis());
Integer i = purseMapperTwo.addPurse(purseRequest);
if (i>0){
return R.ok("成功");

View File

@ -5,6 +5,8 @@ import com.ruoyi.mybasic.common.domain.request.PurseRequest;
import com.ruoyi.mybasic.common.domain.response.PurseResponse;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @ClassName PurseServiceTwo
* @Description
@ -17,4 +19,7 @@ public interface PurseServiceTwo {
R purseBalanceChange(PurseRequest purseRequest);
void updPurseHBi(PurseRequest purseRequest);
R<List<PurseRequest>> purseListAll();
}

View File

@ -6,7 +6,7 @@ server:
spring:
application:
# 应用名称
name: health-mybasic
name: health-mybasicTwo
profiles:
# 环境配置
active: dev
@ -28,12 +28,20 @@ spring:
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
# 沙箱 配置
alipay.appId: 9021000130611735
alipay.appPrivateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDM7+9TRvFFs0acZNRvgKrTUnig4k1Th/Pl02VRI4aTNpQIHpiTcViytaIr9ByioCNzmE5D3hMMp4arN3MiXnH9c+R9holwDtjbQyDC9QLRwZVMRnduXdZ42h2+5jhbt34wKXp61t3rFW9X9gA2iPJYbV6LRmyX+iuhfGtk5YPrTu307D79E6p7n7h+UBxaS0w0u5pm2eoiKFml3hRRhuY6IqEOo87gg7psjpj+KEV81cpDpvlICYRfVq425PWA+wTKVPsV2YGK0V6da3qbo17bNeBU6vIOUaDDkfflCZG2wSdRKzmrVrrr2i+lzuC3pxNimFDavvaRBdF1RzdvmeHBAgMBAAECggEAIEloxhD2MAn3hOopwctenl5u3MHqds+DcGDmpGrZZ9YAamsPlKMV20ncW9pgrIpYK30CT5TsIWE/STg6Ll78zHZ2uAP7ISllpt2jirN5FzzNXa/4Xu3vvSh36TxyApkdC09tmW7ClafR2+TI0c6vh5jrfTvCHgtu1kk4zjOOngKPxRielI7qcSyO0GGlNPYIXZO7X9De/lqNsAu0e8j8DbAWhOx/0EZ7zpZEBTVyZe2s7Lbq1lEWqn07vYjKWCoAp9O1IEll/9963U5yfV+rMj47lP+k5x/oa6HVd5TxeUeOX2vd/HZitxBeq4lPt5cqHciLWnPgvv68VrviB5pmZQKBgQD/orVuGXdcw3zOBHnzqOclC05sZH2UO6CrJERn82gKCgdx5wQwE1WwqgI0S+oGVpO6wgAM/1g6vT8U6EgovMbdmjZ+Ad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Um1m5cKXJceJGxq/QrqLBAFHlF2oKKcVQaFdMgDX3OlKvUzUQ/tz82NpnftB7A2tIHWWmPTRGQ5lwy21/y7jLF91E9YK7Y99HcQT/ag40XJZVQLnwIDAQAB
alipay.notifyUrl: http://vhzkca.natappfree.cc/alipay/notify
alipay.returnUrl: http://localhost:9001/purse
#沙箱配置
# alipay.appId: 9021000130611735
# alipay.appPrivateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDM7+9TRvFFs0acZNRvgKrTUnig4k1Th/Pl02VRI4aTNpQIHpiTcViytaIr9ByioCNzmE5D3hMMp4arN3MiXnH9c+R9holwDtjbQyDC9QLRwZVMRnduXdZ42h2+5jhbt34wKXp61t3rFW9X9gA2iPJYbV6LRmyX+iuhfGtk5YPrTu307D79E6p7n7h+UBxaS0w0u5pm2eoiKFml3hRRhuY6IqEOo87gg7psjpj+KEV81cpDpvlICYRfVq425PWA+wTKVPsV2YGK0V6da3qbo17bNeBU6vIOUaDDkfflCZG2wSdRKzmrVrrr2i+lzuC3pxNimFDavvaRBdF1RzdvmeHBAgMBAAECggEAIEloxhD2MAn3hOopwctenl5u3MHqds+DcGDmpGrZZ9YAamsPlKMV20ncW9pgrIpYK30CT5TsIWE/STg6Ll78zHZ2uAP7ISllpt2jirN5FzzNXa/4Xu3vvSh36TxyApkdC09tmW7ClafR2+TI0c6vh5jrfTvCHgtu1kk4zjOOngKPxRielI7qcSyO0GGlNPYIXZO7X9De/lqNsAu0e8j8DbAWhOx/0EZ7zpZEBTVyZe2s7Lbq1lEWqn07vYjKWCoAp9O1IEll/9963U5yfV+rMj47lP+k5x/oa6HVd5TxeUeOX2vd/HZitxBeq4lPt5cqHciLWnPgvv68VrviB5pmZQKBgQD/orVuGXdcw3zOBHnzqOclC05sZH2UO6CrJERn82gKCgdx5wQwE1WwqgI0S+oGVpO6wgAM/1g6vT8U6EgovMbdmjZ+Adf657EHLEBOYee34PrVLRcc+uMbFTTwM7E31l+S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ylT7FdmBitFenWt6m6Ne2zXgVOryDlGgw5H35QmRtsEnUSs5q1a669ovpc7gt6cTYphQ2r72kQXRdUc3b5nhwQIDAQAB
# alipay.notifyUrl: https://openapi-sandbox.dl.alipaydev.com/gateway.do
# alipay.alipayPublicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzhwYjyXibFiJbj+N15ANZVoQXIprD4LGAtUrt1rDTIz3D+BwouhcGYHV5S+Tin6vJ7jsEul4tU/i+vI+KIHbfr/Kha0MtyUSHjfyf1URZQXxLChYxrjidS/9xF7HYXEUzIRVN55M9Qzk764BrGkdZ5IsuUt32PXFMF4D0MWOynAdBIRRCUVUD0IE1IfcMIhIP1UdjMRLwOGZWHUw8L7B2A/f8hIeAqeWZs+w/Um1m5cKXJceJGxq/QrqLBAFHlF2oKKcVQaFdMgDX3OlKvUzUQ/tz82NpnftB7A2tIHWWmPTRGQ5lwy21/y7jLF91E9YK7Y99HcQT/ag40XJZVQLnwIDAQAB
# alipay.notifyUrl: http://vhzkca.natappfree.cc/alipay/notify
# alipay.returnUrl: http://localhost:8000/orders
##APPID
# alipay.appId=
# #开启公钥模式:点击查看中的公钥

View File

@ -11,6 +11,9 @@
(
<if test="null != userId">
user_id,
</if>
<if test="null != orderId">
order_id,
</if>
update_time
)
@ -18,6 +21,9 @@
(
<if test="null != userId">
#{userId},
</if>
<if test="null != orderId">
#{orderId},
</if>
now()
)
@ -91,5 +97,16 @@
</select>
<update id="updPurseHBi">
update t_purse set balance_fee = (#{amount} * 100) where userId = #{userId}
</update>
<!-- <select id="purseListAll" resultType="java.util.List">-->
<!-- select * from t_purse-->
<!-- </select>-->
<select id="purseListAll" resultType="com.ruoyi.mybasic.common.domain.request.PurseRequest">
select * from t_purse
</select>
</mapper>