mybatis two ways

// 1, the traditional way using statementId

            //获取详情
            sysApiDocumentMode = template.selectOne("oaApiDocument.getProjectInfo", sysApiDocumentMode);
            //获取图片
            List<Map<String, String>> list = template.selectList("oaApiDocument.getApiDocument", sysApiDocumentMode);

2. Based on the Mapper interface mode call

        Map<String,Object> paramsMap = JSONObject.parseObject(params);
        return serviceDao.getServiceTree(paramsMap);

Guess you like

Origin www.cnblogs.com/singworld/p/11713246.html