|
@@ -1235,6 +1235,7 @@ func CreateBigOrder(context *admin.Context) (interface{}, error) {
|
|
|
code := fmt.Sprintf("%s%s", time.Now().Format("150405"), qutil.GetRandom(6))
|
|
|
var status error
|
|
|
param.CreatePerson = context.User.Username
|
|
|
+ param.SaleTime = strings.Split(param.SaleTime, " ")[0] + " " + strings.Split(qutil.NowFormat(qutil.Date_Full_Layout), " ")[1]
|
|
|
if param.CreateType == 1 {
|
|
|
status = NewBigOrder(subStatus, dateType, startdate, enddate, userId, code, sName, ¶m)
|
|
|
} else if param.CreateType == 2 {
|
|
@@ -1353,6 +1354,10 @@ func UpdateBigOrder(context *admin.Context) (interface{}, error) {
|
|
|
if auditStatus != util.OrderPassed {
|
|
|
return nil, errors.New("仅可编辑订单审核状态为已通过的订单")
|
|
|
}
|
|
|
+ //若业绩时间改变,时分秒改为当前时分秒
|
|
|
+ if param.SaleTime != qutil.ObjToString(res["sale_time"]) {
|
|
|
+ param.SaleTime = strings.Split(param.SaleTime, " ")[0] + " " + strings.Split(qutil.NowFormat(qutil.Date_Full_Layout), " ")[1]
|
|
|
+ }
|
|
|
if res["user_phone"] != param.Phone {
|
|
|
userData, ok := util.MQFW.FindOne("user", map[string]interface{}{"s_phone": param.Phone})
|
|
|
memberStatus := 0
|
|
@@ -1504,6 +1509,8 @@ func UpdateBigOrder(context *admin.Context) (interface{}, error) {
|
|
|
var status error
|
|
|
if param.CreateType == 1 {
|
|
|
status = UpdateNewBigOrder(subStatus, dateType, now, startdate, enddate, userId, code, sName, ¶m, returnStatus)
|
|
|
+ } else {
|
|
|
+ util.JysqlDB.Update("dataexport_order", map[string]interface{}{"order_code": code}, map[string]interface{}{"sale_time": param.SaleTime})
|
|
|
}
|
|
|
if status == nil {
|
|
|
// 判断是否需要修改用户类型
|
|
@@ -1946,6 +1953,7 @@ func CreateSubOrder(context *admin.Context) (interface{}, error) {
|
|
|
}
|
|
|
param.BuySubject = "1" //大会员补充包/子账号 均为购买个体
|
|
|
param.CreatePerson = context.User.Username
|
|
|
+ param.SaleTime = strings.Split(param.SaleTime, " ")[0] + " " + strings.Split(qutil.NowFormat(qutil.Date_Full_Layout), " ")[1]
|
|
|
if param.Phone != "" {
|
|
|
userId, memberStatus := "", 0
|
|
|
bigStart, bigEnd, pay_sub_num, free_sub_num := int64(0), int64(0), 0, 0
|
|
@@ -2184,6 +2192,10 @@ func UpdateSubOrder(context *admin.Context) (interface{}, error) {
|
|
|
if auditStatus != util.OrderPassed {
|
|
|
return nil, errors.New("仅可编辑订单审核状态为已通过的订单")
|
|
|
}
|
|
|
+ //若业绩时间改变,时分秒改为当前时分秒
|
|
|
+ if param.SaleTime != qutil.ObjToString(res["sale_time"]) {
|
|
|
+ param.SaleTime = strings.Split(param.SaleTime, " ")[0] + " " + strings.Split(qutil.NowFormat(qutil.Date_Full_Layout), " ")[1]
|
|
|
+ }
|
|
|
//处理回款状态
|
|
|
//原来实收金额
|
|
|
payMoney := qutil.IntAll(qutil.If(res["pay_money"] == "", 0, res["pay_money"]))
|
|
@@ -2400,6 +2412,7 @@ func CreateSupplyOrder(context *admin.Context) (interface{}, error) {
|
|
|
}
|
|
|
param.BuySubject = "1" //大会员补充包/子账号 均为购买个体
|
|
|
param.CreatePerson = context.User.Username
|
|
|
+ param.SaleTime = strings.Split(param.SaleTime, " ")[0] + " " + strings.Split(qutil.NowFormat(qutil.Date_Full_Layout), " ")[1]
|
|
|
if param.Phone != "" {
|
|
|
userId := ""
|
|
|
bigStart, bigEnd, memberStatus := int64(0), int64(0), 0
|
|
@@ -2691,6 +2704,10 @@ func UpdateSupplyOrder(context *admin.Context) (interface{}, error) {
|
|
|
if auditStatus != util.OrderPassed {
|
|
|
return nil, errors.New("仅可编辑订单审核状态为已通过的订单")
|
|
|
}
|
|
|
+ //若业绩时间改变,时分秒改为当前时分秒
|
|
|
+ if param.SaleTime != qutil.ObjToString(res["sale_time"]) {
|
|
|
+ param.SaleTime = strings.Split(param.SaleTime, " ")[0] + " " + strings.Split(qutil.NowFormat(qutil.Date_Full_Layout), " ")[1]
|
|
|
+ }
|
|
|
//处理回款状态
|
|
|
//原来实收金额
|
|
|
payMoney := qutil.IntAll(qutil.If(res["pay_money"] == "", 0, res["pay_money"]))
|