Files
contract-manager/client/src/main/java/com/ecep/contract/converter/CompanyStringConverter.java
songqq 039d753bab refactor(vo): 重构VO对象结构,统一字段命名和接口实现
重构所有VO对象,统一字段命名规范,移除冗余字段,优化接口实现
新增Voable接口用于VO对象转换
调整BaseViewModel和ProjectBasedViewModel接口定义
更新相关服务和控制器以适应VO对象变更
2025-09-21 17:47:52 +08:00

29 lines
736 B
Java

package com.ecep.contract.converter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import com.ecep.contract.service.CompanyService;
import com.ecep.contract.vo.CompanyVo;
import jakarta.annotation.PostConstruct;
@Lazy
@Component
public class CompanyStringConverter extends EntityStringConverter<CompanyVo> {
@Lazy
@Autowired
CompanyService service;
public CompanyStringConverter() {
}
@PostConstruct
private void init() {
setInitialized(project -> service.findById(project.getId()));
setSuggestion(service::search);
setFromString(service::findByName);
}
}