|
@@ -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);
|