feat: 添加供应商类型本地化支持及优化表格单元格显示
refactor: 重构供应商类型相关服务及控制器 fix: 修复供应商类型表格单元格初始化问题 style: 优化代码格式及导入顺序
This commit is contained in:
@@ -138,17 +138,6 @@ public class CompanyVendorService extends QueryService<CompanyVendorVo, CompanyV
|
||||
return valid;
|
||||
}
|
||||
|
||||
public List<VendorTypeLocal> findAllTypes(Locale locale) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findAllTypes'");
|
||||
}
|
||||
|
||||
public List<VendorTypeLocal> findAllTypes(String languageTag) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findAllTypes'");
|
||||
}
|
||||
|
||||
|
||||
public boolean makePathAbsent(CompanyVendorVo companyVendor) {
|
||||
String path = companyVendor.getPath();
|
||||
if (StringUtils.hasText(path)) {
|
||||
|
||||
@@ -16,13 +16,15 @@ import java.util.Locale;
|
||||
@Service
|
||||
@CacheConfig(cacheNames = "vendor-type")
|
||||
public class VendorTypeService extends QueryService<VendorTypeLocalVo, VendorTypeLocalViewModel> {
|
||||
private final StringConverter<VendorTypeLocalVo> stringConverter = new VendorTypeStringConverter(this);
|
||||
|
||||
@Cacheable(key = "#p0")
|
||||
@Override
|
||||
public VendorTypeLocalVo findById(Integer id) {
|
||||
return super.findById(id);
|
||||
}
|
||||
|
||||
@Cacheable(key = "'type-'+#p0")
|
||||
@Cacheable(key = "'type-'+#p0.ordinal()")
|
||||
public VendorTypeLocalVo findByType(VendorType type) {
|
||||
return findAll(ParamUtils.builder().equals("type", type).build(), Pageable.ofSize(1)).stream().findFirst()
|
||||
.orElse(null);
|
||||
@@ -46,8 +48,6 @@ public class VendorTypeService extends QueryService<VendorTypeLocalVo, VendorTyp
|
||||
super.delete(entity);
|
||||
}
|
||||
|
||||
private StringConverter<VendorTypeLocalVo> stringConverter = new VendorTypeStringConverter(this);
|
||||
|
||||
@Override
|
||||
public StringConverter<VendorTypeLocalVo> getStringConverter() {
|
||||
return stringConverter;
|
||||
|
||||
Reference in New Issue
Block a user