nickchange
2023-10-11 21f4e1936391641f24f67f9812d78bfaa9778c76
10.12
3个文件已修改
82 ■■■■ 已修改文件
.idea/workspace.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/util/PayMoneyUtil.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.idea/workspace.xml
@@ -25,10 +25,10 @@
    <select />
  </component>
  <component name="ChangeListManager">
    <list default="true" id="cb08d02f-fd4f-4fa2-85fe-abd508fa83ac" name="Default Changelist" comment="10.12">
    <list default="true" id="cb08d02f-fd4f-4fa2-85fe-abd508fa83ac" name="Default Changelist" comment="10.11">
      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/cloud-server-account/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-account/pom.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/cloud-server-account/src/main/java/com/dsh/account/util/PayMoneyUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-account/src/main/java/com/dsh/account/util/PayMoneyUtil.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -70,9 +70,9 @@
  <component name="ProblemsViewState">
    <option name="selectedTabId" value="ProjectErrors" />
  </component>
  <component name="ProjectColorInfo"><![CDATA[{
  "associatedIndex": 3
}]]></component>
  <component name="ProjectColorInfo">{
  &quot;associatedIndex&quot;: 3
}</component>
  <component name="ProjectId" id="2T0poWYlZShlnPso29uxjn4gQQo" />
  <component name="ProjectLevelVcsManager" settingsEditedManually="true">
    <ConfirmationsSetting value="2" id="Add" />
@@ -92,6 +92,7 @@
    "node.js.detected.package.eslint": "true",
    "node.js.selected.package.eslint": "(autodetect)",
    "node.js.selected.package.tslint": "(autodetect)",
    "settings.editor.selected.configurable": "inlay.hints",
    "vue.rearranger.settings.migration": "true"
  }
}]]></component>
@@ -245,10 +246,10 @@
    </configuration>
    <list>
      <item itemvalue="JUnit.AccountApplicationTests.contextLoads" />
      <item itemvalue="Spring Boot.AccountApplication" />
      <item itemvalue="Spring Boot.ManagementApplication" />
      <item itemvalue="Spring Boot.GatewayApplication" />
      <item itemvalue="Spring Boot.OtherApplication" />
      <item itemvalue="Spring Boot.AccountApplication" />
      <item itemvalue="Spring Boot.ActivityApplication" />
      <item itemvalue="Spring Boot.AuthApplication" />
      <item itemvalue="Spring Boot.CourseApplication" />
@@ -347,7 +348,8 @@
      <workItem from="1696917635013" duration="5121000" />
      <workItem from="1696847977356" duration="7435000" />
      <workItem from="1696898972818" duration="19012000" />
      <workItem from="1696992350781" duration="1182000" />
      <workItem from="1696992350781" duration="4934000" />
      <workItem from="1697004175378" duration="1809000" />
    </task>
    <task id="LOCAL-00001" summary="后台代码删除">
      <created>1690249807612</created>
@@ -680,7 +682,15 @@
      <option name="project" value="LOCAL" />
      <updated>1696990659189</updated>
    </task>
    <option name="localTasksCounter" value="44" />
    <task id="LOCAL-00044" summary="10.11">
      <option name="closed" value="true" />
      <created>1696993684991</created>
      <option name="number" value="00044" />
      <option name="presentableId" value="LOCAL-00044" />
      <option name="project" value="LOCAL" />
      <updated>1696993684991</updated>
    </task>
    <option name="localTasksCounter" value="45" />
    <servers />
  </component>
  <component name="TypeScriptGeneratedFilesManager">
@@ -721,9 +731,9 @@
    <MESSAGE value="9.26。15" />
    <MESSAGE value="10.8" />
    <MESSAGE value="10.8。1" />
    <MESSAGE value="10.11" />
    <MESSAGE value="10.12" />
    <option name="LAST_COMMIT_MESSAGE" value="10.12" />
    <MESSAGE value="10.11" />
    <option name="LAST_COMMIT_MESSAGE" value="10.11" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager>
