puzhibing
3 天以前 a95d0c4bdd96b09342c7ccf9aa1aef4b26b31302
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java
@@ -9,10 +9,7 @@
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;
@@ -126,9 +123,9 @@
    @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);
    }
@@ -286,7 +283,7 @@
    @RequestMapping(value = "/cancelReservation", method = RequestMethod.POST)
    @ApiOperation(value = "商户取消预约【2.0】")
    public R cancelReservation(@RequestBody CancelReservationDto dto) {
        TShopAppointableTime shopAppointableTime = shopAppointableTimeService.getById(dto.getId());
        TShopAppointableTime shopAppointableTime = shopAppointableTimeService.getById(dto.getAppointmentId());
        if (null == shopAppointableTime) {
            return R.fail("预约不存在");
        }
@@ -294,7 +291,7 @@
            return R.fail("不能重复操作");
        }
        shopAppointableTime.setStatus(0);
        shopAppointableTime.setReason(dto.getReason());
        shopAppointableTime.setReason(dto.getCancelReason());
        shopAppointableTimeService.updateById(shopAppointableTime);
        return R.ok();
    }
@@ -306,6 +303,9 @@
        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);