zhangqian
2023-10-19 eba4eb850f0ecfb5839395aa125955ceaa2a454f
api/v1/plc_brand.go
@@ -7,7 +7,7 @@
   "apsClient/pkg/ecode"
   "apsClient/service"
   "github.com/gin-gonic/gin"
   "strconv"
   "github.com/spf13/cast"
)
type PlcBrandApi struct{}
@@ -48,7 +48,7 @@
      return
   }
   id, _ := strconv.Atoi(c.Param("id"))
   id := cast.ToUint(c.Param("id"))
   errCode := service.NewPlcBrandService().DeletePlcBrand(id)
   if errCode != ecode.OK {
      ctx.Fail(errCode)
@@ -71,10 +71,10 @@
   if !ok {
      return
   }
   if params.Id == 0 {
   if params.ID == 0 {
      ctx.Fail(ecode.ParamsErr)
   }
   params.PlcBrand.Id = params.Id
   params.PlcBrand.ID = params.ID
   errCode := service.NewPlcBrandService().UpdatePlcBrand(&params.PlcBrand)
   if errCode != ecode.OK {