package com.fs.store.service.handler;

import com.fs.common.core.domain.R;
import com.fs.common.core.redis.RedisCache;
import com.fs.huifuPay.service.impl.HuiFuServiceImpl;
import com.fs.store.domain.FsStoreOrder;
import com.fs.store.domain.FsStorePayment;
import com.fs.store.domain.FsUser;
import com.fs.store.mapper.FsStorePaymentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public abstract class PaymentHandler {
    @Autowired
    protected HuiFuServiceImpl huiFuService;
    @Autowired
    protected FsStorePaymentMapper fsStorePaymentMapper;
    @Autowired
    protected RedisCache redisCache;

    /**
     * 处理支付
     * @param order 订单信息
     * @param user 用户信息
     * @param payCode 支付编码
     * @return 处理结果
     */
//    protected R process(FsStoreOrder order, FsUser user, String payCode, FsStorePayment storePayment);

    /**
     * 是否支持
     * @return 支付类型
     */
    protected boolean support(String code){
        return false;
    }
}
