import com.alibaba.fastjson.JSONObject;
import com.gic.commons.util.DateUtil;
import com.gic.haoban.manage.api.dto.ContentMaterialDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.dto.moment.QwMomentPlanDTO;
import com.gic.haoban.manage.api.service.moment.QwMomentApiService;
import com.gic.haoban.manage.service.service.chat.GroupChatPlanService;
import com.gic.haoban.manage.service.service.content.impl.GroupMessageServiceImpl;
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.*;
import java.util.stream.Collectors;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:applicationContext-conf.xml"})
public class MomentTest {



    @Autowired
    private QwMomentApiService qwMomentApiService ;



    @Test
    public void ddd() {
            QwMomentPlanDTO dto = new QwMomentPlanDTO() ;
            dto.setPublishType(2);
            dto.setPublishTime(new Date());
            dto.setWxEnterpriseId("123");
            dto.setCreatorId("11");
            dto.setCreatorName("222");
            dto.setEnterpriseId("123");
            dto.setExecType(1);
            dto.setExpireDays(10);

            dto.setPlanClerkType(1);

            dto.setPlanId(770643491869106177L);

// ,"b2ef17cce11f476b996d0b27ebadf7fb"
            List<String> clerkIds = Arrays.asList("a02065ae51594fb9832e4199d4e3a1b0","753a367d709d40a38b17ed25847d3b4b") ;

            dto.setSelectClerkIdList(clerkIds);


            this.qwMomentApiService.save(dto) ;
    }

}
