Commit f7fcf077 authored by macro's avatar macro
Browse files

Update SmsFlashPromotionController.java

parent d6c7c277
......@@ -39,7 +39,7 @@ public class SmsFlashPromotionController {
@ApiOperation("编辑活动")
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
@ResponseBody
public Object update(@PathVariable Long id, @RequestBody SmsFlashPromotion flashPromotion) {
public CommonResult update(@PathVariable Long id, @RequestBody SmsFlashPromotion flashPromotion) {
int count = flashPromotionService.update(id, flashPromotion);
if (count > 0) {
return CommonResult.success(count);
......@@ -50,7 +50,7 @@ public class SmsFlashPromotionController {
@ApiOperation("删除活动")
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
@ResponseBody
public Object delete(@PathVariable Long id) {
public CommonResult delete(@PathVariable Long id) {
int count = flashPromotionService.delete(id);
if (count > 0) {
return CommonResult.success(count);
......@@ -61,7 +61,7 @@ public class SmsFlashPromotionController {
@ApiOperation("修改上下线状态")
@RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST)
@ResponseBody
public Object update(@PathVariable Long id, Integer status) {
public CommonResult update(@PathVariable Long id, Integer status) {
int count = flashPromotionService.updateStatus(id, status);
if (count > 0) {
return CommonResult.success(count);
......@@ -72,7 +72,7 @@ public class SmsFlashPromotionController {
@ApiOperation("获取活动详情")
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public Object getItem(@PathVariable Long id) {
public CommonResult<SmsFlashPromotion> getItem(@PathVariable Long id) {
SmsFlashPromotion flashPromotion = flashPromotionService.getItem(id);
return CommonResult.success(flashPromotion);
}
......@@ -80,7 +80,7 @@ public class SmsFlashPromotionController {
@ApiOperation("根据活动名称分页查询")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public Object getItem(@RequestParam(value = "keyword", required = false) String keyword,
public CommonResult<CommonPage<SmsFlashPromotion>> getItem(@RequestParam(value = "keyword", required = false) String keyword,
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
List<SmsFlashPromotion> flashPromotionList = flashPromotionService.list(keyword, pageSize, pageNum);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment