package com.hzs.member.detail.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hzs.common.core.domain.R;
import com.hzs.common.domain.member.detail.CuMemberServiceLog;
import com.hzs.common.domain.member.detail.CuMemberServiceLogExt;
import com.hzs.member.detail.vo.CuMemberServiceLogVO;
import com.hzs.member.handlebusiness.vo.BusinessMemberVO;

import java.util.List;

/**
 * 会员更名、密码修改表 服务类
 *
 * @author hzs
 * @since 2022-08-22
 */
public interface ICuMemberServiceLogService extends IService<CuMemberServiceLog> {

    /**
     * 查询最大审核次数
     *
     * @param pkMember
     * @param editType
     * @return
     */
    Integer selectByMaxApproveNumber(Long pkMember, Integer editType, Integer approveStatus);

    /**
     * @description: 查询会员办理业务日志最新数据
     * @author: zhang jing
     * @date: 2023/3/24 9:07
     * @param: [pkMember, editType, approveStatus]
     * @return: com.hzs.member.detail.vo.CuMemberServiceLogVO
     **/
    CuMemberServiceLog selectTopData(Long pkMember, int editType, int approveStatus);

    /**
     * @description: 查询用户是否已经存在未审核业务
     * @author: zhang jing
     * @date: 2023/1/29 17:25
     * @param: [cuMemberServiceLogVO]
     * @return: java.util.List<com.hzs.common.domain.member.detail.CuMemberServiceLog>
     **/
    List<CuMemberServiceLogVO> selectServiceLogList(CuMemberServiceLogVO cuMemberServiceLogVO);

    /**
     * 查询
     *
     * @param cuMemberServiceLog
     * @return
     */
    List<CuMemberServiceLogExt> selectByServiceLogList(CuMemberServiceLog cuMemberServiceLog);

    /**
     * @description: 查询审核通过的最新数据
     * @author: zhang jing
     * @date: 2023/1/30 10:02
     * @param: [cuMemberServiceLogVO]
     * @return: com.hzs.member.detail.vo.CuMemberServiceLogVO
     **/
    CuMemberServiceLogVO selectNewestServiceLog(CuMemberServiceLogVO cuMemberServiceLogVO);

    /**
     * @description: 查询会员原值
     * @author: zhang jing
     * @date: 2023/1/30 14:20
     * @param: [cuMemberOldValueVO]
     * @return: java.util.List<com.hzs.member.handleBusiness.vo.CuMemberOldValueVO>
     **/
    List<BusinessMemberVO> selectOldValue(BusinessMemberVO businessMemberVO);

    /**
     * @description: 再次发起签呈
     * @author: zhang jing
     * @date: 2023/2/2 11:15
     * @param: [cmslList, cuMemberServiceLogVO]
     * @return: com.hzs.member.detail.vo.CuMemberServiceLogVO
     **/
    CuMemberServiceLogVO againBusiness(List<CuMemberServiceLog> cmslList, CuMemberServiceLogVO cuMemberServiceLogVO);

    /**
     * 根据用户、业务类型查询业务办理仩
     *
     * @param cuMemberServiceLog 业务信息
     * @return List<CuMemberServiceLog>
     */
    List<CuMemberServiceLog> selectServiceValue(CuMemberServiceLogExt cuMemberServiceLog);

    /**
     * 查询pk_id最大的业务办理
     *
     * @param pkMember     服务log
     * @param editTypeList 业务办理类型
     */
    List<CuMemberServiceLog> queryMaxCuMemberServiceLog(Long pkMember, List<Integer> editTypeList);

    /**
     * 根据业务单号查询
     *
     * @return
     */
    R<CuMemberServiceLog> selectByBusinessNo(String businessNo);

    /**
     * 根据业务单号修改信息
     *
     * @param memberLog
     * @return
     */
    R<Boolean> updateByBusinessNo(CuMemberServiceLog memberLog);

    /**
     * 查询列表信息
     *
     * @param editType
     * @param memberCode
     * @param memberName
     * @param pkCountry
     * @param approveStatus
     * @return
     */
    List<CuMemberServiceLog> queryList(Integer editType, String memberCode, String memberName, Integer pkCountry, Integer approveStatus);

    /**
     * @description: 根据业务单号查询业务日志
     * @author: zhang jing
     * @date: 2023/7/29 11:16
     * @param: [businessNo]
     * @return: com.hzs.common.core.domain.R<java.util.List < com.hzs.common.domain.member.detail.CuMemberServiceLog>>
     **/
    R<List<CuMemberServiceLog>> selectCuMemberServiceLog(String businessNo);

    /**
     * 查询展示列表
     *
     * @return
     */
    List<CuMemberServiceLog> selectByList(CuMemberServiceLogExt memberServiceLogExt);

    /**
     * 查询指定会员政策币信息
     *
     * @param pkMember 会员ID
     * @return
     */
    CuMemberServiceLogExt queryPolicy(Long pkMember);

    /**
     * @description: 查询会员多个办理业务的日志最新数据
     * @author: zhang jing
     * @date: 2023/3/24 9:07
     * @param: [pkMember, editType, approveStatus]
     * @return: com.hzs.member.detail.vo.CuMemberServiceLogVO
     **/
    CuMemberServiceLogVO selectTopDataList(Long pkMember, List<Integer> editType, int approveStatus,String actEndDateStr);

}
