Java Code Examples for com.macro.mall.common.api.CommonResult#success()
The following examples show how to use
com.macro.mall.common.api.CommonResult#success() .
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 File: UmsResourceCategoryController.java From mall-swarm with Apache License 2.0 | 5 votes |
@ApiOperation("查询所有后台资源分类") @RequestMapping(value = "/listAll", method = RequestMethod.GET) @ResponseBody public CommonResult<List<UmsResourceCategory>> listAll() { List<UmsResourceCategory> resourceList = resourceCategoryService.listAll(); return CommonResult.success(resourceList); }
Example 2
Source File: MemberAttentionController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("取消关注") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(Long brandId) { int count = memberAttentionService.delete(brandId); if(count>0){ return CommonResult.success(count); }else{ return CommonResult.failed(); } }
Example 3
Source File: MemberReadHistoryController.java From mall-swarm with Apache License 2.0 | 5 votes |
@ApiOperation("展示浏览记录") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult<List<MemberReadHistory>> list(Long memberId) { List<MemberReadHistory> memberReadHistoryList = memberReadHistoryService.list(memberId); return CommonResult.success(memberReadHistoryList); }
Example 4
Source File: OmsOrderReturnReasonController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("修改退货原因启用状态") @RequestMapping(value = "/update/status", method = RequestMethod.POST) @ResponseBody public CommonResult updateStatus(@RequestParam(value = "status") Integer status, @RequestParam("ids") List<Long> ids) { int count = orderReturnReasonService.updateStatus(ids, status); if (count > 0) { return CommonResult.success(count); } return CommonResult.failed(); }
Example 5
Source File: OmsPortalOrderController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("用户支付成功的回调") @RequestMapping(value = "/paySuccess", method = RequestMethod.POST) @ResponseBody public CommonResult paySuccess(@RequestParam Long orderId,@RequestParam Integer payType) { Integer count = portalOrderService.paySuccess(orderId,payType); return CommonResult.success(count, "支付成功"); }
Example 6
Source File: UmsResourceController.java From mall-swarm with Apache License 2.0 | 5 votes |
@ApiOperation("修改后台资源") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody UmsResource umsResource) { int count = resourceService.update(id, umsResource); dynamicSecurityMetadataSource.clearDataSource(); if (count > 0) { return CommonResult.success(count); } else { return CommonResult.failed(); } }
Example 7
Source File: OmsPortalOrderController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("自动取消超时订单") @RequestMapping(value = "/cancelTimeOutOrder", method = RequestMethod.POST) @ResponseBody public CommonResult cancelTimeOutOrder() { portalOrderService.cancelTimeOutOrder(); return CommonResult.success(null); }
Example 8
Source File: SmsHomeAdvertiseController.java From macrozheng with Apache License 2.0 | 5 votes |
@ApiOperation("删除广告") @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List<Long> ids) { int count = advertiseService.delete(ids); if (count > 0) return CommonResult.success(count); return CommonResult.failed(); }
Example 9
Source File: OmsCartItemController.java From mall-swarm with Apache License 2.0 | 5 votes |
@ApiOperation("获取某个会员的购物车列表,包括促销信息") @RequestMapping(value = "/list/promotion", method = RequestMethod.GET) @ResponseBody public CommonResult<List<CartPromotionItem>> listPromotion() { List<CartPromotionItem> cartPromotionItemList = cartItemService.listPromotion(memberService.getCurrentMember().getId()); return CommonResult.success(cartPromotionItemList); }
Example 10
Source File: SmsFlashPromotionSessionController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("修改启用状态") @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateStatus(@PathVariable Long id, Integer status) { int count = flashPromotionSessionService.updateStatus(id, status); if (count > 0) { return CommonResult.success(count); } return CommonResult.failed(); }
Example 11
Source File: PmsProductCategoryController.java From macrozheng with Apache License 2.0 | 5 votes |
@ApiOperation("分页查询商品分类") @RequestMapping(value = "/list/{parentId}", method = RequestMethod.GET) @ResponseBody @PreAuthorize("hasAuthority('pms:productCategory:read')") public CommonResult<CommonPage<PmsProductCategory>> getList(@PathVariable Long parentId, @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { List<PmsProductCategory> productCategoryList = productCategoryService.getList(parentId, pageSize, pageNum); return CommonResult.success(CommonPage.restPage(productCategoryList)); }
Example 12
Source File: SmsFlashPromotionProductRelationController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("批量选择商品添加关联") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody List<SmsFlashPromotionProductRelation> relationList) { int count = relationService.create(relationList); if (count > 0) { return CommonResult.success(count); } return CommonResult.failed(); }
Example 13
Source File: SmsHomeAdvertiseController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("获取广告详情") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult<SmsHomeAdvertise> getItem(@PathVariable Long id) { SmsHomeAdvertise advertise = advertiseService.getItem(id); return CommonResult.success(advertise); }
Example 14
Source File: UmsMenuController.java From mall-swarm with Apache License 2.0 | 5 votes |
@ApiOperation("根据ID删除后台菜单") @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@PathVariable Long id) { int count = menuService.delete(id); if (count > 0) { return CommonResult.success(count); } else { return CommonResult.failed(); } }
Example 15
Source File: SmsCouponController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("根据优惠券名称和类型分页获取优惠券列表") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult<CommonPage<SmsCoupon>> list( @RequestParam(value = "name",required = false) String name, @RequestParam(value = "type",required = false) Integer type, @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { List<SmsCoupon> couponList = couponService.list(name,type,pageSize,pageNum); return CommonResult.success(CommonPage.restPage(couponList)); }
Example 16
Source File: OmsOrderReturnApplyController.java From macrozheng with Apache License 2.0 | 5 votes |
@ApiOperation("修改申请状态") @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateStatus(@PathVariable Long id, @RequestBody OmsUpdateStatusParam statusParam) { int count = returnApplyService.updateStatus(id, statusParam); if (count > 0) { return CommonResult.success(count); } return CommonResult.failed(); }
Example 17
Source File: MemberProductCollectionController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("显示收藏列表") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult<CommonPage<MemberProductCollection>> list(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) { Page<MemberProductCollection> page = memberCollectionService.list(pageNum,pageSize); return CommonResult.success(CommonPage.restPage(page)); }
Example 18
Source File: UmsMemberReceiveAddressController.java From macrozheng with Apache License 2.0 | 5 votes |
@ApiOperation("删除收货地址") @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@PathVariable Long id) { int count = memberReceiveAddressService.delete(id); if (count > 0) { return CommonResult.success(count); } return CommonResult.failed(); }
Example 19
Source File: SmsFlashPromotionController.java From macrozheng with Apache License 2.0 | 5 votes |
@ApiOperation("修改上下线状态") @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST) @ResponseBody public Object update(@PathVariable Long id, Integer status) { int count = flashPromotionService.updateStatus(id, status); if (count > 0) { return CommonResult.success(count); } return CommonResult.failed(); }
Example 20
Source File: PmsBrandController.java From mall-swarm with Apache License 2.0 | 4 votes |
@ApiOperation(value = "根据编号查询品牌信息") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult<PmsBrand> getItem(@PathVariable("id") Long id) { return CommonResult.success(brandService.getBrand(id)); }