|
@@ -1,8 +1,12 @@
|
|
package com.caimei.modules.hehe.web;
|
|
package com.caimei.modules.hehe.web;
|
|
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
+import com.caimei.modules.hehe.entity.CmHeheCollageMember;
|
|
|
|
+import com.caimei.modules.hehe.entity.CmHeheReductionUser;
|
|
|
|
+import com.caimei.modules.info.entity.Info;
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -10,6 +14,7 @@ import org.springframework.ui.Model;
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|
|
|
|
|
import com.thinkgem.jeesite.common.config.Global;
|
|
import com.thinkgem.jeesite.common.config.Global;
|
|
@@ -19,6 +24,9 @@ import com.thinkgem.jeesite.common.utils.StringUtils;
|
|
import com.caimei.modules.hehe.entity.CmHeheReduction;
|
|
import com.caimei.modules.hehe.entity.CmHeheReduction;
|
|
import com.caimei.modules.hehe.service.CmHeheReductionService;
|
|
import com.caimei.modules.hehe.service.CmHeheReductionService;
|
|
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.Map;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 呵呵商城分享减免Controller
|
|
* 呵呵商城分享减免Controller
|
|
* @author Aslee
|
|
* @author Aslee
|
|
@@ -43,7 +51,6 @@ public class CmHeheReductionController extends BaseController {
|
|
return entity;
|
|
return entity;
|
|
}
|
|
}
|
|
|
|
|
|
- @RequiresPermissions("hehe:cmHeheReduction:view")
|
|
|
|
@RequestMapping(value = {"list", ""})
|
|
@RequestMapping(value = {"list", ""})
|
|
public String list(CmHeheReduction cmHeheReduction, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
public String list(CmHeheReduction cmHeheReduction, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
Page<CmHeheReduction> page = cmHeheReductionService.findPage(new Page<CmHeheReduction>(request, response), cmHeheReduction);
|
|
Page<CmHeheReduction> page = cmHeheReductionService.findPage(new Page<CmHeheReduction>(request, response), cmHeheReduction);
|
|
@@ -51,14 +58,12 @@ public class CmHeheReductionController extends BaseController {
|
|
return "modules/hehe/cmHeheReductionList";
|
|
return "modules/hehe/cmHeheReductionList";
|
|
}
|
|
}
|
|
|
|
|
|
- @RequiresPermissions("hehe:cmHeheReduction:view")
|
|
|
|
@RequestMapping(value = "form")
|
|
@RequestMapping(value = "form")
|
|
public String form(CmHeheReduction cmHeheReduction, Model model) {
|
|
public String form(CmHeheReduction cmHeheReduction, Model model) {
|
|
model.addAttribute("cmHeheReduction", cmHeheReduction);
|
|
model.addAttribute("cmHeheReduction", cmHeheReduction);
|
|
return "modules/hehe/cmHeheReductionForm";
|
|
return "modules/hehe/cmHeheReductionForm";
|
|
}
|
|
}
|
|
|
|
|
|
- @RequiresPermissions("hehe:cmHeheReduction:edit")
|
|
|
|
@RequestMapping(value = "save")
|
|
@RequestMapping(value = "save")
|
|
public String save(CmHeheReduction cmHeheReduction, Model model, RedirectAttributes redirectAttributes) {
|
|
public String save(CmHeheReduction cmHeheReduction, Model model, RedirectAttributes redirectAttributes) {
|
|
if (!beanValidator(model, cmHeheReduction)){
|
|
if (!beanValidator(model, cmHeheReduction)){
|
|
@@ -69,7 +74,6 @@ public class CmHeheReductionController extends BaseController {
|
|
return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheReduction/?repage";
|
|
return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheReduction/?repage";
|
|
}
|
|
}
|
|
|
|
|
|
- @RequiresPermissions("hehe:cmHeheReduction:delete")
|
|
|
|
@RequestMapping(value = "delete")
|
|
@RequestMapping(value = "delete")
|
|
public String delete(CmHeheReduction cmHeheReduction, RedirectAttributes redirectAttributes) {
|
|
public String delete(CmHeheReduction cmHeheReduction, RedirectAttributes redirectAttributes) {
|
|
cmHeheReductionService.delete(cmHeheReduction);
|
|
cmHeheReductionService.delete(cmHeheReduction);
|
|
@@ -77,4 +81,31 @@ public class CmHeheReductionController extends BaseController {
|
|
return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheReduction/?repage";
|
|
return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheReduction/?repage";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @RequestMapping(value = "updateStatus")
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public String updateStatus(CmHeheReduction cmHeheReduction) {
|
|
|
|
+ cmHeheReductionService.updateStatus(cmHeheReduction);
|
|
|
|
+ return "修改成功";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @RequestMapping(value = "resetTimePage")
|
|
|
|
+ public String toAuditPage() {
|
|
|
|
+ return "modules/hehe/resetTime";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @RequestMapping(value = "updateTime")
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public String updateTime(CmHeheReduction cmHeheReduction) {
|
|
|
|
+ cmHeheReductionService.updateTime(cmHeheReduction);
|
|
|
|
+ return "修改成功";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @RequestMapping(value = "userList")
|
|
|
|
+ public String userList(CmHeheReductionUser cmHeheReductionUser, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
|
|
+ Page<CmHeheReductionUser> page = cmHeheReductionService.getUserPage(new Page<CmHeheReductionUser>(request, response), cmHeheReductionUser);
|
|
|
|
+ model.addAttribute("page", page);
|
|
|
|
+ model.addAttribute("cmHeheReductionUser", cmHeheReductionUser);
|
|
|
|
+ return "modules/hehe/cmHeheReductionUserList";
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|