package com.hzya.frame.sys.dictionaryshopNew.controller;

import com.hzya.frame.web.entity.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.hzya.frame.web.entity.JsonResultEntity;
import com.hzya.frame.sys.dictionaryshopNew.entity.SysDictionaryshopNew;
import com.hzya.frame.sys.dictionaryshopNew.service.ISysDictionaryshopNewService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
 * @description: 数据字典表  controller
 * @tableName: sys_dictionaryshop_new 
 * @entityName: SysDictionaryshopNew
 * 包含：
 * 1、分页查询(queryPaged)
 * 2、index页面(goIndexPage)
 * 3、新增页面(goAddPage)
 * 4、新增信息保存(save)
 * 5、修改页面(goEditPage)
 * 6、修改信息保存(update)
 * 7、信息查看(goShowPage)
 * 8、删除信息(delete)
 * @author: gjh
 * @history: 1.0
 */

@Controller("sys_dictionaryshop_new")
@RequestMapping("/sys/dictionaryshop/new/SysDictionaryshopNewController")
public class SysDictionaryshopNewController {
	private final Logger logger = LoggerFactory.getLogger(this.getClass());

	@Autowired
    protected ISysDictionaryshopNewService  sysdictionaryshopnewService;


    /** test **/
    @RequestMapping(value = "test", method = RequestMethod.POST)
    @ResponseBody
    public JsonResultEntity test( SysDictionaryshopNew entity) {
		try {
		    sysdictionaryshopnewService.test(entity);
		    return BaseResult.getSuccessMessageEntity("成功", "test");
		} catch (Exception e) {
		    logger.error("SysDictionaryshopNewController-test", e.getMessage());
		    return BaseResult.getFailureMessageEntity("失败！", "save");
		}
    }

}

