package cn.pluss.platform.ys.impl;

import cn.pluss.platform.channel.BaseMchChannelRateNewService;
import cn.pluss.platform.entity.MerchantRateNew;
import cn.pluss.platform.entity.Notification;
import cn.pluss.platform.notification.NotificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author DJH
 * 银盛老修改费率接口
 */
@Service("ysChangeRateNewService")
public class YsChangeRateNewServiceImpl extends BaseMchChannelRateNewService {

    @Autowired
    private NotificationService notificationService;

    @Override
    public void process(String userId, MerchantRateNew merchantRate) {
        // 此处不做任何变更，
        Notification notification = new Notification();
        notification.setTitle("D0费率修改申请");
        notification.setStatus("1");
        notification.setContent("用户" + userId + ", 申请修改费率");
        notificationService.save(notification);
    }

    @Override
    public String getChannelId() {
        return "4";
    }

    @Override
    public MerchantRateNew getDefaultRate() {
        MerchantRateNew rateNew = new MerchantRateNew();
        rateNew.setChannel(4);
        rateNew.setWxRate(38);
        rateNew.setAliRate(38);
        rateNew.setBankRate(38);
        rateNew.setBankRateLarge(38);
        return rateNew;
    }
}
