feat: test ci cd
This commit is contained in:
@@ -68,13 +68,13 @@ func (l *CreateLogic) Create(in *product.CreateReq) (*product.Response, error) {
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
if check.Id > 0 {
|
||||
return failErr(utils.ErrorDataIsExist), nil
|
||||
return failResponse(utils.ErrorDataIsExist), nil
|
||||
}
|
||||
|
||||
// 管理员信息后续从 ctx / metadata 取
|
||||
adminId := 0
|
||||
adminName := ""
|
||||
|
||||
adminInfo := utils.GetUserFromCtx(l.ctx)
|
||||
if adminInfo.ID < utils.NumberOne {
|
||||
return failResponse(utils.ErrorNoLoginInfo), nil
|
||||
}
|
||||
data := dao.ProductCreate{
|
||||
Name: req.Name,
|
||||
Subhead: req.Subhead,
|
||||
@@ -103,8 +103,8 @@ func (l *CreateLogic) Create(in *product.CreateReq) (*product.Response, error) {
|
||||
IsBuy: uint8(req.IsBuy),
|
||||
PublishTime: publishTime,
|
||||
TryNumber: uint8(req.TryNumber),
|
||||
AdminName: adminName,
|
||||
AdminId: adminId,
|
||||
AdminName: adminInfo.Name,
|
||||
AdminId: int(adminInfo.ID),
|
||||
}
|
||||
if data.IsIndex == 0 {
|
||||
data.IsIndex = 2
|
||||
@@ -153,7 +153,7 @@ func (l *CreateLogic) Create(in *product.CreateReq) (*product.Response, error) {
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
|
||||
return okResponse(utils.StructToJson(data.Id)), nil
|
||||
return okResponse(utils.StringEmpty), nil
|
||||
}
|
||||
|
||||
func parsePublishTime(s string) (time.Time, error) {
|
||||
|
||||
Reference in New Issue
Block a user