File tree Expand file tree Collapse file tree
main/java/com/tinyengine/it/mapper
test/java/com/tinyengine/it/service/app/impl/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ public interface BlockMapper extends BaseMapper<Block> {
137137 @ Result (column = "occupier_by" , property = "occupier" ,
138138 one = @ One (select = "com.tinyengine.it.mapper.UserMapper.queryUserById" ))
139139 })
140- @ Select ("select b.*,bcbcb.block_id as block_categories_blocks_id,bsh. block_id as block_histories_block_id "
140+ @ Select ("select b.*,bh.ref_id as block_id "
141141 + "from t_block b "
142142 + "left join t_block_history bh on b.latest_history_id = bh.id "
143143 + "where b.id = #{blockId} "
Original file line number Diff line number Diff line change 1717import static org .mockito .Mockito .anyString ;
1818import static org .mockito .Mockito .when ;
1919
20+ import com .fasterxml .jackson .core .JsonProcessingException ;
21+ import com .fasterxml .jackson .databind .ObjectMapper ;
2022import com .tinyengine .it .mapper .AppExtensionMapper ;
2123import com .tinyengine .it .mapper .AppMapper ;
2224import com .tinyengine .it .mapper .BlockGroupMapper ;
@@ -102,12 +104,18 @@ void setUp() {
102104 }
103105
104106 @ Test
105- void testAppSchema () {
107+ void testAppSchema () throws JsonProcessingException {
106108 App app = new App ();
107109 int appId = 2 ;
108110 app .setId (appId );
109111 app .setHomePage (1 );
110112 app .setPlatformId (1 );
113+
114+ String json = "{\" dataHandler\" :{\" type\" :\" JSFunction\" ,\" value\" :\" function dataHanlder(res){\\ n return res;\\ n}\" }}" ;
115+ ObjectMapper objectMapper = new ObjectMapper ();
116+ Map <String , Object > dataSourceGlobal = objectMapper .readValue (json , Map .class );
117+ app .setDataSourceGlobal (dataSourceGlobal );
118+
111119 when (appMapper .queryAppById (anyInt ())).thenReturn (app );
112120 Page page = new Page ();
113121 page .setIsPage (true );
You can’t perform that action at this time.
0 commit comments