作者 陈志颖

Merge branch 'dev-chenzhiying' into dev

... ... @@ -5,7 +5,6 @@ import (
"github.com/beego/beego/v2/core/validation"
"reflect"
"strings"
"time"
)
type OrderGoods struct {
... ... @@ -31,7 +30,7 @@ type CreateDividendsOrderCommand struct {
// 分红订单原单号
DividendsOriginalOrderNum string `cname:"源单号" json:"dividendsOriginalOrderNum" valid:"Required"`
// 订单时间
OrderTime time.Time `cname:"订单时间" json:"orderTime" valid:"Required"`
OrderTime string `cname:"订单时间" json:"orderTime" valid:"Required"`
// 备注
Remarks string `cname:"备注" json:"remarks" valid:"Required"`
// 订单区域名称
... ...
... ... @@ -136,9 +136,12 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD
dividendsOrderAmount = dividendsOrderAmount + orderGood.OrderGoodAmount
}
//// 订单时间转换
//orderTimeInt, _ := strconv.ParseInt(createDividendsOrderCommand.OrderTime, 10, 64)
//orderTime := utils.TransformTimestampToTime(orderTimeInt)
// 订单时间转换
orderTimeInt, err := strconv.ParseInt(createDividendsOrderCommand.OrderTime, 10, 64)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "订单时间错误")
}
orderTime := utils.TransformTimestampToTime(orderTimeInt)
// 新增分红订单
newDividendsOrder := &domain.DividendsOrder{
... ... @@ -146,7 +149,7 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD
DividendsOrderNumber: dividendsOrderNumber,
DividendsOriginalOrderNum: createDividendsOrderCommand.DividendsOriginalOrderNum,
DividendsOrderAmount: dividendsOrderAmount,
OrderTime: createDividendsOrderCommand.OrderTime,
OrderTime: orderTime,
DividendTime: time.Time{},
DividendStatus: domain.TO_BE_DIVIDEND,
Region: &domain.RegionInfo{
... ...