Java Code Examples for org.apache.shiro.authz.annotation.RequiresPermissions

The following examples show how to use org.apache.shiro.authz.annotation.RequiresPermissions. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: DouBiNovel   Author: luckymorning   File: LoginLogController.java    License: Apache License 2.0 6 votes vote down vote up
@RequestMapping("/delete")
@ResponseBody
@RequiresPermissions(value = {"LOGIN_LOG_DELETE", Const.role.ROLE_SUPER}, logical = Logical.OR)
public MvcResult delete(Long id) {
    MvcResult result = MvcResult.create();
    try {
        boolean success = loginLogService.delete(id);
        if (!success) {
            result.setSuccess(false);
            result.setMessage("删除失败:未知原因");
        }
    } catch (Exception e) {
        result.setSuccess(false);
        result.setMessage("删除失败:" + e.getMessage());
    }
    return result;
}
 
Example #2
Source Project: ZTuoExchange_framework   Author: homeyanmi   File: ExchangeCoinController.java    License: MIT License 6 votes vote down vote up
@RequiresPermissions("exchange:exchange-coin:alter-rate")
@PostMapping("alter-rate")
@AccessLog(module = AdminModule.EXCHANGE, operation = "修改币币交易手续费exchangeCoin")
public MessageResult alterExchangeCoinRate(
        @RequestParam("symbol") String symbol,
        @RequestParam(value = "fee", required = false) BigDecimal fee,
        @RequestParam(value = "enable", required = false) Integer enable,
        @RequestParam(value = "sort", required = false) Integer sort,
        @RequestParam(value = "password") String password,
        @SessionAttribute(SysConstant.SESSION_ADMIN) Admin admin) {
    password = Encrypt.MD5(password + md5Key);
    Assert.isTrue(password.equals(admin.getPassword()), messageSource.getMessage("WRONG_PASSWORD"));
    ExchangeCoin exchangeCoin = exchangeCoinService.findOne(symbol);
    notNull(exchangeCoin, "validate symbol!");
    if (fee != null) {
        exchangeCoin.setFee(fee);//修改手续费
    }
    if (sort != null) {
        exchangeCoin.setSort(sort);//设置排序
    }
    if (enable != null && enable > 0 && enable < 3) {
        exchangeCoin.setEnable(enable);//设置启用 禁用
    }
    exchangeCoinService.save(exchangeCoin);
    return success(messageSource.getMessage("SUCCESS"));
}
 
Example #3
Source Project: ZTuoExchange_framework   Author: homeyanmi   File: RewardPromotionController.java    License: MIT License 6 votes vote down vote up
/**
 * 查询所有未被禁用的(判断type条件)
 * 默认按照updatetime降序
 *
 * @param enable
 * @param type
 * @return
 */
@RequiresPermissions("promotion:reward:page-query")
@GetMapping("page-query")
@AccessLog(module = AdminModule.SYSTEM, operation = "分页查询邀请奖励设置")
public MessageResult pageQuery(
        PageModel pageModel,
        @RequestParam(value = "status", defaultValue = "1") BooleanEnum enable,
        @RequestParam(value = "type", required = false) PromotionRewardType type) {
    BooleanExpression predicate = null;
    if (type != null) {
        predicate.andAnyOf(QRewardPromotionSetting.rewardPromotionSetting.type.eq(type));
    }
    Page<RewardPromotionSetting> all = rewardPromotionSettingService.findAll(predicate, pageModel);
    for(RewardPromotionSetting setting : all){
        if(StringUtils.isEmpty(setting.getInfo())) {
            continue ;
        }
        JSONObject jsonObject = JSONObject.parseObject(setting.getInfo());
        setting.setOne(jsonObject.getBigDecimal("one"));
        setting.setTwo(jsonObject.getBigDecimal("two"));
    }
    return success(all);
}
 
