| package com.stylefeng.guns.modular.system.controller; | 
|   | 
| import com.stylefeng.guns.core.base.controller.BaseController; | 
| import org.springframework.stereotype.Controller; | 
| import org.springframework.web.bind.annotation.RequestMapping; | 
| import org.springframework.web.bind.annotation.ResponseBody; | 
| import org.springframework.ui.Model; | 
| import org.springframework.web.bind.annotation.PathVariable; | 
| import org.springframework.beans.factory.annotation.Autowired; | 
| import com.stylefeng.guns.core.log.LogObjectHolder; | 
| import org.springframework.web.bind.annotation.RequestParam; | 
| import com.stylefeng.guns.modular.system.model.TAdvertisementUser; | 
| import com.stylefeng.guns.modular.system.service.ITAdvertisementUserService; | 
|   | 
| /** | 
|  * 控制器 | 
|  * | 
|  * @author fengshuonan | 
|  * @Date 2022-09-30 14:43:23 | 
|  */ | 
| @Controller | 
| @RequestMapping("/tAdvertisementUser") | 
| public class TAdvertisementUserController extends BaseController { | 
|   | 
|     private String PREFIX = "/system/tAdvertisementUser/"; | 
|   | 
|     @Autowired | 
|     private ITAdvertisementUserService tAdvertisementUserService; | 
|   | 
|     /** | 
|      * 跳转到首页 | 
|      */ | 
|     @RequestMapping("") | 
|     public String index() { | 
|         return PREFIX + "tAdvertisementUser.html"; | 
|     } | 
|   | 
|     /** | 
|      * 跳转到添加 | 
|      */ | 
|     @RequestMapping("/tAdvertisementUser_add") | 
|     public String tAdvertisementUserAdd() { | 
|         return PREFIX + "tAdvertisementUser_add.html"; | 
|     } | 
|   | 
|     /** | 
|      * 跳转到修改 | 
|      */ | 
|     @RequestMapping("/tAdvertisementUser_update/{tAdvertisementUserId}") | 
|     public String tAdvertisementUserUpdate(@PathVariable Integer tAdvertisementUserId, Model model) { | 
|         TAdvertisementUser tAdvertisementUser = tAdvertisementUserService.selectById(tAdvertisementUserId); | 
|         model.addAttribute("item",tAdvertisementUser); | 
|         LogObjectHolder.me().set(tAdvertisementUser); | 
|         return PREFIX + "tAdvertisementUser_edit.html"; | 
|     } | 
|   | 
|     /** | 
|      * 获取列表 | 
|      */ | 
|     @RequestMapping(value = "/list") | 
|     @ResponseBody | 
|     public Object list(String condition) { | 
|         return tAdvertisementUserService.selectList(null); | 
|     } | 
|   | 
|     /** | 
|      * 新增 | 
|      */ | 
|     @RequestMapping(value = "/add") | 
|     @ResponseBody | 
|     public Object add(TAdvertisementUser tAdvertisementUser) { | 
|         tAdvertisementUserService.insert(tAdvertisementUser); | 
|         return SUCCESS_TIP; | 
|     } | 
|   | 
|     /** | 
|      * 删除 | 
|      */ | 
|     @RequestMapping(value = "/delete") | 
|     @ResponseBody | 
|     public Object delete(@RequestParam Integer tAdvertisementUserId) { | 
|         tAdvertisementUserService.deleteById(tAdvertisementUserId); | 
|         return SUCCESS_TIP; | 
|     } | 
|   | 
|     /** | 
|      * 修改 | 
|      */ | 
|     @RequestMapping(value = "/update") | 
|     @ResponseBody | 
|     public Object update(TAdvertisementUser tAdvertisementUser) { | 
|         tAdvertisementUserService.updateById(tAdvertisementUser); | 
|         return SUCCESS_TIP; | 
|     } | 
|   | 
|     /** | 
|      * 详情 | 
|      */ | 
|     @RequestMapping(value = "/detail/{tAdvertisementUserId}") | 
|     @ResponseBody | 
|     public Object detail(@PathVariable("tAdvertisementUserId") Integer tAdvertisementUserId) { | 
|         return tAdvertisementUserService.selectById(tAdvertisementUserId); | 
|     } | 
| } |