|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.hnac.hzims.safeproduct.hazard.controller; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
|
import com.hnac.hzims.safeproduct.hazard.dto.HazardLibraryDTO; |
|
|
|
@ -40,7 +41,9 @@ public class HazardLibraryController extends BladeController {
|
|
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
|
public R<List<HazardLibraryVO>> list(HazardLibraryDTO req) { |
|
|
|
|
HazardLibraryEntity library = BeanUtil.copy(req, HazardLibraryEntity.class); |
|
|
|
|
List<HazardLibraryEntity> list = hazardLibraryService.list(hazardLibraryService.getQueryWrapper(library)); |
|
|
|
|
LambdaQueryWrapper<HazardLibraryEntity> queryWrapper = hazardLibraryService.getQueryWrapper(library); |
|
|
|
|
queryWrapper.orderByDesc(HazardLibraryEntity::getCreateTime); |
|
|
|
|
List<HazardLibraryEntity> list = hazardLibraryService.list(queryWrapper); |
|
|
|
|
return R.data(HazardLibraryWrapper.build().listVO(list)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|