|
@@ -259,6 +259,7 @@ func SaveOrderHandler(r *ghttp.Request) {
|
|
|
"zero_type": param.ZeroOrderType,
|
|
|
"remark": param.OrderRemark,
|
|
|
"user_id": jyutil.GetCommonUserIdByPhone(ctx, param.PersonPhone, param.CompanyName, param.BuySubject),
|
|
|
+ "last_update_time": date.NowFormat(date.Date_Full_Layout),
|
|
|
"return_status": common.If(param.ContractMoney == 0, 1, 0),
|
|
|
}); err != nil {
|
|
|
return gerror.Wrap(err, "插入订单表异常")
|
|
@@ -385,6 +386,7 @@ func UpdateOrderHandler(r *ghttp.Request) {
|
|
|
"buy_subject": param.BuySubject,
|
|
|
"payment_user": param.PaymentUser,
|
|
|
"zero_type": param.ZeroOrderType,
|
|
|
+ "last_update_time": date.NowFormat(date.Date_Full_Layout),
|
|
|
"remark": param.OrderRemark,
|
|
|
"user_id": jyutil.GetCommonUserIdByPhone(ctx, param.PersonPhone, param.CompanyName, param.BuySubject),
|
|
|
"return_status": common.If(param.ContractMoney == 0, 1, 0),
|
|
@@ -408,6 +410,7 @@ func UpdateOrderHandler(r *ghttp.Request) {
|
|
|
}
|
|
|
}
|
|
|
//编辑回退订单或未完成订单
|
|
|
+ upOrder["last_update_time"] = date.NowFormat(date.Date_Full_Layout)
|
|
|
if _, err = g.DB().Ctx(ctx).Update(ctx, "dataexport_order", upOrder, "order_code=? and order_status=0 ", param.OrderCode); err != nil {
|
|
|
return gerror.Wrap(err, "修改订单表内容异常")
|
|
|
}
|
|
@@ -442,7 +445,8 @@ func UpdateOrderHandler(r *ghttp.Request) {
|
|
|
}
|
|
|
if len(delDetailIds) > 0 { //存在删除的订单
|
|
|
g.DB().Ctx(ctx).Update(ctx, "dataexport_order", map[string]interface{}{
|
|
|
- "status": -1,
|
|
|
+ "status": -1,
|
|
|
+ "last_update_time": date.NowFormat(date.Date_Full_Layout),
|
|
|
}, fmt.Sprintf(" id in (%s)", strings.Join(delDetailIds, ",")))
|
|
|
}
|
|
|
return nil
|