Example #4
Source Project: web-flash   Author: enilu   File: MenuController.java    License: MIT License 6 votes vote down vote up
@RequestMapping(method = RequestMethod.POST)
@BussinessLog(value = "编辑菜单", key = "name")
@RequiresPermissions(value = {Permission.MENU_EDIT})
public Object save(@ModelAttribute @Valid Menu menu) {
    //判断是否存在该编号
    if(menu.getId()==null) {
        String existedMenuName = ConstantFactory.me().getMenuNameByCode(menu.getCode());
        if (StringUtil.isNotEmpty(existedMenuName)) {
            throw new ApplicationException(BizExceptionEnum.EXISTED_THE_MENU);
        }
        menu.setStatus(MenuStatus.ENABLE.getCode());
    }

    //设置父级菜单编号
    menuService.menuSetPcode(menu);
    if(menu.getId()==null){
        menuService.insert(menu);
    }else {
        menuService.update(menu);
    }
    return Rets.success();
}
 
Example #5
Source Project: dts-shop   Author: qiguliuxing   File: AdminCategoryController.java    License: GNU Lesser General Public License v3.0 6 votes vote down vote up
@RequiresPermissions("admin:category:list")
@GetMapping("/l1")
public Object catL1() {
	logger.info("【请求开始】商场管理->类目管理->一级分类目录查询");

	// 所有一级分类目录
	List<DtsCategory> l1CatList = categoryService.queryL1();
	List<Map<String, Object>> data = new ArrayList<>(l1CatList.size());
	for (DtsCategory category : l1CatList) {
		Map<String, Object> d = new HashMap<>(2);
		d.put("value", category.getId());
		d.put("label", category.getName());
		data.add(d);
	}

	logger.info("【请求结束】商场管理->类目管理->一级分类目录查询:total:{}", JSONObject.toJSONString(data));
	return ResponseUtil.ok(data);
}
 
Example #6
Source Project: NutzSite   Author: TomYule   File: LogininforController.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * 查询系统访问记录列表
 */
@RequiresPermissions("monitor:logininfor:list")
@At
@Ok("json")
public Object list(@Param("pageNum")Integer pageNum,
				   @Param("pageSize")Integer pageSize,
				   @Param("name") String name,
				   @Param("orderByColumn") String orderByColumn,
				   @Param("isAsc") String isAsc,
				   HttpServletRequest req) {
	Cnd cnd = Cnd.NEW();
	if (!Strings.isBlank(name)){
		//cnd.and("name", "like", "%" + name +"%");
	}
	return logininforService.tableList(pageNum,pageSize,cnd,orderByColumn,isAsc,null);
}
 
Example #7
Source Project: DouBiNovel   Author: luckymorning   File: AuthorityGroupController.java    License: Apache License 2.0 6 votes vote down vote up
@RequestMapping("/doAdd")
@ResponseBody
@RequiresPermissions(value = {"AUTHORITY_GROUP_ADD", Const.role.ROLE_SUPER}, logical = Logical.OR)
public MvcResult doAdd(AuthorityGroup authorityGroup) {
    MvcResult result = MvcResult.create();
    try {
        boolean success = authorityGroupService.add(authorityGroup);
        if (!success) {
            result.setSuccess(false);
            result.setMessage("添加失败:未知原因");
        }
    } catch (Exception e) {
        result.setSuccess(false);
        result.setMessage("添加失败:" + e.getMessage());
    }
    return result;
}
 
Example #8
Source Project: dts-shop   Author: qiguliuxing   File: AdminGrouponController.java    License: GNU Lesser General Public License v3.0 6 votes vote down vote up
@RequiresPermissions("admin:groupon:list")
@RequiresPermissionsDesc(menu = { "推广管理", "团购管理" }, button = "查询")
@GetMapping("/list")
public Object list(String goodsId, @RequestParam(defaultValue = "1") Integer page,
		@RequestParam(defaultValue = "10") Integer limit,
		@Sort @RequestParam(defaultValue = "add_time") String sort,
		@Order @RequestParam(defaultValue = "desc") String order) {
	logger.info("【请求开始】推广管理->团购管理->查询,请求参数:goodsId:{},page:{}", goodsId, page);

	List<DtsGrouponRules> rulesList = rulesService.querySelective(goodsId, page, limit, sort, order);
	long total = PageInfo.of(rulesList).getTotal();
	Map<String, Object> data = new HashMap<>();
	data.put("total", total);
	data.put("items", rulesList);

	logger.info("【请求结束】推广管理->团购管理->查询,响应结果:{}", JSONObject.toJSONString(data));
	return ResponseUtil.ok(data);
}
 
