@@ -828,9 +828,9 @@ func (r *Thjpurchasetradedetail) buildSql2() string {
}
func (r *Thjpurchasetradedetail) GetDataByPage() (interface{}, error, int, int, int) {
- sql := r.buildSql()
+ sql := r.buildSql2()
if r.TYPE == 1 {
- sql = r.buildSql2()
+ sql = r.buildSql()
sData := make([]Thjpurchasetradedetail, 0)
err := db.GetEngine().SQL(sql).Find(&sData)