raise.go 376 B

123456789101112131415
  1. package service
  2. import (
  3. "fmt"
  4. "github.com/astaxie/beego/logs"
  5. )
  6. func syncRaise() {
  7. err := s.d.DB.Exec("INSERT INTO feed_sum(\n\tpastureId,\n\tfeedDay,\n\tcowNum,\n\tsaleNum,\n cowNumM\n)VALUES(\n?,?,?,?,?\n) " +
  8. "ON DUPLICATE KEY UPDATE cowNum = ? ,saleNum = ?,cowNumM = ?").Error
  9. if err != nil {
  10. logs.Error(fmt.Sprintf("syncRaise-error: %s", err.Error()))
  11. }
  12. }