作者 陈志颖

fix:导出素币流水记录

@@ -273,6 +273,7 @@ func (suMoneyService *SuMoneyService) ListSuMoneyById(exportSuMoneyCommand *comm @@ -273,6 +273,7 @@ func (suMoneyService *SuMoneyService) ListSuMoneyById(exportSuMoneyCommand *comm
273 if err := exportSuMoneyCommand.ValidateCommand(); err != nil { 273 if err := exportSuMoneyCommand.ValidateCommand(); err != nil {
274 return nil, application.ThrowError(application.ARG_ERROR, err.Error()) 274 return nil, application.ThrowError(application.ARG_ERROR, err.Error())
275 } 275 }
  276 +
276 transactionContext, err := factory.CreateTransactionContext(nil) 277 transactionContext, err := factory.CreateTransactionContext(nil)
277 if err != nil { 278 if err != nil {
278 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 279 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
@@ -313,6 +314,7 @@ func (suMoneyService *SuMoneyService) ListSuMoneyTransactionRecordById(exportSuM @@ -313,6 +314,7 @@ func (suMoneyService *SuMoneyService) ListSuMoneyTransactionRecordById(exportSuM
313 if err := exportSuMoneyTransactionRecordCommand.ValidateCommand(); err != nil { 314 if err := exportSuMoneyTransactionRecordCommand.ValidateCommand(); err != nil {
314 return nil, application.ThrowError(application.ARG_ERROR, err.Error()) 315 return nil, application.ThrowError(application.ARG_ERROR, err.Error())
315 } 316 }
  317 +
316 transactionContext, err := factory.CreateTransactionContext(nil) 318 transactionContext, err := factory.CreateTransactionContext(nil)
317 if err != nil { 319 if err != nil {
318 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 320 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
@@ -706,13 +706,11 @@ func (controller *SuMoneyController) ExportSuMoneyTransactionRecord() { @@ -706,13 +706,11 @@ func (controller *SuMoneyController) ExportSuMoneyTransactionRecord() {
706 var data []map[string]interface{} 706 var data []map[string]interface{}
707 records, err := suMoneyService.ListSuMoneyTransactionRecordById(exportTransactionRecordCommand) 707 records, err := suMoneyService.ListSuMoneyTransactionRecordById(exportTransactionRecordCommand)
708 for _, record := range records { 708 for _, record := range records {
709 - timString := record.CreateTime.Format("2006/01/02 15:04:05")  
710 -  
711 p := map[string]interface{} { 709 p := map[string]interface{} {
712 "name": record.Employee.EmployeeName, 710 "name": record.Employee.EmployeeName,
713 "current_su_money": record.CurrentSuMoney, 711 "current_su_money": record.CurrentSuMoney,
714 "record": record.SuMoney, 712 "record": record.SuMoney,
715 - "create_time": timString, 713 + "create_time": record.CreateTime.Format("2006-01-02 15:04:05"),
716 "operator": record.Operator.EmployeeName, 714 "operator": record.Operator.EmployeeName,
717 } 715 }
718 716