作者 陈志颖

fix:修改订单创建时销售日期格式

appname = partnermg
runmode = "${RUN_MODE||dev}"
httpport = "${HTTP_PORT||8082}"
httpport = "${HTTP_PORT||8081}"
EnableHTTPS = true
HTTPSPort = "443"
HTTPSCertFile = "conf/fjmaimaimai.com_pem.crt"
... ...
... ... @@ -4,9 +4,9 @@ import "os"
var POSTGRESQL_DB_NAME = "partner_test"
var POSTGRESQL_USER = "postgres"
var POSTGRESQL_PASSWORD = "eagle1010" // eagle1010 1993618jack
var POSTGRESQL_HOST = "114.55.200.59" // 114.55.200.59 127.0.0.1
var POSTGRESQL_PORT = "31543" // 31543 5432
var POSTGRESQL_PASSWORD = "1993618jack" // eagle1010 1993618jack
var POSTGRESQL_HOST = "127.0.0.1" // 114.55.200.59 127.0.0.1
var POSTGRESQL_PORT = "5432" // 31543 5432
var DISABLE_CREATE_TABLE = false
var DISABLE_SQL_GENERATE_PRINT = false
... ...
... ... @@ -415,6 +415,7 @@ func (c *OrderInfoController) UpdateOrderReal() {
}
var orderDataReturn *domain.OrderBase
saleDate, err := time.ParseInLocation("2006-01-02 15:04:05", param.SaleDate, time.Local)
saleDateWithTz := time.Date(saleDate.Year(), saleDate.Month(), saleDate.Day(), time.Now().Hour(), time.Now().Minute(), time.Now().Second(), time.Now().Nanosecond(), time.Local)
if err != nil {
e := lib.ThrowError(lib.ARG_ERROR, err.Error())
... ... @@ -422,9 +423,9 @@ func (c *OrderInfoController) UpdateOrderReal() {
return
}
if param.Id == 0 {
orderDataReturn, err = c.addOrderReal(param, saleDate)
orderDataReturn, err = c.addOrderReal(param, saleDateWithTz)
} else {
err = c.editOrderReal(param, saleDate)
err = c.editOrderReal(param, saleDateWithTz)
}
if err != nil {
c.ResponseError(err)
... ...