| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.activity.entity.BodySideAppointment; |
| | | import com.dsh.activity.entity.IntroduceRewards; |
| | | import com.dsh.activity.feignclient.model.IntrduceOfUserRequest; |
| | | import com.dsh.activity.feignclient.model.PurchaseRecordVo; |
| | | import com.dsh.activity.feignclient.other.model.Store; |
| | | import com.dsh.activity.model.*; |
| | | import com.dsh.activity.service.IntroduceRewardsService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RequestMapping("") |
| | | public class IntroduceRewardsController { |
| | | |
| | | |
| | | @Autowired |
| | | private IntroduceRewardsService idrService; |
| | | |
| | | private final SimpleDateFormat mat = new SimpleDateFormat("MM-dd HH:mm"); |
| | | /** |
| | | * 获取所有体测预约记录 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/base/introduce/listAll") |
| | | public List<IntroduceVO> listAll(@RequestBody IntroduceQuery query){ |
| | | |
| | | return null; |
| | | } |
| | | /** |
| | | * 增加/修改介绍有礼记录 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/base/introduce/addIntroduce") |
| | | public Object addIntroduce(@RequestBody IntroduceRewards introduceRewards){ |
| | | if (introduceRewards.getId()!=null){ |
| | | return idrService.updateById(introduceRewards); |
| | | }else { |
| | | return idrService.save(introduceRewards); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 上/下架介绍有礼 type = 1上架 type=2下架 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/base/introduce/changeState") |
| | | public Object changeState(@RequestBody IntroduceChangeStateDTO dto){ |
| | | return idrService.changeState(dto); |
| | | } |
| | | |
| | | @PostMapping("/base/introduce/useOfRewards") |
| | | public List<PurchaseRecordVo> queryAppUsersofIntroduce(@RequestBody IntrduceOfUserRequest request){ |