zhangqian
2024-04-26 cd057a6eb60902fc380e4de16ece38a2ae83d5a0
controllers/yield_register_controller.go
@@ -70,6 +70,11 @@
      }
   } else {
      //保存
      count, _ := models.NewYieldRegisterSearch().SetNumber(yield.Number).Count()
      if count > 0 {
         util.ResponseFormat(c, code.RequestParamError, "编码已存在")
         return
      }
      err = models.NewYieldRegisterSearch().Create(&yield)
      if err != nil {
         util.ResponseFormat(c, code.RequestParamError, "保存失败")