doum
2025-08-21 cfaf819cb87cec28fcc4341c560185ee3fb3baf6
Merge remote-tracking branch 'origin/master'
已复制1个文件
已修改14个文件
已重命名1个文件
235 ■■■■ 文件已修改
server/admin/src/main/java/com/doumee/api/business/PaymentCallback.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/admin/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/admin/src/main/resources/logback-spring.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/pom.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/config/wx/TransferToUser.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/config/wx/WxMiniConfig.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/config/wx/WxPayProperties.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/constants/Constants.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/dto/WithdrawalDTO.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/WithdrawalOrdersService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/WithdrawalOrdersServiceImpl.java 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/application-dev.yml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/application-test.yml 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/JKWebApplication.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/api/web/ConfigApi.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/resources/logback-spring.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/admin/src/main/java/com/doumee/api/business/PaymentCallback.java
@@ -3,10 +3,12 @@
import com.alibaba.fastjson.JSON;
import com.doumee.config.wx.TransferDetailEntityNew;
import com.doumee.config.wx.WxMiniConfig;
import com.doumee.core.constants.Constants;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.ApiResponse;
import com.doumee.service.business.OrdersService;
import com.doumee.service.business.WithdrawalOrdersService;
import com.wechat.pay.java.core.Config;
import com.wechat.pay.java.core.RSAAutoCertificateConfig;
import com.wechat.pay.java.core.RSAPublicKeyConfig;
@@ -16,6 +18,7 @@
import com.wechat.pay.java.service.partnerpayments.jsapi.model.Transaction;
import com.wechat.pay.java.service.refund.model.RefundNotification;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.mgt.DefaultSecurityManager;
import org.springframework.beans.factory.annotation.Autowired;
@@ -45,6 +48,9 @@
    @Autowired
    private OrdersService ordersService;
    @Autowired
    private WithdrawalOrdersService withdrawalOrdersService;
    /**
     * ã€å¾®ä¿¡æ”¯ä»˜ã€‘异步通知
@@ -177,14 +183,30 @@
     * @return
     */
    @PostMapping(value = "/web/wechat/transferNotify")
    public ApiResponse wxPayCallback( HttpServletRequest request) {
    public ApiResponse transferNotify( HttpServletRequest request) {
        Map<String,String> errMap = new HashMap<>();
        try {
            log.info("微信商户零线转账 - å›žè°ƒé€šçŸ¥ /wxpay/callback");
            TransferDetailEntityNew entity = wxPaySuccessCallback(request);
            log.info("transfer ok.{}",entity);
            log.error("微信商户零线转账 - å›žè°ƒé€šçŸ¥ /wxpay/callback");
            Config config = new RSAPublicKeyConfig.Builder()
                .merchantId(WxMiniConfig.wxProperties.getSubMchId()) //微信支付的商户号
                .privateKeyFromPath(WxMiniConfig.wxProperties.getWechatPrivateKeyPath()) // å•†æˆ·API证书私钥的存放路径
                .publicKeyFromPath(WxMiniConfig.wxProperties.getWechatPubKeyPath()) //微信支付公钥的存放路径
                .publicKeyId(WxMiniConfig.wxProperties.getWechatPayPublicKeyId()) //微信支付公钥ID
                .merchantSerialNumber(WxMiniConfig.wxProperties.getWechatSerialNumer()) //商户API证书序列号
                .apiV3Key("7tG4Vk9Zp2L8dXw5Jq0N3hR6yE1sF3cB") //APIv3密钥
                .build();
            TransferDetailEntityNew entity = wxSuccessCallback(request,config);
            log.error("transfer ok.{}",entity);
            //回调成功后处理自己的业务
            if(entity != null){
                if((entity.getState().equals(Constants.SUCCESS)
                        || entity.getState().equals(Constants.CANCELLED)
                        || entity.getState().equals(Constants.FAIL))
                        && StringUtils.isNotBlank(entity.getOutBillNo())){
                    withdrawalOrdersService.transferSuccess(entity.getOutBillNo(),entity.getState().equals(Constants.SUCCESS)?true:false);
                }
            }
            return ApiResponse.success("处理成功");
        } catch (Exception e) {
@@ -195,7 +217,7 @@
        }
    }
    public TransferDetailEntityNew wxPaySuccessCallback(HttpServletRequest request) throws IOException {
    public TransferDetailEntityNew wxSuccessCallback(HttpServletRequest request,Config config) throws IOException {
        String requestBody = getBodyString(request, "UTF-8");
        //证书序列号(微信平台)   éªŒç­¾çš„“微信支付平台证书”所对应的平台证书序列号
        String wechatPaySerial = request.getHeader("Wechatpay-Serial");
@@ -214,14 +236,14 @@
                .body(requestBody)
                .build();
        // 2. æž„建Config RSAPublicKeyConfig
        Config config = new RSAPublicKeyConfig.Builder()
                        .merchantId(WxMiniConfig.wxProperties.getMchId()) //微信支付的商户号
                        .privateKeyFromPath(WxMiniConfig.wxProperties.getPrivateKeyPath()) // å•†æˆ·API证书私钥的存放路径
                        .publicKeyFromPath(WxMiniConfig.wxProperties.getWechatPubKeyPath()) //微信支付公钥的存放路径
                        .publicKeyId(WxMiniConfig.wxProperties.getWechatPayPublicKeyId()) //微信支付公钥ID
                        .merchantSerialNumber(WxMiniConfig.wxProperties.getSerialNumer()) //商户API证书序列号
                        .apiV3Key("") //APIv3密钥
                        .build();
//        Config config = new RSAPublicKeyConfig.Builder()
//                        .merchantId(WxMiniConfig.wxProperties.getMchId()) //微信支付的商户号
//                        .privateKeyFromPath(WxMiniConfig.wxProperties.getPrivateKeyPath()) // å•†æˆ·API证书私钥的存放路径
//                        .publicKeyFromPath(WxMiniConfig.wxProperties.getWechatPubKeyPath()) //微信支付公钥的存放路径
//                        .publicKeyId(WxMiniConfig.wxProperties.getWechatPayPublicKeyId()) //微信支付公钥ID
//                        .merchantSerialNumber(WxMiniConfig.wxProperties.getSerialNumer()) //商户API证书序列号
//                        .apiV3Key("") //APIv3密钥
//                        .build();
        log.info("WxPayService.wxPaySuccessCallback request : wechatPaySerial is [{}]  , wechatSignature is [{}] , wechatTimestamp is [{}] , wechatpayNonce  is [{}] , requestBody is [{}]",wechatPaySerial,wechatSignature,wechatTimestamp,wechatpayNonce,requestBody);
        // 3. åˆå§‹åŒ– NotificationParser
        NotificationParser parser = new NotificationParser((NotificationConfig) config);
server/admin/src/main/resources/application.yml
@@ -12,7 +12,7 @@
spring:
  profiles:
    active: dev
    active: test
  # JSON返回配置
  jackson:
    # é»˜è®¤æ—¶åŒº
server/admin/src/main/resources/logback-spring.xml
ÎļþÃû´Ó server/services/src/main/resources/logback-spring.xml ÐÞ¸Ä
@@ -5,7 +5,7 @@
            <pattern>%highlight(%date{yyyy-MM-dd HH:mm:ss}) | %highlight(%-5level) | %highlight(%thread) | %highlight(%logger) | %msg%n</pattern>
        </layout>
    </appender>
    <property name="log.path" value="/usr/local/jars/official_website/logs"></property>
    <property name="log.path" value="/usr/local/jars/logs/admin"></property>
    <property name="log.fileSize" value="100MB"></property>
    <property name="log.historyDays" value="7"></property>
    <appender name="fileInfoLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
server/pom.xml
@@ -62,10 +62,10 @@
        </exclusion>
      </exclusions> -->
    </dependency>
    <dependency>
    <!--<dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-tomcat</artifactId>
    </dependency>
    </dependency>-->
    <!-- Redis -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
server/services/src/main/java/com/doumee/config/wx/TransferToUser.java
@@ -27,6 +27,14 @@
    private static String CANCEL_PATH = "/v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}/cancel";
    public TransferToUser(String mchid, String certificateSerialNo, String privateKeyFilePath, String wechatPayPublicKeyId, String wechatPayPublicKeyFilePath) {
        this.mchid = mchid;
        this.certificateSerialNo = certificateSerialNo;
        this.privateKey = WXPayUtility.loadPrivateKeyFromPath(privateKeyFilePath);
        this.wechatPayPublicKeyId = wechatPayPublicKeyId;
        this.wechatPayPublicKey = WXPayUtility.loadPublicKeyFromPath(wechatPayPublicKeyFilePath);
    }
    public static void main(String[] args) {
        // TODO: è¯·å‡†å¤‡å•†æˆ·å¼€å‘必要参数,参考:https://pay.weixin.qq.com/doc/v3/merchant/4013070756
//        TransferToUser client = new TransferToUser(
@@ -38,18 +46,18 @@
//        );
        TransferToUser client = new TransferToUser(
                "1661772003",                    // å•†æˆ·å·ï¼Œæ˜¯ç”±å¾®ä¿¡æ”¯ä»˜ç³»ç»Ÿç”Ÿæˆå¹¶åˆ†é…ç»™æ¯ä¸ªå•†æˆ·çš„唯一标识符,商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/merchant/4013070756
                "3C9A32FB6CD453FAAAF97F9737ECAEA9D6625727",         // å•†æˆ·API证书序列号,如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013053053
                "d://wechatApiclient_key.pem",    // å•†æˆ·API证书私钥文件路径,本地文件路径
                "47E172124E73E8098A565E971064C20ACDE7C911",      // å¾®ä¿¡æ”¯ä»˜å…¬é’¥ID,如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013038816
                "d://wechatpay_47E172124E73E8098A565E971064C20ACDE7C911.pem"          // å¾®ä¿¡æ”¯ä»˜å…¬é’¥æ–‡ä»¶è·¯å¾„,本地文件路径
                "1723326069",                    // å•†æˆ·å·ï¼Œæ˜¯ç”±å¾®ä¿¡æ”¯ä»˜ç³»ç»Ÿç”Ÿæˆå¹¶åˆ†é…ç»™æ¯ä¸ªå•†æˆ·çš„唯一标识符,商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/merchant/4013070756
                "12C0F0DD0F3D2B565B45586D3FEA225EBF723BEC",         // å•†æˆ·API证书序列号,如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013053053
                "d://jinkuai/shanghu/apiclient_key.pem",    // å•†æˆ·API证书私钥文件路径,本地文件路径
                "PUB_KEY_ID_0117233260692025072500181939000603",      // å¾®ä¿¡æ”¯ä»˜å…¬é’¥ID,如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013038816
                "d://jinkuai/shanghu/pub_key.pem" // å¾®ä¿¡æ”¯ä»˜å…¬é’¥æ–‡ä»¶è·¯å¾„,本地文件路径
        );
        TransferToUserRequest request = new TransferToUserRequest();
        request.appid = "wxcd2b89fd2ff065f8"; //小程序id
        request.appid = "wx332441ae5b12be7d"; //小程序id
        request.outBillNo = "plfk2020042016";
        request.transferSceneId = "1005";
        request.openid = "oKKHU5IFKpss_DIbFX1lqghFJOEg";
        request.openid = "oFucG7Nu5teWNIZiWkAINfAE4glE";
//        request.userName = client.encrypt("施旭辉");
        request.transferAmount = 10L;
        request.transferRemark = "~~~";
@@ -83,13 +91,6 @@
    private final String wechatPayPublicKeyId;
    private final PublicKey wechatPayPublicKey;
    public TransferToUser(String mchid, String certificateSerialNo, String privateKeyFilePath, String wechatPayPublicKeyId, String wechatPayPublicKeyFilePath) {
        this.mchid = mchid;
        this.certificateSerialNo = certificateSerialNo;
        this.privateKey = WXPayUtility.loadPrivateKeyFromPath(privateKeyFilePath);
        this.wechatPayPublicKeyId = wechatPayPublicKeyId;
        this.wechatPayPublicKey = WXPayUtility.loadPublicKeyFromPath(wechatPayPublicKeyFilePath);
    }
    public TransferToUserResponse testRun(TransferToUserRequest request) {
        String uri = PATH;
@@ -126,7 +127,7 @@
    public TransferToUserResponse run(TransferToUserRequest request,String name) {
        String uri = PATH;
        request.appid = WxMiniConfig.wxProperties.getSubAppId();
//        request.notifyUrl = WxMiniConfig.wxProperties.getWechatNotifyUrl();
        request.notifyUrl = WxMiniConfig.wxProperties.getWechatNotifyUrl();
        request.transferSceneId = "1005";
        request.userRecvPerception = "劳务报酬";
        if(request.transferAmount >= 30){
@@ -170,7 +171,10 @@
                        httpResponse.headers(), respBody);
                // ä»ŽHTTP应答报文构建返回数据
                return WXPayUtility.fromJson(respBody, TransferToUserResponse.class);
                TransferToUser.TransferToUserResponse response =   WXPayUtility.fromJson(respBody, TransferToUserResponse.class);
                response.appId = request.appid;
                response.mchId = WxMiniConfig.wxProperties.getSubMchId();
                return response;
            } else {
                throw new WXPayUtility.ApiException(httpResponse.code(), respBody, httpResponse.headers());
            }
@@ -236,6 +240,12 @@
        @SerializedName("package_info")
        public String packageInfo;
        @SerializedName("mch_id")
        public String mchId;
        @SerializedName("app_id")
        public String appId;
    }
    public enum TransferBillStatus {
server/services/src/main/java/com/doumee/config/wx/WxMiniConfig.java
@@ -78,15 +78,27 @@
     */
    public void load_wxPayService()   {
        try {
//            Config config =
//                    new RSAPublicKeyConfig.Builder()
//                            .merchantId(wxPayProperties.getMchId())
//                            .privateKeyFromPath(wxPayProperties.getPrivateKeyPath())
//                            .publicKeyFromPath(wxPayProperties.getPubKeyPath())
//                            .publicKeyId("PUB_KEY_ID_0117000719222024112700219100000508")
//                            .merchantSerialNumber(wxPayProperties.getSerialNumer())
//                            .apiV3Key(wxPayProperties.getApiV3Key())
//                            .build();
            Config config =
                    new RSAAutoCertificateConfig.Builder()
                            .merchantId(wxPayProperties.getMchId())
                            .privateKeyFromPath(wxPayProperties.getPrivateKeyPath())
//                            .publicKeyFromPath(wxPayProperties.getPubKeyPath())
//                            .publicKeyId("PUB_KEY_ID_0117000719222024112700219100000508")
                            .merchantSerialNumber(wxPayProperties.getSerialNumer())
                            .apiV3Key(wxPayProperties.getApiV3Key())
                            .build();
            this.wxPayService =  new JsapiService.Builder().config(config).build();
//            this.wxPayService =  new JsapiService.Builder().config(config).build();
            this.jsapiExtService =  new JsapiServiceExtension.Builder().config(config).build();
            this.refundService = new RefundService.Builder().config(config).build();
            this.billDownloadService = new BillDownloadService.Builder().config(config).build();
server/services/src/main/java/com/doumee/config/wx/WxPayProperties.java
@@ -62,6 +62,7 @@
    private String typeId;// gybike
    private String privateKeyPath ;
    private String privateCertPath;// gybike
    private String pubKeyPath;//
    private String wechatSerialNumer;
server/services/src/main/java/com/doumee/core/constants/Constants.java
@@ -76,6 +76,12 @@
    public static final String WORKORDER_LOG_FILE_PATH ="WORKORDER_LOG_FILE_PATH" ;
    public static final String REDIS_TOKEN_KEY = "token_";
    public static final String SUCCESS = "SUCCESS";
    public static final String FAIL = "FAIL";
    public static final String CANCELLED = "CANCELLED";
    public interface   uploadType{
        String blob = "blob";
        String ftp = "ftp";
server/services/src/main/java/com/doumee/dao/dto/WithdrawalDTO.java
@@ -5,6 +5,8 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
 * Created by IntelliJ IDEA.
 *
@@ -15,8 +17,12 @@
@ApiModel("提现申请")
public class WithdrawalDTO {
    @ApiModelProperty(value = "提现金额 (单位:分)")
    private Long amount;
    @ApiModelProperty(value = "提现金额 (单位:元)")
    private BigDecimal amount;
    @ApiModelProperty(value = "真实姓名")
    private String name;
    @ApiModelProperty(value = "用户信息",hidden = true)
    private Member member;
server/services/src/main/java/com/doumee/service/business/WithdrawalOrdersService.java
@@ -102,4 +102,6 @@
    void cancelTransfer(TransferToUser.CancelTransferRequest request);
    void transferSuccess(String outBillNo,Boolean isSuccess);
}
server/services/src/main/java/com/doumee/service/business/impl/WithdrawalOrdersServiceImpl.java
@@ -28,6 +28,7 @@
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Objects;
@@ -181,14 +182,17 @@
    @Transactional(rollbackFor = {BusinessException.class,Exception.class})
    public TransferToUser.TransferToUserResponse  applyWithdrawal(WithdrawalDTO withdrawalDTO){
        if(Objects.isNull(withdrawalDTO)
        || Objects.isNull(withdrawalDTO.getAmount())){
        || Objects.isNull(withdrawalDTO.getAmount())
        || org.apache.commons.lang3.StringUtils.isBlank(withdrawalDTO.getName())
        || withdrawalDTO.getAmount().compareTo(BigDecimal.ZERO)<=Constants.ZERO
        ){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        Member member = memberMapper.selectById(withdrawalDTO.getMember().getId());
        if(Objects.isNull(member)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"用户信息异常,请联系管理员");
        }
        if(member.getAmount() < withdrawalDTO.getAmount()){
        if(member.getAmount() < withdrawalDTO.getAmount().multiply(new BigDecimal("100")).intValue()){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,可提现余额不足。");
        }
        if(StringUtils.isEmpty(member.getName())){
@@ -198,7 +202,7 @@
        withdrawalOrders.setCreateTime(new Date());
        withdrawalOrders.setMemberId(member.getId());
        withdrawalOrders.setOutBillNo(UUID.randomUUID().toString().replace("-",""));
        withdrawalOrders.setAmount(withdrawalDTO.getAmount());
        withdrawalOrders.setAmount((withdrawalDTO.getAmount().multiply(new BigDecimal("100"))).longValue());
        withdrawalOrders.setStatus(Constants.ZERO);
        withdrawalOrders.setType(Constants.ZERO);
        withdrawalOrders.setDeleted(Constants.ZERO);
@@ -207,18 +211,17 @@
        TransferToUser.TransferToUserRequest transferToUserRequest = new TransferToUser.TransferToUserRequest();
        transferToUserRequest.openid = member.getOpenid();
        transferToUserRequest.outBillNo =  withdrawalOrders.getOutBillNo();
        transferToUserRequest.transferAmount = withdrawalDTO.getAmount();
        transferToUserRequest.transferAmount = withdrawalOrders.getAmount();
        transferToUserRequest.transferRemark = "提现申请";
        try {
            TransferToUser.TransferToUserResponse response =  WxMiniConfig.transferToUser.run(transferToUserRequest,member.getName());
            TransferToUser.TransferToUserResponse response =  WxMiniConfig.transferToUser.run(transferToUserRequest,withdrawalDTO.getName());
            withdrawalOrders.setRemark(JSONObject.toJSONString(response));
            if(response.state.name().equals("WAIT_USER_CONFIRM") || response.state.name().equals("ACCEPTED")){
                withdrawalOrders.setWxExternalNo(response.transferBillNo);
            }
            withdrawalOrdersMapper.insert(withdrawalOrders);
            //更新用户余额
            memberMapper.update(new UpdateWrapper<Member>().lambda().setSql(" AMOUNT = AMOUNT -  " + withdrawalDTO.getAmount() ).eq(Member::getId,member.getId()));
            memberMapper.update(new UpdateWrapper<Member>().lambda().setSql(" AMOUNT = AMOUNT -  " + withdrawalOrders.getAmount() ).eq(Member::getId,member.getId()));
            //存储流水记录
            MemberRevenue memberRevenue = new MemberRevenue();
            memberRevenue.setCreateTime(new Date());
@@ -245,6 +248,48 @@
    @Override
    public void transferSuccess(String outBillNo,Boolean isSuccess){
        //转账成功
        if(isSuccess){
            withdrawalOrdersMapper.update(new UpdateWrapper<WithdrawalOrders>().lambda()
                    .set(WithdrawalOrders::getStatus,Constants.ONE)
                    .eq(WithdrawalOrders::getOutBillNo,outBillNo)
            );
        }else {
            WithdrawalOrders withdrawalOrders = withdrawalOrdersMapper.selectOne(new QueryWrapper<WithdrawalOrders>().lambda()
                    .eq(WithdrawalOrders::getOutBillNo,outBillNo).last("limit 1"));
            if(Objects.isNull(withdrawalOrders)){
                return;
            }
            Member member = memberMapper.selectById(withdrawalOrders.getMemberId());
            if(Objects.isNull(member)){
                return;
            }
            //更新用户余额
            memberMapper.update(new UpdateWrapper<Member>().lambda().setSql(" AMOUNT = AMOUNT +  " + withdrawalOrders.getAmount() ).eq(Member::getId,withdrawalOrders.getMemberId()));
            //存储流水记录
            MemberRevenue memberRevenue = new MemberRevenue();
            memberRevenue.setCreateTime(new Date());
            memberRevenue.setTransactionNo(withdrawalOrders.getOutBillNo());
            memberRevenue.setDeleted(Constants.ZERO);
            memberRevenue.setMemberId(withdrawalOrders.getMemberId());
            memberRevenue.setType(Constants.FOUR);
            memberRevenue.setOptType(Constants.ONE);
            memberRevenue.setBeforeAmount(member.getAmount());
            memberRevenue.setAmount(withdrawalOrders.getAmount());
            memberRevenue.setAfterAmount(member.getAmount() + withdrawalOrders.getAmount());
            memberRevenue.setObjId(withdrawalOrders.getId());
            memberRevenue.setRemark(Constants.RevenueType.getInfo(memberRevenue.getType()));
            memberRevenue.setObjType(Constants.ONE);
            memberRevenue.setDeleted(Constants.ZERO);
            memberRevenue.setStatus(Constants.ZERO);
            memberRevenueMapper.insert(memberRevenue);
        }
    }
    @Override
    public void cancelTransfer(TransferToUser.CancelTransferRequest request){
        if(Objects.isNull(request)
        || StringUtils.isEmpty(request.outBillNo)){
server/services/src/main/resources/application-dev.yml
@@ -85,20 +85,21 @@
  pay:
    #服务商---------start------- å‚数详解地址 https://pay.weixin.qq.com/doc/v3/partner/4013080340
    mchId: 1700071922    #服务商在微信支付侧的唯一身份标识
    appId: wx332441ae5b12be7d    #服务商在微信开放平台(移动应用)或公众平台(公众号/小程序)上申请的一个唯一标识
    appId: wx6cc1087ca79db7f6    #服务商在微信开放平台(移动应用)或公众平台(公众号/小程序)上申请的一个唯一标识
    apiV3Key: 0a056faa107c2b2944b9d6a9aa6d4142 #7tG4Vk9Zp2L8dXw5Jq0N3hR6yE1sF3cB
    serialNumer: 7DCD480EB6DF3791721867A6EB57105DECEF38BE #38495CE0137D90E4DC4F64F7ECDE035A35470BE3 #服务商证书序列号
    serialNumer: 6696086F6EFB8D6A4F821BD47DDBAF75C3BC1209 #38495CE0137D90E4DC4F64F7ECDE035A35470BE3 #服务商证书序列号
    #mchKey: W97N53Q71326D6JZ2E9HY5M4VT4BAC8S
    notifyUrl: https://test.doumee.cn/jinkuai_admin/web/wxPayNotify
    refundNotifyUrl: https://test.doumee.cn/jinkuai_admin/web/wxRefundNotify
    keyPath: d://jinkuai/apiclient_cert.p12
    privateCertPath: d://jinkuai/apiclient_cert.pem
    privateKeyPath: d://jinkuai/apiclient_key.pem
    pubKeyPath: d://jinkuai/pub_key.pem #商户支付公钥
    #服务商-------------end---
    #商户信息
    wechatSerialNumer: 38495CE0137D90E4DC4F64F7ECDE035A35470BE3
    wechatSerialNumer: 12C0F0DD0F3D2B565B45586D3FEA225EBF723BEC
    wechatPayPublicKeyId: PUB_KEY_ID_0117233260692025072500181939000603 #商户/平台支付公钥id
    wechatPubKeyPath: d://jinkuai/shanghu/pub_key.pem #商户支付公钥
    wechatPrivateKeyPath: d://jinkuai/shanghu/apiclient_key.pem #商户私钥
server/services/src/main/resources/application-test.yml
@@ -74,33 +74,34 @@
########################微信支付相关配置########################
wx:
  pay:
    #服务商---------start-------
    mchId: 1700071922 #服务商商户号
    appId: wx6cc1087ca79db7f6 #服务商APPID
    apiV3Key: 0a056faa107c2b2944b9d6a9aa6d4142
    serialNumer: 38495CE0137D90E4DC4F64F7ECDE035A35470BE3 #服务商证书序列号
    #服务商---------start------- å‚数详解地址 https://pay.weixin.qq.com/doc/v3/partner/4013080340
    mchId: 1700071922    #服务商在微信支付侧的唯一身份标识
    appId: wx332441ae5b12be7d    #服务商在微信开放平台(移动应用)或公众平台(公众号/小程序)上申请的一个唯一标识
    apiV3Key: 0a056faa107c2b2944b9d6a9aa6d4142 #7tG4Vk9Zp2L8dXw5Jq0N3hR6yE1sF3cB
    serialNumer: 7DCD480EB6DF3791721867A6EB57105DECEF38BE #38495CE0137D90E4DC4F64F7ECDE035A35470BE3 #服务商证书序列号
    #mchKey: W97N53Q71326D6JZ2E9HY5M4VT4BAC8S
    notifyUrl: https://test.doumee.cn/jinkuai_admin/web/wxPayNotify
    refundNotifyUrl: https://test.doumee.cn/jinkuai_admin/web/wxRefundNotify
    keyPath: /usr/local/zhengshu/apiclient_cert.p12
    privateCertPath: /usr/local/zhengshu/apiclient_cert.pem
    privateKeyPath: /usr/local/zhengshu/apiclient_key.pem
    keyPath: /usr/local/jars/payFile/apiclient_cert.p12
    privateCertPath: /usr/local/jars/payFile/apiclient_cert.pem
    privateKeyPath: /usr/local/jars/payFile/apiclient_key.pem
    #服务商-------------end---
    #商户信息
    wechatSerialNumer: 12C0F0DD0F3D2B565B45586D3FEA225EBF723BEC
    wechatPayPublicKeyId:  PUB_KEY_ID_0117233260692025072500181939000603 #商户/平台支付公钥id
    wechatPubKeyPath: /usr/local/zhengshu/pub_key.pem #商户支付公钥
    wechatPrivateKeyPath: /usr/local/zhengshu/shanghu/apiclient_key.pem #商户私钥
    wechatPubKeyPath: /usr/local/jars/payFile/shanghu/pub_key.pem #商户支付公钥
    wechatPrivateKeyPath: /usr/local/jars/payFile/shanghu/apiclient_key.pem #商户私钥
    wechatNotifyUrl: https://test.doumee.cn/jinkuai_admin/web/wechat/transferNotify #商户转账回调地址
    #服务商-------------end---
    existsSub: 1
    appSecret:
    #子商户------------start----
    subMchId: 1723326069    #子商户号
    subAppId: wx332441ae5b12be7d #小程序id
    subAppSecret: add86d6406f5c14501ac5bbb1a60e004 #小程序秘钥
    subMchId: 1723326069    #子商户号
    #子商户------------end----
    #      mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM
    typeId: gybike
server/web/src/main/java/com/doumee/JKWebApplication.java
@@ -24,8 +24,8 @@
        context.getEnvironment();
    }
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(JKWebApplication.class) ;
    }
//    @Override
//    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
//        return builder.sources(JKWebApplication.class) ;
//    }
}
server/web/src/main/java/com/doumee/api/web/ConfigApi.java
@@ -35,7 +35,6 @@
    @Autowired
    private CategoryService categoryService;
    @LoginRequired
    @ApiOperation(value = "获取分类列表", notes = "小程序端")
    @GetMapping("/getCategoryList")
    @ApiImplicitParams({
server/web/src/main/resources/logback-spring.xml
copy from server/services/src/main/resources/logback-spring.xml copy to server/web/src/main/resources/logback-spring.xml
Îļþ´Ó server/services/src/main/resources/logback-spring.xml ¸´ÖÆ
@@ -5,7 +5,7 @@
            <pattern>%highlight(%date{yyyy-MM-dd HH:mm:ss}) | %highlight(%-5level) | %highlight(%thread) | %highlight(%logger) | %msg%n</pattern>
        </layout>
    </appender>
    <property name="log.path" value="/usr/local/jars/official_website/logs"></property>
    <property name="log.path" value="/usr/local/jars/logs/web"></property>
    <property name="log.fileSize" value="100MB"></property>
    <property name="log.historyDays" value="7"></property>
    <appender name="fileInfoLog" class="ch.qos.logback.core.rolling.RollingFileAppender">