huangjiajun 4日前
コミット
0fdab009e4
2個のファイルの変更5行の追加2行の削除
  1. +1
    -1
      app/operator/svc/svc_task.go
  2. +4
    -1
      app/store/svc/svc_task.go

+ 1
- 1
app/operator/svc/svc_task.go ファイルの表示

@@ -47,7 +47,7 @@ func TaskDown(c *gin.Context) {
return
}
user := svc.GetUser(c)
update, _ := svc.MasterDb(c).Where("task_id=? and uid=?", args["id"], user.Info.Uid).Delete(&models.CampTaskOperatorTask{})
update, _ := svc.MasterDb(c).Where("id=? and uid=?", args["id"], user.Info.Uid).Delete(&models.CampTaskOperatorTask{})
if update == 0 {
e.OutErr(c, 400, e.NewErr(400, "下架失败"))
return


+ 4
- 1
app/store/svc/svc_task.go ファイルの表示

@@ -30,7 +30,10 @@ func TaskList(c *gin.Context) {
if store.Pid > 0 {
contact = append(contact, utils.IntToStr(store.Id))
}
sess := svc.MasterDb(c).Where("store_id=? and is_delete=0", storeId).In("contact", contact)
sess := svc.MasterDb(c).Where("store_id=? and is_delete=0", storeId)
if store.Pid > 0 {
sess.In("contact", contact)
}
if args.TaskType != "" {
sess.And("first_cid=?", args.TaskType)
}


読み込み中…
キャンセル
保存