huliguo
4 天以前 22b2f11edc2f4ee164ba5482bd193c7fb99c0f4f
商品管理、基础设置、经销商加盟商
11个文件已添加
39个文件已修改
866 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/poji/shop/Shop.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteRegionFallbackFactory.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteShopFallbackFactory.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/service/RemoteRegionService.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/service/RemoteShopService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-system/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/management/MgtGoodsController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/domain/dto/MgtGoodsPageDto.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/domain/dto/PageShopMgtGoodsDTO.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/domain/vo/PageShopMgtGoodsVO.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/mapper/goods/GoodsMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/goods/GoodsService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/goods/GoodsServiceImpl.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-goods/src/main/resources/mapper/goods/GoodsMapper.xml 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/dto/MgtEditShopDto.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/vo/MgtShopInfoVo.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/mapper/shop/ShopMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/shop/ShopService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopMapper.xml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/management/MgtConfigController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/miniapp/AppHomeController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/BottomNavDto.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MgtAdvertEditDto.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MgtBannerEditDto.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MgtPopEditDto.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MgtQuickEntryEditDto.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/Advert.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/Banner.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/BottomNav.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/Pop.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/QuickEntry.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/AppAdvertVo.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/AppBottomNavVO.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/AppPopVo.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MgtAllCustomConfigVo.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MgtBannerGetVo.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MgtPopGetVo.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MgtQuickEntryGetVo.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/config/BottomNavMapper.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/config/BottomNavService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/AdvertServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/BannerServiceImpl.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/BottomNavServiceImpl.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/QuickEntryServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/BottomNavMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/PopMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/QuickEntryMapper.xml 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/poji/shop/Shop.java
@@ -291,23 +291,29 @@
     */
    @TableField("shop_code")
    private String shopCode;
    /**
     * 小鹅通讲师id
     */
    @TableField("xiaoe_user_id")
    private String xiaoeUserId;
    /**
     * 预约状态(0=关,1=开)
     */
    @TableField("subscribe")
    private Integer subscribe;
    /**
     * 修改价格权限(0=关,1=开)
     */
    @TableField("modify_price_permission")
    private Integer modifyPricePermission;
    @Override
    protected Serializable pkVal() {
        return this.shopId;
    }
}
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteRegionFallbackFactory.java
New file
@@ -0,0 +1,42 @@
package com.ruoyi.system.api.factory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.domain.dto.AGStockChangeDto;
import com.ruoyi.system.api.domain.dto.ActivityGoodsGetDto;
import com.ruoyi.system.api.domain.dto.ActivityTotalChangeDto;
import com.ruoyi.system.api.domain.dto.MerActivityShopDto;
import com.ruoyi.system.api.domain.poji.activity.Activity;
import com.ruoyi.system.api.domain.poji.activity.ActivityGoods;
import com.ruoyi.system.api.domain.poji.activity.ActivityRecord;
import com.ruoyi.system.api.domain.vo.ActivityGoodsGetVo;
import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo;
import com.ruoyi.system.api.service.RemoteActivityService;
import com.ruoyi.system.api.service.RemoteRegionService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import java.util.List;
/**
 * 省市区三级联动服务
 *
 * @author jqs
 */
@Component
public class RemoteRegionFallbackFactory implements FallbackFactory<RemoteRegionService>
{
    private static final Logger log = LoggerFactory.getLogger(RemoteRegionFallbackFactory.class);
    @Override
    public RemoteRegionService create(Throwable throwable)
    {
        log.error("省市区三级联动服务:{}", throwable.getMessage());
        return new RemoteRegionService()
        {
        };
    }
}
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteShopFallbackFactory.java
@@ -14,6 +14,7 @@
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.Collections;
import java.util.List;
/**
@@ -156,6 +157,11 @@
            public List<Shop> getShopBySysUserIds(BoardMemberTotalDto boardMemberTotalDto) {
                return null;
            }
            @Override
            public List<Shop> getFranchiseeIdsBYDealerId(Long shopId) {
                return Collections.emptyList();
            }
        };
    }
}
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/service/RemoteRegionService.java
New file
@@ -0,0 +1,33 @@
package com.ruoyi.system.api.service;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.domain.dto.AGStockChangeDto;
import com.ruoyi.system.api.domain.dto.ActivityGoodsGetDto;
import com.ruoyi.system.api.domain.dto.ActivityTotalChangeDto;
import com.ruoyi.system.api.domain.dto.MerActivityShopDto;
import com.ruoyi.system.api.domain.poji.activity.Activity;
import com.ruoyi.system.api.domain.poji.activity.ActivityGoods;
import com.ruoyi.system.api.domain.poji.activity.ActivityRecord;
import com.ruoyi.system.api.domain.vo.ActivityGoodsGetVo;
import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo;
import com.ruoyi.system.api.factory.RemoteActivityFallbackFactory;
import com.ruoyi.system.api.factory.RemoteRegionFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
 * @author jqs34
 * @version 1.0
 * @classname RemoteRegionService
 * @description: TODO
 * @date 2023 2025/6/12 15:12
 */
