提交代码

master
胡锐 7 months ago committed by yuanye
parent 186eec8101
commit c91f46d857
  1. 1
      bweb/src/main/java/com/bweb/config/AuthConfig.java
  2. 14
      bweb/src/main/java/com/bweb/controller/SecMenuController.java
  3. 2
      bweb/src/main/java/com/bweb/controller/SecUserController.java
  4. 19
      service/src/main/java/com/hfkj/dao/SecMenuMapper.java
  5. 14
      service/src/main/java/com/hfkj/dao/SecMenuSqlProvider.java
  6. 18
      service/src/main/java/com/hfkj/entity/SecMenu.java
  7. 70
      service/src/main/java/com/hfkj/entity/SecMenuExample.java

@ -86,6 +86,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/**/api-docs")
.excludePathPatterns("/**/springfox-swagger-ui/**")
.excludePathPatterns("/**/swagger-ui.html")
.excludePathPatterns("/secMenu/queryMenuList")
;
}

@ -129,6 +129,20 @@ public class SecMenuController {
}
}
@RequestMapping(value="/queryMenuList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询菜单列表")
public ResponseData queryMenuList() {
try {
return ResponseMsgUtil.success(secMenuService.getAllList());
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/queryAssignMenuTree",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询分配菜单树")

@ -221,7 +221,7 @@ public class SecUserController {
}
@RequestMapping(value="/queryList",method = RequestMethod.GET)
@RequestMapping(value="/queryLoginLogList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询登录日志列表")
public ResponseData queryLoginLogList(@RequestParam(value = "userId", required = true) String userId,

@ -41,14 +41,14 @@ public interface SecMenuMapper extends SecMenuMapperExt {
@Insert({
"insert into sec_menu (menu_name, menu_type, ",
"menu_url, menu_url_img, ",
"menu_p_sid, menu_sort, ",
"menu_desc, create_time, ",
"update_time)",
"menu_full_url, menu_p_sid, ",
"menu_sort, menu_desc, ",
"create_time, update_time)",
"values (#{menuName,jdbcType=VARCHAR}, #{menuType,jdbcType=INTEGER}, ",
"#{menuUrl,jdbcType=VARCHAR}, #{menuUrlImg,jdbcType=VARCHAR}, ",
"#{menuPSid,jdbcType=BIGINT}, #{menuSort,jdbcType=INTEGER}, ",
"#{menuDesc,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP})"
"#{menuFullUrl,jdbcType=VARCHAR}, #{menuPSid,jdbcType=BIGINT}, ",
"#{menuSort,jdbcType=INTEGER}, #{menuDesc,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(SecMenu record);
@ -64,6 +64,7 @@ public interface SecMenuMapper extends SecMenuMapperExt {
@Result(column="menu_type", property="menuType", jdbcType=JdbcType.INTEGER),
@Result(column="menu_url", property="menuUrl", jdbcType=JdbcType.VARCHAR),
@Result(column="menu_url_img", property="menuUrlImg", jdbcType=JdbcType.VARCHAR),
@Result(column="menu_full_url", property="menuFullUrl", jdbcType=JdbcType.VARCHAR),
@Result(column="menu_p_sid", property="menuPSid", jdbcType=JdbcType.BIGINT),
@Result(column="menu_sort", property="menuSort", jdbcType=JdbcType.INTEGER),
@Result(column="menu_desc", property="menuDesc", jdbcType=JdbcType.VARCHAR),
@ -74,8 +75,8 @@ public interface SecMenuMapper extends SecMenuMapperExt {
@Select({
"select",
"id, menu_name, menu_type, menu_url, menu_url_img, menu_p_sid, menu_sort, menu_desc, ",
"create_time, update_time",
"id, menu_name, menu_type, menu_url, menu_url_img, menu_full_url, menu_p_sid, ",
"menu_sort, menu_desc, create_time, update_time",
"from sec_menu",
"where id = #{id,jdbcType=BIGINT}"
})
@ -85,6 +86,7 @@ public interface SecMenuMapper extends SecMenuMapperExt {
@Result(column="menu_type", property="menuType", jdbcType=JdbcType.INTEGER),
@Result(column="menu_url", property="menuUrl", jdbcType=JdbcType.VARCHAR),
@Result(column="menu_url_img", property="menuUrlImg", jdbcType=JdbcType.VARCHAR),
@Result(column="menu_full_url", property="menuFullUrl", jdbcType=JdbcType.VARCHAR),
@Result(column="menu_p_sid", property="menuPSid", jdbcType=JdbcType.BIGINT),
@Result(column="menu_sort", property="menuSort", jdbcType=JdbcType.INTEGER),
@Result(column="menu_desc", property="menuDesc", jdbcType=JdbcType.VARCHAR),
@ -108,6 +110,7 @@ public interface SecMenuMapper extends SecMenuMapperExt {
"menu_type = #{menuType,jdbcType=INTEGER},",
"menu_url = #{menuUrl,jdbcType=VARCHAR},",
"menu_url_img = #{menuUrlImg,jdbcType=VARCHAR},",
"menu_full_url = #{menuFullUrl,jdbcType=VARCHAR},",
"menu_p_sid = #{menuPSid,jdbcType=BIGINT},",
"menu_sort = #{menuSort,jdbcType=INTEGER},",
"menu_desc = #{menuDesc,jdbcType=VARCHAR},",

@ -44,6 +44,10 @@ public class SecMenuSqlProvider {
sql.VALUES("menu_url_img", "#{menuUrlImg,jdbcType=VARCHAR}");
}
if (record.getMenuFullUrl() != null) {
sql.VALUES("menu_full_url", "#{menuFullUrl,jdbcType=VARCHAR}");
}
if (record.getMenuPSid() != null) {
sql.VALUES("menu_p_sid", "#{menuPSid,jdbcType=BIGINT}");
}
@ -78,6 +82,7 @@ public class SecMenuSqlProvider {
sql.SELECT("menu_type");
sql.SELECT("menu_url");
sql.SELECT("menu_url_img");
sql.SELECT("menu_full_url");
sql.SELECT("menu_p_sid");
sql.SELECT("menu_sort");
sql.SELECT("menu_desc");
@ -120,6 +125,10 @@ public class SecMenuSqlProvider {
sql.SET("menu_url_img = #{record.menuUrlImg,jdbcType=VARCHAR}");
}
if (record.getMenuFullUrl() != null) {
sql.SET("menu_full_url = #{record.menuFullUrl,jdbcType=VARCHAR}");
}
if (record.getMenuPSid() != null) {
sql.SET("menu_p_sid = #{record.menuPSid,jdbcType=BIGINT}");
}
@ -153,6 +162,7 @@ public class SecMenuSqlProvider {
sql.SET("menu_type = #{record.menuType,jdbcType=INTEGER}");
sql.SET("menu_url = #{record.menuUrl,jdbcType=VARCHAR}");
sql.SET("menu_url_img = #{record.menuUrlImg,jdbcType=VARCHAR}");
sql.SET("menu_full_url = #{record.menuFullUrl,jdbcType=VARCHAR}");
sql.SET("menu_p_sid = #{record.menuPSid,jdbcType=BIGINT}");
sql.SET("menu_sort = #{record.menuSort,jdbcType=INTEGER}");
sql.SET("menu_desc = #{record.menuDesc,jdbcType=VARCHAR}");
@ -184,6 +194,10 @@ public class SecMenuSqlProvider {
sql.SET("menu_url_img = #{menuUrlImg,jdbcType=VARCHAR}");
}
if (record.getMenuFullUrl() != null) {
sql.SET("menu_full_url = #{menuFullUrl,jdbcType=VARCHAR}");
}
if (record.getMenuPSid() != null) {
sql.SET("menu_p_sid = #{menuPSid,jdbcType=BIGINT}");
}

@ -24,7 +24,7 @@ public class SecMenu implements Serializable {
private String menuName;
/**
* 菜单类型 0:菜单 1:按钮
* 菜单类型 1:菜单 2:按钮
*/
private Integer menuType;
@ -38,6 +38,11 @@ public class SecMenu implements Serializable {
*/
private String menuUrlImg;
/**
* 菜单完整URL
*/
private String menuFullUrl;
/**
* 父级菜单主键
*/
@ -105,6 +110,14 @@ public class SecMenu implements Serializable {
this.menuUrlImg = menuUrlImg;
}
public String getMenuFullUrl() {
return menuFullUrl;
}
public void setMenuFullUrl(String menuFullUrl) {
this.menuFullUrl = menuFullUrl;
}
public Long getMenuPSid() {
return menuPSid;
}
@ -162,6 +175,7 @@ public class SecMenu implements Serializable {
&& (this.getMenuType() == null ? other.getMenuType() == null : this.getMenuType().equals(other.getMenuType()))
&& (this.getMenuUrl() == null ? other.getMenuUrl() == null : this.getMenuUrl().equals(other.getMenuUrl()))
&& (this.getMenuUrlImg() == null ? other.getMenuUrlImg() == null : this.getMenuUrlImg().equals(other.getMenuUrlImg()))
&& (this.getMenuFullUrl() == null ? other.getMenuFullUrl() == null : this.getMenuFullUrl().equals(other.getMenuFullUrl()))
&& (this.getMenuPSid() == null ? other.getMenuPSid() == null : this.getMenuPSid().equals(other.getMenuPSid()))
&& (this.getMenuSort() == null ? other.getMenuSort() == null : this.getMenuSort().equals(other.getMenuSort()))
&& (this.getMenuDesc() == null ? other.getMenuDesc() == null : this.getMenuDesc().equals(other.getMenuDesc()))
@ -178,6 +192,7 @@ public class SecMenu implements Serializable {
result = prime * result + ((getMenuType() == null) ? 0 : getMenuType().hashCode());
result = prime * result + ((getMenuUrl() == null) ? 0 : getMenuUrl().hashCode());
result = prime * result + ((getMenuUrlImg() == null) ? 0 : getMenuUrlImg().hashCode());
result = prime * result + ((getMenuFullUrl() == null) ? 0 : getMenuFullUrl().hashCode());
result = prime * result + ((getMenuPSid() == null) ? 0 : getMenuPSid().hashCode());
result = prime * result + ((getMenuSort() == null) ? 0 : getMenuSort().hashCode());
result = prime * result + ((getMenuDesc() == null) ? 0 : getMenuDesc().hashCode());
@ -197,6 +212,7 @@ public class SecMenu implements Serializable {
sb.append(", menuType=").append(menuType);
sb.append(", menuUrl=").append(menuUrl);
sb.append(", menuUrlImg=").append(menuUrlImg);
sb.append(", menuFullUrl=").append(menuFullUrl);
sb.append(", menuPSid=").append(menuPSid);
sb.append(", menuSort=").append(menuSort);
sb.append(", menuDesc=").append(menuDesc);

@ -455,6 +455,76 @@ public class SecMenuExample {
return (Criteria) this;
}
public Criteria andMenuFullUrlIsNull() {
addCriterion("menu_full_url is null");
return (Criteria) this;
}
public Criteria andMenuFullUrlIsNotNull() {
addCriterion("menu_full_url is not null");
return (Criteria) this;
}
public Criteria andMenuFullUrlEqualTo(String value) {
addCriterion("menu_full_url =", value, "menuFullUrl");
return (Criteria) this;
}
public Criteria andMenuFullUrlNotEqualTo(String value) {
addCriterion("menu_full_url <>", value, "menuFullUrl");
return (Criteria) this;
}
public Criteria andMenuFullUrlGreaterThan(String value) {
addCriterion("menu_full_url >", value, "menuFullUrl");
return (Criteria) this;
}
public Criteria andMenuFullUrlGreaterThanOrEqualTo(String value) {
addCriterion("menu_full_url >=", value, "menuFullUrl");
return (Criteria) this;
}
public Criteria andMenuFullUrlLessThan(String value) {
addCriterion("menu_full_url <", value, "menuFullUrl");
return (Criteria) this;
}
public Criteria andMenuFullUrlLessThanOrEqualTo(String value) {
addCriterion("menu_full_url <=", value, "menuFullUrl");
return (Criteria) this;
}
public Criteria andMenuFullUrlLike(String value) {
addCriterion("menu_full_url like", value, "menuFullUrl");
return (Criteria) this;
}
public Criteria andMenuFullUrlNotLike(String value) {
addCriterion("menu_full_url not like", value, "menuFullUrl");
return (Criteria) this;
}
public Criteria andMenuFullUrlIn(List<String> values) {
addCriterion("menu_full_url in", values, "menuFullUrl");
return (Criteria) this;
}
public Criteria andMenuFullUrlNotIn(List<String> values) {
addCriterion("menu_full_url not in", values, "menuFullUrl");
return (Criteria) this;
}
public Criteria andMenuFullUrlBetween(String value1, String value2) {
addCriterion("menu_full_url between", value1, value2, "menuFullUrl");
return (Criteria) this;
}
public Criteria andMenuFullUrlNotBetween(String value1, String value2) {
addCriterion("menu_full_url not between", value1, value2, "menuFullUrl");
return (Criteria) this;
}
public Criteria andMenuPSidIsNull() {
addCriterion("menu_p_sid is null");
return (Criteria) this;

Loading…
Cancel
Save