Просмотр исходного кода

修改热力值关联用户方式

silent 4 лет назад
Родитель
Сommit
22dd2e148e

+ 55 - 6
src/main/java/org/springblade/gateway/active_gateway/service/impl/AppActiveProductServiceImpl.java

@@ -23,7 +23,9 @@ import org.springblade.sing.active.service.IActiveRecordService;
 import org.springblade.sing.goods.entity.HelpGoods;
 import org.springblade.sing.goods.service.IHelpGoodsService;
 import org.springblade.sing.heat.entity.HeatRecord;
+import org.springblade.sing.heat.entity.UserHeat;
 import org.springblade.sing.heat.service.IHeatRecordService;
+import org.springblade.sing.heat.service.IUserHeatService;
 import org.springblade.sing.point.entity.PointRecord;
 import org.springblade.sing.point.service.IPointRecordService;
 import org.springblade.sing.user.entity.LoginUser;
@@ -59,6 +61,8 @@ public class AppActiveProductServiceImpl implements AppActiveProductService {
 	private IHelpGoodsService helpGoodsService;
 	@Autowired
 	private PlatformSettingUtil platformSettingUtil;
+	@Autowired
+	private IUserHeatService userHeatService;
 
 	/**
 	 * 活动助力
@@ -117,6 +121,47 @@ public class AppActiveProductServiceImpl implements AppActiveProductService {
 		Assert.isTrue(activeHelpRecordService.save(activeHelpRecord), "投票失败");
 	}
 
+//	/**
+//	 * 更新活动作品的票数和热力值
+//	 * @param activeHelpRecord
+//	 * @param activeProductRecord
+//	 * @param activeSetting
+//	 */
+//	@Override
+//	public void updateProductVoteAndHeat(ActiveHelpRecord activeHelpRecord, ActiveProductRecord activeProductRecord, ActiveSettingDto activeSetting) {
+//		//修改活动热力值和票数
+//		activeProductRecord.setVoteCount(activeProductRecord.getVoteCount() + 1);
+//
+//		//判断是否赠送热力值
+//		if (ObjectUtils.isNotEmpty(activeSetting.getVoteAndHeatRate()) && !activeSetting.getVoteAndHeatRate().equals(BigDecimal.ZERO)) {
+//			//查询参赛用户
+//			LoginUser productUser = loginUserService.getOne(Wrappers.<LoginUser>lambdaQuery().eq(LoginUser::getPhone, activeProductRecord.getPhone()));
+//			Assert.notNull(productUser, "没有找到该参赛选手");
+//
+//			//热力值=活动票数*热力值比例
+//			BigDecimal heatValue = activeSetting.getVoteAndHeatRate()
+//				.multiply(BigDecimal.valueOf(activeHelpRecord.getVoteCount()));
+//
+//			//原热力值+投票热力值
+//			productUser.setHeatValue(BigDecimal.valueOf(heatValue.doubleValue()).add(productUser.getHeatValue())); //必须克隆对象,防止事务状态下,使用同一个对象地址
+//
+//			//添加热力值赠送记录=>赠送给参赛用户
+//			HeatRecord heatRecord = new HeatRecord();
+//			heatRecord.setActiveProductId(activeHelpRecord.getProductId());
+//			heatRecord.setHeatValue(BigDecimal.valueOf(heatValue.doubleValue())); //必须克隆对象,防止事务状态下,使用同一个对象地址
+//			heatRecord.setHeatType(HeatTypeEnum.HEAT_VALUE_SEND);
+//			heatRecord.setUserId(productUser.getId());
+//			Assert.isTrue(heatRecordService.save(heatRecord), "投票失败");
+//			//修改活动热力值
+//			activeProductRecord.setHeatValue(heatValue.add(activeProductRecord.getHeatValue()));
+//			//放入ZSET缓存排名(缓存名:活动id,作品id,热力值)
+//			Assert.isTrue(ActiveProductUtil.addProductRank(activeProductRecord), "投票失败");
+//
+//			//修改参赛用户选手信息
+//			Assert.isTrue(loginUserService.updateById(productUser), "投票失败");
+//		}
+//	}
+
 	/**
 	 * 更新活动作品的票数和热力值
 	 * @param activeHelpRecord
@@ -131,30 +176,34 @@ public class AppActiveProductServiceImpl implements AppActiveProductService {
 		//判断是否赠送热力值
 		if (ObjectUtils.isNotEmpty(activeSetting.getVoteAndHeatRate()) && !activeSetting.getVoteAndHeatRate().equals(BigDecimal.ZERO)) {
 			//查询参赛用户
-			LoginUser productUser = loginUserService.getOne(Wrappers.<LoginUser>lambdaQuery().eq(LoginUser::getPhone, activeProductRecord.getPhone()));
-			Assert.notNull(productUser, "没有找到该参赛选手");
+			UserHeat userHeat = userHeatService.getOne(Wrappers.<UserHeat>lambdaQuery().eq(UserHeat::getPhone, activeProductRecord.getPhone()));
+			if(ObjectUtils.isEmpty(userHeat)){
+				userHeat = new UserHeat();
+				userHeat.setPhone(activeProductRecord.getPhone());
+				userHeat.setHeatValue(BigDecimal.ZERO);
+			}
 
 			//热力值=活动票数*热力值比例
 			BigDecimal heatValue = activeSetting.getVoteAndHeatRate()
 				.multiply(BigDecimal.valueOf(activeHelpRecord.getVoteCount()));
 
 			//原热力值+投票热力值
-			productUser.setHeatValue(BigDecimal.valueOf(heatValue.doubleValue()).add(productUser.getHeatValue())); //必须克隆对象,防止事务状态下,使用同一个对象地址
+			userHeat.setHeatValue(BigDecimal.valueOf(heatValue.doubleValue()).add(userHeat.getHeatValue())); //必须克隆对象,防止事务状态下,使用同一个对象地址
 
 			//添加热力值赠送记录=>赠送给参赛用户
 			HeatRecord heatRecord = new HeatRecord();
 			heatRecord.setActiveProductId(activeHelpRecord.getProductId());
 			heatRecord.setHeatValue(BigDecimal.valueOf(heatValue.doubleValue())); //必须克隆对象,防止事务状态下,使用同一个对象地址
 			heatRecord.setHeatType(HeatTypeEnum.HEAT_VALUE_SEND);
-			heatRecord.setUserId(productUser.getId());
+			heatRecord.setPhone(userHeat.getPhone());
 			Assert.isTrue(heatRecordService.save(heatRecord), "投票失败");
 			//修改活动热力值
 			activeProductRecord.setHeatValue(heatValue.add(activeProductRecord.getHeatValue()));
 			//放入ZSET缓存排名(缓存名:活动id,作品id,热力值)
 			Assert.isTrue(ActiveProductUtil.addProductRank(activeProductRecord), "投票失败");
 
-			//修改参赛用户选手信息
-			Assert.isTrue(loginUserService.updateById(productUser), "投票失败");
+			//修改用户热力值信息
+			Assert.isTrue(userHeatService.saveOrUpdate(userHeat), "投票失败");
 		}
 	}
 

+ 129 - 0
src/main/java/org/springblade/sing/heat/controller/UserHeatController.java

@@ -0,0 +1,129 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.sing.heat.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.sing.heat.entity.UserHeat;
+import org.springblade.sing.heat.vo.UserHeatVO;
+import org.springblade.sing.heat.wrapper.UserHeatWrapper;
+import org.springblade.sing.heat.service.IUserHeatService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 用户热力值记录表 控制器
+ *
+ * @author BladeX
+ * @since 2021-11-20
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("sing_heat_value/userheat")
+@Api(value = "用户热力值记录表", tags = "用户热力值记录表接口")
+public class UserHeatController extends BladeController {
+
+	private final IUserHeatService userHeatService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入userHeat")
+	public R<UserHeatVO> detail(UserHeat userHeat) {
+		UserHeat detail = userHeatService.getOne(Condition.getQueryWrapper(userHeat));
+		return R.data(UserHeatWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 用户热力值记录表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入userHeat")
+	public R<IPage<UserHeatVO>> list(UserHeat userHeat, Query query) {
+		IPage<UserHeat> pages = userHeatService.page(Condition.getPage(query), Condition.getQueryWrapper(userHeat));
+		return R.data(UserHeatWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 用户热力值记录表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入userHeat")
+	public R<IPage<UserHeatVO>> page(UserHeatVO userHeat, Query query) {
+		IPage<UserHeatVO> pages = userHeatService.selectUserHeatPage(Condition.getPage(query), userHeat);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 用户热力值记录表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入userHeat")
+	public R save(@Valid @RequestBody UserHeat userHeat) {
+		return R.status(userHeatService.save(userHeat));
+	}
+
+	/**
+	 * 修改 用户热力值记录表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入userHeat")
+	public R update(@Valid @RequestBody UserHeat userHeat) {
+		return R.status(userHeatService.updateById(userHeat));
+	}
+
+	/**
+	 * 新增或修改 用户热力值记录表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入userHeat")
+	public R submit(@Valid @RequestBody UserHeat userHeat) {
+		return R.status(userHeatService.saveOrUpdate(userHeat));
+	}
+
+	
+	/**
+	 * 删除 用户热力值记录表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(userHeatService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}

+ 34 - 0
src/main/java/org/springblade/sing/heat/dto/UserHeatDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.sing.heat.dto;
+
+import org.springblade.sing.heat.entity.UserHeat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 用户热力值记录表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-11-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class UserHeatDTO extends UserHeat {
+	private static final long serialVersionUID = 1L;
+
+}

+ 5 - 0
src/main/java/org/springblade/sing/heat/entity/HeatRecord.java

@@ -45,6 +45,11 @@ public class HeatRecord extends BaseEntity {
 	 */
 	@ApiModelProperty(value = "用户id")
 	private Long userId;
+	/**
+	 * 用户手机号码
+	 */
+	@ApiModelProperty(value = "用户手机号码")
+	private String phone;
 	/**
 	 * 积分商品id(热力值兑换)
 	 */

+ 53 - 0
src/main/java/org/springblade/sing/heat/entity/UserHeat.java

@@ -0,0 +1,53 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.sing.heat.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 用户热力值记录表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-20
+ */
+@Data
+@TableName("sing_user_heat")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "UserHeat对象", description = "用户热力值记录表")
+public class UserHeat extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 手机号码
+	*/
+		@ApiModelProperty(value = "手机号码")
+		private String phone;
+	/**
+	* 热力值
+	*/
+		@ApiModelProperty(value = "热力值")
+		private BigDecimal heatValue;
+
+
+}

