修改查询-1
This commit is contained in:
parent
3cce79adab
commit
90928cf5c8
@ -224,7 +224,7 @@ func BundleListV2(req *bundle.BundleListRequest) (res *bundle.BundleListResponse
|
||||
|
||||
func BundleDetailV2(req *bundle.BundleDetailRequest) (res *model.BundleProfile, err error) {
|
||||
var data model.BundleProfile
|
||||
err = app.ModuleClients.BundleDB.Model(&model.BundleProfile{}).Where("uuid = ? AND deleted_at = 0", req.Uuid).
|
||||
err = app.ModuleClients.BundleDB.Model(&model.BundleProfile{}).Where("uuid = ? ", req.Uuid).
|
||||
Preload("BundleProfileLang").
|
||||
Preload("BundleToValueAddService").
|
||||
First(&data).Error
|
||||
@ -237,7 +237,7 @@ func BundleDetailV2(req *bundle.BundleDetailRequest) (res *model.BundleProfile,
|
||||
// 套餐上下架
|
||||
func HandShelf(uuid string, shelfStatus int64) (res *bundle.CommonResponse, err error) {
|
||||
res = new(bundle.CommonResponse)
|
||||
err = app.ModuleClients.BundleDB.Model(&model.BundleProfile{}).Where("uuid = ? AND deleted_at = 0", uuid).Update("shelf_status", shelfStatus).Error
|
||||
err = app.ModuleClients.BundleDB.Model(&model.BundleProfile{}).Where("uuid = ?", uuid).Update("shelf_status", shelfStatus).Error
|
||||
|
||||
if err != nil {
|
||||
res.Msg = "套餐上下架操作失败"
|
||||
@ -275,7 +275,7 @@ func TxCreateBundleLang(tx *gorm.DB, req *model.BundleProfileLang) (err error) {
|
||||
return
|
||||
}
|
||||
func TxUpdateBundle(tx *gorm.DB, uuid string, columns map[string]interface{}) (err error) {
|
||||
err = tx.Model(&model.BundleProfile{}).Where("uuid =? and deleted_at = 0", uuid).Updates(columns).Error
|
||||
err = tx.Model(&model.BundleProfile{}).Where("uuid =?", uuid).Updates(columns).Error
|
||||
if err != nil {
|
||||
return commonErr.ReturnError(err, msg.ErrorUpdateBundleInfo, "更新套餐信息失败: ")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user