作者 陈志颖

fix:导出素币流水记录

... ... @@ -273,6 +273,7 @@ func (suMoneyService *SuMoneyService) ListSuMoneyById(exportSuMoneyCommand *comm
if err := exportSuMoneyCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ... @@ -313,6 +314,7 @@ func (suMoneyService *SuMoneyService) ListSuMoneyTransactionRecordById(exportSuM
if err := exportSuMoneyTransactionRecordCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...
... ... @@ -706,13 +706,11 @@ func (controller *SuMoneyController) ExportSuMoneyTransactionRecord() {
var data []map[string]interface{}
records, err := suMoneyService.ListSuMoneyTransactionRecordById(exportTransactionRecordCommand)
for _, record := range records {
timString := record.CreateTime.Format("2006/01/02 15:04:05")
p := map[string]interface{} {
"name": record.Employee.EmployeeName,
"current_su_money": record.CurrentSuMoney,
"record": record.SuMoney,
"create_time": timString,
"create_time": record.CreateTime.Format("2006-01-02 15:04:05"),
"operator": record.Operator.EmployeeName,
}
... ...