package com.hzs.system.config.provider;

import com.hzs.common.core.domain.R;
import com.hzs.common.domain.system.config.BdAccount;
import com.hzs.common.domain.system.config.BdShare;
import com.hzs.system.config.IAccountServiceApi;
import com.hzs.system.config.IShareServiceApi;
import com.hzs.system.config.service.IBdAccountService;
import com.hzs.system.config.service.IBdShareService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Description: 分红配置的dubbo服务类
 * @Author: zhang jing
 * @Time: 2022/9/9 14:11
 * @Classname: GradeServiceProvider
 * @PackageName: com.hzs.system.config.provider
 */
@DubboService
public class ShareServiceProvider implements IShareServiceApi {

    @Autowired
    private IBdShareService shareService;

    /**
     * @description: 根据ID查询分红配置
     * @author: zhang jing
     * @date: 2022/9/22 10:04
     * @param: [accountProperty, pkCountry]
     * @return: com.hzs.common.core.domain.R<java.util.List<com.hzs.common.domain.system.config.BdAccount>>
     **/
    @Override
    public R<BdShare> getBdShareById(Integer id) {
        return R.ok(shareService.getBdShareById(id));
    }
}
