package com.dsh.guns.modular.system.controller.general;
|
|
import com.dsh.guns.core.base.controller.BaseController;
|
import com.dsh.guns.core.log.LogObjectHolder;
|
import com.dsh.guns.modular.system.model.TEnsureIncomeSpecial;
|
import com.dsh.guns.modular.system.service.ITEnsureIncomeSpecialService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.ui.Model;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
/**
|
* 控制器
|
*
|
* @author fengshuonan
|
* @Date 2023-04-20 11:04:29
|
*/
|
@Controller
|
@RequestMapping("/tEnsureIncomeSpecial")
|
public class TEnsureIncomeSpecialController extends BaseController {
|
|
private String PREFIX = "/system/tEnsureIncomeSpecial/";
|
|
@Autowired
|
private ITEnsureIncomeSpecialService tEnsureIncomeSpecialService;
|
|
/**
|
* 跳转到首页
|
*/
|
@RequestMapping("")
|
public String index() {
|
return PREFIX + "tEnsureIncomeSpecial.html";
|
}
|
|
/**
|
* 跳转到添加
|
*/
|
@RequestMapping("/tEnsureIncomeSpecial_add")
|
public String tEnsureIncomeSpecialAdd() {
|
return PREFIX + "tEnsureIncomeSpecial_add.html";
|
}
|
|
/**
|
* 跳转到修改
|
*/
|
@RequestMapping("/tEnsureIncomeSpecial_update/{tEnsureIncomeSpecialId}")
|
public String tEnsureIncomeSpecialUpdate(@PathVariable Integer tEnsureIncomeSpecialId, Model model) {
|
TEnsureIncomeSpecial tEnsureIncomeSpecial = tEnsureIncomeSpecialService.getById(tEnsureIncomeSpecialId);
|
model.addAttribute("item",tEnsureIncomeSpecial);
|
LogObjectHolder.me().set(tEnsureIncomeSpecial);
|
return PREFIX + "tEnsureIncomeSpecial_edit.html";
|
}
|
|
/**
|
* 获取列表
|
*/
|
@RequestMapping(value = "/list")
|
@ResponseBody
|
public Object list(String condition) {
|
return tEnsureIncomeSpecialService.list(null);
|
}
|
|
/**
|
* 新增
|
*/
|
@RequestMapping(value = "/add")
|
@ResponseBody
|
public Object add(TEnsureIncomeSpecial tEnsureIncomeSpecial) {
|
tEnsureIncomeSpecialService.save(tEnsureIncomeSpecial);
|
return SUCCESS_TIP;
|
}
|
|
/**
|
* 删除
|
*/
|
@RequestMapping(value = "/delete")
|
@ResponseBody
|
public Object delete(@RequestParam Integer tEnsureIncomeSpecialId) {
|
tEnsureIncomeSpecialService.removeById(tEnsureIncomeSpecialId);
|
return SUCCESS_TIP;
|
}
|
|
/**
|
* 修改
|
*/
|
@RequestMapping(value = "/update")
|
@ResponseBody
|
public Object update(TEnsureIncomeSpecial tEnsureIncomeSpecial) {
|
tEnsureIncomeSpecialService.updateById(tEnsureIncomeSpecial);
|
return SUCCESS_TIP;
|
}
|
|
/**
|
* 详情
|
*/
|
@RequestMapping(value = "/detail/{tEnsureIncomeSpecialId}")
|
@ResponseBody
|
public Object detail(@PathVariable("tEnsureIncomeSpecialId") Integer tEnsureIncomeSpecialId) {
|
return tEnsureIncomeSpecialService.getById(tEnsureIncomeSpecialId);
|
}
|
}
|