import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.dto.chat.GroupChatActivityInviteLogDTO;
import com.gic.haoban.manage.api.qdto.chat.GroupChatActivityInviteLogQDTO;
import com.gic.haoban.manage.api.service.chat.GroupChatActivityInviteLogApiService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

/**
 * @author shangfeng
 * @date 2024-10-08 14:46:55
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:applicationContext-conf.xml"})
public class GroupChatInviteActivityTest {

    @Autowired
    private GroupChatActivityInviteLogApiService groupChatActivityInviteLogApiService;

    @Test
    public void queryMaxBatchInviteLog(){
        GroupChatActivityInviteLogQDTO inviteLogQDTO = new GroupChatActivityInviteLogQDTO();
        inviteLogQDTO.setEnterpriseId("111");
        inviteLogQDTO.setChatActivityId(1L);
        inviteLogQDTO.setInviteType(1);
        inviteLogQDTO.setInviterMemberId("111");
        ServiceResponse<List<GroupChatActivityInviteLogDTO>> listServiceResponse = groupChatActivityInviteLogApiService.queryMaxBatchInviteLog(inviteLogQDTO);
        System.out.println(listServiceResponse.getResult());
    }

    @Test
    public void queryInviteLogDetails(){
        GroupChatActivityInviteLogQDTO inviteLogQDTO = new GroupChatActivityInviteLogQDTO();
        inviteLogQDTO.setEnterpriseId("111");
        inviteLogQDTO.setChatActivityId(1L);
        inviteLogQDTO.setInviterMemberId("111");
        inviteLogQDTO.setSortFiled("create_time");
        inviteLogQDTO.setSortType("desc");
        ServiceResponse<Page<GroupChatActivityInviteLogDTO>> listServiceResponse = groupChatActivityInviteLogApiService.queryInviteLogDetails(inviteLogQDTO);
        System.out.println(listServiceResponse.getResult());
    }
}
