//package com.greenorange.promotion.controller.wechat;
//
//
//import cn.hutool.http.HttpUtil;
//import cn.hutool.json.JSONUtil;
//import com.greenorange.promotion.common.BaseResponse;
//import com.greenorange.promotion.common.ResultUtils;
//import com.greenorange.promotion.utils.OrderNumberUtils;
//import io.swagger.v3.oas.annotations.Hidden;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import jakarta.servlet.http.HttpServletRequest;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.transaction.annotation.Transactional;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.io.IOException;
//import java.util.HashMap;
//import java.util.Map;
//
//@Slf4j
//@RestController
//@Tag(name = "微信提现模块")
//@RequestMapping("/payouts")
//@Transactional
//public class WechatPayoutsController {
//
//
//    /**
//     * 微信小程序积分提现到银行卡
//     */
//    @Hidden
//    @PostMapping("/points")
//    @Operation(summary = "微信小程序积分提现到银行卡", description = "参数：无, 权限：所有人, 方法名：getQrcode")
//    public BaseResponse<Boolean> pointsWithdrawnToBankCard(HttpServletRequest request) throws IOException {
//        Map<String, Object> param = new HashMap<>();
//        param.put("mch_id", "1700326544");
//        param.put("partner_trade_no", OrderNumberUtils.generateOrderId());
//        param.put("nonce_str", "fbemuj4Xql7CYlQJAoTEPYxvPSNgYT2t");
//        param.put("sign", "");
//        param.put("enc_bank_no", "6222031207006363442");
//        param.put("enc_true_name", "陈新知");
//        param.put("bank_code", "1002");
//        param.put("amount", 5);
//        param.put("desc", "提现");
//        String url = "https://api.mch.weixin.qq.com/mmpaysptrans/pay_bank";
//        String jsonParams = JSONUtil.toJsonStr(param);
//        String response = HttpUtil.createPost(url)
//                .header("Content-Type", "application/json")
//                .body(jsonParams)
//                .execute()
//                .body();
//
//        return ResultUtils.success(true);
//    }
//
//
//
//
//}
