1.修改NewHosts 实体类

2.添加主播更新接口
3.修改mybatis配置处理类型为 simple
This commit is contained in:
2025-07-18 15:20:56 +08:00
parent 01e91d252c
commit 23e5fcdde6
3 changed files with 106 additions and 44 deletions

View File

@@ -1,11 +1,14 @@
package com.yupi.springbootinit.controller;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yupi.springbootinit.common.BaseResponse;
import com.yupi.springbootinit.common.ResultUtils;
import com.yupi.springbootinit.model.dto.host.HistoryDataDTO;
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.SevenDaysData;
import com.yupi.springbootinit.service.HostInfoService;
@@ -35,4 +38,10 @@ public class HostInfoController {
return ResultUtils.success(conditionHosts);
}
@PostMapping("/update")
public BaseResponse<Boolean> update(@RequestBody NewHosts newHosts){
boolean b = hostInfoService.updateById(newHosts);
return ResultUtils.success(b);
}
}

View File

@@ -1,99 +1,152 @@
package com.yupi.springbootinit.model.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;
/*
* @author: ziin
* @date: 2025/6/10 18:54
*/
* @author: ziin
* @date: 2025/7/18 14:36
*/
/**
* 主播数据表
*/
@Data
@TableName(value = "server_new_hosts")
public class NewHosts {
/**
* 主键
*/
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 主播id
*/
* 主播id
*/
@TableField(value = "hosts_id")
private String hostsId;
/**
* 主播等级
*/
* 主播等级
*/
@TableField(value = "hosts_level")
private String hostsLevel;
/**
* 主播金币
*/
* 主播金币
*/
@TableField(value = "hosts_coins")
private Integer hostsCoins;
/**
* 邀请类型
*/
* 邀请类型
*/
@TableField(value = "Invitation_type")
private Integer invitationType;
@ApiModelProperty(value = "在线人数", example = "1000")
private Integer onlineFans;
/**
* 粉丝数量
*/
* 在线人数
*/
@TableField(value = "online_fans")
private Integer onlineFans;
/**
* 粉丝数量
*/
@TableField(value = "fans")
private Integer fans;
/**
* 关注数量
*/
* 关注数量
*/
@TableField(value = "fllowernum")
private Integer fllowernum;
/**
* 昨日金币
*/
* 昨日金币
*/
@TableField(value = "yesterday_coins")
private Integer yesterdayCoins;
/**
* 主播国家
*/
* 主播国家
*/
@TableField(value = "country")
private String country;
/**
* 直播类型 娱乐,游戏
*/
* 直播类型 娱乐,游戏
*/
@TableField(value = "hosts_kind")
private String hostsKind;
/**
* 租户 Id
*/
* 是否已经分配给员工
*/
@TableField(value = "is_assigned")
private Byte isAssigned;
/**
* 租户 Id
*/
@TableField(value = "tenant_id")
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
*/
@TableField(value = "user_id")
private Long userId;
/**
* 入库人
*/
private Long creator;
* 是否删除
*/
@TableField(value = "deleted")
private Byte deleted;
/**
* 数据插入时间
*/
private Date createTime;
* uid
*/
@TableField(value = "`uid`")
private String uid;
/**
* 更新人
*/
private String updater;
* AI 操作
*/
@TableField(value = "ai_operation")
private Byte aiOperation;
/**
* 更新时间
*/
private Date updateTime;
* 是否建联
*/
@TableField(value = "operation_status")
private Byte operationStatus;
}

View File

@@ -49,7 +49,7 @@ mybatis-plus:
map-underscore-to-camel-case: false
log-impl: org.apache.ibatis.logging.log4j2.Log4j2Impl
log-sql:
default-executor-type: batch
default-executor-type: simple
global-config:
db-config:
logic-delete-field: isDelete # 全局逻辑删除的实体字段名