fix
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/snow_id_generator"
|
||||
"github.com/bwmarrin/snowflake"
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
|
||||
@@ -88,7 +87,7 @@ func (l *TakeLogic) Take(req *types.TakeReq, userinfo *auth.UserInfo) (resp *bas
|
||||
return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, fmt.Sprintf("row %d inventory data`s take num can`be less than 0", k+1))
|
||||
}
|
||||
//获取库存信息(枷锁)
|
||||
stockInfo, err := l.svcCtx.AllModels.FsUserStock.FindOne(l.ctx, v.Id, userinfo.UserId, true)
|
||||
stockInfo, err := l.svcCtx.AllModels.FsUserStock.FindOne(l.ctx, formItem.Id, userinfo.UserId, true)
|
||||
if err != nil {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, fmt.Sprintf("row %d inventory data is not availabled for you", k+1))
|
||||
|
||||
Reference in New Issue
Block a user