作者 tangxuhui

更新 添加销售导航路由

... ... @@ -216,3 +216,14 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import
"url": url,
}, nil
}
func (srv ExcelDataService) GetExcelDataFields(code string) (interface{}, error) {
dataFileds := []DataFieldOptions{}
switch code {
case domain.ExportCompanyUser:
dataFileds = (ExportCompanyUserData{}).AllFields()
case domain.ExportCooperationUser:
dataFileds = (ExportCooperationUserData{}).AllFields()
}
return dataFileds, nil
}
... ...
... ... @@ -46,11 +46,11 @@ func (controller *ExcelDataController) fieldValueAllEmpty(param map[string]strin
}
// ImportDividendsOrder 导入分红订单
func (controller ExcelDataController) ImportDividendsOrder() {
func (controller *ExcelDataController) ImportDividendsOrder() {
importDividendsOrder(controller)
}
func importDividendsOrder(controller ExcelDataController) {
func importDividendsOrder(controller *ExcelDataController) {
fileReader, err := controller.GetExcelFile()
if err != nil {
... ... @@ -109,11 +109,11 @@ func importDividendsOrder(controller ExcelDataController) {
}
// ImportDividendsReturnedOrder 导入分红退货单
func (controller ExcelDataController) ImportDividendsReturnedOrder() {
func (controller *ExcelDataController) ImportDividendsReturnedOrder() {
importDividendsReturnedOrder(controller)
}
func importDividendsReturnedOrder(controller ExcelDataController) {
func importDividendsReturnedOrder(controller *ExcelDataController) {
fileReader, err := controller.GetExcelFile()
if err != nil {
... ... @@ -172,7 +172,7 @@ func importDividendsReturnedOrder(controller ExcelDataController) {
}
// FileImport 文件导入
func (controller ExcelDataController) FileImport() {
func (controller *ExcelDataController) FileImport() {
code := controller.GetString("code")
switch code {
case domain.ImportDividendsOrders:
... ... @@ -184,7 +184,7 @@ func (controller ExcelDataController) FileImport() {
}
}
func defaultImport(controller ExcelDataController) {
func defaultImport(controller *ExcelDataController) {
var (
data interface{}
err error
... ... @@ -213,7 +213,7 @@ func defaultImport(controller ExcelDataController) {
controller.Response(data, err)
}
func (controller ExcelDataController) FileImportTemplate() {
func (controller *ExcelDataController) FileImportTemplate() {
excelService := service.NewExcelDataService(nil)
cmd := &command.ImportDataCommand{}
code := controller.GetString(":code")
... ... @@ -224,11 +224,11 @@ func (controller ExcelDataController) FileImportTemplate() {
}
// FileExport 文件导出
func (controller ExcelDataController) FileExport() {
func (controller *ExcelDataController) FileExport() {
fileExport(controller, "")
}
func fileExport(controller ExcelDataController, code string) {
func fileExport(controller *ExcelDataController, code string) {
// 1.读取command
exportDataCommand := &command.ExportDataCommand{}
err := controller.Unmarshal(exportDataCommand)
... ... @@ -280,11 +280,16 @@ func fileExport(controller ExcelDataController, code string) {
}
// ExportCompanyUser 导出公司用户
func (controller ExcelDataController) ExportCompanyUser() {
func (controller *ExcelDataController) ExportCompanyUser() {
fileExport(controller, domain.ExportCompanyUser)
}
// ExportCooperationUser 导出共创用户
func (controller ExcelDataController) ExportCooperationUser() {
func (controller *ExcelDataController) ExportCooperationUser() {
fileExport(controller, domain.ExportCooperationUser)
}
//GetExcelDataFields 获取导出excel数据的可选字段
func (controller *ExcelDataController) GetExcelDataFields() {
}
... ...
... ... @@ -9,4 +9,6 @@ func init() {
/***** 转发销售导航的请求*****/
web.Router("/suplus-sale-app/v1/platform/district", &mobile_client.ReverseProxyController{}, "post:SuplusSaleApp")
web.Router("/suplus-sale-app/v1/platform/page", &mobile_client.ReverseProxyController{}, "post:SuplusSaleApp")
}
... ...