Example #9
Source Project: ZTuoExchange_framework   Author: homeyanmi   File: AdvertiseController.java    License: MIT License 6 votes vote down vote up
@RequiresPermissions("cms:system-advertise:create")
@PostMapping("/create")
@AccessLog(module = AdminModule.CMS, operation = "创建系统广告")
public MessageResult findOne(@Valid SysAdvertise sysAdvertise, BindingResult bindingResult) {
    Date end = DateUtil.strToDate(sysAdvertise.getEndTime());
    Date start = DateUtil.strToDate(sysAdvertise.getStartTime());
    Assert.isTrue(end.after(start), msService.getMessage("START_END_TIME"));
    MessageResult result = BindingResultUtil.validate(bindingResult);
    if (result != null) {
        return result;
    }
    sysAdvertise.setSerialNumber(UUIDUtil.getUUID());
    sysAdvertise.setCreateTime(DateUtil.getCurrentDate());

    updateSort(sysAdvertise.getSort(),sysAdvertise.getSysAdvertiseLocation().getOrdinal());
    return success(sysAdvertiseService.save(sysAdvertise));
}
 
Example #10
Source Project: dts-shop   Author: qiguliuxing   File: AdminTopicController.java    License: GNU Lesser General Public License v3.0 6 votes vote down vote up
@RequiresPermissions("admin:topic:update")
@RequiresPermissionsDesc(menu = { "推广管理", "专题管理" }, button = "编辑")
@PostMapping("/update")
public Object update(@RequestBody DtsTopic topic) {
	logger.info("【请求开始】推广管理->专题管理->编辑,请求参数:{}", JSONObject.toJSONString(topic));

	Object error = validate(topic);
	if (error != null) {
		return error;
	}
	if (topicService.updateById(topic) == 0) {
		logger.error("推广管理->专题管理->编辑 错误:{}", "更新数据失败!");
		return ResponseUtil.updatedDataFailed();
	}

	logger.info("【请求结束】推广管理->专题管理->编辑,响应结果:{}", JSONObject.toJSONString(topic));
	return ResponseUtil.ok(topic);
}
 
Example #11
Source Project: dts-shop   Author: qiguliuxing   File: AdminGrouponController.java    License: GNU Lesser General Public License v3.0 6 votes vote down vote up
@RequiresPermissions("admin:groupon:create")
@RequiresPermissionsDesc(menu = { "推广管理", "团购管理" }, button = "添加")
@PostMapping("/create")
public Object create(@RequestBody DtsGrouponRules grouponRules) {
	logger.info("【请求开始】推广管理->团购管理->添加,请求参数:{}", JSONObject.toJSONString(grouponRules));

	Object error = validate(grouponRules);
	if (error != null) {
		return error;
	}

	Integer goodsId = grouponRules.getGoodsId();
	DtsGoods goods = goodsService.findById(goodsId);
	if (goods == null) {
		return ResponseUtil.badArgumentValue();
	}

	grouponRules.setGoodsName(goods.getName());
	grouponRules.setPicUrl(goods.getPicUrl());

	rulesService.createRules(grouponRules);

	logger.info("【请求结束】推广管理->团购管理->添加,响应结果:{}", JSONObject.toJSONString(grouponRules));
	return ResponseUtil.ok(grouponRules);
}
 
Example #12
Source Project: NutzSite   Author: TomYule   File: UserOnlineController.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * 查询在线用户记录列表
 */
@RequiresPermissions("monitor:online:list")
@At
@Ok("json")
public Object list(@Param("pageNum")Integer pageNum,
				   @Param("pageSize")Integer pageSize,
				   @Param("name") String ipaddr,
				   @Param("loginName") String loginName,
				   @Param("orderByColumn") String orderByColumn,
				   @Param("isAsc") String isAsc,
				   HttpServletRequest req) {
	Cnd cnd = Cnd.NEW();
	if (!Strings.isBlank(ipaddr)){
		cnd.and("ipaddr", "=", ipaddr);
	}
	if (!Strings.isBlank(loginName)){
		cnd.and("login_name", "=", loginName);
	}
	return userOnlineService.tableList(pageNum,pageSize,cnd,orderByColumn,isAsc,null);
}
 
