cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java
@@ -26,6 +26,7 @@ import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -98,8 +99,19 @@ */ @ResponseBody @PostMapping("/worldCup/getWorldCupStoreListByStoreId") public List<WorldCupStore> getWorldCupStoreListByStoreId(@RequestBody Integer storeId){ return worldCupStoreService.list(new QueryWrapper<WorldCupStore>().eq("storeId", storeId)); public List<WorldCupStoreVO> getWorldCupStoreListByStoreId(@RequestBody Integer storeId){ List<WorldCupStoreVO> res = new ArrayList<>(); List<WorldCupStore> storeId1 = worldCupStoreService.list(new QueryWrapper<WorldCupStore>().eq("storeId", storeId)); for (WorldCupStore worldCupStore : storeId1) { WorldCupStoreVO worldCupStoreVO = new WorldCupStoreVO(); BeanUtils.copyProperties(worldCupStore,worldCupStoreVO); // 查询世界杯活动名称 WorldCup byId = worldCupService.getById(worldCupStore.getWorldCupId()); worldCupStoreVO.setName(byId.getName()); res.add(worldCupStoreVO); } return res; } /** * 根据门店id修改门店关系数据 cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/entity/WorldCupStore.java
cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/model/WorldCupStoreVO.java
New file @@ -0,0 +1,39 @@ package com.dsh.communityWorldCup.model; import lombok.Data; /** * 社区世界杯门店 * @author zhibing.pu * @Date 2024/2/18 18:06 */ @Data public class WorldCupStoreVO { /** * 主键 */ private Integer id; // 世界杯活动名称 private String name; /** * 世界杯id */ private Integer worldCupId; /** * 门店id */ private Integer storeId; /** * 是否开启世界杯按钮(0=否,1=是) */ private Integer isOpen; /** * 世界杯入口背景图 */ private String backgroundImage; /** * 排序 */ private Integer sort; } cloud-server-management/src/main/java/com/dsh/course/feignClient/communityWorldCup/Model/WorldCupStoreVO.java
New file @@ -0,0 +1,39 @@ package com.dsh.course.feignClient.communityWorldCup.Model; import lombok.Data; /** * 社区世界杯门店 * @author zhibing.pu * @Date 2024/2/18 18:06 */ @Data public class WorldCupStoreVO { /** * 主键 */ private Integer id; // 世界杯活动名称 private String name; /** * 世界杯id */ private Integer worldCupId; /** * 门店id */ private Integer storeId; /** * 是否开启世界杯按钮(0=否,1=是) */ private Integer isOpen; /** * 世界杯入口背景图 */ private String backgroundImage; /** * 排序 */ private Integer sort; } cloud-server-management/src/main/java/com/dsh/course/feignClient/communityWorldCup/WorldCupStoreClient.java
@@ -1,6 +1,7 @@ package com.dsh.course.feignClient.communityWorldCup; import com.dsh.course.feignClient.communityWorldCup.Model.WorldCupStore; import com.dsh.course.feignClient.communityWorldCup.Model.WorldCupStoreVO; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -45,7 +46,7 @@ * @return */ @PostMapping("/worldCup/getWorldCupStoreListByStoreId") List<WorldCupStore> getWorldCupStoreListByStoreId(Integer storeId); List<WorldCupStoreVO> getWorldCupStoreListByStoreId(Integer storeId); /** * 根据门店id修改门店关系数据 * @param worldCupStores cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java
@@ -11,6 +11,7 @@ import com.dsh.course.feignClient.account.model.CityListQuery; import com.dsh.course.feignClient.account.model.TCityManager; import com.dsh.course.feignClient.communityWorldCup.Model.WorldCupStore; import com.dsh.course.feignClient.communityWorldCup.Model.WorldCupStoreVO; import com.dsh.course.feignClient.communityWorldCup.WorldCupStoreClient; import com.dsh.course.feignClient.competition.CompetitionClient; import com.dsh.course.feignClient.other.model.Site; @@ -427,7 +428,7 @@ StoreConfig c8 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,8)); model.addAttribute("c8",c8); model.addAttribute("id",id); List<WorldCupStore> worldCupStores = worldCupStoreClient.getWorldCupStoreListByStoreId(id); List<WorldCupStoreVO> worldCupStores = worldCupStoreClient.getWorldCupStoreListByStoreId(id); if (CollectionUtils.isEmpty(worldCupStores)){ model.addAttribute("worldCupStores",new ArrayList<>()); }else{ cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
@@ -207,7 +207,7 @@ and t1.operatorId = #{operatorId} </if> <if test="storeName != null and storeName != ''"> and t1.name like CONCAT('%',#{storeName},'%') and t2.name like CONCAT('%',#{storeName},'%') </if> </select> cloud-server-management/src/main/webapp/WEB-INF/view/system/tHomeModule/tHomeModule.html
@@ -86,11 +86,13 @@ <#avatar id="backgroundImage" name="" value ="${data.backgroundImage}" avatarImg="${data.backgroundImage}"/> </div> </div> <div class="form-group"> <div class="form-group" style="display: flex"> <label class="col-sm-3 control-label">按钮样式:</label> <div class="col-sm-9" style="display: flex;"> <#avatar id="buttonImage" name="" value ="${data.buttonImage}" avatarImg="${data.buttonImage}"/> <span id = "imgPX">推荐像素: 522px x 80px</span> </div> </div> @if(roleType == 1){ <div class="form-group"> cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_imgAll.html
@@ -191,7 +191,8 @@ <div class="col-lg-6" style=""> <div class="form-group" style="margin-left: 96px"> <label class="col-sm-4 control-label" > 社区世界杯:<input type="radio" name="${obj.id}" value="1" ${obj.isOpen == 1 ? 'checked' : ''}>开启 <input type="radio" name="${obj.id}" value="0" ${obj.isOpen == 0 ? 'checked' : ''}>关闭 ${worldCupStores.name}:<input type="radio" name="${obj.id}" value="1" ${obj.isOpen == 1 ? 'checked' : ''}>开启 <input type="radio" name="${obj.id}" value="0" ${obj.isOpen == 0 ? 'checked' : ''}>关闭 </label> </div> <div class="form-group">