| | |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopRelUser; |
| | | import com.ruoyi.shop.domain.vo.*; |
| | | import com.ruoyi.shop.service.shop.*; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | 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.dto.*; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.poji.shop.ShopNonAppointableTime; |
| | | import com.ruoyi.system.api.domain.poji.shop.TShopAppointableTime; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.Comparator; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "当前商户id", name = "shopId", required = true, dataType = "Long", paramType = "query") |
| | | }) |
| | | public R<MerStaffInfoVo> getShopStaffInfo(@RequestParam("shopId") Long shopId) { |
| | | public R<MerStaffInfoVo> getShopStaffInfo(@RequestBody ShopStaffInfoDto dto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | Shop shop = shopService.getByShopId(shopId); |
| | | Shop shop = shopService.getByShopId(dto.getShopId()); |
| | | MerStaffInfoVo merStaffInfoVo = shopStaffService.getShopStaffInfo(userId, shop); |
| | | return R.ok(merStaffInfoVo); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/delShopNonAppointableTime/{id}", method = RequestMethod.POST) |
| | | @ApiOperation(value = "门店删除不可预约时间段【2.0】") |
| | | public R delShopNonAppointableTime(@PathVariable("id") String id) { |
| | | shopNonAppointableTimeService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/switchAppointment/{shopId}/{subscribe}", method = RequestMethod.POST) |
| | | @ApiOperation(value = "开关门店预约配置【2.0】") |
| | | @ApiImplicitParams({ |
| | |
| | | List<ShopRelUser> shopRelUser = shopRelUserService.getByUserId(userId); |
| | | List<Shop> collect = shopRelUser.stream().map(e -> { |
| | | Shop shop = shopService.getById(e.getShopId()); |
| | | if (e.getIsDefault()==1){ |
| | | shop.setIsDefault(true); |
| | | } |
| | | return shop; |
| | | }).collect(Collectors.toList()); |
| | | return R.ok(collect); |