Example #13
Source Project: frpMgr   Author: Zo3i   File: EmpUserController.java    License: MIT License 5 votes vote down vote up
@RequiresPermissions("sys:empUser:view")
@RequestMapping(value = "form")
public String form(EmpUser empUser, String op, Model model) {
	
	Employee employee = empUser.getEmployee();
	
	// 设置默认的部门
	if (StringUtils.isBlank(employee.getCompany().getCompanyCode())) {
		employee.setCompany(EmpUtils.getCompany());
	}
	
	// 设置默认的公司
	if (StringUtils.isBlank(employee.getOffice().getOfficeCode())) {
		employee.setOffice(EmpUtils.getOffice());
	}
	
	// 获取岗位列表
	Post post = new Post();
	model.addAttribute("postList", postService.findList(post));
	
	// 获取当前用户所拥有的岗位
	if (StringUtils.isNotBlank(employee.getEmpCode())){
		employee.setEmployeePostList(employeeService.findEmployeePostList(employee));
	}
	
	// 获取当前编辑用户的角色和权限
	if (StringUtils.inString(op, Global.OP_AUTH)) {
		
		// 获取当前用户所拥有的角色
		Role role = new Role();
		role.setUserCode(empUser.getUserCode());
		model.addAttribute("roleList", roleService.findListByUserCode(role));

	}
	// 操作类型:add: 全部; edit: 编辑; auth: 授权
	model.addAttribute("op", op);
	model.addAttribute("empUser", empUser);
	return "modules/sys/user/empUserForm";
}
 
Example #14
Source Project: supplierShop   Author: guchengwuyue   File: SysJobController.java    License: MIT License 5 votes vote down vote up
/**
 * 新增保存调度
 */
@Log(title = "定时任务", businessType = BusinessType.INSERT)
@RequiresPermissions("monitor:job:add")
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(@Validated SysJob job) throws SchedulerException, TaskException
{
    return toAjax(jobService.insertJob(job));
}
 
Example #15
Source Project: ZTuoExchange_framework   Author: homeyanmi   File: MemberController.java    License: MIT License 5 votes vote down vote up
@RequiresPermissions("member:detail")
@PostMapping("detail")
@AccessLog(module = AdminModule.MEMBER, operation = "会员Member详情")
public MessageResult detail(@RequestParam("id") Long id) {
    Member member = memberService.findOne(id);
    notNull(member, "validate id!");
    List<MemberWallet> list = memberWalletService.findAllByMemberId(member.getId());
    MemberDTO memberDTO = new MemberDTO();
    memberDTO.setMember(member);
    memberDTO.setList(list);
    return success(memberDTO);
}
 
Example #16
Source Project: flash-waimai   Author: microapp-store   File: DeptContoller.java    License: MIT License 5 votes vote down vote up
@RequestMapping(method = RequestMethod.DELETE)
@BussinessLog(value = "删除部门", key = "id", dict = DeptDict.class)
@RequiresPermissions(value = {Permission.DEPT_DEL})
public Object remove(@RequestParam  Long id){
    logger.info("id:{}",id);
    if (ToolUtil.isEmpty(id)) {
        throw new ApplicationException(BizExceptionEnum.REQUEST_NULL);
    }
    deptService.deleteDept(id);
    return Rets.success();
}
 
Example #17
Source Project: flash-waimai   Author: microapp-store   File: MessagesenderController.java    License: MIT License 5 votes vote down vote up
@RequestMapping(method = RequestMethod.DELETE)
@BussinessLog(value = "删除消息发送者", key = "id", dict = CommonDict.class)
@RequiresPermissions(value = {Permission.MSG_SENDER_DEL})
public Object remove(Long id) {

    try {
        messagesenderService.delete(id);
        return Rets.success();
    } catch (Exception e) {
        return Rets.failure(e.getMessage());
    }

}
 
Example #18
Source Project: spring-boot-plus   Author: geekidea   File: SysRoleController.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 删除系统角色
 */
