main
黄海 12 months ago
parent c4cfc5cda5
commit 5af9a3c12e

@ -0,0 +1,5 @@
#namespace("Test")
#sql("selectAll")
select * from t_car
#end
#end

@ -2,12 +2,14 @@ import com.charge.UserApplication;
import com.charge.rpc.facade.UserFacade;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.plugin.activerecord.SqlPara;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
import java.util.List;
@RunWith(SpringRunner.class)
@ -31,4 +33,11 @@ public class UserTest {
System.out.println(record);
}
@Test
public void getAll() {
SqlPara sqlPara = Db.getSqlPara("Test.selectAll");
List<Record> list = Db.find(sqlPara);
System.out.println(list);
}
}

@ -0,0 +1,5 @@
#namespace("Test")
#sql("selectAll")
select * from t_car
#end
#end
Loading…
Cancel
Save