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