fix data -1
This commit is contained in:
@ -129,7 +129,7 @@ var (
|
||||
{Name: "ten_post", Type: field.TypeString, Nullable: true},
|
||||
{Name: "ten_get", Type: field.TypeString, Nullable: true},
|
||||
{Name: "ten_at", Type: field.TypeTime, Nullable: true},
|
||||
{Name: "next", Type: field.TypeString, Nullable: true, Default: "20240203"},
|
||||
{Name: "next", Type: field.TypeString, Nullable: true, Default: "20240213"},
|
||||
{Name: "room", Type: field.TypeInt, Nullable: true},
|
||||
{Name: "model", Type: field.TypeBool, Nullable: true},
|
||||
{Name: "model_at", Type: field.TypeTime, Nullable: true},
|
||||
|
@ -198,8 +198,8 @@ func (h *OgentHandler) UpdateCard(ctx context.Context, req *UpdateCardReq, param
|
||||
|
||||
// DeleteCard handles DELETE /cards/{id} requests.
|
||||
func (h *OgentHandler) DeleteCard(ctx context.Context, params DeleteCardParams) (DeleteCardRes, error) {
|
||||
//err := h.client.Card.DeleteOneID(params.ID).Exec(ctx)
|
||||
err := h.client.Card.DeleteOneID(0).Exec(ctx)
|
||||
err := h.client.Card.DeleteOneID(params.ID).Exec(ctx)
|
||||
//err := h.client.Card.DeleteOneID(0).Exec(ctx)
|
||||
if err != nil {
|
||||
switch {
|
||||
case ent.IsNotFound(err):
|
||||
|
@ -19,8 +19,9 @@ type User struct {
|
||||
}
|
||||
|
||||
func Nextime() (tt string){
|
||||
t := time.Now().In(jst)
|
||||
//t := time.Now().Add(time.Hour * 24 * 1).In(jst)
|
||||
//t := time.Now().In(jst)
|
||||
//t := time.Now().Add(time.Hour * 24 * 1).In(jst)
|
||||
t := time.Now().AddDate(0, 0, -1).In(jst)
|
||||
tt = t.Format("20060102")
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user