1.提交导航样式模块相关接口

2.更改登录返回用户id类型(登录时未返回用户id)
master
rong.liu 2 years ago
parent 570c6d0582
commit 2310168913
  1. 79
      src/main/java/com/huoran/iasf/controller/SysNavigationStyleController.java
  2. 9
      src/main/java/com/huoran/iasf/entity/SysColumn.java
  3. 3
      src/main/java/com/huoran/iasf/entity/SysContent.java
  4. 52
      src/main/java/com/huoran/iasf/entity/SysNavigationStyle.java
  5. 15
      src/main/java/com/huoran/iasf/mapper/SysNavigationStyleMapper.java
  6. 15
      src/main/java/com/huoran/iasf/mapper/xml/SysNavigationStyleMapper.xml
  7. 14
      src/main/java/com/huoran/iasf/service/SysNavigationStyleService.java
  8. 26
      src/main/java/com/huoran/iasf/service/impl/SysNavigationStyleServiceImpl.java
  9. 2
      src/main/java/com/huoran/iasf/vo/resp/LoginRespVO.java

@ -0,0 +1,79 @@
package com.huoran.iasf.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.huoran.iasf.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.apache.commons.lang.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestParam;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import com.huoran.iasf.service.SysNavigationStyleService;
import com.huoran.iasf.entity.SysNavigationStyle;
import java.util.List;
/**
* @描述导航样式配置控制类
* @作者: Rong
* @日期: 2022-09-01
*/
@RestController
@RequestMapping("/sysNavigationStyle")
@Api(value = "导航样式配置:SysNavigationStyleController", tags = "R-导航样式配置")
public class SysNavigationStyleController {
@Autowired
public SysNavigationStyleService service;
@PostMapping("/searchAllBySite")
@ApiOperation(value = "按站点搜索所有", response = SysNavigationStyle.class)
public R listByEntity(@ApiParam(name = "siteId", value = "站点id", required = true) @RequestParam Integer siteId) {
QueryWrapper<SysNavigationStyle> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("site_id", siteId);
List<SysNavigationStyle> pageList = service.list(queryWrapper);
return R.success(pageList);
}
@PostMapping("/findById")
@ApiOperation(value = "查询详情", response = SysNavigationStyle.class)
public R findById(@ApiParam(name = "id", value = "主键", required = true) @RequestParam Integer id) {
SysNavigationStyle sysNavigationStyle = service.getById(id);
return R.success(sysNavigationStyle);
}
@PostMapping("/save")
@ApiOperation(value = "新增", response = SysNavigationStyle.class)
public R save(@RequestBody @ApiParam(name = "导航样式配置对象", value = "传入json格式", required = true) SysNavigationStyle sysNavigationStyle) {
boolean addState = service.save(sysNavigationStyle);
return addState ? R.success() : R.fail("新增失败");
}
@PostMapping("/update")
@ApiOperation(value = "修改", response = SysNavigationStyle.class)
public R update(@RequestBody @ApiParam(name = "导航样式配置对象", value = "传入json格式", required = true) SysNavigationStyle sysNavigationStyle) {
boolean updateState = service.updateById(sysNavigationStyle);
return updateState ? R.success() : R.fail("编辑失败");
}
@PostMapping("/delete")
@ApiOperation(value = "删除", response = SysNavigationStyle.class)
public R delete(@ApiParam(name = "id", value = "主键", required = true) @RequestParam Integer id) {
boolean delState = service.removeById(id);
return delState ? R.success() : R.fail("删除失败");
}
}

@ -106,6 +106,13 @@ public class SysColumn implements Serializable {
@NotNull(message = "站点id不能为空!") @NotNull(message = "站点id不能为空!")
private Integer siteId; private Integer siteId;
@ApiModelProperty(value = "栏目副标题")
private String subtitle;
//----------------------非数据库字段Start----------------------
@ApiModelProperty("子分类") @ApiModelProperty("子分类")
@TableField(exist = false) @TableField(exist = false)
private List<SysColumn> children; private List<SysColumn> children;
@ -129,4 +136,6 @@ public class SysColumn implements Serializable {
return 0; return 0;
} }
//----------------------非数据库字段End----------------------
} }

@ -107,4 +107,7 @@ public class SysContent implements Serializable {
@ApiModelProperty(value = "站点id") @ApiModelProperty(value = "站点id")
@NotNull(message = "站点id不能为空!") @NotNull(message = "站点id不能为空!")
private Integer siteId; private Integer siteId;
@ApiModelProperty(value = "独立模板状态(0禁用;1启用)")
private Integer templateStatus;
} }

@ -0,0 +1,52 @@
package com.huoran.iasf.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @描述导航样式配置
* @作者: Rong
* @日期: 2022-09-01
*/
@Data
@ApiModel(value = "导航样式配置")
@TableName("sys_navigation_style")
public class SysNavigationStyle implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "主键")
private Integer id;
@ApiModelProperty(value = "导航样式")
private Integer navigationStyle;
@ApiModelProperty(value = "样式模板")
private Integer styleTemplate;
@ApiModelProperty(value = "站点id")
private Integer siteId;
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createTime;
@ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
@ApiModelProperty(value = "是否删除(1未删除;0已删除)")
@TableLogic
private Integer deleted;
}

@ -0,0 +1,15 @@
package com.huoran.iasf.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huoran.iasf.entity.SysNavigationStyle;
import org.apache.ibatis.annotations.Mapper;
/**
* @描述导航样式配置 Mapper 接口
* @作者: Rong
* @日期: 2022-09-01
*/
@Mapper
public interface SysNavigationStyleMapper extends BaseMapper<SysNavigationStyle> {
}

@ -0,0 +1,15 @@
<?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.huoran.iasf.mapper.SysNavigationStyleMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.huoran.iasf.entity.SysNavigationStyle">
<id column="id" property="id"/>
<result column="navigation_style" property="navigationStyle"/>
<result column="style_template" property="styleTemplate"/>
<result column="site_id" property="siteId"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
</mapper>

@ -0,0 +1,14 @@
package com.huoran.iasf.service;
import com.huoran.iasf.entity.SysNavigationStyle;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @描述导航样式配置 service接口
* @作者: Rong
* @日期: 2022-09-01
*/
public interface SysNavigationStyleService extends IService<SysNavigationStyle> {
}

@ -0,0 +1,26 @@
package com.huoran.iasf.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huoran.iasf.entity.SysNavigationStyle;
import com.huoran.iasf.mapper.SysNavigationStyleMapper;
import com.huoran.iasf.service.SysNavigationStyleService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
/**
* @描述导航样式配置 服务类
* @作者: Rong
* @日期: 2022-09-01
*/
@Service
public class SysNavigationStyleServiceImpl extends ServiceImpl<SysNavigationStyleMapper, SysNavigationStyle> implements SysNavigationStyleService {
@Autowired
private SysNavigationStyleMapper mapper;
}

@ -20,7 +20,7 @@ public class LoginRespVO {
@ApiModelProperty(value = "用户名") @ApiModelProperty(value = "用户名")
private String username; private String username;
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
private String id; private Integer id;
@ApiModelProperty(value = "电话") @ApiModelProperty(value = "电话")
private String phone; private String phone;
@ApiModelProperty(value = "用户所拥有的菜单权限") @ApiModelProperty(value = "用户所拥有的菜单权限")

Loading…
Cancel
Save