Merge branch 'hotfix/master-20250425' into feature/202504-1

This commit is contained in:
曹鹏飞 2025-04-25 11:29:09 +08:00
commit 651d6189bc
4 changed files with 6 additions and 4 deletions

View File

@ -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));
}

View File

@ -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 {
/**

View File

@ -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);

View File

@ -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());
}