aa
This commit is contained in:
@@ -93,6 +93,7 @@ func InitServiceInfo(version string, buildTime time.Time, gitCommit string) {
|
|||||||
}]`,
|
}]`,
|
||||||
"billTypeNames": model.BillTypeNames,
|
"billTypeNames": model.BillTypeNames,
|
||||||
"deliveryStatusName": model.DeliveryStatusName,
|
"deliveryStatusName": model.DeliveryStatusName,
|
||||||
|
"cashbackName": model.CashbackName,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,10 +53,13 @@ func PublishJob(ctx *jxcontext.Context, jobExt *model.JobExt) (errCode string, e
|
|||||||
finishedAt time.Time
|
finishedAt time.Time
|
||||||
DayTimeBegin, DayTimeEnd = jxutils.GetDayTime()
|
DayTimeBegin, DayTimeEnd = jxutils.GetDayTime()
|
||||||
)
|
)
|
||||||
//需根据任务类型做一些参数判断,比如门店商品链接,地址
|
// 需根据任务类型做一些参数判断,比如门店商品链接,地址
|
||||||
// switch job.JobCategoryID {
|
switch job.JobCategoryID {
|
||||||
// case 1:
|
case model.JobCategoryIDwmtg:
|
||||||
// }
|
|
||||||
|
default:
|
||||||
|
return errCode, fmt.Errorf("暂不支持的任务类型! %v", job.JobCategoryID)
|
||||||
|
}
|
||||||
if data, err := json.Marshal(jobExt); err == nil {
|
if data, err := json.Marshal(jobExt); err == nil {
|
||||||
json.Unmarshal(data, &job)
|
json.Unmarshal(data, &job)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,11 @@ const (
|
|||||||
JobTypeNormal = 0 //普通任务
|
JobTypeNormal = 0 //普通任务
|
||||||
JobTypeMtMember = 1 //美团会员任务
|
JobTypeMtMember = 1 //美团会员任务
|
||||||
JobTypeJdDelivery = 2 //京东快递任务
|
JobTypeJdDelivery = 2 //京东快递任务
|
||||||
|
|
||||||
|
JobCashbackPrice = 1 //返现类型固定返现
|
||||||
|
JobCashbackPercentage = 2 //返现类型比例返现
|
||||||
|
|
||||||
|
JobCategoryIDwmtg = 3 //任务类型外卖推广
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -39,6 +44,11 @@ var (
|
|||||||
OrderStatusFinished: "已妥投",
|
OrderStatusFinished: "已妥投",
|
||||||
OrderStatusCanceled: "已取消",
|
OrderStatusCanceled: "已取消",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CashbackName = map[int]string{
|
||||||
|
JobCashbackPrice: "固定返现",
|
||||||
|
JobCashbackPercentage: "比例返现",
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
type Job struct {
|
type Job struct {
|
||||||
@@ -51,7 +61,9 @@ type Job struct {
|
|||||||
Content string `orm:"size(500)" json:"content"` //任务内容
|
Content string `orm:"size(500)" json:"content"` //任务内容
|
||||||
Count int `json:"count"` //任务数量
|
Count int `json:"count"` //任务数量
|
||||||
SurplusCount int `json:"surplusCount"` //剩余数量
|
SurplusCount int `json:"surplusCount"` //剩余数量
|
||||||
AvgPrice int `json:"avgPrice"` //单个任务金额
|
AvgPrice int `json:"avgPrice"` //单个任务金额或预估金额
|
||||||
|
Percentage int `json:"percentage"` //如果是比例返现,返现比例
|
||||||
|
CashbackType int `json:"cashbackType"` //返现方式,1为固定返现,2为比例返现
|
||||||
TotalPrice int `json:"totalPrice"` //任务总金额
|
TotalPrice int `json:"totalPrice"` //任务总金额
|
||||||
Status int `json:"status"` //任务状态
|
Status int `json:"status"` //任务状态
|
||||||
Address string `orm:"size(500)" json:"address"` //任务地址
|
Address string `orm:"size(500)" json:"address"` //任务地址
|
||||||
|
|||||||
Reference in New Issue
Block a user