package com.hzya.frame.seeyon.cbs8.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDetailDao;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentDetailService;
import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description
 * @Author xiangerlin
 * @Date 2024/6/26 11:01
 **/
@Service("OAAgentPaymentDetailServiceImpl")
public class AgentPaymentDetailServiceImpl extends BaseService<AgentPaymentDetailEntity,String> implements IAgentPaymentDetailService {

    private IAgentPaymentDetailDao agentPaymentDetailDao;

    @Autowired
    public void setAgentPaymentDetailDao(IAgentPaymentDetailDao agentPaymentDetailDao) {
        this.agentPaymentDetailDao = agentPaymentDetailDao;
        this.dao = agentPaymentDetailDao;
    }

    /**
     * 更新明细表支付状态
     *
     * @param detail
     */
    @DS("#detail.dataSourceCode")
    @Override
    public void updatePayResult(AgentPaymentDetailEntity detail) {
        agentPaymentDetailDao.update("com.hzya.frame.seeyon.cbs8.dao.impl.AgentPaymentDetailDaoImpl.entity_update_result",detail);
    }
}
