111
This commit is contained in:
1 parent
81eca8933a
commit
345f906c35
540 files changed
+494222
-90
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package com.luqj.common.controller;
|
||||
|
||||
import com.luqj.common.domain.SelectItem;
|
||||
import com.luqj.common.service.ICommonService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/common")
|
||||
public class SelectCommonController extends BaseController {
|
||||
@Autowired
|
||||
private ICommonService comCategory;
|
||||
|
||||
@GetMapping("/select/search")
|
||||
public AjaxResult selectSearch(String tableName, String keyword, String fieldId, String fieldName) {
|
||||
if(tableName.contains(" ") || fieldId.contains(" ") || fieldName.contains(" ")){
|
||||
return AjaxResult.error("注入嫌疑");
|
||||
}
|
||||
List<SelectItem> searchs = comCategory.search(tableName, fieldId, fieldName, keyword);
|
||||
return AjaxResult.success(searchs);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user