package com.hzs.member.detail.provider;

import com.hzs.common.core.domain.R;
import com.hzs.common.domain.member.detail.CuMemberServiceLog;
import com.hzs.member.detail.ICuMemberServiceLogServiceApi;
import com.hzs.member.detail.service.ICuMemberServiceLogService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class CuMemberServiceLogProvider implements ICuMemberServiceLogServiceApi {

    @Autowired
    private ICuMemberServiceLogService cuMemberServiceLogService;

    @Override
    public List<CuMemberServiceLog> queryMaxCuMemberServiceLog(Long pkMember, List<Integer> editTypeList) {
        return cuMemberServiceLogService.queryMaxCuMemberServiceLog(pkMember, editTypeList);
    }

    @Override
    public Integer selectByMaxApproveNumber(Long pkMember, int editType, int approveStatus) {
        return cuMemberServiceLogService.selectByMaxApproveNumber(pkMember, editType, approveStatus);
    }

    @Override
    public R<Boolean> insert(CuMemberServiceLog memberLog) {
        return R.ok(cuMemberServiceLogService.save(memberLog));
    }

    @Override
    public R<CuMemberServiceLog> selectByBusinessNo(String businessNo) {
        return cuMemberServiceLogService.selectByBusinessNo(businessNo);
    }

    @Override
    public R<Boolean> updateByBusinessNo(CuMemberServiceLog memberLog) {
        return cuMemberServiceLogService.updateByBusinessNo(memberLog);
    }

}