+ 42 - 0
src/main/java/org/springblade/sing/heat/mapper/UserHeatMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.sing.heat.mapper;
+
+import org.springblade.sing.heat.entity.UserHeat;
+import org.springblade.sing.heat.vo.UserHeatVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 用户热力值记录表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-11-20
+ */
+public interface UserHeatMapper extends BaseMapper<UserHeat> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param userHeat
+	 * @return
+	 */
+	List<UserHeatVO> selectUserHeatPage(IPage page, UserHeatVO userHeat);
+
+}

+ 24 - 0
src/main/java/org/springblade/sing/heat/mapper/UserHeatMapper.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.sing.heat.mapper.UserHeatMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="userHeatResultMap" type="org.springblade.sing.heat.entity.UserHeat">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="phone" property="phone"/>
+        <result column="heat_value" property="heatValue"/>
+    </resultMap>
+
+
+    <select id="selectUserHeatPage" resultMap="userHeatResultMap">
+        select * from sing_user_heat where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
src/main/java/org/springblade/sing/heat/service/IUserHeatService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.sing.heat.service;
+
+import org.springblade.sing.heat.entity.UserHeat;
+import org.springblade.sing.heat.vo.UserHeatVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 用户热力值记录表 服务类
+ *
+ * @author BladeX
+ * @since 2021-11-20
+ */
+public interface IUserHeatService extends BaseService<UserHeat> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param userHeat
+	 * @return
+	 */
+	IPage<UserHeatVO> selectUserHeatPage(IPage<UserHeatVO> page, UserHeatVO userHeat);
+
+}

