1.等价的sql
Sql代码 :
SELECT DISTINCT field1,field2 FROM test_index.test_type
等价于
Sql代码:
SELECT field1,field2 FROM test_index.test_type GROUP BY field1,field2
Controller:
这是根据类型和传过来的可变字段key来查询
/**
* 布局管理-聚合查询
* @param logType
* @return
*/
@Override
@GetMapping("/logs/layout/manager")
public Map queryLayout(@RequestParam(required = false) String logType, @RequestParam(required = false) String modifiableKey){
Map<String, Object> map = new HashMap<>();
if (modifiableKey != null) {
// List<String> modifiableKeyList = Arrays.asList(modifiableKeys.split(","));//用逗号隔开
// for (String modifiableKey : modifiableKeyList) {
// }
List operationRecords = appleAppOperationLogService.queryLayout(logT