| | |
| | | */ |
| | | @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; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | 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() |
| | | { |
| | | |
| | | |
| | | }; |
| | | } |
| | | } |
| | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public List<Shop> getShopBySysUserIds(BoardMemberTotalDto boardMemberTotalDto) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<Shop> getFranchiseeIdsBYDealerId(Long shopId) { |
| | | return Collections.emptyList(); |
| | | } |
| | | }; |
| | | } |
| | | } |
New file |
| | |
| | | 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 { |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/shop/getShopBySysUserIds") |
| | | List<Shop> getShopBySysUserIds(@RequestBody BoardMemberTotalDto boardMemberTotalDto); |
| | | |
| | | /** |
| | | * 根据经销商id查询加盟商ids |
| | | * @param shopId |
| | | * @return |
| | | */ |
| | | @PostMapping("/shop/getFranchiseeIdsBYDealerId") |
| | | List<Shop> getFranchiseeIdsBYDealerId(@RequestBody Long shopId); |
| | | } |
| | |
| | | com.ruoyi.system.api.factory.RemoteUserFallbackFactory |
| | | com.ruoyi.system.api.factory.RemoteMemberFallbackFactory |
| | | com.ruoyi.system.api.factory.RemoteStaffFallbackFactory |
| | | com.ruoyi.system.api.factory.RemoteRegionFallbackFactory |
| | |
| | | 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; |
| | |
| | | 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)); |
| | | } |
| | | |
| | | //修改价格 转为经销商 |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | private String createEndTime; |
| | | |
| | | @ApiModelProperty(value = "商品状态-1删除1上架2下架") |
| | | private Integer goodsStatus; |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | |
| | | } |
| | |
| | | * @return List<String> |
| | | */ |
| | | List<String> listGoodsNameByGoodsClass(@Param("classId") Long classId); |
| | | |
| | | List<PageShopMgtGoodsVO> pageShopMgtGoods(Page<PageShopMgtGoodsVO> page,@Param("dto") PageShopMgtGoodsDTO dto); |
| | | } |
| | |
| | | * @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); |
| | | } |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | |
| | | @Resource |
| | | private ActivityRecordService activityRecordService; |
| | | |
| | | @Resource |
| | | private RemoteShopService remoteShopService; |
| | | |
| | | /** |
| | | * @description 获取推荐商品列表 |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | <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> |
| | | |
| | |
| | | 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) >= #{dto.createStartTime} |
| | | </if> |
| | | <if test="dto.createEndTime!=null and dto.createEndTime != ''"> |
| | | AND Date(tg.create_time) <= #{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> |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | @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="商户服务电话") |
| | |
| | | |
| | | @ApiModelProperty(value="小鹅通讲师id 多个用,隔开") |
| | | private String xiaoeUserId; |
| | | |
| | | @ApiModelProperty("修改价格权限(0=关,1=开)") |
| | | private Integer modifyPricePermission; |
| | | } |
| | |
| | | @ApiModelProperty(value="小鹅通讲师id 多个用,隔开") |
| | | private String xiaoeUserId; |
| | | |
| | | |
| | | @ApiModelProperty("修改价格权限(0=关,1=开)") |
| | | private Integer modifyPricePermission; |
| | | |
| | | |
| | | |
| | |
| | | * @return List<Long> |
| | | */ |
| | | List<Shop> listShopByCityCode(@Param("cityCodes")List<String> cityCodes); |
| | | |
| | | List<Shop> getFranchiseeIdsBYDealerId(@Param("shopId")Long shopId); |
| | | } |
| | |
| | | List<Shop> list = this.list(queryWrapper); |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<Shop> getFranchiseeIdsBYDealerId(Long shopId) { |
| | | return shopMapper.getFranchiseeIdsBYDealerId(shopId); |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<Shop> getShopBySysUserIds(List<Long> userIds); |
| | | |
| | | /** |
| | | * 根据经销商id查询加盟商ids |
| | | * @param shopId |
| | | * @return |
| | | */ |
| | | List<Shop> getFranchiseeIdsBYDealerId(Long shopId); |
| | | } |
| | |
| | | <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"> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | AND Date(ts.sign_time) <= #{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 |
| | |
| | | AND Date(ts.sign_time) <= #{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} |
| | |
| | | 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> |
| | |
| | | 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; |
| | |
| | | |
| | | @Resource |
| | | private RecommendCooperationService recommendCooperationService; |
| | | |
| | | @Resource |
| | | private BottomNavService bottomNavService; |
| | | |
| | | |
| | | @RequestMapping(value = "/getCustomConfig", method = RequestMethod.POST) |
| | |
| | | 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) { |
| | |
| | | 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; |
| | |
| | | @Resource |
| | | private PopService popService; |
| | | |
| | | @Resource |
| | | private BottomNavService bottomNavService; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/getBottomNav", method = RequestMethod.GET) |
| | | @ApiOperation(value = "获取底部导航栏") |
| | | public R<List<AppBottomNavVO>> getBottomNav() { |
| | | List<AppBottomNavVO> list = bottomNavService.getAppBottomNav(); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class BottomNavDto { |
| | | @ApiModelProperty(value = "导航栏id") |
| | | private Integer id; |
| | | } |
| | |
| | | @Data |
| | | public class MgtAdvertEditDto extends MgtBaseDto { |
| | | |
| | | @ApiModelProperty(value = "首页广告语") |
| | | private String homeSlogan; |
| | | |
| | | |
| | | @ApiModelProperty(value = "首页logo") |
| | | private String homeLogo; |
| | |
| | | @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; |
| | | |
| | | } |
| | |
| | | @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 = "链接地址") |
| | |
| | | @ApiModelProperty(value = "banner排序") |
| | | private Integer bannerSort; |
| | | |
| | | @ApiModelProperty(value = "小程序APPID") |
| | | private String appid; |
| | | |
| | | } |
| | |
| | | @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") |
| | |
| | | @ApiModelProperty(value = "展示结束时间 yyyy-MM-dd") |
| | | private String showEndTime; |
| | | |
| | | @ApiModelProperty(value = "小程序APPID") |
| | | private String appid; |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | @ApiModelProperty(value = "链接类型1.外部2.内部3.无") |
| | | private Integer targetType; |
| | | |
| | | @ApiModelProperty(value = "链接类型1.手动输入2.选择已有") |
| | | @ApiModelProperty(value = "链接类型1.手动输入/跳转地址 2.选择已有/跳转小程序") |
| | | private Integer linkType; |
| | | |
| | | @ApiModelProperty(value = "链接地址") |
| | |
| | | |
| | | @ApiModelProperty(value = "快速入口排序") |
| | | private Integer entrySort; |
| | | |
| | | @ApiModelProperty(value = "小程序APPID") |
| | | private String appid; |
| | | } |
| | |
| | | @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() { |
| | |
| | | @TableField("target_type") |
| | | private Integer targetType; |
| | | /** |
| | | * 链接类型1.跳转地址,2=跳转小程序 |
| | | * 链接类型1.手动输入/跳转地址 2.选择已有/跳转小程序 |
| | | */ |
| | | @TableField("link_type") |
| | | private Integer linkType; |
New file |
| | |
| | | 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; |
| | | |
| | | } |
| | |
| | | @TableField("jump_type") |
| | | private Integer jumpType; |
| | | |
| | | /** |
| | | * 小程序APPID |
| | | */ |
| | | @TableField("appid") |
| | | private String appid; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.popId; |
| | |
| | | @TableField("jump_type") |
| | | private Integer jumpType; |
| | | |
| | | /** |
| | | * 小程序appid |
| | | */ |
| | | @TableField("appid") |
| | | private String appid; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.entryId; |
| | |
| | | @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; |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | |
| | | } |
| | |
| | | |
| | | @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; |
| | | |
| | |
| | | @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; |
| | | |
| | |
| | | @ApiModelProperty(value = "链接类型1.外部2.内部3.无") |
| | | private Integer targetType; |
| | | |
| | | @ApiModelProperty(value = "链接类型1.手动输入2.选择已有") |
| | | @ApiModelProperty(value = "链接类型1.手动输入/跳转地址 2.选择已有/跳转小程序") |
| | | private Integer linkType; |
| | | |
| | | @ApiModelProperty(value = "链接地址") |
| | |
| | | |
| | | @ApiModelProperty(value = "banner排序") |
| | | private Integer bannerSort; |
| | | |
| | | @ApiModelProperty(value = "小程序APPID") |
| | | private String appid; |
| | | } |
| | |
| | | @ApiModelProperty(value = "链接类型1.外部2.内部3.无") |
| | | private Integer targetType; |
| | | |
| | | @ApiModelProperty(value = "链接类型1.手动输入2.选择已有") |
| | | @ApiModelProperty(value = "链接类型1.手动输入/跳转地址 2.选择已有/跳转小程序") |
| | | private Integer linkType; |
| | | |
| | | |
| | |
| | | @ApiModelProperty(value = "展示结束时间 yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date showEndTime; |
| | | |
| | | @ApiModelProperty(value = "小程序APPID") |
| | | private String appid; |
| | | } |
| | |
| | | @ApiModelProperty(value = "链接类型1.外部2.内部3.无") |
| | | private Integer targetType; |
| | | |
| | | @ApiModelProperty(value = "链接类型1.手动输入2.选择已有") |
| | | @ApiModelProperty(value = "链接类型1.手动输入/跳转地址 2.选择已有/跳转小程序") |
| | | private Integer linkType; |
| | | |
| | | @ApiModelProperty(value = "链接地址") |
| | |
| | | @ApiModelProperty(value = "快速入口排序") |
| | | private Integer entrySort; |
| | | |
| | | @ApiModelProperty(value = "小程序APPID") |
| | | private String appid; |
| | | |
| | | } |
New file |
| | |
| | | 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(); |
| | | } |
New file |
| | |
| | | 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); |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | // 将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); |
New file |
| | |
| | | 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(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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(); |
| | |
| | | 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); |
New file |
| | |
| | | <?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> |
| | |
| | | |
| | | <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 |
| | |
| | | </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"> |