lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/ComponentInfoController.java
@@ -1,8 +1,10 @@
package org.jeecg.modules.dnc.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.dnc.entity.ComponentInfo;
import org.jeecg.modules.dnc.entity.PermissionStream;
@@ -64,4 +66,20 @@
        }
        return new ResponseResult(CommonCode.FAIL);
    }
    @AutoLog(value = "查询可以被引用的部件")
    @ApiOperation(value = "查询可以被引用的部件", notes = "查询可以被引用的部件")
    @GetMapping("/getByComponentId")
    public Result<?> getByComponentId(ComponentInfo componentInfo, Integer pageNo, Integer pageSize) {
        IPage<ComponentInfo> iPage = componentInfoService.getByComponentId(componentInfo, pageNo, pageSize);
        return Result.OK(iPage);
    }
    @AutoLog(value = "借用部件(可批量)")
    @ApiOperation(value = "借用部件(可批量)", notes = "借用部件(可批量)")
    @PostMapping("/borrow")
    public Result<?> borrowComponent(@RequestParam("oldId") String oldId, @RequestParam("newIds") String newIds) {
        return componentInfoService.borrowComponent(oldId,newIds);
    }
}