订单分佣规则
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
585 B

  1. package db
  2. import "xorm.io/xorm"
  3. func QueryNativeString(Db *xorm.Engine, sql string, args ...interface{}) ([]map[string]string, error) {
  4. results, err := Db.SQL(sql, args...).QueryString()
  5. return results, err
  6. }
  7. func QueryNativeStringSess(sess *xorm.Session, sql string, args ...interface{}) ([]map[string]string, error) {
  8. results, err := sess.SQL(sql, args...).QueryString()
  9. return results, err
  10. }
  11. // InsertCommWithSession common insert
  12. func InsertCommWithSession(session *xorm.Session, model interface{}) (int64, error) {
  13. row, err := session.InsertOne(model)
  14. return row, err
  15. }