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

Loading…
Cancel
Save