12345678910111213141516171819202122232425262728293031323334 |
- package api
- import (
- "box-cost/db/model"
- "box-cost/db/repo"
- "box-cost/log"
- "errors"
- "fmt"
- "time"
- "github.com/gin-gonic/gin"
- )
- func DiffUpdatePlanTest(c *gin.Context, apictx *ApiSession) (interface{}, error) {
- var plan model.ProductPlan
- err := c.ShouldBindJSON(&plan)
- if err != nil {
- fmt.Println(err)
- log.Error(err)
- return nil, errors.New("参数错误")
- }
- if plan.Id.Hex() == "" {
- return nil, errors.New("id的为空")
- }
- plan.UpdateTime = time.Now()
-
-
-
- return repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), "product-plan_copy1", plan.Id.Hex(), &plan)
-
-
-
- }
|