This commit is contained in:
苏尹岚
2020-10-20 16:22:23 +08:00
parent 871e88d1e5
commit a6034b3535
3 changed files with 25 additions and 2 deletions

View File

@@ -244,6 +244,9 @@ func AcceptJob(ctx *jxcontext.Context, jobID int) (err error) {
dao.Commit(db)
//任务限时完成
checkLimitJobOrders(db, job, jobOrder)
if jobID == model.JobIDMtMembers {
}
return err
}
@@ -466,3 +469,20 @@ func ImprotMtMembers(ctx *jxcontext.Context, mtMembers []*model.MtMember) (err e
}
return err
}
func BuySpecialJob(ctx *jxcontext.Context, jobID int) (errCode string, err error) {
var (
db = dao.GetDB()
job = &model.Job{}
)
job.ID = jobID
dao.GetEntity(db, job)
if job == nil {
return errCode, fmt.Errorf("未查询到该任务!")
}
userBill, err := dao.GetUserBill(db, ctx.GetUserID(), "")
if userBill.AccountBalance < job.AvgPrice {
}
return errCode, err
}

View File

@@ -208,7 +208,7 @@ yinbaoAppID = "18C0E0867E467DBC26EFF5E957B02EC4"
aliUpcAppCode = "00a6eefba0204d3fa310ac0ee7a6fc54"
[rsm]
EnableDocs = false
EnableDocs = true
jdOrgCode = "320406"
jdLoginName = "jd_jxcs1223"

View File

@@ -212,5 +212,8 @@ func (c *JobController) ImprotMtMembers() {
// @Failure 200 {object} controllers.CallResult
// @router /BuySpecialJob [post]
func (c *JobController) BuySpecialJob() {
c.callBuySpecialJob(func(params *tJobBuySpecialJobParams) (retVal interface{}, errCode string, err error) {
errCode, err = cms.BuySpecialJob(params.Ctx, params.JobID)
return retVal, "", err
})
}