| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.shop.domain.dto.*; |
| | | import com.ruoyi.shop.domain.vo.MgtShopInfoVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopPageVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopProportionPageVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopTagVo; |
| | | import com.ruoyi.shop.domain.vo.*; |
| | | import com.ruoyi.shop.service.shop.ShopProportionService; |
| | | import com.ruoyi.shop.service.shop.ShopRelTagService; |
| | | import com.ruoyi.shop.service.shop.ShopService; |
| | | import com.ruoyi.shop.service.shop.ShopSuggestService; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | |
| | | @Resource |
| | | private ShopProportionService shopProportionService; |
| | | |
| | | @Resource |
| | | private ShopSuggestService shopSuggestService; |
| | | |
| | | @RequestMapping(value = "/pageMgtShop", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取商户列表") |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pageMgtShopSuggest", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台获取商户建议列表") |
| | | public R<Page<MgtShopSuggestPageVo>> pageMgtShopSuggest(@RequestBody MgtShopSuggestPageDto mgtShopSuggestPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtShopSuggestPageDto.setUserId(userId); |
| | | Page<MgtShopSuggestPageVo> page = new Page<>(); |
| | | page.setSize(mgtShopSuggestPageDto.getPageSize()); |
| | | page.setCurrent(mgtShopSuggestPageDto.getPageNum()); |
| | | List<MgtShopSuggestPageVo> mgtShopSuggestPageVoList = shopSuggestService.pageMgtShopSuggest(page,mgtShopSuggestPageDto); |
| | | return R.ok(page.setRecords(mgtShopSuggestPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mgtReplayShopSuggest", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台回复会员建议") |
| | | public R mgtReplayShopSuggest(@RequestBody MgtReplayShopSuggestDto mgtReplayShopSuggestDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtReplayShopSuggestDto.setUserId(userId); |
| | | shopSuggestService.mgtReplayShopSuggest(mgtReplayShopSuggestDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/listMgtShopSuggestTag", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取商户建议标签") |
| | | public R<List<MgtShopSuggestTagVo>> listMgtShopSuggestTag(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | List<MgtShopSuggestTagVo> mgtShopSuggestTagVoList = shopSuggestService.listMgtShopSuggestTag(Long.valueOf(mgtBaseGetDto.getId())); |
| | | return R.ok(mgtShopSuggestTagVoList); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mgtEditShopSuggestTag", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台编辑会员建议标签") |
| | | public R mgtEditShopSuggestTag(@RequestBody MgtTagShopSuggestDto mgtTagShopSuggestDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtTagShopSuggestDto.setUserId(userId); |
| | | shopSuggestService.mgtEditShopSuggestTag(mgtTagShopSuggestDto); |
| | | return R.ok(); |
| | | } |
| | | } |