From baf8c2142cfbff2e9191db4dedf3f33060492c96 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Mon, 07 Jul 2025 16:37:13 +0800
Subject: [PATCH] feat(mall): 新增设计衣服社区功能
---
src/main/java/cc/mrbird/febs/mall/controller/clothes/ViewClothesTypeController.java | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 104 insertions(+), 0 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/controller/clothes/ViewClothesTypeController.java b/src/main/java/cc/mrbird/febs/mall/controller/clothes/ViewClothesTypeController.java
index e5ca549..5163636 100644
--- a/src/main/java/cc/mrbird/febs/mall/controller/clothes/ViewClothesTypeController.java
+++ b/src/main/java/cc/mrbird/febs/mall/controller/clothes/ViewClothesTypeController.java
@@ -46,9 +46,113 @@
private final ClothesTypePatternMapper clothesTypePatternMapper;
private final ClothesTypeLocationMapper clothesTypeLocationMapper;
private final ClothesOrderMapper clothesOrderMapper;
+ private final ClothesSocialCategoryMapper clothesSocialCategoryMapper;
+ private final ClothesSocialMapper clothesSocialMapper;
+ private final ClothesSocialMuseMapper clothesSocialMuseMapper;
+ private final ClothesSocialFileMapper clothesSocialFileMapper;
private final MallExpressInfoMapper mallExpressInfoMapper;
/**
+ * 社区分类列表
+ */
+ @GetMapping("groupList")
+ @RequiresPermissions("groupList:view")
+ public String groupList() {
+
+ return FebsUtil.view("modules/clothesType/groupList");
+ }
+
+ /**
+ * 社区分类新增
+ * @return
+ */
+ @GetMapping(value = "/groupAdd")
+ @RequiresPermissions("groupAdd:add")
+ public String groupAdd() {
+
+ return FebsUtil.view("modules/clothesType/groupAdd");
+ }
+
+ /**
+ * 社区分类编辑
+ * @param id
+ * @param model
+ * @return
+ */
+ @GetMapping("groupInfo/{id}")
+ @RequiresPermissions("groupInfo:view")
+ public String groupInfo(@PathVariable long id, Model model) {
+
+ ClothesSocialCategory clothesSocialCategory = clothesSocialCategoryMapper.selectById(id);
+ model.addAttribute("voteActivityGroup", clothesSocialCategory);
+ return FebsUtil.view("modules/clothesType/groupInfo");
+ }
+
+ /**
+ * 社区列表
+ */
+ @GetMapping("socialList")
+ @RequiresPermissions("socialList:view")
+ public String socialList() {
+
+ return FebsUtil.view("modules/clothesType/socialList");
+ }
+
+ /**
+ * 社区-新增
+ */
+ @GetMapping("socialAdd")
+ @RequiresPermissions("socialAdd:add")
+ public String socialAdd() {
+ return FebsUtil.view("modules/clothesType/socialAdd");
+ }
+
+ /**
+ * 社区-修改
+ */
+ @GetMapping("socialUpdate/{id}")
+ @RequiresPermissions("socialUpdate:update")
+ public String socialUpdate(@PathVariable long id, Model model) {
+ ClothesSocial clothesSocial = clothesSocialMapper.selectById(id);
+ List<ClothesSocialFile> clothesSocialFiles = clothesSocialFileMapper.selectList(
+ Wrappers.lambdaQuery(ClothesSocialFile.class)
+ .eq(ClothesSocialFile::getSocialId, id)
+ );
+ if(CollUtil.isNotEmpty(clothesSocialFiles)){
+ clothesSocial.setImages(clothesSocialFiles.stream().map(ClothesSocialFile::getFileUrl).collect(Collectors.toList()));
+ }
+ ClothesSocialMuse clothesSocialMuse = clothesSocialMuseMapper.selectOne(
+ Wrappers.lambdaQuery(ClothesSocialMuse.class)
+ .eq(ClothesSocialMuse::getSocialId, clothesSocial.getId())
+ .last("LIMIT 1")
+ );
+ if(ObjectUtil.isNotNull(clothesSocialMuse)){
+ clothesSocial.setTypeId(clothesSocialMuse.getTypeId());
+ }
+ model.addAttribute("activity", clothesSocial);
+
+ return FebsUtil.view("modules/clothesType/socialUpdate");
+ }
+
+ /**
+ * 社区-灵感
+ */
+ @GetMapping("socialMuseUpdate/{id}")
+ @RequiresPermissions("socialMuseUpdate:update")
+ public String socialMuseUpdate(@PathVariable long id, Model model) {
+ ClothesSocial clothesSocial = clothesSocialMapper.selectById(id);
+
+ ClothesSocialMuse clothesSocialMuse = clothesSocialMuseMapper.selectOne(
+ Wrappers.lambdaQuery(ClothesSocialMuse.class)
+ .eq(ClothesSocialMuse::getSocialId, clothesSocial.getId())
+ .last("LIMIT 1")
+ );
+ model.addAttribute("socialMuse", clothesSocialMuse);
+
+ return FebsUtil.view("modules/clothesType/socialMuseUpdate");
+ }
+
+ /**
* 订单列表
*/
@GetMapping("orderList")
--
Gitblit v1.9.1