@FeignClient(contextId = "remoteRegionService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteRegionFallbackFactory.class)
public interface RemoteRegionService {
}
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/service/RemoteShopService.java
@@ -208,4 +208,12 @@
     */
    @PostMapping("/shop/getShopBySysUserIds")
    List<Shop> getShopBySysUserIds(@RequestBody BoardMemberTotalDto boardMemberTotalDto);
    /**
     * 根据经销商id查询加盟商ids
     * @param shopId
     * @return
     */
    @PostMapping("/shop/getFranchiseeIdsBYDealerId")
    List<Shop> getFranchiseeIdsBYDealerId(@RequestBody Long shopId);
}
ruoyi-api/ruoyi-api-system/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -9,3 +9,4 @@
com.ruoyi.system.api.factory.RemoteUserFallbackFactory
com.ruoyi.system.api.factory.RemoteMemberFallbackFactory
com.ruoyi.system.api.factory.RemoteStaffFallbackFactory
com.ruoyi.system.api.factory.RemoteRegionFallbackFactory
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/management/MgtGoodsController.java
@@ -10,6 +10,7 @@
import com.ruoyi.goods.domain.vo.MgtGoodsEditInfoVo;
import com.ruoyi.goods.domain.vo.MgtGoodsPageVo;
import com.ruoyi.goods.domain.vo.MgtGoodsTotalVo;
import com.ruoyi.goods.domain.vo.PageShopMgtGoodsVO;
import com.ruoyi.goods.service.goods.GoodsService;
import com.ruoyi.system.api.domain.dto.MgtBaseGetDto;
import com.ruoyi.system.api.domain.vo.MgtSelectGoodsPageVo;
@@ -131,4 +132,17 @@
        MgtGoodsEditInfoVo mgtGoodsEditInfoVo = goodsService.getMgtGoodsEditInfo(mgtBaseGetDto);
        return R.ok(mgtGoodsEditInfoVo);
    }
    @RequestMapping(value = "/pageShopMgtGoods", method = RequestMethod.POST)
    @ApiOperation(value = "分页获取门店内商品信息",tags = "管理台商户相关接口")
    public R<Page<PageShopMgtGoodsVO>> pageShopMgtGoods(@RequestBody PageShopMgtGoodsDTO pageShopMgtGoodsDTO) {
        Page<PageShopMgtGoodsVO> page = new Page<>();
        page.setSize(pageShopMgtGoodsDTO.getPageSize());
        page.setCurrent(pageShopMgtGoodsDTO.getPageNum());
        page.setOptimizeCountSql(false);
        List<PageShopMgtGoodsVO> pageShopMgtGoods = goodsService.pageShopMgtGoods(page,pageShopMgtGoodsDTO);
        return R.ok(page.setRecords(pageShopMgtGoods));
    }
    //修改价格 转为经销商
}
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/domain/dto/MgtGoodsPageDto.java
@@ -28,4 +28,8 @@
    @ApiModelProperty(value = "创建时间")
    private String createEndTime;
    @ApiModelProperty(value = "商品状态-1删除1上架2下架")
    private Integer goodsStatus;
}
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/domain/dto/PageShopMgtGoodsDTO.java
New file
@@ -0,0 +1,44 @@
package com.ruoyi.goods.domain.dto;
import com.ruoyi.system.api.domain.dto.MgtPageDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * @author jqs34
 * @ClassName MerGoodsPageDto
 * @description: TODO
 * @date 2023年05月04日
 * @version: 1.0
 */
@Data
public class PageShopMgtGoodsDTO extends MgtPageDto {
    @ApiModelProperty(value = "商品名称")
    private String goodsName;
    @ApiModelProperty(value = "商品类型1周期2服务3体验4单品")
    private Integer goodsType;
    @ApiModelProperty(value = "商品分类id")
    private Long goodsClassId;
    @ApiModelProperty(value = "创建时间")
    private String createStartTime;
    @ApiModelProperty(value = "创建时间")
    private String createEndTime;
    @ApiModelProperty(value = "商品状态-1删除1上架2下架")
    private Integer goodsStatus;
    @ApiModelProperty(value = "所属门店")
    private String shopName;
    @ApiModelProperty(value = "商户id")
    private Long shopId;
    private List<Long> shopIds;
}
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/domain/vo/PageShopMgtGoodsVO.java
New file
@@ -0,0 +1,80 @@
package com.ruoyi.goods.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
 * @author huliguo
 * @ClassName PageShopMgtGoodsVO
 * @description: TODO
 * @date 2025年06月13日
 * @version: 2.0
 */
