package com.flow.controller;
|
|
import com.flow.mapper.CompanyMapper;
|
import com.flow.pojo.Card;
|
import com.flow.pojo.Duanxinlog;
|
import com.flow.pojo.OperationLog;
|
import com.flow.pojo.TbFuwuqi;
|
import com.flow.service.OperationLogService;
|
import com.flow.util.result;
|
import com.flow.util.resultutil;
|
import com.github.pagehelper.PageInfo;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Component;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.servlet.ModelAndView;
|
|
import java.util.List;
|
@RestController
|
@RequestMapping({"/hxzk"})
|
@Component
|
public class OperationLogController {
|
|
@Autowired
|
OperationLogService operationLogService;
|
@GetMapping({"findOperationLog"})
|
result<List<OperationLog>> findOperationLog(Integer page, Integer limit) {
|
PageInfo<OperationLog> cz = this.operationLogService.FindOperationLog(page, limit);
|
return resultutil.returnSuccess(cz.getTotal(), cz.getList());
|
}
|
|
@PostMapping({"addcardopera"})
|
public ModelAndView addBang(Card card) throws Exception {
|
ModelAndView modelAndView = new ModelAndView();
|
OperationLog operationLog = new OperationLog();
|
operationLog.setCaozuotype("新增");
|
operationLog.setCaozuocontent("新增卡号:"+card.getCardnumber());
|
operationLog.setCaozuoname(card.getCaozuoname());
|
operationLogService.addOperationLog(operationLog);
|
modelAndView.setViewName("/page/index1.jsp");
|
return modelAndView;
|
}
|
|
|
|
}
|