| | |
| | | import cc.mrbird.febs.common.entity.FebsConstant; |
| | | import cc.mrbird.febs.common.utils.FebsUtil; |
| | | import cc.mrbird.febs.dapp.dto.HlmBasicPerkDto; |
| | | import cc.mrbird.febs.dapp.entity.DataDictionaryCustom; |
| | | import cc.mrbird.febs.dapp.entity.MallGoods; |
| | | import cc.mrbird.febs.dapp.entity.*; |
| | | import cc.mrbird.febs.dapp.enumerate.DataDictionaryEnum; |
| | | import cc.mrbird.febs.dapp.mapper.DataDictionaryCustomMapper; |
| | | import cc.mrbird.febs.dapp.service.IAdminMallGoodsService; |
| | | import cc.mrbird.febs.dapp.service.IMallNewsInfoService; |
| | | import cc.mrbird.febs.dapp.vo.AdminMallGoodsCategoryVo; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | |
| | | private final IAdminMallGoodsService mallGoodsService; |
| | | private final DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | |
| | | /** |
| | | * 商品分类-新增 |
| | | * @return |
| | | */ |
| | | @GetMapping("categoryAdd") |
| | | @RequiresPermissions("categoryAdd:add") |
| | | public String helpCenterAdd() { |
| | | return FebsUtil.view("goods/categoryAdd"); |
| | | } |
| | | |
| | | /** |
| | | * 商品分类-详情 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("categoryUpdate/{id}") |
| | | @RequiresPermissions("categoryUpdate:update") |
| | | public String detail(@PathVariable long id, Model model) { |
| | | AdminMallGoodsCategoryVo data = mallGoodsService.getMallGoodsCategoryInfoById(id); |
| | | model.addAttribute("goodsCategoryVo", data); |
| | | return FebsUtil.view("goods/categoryUpdate"); |
| | | } |
| | | /** |
| | | * 商品分类列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("categoryList") |
| | | @RequiresPermissions("categoryList:view") |
| | | public String categoryList() { |
| | | return FebsUtil.view("goods/categoryList"); |
| | | } |
| | | /** |
| | | * 商品列表 |
| | | * @return |
| | |
| | | model.addAttribute("hlmBasicPerk", hlmBasicPerkDto); |
| | | return FebsUtil.view("goods/basicPerkSetting"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 轮播图---列表 |
| | | */ |
| | | @GetMapping("platformBanner") |
| | | @RequiresPermissions("platformBanner:view") |
| | | public String platformBanner() { |
| | | return FebsUtil.view("goods/platformBanner"); |
| | | } |
| | | |
| | | /** |
| | | * 轮播图---修改 |
| | | */ |
| | | @GetMapping("platformBannerUpdate/{id}") |
| | | @RequiresPermissions("platformBannerUpdate:update") |
| | | public String platformBannerUpdate(@PathVariable long id, Model model) { |
| | | PlatformBanner data = mallGoodsService.selectPlatformBannerById(id); |
| | | model.addAttribute("member", data); |
| | | return FebsUtil.view("goods/platformBannerDetail"); |
| | | } |
| | | |
| | | /** |
| | | * 轮播图---新增 |
| | | */ |
| | | @GetMapping("platformBannerAdd") |
| | | @RequiresPermissions("platformBannerAdd:add") |
| | | public String platformBannerAdd() { |
| | | return FebsUtil.view("goods/platformBannerAdd"); |
| | | } |
| | | |
| | | |
| | | |
| | | private final IMallNewsInfoService mallNewsInfoService; |
| | | |
| | | /** |
| | | * 新闻中心-列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("newsInfoList") |
| | | @RequiresPermissions("newsInfoList:view") |
| | | public String newsInfoList() { |
| | | return FebsUtil.view("goods/newsInfoList"); |
| | | } |
| | | |
| | | /** |
| | | * 新闻中心-新增 |
| | | * @return |
| | | */ |
| | | @GetMapping("newsInfoAdd") |
| | | @RequiresPermissions("newsInfoAdd:add") |
| | | public String newsInfoAdd() { |
| | | return FebsUtil.view("goods/newsInfoAdd"); |
| | | } |
| | | |
| | | /** |
| | | * 新闻中心-详情 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("newsInfoUpdate/{id}") |
| | | @RequiresPermissions("newsInfoUpdate:update") |
| | | public String newsInfoUpdate(@PathVariable long id, Model model) { |
| | | MallNewsInfo data = mallNewsInfoService.getNewsInfoById(id); |
| | | model.addAttribute("newsInfo", data); |
| | | return FebsUtil.view("goods/newsInfoUpdate"); |
| | | } |
| | | |
| | | @GetMapping("newsCategory") |
| | | @RequiresPermissions("news:category:view") |
| | | public String newsCategory() { |
| | | return FebsUtil.view("goods/newsCategory"); |
| | | } |
| | | |
| | | @GetMapping("addCategory") |
| | | @RequiresPermissions("news:category:add") |
| | | public String addCategory(Long id, Model model) { |
| | | if (id != null) { |
| | | MallNewsCategory obj = mallNewsInfoService.findNewsCategoryById(id); |
| | | model.addAttribute("obj", obj); |
| | | } |
| | | return FebsUtil.view("goods/newsCategoryAdd"); |
| | | } |
| | | |
| | | @GetMapping("updateCategory/{id}") |
| | | @RequiresPermissions("news:category:update") |
| | | public String updateCategory(@PathVariable Long id, Model model) { |
| | | if (id != null) { |
| | | MallNewsCategory obj = mallNewsInfoService.findNewsCategoryById(id); |
| | | model.addAttribute("obj", obj); |
| | | } |
| | | return FebsUtil.view("goods/newsCategoryAdd"); |
| | | } |
| | | } |