@Data
public class PageShopMgtGoodsVO {
    @Excel(name = "序号", width = 30, sort = 1)
    @ApiModelProperty(value = "商品id")
    private String goodsId;
    @Excel(name = "商品名称", width = 30, sort = 3)
    @ApiModelProperty(value = "商品名称")
    private String goodsName;
    @Excel(name = "商品简介", width = 30, sort = 4)
    @ApiModelProperty(value = "商品简介")
    private String goodsIntroduction;
    @Excel(name = "所属分类", width = 30, sort = 6)
    @ApiModelProperty(value = "商品分类")
    private String goodsClass;
    @Excel(name = "标签", width = 30, sort = 7)
    @ApiModelProperty(value = "商品标签")
    private String goodsTags;
    @Excel(name = "商品封面", width = 30, sort = 2)
    @ApiModelProperty(value = "商品图片")
    private String goodsPicture;
    @Excel(name = "商品类型", width = 30, sort = 6)
    @ApiModelProperty(value = "商品类型1周期2服务3体验4单品")
    private String goodsType;
    @Excel(name = "建议售价", width = 30, sort = 8)
    @ApiModelProperty(value = "商品建议售价")
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal suggestSalesPrice;;
    @Excel(name = "门店售价", width = 30, sort = 9)
    @ApiModelProperty(value = "门店售价")
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal shopPrice;;
    @Excel(name = "所属门店", width = 30, sort = 10)
    @ApiModelProperty(value = "所属门店")
    private String shopName;
    @Excel(name = "状态", width = 30, sort = 13)
    @ApiModelProperty(value = "商品状态")
    private String goodsStatus;
    @Excel(name = "创建时间", width = 30, dateFormat  = "yyyy-MM-dd HH:mm:ss", sort = 14)
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @ApiModelProperty("修改价格权限(0=关,1=开)")
    private Integer modifyPricePermission;
    private Long shopId;
}
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/mapper/goods/GoodsMapper.java
@@ -159,4 +159,6 @@
     * @return  List<String>
     */
    List<String> listGoodsNameByGoodsClass(@Param("classId") Long classId);
    List<PageShopMgtGoodsVO> pageShopMgtGoods(Page<PageShopMgtGoodsVO> page,@Param("dto") PageShopMgtGoodsDTO dto);
}
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/goods/GoodsService.java
@@ -211,4 +211,13 @@
     * @return  List<String>
     */
    List<String> listGoodsNameByGoodsClass(Long classId);
    /**
     * @description  分页获取门店内的商品信息
     * @author huliguo
     * @date 2025/6/13
     * @param pageShopMgtGoodsDTO
     * @return List<PageShopMgtGoodsVO>
     */
    List<PageShopMgtGoodsVO> pageShopMgtGoods(Page<PageShopMgtGoodsVO> page, PageShopMgtGoodsDTO pageShopMgtGoodsDTO);
}
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/goods/GoodsServiceImpl.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.exception.ServiceException;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.utils.bean.BeanUtils;
@@ -30,9 +31,12 @@
import com.ruoyi.system.api.domain.poji.goods.Goods;
import com.ruoyi.system.api.domain.poji.goods.GoodsFile;
import com.ruoyi.system.api.domain.poji.goods.ShopGoods;
import com.ruoyi.system.api.domain.poji.shop.Shop;
import com.ruoyi.system.api.domain.vo.MerGoodsPriceListVo;
import com.ruoyi.system.api.domain.vo.MgtSelectGoodsPageVo;
import com.ruoyi.system.api.domain.vo.ShopRelUserVo;
import com.ruoyi.system.api.service.RemoteConfigService;
import com.ruoyi.system.api.service.RemoteShopService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -75,6 +79,9 @@
    @Resource
    private ActivityRecordService activityRecordService;
    @Resource
    private RemoteShopService remoteShopService;
    /**
    * @description 获取推荐商品列表
@@ -672,4 +679,66 @@
        List<String> goodsNameList = goodsMapper.listGoodsNameByGoodsClass(classId);
        return goodsNameList;
    }
    @Override
    public List<PageShopMgtGoodsVO> pageShopMgtGoods(Page<PageShopMgtGoodsVO> page,PageShopMgtGoodsDTO pageShopMgtGoodsDTO) {
        //1.查找门店
        Shop shop = remoteShopService.getShop(pageShopMgtGoodsDTO.getShopId()).getData();
        if (null == shop || shop.getDelFlag() != 0) {
            return Collections.emptyList();
        }
        List<Shop> shops = new ArrayList<>();
        //2.判断门店是否经销商
        if (shop.getShopType()==1){
            //经销商 获取下级-加盟商ids
            shops = remoteShopService.getFranchiseeIdsBYDealerId(shop.getShopId());
        }
        //将该门店加入
        shops.add(shop);
        List<Long> shopIds = shops.stream().map(Shop::getShopId).collect(Collectors.toList());
        //查询信息
        pageShopMgtGoodsDTO.setShopIds(shopIds);
        //3.根据shopId查询商品信息
        List<PageShopMgtGoodsVO> list= goodsMapper.pageShopMgtGoods(page,pageShopMgtGoodsDTO);
        if (list != null && !list.isEmpty()) {
            //4.商品分类
            // 获取所有商品分类的ID
            List<Long> goodsClassIds = list.stream()
                    .map(PageShopMgtGoodsVO::getGoodsClass)
                    .map(Long::valueOf)
                    .collect(Collectors.toList());
            // 通过远程服务获取商品分类
            Map<Long, SysClassification> sysClassificationMap = remoteConfigService.getSysClassificationList(goodsClassIds).getData();
            // 遍历所有商品
            list.forEach(mgtGoodsPageVo -> {
                // 获取商品分类
                SysClassification sysClassification = sysClassificationMap.get(Long.valueOf(mgtGoodsPageVo.getGoodsClass()));
                // 如果商品分类不为空,则设置商品分类名称
                if (sysClassification != null) {
                    mgtGoodsPageVo.setGoodsClass(sysClassification.getClassName());
                }
            });
            Map<Long, Shop> shopMap = shops.stream()
                    .collect(Collectors.toMap(
                            Shop::getShopId,            // 键映射函数
                            shop1 -> shop1        // 值映射函数
                    ));
            //5.门店信息
            list.forEach(mgtGoodsPageVo -> {
                // 获取门店信息
                Shop shopInfo = shopMap.get(Long.valueOf(mgtGoodsPageVo.getShopId()));
                // 如果门店信息不为空,则设置门店信息
                if (shopInfo != null) {
                    mgtGoodsPageVo.setShopName(shopInfo.getShopName());
                    mgtGoodsPageVo.setModifyPricePermission(shop.getModifyPricePermission());
                }
            });
        }
        return list;
    }
}
ruoyi-modules/ruoyi-goods/src/main/resources/mapper/goods/GoodsMapper.xml
@@ -413,6 +413,9 @@
        <if test="param.goodsName != null and param.goodsName != ''">
            AND tg.goods_name LIKE CONCAT('%',#{param.goodsName},'%')
        </if>
        <if test="param.goodsStatus != null and param.goodsStatus != ''">
            AND tg.goods_status = #{param.goodsStatus}
        </if>
        ORDER BY tg.create_time DESC
    </select>
@@ -516,4 +519,58 @@
        FROM t_goods
        WHERE del_flag = 0 AND goods_class_id = #{classId}
    </select>
    <select id="pageShopMgtGoods" resultType="com.ruoyi.goods.domain.vo.PageShopMgtGoodsVO">
        select
            tg.goods_id,
            tg.goods_name,
            tg.goods_introduction,
            tg.goods_class_id,
            tg.goods_tags,
            tgf.file_url goodsPicture,
            CASE tg.goods_type
                WHEN 1 THEN "周期"
                WHEN 2 THEN "服务"
                WHEN 3 THEN "体验"
                WHEN 4 THEN "单品"
                END goodsType,
            tg.sales_price suggestSalesPrice,
            CASE tg.goods_status
                WHEN 1 THEN "上架中"
                WHEN 2 THEN "下架中"
                ELSE "下架中"
                END goodsStatus,
            tg.create_time,
            tsg.shop_id,
            tsg.sales_price shopPrice
        from t_goods tg
        LEFT JOIN t_goods_file tgf ON tg.goods_id = tgf.goods_id AND tgf.del_flag = 0 AND tgf.file_type = 1
        LEFT JOIN t_shop_goods tsg on tg.goods_id = tsg.goods_id and tsg.del_flag = 0
        WHERE tg.del_flag = 0
        <if test="dto.goodsType != null and dto.goodsType != ''">
            AND tg.goods_type = #{dto.goodsType}
        </if>
        <if test="dto.goodsClassId != null and dto.goodsClassId != ''">
            AND tg.goods_class_id = #{dto.goodsClassId}
        </if>
        <if test="dto.createStartTime!=null and dto.createStartTime != ''">
            AND Date(tg.create_time) &gt;= #{dto.createStartTime}
        </if>
        <if test="dto.createEndTime!=null and dto.createEndTime != ''">
            AND Date(tg.create_time) &lt;= #{dto.createEndTime}
        </if>
        <if test="dto.goodsName != null and dto.goodsName != ''">
            AND tg.goods_name LIKE CONCAT('%',#{dto.goodsName},'%')
        </if>
        <if test="dto.goodsStatus != null and dto.goodsStatus != ''">
            AND tg.goods_status = #{dto.goodsStatus}
        </if>
        <if test="dto.shopIds != null and dto.shopIds.size() > 0">
            AND tsg.shop_id IN
            <foreach collection="param.shopIds" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        ORDER BY tg.create_time DESC
    </select>
</mapper>
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java
@@ -445,4 +445,14 @@
    public List<Shop> getShopBySysUserIds(@RequestBody BoardMemberTotalDto boardMemberTotalDto){
        return shopService.getShopBySysUserIds(boardMemberTotalDto.getUserIds());
    }
    /**
     * 根据经销商id查询加盟商ids
     * @param shopId
     * @return
     */
    @PostMapping("/shop/getFranchiseeIdsBYDealerId")
    List<Shop> getFranchiseeIdsBYDealerId(@RequestBody Long shopId){
        return shopService.getFranchiseeIdsBYDealerId(shopId);
    }
}
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/dto/MgtEditShopDto.java
@@ -45,16 +45,16 @@
    @ApiModelProperty(value="店主联系方式")
    private String shopownerPhone;
    @ApiModelProperty(value="签约省区域")
    @ApiModelProperty(value="签约省区域(多个以分号相隔)")
    private String signProvinceCode;
    @ApiModelProperty(value="签约市区域")
    @ApiModelProperty(value="签约市区域(多个以分号相隔)")
    private String signCityCode;
    @ApiModelProperty(value="签约区域")
    @ApiModelProperty(value="签约区域(多个以分号相隔)")
    private String signAreaCode;
    @ApiModelProperty(value="签约区域全称")
    @ApiModelProperty(value="签约区域全称(多个以分号相隔)")
    private String signAreaName;
    @ApiModelProperty(value="商户服务电话")
@@ -142,4 +142,7 @@
    @ApiModelProperty(value="小鹅通讲师id 多个用,隔开")
    private String xiaoeUserId;
    @ApiModelProperty("修改价格权限(0=关,1=开)")
    private Integer modifyPricePermission;
}
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/vo/MgtShopInfoVo.java
@@ -152,7 +152,8 @@
    @ApiModelProperty(value="小鹅通讲师id 多个用,隔开")
    private String xiaoeUserId;
    @ApiModelProperty("修改价格权限(0=关,1=开)")
    private Integer modifyPricePermission;
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/mapper/shop/ShopMapper.java
@@ -293,4 +293,6 @@
     * @return  List<Long>
     */
    List<Shop> listShopByCityCode(@Param("cityCodes")List<String> cityCodes);
    List<Shop> getFranchiseeIdsBYDealerId(@Param("shopId")Long shopId);
}
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
@@ -1951,4 +1951,9 @@
        List<Shop> list = this.list(queryWrapper);
        return list;
    }
    @Override
    public List<Shop> getFranchiseeIdsBYDealerId(Long shopId) {
        return shopMapper.getFranchiseeIdsBYDealerId(shopId);
    }
}
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/shop/ShopService.java
@@ -461,4 +461,11 @@
     * @return
     */
    List<Shop> getShopBySysUserIds(List<Long> userIds);
    /**
     * 根据经销商id查询加盟商ids
     * @param shopId
     * @return
     */
    List<Shop> getFranchiseeIdsBYDealerId(Long shopId);
}
ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopMapper.xml
@@ -53,6 +53,8 @@
        <result property="shopSource"    column="shop_source"    />
        <result property="frozenFlag"    column="frozen_flag"    />
        <result property="cooperativeFlag"    column="cooperative_flag"    />
        <result property="modifyPricePermission"    column="modify_price_permission"    />
    </resultMap>
    <sql id="selectShopVo">
@@ -108,6 +110,7 @@
            <if test="shopSource != null  and shopSource != ''"> and shop_source = #{shopSource}</if>
            <if test="frozenFlag != null  and frozenFlag != ''"> and frozen_flag = #{frozenFlag}</if>
            <if test="cooperativeFlag != null  and cooperativeFlag != ''"> and cooperative_flag = #{cooperativeFlag}</if>
            <if test="modifyPricePermission != null and modifyPricePermission != ''">and modify_price_permission = #{modifyPricePermission}</if>
        </where>
    </select>
@@ -166,6 +169,7 @@
            <if test="shopTags != null">shop_tags,</if>
            <if test="signUserId != null">sign_user_id,</if>
            <if test="shopSource != null">shop_source,</if>
            <if test="modifyPricePermission != null">modify_price_permission,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="delFlag != null">#{delFlag},</if>
@@ -215,6 +219,7 @@
            <if test="shopTags != null">#{shopTags},</if>
            <if test="signUserId != null">#{signUserId},</if>
            <if test="shopSource != null">#{shopSource},</if>
            <if test="modifyPricePermission != null">#{modifyPricePermission},</if>
        </trim>
    </insert>
@@ -268,6 +273,7 @@
            <if test="shopTags != null">shop_tags = #{shopTags},</if>
            <if test="signUserId != null">sign_user_id = #{signUserId},</if>
            <if test="shopSource != null">shop_source = #{shopSource},</if>
            <if test="modifyPricePermission != null">modify_price_permission = #{modifyPricePermission},</if>
        </trim>
        where shop_id = #{shopId}
    </update>
@@ -332,13 +338,13 @@
            AND Date(ts.sign_time) &lt;= #{param.signEndTime}
        </if>
        <if test="param.signProvinceCode!=null and param.signProvinceCode!=''">
            AND ts.sign_province_code = #{param.signProvinceCode}
            AND ts.sign_province_code REGEXP CONCAT('(^|;)' , #{param.signProvinceCode} , '(;|$)')   -- 正则表达式 (^|;) 匹配字符串开头或分号,(;|$) 匹配分号或字符串结尾。
        </if>
        <if test="param.signCityCode!=null and param.signCityCode!=''">
            AND ts.sign_city_code = #{param.signCityCode}
            AND ts.sign_city_code = REGEXP CONCAT('(^|;)' ,#{param.signCityCode} , '(;|$)')
        </if>
        <if test="param.signAreaCode!=null and param.signAreaCode!=''">
            AND ts.sign_area_code = #{param.signAreaCode}
            AND ts.sign_area_code = REGEXP CONCAT('(^|;)' ,#{param.signAreaCode}, '(;|$)')
        </if>
        <if test="param.shopStatus!=null and param.shopStatus==0">
            AND ts.frozen_flag = 1
@@ -939,13 +945,13 @@
            AND Date(ts.sign_time) &lt;= #{param.signEndTime}
        </if>
        <if test="param.signProvinceCode!=null and param.signProvinceCode!=''">
            AND ts.sign_province_code = #{param.signProvinceCode}
            AND ts.sign_province_code = REGEXP CONCAT('(^|;)' ,#{param.signProvinceCode}, '(;|$)')
        </if>
        <if test="param.signCityCode!=null and param.signCityCode!=''">
            AND ts.sign_city_code = #{param.signCityCode}
            AND ts.sign_city_code = REGEXP CONCAT('(^|;)' ,#{param.signCityCode}, '(;|$)')
        </if>
        <if test="param.signAreaCode!=null and param.signAreaCode!=''">
            AND ts.sign_area_code = #{param.signAreaCode}
            AND ts.sign_area_code = REGEXP CONCAT('(^|;)' ,#{param.signAreaCode}, '(;|$)')
        </if>
        <if test="param.recommendPerson!=null and param.recommendPerson!=''">
            AND ts.recommend_person = #{param.recommendPerson}
@@ -1074,4 +1080,14 @@
        GROUP BY userId
    </select>
    <select id="getFranchiseeIdsBYDealerId" resultType="com.ruoyi.system.api.domain.poji.shop.Shop">
        select
            *
        from t_shop
        where
            del_flag=0
          and
            belong_shop_id = #{shopId}
    </select>
</mapper>
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/management/MgtConfigController.java
@@ -12,6 +12,7 @@
import com.ruoyi.system.api.domain.dto.MgtPageDto;
import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo;
import com.ruoyi.system.domain.dto.*;
import com.ruoyi.system.domain.pojo.config.BottomNav;
import com.ruoyi.system.domain.vo.*;
import com.ruoyi.system.service.config.*;
import io.swagger.annotations.Api;
@@ -77,6 +78,9 @@
    @Resource
    private RecommendCooperationService recommendCooperationService;
    @Resource
    private BottomNavService bottomNavService;
    @RequestMapping(value = "/getCustomConfig", method = RequestMethod.POST)
@@ -235,6 +239,18 @@
        return R.ok();
    }
    @RequestMapping(value = "/getBottomNav", method = RequestMethod.GET)
    @ApiOperation(value = "获取底部导航栏配置数据")
    public R<List<BottomNav>> getBottomNav() {
        List<BottomNav> list = bottomNavService.getAllBottomNav();
        return R.ok(list);
    }
    @RequestMapping(value = "/editBottomNav", method = RequestMethod.PUT)
    @ApiOperation(value = "获取底部导航栏配置数据")
    public R<Void> editBottomNav(@RequestBody BottomNavDto bottomNavDto) {
        return bottomNavService.editBottomNav(bottomNavDto);
    }
    @RequestMapping(value = "/pageQuickEntry", method = RequestMethod.POST)
    @ApiOperation(value = "分页获取快速入口")
    public R<Page<MgtQuickEntryPageVo>> pageQuickEntry(@RequestBody MgtPageDto mgtPageDto) {
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/miniapp/AppHomeController.java
@@ -1,14 +1,8 @@
package com.ruoyi.system.controller.miniapp;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.domain.vo.AppAdvertVo;
import com.ruoyi.system.domain.vo.AppBannerVo;
import com.ruoyi.system.domain.vo.AppPopVo;
import com.ruoyi.system.domain.vo.AppQuickEntryVo;
import com.ruoyi.system.service.config.AdvertService;
import com.ruoyi.system.service.config.BannerService;
import com.ruoyi.system.service.config.PopService;
import com.ruoyi.system.service.config.QuickEntryService;
import com.ruoyi.system.domain.vo.*;
import com.ruoyi.system.service.config.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -44,6 +38,9 @@
    @Resource
    private PopService popService;
    @Resource
    private BottomNavService bottomNavService;
@@ -77,4 +74,11 @@
    @RequestMapping(value = "/getBottomNav", method = RequestMethod.GET)
    @ApiOperation(value = "获取底部导航栏")
    public R<List<AppBottomNavVO>> getBottomNav() {
        List<AppBottomNavVO> list = bottomNavService.getAppBottomNav();
        return R.ok(list);
    }
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/BottomNavDto.java
New file
@@ -0,0 +1,10 @@
package com.ruoyi.system.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class BottomNavDto {
    @ApiModelProperty(value = "导航栏id")
    private Integer id;
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MgtAdvertEditDto.java
@@ -14,8 +14,7 @@
@Data
public class MgtAdvertEditDto extends MgtBaseDto {
    @ApiModelProperty(value = "首页广告语")
    private String homeSlogan;
    @ApiModelProperty(value = "首页logo")
    private String homeLogo;
@@ -38,4 +37,29 @@
    @ApiModelProperty(value = "跳转id")
    private String jumpId;
    @ApiModelProperty(value = "小程序APPID")
    private String appid;
    @ApiModelProperty(value = "首页广告语")
    private String homeSlogan;
    @ApiModelProperty(value = "广告语- 链接类型1.外部2.内部3.无")
    private Integer targetTypeSlogan;
    @ApiModelProperty(value = "广告语- 链接类型1.手动输入2.选择已有")
    private Integer linkTypeSlogan;
    @ApiModelProperty(value = "广告语- 链接地址")
    private String linkUrlSlogan;
    @ApiModelProperty(value = "广告语- 跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖")
    private Integer jumpTypeSlogan;
    @ApiModelProperty(value = "广告语- 跳转id")
    private String jumpIdSlogan;
    @ApiModelProperty(value = "广告语- 小程序APPID")
    private String appidSlogan;
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MgtBannerEditDto.java
@@ -20,13 +20,13 @@
    @ApiModelProperty(value = "banner图片")
    private String bannerUrl;
    @ApiModelProperty(value = "banner位置1.小程序首页")
    @ApiModelProperty(value = "banner位置1.小程序首页 2.鸿瑞学堂")
    private Integer bannerPosition;
    @ApiModelProperty(value = "链接类型1.外部2.内部3.无")
    private Integer targetType;
    @ApiModelProperty(value = "链接类型1.手动输入2.选择已有")
    @ApiModelProperty(value = "链接类型1.手动输入/跳转地址  2.选择已有/跳转小程序")
    private Integer linkType;
    @ApiModelProperty(value = "链接地址")
@@ -41,4 +41,7 @@
    @ApiModelProperty(value = "banner排序")
    private Integer bannerSort;
    @ApiModelProperty(value = "小程序APPID")
    private String appid;
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MgtPopEditDto.java
@@ -29,7 +29,7 @@
    @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖")
    private Integer jumpType;
    @ApiModelProperty(value = "链接类型1.手动输入2.选择已有")
    @ApiModelProperty(value = "链接类型1.手动输入/跳转地址  2.选择已有/跳转小程序")
    private Integer linkType;
    @ApiModelProperty(value = "跳转id")
@@ -44,4 +44,7 @@
    @ApiModelProperty(value = "展示结束时间  yyyy-MM-dd")
    private String showEndTime;
    @ApiModelProperty(value = "小程序APPID")
    private String appid;
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MgtQuickEntryEditDto.java
@@ -1,5 +1,6 @@
package com.ruoyi.system.domain.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.system.api.domain.dto.MgtBaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -26,7 +27,7 @@
    @ApiModelProperty(value = "链接类型1.外部2.内部3.无")
    private Integer targetType;
    @ApiModelProperty(value = "链接类型1.手动输入2.选择已有")
    @ApiModelProperty(value = "链接类型1.手动输入/跳转地址  2.选择已有/跳转小程序")
    private Integer linkType;
    @ApiModelProperty(value = "链接地址")
@@ -40,4 +41,7 @@
    @ApiModelProperty(value = "快速入口排序")
    private Integer entrySort;
    @ApiModelProperty(value = "小程序APPID")
    private String appid;
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/Advert.java
@@ -95,6 +95,48 @@
    @TableField("create_user_id")
    private Long createUserId;
    /**
     * 小程序APPID
     */
    @TableField("appid")
    private String appid;
    /**
     * 广告语- 链接类型1.外部2.内部3.无
     */
    @TableField("target_type_slogan")
    private Integer targetTypeSlogan;
    /**
     * 广告语- 链接类型1.手动输入2.选择已有
     */
    @TableField("link_type_slogan")
    private Integer linkTypeSlogan;
    /**
     * 广告语- 链接地址
     */
    @TableField("link_url_slogan")
    private String linkUrlSlogan;
    /**
     * 广告语- 跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖
     */
    @TableField("jump_type_slogan")
    private Integer jumpTypeSlogan;
    /**
     * 广告语- 跳转id
     */
    @TableField("jump_id_slogan")
    private String jumpIdSlogan;
    /**
     * 广告语- 小程序APPID
     */
    @TableField("appid_slogan")
    private String appidSlogan;
    @Override
    protected Serializable pkVal() {
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/Banner.java
@@ -57,7 +57,7 @@
    @TableField("target_type")
    private Integer targetType;
    /**
     * 链接类型1.跳转地址,2=跳转小程序
     * 链接类型1.手动输入/跳转地址  2.选择已有/跳转小程序
     */
    @TableField("link_type")
    private Integer linkType;
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/BottomNav.java
New file
@@ -0,0 +1,25 @@
package com.ruoyi.system.domain.pojo.config;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@TableName("t_bottom_nav")
@ApiModel(value = "BottomNav对象", description = "底部导航配置表")
public class BottomNav {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID")
    private Integer id;
    @TableField("name")
    @ApiModelProperty(value = "导航名称")
    private String name;
    @TableField("status")
    @ApiModelProperty(value = "展示状态(0=关闭,1=开启)")
    private Integer status;
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/Pop.java
@@ -91,6 +91,12 @@
    @TableField("jump_type")
    private Integer jumpType;
    /**
     * 小程序APPID
     */
    @TableField("appid")
    private String appid;
    @Override
    protected Serializable pkVal() {
        return this.popId;
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/pojo/config/QuickEntry.java
@@ -86,6 +86,12 @@
    @TableField("jump_type")
    private Integer jumpType;
    /**
     * 小程序appid
     */
    @TableField("appid")
    private String appid;
    @Override
    protected Serializable pkVal() {
        return this.entryId;
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/AppAdvertVo.java
@@ -43,4 +43,25 @@
    @ApiModelProperty(value = "logo地址")
    private String logoUrl;
    @ApiModelProperty(value = "小程序APPID")
    private String appid;
    @ApiModelProperty(value = "广告语- 链接类型1.外部2.内部3.无")
    private Integer targetTypeSlogan;
    @ApiModelProperty(value = "广告语- 链接类型1.手动输入2.选择已有")
    private Integer linkTypeSlogan;
    @ApiModelProperty(value = "广告语- 链接地址")
    private String linkUrlSlogan;
    @ApiModelProperty(value = "广告语- 跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖")
    private Integer jumpTypeSlogan;
    @ApiModelProperty(value = "广告语- 跳转id")
    private String jumpIdSlogan;
    @ApiModelProperty(value = "广告语- 小程序APPID")
    private String appidSlogan;
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/AppBottomNavVO.java
New file
@@ -0,0 +1,13 @@
package com.ruoyi.system.domain.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class AppBottomNavVO {
    @ApiModelProperty(value = "导航栏id")
    private Integer id;
    @ApiModelProperty(value = "导航栏名称")
    private String name;
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/AppPopVo.java
@@ -21,10 +21,10 @@
    @ApiModelProperty(value = "对象类型1.外链2.内链3.无")
    private Integer targetType;
    @ApiModelProperty(value = "链接类型1.跳转地址,2、跳转小程序")
    @ApiModelProperty(value = "链接类型1.手动输入/跳转地址  2.选择已有/跳转小程序")
    private Integer linkType;
    @ApiModelProperty(value = "小程序appid")
    private String appid;
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MgtAllCustomConfigVo.java
@@ -90,6 +90,27 @@
    @ApiModelProperty(value = "跳转id")
    private String jumpId;
    @ApiModelProperty(value = "小程序APPID")
    private String appid;
    @ApiModelProperty(value = "广告语- 链接类型1.外部2.内部3.无")
    private Integer targetTypeSlogan;
    @ApiModelProperty(value = "广告语- 链接类型1.手动输入2.选择已有")
    private Integer linkTypeSlogan;
    @ApiModelProperty(value = "广告语- 链接地址")
    private String linkUrlSlogan;
    @ApiModelProperty(value = "广告语- 跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖")
    private Integer jumpTypeSlogan;
    @ApiModelProperty(value = "广告语- 跳转id")
    private String jumpIdSlogan;
    @ApiModelProperty(value = "广告语- 小程序APPID")
    private String appidSlogan;
    @ApiModelProperty(value = "活跃度list")
    private List<MgtActivenessVo> mgtActivenessVoList;
    
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MgtBannerGetVo.java
@@ -26,7 +26,7 @@
    @ApiModelProperty(value = "链接类型1.外部2.内部3.无")
    private Integer targetType;
    @ApiModelProperty(value = "链接类型1.手动输入2.选择已有")
    @ApiModelProperty(value = "链接类型1.手动输入/跳转地址  2.选择已有/跳转小程序")
    private Integer linkType;
    @ApiModelProperty(value = "链接地址")
@@ -40,4 +40,7 @@
    @ApiModelProperty(value = "banner排序")
    private Integer bannerSort;
    @ApiModelProperty(value = "小程序APPID")
    private String appid;
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MgtPopGetVo.java
@@ -25,7 +25,7 @@
    @ApiModelProperty(value = "链接类型1.外部2.内部3.无")
    private Integer targetType;
    @ApiModelProperty(value = "链接类型1.手动输入2.选择已有")
    @ApiModelProperty(value = "链接类型1.手动输入/跳转地址  2.选择已有/跳转小程序")
    private Integer linkType;
@@ -48,4 +48,7 @@
    @ApiModelProperty(value = "展示结束时间  yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date showEndTime;
    @ApiModelProperty(value = "小程序APPID")
    private String appid;
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MgtQuickEntryGetVo.java
@@ -25,7 +25,7 @@
    @ApiModelProperty(value = "链接类型1.外部2.内部3.无")
    private Integer targetType;
    @ApiModelProperty(value = "链接类型1.手动输入2.选择已有")
    @ApiModelProperty(value = "链接类型1.手动输入/跳转地址  2.选择已有/跳转小程序")
    private Integer linkType;
    @ApiModelProperty(value = "链接地址")
@@ -40,4 +40,7 @@
    @ApiModelProperty(value = "快速入口排序")
    private Integer entrySort;
    @ApiModelProperty(value = "小程序APPID")
    private String appid;
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/config/BottomNavMapper.java
New file
@@ -0,0 +1,13 @@
package com.ruoyi.system.mapper.config;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.pojo.config.BottomNav;
import com.ruoyi.system.domain.vo.AppBottomNavVO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
public interface BottomNavMapper extends BaseMapper<BottomNav> {
    List<AppBottomNavVO> getAppBottomNav();
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/config/BottomNavService.java
New file
@@ -0,0 +1,17 @@
package com.ruoyi.system.service.config;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.domain.dto.BottomNavDto;
import com.ruoyi.system.domain.pojo.config.BottomNav;
import com.ruoyi.system.domain.vo.AppBottomNavVO;
import java.util.List;
public interface BottomNavService extends IService<BottomNav> {
    List<AppBottomNavVO> getAppBottomNav();
    List<BottomNav> getAllBottomNav();
    R editBottomNav(BottomNavDto bottomNavDto);
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/AdvertServiceImpl.java
@@ -79,6 +79,14 @@
        advert.setLogoUrl(mgtAdvertEditDto.getHomeLogo());
        advert.setCreateTime(new Date());
        advert.setCreateUserId(mgtAdvertEditDto.getUserId());
        advert.setAppid(mgtAdvertEditDto.getAppid());
        //广告语配置
        advert.setTargetTypeSlogan(mgtAdvertEditDto.getTargetTypeSlogan());
        advert.setLinkTypeSlogan(mgtAdvertEditDto.getLinkTypeSlogan());
        advert.setLinkUrlSlogan(mgtAdvertEditDto.getLinkUrlSlogan());
        advert.setJumpTypeSlogan(mgtAdvertEditDto.getJumpTypeSlogan());
        advert.setJumpIdSlogan(mgtAdvertEditDto.getJumpIdSlogan());
        advert.setAppidSlogan(mgtAdvertEditDto.getAppidSlogan());
        this.save(advert);
    }
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/BannerServiceImpl.java
@@ -60,9 +60,17 @@
        // 将DTO中的属性值复制到横幅对象中
        BeanUtils.copyProperties(mgtBannerEditDto, banner);
        if(banner.getTargetType()==1){
            banner.setJumpType(null);
            banner.setJumpId(null);
            banner.setLinkType(null);
            //外链
            if (banner.getLinkType()==1){
                //外链-链接
                banner.setJumpType(null);
                banner.setJumpId(null);
                banner.setAppid(null);
            }else{
                //外链-小程序
                banner.setJumpType(null);
                banner.setJumpId(null);
            }
        }else if(banner.getTargetType()==2){
            if(banner.getLinkType()==1){
                banner.setJumpType(null);
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/BottomNavServiceImpl.java
New file
@@ -0,0 +1,52 @@
package com.ruoyi.system.service.impl.config;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.domain.dto.BottomNavDto;
import com.ruoyi.system.domain.pojo.config.BottomNav;
import com.ruoyi.system.domain.vo.AppBottomNavVO;
import com.ruoyi.system.mapper.config.BottomNavMapper;
import com.ruoyi.system.service.config.BottomNavService;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
@Service
public class BottomNavServiceImpl extends ServiceImpl<BottomNavMapper, BottomNav> implements BottomNavService {
    @Override
    public List<AppBottomNavVO> getAppBottomNav() {
        return this.baseMapper.getAppBottomNav();
    }
    @Override
    public List<BottomNav> getAllBottomNav() {
        return this.baseMapper.selectList(null);
    }
    @Override
    public R editBottomNav(BottomNavDto bottomNavDto) {
        BottomNav bottomNav = this.baseMapper.selectById(bottomNavDto.getId());
        if (bottomNav == null) {
            return R.fail("该导航不存在");
        }
        //修改状态
        bottomNav.setStatus(bottomNav.getStatus()==0?1:0);
        if (bottomNav.getStatus() == 1) {
            //判断当前开启数量是否超过四个
            Integer count = this.baseMapper.selectCount(new LambdaQueryWrapper<BottomNav>().eq(BottomNav::getStatus, 1));
            if (count >= 4) {
                return R.fail("操作失败,当前已有四个导航展示");
            }
        }
        this.baseMapper.updateById(bottomNav);
        return R.ok();
    }
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java
@@ -268,6 +268,14 @@
            mgtAllCustomConfigVo.setLinkUrl(advert.getLinkUrl());
            mgtAllCustomConfigVo.setJumpType(advert.getJumpType());
            mgtAllCustomConfigVo.setJumpId(advert.getJumpId());
            mgtAllCustomConfigVo.setAppid(advert.getAppid());
            //广告语
            mgtAllCustomConfigVo.setTargetTypeSlogan(advert.getTargetTypeSlogan());
            mgtAllCustomConfigVo.setLinkTypeSlogan(advert.getLinkTypeSlogan());
            mgtAllCustomConfigVo.setLinkUrlSlogan(advert.getLinkUrlSlogan());
            mgtAllCustomConfigVo.setJumpTypeSlogan(advert.getJumpTypeSlogan());
            mgtAllCustomConfigVo.setJumpIdSlogan(advert.getJumpIdSlogan());
            mgtAllCustomConfigVo.setAppidSlogan(advert.getAppidSlogan());
        }
        //获取活跃度配置
        List<Activeness> activenessList = activenessService.listActiveness();
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/QuickEntryServiceImpl.java
@@ -83,9 +83,9 @@
    public MgtQuickEntryGetVo getMgtQuickEntry(Long quickEntryId){
        QuickEntry quickEntry = this.getById(quickEntryId);
        if(quickEntry.getTargetType()==1){
            //外链 只要linkType URL APPID
            quickEntry.setJumpType(null);
            quickEntry.setJumpId(null);
            quickEntry.setLinkType(null);
        }else if(quickEntry.getTargetType()==2){
            if(quickEntry.getLinkType()==1){
                quickEntry.setJumpType(null);
ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/BottomNavMapper.xml
New file
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.config.BottomNavMapper">
    <select id="getAppBottomNav" resultType="com.ruoyi.system.domain.vo.AppBottomNavVO">
        select
            id,name
        from
            `t_bottom_nav`
        where
            status = 1
    </select>
</mapper>
ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/PopMapper.xml
@@ -114,14 +114,14 @@
    <select id="getAppPop" resultType="com.ruoyi.system.domain.vo.AppPopVo">
        SELECT
        pop_id      popId,
        pop_url     popUrl,
        link_type   linkType,
        appid,
        pop_id popId,
        pop_url popUrl,
        link_type linkType,
        target_type targetType,
        link_url    linkUrl,
        jump_type   jumpType,
        jump_id     jumpId
        link_url linkUrl,
        jump_type jumpType,
        jump_id jumpId,
        appid appid
        FROM t_pop
        WHERE del_flag = 0 AND CURDATE() BETWEEN show_start_time AND show_end_time
        ORDER BY pop_sort,create_time DESC LIMIT 1
ruoyi-modules/ruoyi-system/src/main/resources/mapper/config/QuickEntryMapper.xml
@@ -91,18 +91,18 @@
    </delete>
    <select id="listQuickEntryVo" resultType="com.ruoyi.system.domain.vo.AppQuickEntryVo">
        SELECT entry_id    entryId,
               entry_url   entryUrl,
               entry_name  entryName,
               link_type   linkType,
               appid,
               target_type targetType,
               link_url    linkUrl,
               jump_type   jumpType,
               jump_id     jumpId
        FROM t_quick_entry
        WHERE del_flag = 0
        ORDER BY entry_sort, create_time DESC
        SELECT
        entry_id entryId,
        entry_url entryUrl,
        entry_name entryName,
        link_type linkType,
        target_type targetType,
        link_url linkUrl,
        jump_type jumpType,
        jump_id jumpId ,
        appid appid
        FROM t_quick_entry WHERE del_flag = 0
        ORDER BY entry_sort,create_time DESC
    </select>
    <select id="pageMgtQuickEntry" resultType="com.ruoyi.system.domain.vo.MgtQuickEntryPageVo">