@PostMapping("/delete/{id}")
@RequiresPermissions("sys:role:delete")
@OperationLog(name = "删除系统角色", type = OperationLogType.DELETE)
@ApiOperation(value = "删除系统角色", response = ApiResult.class)
public ApiResult<Boolean> deleteSysRole(@PathVariable("id") Long id) throws Exception {
    boolean flag = sysRoleService.deleteSysRole(id);
    return ApiResult.result(flag);
}
 
Example #19
Source Project: supplierShop   Author: guchengwuyue   File: StoreGoodsBrandController.java    License: MIT License 5 votes vote down vote up
/**
 * 新增保存产品品牌
 */
@RequiresPermissions("shop:brand:add")
@Log(title = "产品品牌", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(StoreGoodsBrand storeGoodsBrand)
{
    return toAjax(storeGoodsBrandService.insertStoreGoodsBrand(storeGoodsBrand));
}
 
Example #20
Source Project: frpMgr   Author: Zo3i   File: EmpUserController.java    License: MIT License 5 votes vote down vote up
/**
 * 导出用户数据
 */
@RequiresPermissions("sys:empUser:view")
@RequestMapping(value = "exportData")
public void exportData(EmpUser empUser, Boolean isAll, HttpServletResponse response) {
	empUser.getEmployee().getOffice().setIsQueryChildren(true);
	empUser.getEmployee().getCompany().setIsQueryChildren(true);
	if (!(isAll != null && isAll)){
		empUserService.addDataScopeFilter(empUser, UserDataScope.CTRL_PERMI_MANAGE);
	}
	List<EmpUser> list = empUserService.findList(empUser);
	String fileName = "用户数据" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
	try(ExcelExport ee = new ExcelExport("用户数据", EmpUser.class)){
		ee.setDataList(list).write(response, fileName);
	}
}
 
Example #21
Source Project: ZTuoExchange_framework   Author: sengeiou   File: AdminOtcCoinController.java    License: MIT License 5 votes vote down vote up
@RequiresPermissions("otc:otc-coin:alter-jy-rate")
@PostMapping("alter-jy-rate")
@AccessLog(module = AdminModule.OTC, operation = "修改otc币种otcCoin交易率")
public MessageResult memberStatistics(
        @RequestParam("id") Long id,
        @RequestParam("jyRate") BigDecimal jyRate) {
    OtcCoin one = otcCoinService.findOne(id);
    notNull(one, "validate otcCoin.id");
    one.setJyRate(jyRate);
    otcCoinService.save(one);
    return success();
}
 
Example #22
Source Project: permission   Author: goufaning   File: MenuController.java    License: MIT License 5 votes vote down vote up
@Log("新增/修改菜单")
@PostMapping(value="/save")
@RequiresPermissions({"sys:menu:add", "sys:menu:edit"})
public CommonResult save(@RequestBody SysMenu record) {
    if (record.getParentId() == null) {
        record.setParentId(0L);
    }
    menuService.saveOrUpdate(record);
    return CommonResult.success();
}
 
Example #23
Source Project: spring-boot-plus   Author: geekidea   File: SysUserController.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 添加系统用户
 */
@PostMapping("/add")
@RequiresPermissions("sys:user:add")
@OperationLog(name = "添加系统用户", type = OperationLogType.ADD)
@ApiOperation(value = "添加系统用户", response = ApiResult.class)
public ApiResult<Boolean> addSysUser(@Validated(Add.class) @RequestBody SysUser sysUser) throws Exception {
    boolean flag = sysUserService.saveSysUser(sysUser);
    return ApiResult.result(flag);
}
 
Example #24
Source Project: springboot-learn   Author: fujiangwei   File: ResourcesController.java    License: MIT License 5 votes vote down vote up
@RequiresPermissions("resource:edit")
@PostMapping("/edit")
public ResponseVO edit(Resources resources) {
    try {
        resourcesService.updateSelective(resources);
    } catch (Exception e) {
        e.printStackTrace();
        return ResultUtil.error("资源修改失败!");
    }
    return ResultUtil.success(ResponseStatusEnum.SUCCESS);
}
 
Example #25
Source Project: frpMgr   Author: Zo3i   File: LoginController.java    License: MIT License 5 votes vote down vote up
/**
 * 切换主题
 */
@RequiresPermissions("user")
@RequestMapping(value = "switchSkin/{skinName}")
public String switchSkin(@PathVariable String skinName, HttpServletRequest request, HttpServletResponse response) {
	LoginInfo loginInfo = UserUtils.getLoginInfo();
	if (StringUtils.isNotBlank(skinName) && !"select".equals(skinName)){
		CookieUtils.setCookie(response, "skinName_" + loginInfo.getId(), skinName);
		return REDIRECT + adminPath + "/index";
	}
	return "modules/sys/sysSwitchSkin";
}
 
Example #26
Source Project: ZTuoExchange_framework   Author: homeyanmi   File: HelpController.java    License: MIT License 5 votes vote down vote up
@RequiresPermissions("cms:system-help:update")
@PostMapping("/update")
@AccessLog(module = AdminModule.CMS, operation = "更新系统帮助")
public MessageResult update(@Valid SysHelp sysHelp, BindingResult bindingResult) {
    notNull(sysHelp.getId(), "validate id!");
    MessageResult result = BindingResultUtil.validate(bindingResult);
    if (result != null) {
        return result;
    }
    SysHelp one = sysHelpService.findOne(sysHelp.getId());
    notNull(one, "validate id!");
    sysHelpService.save(sysHelp);
    return success();
}
 
Example #27
Source Project: ZTuoExchange_framework   Author: sengeiou   File: ExchangeOrderController.java    License: MIT License 5 votes vote down vote up
@RequiresPermissions("exchange:exchange-order:out-excel")
@GetMapping("out-excel")
@AccessLog(module = AdminModule.EXCHANGE, operation = "导出 exchangeOrder Excel")
public MessageResult outExcel(
        @RequestParam(value = "memberId") Long memberId,
        @RequestParam(value = "type") ExchangeOrderType type,
        @RequestParam(value = "symbol") String symbol,
        @RequestParam(value = "status") ExchangeOrderStatus status,
        @RequestParam(value = "direction") ExchangeOrderDirection direction,
        HttpServletRequest request, HttpServletResponse response) throws Exception {
    //获取查询条件
    List<Predicate> predicates = getPredicates(memberId, type, symbol, status, direction);
    List list = exchangeOrderService.queryWhereOrPage(predicates, null, null).getContent();
    return new FileUtil().exportExcel(request, response, list, "order");
}
 
Example #28
Source Project: spring-boot-plus   Author: geekidea   File: SysDepartmentController.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 添加部门
 */
@PostMapping("/add")
@RequiresPermissions("sys:department:add")
@OperationLog(name = "添加部门", type = OperationLogType.ADD)
@ApiOperation(value = "添加部门", response = ApiResult.class)
public ApiResult<Boolean> addSysDepartment(@Validated @RequestBody SysDepartment sysDepartment) throws Exception {
    boolean flag = sysDepartmentService.saveSysDepartment(sysDepartment);
    return ApiResult.result(flag);
}
 
Example #29
Source Project: frpMgr   Author: Zo3i   File: CompanyController.java    License: MIT License 5 votes vote down vote up
@RequiresPermissions("sys:company:edit")
@RequestMapping(value = "fixTreeData")
@ResponseBody
public String fixTreeData() {
	if (!UserUtils.getUser().isAdmin()){
		return renderResult(Global.FALSE, "操作失败,只有管理员才能进行修复!");
	}
	companyService.fixTreeData();
	return renderResult(Global.TRUE, "数据修复成功");
}
 
Example #30
Source Project: flash-waimai   Author: microapp-store   File: MessageController.java    License: MIT License 5 votes vote down vote up
@RequestMapping(value = "/list", method = RequestMethod.GET)
@RequiresPermissions(value = {Permission.MSG})
public Object list(  @RequestParam(required = false) String startDate,
                     @RequestParam(required = false) String endDate) {
    Page<Message> page = new PageFactory<Message>().defaultPage();
    page.addFilter("createTime", SearchFilter.Operator.GTE, DateUtil.parse(startDate,"yyyyMMddHHmmss"));
    page.addFilter("createTime", SearchFilter.Operator.LTE, DateUtil.parse(endDate,"yyyyMMddHHmmss"));
    page = messageService.queryPage(page);
    page.setRecords(page.getRecords());
    return Rets.success(page);
}