Search in sources :

Example 1 with AppxModel

use of demo4031.model.AppxModel in project solon-examples by noear.

the class PlusServiceTest method selectById.

@Test
public void selectById() {
    AppxModel app = appServicePlus.getById(2);
    System.out.println(app);
    assert app != null;
    assert app.getAppId() == 2;
}
Also used : AppxModel(demo4031.model.AppxModel) SolonTest(org.noear.solon.test.SolonTest) Test(org.junit.Test)

Example 2 with AppxModel

use of demo4031.model.AppxModel in project solon-examples by noear.

the class PlusServiceTest method selectOne.

@Test
public void selectOne() {
    AppxModel app = appServicePlus.getOne(new QueryWrapper<AppxModel>().eq("app_id", 2));
    System.out.println(app);
    assert app != null;
    assert app.getAppId() == 2;
}
Also used : QueryWrapper(com.baomidou.mybatisplus.core.conditions.query.QueryWrapper) AppxModel(demo4031.model.AppxModel) SolonTest(org.noear.solon.test.SolonTest) Test(org.junit.Test)

Example 3 with AppxModel

use of demo4031.model.AppxModel in project solon-examples by noear.

the class PlusTest method selectById.

@Test
public void selectById() {
    AppxModel app = appxMapper2.selectById(2);
    System.out.println(app);
    assert app != null;
    assert app.getAppId() == 2;
}
Also used : AppxModel(demo4031.model.AppxModel) SolonTest(org.noear.solon.test.SolonTest) Test(org.junit.Test)

Example 4 with AppxModel

use of demo4031.model.AppxModel in project solon-examples by noear.

the class API_cache method exec.

@Cache(seconds = 12)
@Mapping("cache")
public List exec() {
    List<AppxModel> list = new ArrayList<>();
    AppxModel app = new AppxModel();
    app.setApp_id(1001);
    list.add(app);
    return list;
}
Also used : AppxModel(demo6013.model.AppxModel) ArrayList(java.util.ArrayList) Mapping(org.noear.solon.annotation.Mapping) Cache(org.noear.solon.data.annotation.Cache)

Example 5 with AppxModel

use of demo4031.model.AppxModel in project solon-examples by noear.

the class PlusTest method selectOne.

@Test
public void selectOne() {
    AppxModel app = appxMapper2.selectOne(new QueryWrapper<AppxModel>().eq("app_id", 2));
    System.out.println(app);
    assert app != null;
    assert app.getAppId() == 2;
}
Also used : QueryWrapper(com.baomidou.mybatisplus.core.conditions.query.QueryWrapper) AppxModel(demo4031.model.AppxModel) SolonTest(org.noear.solon.test.SolonTest) Test(org.junit.Test)

Aggregations

AppxModel (demo4031.model.AppxModel)4 Test (org.junit.Test)4 SolonTest (org.noear.solon.test.SolonTest)4 QueryWrapper (com.baomidou.mybatisplus.core.conditions.query.QueryWrapper)2 ArrayList (java.util.ArrayList)2 Mapping (org.noear.solon.annotation.Mapping)2 Cache (org.noear.solon.data.annotation.Cache)2 AppxModel (demo6013.model.AppxModel)1 AppxModel (demo6014.model.AppxModel)1 Logined (org.noear.solon.validation.annotation.Logined)1