package com.liquidnet.service.dragon.channel.wepay.biz;

import com.liquidnet.service.dragon.channel.wepay.req.WepayPrePayReq;
import com.liquidnet.service.dragon.dto.DragonPayBaseReqDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author AnJiabin <anjiabin@zhengzai.tv>
 * @version V1.0
 * @Description: TODO
 * @class: WepayBiz
 * @Package com.liquidnet.service.dragon.channel.wepay.biz
 * @Copyright: LightNet @ Copyright (c) 2021
 * @date 2021/7/10 16:46
 */
@Slf4j
@Component
public class WepayBiz {
    public WepayPrePayReq sealWeixinPerPay(DragonPayBaseReqDto dragonPayBaseReqDto) {
        WepayPrePayReq WepayPrePayReq = new WepayPrePayReq();

//        WepayPrePayReq.setAppid(appId);
//        WepayPrePayReq.setMchId(mchId);
//        WepayPrePayReq.setBody(productName);// 商品描述
//        WepayPrePayReq.setAttach(remark);// 支付备注
//        WepayPrePayReq.setOutTradeNo(bankOrderNo);// 银行订单号
//
//        Integer totalFee = orderPrice.multiply(BigDecimal.valueOf(100d)).intValue();
//        WepayPrePayReq.setTotalFee(totalFee);// 订单金额
//        WepayPrePayReq.setTimeStart(DateUtil.parse(orderTime, "yyyyMMddHHmmss"));// 订单开始时间
////        WepayPrePayReq.setTimeExpire(DateUtil.formatDate(DateUtil.addMinute(orderTime, orderPeriod), "yyyyMMddHHmmss"));// 订单到期时间
//        WepayPrePayReq.setNotifyUrl(WeixinConfigUtil.readConfig("notify_url"));// 通知地址
////        WepayPrePayReq.setTradeType("");// 交易类型
//        WepayPrePayReq.setProductId(productId);// 商品ID
//        WepayPrePayReq.setOpenid(openId);// 用户标识
//        WepayPrePayReq.setSpbillCreateIp(orderIp);// 下单IP

        return WepayPrePayReq;
    }
}
