1.修改NewHosts 实体类
2.添加主播更新接口 3.修改mybatis配置处理类型为 simple
This commit is contained in:
@@ -1,11 +1,14 @@
|
|||||||
package com.yupi.springbootinit.controller;
|
package com.yupi.springbootinit.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.yupi.springbootinit.common.BaseResponse;
|
import com.yupi.springbootinit.common.BaseResponse;
|
||||||
import com.yupi.springbootinit.common.ResultUtils;
|
import com.yupi.springbootinit.common.ResultUtils;
|
||||||
import com.yupi.springbootinit.model.dto.host.HistoryDataDTO;
|
import com.yupi.springbootinit.model.dto.host.HistoryDataDTO;
|
||||||
import com.yupi.springbootinit.model.dto.host.HostInfoDTO;
|
import com.yupi.springbootinit.model.dto.host.HostInfoDTO;
|
||||||
|
import com.yupi.springbootinit.model.entity.NewHosts;
|
||||||
|
import com.yupi.springbootinit.model.entity.ServerEmployeeHosts;
|
||||||
import com.yupi.springbootinit.model.vo.hosts.NewHostsVO;
|
import com.yupi.springbootinit.model.vo.hosts.NewHostsVO;
|
||||||
import com.yupi.springbootinit.model.vo.hosts.SevenDaysData;
|
import com.yupi.springbootinit.model.vo.hosts.SevenDaysData;
|
||||||
import com.yupi.springbootinit.service.HostInfoService;
|
import com.yupi.springbootinit.service.HostInfoService;
|
||||||
@@ -35,4 +38,10 @@ public class HostInfoController {
|
|||||||
return ResultUtils.success(conditionHosts);
|
return ResultUtils.success(conditionHosts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/update")
|
||||||
|
public BaseResponse<Boolean> update(@RequestBody NewHosts newHosts){
|
||||||
|
boolean b = hostInfoService.updateById(newHosts);
|
||||||
|
return ResultUtils.success(b);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,99 +1,152 @@
|
|||||||
package com.yupi.springbootinit.model.entity;
|
package com.yupi.springbootinit.model.entity;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.util.Date;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @author: ziin
|
* @author: ziin
|
||||||
* @date: 2025/6/10 18:54
|
* @date: 2025/7/18 14:36
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主播数据表
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@TableName(value = "server_new_hosts")
|
||||||
public class NewHosts {
|
public class NewHosts {
|
||||||
/**
|
/**
|
||||||
* 主键
|
* 主键
|
||||||
*/
|
*/
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主播id
|
* 主播id
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "hosts_id")
|
||||||
private String hostsId;
|
private String hostsId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主播等级
|
* 主播等级
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "hosts_level")
|
||||||
private String hostsLevel;
|
private String hostsLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主播金币
|
* 主播金币
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "hosts_coins")
|
||||||
private Integer hostsCoins;
|
private Integer hostsCoins;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邀请类型
|
* 邀请类型
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "Invitation_type")
|
||||||
private Integer invitationType;
|
private Integer invitationType;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "在线人数", example = "1000")
|
|
||||||
private Integer onlineFans;
|
|
||||||
/**
|
/**
|
||||||
* 粉丝数量
|
* 在线人数
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "online_fans")
|
||||||
|
private Integer onlineFans;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 粉丝数量
|
||||||
|
*/
|
||||||
|
@TableField(value = "fans")
|
||||||
private Integer fans;
|
private Integer fans;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关注数量
|
* 关注数量
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "fllowernum")
|
||||||
private Integer fllowernum;
|
private Integer fllowernum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 昨日金币
|
* 昨日金币
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "yesterday_coins")
|
||||||
private Integer yesterdayCoins;
|
private Integer yesterdayCoins;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主播国家
|
* 主播国家
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "country")
|
||||||
private String country;
|
private String country;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 直播类型 娱乐,游戏
|
* 直播类型 娱乐,游戏
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "hosts_kind")
|
||||||
private String hostsKind;
|
private String hostsKind;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户 Id
|
* 是否已经分配给员工
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "is_assigned")
|
||||||
|
private Byte isAssigned;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户 Id
|
||||||
|
*/
|
||||||
|
@TableField(value = "tenant_id")
|
||||||
private Long tenantId;
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库人
|
||||||
|
*/
|
||||||
|
@TableField(value = "creator")
|
||||||
|
private Long creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据插入时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
@TableField(value = "updater")
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户 Id
|
* 用户 Id
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "user_id")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入库人
|
* 是否删除
|
||||||
*/
|
*/
|
||||||
private Long creator;
|
@TableField(value = "deleted")
|
||||||
|
private Byte deleted;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据插入时间
|
* uid
|
||||||
*/
|
*/
|
||||||
private Date createTime;
|
@TableField(value = "`uid`")
|
||||||
|
private String uid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新人
|
* AI 操作
|
||||||
*/
|
*/
|
||||||
private String updater;
|
@TableField(value = "ai_operation")
|
||||||
|
private Byte aiOperation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 是否建联
|
||||||
*/
|
*/
|
||||||
private Date updateTime;
|
@TableField(value = "operation_status")
|
||||||
|
private Byte operationStatus;
|
||||||
}
|
}
|
||||||
@@ -49,7 +49,7 @@ mybatis-plus:
|
|||||||
map-underscore-to-camel-case: false
|
map-underscore-to-camel-case: false
|
||||||
log-impl: org.apache.ibatis.logging.log4j2.Log4j2Impl
|
log-impl: org.apache.ibatis.logging.log4j2.Log4j2Impl
|
||||||
log-sql:
|
log-sql:
|
||||||
default-executor-type: batch
|
default-executor-type: simple
|
||||||
global-config:
|
global-config:
|
||||||
db-config:
|
db-config:
|
||||||
logic-delete-field: isDelete # 全局逻辑删除的实体字段名
|
logic-delete-field: isDelete # 全局逻辑删除的实体字段名
|
||||||
|
|||||||
Reference in New Issue
Block a user