mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 07:11:52 +08:00
mp:1)引入 less-loader,解决 menu 的 less 样式;2)接入菜单列表接口
This commit is contained in:
parent
f271ef8c47
commit
02ec5d455c
@ -51,7 +51,7 @@ public interface ErrorCodeConstants {
|
|||||||
ErrorCode DRAFT_UPDATE_FAIL = new ErrorCode(1006007002, "更新草稿失败,原因:{}");
|
ErrorCode DRAFT_UPDATE_FAIL = new ErrorCode(1006007002, "更新草稿失败,原因:{}");
|
||||||
ErrorCode DRAFT_DELETE_FAIL = new ErrorCode(1006007002, "删除草稿失败,原因:{}");
|
ErrorCode DRAFT_DELETE_FAIL = new ErrorCode(1006007002, "删除草稿失败,原因:{}");
|
||||||
|
|
||||||
// TODO 要处理下
|
// ========== 公众号菜单 1006008000============
|
||||||
ErrorCode MENU_NOT_EXISTS = new ErrorCode(1006001002, "菜单不存在");
|
ErrorCode MENU_NOT_EXISTS = new ErrorCode(1006008000, "菜单不存在");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,3 +32,8 @@ tenant-id: {{adminTenentId}}
|
|||||||
}]
|
}]
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
### 请求 /mp/menu/list 接口 => 成功
|
||||||
|
GET {{baseUrl}}/mp/menu/list?accountId=1
|
||||||
|
Authorization: Bearer {{token}}
|
||||||
|
tenant-id: {{adminTenentId}}
|
||||||
|
@ -1,25 +1,26 @@
|
|||||||
package cn.iocoder.yudao.module.mp.controller.admin.menu;
|
package cn.iocoder.yudao.module.mp.controller.admin.menu;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.MpMenuRespVO;
|
||||||
|
import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.MpMenuSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.mp.convert.menu.MpMenuConvert;
|
import cn.iocoder.yudao.module.mp.convert.menu.MpMenuConvert;
|
||||||
import cn.iocoder.yudao.module.mp.dal.dataobject.menu.MpMenuDO;
|
import cn.iocoder.yudao.module.mp.dal.dataobject.menu.MpMenuDO;
|
||||||
|
import cn.iocoder.yudao.module.mp.service.menu.MpMenuService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import java.util.List;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import io.swagger.annotations.*;
|
|
||||||
|
|
||||||
import javax.validation.*;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.*;
|
@Api(tags = "管理后台 - 公众号菜单")
|
||||||
import cn.iocoder.yudao.module.mp.service.menu.MpMenuService;
|
|
||||||
|
|
||||||
@Api(tags = "管理后台 - 微信菜单")
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/mp/menu")
|
@RequestMapping("/mp/menu")
|
||||||
@Validated
|
@Validated
|
||||||
@ -29,14 +30,14 @@ public class MpMenuController {
|
|||||||
private MpMenuService mpMenuService;
|
private MpMenuService mpMenuService;
|
||||||
|
|
||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
@ApiOperation("保存微信菜单")
|
@ApiOperation("保存公众号菜单")
|
||||||
@PreAuthorize("@ss.hasPermission('mp:menu:save')")
|
@PreAuthorize("@ss.hasPermission('mp:menu:save')")
|
||||||
public CommonResult<Long> saveMenu(@Valid @RequestBody MpMenuSaveReqVO createReqVO) {
|
public CommonResult<Long> saveMenu(@Valid @RequestBody MpMenuSaveReqVO createReqVO) {
|
||||||
return success(mpMenuService.saveMenu(createReqVO));
|
return success(mpMenuService.saveMenu(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@ApiOperation("删除微信菜单")
|
@ApiOperation("删除公众号菜单")
|
||||||
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
|
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
|
||||||
@PreAuthorize("@ss.hasPermission('mp:menu:delete')")
|
@PreAuthorize("@ss.hasPermission('mp:menu:delete')")
|
||||||
public CommonResult<Boolean> deleteMenu(@RequestParam("id") Long id) {
|
public CommonResult<Boolean> deleteMenu(@RequestParam("id") Long id) {
|
||||||
@ -45,7 +46,7 @@ public class MpMenuController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@ApiOperation("获得微信菜单")
|
@ApiOperation("获得公众号菜单")
|
||||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||||
@PreAuthorize("@ss.hasPermission('mp:menu:query')")
|
@PreAuthorize("@ss.hasPermission('mp:menu:query')")
|
||||||
public CommonResult<MpMenuRespVO> getMenu(@RequestParam("id") Long id) {
|
public CommonResult<MpMenuRespVO> getMenu(@RequestParam("id") Long id) {
|
||||||
@ -53,4 +54,13 @@ public class MpMenuController {
|
|||||||
return success(MpMenuConvert.INSTANCE.convert(menu));
|
return success(MpMenuConvert.INSTANCE.convert(menu));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
@ApiOperation("获得公众号菜单列表")
|
||||||
|
@ApiImplicitParam(name = "accountId", value = "公众号账号的编号", required = true, example = "10", dataTypeClass = Long.class)
|
||||||
|
@PreAuthorize("@ss.hasPermission('mp:menu:query')")
|
||||||
|
public CommonResult<List<MpMenuRespVO>> getMenuList(@RequestParam("accountId") Long accountId) {
|
||||||
|
List<MpMenuDO> list = mpMenuService.getMenuListByAccountId(accountId);
|
||||||
|
return success(MpMenuConvert.INSTANCE.convertList(list));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
package cn.iocoder.yudao.module.mp.controller.admin.menu.vo;
|
package cn.iocoder.yudao.module.mp.controller.admin.menu.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.mp.dal.dataobject.account.MpAccountDO;
|
||||||
|
import cn.iocoder.yudao.module.mp.dal.dataobject.message.MpMessageDO;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.*;
|
import lombok.Data;
|
||||||
import me.chanjar.weixin.common.bean.menu.WxMenuButton;
|
import me.chanjar.weixin.common.api.WxConsts;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
// TODO 芋艿:完善 swagger 注解
|
||||||
/**
|
/**
|
||||||
* 微信菜单 Base VO,提供给添加、修改、详细的子 VO 使用
|
* 微信菜单 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||||
@ -18,4 +21,112 @@ public class MpMenuBaseVO {
|
|||||||
@NotNull(message = "公众号账号的编号不能为空")
|
@NotNull(message = "公众号账号的编号不能为空")
|
||||||
private Long accountId;
|
private Long accountId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 微信公众号 appid
|
||||||
|
*
|
||||||
|
* 冗余 {@link MpAccountDO#getAppId()}
|
||||||
|
*/
|
||||||
|
private String appId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 菜单标识
|
||||||
|
*
|
||||||
|
* 支持多 DB 类型时,无法直接使用 key + @TableField("menuKey") 来实现转换,原因是 "menuKey" AS key 而存在报错
|
||||||
|
*/
|
||||||
|
private String menuKey;
|
||||||
|
/**
|
||||||
|
* 父菜单编号
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
// ========== 按钮操作 ==========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按钮类型
|
||||||
|
*
|
||||||
|
* 枚举 {@link WxConsts.MenuButtonType}
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网页链接
|
||||||
|
*
|
||||||
|
* 用户点击菜单可打开链接,不超过 1024 字节
|
||||||
|
*
|
||||||
|
* 类型为 {@link WxConsts.XmlMsgType} 的 VIEW、MINIPROGRAM
|
||||||
|
*/
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序的 appId
|
||||||
|
*
|
||||||
|
* 类型为 {@link WxConsts.MenuButtonType} 的 MINIPROGRAM
|
||||||
|
*/
|
||||||
|
private String miniProgramAppId;
|
||||||
|
/**
|
||||||
|
* 小程序的页面路径
|
||||||
|
*
|
||||||
|
* 类型为 {@link WxConsts.MenuButtonType} 的 MINIPROGRAM
|
||||||
|
*/
|
||||||
|
private String miniProgramPagePath;
|
||||||
|
|
||||||
|
// ========== 消息内容 ==========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息类型
|
||||||
|
*
|
||||||
|
* 当 {@link #type} 为 CLICK、SCANCODE_WAITMSG
|
||||||
|
*
|
||||||
|
* 枚举 {@link WxConsts.XmlMsgType} 中的 TEXT、IMAGE、VOICE、VIDEO、NEWS
|
||||||
|
*/
|
||||||
|
private String replyMessageType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回复的消息内容
|
||||||
|
*
|
||||||
|
* 消息类型为 {@link WxConsts.XmlMsgType} 的 TEXT
|
||||||
|
*/
|
||||||
|
private String replyContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回复的媒体 id
|
||||||
|
*
|
||||||
|
* 消息类型为 {@link WxConsts.XmlMsgType} 的 IMAGE、VOICE、VIDEO
|
||||||
|
*/
|
||||||
|
private String replyMediaId;
|
||||||
|
/**
|
||||||
|
* 回复的媒体 URL
|
||||||
|
*
|
||||||
|
* 消息类型为 {@link WxConsts.XmlMsgType} 的 IMAGE、VOICE、VIDEO
|
||||||
|
*/
|
||||||
|
private String replyMediaUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回复的标题
|
||||||
|
*
|
||||||
|
* 消息类型为 {@link WxConsts.XmlMsgType} 的 VIDEO
|
||||||
|
*/
|
||||||
|
private String replyTitle;
|
||||||
|
/**
|
||||||
|
* 回复的描述
|
||||||
|
*
|
||||||
|
* 消息类型为 {@link WxConsts.XmlMsgType} 的 VIDEO
|
||||||
|
*/
|
||||||
|
private String replyDescription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回复的图文消息数组
|
||||||
|
*
|
||||||
|
* 消息类型为 {@link WxConsts.XmlMsgType} 的 NEWS
|
||||||
|
*/
|
||||||
|
private List<MpMessageDO.Article> replyArticles;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
package cn.iocoder.yudao.module.mp.convert.menu;
|
package cn.iocoder.yudao.module.mp.convert.menu;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.MpMenuRespVO;
|
||||||
|
import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.MpMenuSaveReqVO;
|
||||||
|
import cn.iocoder.yudao.module.mp.dal.dataobject.menu.MpMenuDO;
|
||||||
import cn.iocoder.yudao.module.mp.service.message.bo.MpMessageSendOutReqBO;
|
import cn.iocoder.yudao.module.mp.service.message.bo.MpMessageSendOutReqBO;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.Mappings;
|
import org.mapstruct.Mappings;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.*;
|
|
||||||
import cn.iocoder.yudao.module.mp.dal.dataobject.menu.MpMenuDO;
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface MpMenuConvert {
|
public interface MpMenuConvert {
|
||||||
@ -19,6 +20,8 @@ public interface MpMenuConvert {
|
|||||||
|
|
||||||
MpMenuRespVO convert(MpMenuDO bean);
|
MpMenuRespVO convert(MpMenuDO bean);
|
||||||
|
|
||||||
|
List<MpMenuRespVO> convertList(List<MpMenuDO> list);
|
||||||
|
|
||||||
@Mappings({
|
@Mappings({
|
||||||
@Mapping(source = "menu.appId", target = "appId"),
|
@Mapping(source = "menu.appId", target = "appId"),
|
||||||
@Mapping(source = "menu.replyMessageType", target = "type"),
|
@Mapping(source = "menu.replyMessageType", target = "type"),
|
||||||
|
@ -4,6 +4,8 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
|||||||
import cn.iocoder.yudao.module.mp.dal.dataobject.menu.MpMenuDO;
|
import cn.iocoder.yudao.module.mp.dal.dataobject.menu.MpMenuDO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface MpMenuMapper extends BaseMapperX<MpMenuDO> {
|
public interface MpMenuMapper extends BaseMapperX<MpMenuDO> {
|
||||||
|
|
||||||
@ -12,4 +14,8 @@ public interface MpMenuMapper extends BaseMapperX<MpMenuDO> {
|
|||||||
MpMenuDO::getMenuKey, menuKey);
|
MpMenuDO::getMenuKey, menuKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default List<MpMenuDO> selectListByAccountId(Long accountId) {
|
||||||
|
return selectList(MpMenuDO::getAccountId, accountId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
package cn.iocoder.yudao.module.mp.service.menu;
|
package cn.iocoder.yudao.module.mp.service.menu;
|
||||||
|
|
||||||
import javax.validation.*;
|
import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.MpMenuSaveReqVO;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.*;
|
|
||||||
import cn.iocoder.yudao.module.mp.dal.dataobject.menu.MpMenuDO;
|
import cn.iocoder.yudao.module.mp.dal.dataobject.menu.MpMenuDO;
|
||||||
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
|
|
||||||
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
|
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信菜单 Service 接口
|
* 公众号菜单 Service 接口
|
||||||
*
|
*
|
||||||
* @author 芋道源码
|
* @author 芋道源码
|
||||||
*/
|
*/
|
||||||
public interface MpMenuService {
|
public interface MpMenuService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存微信菜单
|
* 保存公众号菜单
|
||||||
*
|
*
|
||||||
* @param createReqVO 创建信息
|
* @param createReqVO 创建信息
|
||||||
* @return 编号
|
* @return 编号
|
||||||
@ -23,17 +23,17 @@ public interface MpMenuService {
|
|||||||
Long saveMenu(@Valid MpMenuSaveReqVO createReqVO);
|
Long saveMenu(@Valid MpMenuSaveReqVO createReqVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除微信菜单
|
* 删除公众号菜单
|
||||||
*
|
*
|
||||||
* @param id 编号
|
* @param id 编号
|
||||||
*/
|
*/
|
||||||
void deleteMenu(Long id);
|
void deleteMenu(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得微信菜单
|
* 获得公众号菜单
|
||||||
*
|
*
|
||||||
* @param id 编号
|
* @param id 编号
|
||||||
* @return 微信菜单
|
* @return 公众号菜单
|
||||||
*/
|
*/
|
||||||
MpMenuDO getMenu(Long id);
|
MpMenuDO getMenu(Long id);
|
||||||
|
|
||||||
@ -47,4 +47,12 @@ public interface MpMenuService {
|
|||||||
*/
|
*/
|
||||||
WxMpXmlOutMessage reply(String appId, String key, String openid);
|
WxMpXmlOutMessage reply(String appId, String key, String openid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得公众号菜单列表
|
||||||
|
*
|
||||||
|
* @param accountId 公众号编号
|
||||||
|
* @return 公众号菜单列表
|
||||||
|
*/
|
||||||
|
List<MpMenuDO> getMenuListByAccountId(Long accountId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package cn.iocoder.yudao.module.mp.service.menu;
|
package cn.iocoder.yudao.module.mp.service.menu;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.MpMenuSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.mp.convert.menu.MpMenuConvert;
|
import cn.iocoder.yudao.module.mp.convert.menu.MpMenuConvert;
|
||||||
import cn.iocoder.yudao.module.mp.dal.dataobject.menu.MpMenuDO;
|
import cn.iocoder.yudao.module.mp.dal.dataobject.menu.MpMenuDO;
|
||||||
|
import cn.iocoder.yudao.module.mp.dal.mysql.menu.MpMenuMapper;
|
||||||
import cn.iocoder.yudao.module.mp.framework.mp.core.MpServiceFactory;
|
import cn.iocoder.yudao.module.mp.framework.mp.core.MpServiceFactory;
|
||||||
import cn.iocoder.yudao.module.mp.service.message.MpMessageService;
|
import cn.iocoder.yudao.module.mp.service.message.MpMessageService;
|
||||||
import cn.iocoder.yudao.module.mp.service.message.bo.MpMessageSendOutReqBO;
|
import cn.iocoder.yudao.module.mp.service.message.bo.MpMessageSendOutReqBO;
|
||||||
@ -13,20 +15,16 @@ import me.chanjar.weixin.mp.api.WxMpService;
|
|||||||
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
|
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.mp.controller.admin.menu.vo.*;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
import cn.iocoder.yudao.module.mp.dal.mysql.menu.MpMenuMapper;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*;
|
import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.MENU_NOT_EXISTS;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信菜单 Service 实现类
|
* 公众号菜单 Service 实现类
|
||||||
*
|
*
|
||||||
* @author 芋道源码
|
* @author 芋道源码
|
||||||
*/
|
*/
|
||||||
@ -76,7 +74,6 @@ public class MpMenuServiceImpl implements MpMenuService {
|
|||||||
|
|
||||||
private void validateMenuExists(Long id) {
|
private void validateMenuExists(Long id) {
|
||||||
if (mpMenuMapper.selectById(id) == null) {
|
if (mpMenuMapper.selectById(id) == null) {
|
||||||
// TODO 芋艿:错误码不太对
|
|
||||||
throw exception(MENU_NOT_EXISTS);
|
throw exception(MENU_NOT_EXISTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,4 +102,9 @@ public class MpMenuServiceImpl implements MpMenuService {
|
|||||||
return mpMessageService.sendOutMessage(sendReqBO);
|
return mpMessageService.sendOutMessage(sendReqBO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MpMenuDO> getMenuListByAccountId(Long accountId) {
|
||||||
|
return mpMenuMapper.selectListByAccountId(accountId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,8 @@
|
|||||||
"eslint-plugin-prettier": "^3.1.0",
|
"eslint-plugin-prettier": "^3.1.0",
|
||||||
"eslint-plugin-vue": "9.0.0",
|
"eslint-plugin-vue": "9.0.0",
|
||||||
"fs-extra": "^8.1.0",
|
"fs-extra": "^8.1.0",
|
||||||
|
"less": "^4.1.3",
|
||||||
|
"less-loader": "^7.3.0",
|
||||||
"lint-staged": "12.5.0",
|
"lint-staged": "12.5.0",
|
||||||
"runjs": "4.4.2",
|
"runjs": "4.4.2",
|
||||||
"sass": "1.32.13",
|
"sass": "1.32.13",
|
||||||
|
9
yudao-ui-admin/src/api/mp/menu.js
Normal file
9
yudao-ui-admin/src/api/mp/menu.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获得公众号菜单列表
|
||||||
|
export function getMenuList(accountId) {
|
||||||
|
return request({
|
||||||
|
url: '/mp/menu/list?accountId=' + accountId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -3340,6 +3340,13 @@
|
|||||||
"resolved" "https://registry.npmmirror.com/cookie/-/cookie-0.5.0.tgz"
|
"resolved" "https://registry.npmmirror.com/cookie/-/cookie-0.5.0.tgz"
|
||||||
"version" "0.5.0"
|
"version" "0.5.0"
|
||||||
|
|
||||||
|
"copy-anything@^2.0.1":
|
||||||
|
"integrity" "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz"
|
||||||
|
"version" "2.0.6"
|
||||||
|
dependencies:
|
||||||
|
"is-what" "^3.14.1"
|
||||||
|
|
||||||
"copy-concurrently@^1.0.0":
|
"copy-concurrently@^1.0.0":
|
||||||
"integrity" "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A=="
|
"integrity" "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A=="
|
||||||
"resolved" "https://registry.npmmirror.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz"
|
"resolved" "https://registry.npmmirror.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz"
|
||||||
@ -3696,6 +3703,13 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"ms" "2.0.0"
|
"ms" "2.0.0"
|
||||||
|
|
||||||
|
"debug@^3.2.6":
|
||||||
|
"integrity" "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz"
|
||||||
|
"version" "3.2.7"
|
||||||
|
dependencies:
|
||||||
|
"ms" "^2.1.1"
|
||||||
|
|
||||||
"debug@^3.2.7":
|
"debug@^3.2.7":
|
||||||
"integrity" "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="
|
"integrity" "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="
|
||||||
"resolved" "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz"
|
"resolved" "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz"
|
||||||
@ -4215,7 +4229,7 @@
|
|||||||
"resolved" "https://registry.npmmirror.com/entities/-/entities-2.2.0.tgz"
|
"resolved" "https://registry.npmmirror.com/entities/-/entities-2.2.0.tgz"
|
||||||
"version" "2.2.0"
|
"version" "2.2.0"
|
||||||
|
|
||||||
"errno@^0.1.3", "errno@~0.1.7":
|
"errno@^0.1.1", "errno@^0.1.3", "errno@~0.1.7":
|
||||||
"integrity" "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A=="
|
"integrity" "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A=="
|
||||||
"resolved" "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz"
|
"resolved" "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz"
|
||||||
"version" "0.1.8"
|
"version" "0.1.8"
|
||||||
@ -5633,6 +5647,13 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"safer-buffer" ">= 2.1.2 < 3"
|
"safer-buffer" ">= 2.1.2 < 3"
|
||||||
|
|
||||||
|
"iconv-lite@^0.6.3":
|
||||||
|
"integrity" "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz"
|
||||||
|
"version" "0.6.3"
|
||||||
|
dependencies:
|
||||||
|
"safer-buffer" ">= 2.1.2 < 3.0.0"
|
||||||
|
|
||||||
"icss-utils@^4.0.0", "icss-utils@^4.1.1":
|
"icss-utils@^4.0.0", "icss-utils@^4.1.1":
|
||||||
"integrity" "sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA=="
|
"integrity" "sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA=="
|
||||||
"resolved" "https://registry.npmmirror.com/icss-utils/-/icss-utils-4.1.1.tgz"
|
"resolved" "https://registry.npmmirror.com/icss-utils/-/icss-utils-4.1.1.tgz"
|
||||||
@ -5665,7 +5686,7 @@
|
|||||||
"resolved" "https://registry.npmmirror.com/ignore/-/ignore-4.0.6.tgz"
|
"resolved" "https://registry.npmmirror.com/ignore/-/ignore-4.0.6.tgz"
|
||||||
"version" "4.0.6"
|
"version" "4.0.6"
|
||||||
|
|
||||||
"image-size@^0.5.1":
|
"image-size@^0.5.1", "image-size@~0.5.0":
|
||||||
"integrity" "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ=="
|
"integrity" "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ=="
|
||||||
"resolved" "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz"
|
"resolved" "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz"
|
||||||
"version" "0.5.5"
|
"version" "0.5.5"
|
||||||
@ -6150,6 +6171,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"call-bind" "^1.0.2"
|
"call-bind" "^1.0.2"
|
||||||
|
|
||||||
|
"is-what@^3.14.1":
|
||||||
|
"integrity" "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/is-what/-/is-what-3.14.1.tgz"
|
||||||
|
"version" "3.14.1"
|
||||||
|
|
||||||
"is-windows@^1.0.2":
|
"is-windows@^1.0.2":
|
||||||
"integrity" "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA=="
|
"integrity" "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA=="
|
||||||
"resolved" "https://registry.npmmirror.com/is-windows/-/is-windows-1.0.2.tgz"
|
"resolved" "https://registry.npmmirror.com/is-windows/-/is-windows-1.0.2.tgz"
|
||||||
@ -6402,6 +6428,32 @@
|
|||||||
"picocolors" "^1.0.0"
|
"picocolors" "^1.0.0"
|
||||||
"shell-quote" "^1.7.3"
|
"shell-quote" "^1.7.3"
|
||||||
|
|
||||||
|
"less-loader@^7.3.0":
|
||||||
|
"integrity" "sha512-Mi8915g7NMaLlgi77mgTTQvK022xKRQBIVDSyfl3ErTuBhmZBQab0mjeJjNNqGbdR+qrfTleKXqbGI4uEFavxg=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/less-loader/-/less-loader-7.3.0.tgz"
|
||||||
|
"version" "7.3.0"
|
||||||
|
dependencies:
|
||||||
|
"klona" "^2.0.4"
|
||||||
|
"loader-utils" "^2.0.0"
|
||||||
|
"schema-utils" "^3.0.0"
|
||||||
|
|
||||||
|
"less@^3.5.0 || ^4.0.0", "less@^4.1.3":
|
||||||
|
"integrity" "sha512-w16Xk/Ta9Hhyei0Gpz9m7VS8F28nieJaL/VyShID7cYvP6IL5oHeL6p4TXSDJqZE/lNv0oJ2pGVjJsRkfwm5FA=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/less/-/less-4.1.3.tgz"
|
||||||
|
"version" "4.1.3"
|
||||||
|
dependencies:
|
||||||
|
"copy-anything" "^2.0.1"
|
||||||
|
"parse-node-version" "^1.0.1"
|
||||||
|
"tslib" "^2.3.0"
|
||||||
|
optionalDependencies:
|
||||||
|
"errno" "^0.1.1"
|
||||||
|
"graceful-fs" "^4.1.2"
|
||||||
|
"image-size" "~0.5.0"
|
||||||
|
"make-dir" "^2.1.0"
|
||||||
|
"mime" "^1.4.1"
|
||||||
|
"needle" "^3.1.0"
|
||||||
|
"source-map" "~0.6.0"
|
||||||
|
|
||||||
"levn@^0.4.1":
|
"levn@^0.4.1":
|
||||||
"integrity" "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="
|
"integrity" "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="
|
||||||
"resolved" "https://registry.npmmirror.com/levn/-/levn-0.4.1.tgz"
|
"resolved" "https://registry.npmmirror.com/levn/-/levn-0.4.1.tgz"
|
||||||
@ -6629,6 +6681,14 @@
|
|||||||
"pify" "^4.0.1"
|
"pify" "^4.0.1"
|
||||||
"semver" "^5.6.0"
|
"semver" "^5.6.0"
|
||||||
|
|
||||||
|
"make-dir@^2.1.0":
|
||||||
|
"integrity" "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/make-dir/-/make-dir-2.1.0.tgz"
|
||||||
|
"version" "2.1.0"
|
||||||
|
dependencies:
|
||||||
|
"pify" "^4.0.1"
|
||||||
|
"semver" "^5.6.0"
|
||||||
|
|
||||||
"make-dir@^3.0.2", "make-dir@^3.1.0":
|
"make-dir@^3.0.2", "make-dir@^3.1.0":
|
||||||
"integrity" "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw=="
|
"integrity" "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw=="
|
||||||
"resolved" "https://registry.npmmirror.com/make-dir/-/make-dir-3.1.0.tgz"
|
"resolved" "https://registry.npmmirror.com/make-dir/-/make-dir-3.1.0.tgz"
|
||||||
@ -6819,6 +6879,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"mime-db" "1.52.0"
|
"mime-db" "1.52.0"
|
||||||
|
|
||||||
|
"mime@^1.4.1":
|
||||||
|
"integrity" "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz"
|
||||||
|
"version" "1.6.0"
|
||||||
|
|
||||||
"mime@^2.4.4":
|
"mime@^2.4.4":
|
||||||
"integrity" "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg=="
|
"integrity" "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg=="
|
||||||
"resolved" "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz"
|
"resolved" "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz"
|
||||||
@ -7111,6 +7176,15 @@
|
|||||||
"resolved" "https://registry.npmmirror.com/natural-compare/-/natural-compare-1.4.0.tgz"
|
"resolved" "https://registry.npmmirror.com/natural-compare/-/natural-compare-1.4.0.tgz"
|
||||||
"version" "1.4.0"
|
"version" "1.4.0"
|
||||||
|
|
||||||
|
"needle@^3.1.0":
|
||||||
|
"integrity" "sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/needle/-/needle-3.2.0.tgz"
|
||||||
|
"version" "3.2.0"
|
||||||
|
dependencies:
|
||||||
|
"debug" "^3.2.6"
|
||||||
|
"iconv-lite" "^0.6.3"
|
||||||
|
"sax" "^1.2.4"
|
||||||
|
|
||||||
"negotiator@0.6.3":
|
"negotiator@0.6.3":
|
||||||
"integrity" "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
|
"integrity" "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
|
||||||
"resolved" "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz"
|
"resolved" "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz"
|
||||||
@ -7607,6 +7681,11 @@
|
|||||||
"json-parse-even-better-errors" "^2.3.0"
|
"json-parse-even-better-errors" "^2.3.0"
|
||||||
"lines-and-columns" "^1.1.6"
|
"lines-and-columns" "^1.1.6"
|
||||||
|
|
||||||
|
"parse-node-version@^1.0.1":
|
||||||
|
"integrity" "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/parse-node-version/-/parse-node-version-1.0.1.tgz"
|
||||||
|
"version" "1.0.1"
|
||||||
|
|
||||||
"parse5-htmlparser2-tree-adapter@^6.0.0":
|
"parse5-htmlparser2-tree-adapter@^6.0.0":
|
||||||
"integrity" "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA=="
|
"integrity" "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA=="
|
||||||
"resolved" "https://registry.npmmirror.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz"
|
"resolved" "https://registry.npmmirror.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz"
|
||||||
@ -8850,7 +8929,7 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"ret" "~0.1.10"
|
"ret" "~0.1.10"
|
||||||
|
|
||||||
"safer-buffer@^2.0.2", "safer-buffer@^2.1.0", "safer-buffer@>= 2.1.2 < 3", "safer-buffer@~2.1.0":
|
"safer-buffer@^2.0.2", "safer-buffer@^2.1.0", "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", "safer-buffer@~2.1.0":
|
||||||
"integrity" "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
"integrity" "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||||
"resolved" "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz"
|
"resolved" "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz"
|
||||||
"version" "2.1.2"
|
"version" "2.1.2"
|
||||||
@ -10017,7 +10096,7 @@
|
|||||||
"resolved" "https://registry.npmmirror.com/tslib/-/tslib-2.4.1.tgz"
|
"resolved" "https://registry.npmmirror.com/tslib/-/tslib-2.4.1.tgz"
|
||||||
"version" "2.4.1"
|
"version" "2.4.1"
|
||||||
|
|
||||||
"tslib@2.3.0":
|
"tslib@^2.3.0", "tslib@2.3.0":
|
||||||
"integrity" "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
|
"integrity" "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
|
||||||
"resolved" "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz"
|
"resolved" "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz"
|
||||||
"version" "2.3.0"
|
"version" "2.3.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user