cloud-server-account/src/main/java/com/dsh/account/util/PayMoneyUtil.java
@@ -24,6 +24,7 @@
//import com.github.binarywang.wxpay.bean.profitsharingV3.ProfitSharingRequest;
//import com.github.binarywang.wxpay.service.ProfitSharingV3Service;
//import com.github.binarywang.wxpay.service.WxPayService;
import org.apache.commons.collections.map.HashedMap;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java
@@ -7,6 +7,9 @@
import com.alipay.api.CertAlipayRequest;
import com.alipay.api.DefaultAlipayClient;
import com.alipay.api.domain.AlipayTradeAppPayModel;
import com.alipay.api.domain.ExtendParams;
import com.alipay.api.domain.RoyaltyDetailInfos;
import com.alipay.api.domain.RoyaltyInfo;
import com.alipay.api.request.*;
import com.alipay.api.response.*;
import org.apache.commons.collections.map.HashedMap;
@@ -19,6 +22,7 @@
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
@@ -65,6 +69,7 @@
    private String alipay_root_cert_path = "C:/cert/alipay/user/alipay_root_cert_path.crt";//支付宝CA根证书文件路径
    private String certPath = "C:\\cert\\1523106371_20211206_cert\\apiclient_cert.p12";//微信证书
@@ -139,12 +144,56 @@
        model.setPassbackParams(passbackParams);//自定义参数
        request.setBizModel(model);
        request.setNotifyUrl(callbackPath + notifyUrl);
        //分账
//        Integer    coursePackagePayments = coursePackageClient.queryByCode(outTradeNo);
//        Integer paymentCompetitions = competitionsClient.queryByCode(outTradeNo);
//        Integer siteBookings = siteClient.queryByCode(outTradeNo);
//        List<Integer> stores = new ArrayList<>();
//        stores.add(coursePackagePayments);
//        stores.add(paymentCompetitions);
//        stores.add(siteBookings);
//        OperatorUser operatorUser = siteClient.queryOperator(stores);
//
//        String alipayProportion = operatorUser.getAlipayProportion();
//        String alipayNum = operatorUser.getAlipayNum();
        ExtendParams extendParams = new ExtendParams();
//        extendParams.setSysServiceProviderId("YOUR_SERVICE_PROVIDER_ID");
        model.setExtendParams(extendParams);
        RoyaltyInfo royaltyInfo = new RoyaltyInfo();
//        royaltyInfo.setRoyaltyType("transfer");
        RoyaltyDetailInfos royaltyDetailInfo1 = new RoyaltyDetailInfos();
        royaltyDetailInfo1.setTransOutType("userId");
        royaltyDetailInfo1.setTransOut(aliAppid);
        royaltyDetailInfo1.setTransInType("loginName");
        royaltyDetailInfo1.setTransIn("18398968484");
        royaltyDetailInfo1.setDesc("分账描述1");
        royaltyDetailInfo1.setAmountPercentage("10");
        List<RoyaltyDetailInfos> royaltyDetailInfos = new ArrayList<>();
        royaltyInfo.setRoyaltyDetailInfos(royaltyDetailInfos);
        model.setRoyaltyInfo(royaltyInfo);
        System.err.println("========royaltyInfo=========="+royaltyInfo);
        try {
            //这里和普通的接口调用不同,使用的是sdkExecute
            AlipayTradeAppPayResponse response = alipayClient.sdkExecute(request);
            Map<String, String> map = new HashMap<>();
            map.put("orderString", response.getBody());
            System.out.println(map);//就是orderString 可以直接给客户端请求,无需再做处理。
            System.err.println("========map=========="+map);//就是orderString 可以直接给客户端请求,无需再做处理。
            return ResultUtil.success(map);
        } catch (AlipayApiException e) {
            e.printStackTrace();