package com.gic.haoban.manage.service.service.out.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.service.HaobanTimerApiService;
import com.gic.haoban.manage.service.service.ExternalClerkRelatedService;
import com.gic.haoban.manage.service.service.ExternalMemberService;
import com.gic.haoban.manage.service.service.StaffDepartmentRelatedService;
import com.gic.haoban.manage.service.service.chat.GroupChatService;
import com.gic.haoban.manage.service.service.hm.HmQrcodeTempService;

@Service("haobanTimerApiService")
public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {

    @Autowired
    private HmQrcodeTempService hmQrcodeTempService;
    @Autowired
    private ExternalClerkRelatedService externalClerkRelatedService;
    @Autowired
    private StaffDepartmentRelatedService staffDepartmentRelatedService;
    @Autowired
    private GroupChatService groupChatService;
    @Autowired
    private ExternalMemberService externalMemberService ;
    

    @Override
    public ServiceResponse<Void> deleteTempWxHm(String params) {
        this.hmQrcodeTempService.deleteForTimer();
        return ServiceResponse.success();
    }

    @Override
    public ServiceResponse<Void> repairExternalUserId(String wxEnterpriseId) {
        this.externalClerkRelatedService.repairExternalUserId(wxEnterpriseId);
        return ServiceResponse.success();
    }

    @Override
    public ServiceResponse<Void> repairStaffDepart(String params) {
        this.staffDepartmentRelatedService.repairAllStaffDepart(params);
        return ServiceResponse.success();
    }

    @Override
    public ServiceResponse<Void> handChatNotice(String params) {
        this.groupChatService.handChatNotice(params);
        return ServiceResponse.success();
    }

    @Override
    public ServiceResponse<Void> initGroupChat(String params) {
        this.groupChatService.initGroupChatForTimer(params);
        return ServiceResponse.success();
    }

    @Override
    public ServiceResponse<Void> initHaobaonGroupChat(String params) {
        this.groupChatService.initHaobaonGroupChat(params);
        return ServiceResponse.success();
    }

    @Override
    public ServiceResponse<Void> handleHmChatFull(String params) {
        this.groupChatService.handleHmChatFull(params);
        return ServiceResponse.success();
    }

    @Override
    public ServiceResponse<Void> ownerDimission(String params) {
        this.groupChatService.ownerDimission();
        return ServiceResponse.success();
    }
    
    @Override
    public ServiceResponse<Void> welcomeForMember(String params) {
        this.externalMemberService.welcomeForMember() ;
        return ServiceResponse.success();
    }
}
