fix: 修复Import生成逻辑(自动导入V1框架工具类)

🐛 问题根源:
- 转换器已正确使用框架能力(JsonUtils/CommonUtils/StringUtils)
- 但service-generator未调用转换器的analyzeImports()
- 导致工具类import缺失

 修复内容:
1. service-generator.analyzeAdditionalImports()
   - 调用methodConverter.analyzeImports()获取完整import列表
   - 新增Boot层工具类检测: JsonUtils/CommonUtils/StringUtils
   - 新增服务检测: AppConfigService/RequestContextService

2. service-generator.generateImports()
   - 动态添加Boot层工具类到import语句

3. service-generator.generateConstructor()
   - 自动注入AppConfigService (this.appConfig)
   - 自动注入RequestContextService (this.requestContext)

🎯 预期效果:
- 15,474个错误 → 预计降到5000以内
- 'Cannot find name JsonUtils' → 0
- 'Cannot find name CommonUtils' → 0
- 'Cannot find name StringUtils' → 0
This commit is contained in:
wanwu
2025-10-29 16:23:28 +08:00
parent 2999dd48c0
commit c730dca038
84 changed files with 276 additions and 222 deletions

View File

@@ -166,6 +166,8 @@ ${methods}
/**
* 分析方法体识别需要的额外imports
*
* ✅ 调用 ServiceMethodConverter.analyzeImports 获取完整的import列表
*/
analyzeAdditionalImports(methodsCode) {
const imports = {
@@ -174,6 +176,33 @@ ${methods}
boot: new Set()
};
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// 【调用转换器的analyzeImports获取V1框架能力的imports】
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
const converterImports = this.methodConverter.analyzeImports(methodsCode);
converterImports.forEach(importItem => {
if (importItem === 'JsonUtils' || importItem === 'CommonUtils' || importItem === 'StringUtils') {
imports.boot.add(importItem);
} else if (importItem === 'AppConfigService') {
imports.boot.add('AppConfigService');
} else if (importItem === 'nestjs:BadRequestException') {
imports.nestjs.add('BadRequestException');
} else if (importItem === 'nestjs:UnauthorizedException') {
imports.nestjs.add('UnauthorizedException');
} else if (importItem === 'node:fs') {
imports.nodeModules.add('fs');
} else if (importItem === 'node:path') {
imports.nodeModules.add('path');
} else if (importItem === 'boot:RequestContextService') {
imports.boot.add('RequestContextService');
}
});
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// 【兼容旧的检测逻辑(备用)】
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// NestJS异常
if (methodsCode.includes('BadRequestException')) {
imports.nestjs.add('BadRequestException');
@@ -190,9 +219,21 @@ ${methods}
imports.nodeModules.add('path');
}
// ConfigService
if (methodsCode.includes('this.config.')) {
imports.boot.add('ConfigService');
// Boot层工具类
if (methodsCode.includes('JsonUtils.')) {
imports.boot.add('JsonUtils');
}
if (methodsCode.includes('CommonUtils.')) {
imports.boot.add('CommonUtils');
}
if (methodsCode.includes('StringUtils.')) {
imports.boot.add('StringUtils');
}
if (methodsCode.includes('this.appConfig.')) {
imports.boot.add('AppConfigService');
}
if (methodsCode.includes('this.requestContext.')) {
imports.boot.add('RequestContextService');
}
return {
@@ -230,7 +271,10 @@ ${methods}
imports.push("import { Repository } from 'typeorm';");
// ✅ Boot层按需导入
// 基础服务(总是导入)
const bootImports = ['QueueService', 'EventBus', 'Result'];
// 添加额外的Boot层imports工具类、服务等
if (additionalImports.boot && additionalImports.boot.length > 0) {
additionalImports.boot.forEach(item => {
if (!bootImports.includes(item)) {
@@ -238,7 +282,11 @@ ${methods}
}
});
}
// 生成import语句
if (bootImports.length > 0) {
imports.push(`import { ${bootImports.join(', ')} } from '@wwjBoot';`);
}
// ✅ Node.js模块按需导入
if (additionalImports.nodeModules && additionalImports.nodeModules.length > 0) {
@@ -317,12 +365,18 @@ ${methods}
generateConstructor(javaService, additionalImports = {}) {
const injections = [];
// ✅ 添加ConfigService注入如果需要
// ✅ 添加Boot层服务注入按需
if (additionalImports.boot && additionalImports.boot.includes('AppConfigService')) {
injections.push(' private readonly appConfig: AppConfigService,');
}
if (additionalImports.boot && additionalImports.boot.includes('RequestContextService')) {
injections.push(' private readonly requestContext: RequestContextService,');
}
if (additionalImports.boot && additionalImports.boot.includes('ConfigService')) {
injections.push(' private readonly config: ConfigService,');
}
// 添加框架服务注入
// 添加框架服务注入(总是注入)
injections.push(' private readonly eventBus: EventBus,');
injections.push(' private readonly queueService: QueueService,');

View File

@@ -15,7 +15,7 @@ export class AddonDevelopServiceImplService {
* list
*/
async list(...args: any[]): Promise<any[]> {
const list: AddonDevelopListVo[] = new LinkedList();
const list: AddonDevelopListVo[] = [];
try {
// 获取已安装的插件

View File

@@ -21,7 +21,7 @@ export class AddonLogServiceImplService {
[AddonLog[], number] iPage = this.addonLogRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: AddonLogListVo[] = new LinkedList();
const list: AddonLogListVo[] = [];
for (const item of iPageRecords) {
const vo: AddonLogListVo = new AddonLogListVo();
Object.assign(vo, item);

View File

@@ -90,7 +90,7 @@ export class AddonServiceImplService {
any /* TODO: QueryWrapper<Addon> */ queryWrapper = new QueryWrapper();
queryWrapper.orderByDesc("id");
[Addon[], number] iPage = this.addonRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: AddonListVo[] = new LinkedList();
const list: AddonListVo[] = [];
for (const item of iPageRecords) {
const vo: AddonListVo = new AddonListVo();
Object.assign(vo, item);
@@ -225,7 +225,7 @@ export class AddonServiceImplService {
actionQuery.put("data[product_key]", instance.getProductKey());
const actionToken: Record<string, any> = this.niucloudService.getActionToken("download", actionQuery);
Record<String, Object> = new HashMap();
Record<String, Object> = {};
query.put("authorize_code", instance.getCode());
query.put("addon_name", addon);
query.put("version", version);
@@ -256,7 +256,7 @@ export class AddonServiceImplService {
* getIndexAddonList
*/
async getIndexAddonList(...args: any[]): Promise<any> {
const params: Record<String, Object> = new HashMap();
const params: Record<String, Object> = {};
const config: NiucloudConfigVo = this.coreNiucloudConfigService.getNiucloudConfig();
params.put("code", config.getAuthCode());
params.put("secret", config.getAuthSecret());

View File

@@ -109,9 +109,9 @@ export class AuthServiceImplService {
const siteId: number = this.requestContext.siteId;
const uid: number = RequestUtils.uid();
const appType: string = RequestUtils.appType();
Map<String, String[]> authApi = new HashMap();
Map<String, String[]> authApi = {};
const sysUserRoleInfoVo: SysUserRoleInfoVo = new SysUserRoleInfoVo();
const menuList: SysMenu[] = new ArrayList();
const menuList: SysMenu[] = [];
if (isSuperAdmin()) {
isAdmin = 1;
} else {
@@ -122,7 +122,7 @@ export class AuthServiceImplService {
isAdmin = sysUserRoleInfoVo.getIsAdmin();//是否是超级管理员
}
if (isAdmin > 0) {
menuList = this.sysMenuService.getMenuListByCondition(appType, siteId, 1, 0, new ArrayList(), addon);
menuList = this.sysMenuService.getMenuListByCondition(appType, siteId, 1, 0, [], addon);
} else {
const roleIdList: string[] = JSONUtil.toList(JSONUtil.parseArray(sysUserRoleInfoVo.getRoleIds()), String.class);
const menuKeyList: string[] = this.sysRoleService.getMenuIdsByRoleIds(siteId, roleIdList);

View File

@@ -51,7 +51,7 @@ export class LoginServiceImplService {
const defaultSiteId: number = 0;
const roleInfoVo: SysUserRoleInfoVo = new SysUserRoleInfoVo();
const siteIds: number[] = new ArrayList();
const siteIds: number[] = [];
if(appType === AppTypeEnum.path.basename(ADMIN)){
defaultSiteId=RequestUtils.defaultSiteId();
roleInfoVo=this.sysUserRoleService.getUserRole(defaultSiteId, userInfo.getUid());

View File

@@ -39,7 +39,7 @@ export class AdminAppServiceImplService {
any /* TODO: Page<AppVersion> */ resultPage = this.appVersionRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ });
const list: AppVersionListVo[] = new LinkedList();
const list: AppVersionListVo[] = [];
for (const item of resultPageRecords) {
const vo: AppVersionListVo = new AppVersionListVo();
BeanUtil.copyProperties(item, vo);

View File

@@ -30,7 +30,7 @@ export class DictServiceImplService {
queryWrapper.orderByDesc("id");
[SysDict[], number] iPage = this.dictRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: DictListVo[] = new LinkedList();
const list: DictListVo[] = [];
for (const item of iPageRecords) {
const vo: DictListVo = new DictListVo();
Object.assign(vo, item);
@@ -106,7 +106,7 @@ export class DictServiceImplService {
queryWrapper.orderByDesc("id");
const voList: SysDict[] = this.dictRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ });
const list: DictListVo[] = new LinkedList();
const list: DictListVo[] = [];
for (const item of voList) {
const vo: DictListVo = new DictListVo();
Object.assign(vo, item);

View File

@@ -15,7 +15,7 @@ export class DiyRouteServiceImplService {
*/
async list(...args: any[]): Promise<any[]> {
const linkEnum: Record<string, any> = LinkEnum.getLink();
const routerList: DiyRouteListVo[] = new LinkedList();
const routerList: DiyRouteListVo[] = [];
const sort: number = 0;
for (const key of linkEnum.keySet()) {

View File

@@ -28,7 +28,7 @@ export class DiyServiceImplService {
const template: Record<string, any> = TemplateEnum.getTemplate();
List<Record<String, Object>> templateAddon = TemplateEnum.getTemplateAddons((this.requestContext.siteId));
[DiyPage[], number] iPage = this.diyPageRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: DiyPageListVo[] = new LinkedList();
const list: DiyPageListVo[] = [];
for (const item of iPageRecords) {
const vo: DiyPageListVo = new DiyPageListVo();
Object.assign(vo, item);
@@ -61,7 +61,7 @@ export class DiyServiceImplService {
}
const pages: DiyPage[] = this.diyPageRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ });
const list: DiyPageListVo[] = new LinkedList();
const list: DiyPageListVo[] = [];
for (const item of pages) {
const vo: DiyPageListVo = new DiyPageListVo();
@@ -332,7 +332,7 @@ export class DiyServiceImplService {
// 安全遍历顶层数据
Iterator<String> categoryIterator = data.keySet().iterator();
const categoryToRemove: string[] = new ArrayList();
const categoryToRemove: string[] = [];
while (categoryIterator.hasNext()) {
const categoryKey: string = categoryIterator.next();
@@ -343,7 +343,7 @@ export class DiyServiceImplService {
const sortMap: Record<string, any> = new Record<string, any>();
// 安全遍历组件列表
const keysToRemove: string[] = new ArrayList();
const keysToRemove: string[] = [];
for (const componentKey of new ArrayList<>(componentList.keySet())) {
const component: Record<string, any> = componentList.getRecord<string, any>(componentKey);
const supportPage: JSONArray = component.getJSONArray("support_page");
@@ -499,7 +499,7 @@ export class DiyServiceImplService {
.orderByDesc("id");
[DiyPage[], number] iPage = this.diyPageRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: DiyPageListVo[] = new LinkedList();
const list: DiyPageListVo[] = [];
for (const item of iPageRecords) {
const vo: DiyPageListVo = new DiyPageListVo();
Object.assign(vo, item);
@@ -661,7 +661,7 @@ export class DiyServiceImplService {
const templates: Record<string, any> = TemplateEnum.getTemplate(new TemplateParam());
[DiyPage[], number] iPage = this.diyPageRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: DiyPageListVo[] = new LinkedList();
const list: DiyPageListVo[] = [];
for (const item of iPageRecords) {
const vo: DiyPageListVo = new DiyPageListVo();
Object.assign(vo, item);

View File

@@ -16,7 +16,7 @@ export class DiyThemeServiceImplService {
const siteId: number = this.requestContext.siteId;
const siteCache: SiteInfoVo = this.coreSiteService.getSiteCache(siteId);
const themeDataList: DiyTheme[] = this.diyThemeRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }).eq("type", "app").eq("is_selected", 1));
const themeData: Record<String, DiyTheme> = new HashMap();
const themeData: Record<String, DiyTheme> = {};
if ((themeDataList && themeDataList.length > 0)){
themeData = themeDataList.collect(/* Collectors已删除 */.toMap(theme => theme.getAddon(), theme => theme));
}
@@ -93,7 +93,7 @@ export class DiyThemeServiceImplService {
throw new BadRequestException("主题色不存在");
}
const addonData: Addon[] = this.addonRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ })));
const addonSaveData: DiyTheme[] = new ArrayList();
const addonSaveData: DiyTheme[] = [];
if(CommonUtils.isNotEmpty(addonData)){
for (const addon of addonData) {
const saveData: DiyTheme = new DiyTheme();
@@ -132,7 +132,7 @@ export class DiyThemeServiceImplService {
async getDefaultThemeColor(...args: any[]): Promise<any> {
const addon: string = data.getAddon();
const themeList: DiyTheme[] = this.diyThemeRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ })).eq("addon", addon));
const voList: DiyThemeInfoVo[] = new ArrayList();
const voList: DiyThemeInfoVo[] = [];
for (const theme of themeList) {
const vo: DiyThemeInfoVo = new DiyThemeInfoVo();
Object.assign(vo, theme);
@@ -152,7 +152,7 @@ export class DiyThemeServiceImplService {
async addDiyTheme(...args: any[]): Promise<any> {
const siteId: number = this.requestContext.siteId;
const addonData: Addon[] = this.addonRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ })));
const addonSaveData: DiyTheme[] = new ArrayList();
const addonSaveData: DiyTheme[] = [];
if ((addonData && addonData.length > 0)) {
for (const addon of addonData) {
@@ -192,7 +192,7 @@ export class DiyThemeServiceImplService {
throw new Error("主题色不存在");
}
const addonData: DiyTheme[] = this.diyThemeRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }).eq("title", diyThemeInfo.title));
const addonSaveData: DiyTheme[] = new ArrayList();
const addonSaveData: DiyTheme[] = [];
if (CommonUtils.isNotEmpty(addonData)) {
for (const diyTheme of addonData) {
const saveData: DiyTheme = new DiyTheme();

View File

@@ -156,7 +156,7 @@ export class DiyFormRecordsServiceImplService {
}
}
totalCount = 0;
Map<String, Record<String, Object>> valueMap = new HashMap();
Map<String, Record<String, Object>> valueMap = {};
for (Record<String, Object> record : fieldList) {
if (!"FormCheckbox".equals(record.get("field_type"))) {
const key: string = record.get("field_key") + "_" + record.get("render_value");
@@ -205,7 +205,7 @@ export class DiyFormRecordsServiceImplService {
}
// 合并结果
const resultList: DiyFormFieldsListVo[] = new ArrayList();
const resultList: DiyFormFieldsListVo[] = [];
resultList.addAll(simpleFieldList);
resultList.addAll(jsonFieldList);

View File

@@ -39,7 +39,7 @@ export class DiyFormServiceImplService {
queryWrapper.orderByDesc("form_id");
[DiyForm[], number] iPage = this.diyFormRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: DiyFormListVo[] = new LinkedList();
const list: DiyFormListVo[] = [];
for (const item of iPageRecords) {
const vo: DiyFormListVo = new DiyFormListVo();
Object.assign(vo, item);
@@ -76,7 +76,7 @@ export class DiyFormServiceImplService {
}
queryWrapper.orderByDesc("form_id");
const list: DiyForm[] = this.diyFormRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ });
const voList: DiyFormListVo[] = new LinkedList();
const voList: DiyFormListVo[] = [];
for (const item of list) {
const vo: DiyFormListVo = new DiyFormListVo();
Object.assign(vo, item);
@@ -145,7 +145,7 @@ export class DiyFormServiceImplService {
model.createTime = Date.now( / 1000);
model.updateTime = Date.now( / 1000);
this.diyFormRepository.save(model);
const diyFormFields: DiyFormFields[] = new ArrayList();
const diyFormFields: DiyFormFields[] = [];
if (CommonUtils.isNotEmpty(addParam.value)) {
const value: Record<string, any> = JsonUtils.parseObject<any>(addParam.value);
const components: JSONArray = value.getJSONArray("value");
@@ -221,8 +221,8 @@ export class DiyFormServiceImplService {
diyFormMapper.updateById(model);
const formFieldsList: DiyFormFields[] = this.diyFormFieldsRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }));
const formFieldsListMap: Record<String, DiyFormFields> = formFieldsList.collect(/* Collectors已删除 */.toMap(DiyFormFields::getFieldKey, a => a));
const existFieldKeys: string[] = new ArrayList();
const diyFormFields: DiyFormFields[] = new ArrayList();
const existFieldKeys: string[] = [];
const diyFormFields: DiyFormFields[] = [];
if (CommonUtils.isNotEmpty(editParam.value)) {
const value: Record<string, any> = JsonUtils.parseObject<any>(editParam.value);
const components: JSONArray = value.getJSONArray("value");
@@ -441,7 +441,7 @@ export class DiyFormServiceImplService {
// 复制表单字段
if (!CommonUtils.isEmpty(diyFormFields)) {
const newFormFieldList: DiyFormFields[] = new ArrayList();
const newFormFieldList: DiyFormFields[] = [];
for (const item of diyFormFields) {
const newField: DiyFormFields = new DiyFormFields();
Object.assign(newField, item);
@@ -566,7 +566,7 @@ export class DiyFormServiceImplService {
queryWrapper.orderByDesc(diyFormRecordsFieldsSearchParam.getOrder());
}
const list: DiyFormFields[] = this.diyFormFieldsRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ });
const listVo: DiyFormFieldsListVo[] = new LinkedList();
const listVo: DiyFormFieldsListVo[] = [];
for (const item of list) {
const vo: DiyFormFieldsListVo = new DiyFormFieldsListVo();
Object.assign(vo, item);
@@ -582,7 +582,7 @@ export class DiyFormServiceImplService {
const page: number = pageParam.page;
const limit: number = pageParam.limit;
// 验证表单ID集合
const verifyFormIds: number[] = new ArrayList();
const verifyFormIds: number[] = [];
if (param.getVerifyFormIds() != null && !param.getVerifyFormIds().isEmpty()) {
// 查询存在的表单ID
const existForms: DiyForm[] = this.diyFormRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ })
@@ -615,9 +615,9 @@ export class DiyFormServiceImplService {
[DiyForm[], number] formPage = this.diyFormRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
if (formPageTotal == 0){
return PageResult.build(page, limit, 0, new ArrayList());
return PageResult.build(page, limit, 0, []);
}
const resultList: DiyFormInfoVo[] = new ArrayList();
const resultList: DiyFormInfoVo[] = [];
formPageRecords.forEach(item => {
const diyFormInfoVo: DiyFormInfoVo = new DiyFormInfoVo();
Object.assign(diyFormInfoVo, item);

View File

@@ -69,7 +69,7 @@ export class GenerateServiceImplService {
}
const columnList: GenerateColumn[] = this.generateColumnRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }));
if (CommonUtils.isNotEmpty(columnList)) {
const columnVoList: GenerateColumnVo[] = new ArrayList();
const columnVoList: GenerateColumnVo[] = [];
for (const column of columnList) {
const generateColumnVo: GenerateColumnVo = new GenerateColumnVo();
Object.assign(generateColumnVo, column);
@@ -163,7 +163,7 @@ export class GenerateServiceImplService {
//添加生成字段数据
List<Record<String, Object>> columns = jdbcTemplate.queryForList("SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = (SELECT DATABASE()) and TABLE_NAME='" + tablePrefix + tableName + "'");
const id: number = generateTable.id;
const list: GenerateColumn[] = new ArrayList();
const list: GenerateColumn[] = [];
for (Record<String, Object> column : columns) {
const generateColumn: GenerateColumn = new GenerateColumn();
@@ -221,7 +221,7 @@ export class GenerateServiceImplService {
//更新表字段
this.generateColumnRepository.delete({ /* TODO: 将QueryWrapper改为where条件 */ }));
const columns: JSONArray = JSONUtil.parseArray(generateParam.getTableColumn());
const list: GenerateColumn[] = new ArrayList();
const list: GenerateColumn[] = [];
for (const i of number = 0; i < columns.length; i++) {
const generateColumn: GenerateColumn = new GenerateColumn();
@@ -346,7 +346,7 @@ export class GenerateServiceImplService {
const list: GenerateColumn[] = this.generateColumnRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }));
const coreGenerateService: CoreGenerateService = new CoreGenerateService();
const columnList: CoreGenerateTemplateVo[] = this.coreGenerateService.generateCode(generateTable, list);
const voList: GeneratePreviewVo[] = new ArrayList();
const voList: GeneratePreviewVo[] = [];
for (const coreGenerateTemplateVo of columnList) {
const vo: GeneratePreviewVo = new GeneratePreviewVo();
vo.name = coreGenerateTemplateVo.getFileName();

View File

@@ -44,7 +44,7 @@ export class AuthSiteServiceImplService {
if (CommonUtils.isNotEmpty(siteIds)) {
queryWrapper.in("site_id", siteIds);
} else {
return PageResult.build(page, limit, 0).setData(new ArrayList());
return PageResult.build(page, limit, 0).setData([]);
}
}
@@ -91,7 +91,7 @@ export class AuthSiteServiceImplService {
}
[Site[], number] iPage = this.siteRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SiteListVo[] = new LinkedList();
const list: SiteListVo[] = [];
for (const item of iPageRecords) {
const vo: SiteListVo = new SiteListVo();
Object.assign(vo, item);
@@ -115,8 +115,8 @@ export class AuthSiteServiceImplService {
siteInfoVo.setSiteAddons(this.addonRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ })).eq("type", AddonActionEnum.ADDON.getCode())));
siteInfoVo.setApps(this.addonRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ })).eq("type", AddonActionEnum.APP.getCode())));
}else{
siteInfoVo.setSiteAddons(new ArrayList());
siteInfoVo.setApps(new ArrayList());
siteInfoVo.setSiteAddons([]);
siteInfoVo.setApps([]);
}
return siteInfoVo;
}
@@ -283,7 +283,7 @@ export class AuthSiteServiceImplService {
MPJany /* TODO: QueryWrapper<SysUserRole> */ queryWrapper = new MPJany /* TODO: QueryWrapper<SysUserRole> */();
queryWrapper.select("site_id").eq("uid", RequestUtils.uid()).ne("site_id", RequestUtils.defaultSiteId()).eq("status", 1);
const sysUserRoleList: SysUserRole[] = this.sysUserRoleRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ });
const siteIds: number[] = new ArrayList();
const siteIds: number[] = [];
for (const sysUserRole of sysUserRoleList) {
siteIds.push(sysUserRole.siteId);
}
@@ -294,7 +294,7 @@ export class AuthSiteServiceImplService {
* getSiteGroup
*/
async getSiteGroup(...args: any[]): Promise<any> {
const userCreateSiteVoList: UserCreateSiteVo[] = new ArrayList();
const userCreateSiteVoList: UserCreateSiteVo[] = [];
if(this.authService.isSuperAdmin()){
const siteGroupList: SiteGroup[] = this.siteGroupRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ });
for (const siteGroup of siteGroupList) {

View File

@@ -35,7 +35,7 @@ export class MemberAccountServiceImplService {
QueryMapperUtils.buildByTime(queryWrapper, "mal.create_time", searchParam.createTime);
[MemberAccountLogVo[], number] iPage = memberAccountLogMapper.selectJoinPage(new Page<>(page, limit), MemberAccountLogVo.class, queryWrapper);
const list: MemberAccountLogListVo[] = new LinkedList();
const list: MemberAccountLogListVo[] = [];
for (const item of iPageRecords) {
const vo: MemberAccountLogListVo = new MemberAccountLogListVo();
Object.assign(vo, item);

View File

@@ -19,7 +19,7 @@ export class MemberAddressServiceImplService {
if (CommonUtils.isNotEmpty(searchParam.memberId)) queryWrapper.eq("member_id", searchParam.memberId);
const records: MemberAddress[] = this.memberAddressRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ });
const list: MemberAddressListVo[] = new LinkedList();
const list: MemberAddressListVo[] = [];
for (const item of records) {
const vo: MemberAddressListVo = new MemberAddressListVo();
Object.assign(vo, item);

View File

@@ -25,7 +25,7 @@ export class MemberLabelServiceImplService {
queryWrapper.like("label_name", searchParam.getLabelName());
}
[MemberLabel[], number] iPage = this.memberLabelRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: MemberLabelListVo[] = new LinkedList();
const list: MemberLabelListVo[] = [];
for (const item of iPageRecords) {
const vo: MemberLabelListVo = new MemberLabelListVo();
const labelId: number = item.getLabelId();
@@ -118,7 +118,7 @@ export class MemberLabelServiceImplService {
const labels: MemberLabel[] = this.memberLabelRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }); // 调用 selectList 方法
const list: MemberLabelAllListVo[] = new LinkedList();
const list: MemberLabelAllListVo[] = [];
for (const item of labels) {
const vo: MemberLabelAllListVo = new MemberLabelAllListVo();
Object.assign(vo, item);

View File

@@ -23,7 +23,7 @@ export class MemberLevelServiceImplService {
if (CommonUtils.isNotEmpty(searchParam.getLevelName())) queryWrapper.like("level_name", searchParam.getLevelName());
[MemberLevel[], number] iPage = this.memberLevelRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: MemberLevelListVo[] = new LinkedList();
const list: MemberLevelListVo[] = [];
for (const item of iPageRecords) {
const vo: MemberLevelListVo = new MemberLevelListVo();
Object.assign(vo, item);
@@ -120,7 +120,7 @@ export class MemberLevelServiceImplService {
const labels: MemberLevel[] = this.memberLevelRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }); // 调用 selectList 方法
const list: MemberLevelAllListVo[] = new LinkedList();
const list: MemberLevelAllListVo[] = [];
for (const item of labels) {
const vo: MemberLevelAllListVo = new MemberLevelAllListVo();
Object.assign(vo, item);

View File

@@ -51,7 +51,7 @@ export class MemberServiceImplService {
}
[Member[], number] iPage = null;
const memberList: Member[] = new ArrayList();
const memberList: Member[] = [];
if (page > 0 && limit > 0) {
iPage = this.memberRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
memberList = iPageRecords;
@@ -65,7 +65,7 @@ export class MemberServiceImplService {
levelMap = memberLevelMapper.selectBatchIds(levelIds).stream().collect(/* Collectors已删除 */.toMap(MemberLevel::getLevelId, e => e));
}
const list: MemberListVo[] = new LinkedList();
const list: MemberListVo[] = [];
for (const item of memberList) {
const vo: MemberListVo = new MemberListVo();
Object.assign(vo, item);
@@ -77,7 +77,7 @@ export class MemberServiceImplService {
if (!item.getMemberLabel().isEmpty()) {
const memberLabelArrays: JSONArray = JSONUtil.parseArray(vo.getMemberLabel());
if (memberLabelArrays != null && memberLabelArrays.length > 0) {
const memberLabelArray: MemberLabelAllListVo[] = new LinkedList();
const memberLabelArray: MemberLabelAllListVo[] = [];
const labelList: MemberLabel[] = this.memberLabelRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }).in("label_id", memberLabelArrays));
for (const labelItem of labelList) {
const labelVo: MemberLabelAllListVo = new MemberLabelAllListVo();
@@ -117,7 +117,7 @@ export class MemberServiceImplService {
if (StrUtil.isNotEmpty(model.getMemberLabel()) && ![model.getMemberLabel(]).isEmpty()) {
const memberLabelArrays: JSONArray = JSONUtil.parseArray(vo.getMemberLabel());
if (memberLabelArrays != null && memberLabelArrays.length > 0) {
const memberLabelArray: MemberLabelAllListVo[] = new LinkedList();
const memberLabelArray: MemberLabelAllListVo[] = [];
const labelList: MemberLabel[] = this.memberLabelRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }).in("label_id", memberLabelArrays));
for (const item of labelList) {
const labelVo: MemberLabelAllListVo = new MemberLabelAllListVo();
@@ -283,7 +283,7 @@ export class MemberServiceImplService {
const members: Member[] = this.memberRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }); // 调用 selectList 方法
const list: MemberAllListVo[] = new LinkedList();
const list: MemberAllListVo[] = [];
for (const item of members) {
const vo: MemberAllListVo = new MemberAllListVo();
Object.assign(vo, item);

View File

@@ -33,7 +33,7 @@ export class MemberSignServiceImplService {
}
[MemberSign[], number] iPage = this.memberSignRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: MemberSignListVo[] = new LinkedList();
const list: MemberSignListVo[] = [];
for (const item of iPageRecords) {
const vo: MemberSignListVo = new MemberSignListVo();
Object.assign(vo, item);

View File

@@ -26,7 +26,7 @@ export class CloudBuildServiceImplService {
async buildPreCheck(...args: any[]): Promise<any> {
const checkResult: Record<string, any> = new Record<string, any>();
checkResult.put("is_pass", true);
checkResult.put("dir", new HashMap());
checkResult.put("dir", {});
return checkResult;
}
@@ -58,7 +58,7 @@ export class CloudBuildServiceImplService {
actionQuery.put("data[product_key]", instance.getProductKey());
const actionToken: Record<string, any> = this.niucloudService.getActionToken("cloudbuild", actionQuery);
Record<String, Object> = new HashMap();
Record<String, Object> = {};
query.put("authorize_code", instance.getCode());
query.put("timestamp", Date.now() / 1000);
query.put("token", actionToken == null ? "" : actionToken.getStr("token"));
@@ -90,7 +90,7 @@ export class CloudBuildServiceImplService {
const instance: NiucloudUtils = NiucloudUtils.getInstance();
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("authorize_code", instance.getCode());
query.put("timestamp", this.buildTask.getStr("timestamp"));

View File

@@ -15,7 +15,7 @@ export class NiuCloudServiceImplService {
async getFrameworkLastVersion(...args: any[]): Promise<any> {
const instance: NiucloudUtils = NiucloudUtils.getInstance();
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("product_key", instance.getProductKey());
const data: Record<string, any> = NiucloudUtils.Niucloud.get("store/framework/lastversion", query).getRecord<string, any>("data");
@@ -35,13 +35,13 @@ export class NiuCloudServiceImplService {
async getFrameworkVersionList(...args: any[]): Promise<any> {
const instance: NiucloudUtils = NiucloudUtils.getInstance();
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("product_key", instance.getProductKey());
const data: JSONArray = NiucloudUtils.Niucloud.get("store/framework/version", query).getJSONArray("data");
if (data == null) return null;
const list: FrameworkVersionListVo[] = new LinkedList();
const list: FrameworkVersionListVo[] = [];
for (const i of number = 0; i < data.length; i++) {
list.push(Object.assign(new FrameworkVersionListVo(), data.getRecord<string, any>(i)) /* TODO: 检查FrameworkVersionListVo构造函数 */);
}
@@ -54,7 +54,7 @@ export class NiuCloudServiceImplService {
async getAuthinfo(...args: any[]): Promise<any> {
const instance: NiucloudUtils = NiucloudUtils.getInstance();
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("code", instance.getCode());
query.put("secret", instance.getSecret());
query.put("product_key", instance.getProductKey());
@@ -74,7 +74,7 @@ export class NiuCloudServiceImplService {
async setAuthorize(...args: any[]): Promise<any> {
const instance: NiucloudUtils = NiucloudUtils.getInstance();
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("code", param.getAuthCode());
query.put("secret", param.getAuthSecret());
query.put("product_key", instance.getProductKey());
@@ -92,7 +92,7 @@ export class NiuCloudServiceImplService {
async getModuleList(...args: any[]): Promise<any> {
const instance: NiucloudUtils = NiucloudUtils.getInstance();
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("code", instance.getCode());
query.put("secret", instance.getSecret());
query.put("product_key", instance.getProductKey());
@@ -100,7 +100,7 @@ export class NiuCloudServiceImplService {
const addonList: JSONArray = NiucloudUtils.Niucloud.get("member_app_all", query).getJSONArray("data");
if (addonList == null && addonList.length == 0) return null;
const list: ModuleListVo[] = new LinkedList();
const list: ModuleListVo[] = [];
for (const i of number = 0; i < addonList.length; i++) {
const item: Record<string, any> = addonList.getRecord<string, any>(i);
const vo: ModuleListVo = Object.assign(new ModuleListVo(), item) /* TODO: 检查ModuleListVo构造函数 */;
@@ -122,7 +122,7 @@ export class NiuCloudServiceImplService {
async checkKey(...args: any[]): Promise<any> {
const instance: NiucloudUtils = NiucloudUtils.getInstance();
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("product_key", instance.getProductKey());
return NiucloudUtils.Niucloud.get("store/app_check/" + key, query).get("data", boolean.class);
@@ -134,13 +134,13 @@ export class NiuCloudServiceImplService {
async getAppVersionList(...args: any[]): Promise<any> {
const instance: NiucloudUtils = NiucloudUtils.getInstance();
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("product_key", instance.getProductKey());
query.put("app_key", param.appKey);
const data: JSONArray = ObjectUtil.defaultIfNull(NiucloudUtils.Niucloud.get("store/app_version/list", query).get("data", JSONArray.class), new JSONArray());
const list: AppVersionListVo[] = new LinkedList();
const list: AppVersionListVo[] = [];
for (const i of number = 0; i < data.length; i++) {
list.push(Object.assign(new AppVersionListVo(), data.getRecord<string, any>(i)) /* TODO: 检查AppVersionListVo构造函数 */);

View File

@@ -15,7 +15,7 @@ export class NuiSmsServiceImplService {
*/
async captcha(...args: any[]): Promise<any> {
try {
const jsonObject: Record<string, any> = NiucloudUtils.Niucloud.get(SEND_CAPTCHA_URL, new HashMap());
const jsonObject: Record<string, any> = NiucloudUtils.Niucloud.get(SEND_CAPTCHA_URL, {});
const result: Record<string, any> = jsonObject.getRecord<string, any>("data");
//删除null值 防止序列化报错
JacksonUtils.removeNull(result);
@@ -30,7 +30,7 @@ export class NuiSmsServiceImplService {
* sendMobileCode
*/
async sendMobileCode(...args: any[]): Promise<any> {
const body: Record<String, String> = new HashMap();
const body: Record<String, String> = {};
body.put("mobile", param.getMobile());
body.put("captcha_key", param.getCaptchaKey());
body.put("captcha_code", param.getCaptchaCode());
@@ -70,7 +70,7 @@ export class NuiSmsServiceImplService {
*/
async loginAccount(...args: any[]): Promise<number> {
const url: string = String.format(LOGIN_ACCOUNT_URL, param.getUsername());
const body: Record<String, String> = new HashMap();
const body: Record<String, String> = {};
body.put("username", param.getUsername());
body.put("password", param.getPassword());
try {
@@ -110,7 +110,7 @@ export class NuiSmsServiceImplService {
const newPassword: string = null;
try {
const resetPasswordUrl: string = String.format(RESET_PASSWORD_URL, param.getUsername());
const resetPasswordBody: Record<String, String> = new HashMap();
const resetPasswordBody: Record<String, String> = {};
resetPasswordBody.put("mobile", param.getMobile());
resetPasswordBody.put("code", param.getCode());
resetPasswordBody.put("key", param.key);
@@ -138,7 +138,7 @@ export class NuiSmsServiceImplService {
async accountInfo(...args: any[]): Promise<number> {
const infoUrl: string = String.format(ACCOUNT_INFO_URL, username);
try {
const jsonObject: Record<string, any> = NiucloudUtils.Niucloud.get(infoUrl, new HashMap());
const jsonObject: Record<string, any> = NiucloudUtils.Niucloud.get(infoUrl, {});
const result: Record<string, any> = jsonObject.getRecord<string, any>("data");
// 获取配置
const nyConfig: Record<string, any> = getConfig(false);
@@ -165,11 +165,11 @@ export class NuiSmsServiceImplService {
throw new ApiException("牛云短信账号异常,请重新登录账号");
}
const list: SysNotice[] = this.sysNoticeRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }));
const map: Record<String, SysNotice> = new HashMap();
const map: Record<String, SysNotice> = {};
if (!CollectionUtils.isEmpty(list)) {
map = list.collect(/* Collectors已删除 */.toMap(SysNotice::getKey, item => item));
}
const notice: TemplateListVo[] = new ArrayList();
const notice: TemplateListVo[] = [];
for (Map.Entry<String, NoticeEnumListVo> noticeMap : NoticeEnum.getNiuyunNotice().entrySet()) {
const noticeInfoVo: TemplateListVo = new TemplateListVo();
BeanUtil.copyProperties(noticeMap.value, noticeInfoVo);
@@ -196,7 +196,7 @@ export class NuiSmsServiceImplService {
const niuSmsTemplates: NiuSmsTemplate[] = this.niuSmsTemplateRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ })
.eq("username", username)
.eq("site_id", siteId));
const templateMap: Record<String, NiuSmsTemplate> = new HashMap();
const templateMap: Record<String, NiuSmsTemplate> = {};
if (!CollectionUtils.isEmpty(niuSmsTemplates)){
templateMap = niuSmsTemplates.collect(/* Collectors已删除 */.toMap(NiuSmsTemplate::getTemplateKey, item => item));
}
@@ -204,7 +204,7 @@ export class NuiSmsServiceImplService {
const sys: Addon = new Addon();
sys.key = "system";
addonList.push(0, sys);
const result: TemplateListVo[] = new ArrayList();
const result: TemplateListVo[] = [];
for (const addon of addonList) {
for (const noticeInfoVo of notice) {
if (addon.key === noticeInfoVo.getAddon()) {
@@ -215,7 +215,7 @@ export class NuiSmsServiceImplService {
auditInfo.set("audit_msg", templateMap.containsKey(noticeInfoVo.key) ? templateMap.get(noticeInfoVo.key).getAuditMsg() : "");
auditInfo.set("audit_status", templateMap.containsKey(noticeInfoVo.key) ? templateMap.get(noticeInfoVo.key).getAuditStatus() : TemplateAuditStatus.TEMPLATE_NOT_REPORT.getCode());
auditInfo.set("audit_status_name", TemplateAuditStatus.getByCode(auditInfo.getInt("audit_status")).getDescription());
const paramsJson: string[] = new ArrayList();
const paramsJson: string[] = [];
if (templateMap.containsKey(noticeInfoVo.key)){
const paramJson: string = templateMap.get(noticeInfoVo.key).getParamJson();
if (CommonUtils.isNotEmpty(paramJson)){
@@ -225,7 +225,7 @@ export class NuiSmsServiceImplService {
}
Collections.sort(paramsJson);
const variable: string[] = new ArrayList();
const variable: string[] = [];
if (CommonUtils.isNotEmpty(noticeInfoVo.getVariable())) {
variable.addAll(noticeInfoVo.getVariable().keySet());
}
@@ -272,7 +272,7 @@ export class NuiSmsServiceImplService {
const orderListUrl: string = String.format(ORDER_LIST_URL, username);
const result: Record<string, any> = null;
try {
const orderListParam: Record<String, Object> = new HashMap();
const orderListParam: Record<String, Object> = {};
orderListParam.put("out_trade_no", param.getOutTradeNo());
orderListParam.put("order_status", param.status);
orderListParam.put("create_time_start", param.getCreateTimeStart());
@@ -295,7 +295,7 @@ export class NuiSmsServiceImplService {
*/
async accountSendList(...args: any[]): Promise<number> {
const accountSendUrl: string = String.format(ACCOUNT_SEND_LIST_URL, username);
const accountSendParam: Record<String, Object> = new HashMap();
const accountSendParam: Record<String, Object> = {};
accountSendParam.put("mobile", param.getMobile());
accountSendParam.put("content", param.getContent());
accountSendParam.put("smsStatus", param.getSmsStatus());
@@ -343,7 +343,7 @@ export class NuiSmsServiceImplService {
*/
async editAccount(...args: any[]): Promise<number> {
const editAccountUrl: string = String.format(ACCOUNT_EDIT_URL, username);
const editAccountBody: Record<String, Object> = new HashMap();
const editAccountBody: Record<String, Object> = {};
editAccountBody.put("new_mobile", param.getNewMobile());
editAccountBody.put("mobile", param.getMobile());
editAccountBody.put("code", param.getCode());
@@ -414,7 +414,7 @@ export class NuiSmsServiceImplService {
* getSmsPackageList
*/
async getSmsPackageList(...args: any[]): Promise<any> {
const pageListParam: Record<String, Object> = new HashMap();
const pageListParam: Record<String, Object> = {};
pageListParam.put("package_name", param.getPackageName());
pageListParam.put("sms_num", param.getSmsNum());
pageListParam.put("price_start", param.getPriceStart());
@@ -442,7 +442,7 @@ export class NuiSmsServiceImplService {
*/
async orderCalculate(...args: any[]): Promise<any> {
const orderCalculateUrl: string = String.format(ORDER_CALCULATE_URL, username);
const orderCalculateBody: Record<String, Object> = new HashMap();
const orderCalculateBody: Record<String, Object> = {};
orderCalculateBody.put("package_id", param.getPackageId());
try {
const jsonObject: Record<string, any> = NiucloudUtils.Niucloud.post(orderCalculateUrl, orderCalculateBody);
@@ -461,7 +461,7 @@ export class NuiSmsServiceImplService {
*/
async createOrder(...args: any[]): Promise<any> {
const orderCreateUrl: string = String.format(ORDER_CREATE_URL, username);
const orderCreateBody: Record<String, Object> = new HashMap();
const orderCreateBody: Record<String, Object> = {};
orderCreateBody.put("package_id", param.getPackageId());
try {
const jsonObject: Record<string, any> = NiucloudUtils.Niucloud.post(orderCreateUrl, orderCreateBody);
@@ -489,7 +489,7 @@ export class NuiSmsServiceImplService {
}
const returnUrl: string = String.format("%s://%s/site/setting/sms/pay", protocol, host);
const payInfoUrl: string = String.format(ORDER_PAY_URL, username);
const payInfoBody: Record<String, Object> = new HashMap();
const payInfoBody: Record<String, Object> = {};
payInfoBody.put("notify_url", payInfoUrl);
payInfoBody.put("return_url", returnUrl);
payInfoBody.put("out_trade_no", outTradeNo);
@@ -511,7 +511,7 @@ export class NuiSmsServiceImplService {
async getOrderInfo(...args: any[]): Promise<any> {
const orderInfoUrl: string = String.format(ORDER_INFO_URL, username, outTradeNo);
try {
const jsonObject: Record<string, any> = NiucloudUtils.Niucloud.get(orderInfoUrl, new HashMap());
const jsonObject: Record<string, any> = NiucloudUtils.Niucloud.get(orderInfoUrl, {});
const result: Record<string, any> = jsonObject.getRecord<string, any>("data");
//删除null值 防止序列化报错
JacksonUtils.removeNull(result);
@@ -528,7 +528,7 @@ export class NuiSmsServiceImplService {
async getOrderStatus(...args: any[]): Promise<any> {
const orderStatusUrl: string = String.format(ORDER_STATUS_URL, username, outTradeNo);
try {
const jsonObject: Record<string, any> = NiucloudUtils.Niucloud.get(orderStatusUrl, new HashMap());
const jsonObject: Record<string, any> = NiucloudUtils.Niucloud.get(orderStatusUrl, {});
const result: Record<string, any> = jsonObject.getRecord<string, any>("data");
//删除null值 防止序列化报错
JacksonUtils.removeNull(result);
@@ -567,7 +567,7 @@ export class NuiSmsServiceImplService {
const config: Record<string, any> = getConfig(false);
const templateCreateUrl: string = String.format(TEMPLATE_ADD_URL, username);
const templateCreateBody: Record<String, Object> = new HashMap();
const templateCreateBody: Record<String, Object> = {};
templateCreateBody.put("temName", path.basename(templateInfo));
templateCreateBody.put("temType", param.getTemplateType());
templateCreateBody.put("temContent", templateInfo.getSms().get("content"));
@@ -618,7 +618,7 @@ export class NuiSmsServiceImplService {
*/
async templateDelete(...args: any[]): Promise<any> {
const config: Record<string, any> = getConfig(false);
const deleteBody: Record<String, Object> = new HashMap();
const deleteBody: Record<String, Object> = {};
const time: number = DateUtil.currentSeconds();
deleteBody.put("tKey", time);
deleteBody.put("password", DigestUtil.md5Hex(DigestUtil.md5Hex(config.getStr("password")) + time));
@@ -646,7 +646,7 @@ export class NuiSmsServiceImplService {
throw new AdminException("短信模版暂未报备");
}
const orderCreateUrl: string = String.format(TEMPLATE_INFO_URL, username);
const templateInfoParam: Record<String, Object> = new HashMap();
const templateInfoParam: Record<String, Object> = {};
templateInfoParam.put("tem_id", niuSmsTemplate.getTemplateId());
try {
const jsonObject: Record<string, any> = NiucloudUtils.Niucloud.get(orderCreateUrl, templateInfoParam);
@@ -687,7 +687,7 @@ export class NuiSmsServiceImplService {
const config: Record<string, any> = getConfig(true);
config.put("default", CommonUtils.isNotEmpty(param.getDefaultVal()) ? param.getDefaultVal() : config.getOrDefault("default", ""));
const niuSmsConfig: Record<string, any> = config.getRecord<string, any>(NIUYUN);
const newNiuSmsConfig: Record<String, Object> = new HashMap();
const newNiuSmsConfig: Record<String, Object> = {};
newNiuSmsConfig.put("username", CommonUtils.isNotEmpty(param.getUsername()) ? param.getUsername() : niuSmsConfig != null ? niuSmsConfig.getOrDefault("username", "") : "");
newNiuSmsConfig.put("password", CommonUtils.isNotEmpty(param.getPassword()) ? param.getPassword() : niuSmsConfig != null ? niuSmsConfig.getOrDefault("password", "") : "");
newNiuSmsConfig.put("signature", CommonUtils.isNotEmpty(param.getSignature()) ? param.getSignature() : niuSmsConfig != null ? niuSmsConfig.getOrDefault("signature", "") : "");

View File

@@ -62,7 +62,7 @@ export class PayChannelServiceImplService {
.eq("channel", channel)
);
const list: PayChannelListVo[] = new LinkedList();
const list: PayChannelListVo[] = [];
for (const item of payChannel) {
const vo: PayChannelListVo = new PayChannelListVo();
Object.assign(vo, item);

View File

@@ -26,7 +26,7 @@ export class PayRefundServiceImplService {
const payTypeEnum: Record<string, any> = PayTypeEnum.type;
[PayRefund[], number] iPage = this.payRefundRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: PayRefundListVo[] = new LinkedList();
const list: PayRefundListVo[] = [];
for (const item of iPageRecords) {
const vo: PayRefundListVo = new PayRefundListVo();
Object.assign(vo, item);

View File

@@ -20,7 +20,7 @@ export class PayServiceImplService {
queryWrapper.orderByDesc("id");
[Pay[], number] iPage = this.payRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: PayListVo[] = new LinkedList();
const list: PayListVo[] = [];
for (const item of iPageRecords) {
const vo: PayListVo = new PayListVo();
Object.assign(vo, item);

View File

@@ -31,7 +31,7 @@ export class SiteAccountLogServiceImplService {
}
queryWrapper.orderByDesc("create_time");
[SiteAccountLog[], number] iPage = this.siteAccountLogRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SiteAccountLogListVo[] = new LinkedList();
const list: SiteAccountLogListVo[] = [];
for (const item of iPageRecords) {
const vo: SiteAccountLogListVo = new SiteAccountLogListVo();
Object.assign(vo, item);

View File

@@ -26,7 +26,7 @@ export class SiteGroupServiceImplService {
//获取所有的addon
const addonList: Addon[] = this.addonRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }));
const list: SiteGroupListVo[] = new LinkedList();
const list: SiteGroupListVo[] = [];
for (const item of iPageRecords) {
const vo: SiteGroupListVo = new SiteGroupListVo();
vo.setGroupId(item.getGroupId());
@@ -38,10 +38,10 @@ export class SiteGroupServiceImplService {
vo.setAddon(addonJson);
const appJson: JSONArray = JSONUtil.parseArray(item.getApp());
vo.setApp(appJson);
const addonStr: string[] = new ArrayList();
const appStr: string[] = new ArrayList();
const appList: SiteGroupListVo.IconAndTitle[] = new ArrayList();
const addonListResult: SiteGroupListVo.IconAndTitle[] = new ArrayList();
const addonStr: string[] = [];
const appStr: string[] = [];
const appList: SiteGroupListVo.IconAndTitle[] = [];
const addonListResult: SiteGroupListVo.IconAndTitle[] = [];
for (const addon of addonList)
{
if(addonJson.includes(addon.key)){
@@ -192,7 +192,7 @@ export class SiteGroupServiceImplService {
* getUserSiteGroupAll
*/
async getUserSiteGroupAll(...args: any[]): Promise<any> {
const siteGroupListVoList: SiteGroupListVo[] = new ArrayList();
const siteGroupListVoList: SiteGroupListVo[] = [];
const siteGroupList: SiteGroup[] = this.siteGroupRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }));
for (const siteGroup of siteGroupList) {

View File

@@ -81,7 +81,7 @@ export class SiteServiceImplService {
[SiteListVo[], number] iPage = siteMapper.selectJoinPage(new Page<>(page, limit), SiteListVo.class, queryWrapper);
const list: SiteListVo[] = new LinkedList();
const list: SiteListVo[] = [];
for (const item of iPageRecords) {
const vo: SiteListVo = new SiteListVo();
Object.assign(vo, item);
@@ -150,7 +150,7 @@ export class SiteServiceImplService {
event.setSiteGroup(siteGroup);
EventAndSubscribeOfPublisher.publishAll(event);
const param: Record<String, Object> = new HashMap();
const param: Record<String, Object> = {};
param.put("site_id", siteId);
param.put("main_app", siteGroup.getApp());
param.put("tag", "add");
@@ -384,7 +384,7 @@ export class SiteServiceImplService {
const authMenuList: JSONArray = this.authService.getAuthMenuTreeList(1, "all");
// 将菜单列表转换为Map便于通过menu_key查找
const authMenuMap: Record<String, Record<string, any>> = new HashMap();
const authMenuMap: Record<String, Record<string, any>> = {};
for (const i of number = 0; i < authMenuList.length; i++) {
const menu: Record<string, any> = authMenuList.getRecord<string, any>(i);
authMenuMap.put(menu.get("menu_key").toString(), menu);
@@ -393,18 +393,18 @@ export class SiteServiceImplService {
// 获取"addon"菜单
const addonMenu: Record<string, any> = authMenuMap.get("addon");
if (addonMenu == null) {
return new SpecialMenuListVo("addon", new ArrayList());
return new SpecialMenuListVo("addon", []);
}
const showList: Record<String, Object> = showCustomer(false);
const addonChildMenus: AddonChildMenuEnum.MenuConfig[] = AddonChildMenuEnum.getAll();
const menuList: SpecialMenuListVo.MenuVo[] = new ArrayList();
const menuList: SpecialMenuListVo.MenuVo[] = [];
// 遍历插件子菜单,构建菜单列表
for (AddonChildMenuEnum.MenuConfig item : addonChildMenus) {
const menuKey: string = item.key;
const menuKeyList: string[] = new ArrayList();
const menuKeyList: string[] = [];
if (showList.containsKey(menuKey) && showList.get(menuKey) instanceof Map) {
const menuItem: Record<String, Object> = (Record<String, Object>) showList.get(menuKey);
if (menuItem.containsKey("list") && menuItem.get("list") instanceof List) {
@@ -431,7 +431,7 @@ export class SiteServiceImplService {
tempMenu.status = "1";
tempMenu.setIsShow("1");
const children: SpecialMenuListVo.MenuVo[] = new ArrayList();
const children: SpecialMenuListVo.MenuVo[] = [];
const authChildren: JSONArray = addonMenu.getJSONArray("children");
if (authChildren != null) {
for (const j of number = 0; j < authChildren.length; j++) {

View File

@@ -29,7 +29,7 @@ export class SiteUserServiceImplService {
userRoleMPJQueryWrapper.orderByDesc("nsur.id");
[SiteUserVo[], number] iPage = sysUserRoleMapper.selectJoinPage(new Page<>(page, limit), SiteUserVo.class, userRoleMPJQueryWrapper);
for (const siteUserVo of iPageRecords) {
const roleArray: string[] = new ArrayList();
const roleArray: string[] = [];
if(CommonUtils.isNotEmpty(siteUserVo.getRoleIds()) && JSONUtil.parseArray(siteUserVo.getRoleIds()).size()>0){
any /* TODO: QueryWrapper<SysRole> */ roleQueryWrapper=new QueryWrapper();
roleQueryWrapper.in("role_id", JSONUtil.parseArray(siteUserVo.getRoleIds()));

View File

@@ -20,7 +20,7 @@ export class StatHourServiceImplService {
queryWrapper.orderByDesc("id");
[StatHour[], number] iPage = this.statHourRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: StatHourListVo[] = new LinkedList();
const list: StatHourListVo[] = [];
for (const item of iPageRecords) {
const vo: StatHourListVo = new StatHourListVo();
Object.assign(vo, item);

View File

@@ -71,9 +71,9 @@ export class StatServiceImplService {
*/
const memberCountVo: StatDateVo = new StatDateVo();
const siteCountVo: StatDateVo = new StatDateVo();
const dates: string[] = new ArrayList();
const memberValues: number[] = new ArrayList();
const siteValues: number[] = new ArrayList();
const dates: string[] = [];
const memberValues: number[] = [];
const siteValues: number[] = [];
const statNum: number = 7;
for (const i of number = 0; i <= statNum; i++) {
@@ -102,12 +102,12 @@ export class StatServiceImplService {
* 会员性别类型统计
*/
const memberStat: StatTypeVo = new StatTypeVo();
const sexlist: string[] = new ArrayList();
const sexlist: string[] = [];
sexlist.push(SexEnum.path.basename(MAN));
sexlist.push(SexEnum.path.basename(WOMAN));
sexlist.push(SexEnum.path.basename(UNKNOWN));
const sexCountList: number[] = new ArrayList();
const sexCountList: number[] = [];
const sexMemberParam: MemberStatSearchParam = new MemberStatSearchParam();
sexMemberParam.setSex(SexEnum.MAN.value);
const manSexCount: number = this.coreMemberService.getMemberCount(sexMemberParam);
@@ -124,8 +124,8 @@ export class StatServiceImplService {
* 站点分组 统计
*/
const siteGroupStat: StatTypeVo = new StatTypeVo();
const grouplist: string[] = new ArrayList();
const groupCountList: number[] = new ArrayList();
const grouplist: string[] = [];
const groupCountList: number[] = [];
const groupList: SiteGroup[] = this.siteGroupService.getAll();
for (const siteGroup of groupList) {

View File

@@ -14,7 +14,7 @@ export class SysAgreementServiceImplService {
*/
async list(...args: any[]): Promise<any[]> {
const typeJson: Record<string, any> = AgreementEnum.type;
const list: SysAgreementListVo[] = new ArrayList();
const list: SysAgreementListVo[] = [];
for (Map.Entry<String, Object> map : typeJson.entrySet()) {
const vo: SysAgreementListVo = new SysAgreementListVo();

View File

@@ -63,7 +63,7 @@ export class SysAreaServiceImplService {
queryWrapper.orderByDesc(["sort", "id"]);
[SysArea[], number] iPage = this.sysAreaRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SysAreaListVo[] = new LinkedList();
const list: SysAreaListVo[] = [];
for (const item of iPageRecords) {
const vo: SysAreaListVo = new SysAreaListVo();
Object.assign(vo, item);

View File

@@ -25,7 +25,7 @@ export class SysAttachmentServiceImplService {
if (CommonUtils.isNotEmpty(searchParam.getRealName())) queryWrapper.like("real_name", searchParam.getRealName());
[SysAttachment[], number] iPage = this.sysAttachmentRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SysAttachmentListVo[] = new LinkedList();
const list: SysAttachmentListVo[] = [];
for (const item of iPageRecords) {
const vo: SysAttachmentListVo = new SysAttachmentListVo();
Object.assign(vo, item);
@@ -106,7 +106,7 @@ export class SysAttachmentServiceImplService {
const categorys: SysAttachmentCategory[] = this.sysAttachmentCategoryRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }); // 调用 selectList 方法
const list: SysAttachmentCategoryListVo[] = new LinkedList();
const list: SysAttachmentCategoryListVo[] = [];
for (const item of categorys) {
const vo: SysAttachmentCategoryListVo = new SysAttachmentCategoryListVo();
Object.assign(vo, item);

View File

@@ -27,7 +27,7 @@ export class SysBackupRecordsServiceImplService {
}
[SysBackupRecords[], number] iPage = this.sysBackupRecordsRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SysBackupRecordsListVo[] = new ArrayList();
const list: SysBackupRecordsListVo[] = [];
for (const item of iPageRecords) {
const vo: SysBackupRecordsListVo = new SysBackupRecordsListVo();
Object.assign(vo, item);
@@ -76,7 +76,7 @@ export class SysBackupRecordsServiceImplService {
const queryWrapper: QueryWrapper = /* TODO: any /* TODO: QueryWrapper<SysUpgradeRecords> */TypeORM的where条件对象 */;
if (delParam.getIds() instanceof ArrayList<?>) {
const intArray: number[] = new ArrayList();
const intArray: number[] = [];
((ArrayList<?>) delParam.getIds()).forEach(item => {
if (!item) throw new BadRequestException("id不能为空");
intArray.push(item);

View File

@@ -169,7 +169,7 @@ export class SysMenuServiceImplService {
//排除菜单
if(ObjectUtil.isNotNull(paichuList) && paichuList.length>0){
const paichuArr: string[] = new ArrayList();
const paichuArr: string[] = [];
for (const i of number = 0; i<paichuList.length; i++){
paichuArr.push(paichuList.get(i).getMenuKey());
}
@@ -201,7 +201,7 @@ export class SysMenuServiceImplService {
const key: string = "menuList_"+appType+"_"+status + siteId.toString();
const outterMenuList: SysMenu[] = cached.cache(useCache, cacheTagName, key, uniqueKey => {
const menuList: SysMenu[] = new ArrayList();
const menuList: SysMenu[] = [];
try {
any /* TODO: QueryWrapper<SysMenu> */ queryWrapper = new QueryWrapper();
if (CommonUtils.isNotEmpty(appType)) {

View File

@@ -26,7 +26,7 @@ export class SysNoticeLogServiceImplService {
const noticeEnum: Record<String, NoticeEnumListVo> = NoticeEnum.getNotice();
[SysNoticeLog[], number] iPage = this.sysNoticeLogRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SysNoticeLogListVo[] = new LinkedList();
const list: SysNoticeLogListVo[] = [];
for (const item of iPageRecords) {
const vo: SysNoticeLogListVo = new SysNoticeLogListVo();
Object.assign(vo, item);

View File

@@ -20,7 +20,7 @@ export class SysNoticeServiceImplService {
queryWrapper.orderByDesc("id");
[SysNotice[], number] iPage = this.sysNoticeRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SysNoticeListVo[] = new LinkedList();
const list: SysNoticeListVo[] = [];
for (const item of iPageRecords) {
const vo: SysNoticeListVo = new SysNoticeListVo();
Object.assign(vo, item);

View File

@@ -28,7 +28,7 @@ export class SysNoticeSmsLogServiceImplService {
const notice: Record<String, NoticeEnumListVo> = NoticeEnum.getNotice();
[SysNoticeSmsLog[], number] iPage = this.sysNoticeSmsLogRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SysNoticeSmsLogListVo[] = new LinkedList();
const list: SysNoticeSmsLogListVo[] = [];
for (const item of iPageRecords) {
const vo: SysNoticeSmsLogListVo = new SysNoticeSmsLogListVo();
Object.assign(vo, item);

View File

@@ -25,7 +25,7 @@ export class SysPosterServiceImplService {
if (CommonUtils.isNotEmpty(searchParam.type)) queryWrapper.eq("type", searchParam.type);
[SysPoster[], number] iPage = this.sysPosterRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SysPosterListVo[] = new LinkedList();
const list: SysPosterListVo[] = [];
for (const item of iPageRecords) {
const vo: SysPosterListVo = new SysPosterListVo();
Object.assign(vo, item);
@@ -46,7 +46,7 @@ export class SysPosterServiceImplService {
if (CommonUtils.isNotEmpty(searchParam.type)) queryWrapper.eq("type", searchParam.type);
const records: SysPoster[] = this.sysPosterRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ });
const list: SysPosterListVo[] = new LinkedList();
const list: SysPosterListVo[] = [];
for (const item of records) {
const vo: SysPosterListVo = new SysPosterListVo();
Object.assign(vo, item);
@@ -205,7 +205,7 @@ export class SysPosterServiceImplService {
getPosterParam.type = param.type;
getPosterParam.siteId = this.requestContext.siteId;
getPosterParam.setChannel(ObjectUtil.defaultIfNull(param.getChannel(), "h5"));
const posterParam: Record<String, Object> = new HashMap();
const posterParam: Record<String, Object> = {};
posterParam.put("mode", "preview");
getPosterParam.setParam(posterParam);
getPosterParam.setIsThrowException(true);

View File

@@ -27,7 +27,7 @@ export class SysPrinterServiceImplService {
}
[SysPrinter[], number] iPage = this.sysPrinterRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SysPrinterListVo[] = new LinkedList();
const list: SysPrinterListVo[] = [];
for (const item of iPageRecords) {
const vo: SysPrinterListVo = new SysPrinterListVo();
Object.assign(vo, item);
@@ -52,7 +52,7 @@ export class SysPrinterServiceImplService {
queryWrapper.like("printer_name", param.getPrinterName());
}
const list: SysPrinterListVo[] = new LinkedList();
const list: SysPrinterListVo[] = [];
for (const item of this.sysPrinterRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ })) {
const vo: SysPrinterListVo = new SysPrinterListVo();
Object.assign(vo, item);

View File

@@ -32,7 +32,7 @@ export class SysPrinterTemplateServiceImplService {
}
[SysPrinterTemplate[], number] iPage = this.sysPrinterTemplateRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SysPrinterTemplateListVo[] = new LinkedList();
const list: SysPrinterTemplateListVo[] = [];
for (const item of iPageRecords) {
const vo: SysPrinterTemplateListVo = new SysPrinterTemplateListVo();
Object.assign(vo, item);
@@ -63,7 +63,7 @@ export class SysPrinterTemplateServiceImplService {
queryWrapper.eq("template_type", searchParam.getTemplateType());
}
const voList: SysPrinterTemplateListVo[] = new LinkedList();
const voList: SysPrinterTemplateListVo[] = [];
for (const item of this.sysPrinterTemplateRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ })) {
const vo: SysPrinterTemplateListVo = new SysPrinterTemplateListVo();
Object.assign(vo, item);

View File

@@ -23,7 +23,7 @@ export class SysRoleServiceImplService {
queryWrapper.like("role_name", searchParam.getRoleName());
}
[SysRole[], number] iPage = this.sysRoleRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SysRoleListVo[] = new LinkedList();
const list: SysRoleListVo[] = [];
for (const item of iPageRecords) {
const vo: SysRoleListVo = new SysRoleListVo();
Object.assign(vo, item);
@@ -135,7 +135,7 @@ export class SysRoleServiceImplService {
queryWrapper.eq("site_id", this.requestContext.siteId);
queryWrapper.eq("status", 1);
const roleList: SysRole[] = this.sysRoleRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ });
const sysRoleListVoList: SysRoleListVo[] = new ArrayList();
const sysRoleListVoList: SysRoleListVo[] = [];
for (const sysRole of roleList) {
const vo: SysRoleListVo = new SysRoleListVo();
Object.assign(vo, sysRole);

View File

@@ -63,7 +63,7 @@ export class SysScheduleServiceImplService {
queryWrapper.orderByDesc(SysSchedule::getSort, SysSchedule::getId);
[SysSchedule[], number] sysSchedulePage = this.sysScheduleRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
// 返回结果集
const sysScheduleListVoList: SysScheduleListVo[] = new LinkedList();
const sysScheduleListVoList: SysScheduleListVo[] = [];
for (const sysSchedule of sysSchedulePageRecords) {
const sysScheduleListVo: SysScheduleListVo = new SysScheduleListVo();
Object.assign(sysScheduleListVo, sysSchedule);
@@ -176,7 +176,7 @@ export class SysScheduleServiceImplService {
* template
*/
async template(...args: any[]): Promise<any> {
const sysScheduleTemplateVoList: SysScheduleTemplateVo[] = new ArrayList();
const sysScheduleTemplateVoList: SysScheduleTemplateVo[] = [];
const jobKeys: string[] = JobProviderFactory.jobKeys();
for (const jobKey of jobKeys) {
const jobInfo: JobInfo = JobProviderFactory.getJobInfo(jobKey);
@@ -226,7 +226,7 @@ export class SysScheduleServiceImplService {
QueryMapperUtils.buildByTime(qw, SysScheduleLog::getExecuteTime, searchParam.getExecuteTime());
}
any /* TODO: Page<SysScheduleLog> */ sysScheduleLogPage = this.sysScheduleLogRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), qw);
const result: SysScheduleLogListVo[] = new ArrayList();
const result: SysScheduleLogListVo[] = [];
sysScheduleLogPageRecords.forEach(sysScheduleLog => {
const sysScheduleLogListVo: SysScheduleLogListVo = new SysScheduleLogListVo();
Object.assign(sysScheduleLogListVo, sysScheduleLog);

View File

@@ -27,7 +27,7 @@ export class SysUpgradeRecordsServiceImplService {
}
[SysUpgradeRecords[], number] iPage = this.sysUpgradeRecordsRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SysUpgradeRecordsListVo[] = new ArrayList();
const list: SysUpgradeRecordsListVo[] = [];
for (const item of iPageRecords) {
const vo: SysUpgradeRecordsListVo = new SysUpgradeRecordsListVo();
Object.assign(vo, item);

View File

@@ -31,7 +31,7 @@ export class SysUserLogServiceImplService {
}
[SysUserLog[], number] iPage = this.sysUserLogRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SysUserLogListVo[] = new LinkedList();
const list: SysUserLogListVo[] = [];
for (const item of iPageRecords) {
const vo: SysUserLogListVo = new SysUserLogListVo();
Object.assign(vo, item);

View File

@@ -52,7 +52,7 @@ export class SysUserServiceImplService {
[SysUser[], number] iPage = this.sysUserRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: SysUserListVo[] = new LinkedList();
const list: SysUserListVo[] = [];
for (const item of iPageRecords) {
const vo: SysUserListVo = new SysUserListVo();
Object.assign(vo, item);
@@ -106,7 +106,7 @@ export class SysUserServiceImplService {
//添加用户建站限制
const createSiteLimitParamList: SysCreateSiteLimitParam[] = addParam.getCreateSiteLimit();
const addList: UserCreateSiteLimit[] = new ArrayList();
const addList: UserCreateSiteLimit[] = [];
if (ObjectUtil.isNotNull(createSiteLimitParamList) && createSiteLimitParamList.length > 0) {
for (const sysCreateSiteLimitParam of createSiteLimitParamList) {
const userCreateSiteLimit: UserCreateSiteLimit = new UserCreateSiteLimit();
@@ -276,7 +276,7 @@ export class SysUserServiceImplService {
*/
async getUserCreateSiteLimit(...args: any[]): Promise<any> {
const userCreateSiteLimitList: UserCreateSiteLimit[] = this.userCreateSiteLimitRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }));
const userCreateSiteLimitVoList: SysUserCreateSiteLimitVo[] = new ArrayList();
const userCreateSiteLimitVoList: SysUserCreateSiteLimitVo[] = [];
for (const item of userCreateSiteLimitList) {
const userCreateSiteLimitVo: SysUserCreateSiteLimitVo = new SysUserCreateSiteLimitVo();
BeanUtil.copyProperties(item, userCreateSiteLimitVo);
@@ -371,7 +371,7 @@ export class SysUserServiceImplService {
const adminUsers: SysUser[] = this.sysUserRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ });
// 5. 查询无角色用户
const noRoleUsers: SysUser[] = new ArrayList();
const noRoleUsers: SysUser[] = [];
const noRoleUserIds: number[] = userAll
.map(SysUser::getUid)
.filter(uid => !allRoleUserIds.includes(uid))

View File

@@ -40,7 +40,7 @@ export class SystemServiceImplService {
const vo: SpreadQrcodeVo = new SpreadQrcodeVo();
try {
const data: Record<String, Object> = new HashMap();
const data: Record<String, Object> = {};
for (SpreadQrcodeParam.Param qrcodeParam : param.getParams()) {
const jsonArray: JSONArray = JSONUtil.parseArray(qrcodeParam);
const jsonObject: Record<string, any> = JsonUtils.parseObject<any>(jsonArray);

View File

@@ -83,10 +83,10 @@ export class UpgradeServiceImplService {
const instance: NiucloudUtils = NiucloudUtils.getInstance();
const vo: UpgradeContentVo = new UpgradeContentVo();
const apps: Map[] = new LinkedList();
const apps: Map[] = [];
if ((!addon || addon.length === 0)) {
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("product_key", instance.getProductKey());
query.put("app_key", this.appConfig.appKey);
query.put("version", this.appConfig.version);
@@ -94,7 +94,7 @@ export class UpgradeServiceImplService {
} else {
for (const key of addon.split(",")) {
const addonModel: Addon = this.addonRepository.findOne({ /* TODO: 将QueryWrapper改为where条件 */ }).select("version,type"));
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("product_key", instance.getProductKey());
query.put("app_key", key);
query.put("version", addonModel.version);
@@ -146,7 +146,7 @@ export class UpgradeServiceImplService {
const actionToken: Record<string, any> = this.niucloudService.getActionToken("upgrade", actionQuery);
Record<String, Object> = new HashMap();
Record<String, Object> = {};
query.put("authorize_code", instance.getCode());
query.put("token", actionToken == null ? "" : actionToken.getStr("token"));
const response: HttpResponse = new NiucloudUtils.Cloud().build("cloud/upgrade").query(query).method(Method.GET).execute();

View File

@@ -23,7 +23,7 @@ export class VerifierServiceImplService {
queryWrapper.orderByDesc("id");
[VerifierVo[], number] iPage = verifierMapper.selectJoinPage(new Page<>(page, limit), VerifierVo.class, queryWrapper);
const list: VerifierListVo[] = new LinkedList();
const list: VerifierListVo[] = [];
for (const item of iPageRecords) {
const vo: VerifierListVo = new VerifierListVo();
Object.assign(vo, item);
@@ -49,7 +49,7 @@ export class VerifierServiceImplService {
const verifierList: VerifierVo[] = verifierMapper.selectJoinList(VerifierVo.class, queryWrapper);
const list: VerifierListVo[] = new LinkedList();
const list: VerifierListVo[] = [];
for (const item of verifierList) {
const vo: VerifierListVo = new VerifierListVo();
Object.assign(vo, item);

View File

@@ -31,7 +31,7 @@ export class VerifyServiceImplService {
}
[VerifyVo[], number] iPage = verifyMapper.selectJoinPage(new Page<>(page, limit), VerifyVo.class, queryWrapper);
const list: VerifyListVo[] = new LinkedList();
const list: VerifyListVo[] = [];
for (const item of iPageRecords) {
const vo: VerifyListVo = new VerifyListVo();
Object.assign(vo, item);

View File

@@ -50,12 +50,12 @@ export class WeappConfigServiceImplService {
const wxOpenMaService: WxOpenMaService = (WxOpenMaService) WechatUtils.miniapp(this.requestContext.siteId);
this.wxOpenMaService.modifyDomain(
"set",
CommonUtils.isNotEmpty(param.getRequestdomain()) ? [param.getRequestdomain(].split(";")) : new LinkedList(),
CommonUtils.isNotEmpty(param.getWsrequestdomain())? [param.getWsrequestdomain(].split(";")) : new LinkedList(),
CommonUtils.isNotEmpty(param.getUploaddomain())? [param.getUploaddomain(].split(";")) : new LinkedList(),
CommonUtils.isNotEmpty(param.getDownloaddomain())? [param.getDownloaddomain(].split(";")) : new LinkedList(),
CommonUtils.isNotEmpty(param.getTcpdomain())? [param.getTcpdomain(].split(";")) : new LinkedList(),
CommonUtils.isNotEmpty(param.getUdpdomain())? [param.getUdpdomain(].split(";")) : new LinkedList()
CommonUtils.isNotEmpty(param.getRequestdomain()) ? [param.getRequestdomain(].split(";")) : [],
CommonUtils.isNotEmpty(param.getWsrequestdomain())? [param.getWsrequestdomain(].split(";")) : [],
CommonUtils.isNotEmpty(param.getUploaddomain())? [param.getUploaddomain(].split(";")) : [],
CommonUtils.isNotEmpty(param.getDownloaddomain())? [param.getDownloaddomain(].split(";")) : [],
CommonUtils.isNotEmpty(param.getTcpdomain())? [param.getTcpdomain(].split(";")) : [],
CommonUtils.isNotEmpty(param.getUdpdomain())? [param.getUdpdomain(].split(";")) : []
);
} catch (e) {
throw new BadRequestException(e.message);

View File

@@ -16,7 +16,7 @@ export class WeappTemplateServiceImplService {
const addonNoticeList: AddonNoticeListVo[] = this.coreNoticeService.getAddonList(this.requestContext.siteId);
for (const item of addonNoticeList) {
const filter: NoticeInfoVo[] = new LinkedList();
const filter: NoticeInfoVo[] = [];
for (const noticeItem of item.getNotice()) {
if (noticeItem.getSupport_type().indexOf("weapp") != -1) {
filter.push(noticeItem);

View File

@@ -23,7 +23,7 @@ export class WeappVersionServiceImplService {
[WeappVersion[], number] iPage = this.weappVersionRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: WeappVersionListVo[] = new LinkedList();
const list: WeappVersionListVo[] = [];
for (const item of iPageRecords) {
const vo: WeappVersionListVo = new WeappVersionListVo();
Object.assign(vo, item);
@@ -118,7 +118,7 @@ export class WeappVersionServiceImplService {
} else {
try {
const wxOpenMaService: WxOpenMaService = (WxOpenMaService) WechatUtils.miniapp(this.requestContext.siteId);
const qrcode: string = this.wxOpenMaService.getTestQrcode("", new HashMap());
const qrcode: string = this.wxOpenMaService.getTestQrcode("", {});
if (fs.existsSync(qrcode)) {
return "data:image/jpeg;base64," + Base64.getEncoder().encodeToString(FileUtils.readFileToByteArray(qrcode));
}

View File

@@ -23,7 +23,7 @@ export class WechatMediaServiceImplService {
if (CommonUtils.isNotEmpty(searchParam.type)) queryWrapper.eq("type", searchParam.type);
[WechatMedia[], number] iPage = this.wechatMediaRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: WechatMediaListVo[] = new LinkedList();
const list: WechatMediaListVo[] = [];
for (const item of iPageRecords) {
const vo: WechatMediaListVo = new WechatMediaListVo();
Object.assign(vo, item);

View File

@@ -21,7 +21,7 @@ export class WechatMenuServiceImplService {
*/
async edit(...args: any[]): Promise<any> {
try{
const params: Record<String , JSONArray> = new HashMap();
const params: Record<String , JSONArray> = {};
params.put("button", data);
WechatUtils.mp(this.requestContext.siteId).getMenuService().menuCreate(JsonUtils.parseObject<any>(params).toString()) ;
this.coreConfigService.setConfig(this.requestContext.siteId, "WECHAT_MENU", data);

View File

@@ -26,7 +26,7 @@ export class WechatReplyServiceImplService {
if (CommonUtils.isNotEmpty(path.basename(searchParam))) queryWrapper.like("name", path.basename(searchParam));
[WechatReply[], number] iPage = this.wechatReplyRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: WechatReplyListVo[] = new LinkedList();
const list: WechatReplyListVo[] = [];
for (const item of iPageRecords) {
const vo: WechatReplyListVo = new WechatReplyListVo();
Object.assign(vo, item);

View File

@@ -16,7 +16,7 @@ export class WechatTemplateServiceImplService {
const addonNoticeList: AddonNoticeListVo[] = this.coreNoticeService.getAddonList(this.requestContext.siteId);
for (const item of addonNoticeList) {
const filter: NoticeInfoVo[] = new LinkedList();
const filter: NoticeInfoVo[] = [];
for (const noticeItem of item.getNotice()) {
if (noticeItem.getSupport_type().indexOf("wechat") != -1) {
filter.push(noticeItem);

View File

@@ -90,7 +90,7 @@ export class OplatformServiceImplService {
wrapper.orderByDesc(SysConfig::getUpdateTime);
any /* TODO: Page<SysConfig> */ pageObj = new Page<>(page, limit);
[SysConfig[], number] iPage = this.sysConfigRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ });
const listInfo: OplatformRecordVo[] = new LinkedList();
const listInfo: OplatformRecordVo[] = [];
for (const item of iPageRecords) {
const vo: OplatformRecordVo = new OplatformRecordVo();
Object.assign(vo, item);

View File

@@ -283,7 +283,7 @@ export class WeappVersionServiceImplService {
const limit: number = pageParam.limit;
[SiteGroup[], number] iPage = this.siteGroupRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), /* TODO: any /* TODO: QueryWrapper<SiteGroup> */TypeORM的where条件对象 */.select("group_id,group_name"));
const list: SiteGroupWeappVersionVo[] = new LinkedList();
const list: SiteGroupWeappVersionVo[] = [];
for (const item of iPageRecords) {
const vo: SiteGroupWeappVersionVo = new SiteGroupWeappVersionVo();

View File

@@ -26,7 +26,7 @@ export class DiyFormServiceImplService {
.eq("site_id", this.requestContext.siteId);
const formInfo: DiyForm = this.diyFormRepository.findOne({ /* TODO: 将QueryWrapper改为where条件 */ });
List<Record<String, String>> error = new ArrayList();
List<Record<String, String>> error = [];
const info: DiyFormInfoVo = new DiyFormInfoVo();
if (formInfo != null) {
BeanUtil.copyProperties(formInfo, info);
@@ -70,7 +70,7 @@ export class DiyFormServiceImplService {
}
}
} else {
const errorMap: Record<String, String> = new HashMap();
const errorMap: Record<String, String> = {};
errorMap.put("title", "当前表单无法查看");
errorMap.put("type", "表单状态");
errorMap.put("desc", "该表单已关闭");
@@ -164,7 +164,7 @@ export class DiyFormServiceImplService {
BeanUtil.copyProperties(diyFormRecords, vo);
const list: DiyFormRecordsFields[] = this.diyFormRecordsFieldsRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ })));
if (CommonUtils.isNotEmpty(list)) {
const volist: DiyFormRecordsFieldsListVo[] = new ArrayList();
const volist: DiyFormRecordsFieldsListVo[] = [];
for (const item of list) {
const diyFormRecordsFieldsListVo: DiyFormRecordsFieldsListVo = new DiyFormRecordsFieldsListVo();
Object.assign(diyFormRecordsFieldsListVo, item);

View File

@@ -114,7 +114,7 @@ export class DiyServiceImplService {
const list: BottomConfigVo[] = this.coreDiyConfigService.getBottomList();
const site: SiteInfoVo = this.coreSiteService.getSiteCache(param.siteId());
const tabbarList: BottomConfigVo[] = new LinkedList();
const tabbarList: BottomConfigVo[] = [];
for (const item of list) {
if (item.key === "app" && list.length > 1 && site.getApps().size() == 1) continue;
const config: BottomConfigVo = this.coreDiyConfigService.getBottomConfig(param.siteId(), item.key);

View File

@@ -120,7 +120,7 @@ export class LoginServiceImplService {
cache.setCode(String.format("%0" + 4 + "d", RandomUtil.randomInt(1, 9999)));
cache.type = param.type;
const data: Record<String, Object> = new HashMap();
const data: Record<String, Object> = {};
data.put("mobile", param.getMobile());
data.put("code", cache.getCode());

View File

@@ -47,7 +47,7 @@ export class MemberLevelServiceImplService {
filling.put("benefits_three", new Record<string, any>().set("title", "尊享客服").set("desc", "尊享客服").set("icon", "/static/resource/images/member/benefits/benefits_badge.png"));
const index: number = 0;
const list: MemberLevelInfoVo[] = new LinkedList();
const list: MemberLevelInfoVo[] = [];
for (const level of memberLevelList) {
const vo: MemberLevelInfoVo = new MemberLevelInfoVo();
Object.assign(vo, level);

View File

@@ -96,7 +96,7 @@ export class MemberSignServiceImplService {
this.memberSignRepository.save(model);
// 发放日签奖励
const dayAwardVar: Record<String, Object> = new HashMap();
const dayAwardVar: Record<String, Object> = {};
dayAwardVar.put("from_type", "day_sign_award");
dayAwardVar.put("memo", "日签奖励");
this.coreMemberService.memberGiftGrant(param.siteId(), param.memberId(), config.getDayAward(), dayAwardVar);
@@ -144,7 +144,7 @@ export class MemberSignServiceImplService {
continueAward.remove("receive_limit");
continueAward.remove("receive_num");
const continueAwardVar: Record<String, Object> = new HashMap();
const continueAwardVar: Record<String, Object> = {};
continueAwardVar.put("from_type", "continue_sign_award");
continueAwardVar.put("memo", "连签奖励");
this.coreMemberService.memberGiftGrant(param.siteId(), param.memberId(), continueAward, continueAwardVar);
@@ -165,8 +165,8 @@ export class MemberSignServiceImplService {
*/
async signMonthRecord(...args: any[]): Promise<any> {
const vo: MemberSignMonthRecordVo = new MemberSignMonthRecordVo();
const days: number[] = new ArrayList();
const period: MemberSignMonthRecordVo.Period[] = new ArrayList();
const days: number[] = [];
const period: MemberSignMonthRecordVo.Period[] = [];
const date: Date = DateUtil.parse(param.getYear() + "-" + param.getMonth() + "-1");
@@ -218,7 +218,7 @@ export class MemberSignServiceImplService {
const award: Record<string, any> = this.coreMemberService.getGiftContent(this.requestContext.siteId, item, "member_sign_continue");
const content: string[] = new ArrayList();
const content: string[] = [];
const icon: string = "";
for (const key of award.keySet()) {

View File

@@ -81,7 +81,7 @@ export class SysAreaServiceImplService {
Map<number, SysAreaLevelVo[]> sysAreaMap = ObjectGroupUtils.groupList(sysAreaLevelVoList, "pid");
return assembleAreaTree(sysAreaLevelVoList, sysAreaMap, 1, 3);
}
return new ArrayList();
return [];
}
/**

View File

@@ -16,7 +16,7 @@ export class SysVerifyServiceImplService {
async getVerifyCode(...args: any[]): Promise<any> {
// 生成核销码(对应业务调用)
const verifyCodeList: string[] = this.createVerifyCode(param.siteId(), param.memberId(), param.type, param.data);
const sysVerifyGetCodeVoList: SysVerifyGetCodeVo[] = new ArrayList();
const sysVerifyGetCodeVoList: SysVerifyGetCodeVo[] = [];
for (const verifyCode of verifyCodeList) {
const sysVerifyGetCodeVo: SysVerifyGetCodeVo = new SysVerifyGetCodeVo();
sysVerifyGetCodeVo.setCode(verifyCode);
@@ -187,7 +187,7 @@ export class SysVerifyServiceImplService {
throw new Error("核销员不存在");
}
// 核销操作
const verifyDataMap: Record<String, Object> = new HashMap();
const verifyDataMap: Record<String, Object> = {};
verifyDataMap.put("site_id", verifyMap.get("site_id"));
verifyDataMap.put("code", param.getCode());
verifyDataMap.put("body", verifyMap.get("body"));

View File

@@ -78,7 +78,7 @@ export class CoreAppCloudServiceImplService {
actionQuery.put("data[product_key]", instance.getProductKey());
const actionToken: Record<string, any> = this.niucloudService.getActionToken("appbuild", actionQuery);
Record<String, Object> = new HashMap();
Record<String, Object> = {};
query.put("authorize_code", instance.getCode());
query.put("timestamp", taskKey);
query.put("token", actionToken == null ? "" : actionToken.getStr("token"));
@@ -105,7 +105,7 @@ export class CoreAppCloudServiceImplService {
async getAppCompileLog(...args: any[]): Promise<any> {
const instance: NiucloudUtils = NiucloudUtils.getInstance();
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("authorize_code", instance.getCode());
query.put("timestamp", key);
@@ -140,7 +140,7 @@ export class CoreAppCloudServiceImplService {
* generateSignCert
*/
async generateSignCert(...args: any[]): Promise<any> {
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("key_alias", param.getKeyAlias());
query.put("key_password", param.getKeyPassword());
query.put("store_password", param.getStorePassword());

View File

@@ -34,7 +34,7 @@ export class CoreDiyServiceImplService {
return;
}
const diyThemes: DiyTheme[] = new ArrayList();
const diyThemes: DiyTheme[] = [];
// 处理主题配置
themeColorList.forEach(item => {

View File

@@ -45,7 +45,7 @@ export class CoreDiyFormRecordsServiceImplService {
Object.assign(memberVo, vo);
vo.setMember(memberVo);
if (CommonUtils.isNotEmpty(list)) {
const map: Record<String, DiyFormRecordsFieldsListVo> = new HashMap();
const map: Record<String, DiyFormRecordsFieldsListVo> = {};
for (const item of list) {
const diyFormRecordsFieldsListVo: DiyFormRecordsFieldsListVo = new DiyFormRecordsFieldsListVo();
Object.assign(diyFormRecordsFieldsListVo, item);
@@ -71,7 +71,7 @@ export class CoreDiyFormRecordsServiceImplService {
Object.assign(vo, model);
const list: DiyFormRecordsFields[] = this.diyFormRecordsFieldsRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ })));
if (CommonUtils.isNotEmpty(list)) {
const map: Record<String, DiyFormRecordsFieldsListVo> = new HashMap();
const map: Record<String, DiyFormRecordsFieldsListVo> = {};
for (const item of list) {
const diyFormRecordsFieldsListVo: DiyFormRecordsFieldsListVo = new DiyFormRecordsFieldsListVo();
Object.assign(diyFormRecordsFieldsListVo, item);
@@ -97,14 +97,14 @@ export class CoreDiyFormRecordsServiceImplService {
model.value = JSONUtil.toJsonStr(addParam.value);
this.diyFormRecordsRepository.save(model);
const list: DiyFormFields[] = this.diyFormFieldsRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ })).eq("site_id", addParam.siteId));
const fieldList: Record<String, DiyFormFields> = new HashMap();
const fieldList: Record<String, DiyFormFields> = {};
if (CommonUtils.isNotEmpty(list)) {
for (const item of list) {
fieldList.put(item.getFieldKey(), item);
}
}
const recordsFieldsList: DiyFormRecordsFields[] = new ArrayList();
const recordsFieldsList: DiyFormRecordsFields[] = [];
if (CommonUtils.isNotEmpty(addParam.value)) {
const components: JSONArray = JSONUtil.parseArray(addParam.value);
@@ -225,7 +225,7 @@ export class CoreDiyFormRecordsServiceImplService {
.collect(/* Collectors已删除 */.toMap(DiyFormFields::getFieldKey, Function.identity()));
// 处理字段数据
const recordsFields: DiyFormRecordsFields[] = new ArrayList();
const recordsFields: DiyFormRecordsFields[] = [];
if (StringUtils.isNotEmptyArray(param.value)) {
for (const comp of param.value) {
if (!(comp instanceof Record<string, any>)) continue;

View File

@@ -112,7 +112,7 @@ export class CoreMemberCashOutServiceImplService {
memberCashOutMapper.updateById(cashOut);
}
const data: Record<String, Object> = new HashMap();
const data: Record<String, Object> = {};
data.put("transfer_voucher", ObjectUtil.defaultIfEmpty(param.getTransferVoucher(), ""));
data.put("transfer_remark", ObjectUtil.defaultIfEmpty(param.getTransferRemark(), ""));

View File

@@ -38,7 +38,7 @@ export class CoreNoticeServiceImplService {
map.put(item.key, item);
}
}
Record<String, NoticeInfoVo> = new HashMap();
Record<String, NoticeInfoVo> = {};
for (Map.Entry<String, NoticeEnumListVo> noticeMap : NoticeEnum.getNotice().entrySet()) {
const vo: NoticeInfoVo = new NoticeInfoVo();
@@ -70,12 +70,12 @@ export class CoreNoticeServiceImplService {
adminAddon.key = "system";
adminAddon.title = "系统";
addonList.push(0, adminAddon);
const noticeAddonList: AddonNoticeListVo[] = new ArrayList();
const noticeAddonList: AddonNoticeListVo[] = [];
for (const addon of addonList) {
const noticeListVo: AddonNoticeListVo = new AddonNoticeListVo();
noticeListVo.key = addon.key;
noticeListVo.title = addon.title;
noticeListVo.setNotice(new ArrayList());
noticeListVo.setNotice([]);
for (Map.Entry<String, NoticeInfoVo> noticeMap : notice.entrySet()) {
if (noticeListVo.key === noticeMap.getValue(.getAddon())) {
noticeListVo.getNotice().add(noticeMap.value);

View File

@@ -33,7 +33,7 @@ export class CorePayChannelServiceImplService {
* getAllowPayTypeByChannel
*/
async getAllowPayTypeByChannel(...args: any[]): Promise<any> {
const list: PayTypeVo[] = new LinkedList();
const list: PayTypeVo[] = [];
const payChannelList: PayChannel[] = this.payChannelRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ })
.eq("site_id", siteId)

View File

@@ -20,7 +20,7 @@ export class CorePayEventServiceImplService {
queryWrapper.orderByDesc("id");
[PayRefund[], number] iPage = this.payRefundRepository.findAndCount({ /* TODO: 将MyBatis分页参数改为TypeORM的skip/take */ }), queryWrapper);
const list: PayRefundListVo[] = new LinkedList();
const list: PayRefundListVo[] = [];
for (const item of iPageRecords) {
const vo: PayRefundListVo = new PayRefundListVo();
Object.assign(vo, item);

View File

@@ -22,7 +22,7 @@ export class CorePayServiceImplService {
const driver: BasePay = this.driver(param.siteId, param.getChannel(), param.type);
const json: Record<String, Object> = new HashMap();
const json: Record<String, Object> = {};
json.put("openid", param.getOpenid());
pay.setJson(JSONUtil.toJsonStr(json));
this.payMapper.updateById(pay);

View File

@@ -21,7 +21,7 @@ export class CoreScheduleServiceImplService {
const scheduleList: SysSchedule[] = this.sysScheduleRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }).select("id,`key`"));
const scheduleMap: Record<String, SysSchedule> = scheduleList.collect(/* Collectors已删除 */.toMap(SysSchedule::getKey, i => i));
const list: SysSchedule[] = new LinkedList();
const list: SysSchedule[] = [];
for (const i of number = 0; i < schedule.length; i++) {
const item: Record<string, any> = schedule.getRecord<string, any>(i);
@@ -80,7 +80,7 @@ export class CoreScheduleServiceImplService {
const scheduleList: SysSchedule[] = this.sysScheduleRepository.find({ /* TODO: 将QueryWrapper改为where条件 */ }).select("id,`key`"));
const scheduleMap: Record<String, SysSchedule> = scheduleList.collect(/* Collectors已删除 */.toMap(SysSchedule::getKey, i => i));
const list: SysSchedule[] = new LinkedList();
const list: SysSchedule[] = [];
for (const i of number = 0; i < schedule.length; i++) {
const item: Record<string, any> = schedule.getRecord<string, any>(i);

View File

@@ -68,8 +68,8 @@ export class CoreSiteServiceImplService {
siteInfoVo.setSiteAddons(this.addonService.getAddonListByKeys(siteInfoVo.getAddonKeys(), ""));
siteInfoVo.setApps(this.addonService.getAddonListByKeys(siteInfoVo.getAddonKeys(), AddonActionEnum.APP.getCode()));
}else{
siteInfoVo.setSiteAddons(new ArrayList());
siteInfoVo.setApps(new ArrayList());
siteInfoVo.setSiteAddons([]);
siteInfoVo.setApps([]);
}
const sysUserRole: SysUserRole = this.sysUserRoleRepository.findOne({ /* TODO: 将QueryWrapper改为where条件 */ }).eq("site_id", siteId).eq("is_admin", 1));
if (CommonUtils.isNotEmpty(sysUserRole)) {
@@ -128,7 +128,7 @@ export class CoreSiteServiceImplService {
* siteInitBySiteId
*/
async siteInitBySiteId(...args: any[]): Promise<any> {
const userIds: number[] = new ArrayList();
const userIds: number[] = [];
try {
for (const table of tables) {
if (!isTableExists(table)) {

View File

@@ -99,7 +99,7 @@ export class CoreExportServiceImplService {
List<Object[]> datas = new ArrayList<>(CollectionUtil.size(valueData));
for (const itemObj of valueData) {
const itemJsonObject: Record<string, any> = (Record<string, any>) itemObj;
const itemDatas: Object[] = new ArrayList();
const itemDatas: Object[] = [];
for (const itemKey of keyList) {
itemDatas.push(itemJsonObject.getStr(itemKey, ""));
}

View File

@@ -19,7 +19,7 @@ export class CoreStorageServiceImplService {
const storageConfig: Record<string, any> = getStorageConfig(siteId);
const storageTypeList: Record<string, any> = UploadLoader.type;
const coreStorAgeConfigVoList: CoreStorAgeConfigVo[] = new ArrayList();
const coreStorAgeConfigVoList: CoreStorAgeConfigVo[] = [];
for (const key of storageTypeList.keySet()) {
const storageValues: Record<string, any> = JsonUtils.parseObject<any>(storageTypeList.get(key));
const coreStorAgeConfigVo: CoreStorAgeConfigVo = new CoreStorAgeConfigVo();

View File

@@ -42,7 +42,7 @@ export class CoreWeappCloudServiceImplService {
actionQuery.put("data[product_key]", instance.getProductKey());
const actionToken: Record<string, any> = this.niucloudService.getActionToken("weappbuild", actionQuery);
Record<String, Object> = new HashMap();
Record<String, Object> = {};
query.put("authorize_code", instance.getCode());
query.put("compile", compileAddon != null ? 1 : 0);
query.put("appid", param.getAppId());
@@ -71,7 +71,7 @@ export class CoreWeappCloudServiceImplService {
async getWeappCompileLog(...args: any[]): Promise<any> {
const instance: NiucloudUtils = NiucloudUtils.getInstance();
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("authorize_code", instance.getCode());
query.put("timestamp", key);
@@ -91,7 +91,7 @@ export class CoreWeappCloudServiceImplService {
try {
const instance: NiucloudUtils = NiucloudUtils.getInstance();
const query: Record<String, Object> = new HashMap();
const query: Record<String, Object> = {};
query.put("authorize_code", instance.getCode());
const response: HttpResponse = new NiucloudUtils.Cloud().useThirdBuild().build("cloud/get_weapp_preview").query(query).execute();

View File

@@ -88,7 +88,7 @@ export class CoreWeappDeliveryServiceImplService {
shippingInfo.setDeliveryMode(shippingData.getDeliveryMode());
// 处理发货列表
const wxShippingList: ShippingListBean[] = new ArrayList();
const wxShippingList: ShippingListBean[] = [];
for (WeappUploadShippingParam.UploadShippingParam item : shippingData.getShippingList()) {
const shipping: ShippingListBean = new ShippingListBean();

View File

@@ -14,7 +14,7 @@ export class CoreWeappServiceImplService {
*/
async qrcodeBytes(...args: any[]): Promise<any> {
try {
const scene: string[] = new LinkedList();
const scene: string[] = [];
for (const key of data.keySet()) {
scene.push(key + "-" + data.get(key).toString());
}
@@ -39,7 +39,7 @@ export class CoreWeappServiceImplService {
*/
async qrcodeFile(...args: any[]): Promise<any> {
try {
const scene: string[] = new LinkedList();
const scene: string[] = [];
for (const key of data.keySet()) {
scene.push(key + "-" + data.get(key).toString());
}