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.dto.chat.GroupChatActivityRewardLogDTO;
import com.gic.haoban.manage.api.qdto.chat.GroupChatActivityInviteLogQDTO;
import com.gic.haoban.manage.api.qdto.chat.GroupChatActivityRewardLogQDTO;
import com.gic.haoban.manage.api.service.chat.GroupChatActivityLogApiService;
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 GroupChatActivityLogApiService groupChatActivityLogApiService;


    @Test
    public void queryMaxBatchInviteLog(){
        GroupChatActivityInviteLogQDTO inviteLogQDTO = new GroupChatActivityInviteLogQDTO();
        inviteLogQDTO.setEnterpriseId("111");
        inviteLogQDTO.setChatActivityId(1L);
        inviteLogQDTO.setInviteType(1);
        inviteLogQDTO.setInviterMemberId("111");
        ServiceResponse<List<GroupChatActivityInviteLogDTO>> listServiceResponse = groupChatActivityLogApiService.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 = groupChatActivityLogApiService.queryInviteLogDetails(inviteLogQDTO);
        System.out.println(listServiceResponse.getResult());
    }

    @Test
    public void queryRewardLogDetails(){
        GroupChatActivityRewardLogQDTO inviteLogQDTO = new GroupChatActivityRewardLogQDTO();
        inviteLogQDTO.setEnterpriseId("111");
        inviteLogQDTO.setChatActivityId(1L);
        inviteLogQDTO.setMemberId("111");
        ServiceResponse<Page<GroupChatActivityRewardLogDTO>> listServiceResponse = groupChatActivityLogApiService.queryRewardLogDetails(inviteLogQDTO);
        System.out.println(listServiceResponse.getResult());
    }

}
