| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.shop.domain.dto.MerAgencyPageDto; |
| | | import com.ruoyi.shop.domain.dto.MerMemberTaskPageDto; |
| | | import com.ruoyi.shop.domain.dto.MerShopCertificateEditDto; |
| | | import com.ruoyi.shop.domain.dto.MerShopCertificateListDto; |
| | | import com.ruoyi.shop.domain.dto.MerShopSuggestDto; |
| | | import com.ruoyi.shop.domain.vo.MerAgencyPageVo; |
| | | import com.ruoyi.shop.domain.vo.MerMemberTaskPageVo; |
| | | import com.ruoyi.shop.domain.vo.MerShopCertificateListVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopInfoVo; |
| | | import com.ruoyi.shop.domain.vo.MerShopSuggestVo; |
| | | import com.ruoyi.shop.service.shop.ShopCertificateService; |
| | | import com.ruoyi.shop.service.shop.ShopService; |
| | | import com.ruoyi.shop.service.shop.ShopStaffService; |
| | | import com.ruoyi.shop.service.shop.ShopSuggestService; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseGetDto; |
| | | import com.ruoyi.system.api.domain.dto.MerEditUserDto; |
| | | import com.ruoyi.system.api.domain.dto.MerPageDto; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MerStaffInfoVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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; |
| | | |
| | | /** |
| | |
| | | public class MerShopController { |
| | | |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private ShopService shopService; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private ShopCertificateService shopCertificateService; |
| | | |
| | | @Resource |
| | | private ShopStaffService shopStaffService; |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private ShopSuggestService shopSuggestService; |
| | | |
| | | /** |
| | | * 未完成实际统计 |
| | |
| | | shopCertificateService.editShopCertificate(merShopCertificateEditDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/deleteShopCertificate", method = RequestMethod.POST) |
| | | @ApiOperation(value = "删除商户证书") |
| | | public R deleteShopCertificate(@RequestBody MerBaseGetDto merBaseGetDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | shopCertificateService.deleteShopCertificate(Long.valueOf(merBaseGetDto.getId())); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getShopStaffInfo", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取员工信息") |
| | | public R<MerStaffInfoVo> getShopStaffInfo() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | MerStaffInfoVo merStaffInfoVo = shopStaffService.getShopStaffInfo(userId); |
| | | return R.ok(merStaffInfoVo); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editShopStaffInfo", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改员工信息") |
| | | public R editShopStaffInfo(@RequestBody MerEditUserDto merEditUserDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | merEditUserDto.setUserId(userId); |
| | | shopStaffService.editShopStaffInfo(merEditUserDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/pageMerShopSuggest", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取商户建议") |
| | | public R<Page<MerShopSuggestVo>> pageMerShopSuggest(@RequestBody MerPageDto merPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | merPageDto.setUserId(userId); |
| | | Page<MerShopSuggestVo> page = new Page<>(); |
| | | page.setSize(merPageDto.getPageSize()); |
| | | page.setCurrent(merPageDto.getPageNum()); |
| | | List<MerShopSuggestVo> merShopSuggestVoList = shopSuggestService.pageMerShopSuggest(page,merPageDto); |
| | | return R.ok(page.setRecords(merShopSuggestVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/suggest", method = RequestMethod.POST) |
| | | @ApiOperation(value = "建议") |
| | | public R suggest(@RequestBody MerShopSuggestDto merShopSuggestDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | merShopSuggestDto.setUserId(userId); |
| | | shopSuggestService.suggest(merShopSuggestDto); |
| | | return R.ok(); |
| | | } |
| | | } |