多店铺需求
This commit is contained in:
parent
a40ad92399
commit
b2994e58a1
|
|
@ -6,6 +6,7 @@ import com.czg.account.dto.shopinfo.ShopDetailDTO;
|
|||
import com.czg.account.dto.shopinfo.ShopInfoAddDTO;
|
||||
import com.czg.account.dto.shopinfo.ShopInfoEditDTO;
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
import com.czg.account.service.AuthorizationService;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.annotation.SaAdminCheckRole;
|
||||
|
|
@ -13,6 +14,7 @@ import com.czg.resp.CzgResult;
|
|||
import com.czg.sa.StpKit;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -27,6 +29,8 @@ import java.util.List;
|
|||
@RequestMapping("/admin/shopInfo")
|
||||
public class ShopInfoController {
|
||||
private final ShopInfoService shopInfoService;
|
||||
@Resource
|
||||
private AuthorizationService authorizationService;
|
||||
|
||||
public ShopInfoController(ShopInfoService shopInfoService) {
|
||||
this.shopInfoService = shopInfoService;
|
||||
|
|
@ -98,4 +102,14 @@ public class ShopInfoController {
|
|||
return CzgResult.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换店铺
|
||||
* @param shopId 店铺ID
|
||||
*/
|
||||
@PostMapping("/change/{shopId}")
|
||||
public CzgResult<Void> change(@PathVariable Long shopId) {
|
||||
authorizationService.switchTo(shopId);
|
||||
return CzgResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue