| package com.matrix.system.hive.action; | 
|   | 
| import javax.annotation.Resource; | 
|   | 
| import com.matrix.system.hive.bean.SysBeauticianState; | 
| import com.matrix.system.hive.service.SysBeauticianStateService; | 
| import com.matrix.system.hive.service.SysShopInfoService; | 
| import org.springframework.stereotype.Controller; | 
| import org.springframework.web.bind.annotation.RequestMapping; | 
| import org.springframework.web.bind.annotation.ResponseBody; | 
|   | 
|   | 
| import com.matrix.core.anotations.RemoveRequestToken; | 
| import com.matrix.core.anotations.SaveRequestToken; | 
| import com.matrix.core.pojo.PaginationVO; | 
| import com.matrix.core.tools.WebUtil; | 
| import com.matrix.core.pojo.AjaxResult; | 
|   | 
| /** | 
|  * | 
|  * @date 2017-02-17 09:55 | 
|  */ | 
| @Controller | 
| @RequestMapping(value = "admin/sysBeauticianState") | 
| public class SysBeauticianStateController extends BaseController{ | 
|   | 
|     @Resource | 
|     private SysBeauticianStateService currentService; | 
|     @Resource | 
|     private SysShopInfoService shopInfoService; | 
|     /** | 
|      * 列表显示 | 
|      */ | 
|     @RequestMapping(value = "/showList") | 
|     public @ResponseBody AjaxResult showList(SysBeauticianState sysBeauticianState, PaginationVO pageVo) { | 
|   | 
|         return showList(currentService, sysBeauticianState, pageVo); | 
|     } | 
|         | 
|     /** | 
|      * 新增或者修改页面 | 
|      */    | 
|     @RemoveRequestToken     | 
|        @RequestMapping(value = "/addOrModify") | 
|     public @ResponseBody AjaxResult addOrModify(SysBeauticianState sysBeauticianState) { | 
|         if (sysBeauticianState.getId() != null) { | 
|             return modify(currentService, sysBeauticianState, "sysBeauticianState"); | 
|         } else { | 
|             return add(currentService, sysBeauticianState, "sysBeauticianState"); | 
|         } | 
|     } | 
|      | 
|        /** | 
|      * 进入修改界面 | 
|      */    | 
|     @SaveRequestToken | 
|        @RequestMapping(value = "/editForm") | 
|     public String editForm(Long id) { | 
|         SysBeauticianState sysBeauticianState; | 
|         if (id != null) { | 
|             sysBeauticianState = currentService.findById(id); | 
|             WebUtil.getRequest().setAttribute("obj", sysBeauticianState); | 
|         } | 
|         return "admin/hive/sysBeauticianState-form"; | 
|     } | 
|         | 
|         | 
|        /** | 
|      * 删除 | 
|      */   | 
|      @RequestMapping(value = "/del") | 
|     public @ResponseBody AjaxResult del(String keys) { | 
|         return remove(currentService, keys); | 
|     } | 
|    | 
| } |