...
|
...
|
@@ -280,3 +280,22 @@ func (srv ExcelDataService) importResultWithHeader(headers []excel.DataField, fa |
|
|
}
|
|
|
return result
|
|
|
}
|
|
|
|
|
|
// ImportCompanyUser 导入公司用户信息
|
|
|
func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.ImportDataCommand) (interface{}, error) {
|
|
|
var mapTemplate = map[string]string{
|
|
|
domain.TemplateCompanyUser: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx",
|
|
|
// 模板待更新
|
|
|
domain.TemplateOrganization: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx",
|
|
|
domain.TemplateCooperationUser: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx",
|
|
|
domain.TemplateDividendsOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx",
|
|
|
}
|
|
|
var url string
|
|
|
var ok bool
|
|
|
if url, ok = mapTemplate[importDataCommand.Code]; !ok {
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, fmt.Sprintf("模板:%v 不存在", importDataCommand.Code))
|
|
|
}
|
|
|
return map[string]string{
|
|
|
"url": url,
|
|
|
}, nil
|
|
|
} |
...
|
...
|
|