Merge branch 'hotfix/master-20250425' into feature/202504-1
This commit is contained in:
commit
651d6189bc
|
|
@ -224,7 +224,7 @@ public class TicketController extends ControllerBase {
|
|||
* @return 部件列表
|
||||
*/
|
||||
@GetMapping("getDeviceComponents")
|
||||
public ApiResult<List<String>> getDeviceComponents(@RequestParam String name){
|
||||
public ApiResult<List<ComponentInfo>> getDeviceComponents(@RequestParam String name){
|
||||
return ApiResult.success(partService.getSimpleList(name));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
package com.nflg.mobilebroken.common.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ComponentInfo {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public interface ITBasePartService extends IService<TBasePart> {
|
|||
|
||||
List<ExportPartDTO> exportPart(@Param("partNo")String partNo, @Param("partName") String partName);
|
||||
|
||||
List<String> getSimpleList(String name);
|
||||
List<ComponentInfo> getSimpleList(String name);
|
||||
|
||||
List<ComponentInfo> getAllDeviceComponents(String language);
|
||||
|
||||
|
|
|
|||
|
|
@ -44,13 +44,13 @@ public class TBasePartServiceImpl extends ServiceImpl<TBasePartMapper, TBasePart
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<String> getSimpleList(String name) {
|
||||
public List<ComponentInfo> getSimpleList(String name) {
|
||||
return lambdaQuery()
|
||||
.eq(TBasePart::getEnable, 1)
|
||||
.like(StrUtil.isNotBlank(name),TBasePart::getPartName, name)
|
||||
.list()
|
||||
.stream()
|
||||
.map(TBasePart::getPartName)
|
||||
.map(p->new ComponentInfo().setId(p.getId()).setName(p.getPartName()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue