feat: 添加合约文件类型服务及错误处理改进

refactor: 重构合约文件类型相关代码,优化错误处理逻辑

fix: 修复WebSocket会话未绑定用户时的错误处理

style: 调整代码格式,提高可读性

docs: 更新部分代码注释

test: 添加合约文件类型服务的测试用例

chore: 移除无用代码,清理项目结构
This commit is contained in:
2025-09-12 00:12:51 +08:00
parent a1b87de7c0
commit fc263288e4
16 changed files with 357 additions and 124 deletions

View File

@@ -1,32 +1,30 @@
package com.ecep.contract.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import com.ecep.contract.ContractFileType;
import com.ecep.contract.model.Contract;
import com.ecep.contract.model.ContractFile;
import com.ecep.contract.model.ContractFileTypeLocal;
import com.ecep.contract.vm.ContractFileViewModel;
@Service
public class ContractFileService extends QueryService<ContractFile, ContractFileViewModel> {
public List<ContractFile> findAllByContract(Contract contract) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findAllByContract'");
}
public Map<ContractFileType, ContractFileTypeLocal> findAllFileTypes(String languageTag) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findAllFileTypes'");
Map<String, Object> params = new HashMap<>();
params.put("contract", contract.getId());
return findAll(params, Pageable.unpaged()).getContent();
}
public List<ContractFile> findAllByContractAndFileType(Contract contract, ContractFileType type) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findAllByContractAndFileType'");
Map<String, Object> params = new HashMap<>();
params.put("contract", contract.getId());
params.put("type", type.name());
return findAll(params, Pageable.unpaged()).getContent();
}
}