package cn.iocoder.yudao.module.crm.api.userlivetree;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.crm.service.userlivetree.UserLiveTreeService;
import cn.iocoder.yudao.module.hrm.api.userlivetree.UserLiveTreeApi;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

/**
 * Flowable CRM Api 实现类
 */
@RestController
@Validated
public class UserLiveTreeApiImpl implements UserLiveTreeApi {

    @Resource
    private UserLiveTreeService userLiveTreeService;

    @Override
    public CommonResult<List<Long>> getItemIdsByUserId(Long id) {

        return success(userLiveTreeService.getItemIdsByUserId(id));
    }
}
