New file |
| | |
| | | package com.matrix.system.activity.action; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.activity.dto.ActivitiesListDto; |
| | | import com.matrix.system.activity.dto.AddSignAwardSetDto; |
| | | import com.matrix.system.activity.dto.BeCloseDto; |
| | | import com.matrix.system.activity.dto.BeReadyDto; |
| | | import com.matrix.system.activity.dto.CouponDto; |
| | | import com.matrix.system.activity.dto.DelRowDto; |
| | | import com.matrix.system.activity.dto.GoodsDto; |
| | | import com.matrix.system.activity.dto.SignForUpdateDto; |
| | | import com.matrix.system.activity.dto.SignReceiveListDto; |
| | | import com.matrix.system.activity.dto.UpdateSignAwardSetDto; |
| | | import com.matrix.system.activity.service.ActivitySignAwardSetService; |
| | | import com.matrix.system.activity.vo.ActivitiesListVo; |
| | | import com.matrix.system.activity.vo.CouponVo; |
| | | import com.matrix.system.activity.vo.GoodsVo; |
| | | import com.matrix.system.activity.vo.SignReceiveListVo; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @description 奖品设置表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "admin/activitySignAwardSet") |
| | | public class ActivitySignAwardSetAction { |
| | | |
| | | @Autowired |
| | | private ActivitySignAwardSetService activitySignAwardSetService; |
| | | |
| | | /** |
| | | * 新增签到活动 |
| | | */ |
| | | @PostMapping(value = "/addSignAwardSet") |
| | | public @ResponseBody |
| | | AjaxResult addSignAwardSet(@RequestBody AddSignAwardSetDto addSignAwardSetDto) { |
| | | return activitySignAwardSetService.activitySignAwardSetService(addSignAwardSetDto); |
| | | } |
| | | |
| | | /** |
| | | * 查询优惠券 |
| | | */ |
| | | @ApiOperation(value = "查询优惠券") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = CouponVo.class) |
| | | }) |
| | | @PostMapping(value = "/selectCouponList") |
| | | public @ResponseBody |
| | | AjaxResult selectCouponList(@RequestBody CouponDto couponDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(couponDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(couponDto.getSort())){ |
| | | couponDto.setSort("create_time"); |
| | | couponDto.setOrder("desc"); |
| | | } |
| | | Page<CouponVo> page = new Page(couponDto.getPageNum(), couponDto.getPageSize()); |
| | | IPage<CouponVo> rows = activitySignAwardSetService.selectCouponList(page,couponDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询商品 |
| | | */ |
| | | @ApiOperation(value = "查询商品") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = GoodsVo.class) |
| | | }) |
| | | @PostMapping(value = "/selectGoodsList") |
| | | public @ResponseBody |
| | | AjaxResult selectGoodsList(@RequestBody GoodsDto goodsDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(goodsDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(goodsDto.getSort())){ |
| | | goodsDto.setSort("create_time"); |
| | | goodsDto.setOrder("desc"); |
| | | } |
| | | Page<GoodsVo> page = new Page(goodsDto.getPageNum(), goodsDto.getPageSize()); |
| | | IPage<GoodsVo> rows = activitySignAwardSetService.selectGoodsList(page,goodsDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询活动列表 |
| | | */ |
| | | @ApiOperation(value = "查询活动列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = ActivitiesListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findActivitiesList") |
| | | public @ResponseBody |
| | | AjaxResult findActivitiesList(@RequestBody ActivitiesListDto activitiesListDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(activitiesListDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(activitiesListDto.getSort())){ |
| | | activitiesListDto.setSort("create_time"); |
| | | activitiesListDto.setOrder("desc"); |
| | | } |
| | | Page<ActivitiesListVo> page = new Page(activitiesListDto.getPageNum(), activitiesListDto.getPageSize()); |
| | | IPage<ActivitiesListVo> rows = activitySignAwardSetService.findActivitiesList(page,activitiesListDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *发布 |
| | | */ |
| | | @ApiOperation(value = "发布") |
| | | @PostMapping(value = "/beReady") |
| | | public @ResponseBody |
| | | AjaxResult beReady(@RequestBody BeReadyDto beReadyDto) { |
| | | return activitySignAwardSetService.beReady(beReadyDto); |
| | | } |
| | | |
| | | /** |
| | | *删除 |
| | | */ |
| | | @ApiOperation(value = "删除") |
| | | @PostMapping(value = "/delRow") |
| | | public @ResponseBody |
| | | AjaxResult delRow(@RequestBody DelRowDto delRowDto) { |
| | | return activitySignAwardSetService.delRow(delRowDto); |
| | | } |
| | | |
| | | /** |
| | | *关闭 |
| | | */ |
| | | @ApiOperation(value = "关闭") |
| | | @PostMapping(value = "/beClose") |
| | | public @ResponseBody |
| | | AjaxResult beClose(@RequestBody BeCloseDto beCloseDto) { |
| | | return activitySignAwardSetService.beClose(beCloseDto); |
| | | } |
| | | |
| | | /** |
| | | * 活动统计 |
| | | */ |
| | | @ApiOperation(value = "活动统计") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = SignReceiveListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findSignReceiveList") |
| | | public @ResponseBody |
| | | AjaxResult findSignReceiveList(@RequestBody SignReceiveListDto signReceiveListDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(signReceiveListDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(signReceiveListDto.getSort())){ |
| | | signReceiveListDto.setSort("create_time"); |
| | | signReceiveListDto.setOrder("desc"); |
| | | } |
| | | Page<SignReceiveListVo> page = new Page(signReceiveListDto.getPageNum(), signReceiveListDto.getPageSize()); |
| | | IPage<SignReceiveListVo> rows = activitySignAwardSetService.findSignReceiveList(page,signReceiveListDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *进入修改 |
| | | */ |
| | | @ApiOperation(value = "进入修改") |
| | | @PostMapping(value = "/findSignForUpdate") |
| | | public @ResponseBody |
| | | AjaxResult findSignForUpdate(@RequestBody SignForUpdateDto signForUpdateDto) { |
| | | return activitySignAwardSetService.findSignForUpdate(signForUpdateDto); |
| | | } |
| | | |
| | | /** |
| | | * 保存 |
| | | */ |
| | | @PostMapping(value = "/updateSignAwardSet") |
| | | public @ResponseBody |
| | | AjaxResult updateSignAwardSet(@RequestBody UpdateSignAwardSetDto updateSignAwardSetDto) { |
| | | return activitySignAwardSetService.updateSignAwardSet(updateSignAwardSetDto); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |