主播信息添加添加在线人数字段
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.yupi.springbootinit.model.dto.host;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -9,80 +11,79 @@ import java.util.Date;
|
||||
* @date: 2025/6/10 18:58
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("主播信息DTO")
|
||||
public class HostInfoDTO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty(value = "主键", example = "1")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 主播id
|
||||
*/
|
||||
@ApiModelProperty(value = "主播id", example = "host123")
|
||||
private String hostsId;
|
||||
|
||||
/**
|
||||
* 主播等级
|
||||
*/
|
||||
@ApiModelProperty(value = "主播等级", example = "A")
|
||||
private String hostsLevel;
|
||||
|
||||
/**
|
||||
* 主播金币
|
||||
*/
|
||||
@ApiModelProperty(value = "主播金币", example = "1000")
|
||||
private Integer hostsCoins;
|
||||
|
||||
/**
|
||||
* 邀请类型
|
||||
*/
|
||||
@ApiModelProperty(value = "邀请类型", example = "1")
|
||||
private Integer invitationType;
|
||||
|
||||
/**
|
||||
* 粉丝数量
|
||||
*/
|
||||
@ApiModelProperty(value = "粉丝数量", example = "5000")
|
||||
private Integer fans;
|
||||
|
||||
/**
|
||||
* 关注数量
|
||||
*/
|
||||
@ApiModelProperty(value = "关注数量", example = "200")
|
||||
private Integer fllowernum;
|
||||
|
||||
/**
|
||||
* 昨日金币
|
||||
*/
|
||||
@ApiModelProperty(value = "昨日金币", example = "800")
|
||||
private Integer yesterdayCoins;
|
||||
|
||||
/**
|
||||
* 主播国家
|
||||
*/
|
||||
@ApiModelProperty(value = "主播国家", example = "中国")
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 直播类型 娱乐,游戏
|
||||
*/
|
||||
@ApiModelProperty(value = "直播类型 娱乐,游戏", example = "娱乐")
|
||||
private String hostsKind;
|
||||
|
||||
/**
|
||||
* 租户 Id
|
||||
*/
|
||||
@ApiModelProperty(value = "租户 Id", example = "1")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 入库人
|
||||
*/
|
||||
@ApiModelProperty(value = "入库人", example = "1001")
|
||||
private Integer creator;
|
||||
|
||||
/**
|
||||
* 数据插入时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updater;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.yupi.springbootinit.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -11,68 +13,88 @@ import java.util.Date;
|
||||
* @date: 2025/6/10 18:54
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("主播信息DTO")
|
||||
public class NewHosts {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty(value = "主键", example = "1")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 主播id
|
||||
*/
|
||||
@ApiModelProperty(value = "主播id", example = "host123")
|
||||
private String hostsId;
|
||||
|
||||
/**
|
||||
* 主播等级
|
||||
*/
|
||||
@ApiModelProperty(value = "主播等级", example = "A")
|
||||
private String hostsLevel;
|
||||
|
||||
/**
|
||||
* 主播金币
|
||||
*/
|
||||
@ApiModelProperty(value = "主播金币", example = "1000")
|
||||
private Integer hostsCoins;
|
||||
|
||||
/**
|
||||
* 邀请类型
|
||||
*/
|
||||
@ApiModelProperty(value = "邀请类型", example = "1")
|
||||
private Integer invitationType;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "在线人数", example = "1000")
|
||||
private Integer onlineFans;
|
||||
|
||||
/**
|
||||
* 粉丝数量
|
||||
*/
|
||||
@ApiModelProperty(value = "粉丝数量", example = "5000")
|
||||
private Integer fans;
|
||||
|
||||
/**
|
||||
* 关注数量
|
||||
*/
|
||||
@ApiModelProperty(value = "关注数量", example = "200")
|
||||
private Integer fllowernum;
|
||||
|
||||
/**
|
||||
* 昨日金币
|
||||
*/
|
||||
@ApiModelProperty(value = "昨日金币", example = "800")
|
||||
private Integer yesterdayCoins;
|
||||
|
||||
/**
|
||||
* 主播国家
|
||||
*/
|
||||
@ApiModelProperty(value = "主播国家", example = "中国")
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 直播类型 娱乐,游戏
|
||||
*/
|
||||
@ApiModelProperty(value = "直播类型 娱乐,游戏", example = "娱乐")
|
||||
private String hostsKind;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 租户 Id
|
||||
*/
|
||||
@ApiModelProperty(value = "租户 Id", example = "1")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 入库人
|
||||
*/
|
||||
@ApiModelProperty(value = "入库人", example = "1001")
|
||||
private Long creator;
|
||||
|
||||
|
||||
/**
|
||||
* 数据插入时间
|
||||
*/
|
||||
@@ -87,4 +109,6 @@ public class NewHosts {
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
<result column="hosts_level" jdbcType="VARCHAR" property="hostsLevel" />
|
||||
<result column="hosts_coins" jdbcType="INTEGER" property="hostsCoins" />
|
||||
<result column="Invitation_type" jdbcType="INTEGER" property="invitationType" />
|
||||
<result column="online_fans" jdbcType="INTEGER" property="onlineFans" />
|
||||
<result column="fans" jdbcType="INTEGER" property="fans" />
|
||||
<result column="fllowernum" jdbcType="INTEGER" property="fllowernum" />
|
||||
<result column="yesterday_coins" jdbcType="INTEGER" property="yesterdayCoins" />
|
||||
@@ -22,7 +23,7 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, hosts_id, hosts_level, hosts_coins, Invitation_type, fans, fllowernum, yesterday_coins,
|
||||
id, hosts_id, hosts_level, hosts_coins, Invitation_type, online_fans,fans, fllowernum, yesterday_coins,
|
||||
country, hosts_kind, tenant_id, creator, create_time, updater, update_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
@@ -40,12 +41,12 @@
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yupi.springbootinit.model.entity.NewHosts" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into new_hosts (hosts_id, hosts_level, hosts_coins,
|
||||
Invitation_type, fans, fllowernum,
|
||||
Invitation_type, online_fans,fans, fllowernum,
|
||||
yesterday_coins, country, hosts_kind,
|
||||
tenant_id, creator
|
||||
)
|
||||
values (#{hostsId,jdbcType=VARCHAR}, #{hostsLevel,jdbcType=VARCHAR}, #{hostsCoins,jdbcType=INTEGER},
|
||||
#{invitationType,jdbcType=INTEGER}, #{fans,jdbcType=INTEGER}, #{fllowernum,jdbcType=INTEGER},
|
||||
#{invitationType,jdbcType=INTEGER}, #{onlineFans,jdbcType=INTEGER},#{fans,jdbcType=INTEGER}, #{fllowernum,jdbcType=INTEGER},
|
||||
#{yesterdayCoins,jdbcType=INTEGER}, #{country,jdbcType=VARCHAR}, #{hostsKind,jdbcType=VARCHAR},
|
||||
#{tenantId,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT})
|
||||
</insert>
|
||||
@@ -212,14 +213,14 @@
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into new_hosts
|
||||
(hosts_id, hosts_level, hosts_coins, Invitation_type, fans, fllowernum, yesterday_coins,
|
||||
(hosts_id, hosts_level, hosts_coins, Invitation_type, online_fans,fans, fllowernum, yesterday_coins,
|
||||
country, hosts_kind, tenant_id, creator)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.hostsId,jdbcType=VARCHAR}, #{item.hostsLevel,jdbcType=VARCHAR}, #{item.hostsCoins,jdbcType=INTEGER},
|
||||
#{item.invitationType,jdbcType=INTEGER}, #{item.fans,jdbcType=INTEGER}, #{item.fllowernum,jdbcType=INTEGER},
|
||||
#{item.yesterdayCoins,jdbcType=INTEGER}, #{item.country,jdbcType=VARCHAR}, #{item.hostsKind,jdbcType=VARCHAR},
|
||||
#{item.tenantId,jdbcType=BIGINT}, #{item.creator,jdbcType=INTEGER})
|
||||
#{item.invitationType,jdbcType=INTEGER}, #{item.onlineFans,jdbcType=INTEGER},#{item.fans,jdbcType=INTEGER},
|
||||
#{item.fllowernum,jdbcType=INTEGER}, #{item.yesterdayCoins,jdbcType=INTEGER}, #{item.country,jdbcType=VARCHAR},
|
||||
#{item.hostsKind,jdbcType=VARCHAR}, #{item.tenantId,jdbcType=BIGINT}, #{item.creator,jdbcType=INTEGER})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user