package com.ningdatech.pmapi.cctask;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.pmapi.AppTests;
import com.wflow.bean.entity.WflowCcTasks;
import com.wflow.service.WflowCcTasksService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Classname CcTaskTest
 * @Description
 * @Date 2023/6/30 16:52
 * @Author PoffyZhang
 */
public class CcTaskTest extends AppTests {

    @Autowired
    private WflowCcTasksService wflowCcTasksService;

    @Test
    public void test(){
        String nodeId = "node_649e9620711424df271ba98c";
        String instanceId = "72fffd9c-1722-11ee-b7f5-02426daa406d";
        List<WflowCcTasks> ccTasks = wflowCcTasksService.list(Wrappers.lambdaQuery(WflowCcTasks.class)
                .eq(WflowCcTasks::getNodeId,nodeId)
                .eq(WflowCcTasks::getInstanceId,instanceId));
        System.out.println(JSON.toJSONString(ccTasks));
    }

}
