Hentua
2023-04-20 e73a8aac21ee8a68fa6d8efb998de25552318ce3
src/main/java/cc/mrbird/febs/mall/controller/ViewMallShopController.java
@@ -2,10 +2,13 @@
import cc.mrbird.febs.common.entity.FebsConstant;
import cc.mrbird.febs.common.utils.FebsUtil;
import cc.mrbird.febs.mall.service.IMallShopService;
import lombok.RequiredArgsConstructor;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller("shopView")
@@ -13,6 +16,8 @@
@RequiredArgsConstructor
public class ViewMallShopController {
    private final IMallShopService mallShopService;
    @GetMapping("/shopList")
    @RequiresPermissions("shop:view")
@@ -29,8 +34,9 @@
    @RequiresPermissions("shop:update")
    @GetMapping("update")
    public String update() {
    @GetMapping("update/{id}")
    public String update(@PathVariable("id") Long id, Model model) {
        model.addAttribute("shopInfo", mallShopService.getById(id));
        return FebsUtil.view("modules/shop/update");
    }