Browse Source

操作日志参数获取

master
xyiege 4 years ago
parent
commit
70a4d56ffd
  1. 8
      src/main/java/cn/chjyj/szwh/controller/admin/AdminLogController.java

8
src/main/java/cn/chjyj/szwh/controller/admin/AdminLogController.java

@ -6,6 +6,7 @@ import cn.chjyj.szwh.service.OperationLogService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -22,9 +23,10 @@ public class AdminLogController extends BaseController {
private OperationLogService operationLogService;
@PostMapping("/getLog")
public JSONObject getLog(HttpServletRequest request){
String logid=request.getParameter("log_id");
String type=request.getParameter("type");
public JSONObject getLog(@RequestBody String rejson){
JSONObject json = JSONObject.parseObject(rejson);
String logid=json.getString("log_id");
String type=json.getString("type");
List<OperationLog> oplist = operationLogService.getLog(type,logid);
jsonObject.put("code",200);
jsonObject.put("msg","成功");

Loading…
Cancel
Save