jyy
2022-04-15 f57554f7da5e4d05b4b4bab99bf49ac9ca8c2038
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package com.matrix.system.common.actions;
 
import com.matrix.core.pojo.AjaxResult;
import com.matrix.system.common.bean.ProjException;
import com.matrix.system.common.dao.ProjExceptionDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
 
import java.util.Arrays;
 
/**
 * @author 姜友瑶
 * @description 首页配置
 * @email 935090232@qq.com
 * @date 2019-06-16
 */
@Controller
public class ProjExceptionAction {
 
    @Autowired
    ProjExceptionDao projExceptionDao;
 
    @RequestMapping(value = "/showException")
    public
    ModelAndView showException(Long id) {
        ProjException projException = projExceptionDao.selectById(id);
        ModelAndView mv = new ModelAndView("common/showprojException");
        mv.addObject("obj", projException);
        return mv;
 
    }
 
 
 
 
 
    @RequestMapping(value = "/projException/del")
    public @ResponseBody
    AjaxResult del(@RequestBody ProjException projException) {
        projExceptionDao.deleteById(projException.getId());
        return AjaxResult.buildSuccessInstance("删除成功");
    }
 
 
    @RequestMapping(value = "/createEx")
    public @ResponseBody
    AjaxResult showException2() {
        Integer s = 1 / 0;
        return AjaxResult.buildSuccessInstance(Arrays.asList(""));
    }
 
 
    /**
     * 列表显示
     */
    @RequestMapping(value = "/projException/showList")
    public @ResponseBody
    AjaxResult showList(@RequestBody ProjException projException) {
        // 默认按创建时间排序
        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, projExceptionDao.selectInPage(projException), projExceptionDao.selectTotalRecord(projException));
        return result;
    }
 
 
 
 
}