+ 41 - 0
src/main/java/org/springblade/sing/heat/service/impl/UserHeatServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.sing.heat.service.impl;
+
+import org.springblade.sing.heat.entity.UserHeat;
+import org.springblade.sing.heat.vo.UserHeatVO;
+import org.springblade.sing.heat.mapper.UserHeatMapper;
+import org.springblade.sing.heat.service.IUserHeatService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 用户热力值记录表 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-11-20
+ */
+@Service
+public class UserHeatServiceImpl extends BaseServiceImpl<UserHeatMapper, UserHeat> implements IUserHeatService {
+
+	@Override
+	public IPage<UserHeatVO> selectUserHeatPage(IPage<UserHeatVO> page, UserHeatVO userHeat) {
+		return page.setRecords(baseMapper.selectUserHeatPage(page, userHeat));
+	}
+
+}

+ 36 - 0
src/main/java/org/springblade/sing/heat/vo/UserHeatVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.sing.heat.vo;
+
+import org.springblade.sing.heat.entity.UserHeat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 用户热力值记录表视图实体类
+ *
+ * @author BladeX
+ * @since 2021-11-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "UserHeatVO对象", description = "用户热力值记录表")
+public class UserHeatVO extends UserHeat {
+	private static final long serialVersionUID = 1L;
+
+}

+ 49 - 0
src/main/java/org/springblade/sing/heat/wrapper/UserHeatWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.sing.heat.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.sing.heat.entity.UserHeat;
+import org.springblade.sing.heat.vo.UserHeatVO;
+import java.util.Objects;
+
+/**
+ * 用户热力值记录表包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2021-11-20
+ */
+public class UserHeatWrapper extends BaseEntityWrapper<UserHeat, UserHeatVO>  {
+
+	public static UserHeatWrapper build() {
+		return new UserHeatWrapper();
+ 	}
+
+	@Override
+	public UserHeatVO entityVO(UserHeat userHeat) {
+		UserHeatVO userHeatVO = Objects.requireNonNull(BeanUtil.copy(userHeat, UserHeatVO.class));
+
+		//User createUser = UserCache.getUser(userHeat.getCreateUser());
+		//User updateUser = UserCache.getUser(userHeat.getUpdateUser());
+		//userHeatVO.setCreateUserName(createUser.getName());
+		//userHeatVO.setUpdateUserName(updateUser.getName());
+
+		return userHeatVO;
+	}
+
+}