增加置顶接口
This commit is contained in:
parent
6e7c224109
commit
7d4f3cdb57
|
@ -0,0 +1,7 @@
|
||||||
|
ALTER TABLE `tb_data_resource`
|
||||||
|
ADD COLUMN `pin_top` int NULL COMMENT '是否置顶' ,
|
||||||
|
ADD COLUMN `pin_top_time` datetime NULL COMMENT '置顶操作时间';
|
||||||
|
|
||||||
|
UPDATE tb_data_resource
|
||||||
|
SET pin_top = 0,
|
||||||
|
pin_top_time = NOW();
|
|
@ -153,6 +153,16 @@ public class ResourceController {
|
||||||
return new Result<>().ok(resourceService.pageWithAttrs(jsonObject, resourceService.selectDTOPageSpecilTotal(resourceDTO)));
|
return new Result<>().ok(resourceService.pageWithAttrs(jsonObject, resourceService.selectDTOPageSpecilTotal(resourceDTO)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("/pin_top/{id}")
|
||||||
|
@LogOperation(value = "置顶该能力资源")
|
||||||
|
public Result pinTop(@PathVariable("id") Long id) {
|
||||||
|
ResourceDTO data = resourceService.get(id);
|
||||||
|
data.setPinTop(1);
|
||||||
|
data.setPinTopTime(new Date());
|
||||||
|
resourceService.update(data);
|
||||||
|
return new Result<>().ok(id);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
@ApiOperation("查询能力资源详细信息")
|
@ApiOperation("查询能力资源详细信息")
|
||||||
@LogOperation("查询能力资源详细信息")
|
@LogOperation("查询能力资源详细信息")
|
||||||
|
@ -253,7 +263,7 @@ public class ResourceController {
|
||||||
if (!"f".equals(source) && dto.getId() != null) {//后台挂架直接上架
|
if (!"f".equals(source) && dto.getId() != null) {//后台挂架直接上架
|
||||||
try {
|
try {
|
||||||
apiGatewayService.registerApi2Gateway(dto.getId().toString());
|
apiGatewayService.registerApi2Gateway(dto.getId().toString());
|
||||||
}catch (Exception exception){
|
} catch (Exception exception) {
|
||||||
//注册失败忽略,简单记录一下
|
//注册失败忽略,简单记录一下
|
||||||
logger.error("挂接网关注册失败", exception);
|
logger.error("挂接网关注册失败", exception);
|
||||||
}
|
}
|
||||||
|
@ -268,7 +278,7 @@ public class ResourceController {
|
||||||
try {
|
try {
|
||||||
apiGatewayService.resetApiGroup(source);
|
apiGatewayService.resetApiGroup(source);
|
||||||
apiGatewayService.registerApi2Gateway(source);
|
apiGatewayService.registerApi2Gateway(source);
|
||||||
}catch (Exception exception){
|
} catch (Exception exception) {
|
||||||
//注册失败忽略,简单记录一下
|
//注册失败忽略,简单记录一下
|
||||||
logger.error("挂接网关注册失败", exception);
|
logger.error("挂接网关注册失败", exception);
|
||||||
return new Result().error(exception.getMessage());
|
return new Result().error(exception.getMessage());
|
||||||
|
|
|
@ -116,6 +116,12 @@ public class ResourceDTO extends AuditingBaseDTO implements Serializable {
|
||||||
@ApiModelProperty(value = "申请单号")
|
@ApiModelProperty(value = "申请单号")
|
||||||
private String applyNumber;
|
private String applyNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "置顶标识")
|
||||||
|
private Integer pinTop;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "置顶时间")
|
||||||
|
private Date pinTopTime;
|
||||||
|
|
||||||
public String getDelFlagTip() {
|
public String getDelFlagTip() {
|
||||||
if (this.delFlag != null) {
|
if (this.delFlag != null) {
|
||||||
Optional<ResourceEntityDelFlag> resourceEntityDelFlagOptional = Optional.ofNullable(ResourceEntityDelFlag.getByFlag(this.delFlag));
|
Optional<ResourceEntityDelFlag> resourceEntityDelFlagOptional = Optional.ofNullable(ResourceEntityDelFlag.getByFlag(this.delFlag));
|
||||||
|
|
|
@ -140,6 +140,17 @@ public class ResourceEntity extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private String undercarriageEnclosure;
|
private String undercarriageEnclosure;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 置顶标识
|
||||||
|
*/
|
||||||
|
private Integer pinTop;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 置顶时间
|
||||||
|
*/
|
||||||
|
private Date pinTopTime;
|
||||||
|
|
||||||
@TableField(value = "info_list", typeHandler = FastjsonTypeHandler.class)
|
@TableField(value = "info_list", typeHandler = FastjsonTypeHandler.class)
|
||||||
private List<AttrEntity> infoList;
|
private List<AttrEntity> infoList;
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,9 @@ spring:
|
||||||
#MySQL
|
#MySQL
|
||||||
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://192.168.124.236:3306/share_platform?useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&useSSL=false
|
url: jdbc:mysql://192.168.124.243:3306/share_platform?useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&useSSL=false
|
||||||
username: root
|
username: root
|
||||||
password: Hisense2019
|
password: Liwen073898!
|
||||||
#Hisense2019
|
#Hisense2019
|
||||||
# #Oracle
|
# #Oracle
|
||||||
# driver-class-name: oracle.jdbc.OracleDriver
|
# driver-class-name: oracle.jdbc.OracleDriver
|
||||||
|
|
|
@ -37,6 +37,8 @@
|
||||||
<result property="infoList" column="info_list"
|
<result property="infoList" column="info_list"
|
||||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||||
<result property="applyNumber" column="apply_number"/>
|
<result property="applyNumber" column="apply_number"/>
|
||||||
|
<result property="pinTop" column="pin_top"/>
|
||||||
|
<result property="pinTopTime" column="pin_top_time"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="resourceDTO" type="io.renren.modules.resource.dto.ResourceDTO">
|
<resultMap id="resourceDTO" type="io.renren.modules.resource.dto.ResourceDTO">
|
||||||
|
@ -81,6 +83,8 @@
|
||||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||||
<result property="total" column="total"/>
|
<result property="total" column="total"/>
|
||||||
<result property="applyNumber" column="apply_number"/>
|
<result property="applyNumber" column="apply_number"/>
|
||||||
|
<result property="pinTop" column="pin_top"/>
|
||||||
|
<result property="pinTopTime" column="pin_top_time"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<update id="deleteByIds">
|
<update id="deleteByIds">
|
||||||
|
|
Loading…
Reference in New Issue