接口调试

This commit is contained in:
mashuai 2023-12-13 13:51:32 +08:00
parent 9c7b61fc39
commit 5c9f47a82d
8 changed files with 67 additions and 40 deletions

View File

@ -45,17 +45,21 @@ public class BmCarouselSetController extends BaseController {
} }
/** /**
* 新增轮播图信息 * 新增/修改轮播图信息
* @param bmCarouselSet * @param bmCarouselSet
* @return * @return
*/ */
@ApiOperation("新增轮播图信息") @ApiOperation("新增/修改轮播图信息")
@PostMapping("/add") @PostMapping("/addorupdate")
public AjaxResult addCarouselChartInfo(@RequestBody BmCarouselSet bmCarouselSet) public AjaxResult addCarouselChartInfo(@RequestBody BmCarouselSet bmCarouselSet)
{ {
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getUserId();
bmCarouselSet.setCreator(userId.intValue()); bmCarouselSet.setCreator(userId.intValue());
return toAjax(bmCarouselSetService.insertConfig(bmCarouselSet)); if (bmCarouselSet.getId() != null) {
return toAjax(bmCarouselSetService.update(bmCarouselSet));
} else {
return toAjax(bmCarouselSetService.insertConfig(bmCarouselSet));
}
} }
/** /**
@ -71,18 +75,6 @@ public class BmCarouselSetController extends BaseController {
return success(bmCarouselSet); return success(bmCarouselSet);
} }
/**
* 编辑轮播图信息
* @param bmCarouselSet
* @return
*/
@ApiOperation("编辑轮播图信息")
@PutMapping("/update")
public AjaxResult updateCarouselChartInfo(@RequestBody BmCarouselSet bmCarouselSet)
{
return toAjax(bmCarouselSetService.update(bmCarouselSet));
}
/** /**
* 删除轮播图信息 * 删除轮播图信息
* @param id * @param id

View File

@ -49,17 +49,21 @@ public class BmTopicInfoController extends BaseController {
} }
/** /**
* 新增专题资讯信息 * 新增/修改专题资讯信息
* @param bmTopicInfo * @param bmTopicInfo
* @return * @return
*/ */
@ApiOperation("新增专题资讯信息") @ApiOperation("新增/修改专题资讯信息")
@PostMapping("/add") @PostMapping("/addorupdate")
public AjaxResult addCarouselChartInfo(@RequestBody BmTopicInfo bmTopicInfo) public AjaxResult addCarouselChartInfo(@RequestBody BmTopicInfo bmTopicInfo)
{ {
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getUserId();
bmTopicInfo.setCreator(userId.intValue()); bmTopicInfo.setCreator(userId.intValue());
return toAjax(bmTopicInfoService.insertConfig(bmTopicInfo)); if (bmTopicInfo.getId() != null) {
return toAjax(bmTopicInfoService.update(bmTopicInfo));
} else {
return toAjax(bmTopicInfoService.insertConfig(bmTopicInfo));
}
} }
/** /**
@ -78,18 +82,6 @@ public class BmTopicInfoController extends BaseController {
return success(bmTopicInfo); return success(bmTopicInfo);
} }
/**
* 编辑专题资讯信息
* @param bmTopicInfo
* @return
*/
@ApiOperation("编辑专题资讯信息")
@PutMapping("/update")
public AjaxResult updateCarouselChartInfo(@RequestBody BmTopicInfo bmTopicInfo)
{
return toAjax(bmTopicInfoService.update(bmTopicInfo));
}
/** /**
* 删除专题资讯信息 * 删除专题资讯信息
* @param id * @param id

View File

@ -1,18 +1,24 @@
package com.bonus.zlpt.home.pojo; package com.bonus.zlpt.home.pojo;
import com.bonus.zlpt.common.core.web.page.PageDomain; import com.bonus.zlpt.common.core.web.page.PageDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@Data @Data
@ApiModel("轮播图配置搜索入参")
public class BmCarouselDto extends PageDomain { public class BmCarouselDto extends PageDomain {
//轮播图名称 //轮播图名称
@ApiModelProperty(value = "轮播图名称", required = true)
private String carName; private String carName;
//开始时间 //开始时间
@ApiModelProperty(value = "开始时间", required = true)
private String beginTime; private String beginTime;
//结束时间 //结束时间
@ApiModelProperty(value = "结束时间", required = true)
private String endTime; private String endTime;
} }

View File

@ -1,6 +1,8 @@
package com.bonus.zlpt.home.pojo; package com.bonus.zlpt.home.pojo;
import com.bonus.zlpt.common.core.annotation.Excel; import com.bonus.zlpt.common.core.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
@ -10,49 +12,62 @@ import lombok.Data;
* @since 2023-12-03 15:24:10 * @since 2023-12-03 15:24:10
*/ */
@Data @Data
@ApiModel("轮播图配置")
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class BmCarouselSet { public class BmCarouselSet {
//轮播图id //轮播图id
@Excel(name = "轮播图id") @Excel(name = "轮播图id")
@ApiModelProperty(value = "轮播图id", required = true)
private Integer id; private Integer id;
//轮播图名称 //轮播图名称
@Excel(name = "轮播图名称") @Excel(name = "轮播图名称")
@ApiModelProperty(value = "轮播图名称", required = true)
private String carName; private String carName;
//轮播图图片地址 //轮播图图片地址
@Excel(name = "轮播图图片地址") @Excel(name = "轮播图图片地址")
@ApiModelProperty(value = "轮播图图片地址", required = true)
private String carUrl; private String carUrl;
//配置类型0资讯1跳转地址考虑用数据字典管理配置轮播图类型 //配置类型0资讯1跳转地址考虑用数据字典管理配置轮播图类型
@Excel(name = "配置类型0资讯1跳转地址考虑用数据字典管理配置轮播图类型") @Excel(name = "配置类型0资讯1跳转地址考虑用数据字典管理配置轮播图类型")
@ApiModelProperty(value = "配置类型0资讯1跳转地址", required = true)
private String type; private String type;
//配置跳转地址 //配置跳转地址
@Excel(name = "配置跳转地址") @Excel(name = "配置跳转地址")
@ApiModelProperty(value = "配置跳转地址", required = true)
private String openUrl; private String openUrl;
//是否启用0不启用1启用 //是否启用0不启用1启用
@Excel(name = "是否启用0不启用1启用") @Excel(name = "是否启用0不启用1启用")
@ApiModelProperty(value = "是否启用0不启用1启用", required = true)
private String status; private String status;
//创建时间 //创建时间
@Excel(name = "创建时间") @Excel(name = "创建时间")
@ApiModelProperty(value = "创建时间", required = true)
private String createTime; private String createTime;
//创建人id //创建人id
@Excel(name = "创建人") @Excel(name = "创建人id")
@ApiModelProperty(value = "创建人id", required = true)
private Integer creator; private Integer creator;
//创建人 //创建人
@Excel(name = "创建人")
@ApiModelProperty(value = "创建人", required = true)
private String createBy; private String createBy;
//排序 //排序
@Excel(name = "排序") @Excel(name = "排序")
@ApiModelProperty(value = "排序", required = true)
private String sort; private String sort;
//是否删除(0 , 1 ) //是否删除(0 , 1 )
@Excel(name = "是否删除(0 是, 1 否)") @Excel(name = "是否删除(0 是, 1 否)")
@ApiModelProperty(value = "是否删除(0 是, 1 否)", required = true)
private String isActive; private String isActive;
} }

View File

@ -1,22 +1,28 @@
package com.bonus.zlpt.home.pojo; package com.bonus.zlpt.home.pojo;
import com.bonus.zlpt.common.core.web.domain.BaseEntity;
import com.bonus.zlpt.common.core.web.page.PageDomain; import com.bonus.zlpt.common.core.web.page.PageDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@Data @Data
@ApiModel("专题资讯表搜索入参")
public class BmTopicDto extends PageDomain { public class BmTopicDto extends PageDomain {
//名称 //名称
@ApiModelProperty(value = "名称", required = true)
private String topicName; private String topicName;
//考虑数据字典管理专题资讯类型 //考虑数据字典管理专题资讯类型
@ApiModelProperty(value = "考虑数据字典管理专题资讯类型", required = true)
private Integer type; private Integer type;
//开始时间 //开始时间
@ApiModelProperty(value = "开始时间", required = true)
private String beginTime; private String beginTime;
//结束时间 //结束时间
@ApiModelProperty(value = "结束时间", required = true)
private String endTime; private String endTime;
} }

View File

@ -3,6 +3,8 @@ package com.bonus.zlpt.home.pojo;
import java.io.Serializable; import java.io.Serializable;
import com.bonus.zlpt.common.core.annotation.Excel; import com.bonus.zlpt.common.core.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
@ -12,38 +14,52 @@ import lombok.Data;
* @since 2023-12-04 09:48:36 * @since 2023-12-04 09:48:36
*/ */
@Data @Data
@ApiModel("专题资讯表")
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class BmTopicInfo { public class BmTopicInfo {
//专题资讯id //专题资讯id
@ApiModelProperty(value = "专题资讯id", required = true)
@Excel(name = "专题资讯id") @Excel(name = "专题资讯id")
private Integer id; private Integer id;
//名称 //名称
@ApiModelProperty(value = "名称", required = true)
@Excel(name = "名称") @Excel(name = "名称")
private String topicName; private String topicName;
//考虑数据字典管理专题资讯类型 //考虑数据字典管理专题资讯类型
@ApiModelProperty(value = "考虑数据字典管理专题资讯类型", required = true)
@Excel(name = "考虑数据字典管理专题资讯类型") @Excel(name = "考虑数据字典管理专题资讯类型")
private Integer type; private Integer type;
//浏览次数 //浏览次数
@ApiModelProperty(value = "浏览次数", required = true)
@Excel(name = "浏览次数") @Excel(name = "浏览次数")
private Integer viewNum; private Integer viewNum;
//内容 //内容
@ApiModelProperty(value = "内容", required = true)
@Excel(name = "内容") @Excel(name = "内容")
private String content; private String content;
//是否删除 //是否删除
@ApiModelProperty(value = "是否删除(0 是, 1 否)", required = true)
@Excel(name = "是否删除(0 是, 1 否)") @Excel(name = "是否删除(0 是, 1 否)")
private String isActive; private String isActive;
//创建人 //创建人id
@Excel(name = "创建人") @ApiModelProperty(value = "创建人id", required = true)
@Excel(name = "创建人id")
private Integer creator; private Integer creator;
//创建人
@ApiModelProperty(value = "创建人", required = true)
@Excel(name = "创建人")
private String creatBy;
//创建时间 //创建时间
@ApiModelProperty(value = "创建时间", required = true)
@Excel(name = "创建时间") @Excel(name = "创建时间")
private String createTime; private String createTime;

View File

@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.bonus.zlpt.home.mapper.BmTopicInfoMapper"> <mapper namespace="com.bonus.zlpt.home.mapper.BmTopicInfoMapper">
<sql id="selectBmTopicVo"> <sql id="selectBmTopicVo">
select bt.id, bt.topic_name, bt.type, bt.view_num, bt.content, bt.is_active, su.user_name AS creator, bt.create_time select bt.id, bt.topic_name, bt.type, bt.view_num, bt.content, bt.is_active, su.user_name AS creatBy, bt.create_time
from bm_topic_info bt from bm_topic_info bt
left join sys_user su on bt.creator = su.user_id left join sys_user su on bt.creator = su.user_id
</sql> </sql>
@ -61,6 +61,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSpecialInfoList" resultType="com.bonus.zlpt.home.pojo.BmTopicInfo"> <select id="selectSpecialInfoList" resultType="com.bonus.zlpt.home.pojo.BmTopicInfo">
<include refid="selectBmTopicVo"/> <include refid="selectBmTopicVo"/>
<where> <where>
<if test="type != null and type != ''">
AND type = #{type}
</if>
<if test="topicName != null and topicName != ''"> <if test="topicName != null and topicName != ''">
AND topic_name like concat('%', #{topicName}, '%') AND topic_name like concat('%', #{topicName}, '%')
</if> </if>

View File

@ -65,9 +65,6 @@ public class SysUserController extends BaseController
@GetMapping("/selectUserVo") @GetMapping("/selectUserVo")
public R<UserVo> selectUserVo(@RequestParam("userId") Long userId){ public R<UserVo> selectUserVo(@RequestParam("userId") Long userId){
UserVo userVo = userService.selectUserVo(userId);
System.err.println(userVo);
return R.ok(userService.selectUserVo(userId)); return R.ok(userService.selectUserVo(userId));
} }