| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData;
|
| | | import org.springframework.dao.DuplicateKeyException;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | import com.yeshi.fanli.exception.redpack.RedPackForbidException;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackForbidRecordService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackForbidService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.common.entity.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "save")
|
| | | public void save(String callback, RedPackForbidRecord record, HttpServletRequest request, PrintWriter out) {
|
| | | public void save(AdminAcceptData acceptData, String callback, RedPackForbidRecord record, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | | /* 检验是否登陆 */
|
| | | AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "deduct")
|
| | | public void deduct(String callback, RedPackForbidRecord record, HttpServletRequest request, PrintWriter out) {
|
| | | public void deduct(AdminAcceptData acceptData,String callback, RedPackForbidRecord record, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | | redPackForbidService.deduct(record);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "delete")
|
| | | public void delete(String callback, String idArray, PrintWriter out) {
|
| | | public void delete(AdminAcceptData acceptData,String callback, String idArray, PrintWriter out) {
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer type, PrintWriter out) {
|
| | | public void query(AdminAcceptData acceptData,String callback, Integer pageIndex, Integer pageSize, String key, Integer type, PrintWriter out) {
|
| | | try {
|
| | | if (pageIndex == null || pageIndex < 1)
|
| | | pageIndex = 1;
|