fox
zhangqian
2024-05-07 7d06c6472f1acea6b2e49e7b8837bf555e94e219
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, "保存失败")