serv-控制器
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
package org.xyzh.usercenter.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.api.usercenter.achievement.UserAchievementService;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.usercenter.TbAchievement;
|
||||
import org.xyzh.common.dto.usercenter.TbUserAchievement;
|
||||
|
||||
/**
|
||||
* @description 用户成就控制器
|
||||
* @filename UserAchievementController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/usercenter/achievement")
|
||||
public class UserAchievementController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(UserAchievementController.class);
|
||||
|
||||
@Autowired
|
||||
private UserAchievementService userAchievementService;
|
||||
|
||||
/**
|
||||
* 获取所有成就列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResultDomain<TbAchievement> getAllAchievements(
|
||||
@RequestParam(required = false) Integer type,
|
||||
@RequestParam(required = false) Integer level) {
|
||||
return userAchievementService.getAllAchievements(type, level);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户已获得的成就
|
||||
*/
|
||||
@GetMapping("/user/{userID}")
|
||||
public ResultDomain<TbUserAchievement> getUserAchievements(
|
||||
@PathVariable String userID,
|
||||
@RequestParam(required = false) Integer type) {
|
||||
return userAchievementService.getUserAchievements(userID, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查用户是否已获得成就
|
||||
*/
|
||||
@GetMapping("/check/{userID}/{achievementID}")
|
||||
public ResultDomain<Boolean> hasAchievement(
|
||||
@PathVariable String userID,
|
||||
@PathVariable String achievementID) {
|
||||
return userAchievementService.hasAchievement(userID, achievementID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 授予用户成就
|
||||
*/
|
||||
@PostMapping("/grant")
|
||||
public ResultDomain<TbUserAchievement> grantAchievement(
|
||||
@RequestParam String userID,
|
||||
@RequestParam String achievementID) {
|
||||
return userAchievementService.grantAchievement(userID, achievementID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取成就详情
|
||||
*/
|
||||
@GetMapping("/detail/{achievementID}")
|
||||
public ResultDomain<TbAchievement> getAchievementDetail(@PathVariable String achievementID) {
|
||||
return userAchievementService.getAchievementDetail(achievementID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查用户是否满足成就条件
|
||||
*/
|
||||
@GetMapping("/condition/{userID}/{achievementID}")
|
||||
public ResultDomain<Boolean> checkAchievementCondition(
|
||||
@PathVariable String userID,
|
||||
@PathVariable String achievementID) {
|
||||
return userAchievementService.checkAchievementCondition(userID, achievementID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package org.xyzh.usercenter.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.api.usercenter.browse.UserBrowseRecordService;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.usercenter.TbUserBrowseRecord;
|
||||
|
||||
/**
|
||||
* @description 用户浏览记录控制器
|
||||
* @filename UserBrowseRecordController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/usercenter/browse")
|
||||
public class UserBrowseRecordController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(UserBrowseRecordController.class);
|
||||
|
||||
@Autowired
|
||||
private UserBrowseRecordService userBrowseRecordService;
|
||||
|
||||
/**
|
||||
* 获取用户浏览记录
|
||||
*/
|
||||
@GetMapping("/user/{userID}")
|
||||
public ResultDomain<TbUserBrowseRecord> getUserBrowseRecords(
|
||||
@PathVariable String userID,
|
||||
@RequestParam(required = false) Integer resourceType,
|
||||
@RequestParam(required = false) Integer limit) {
|
||||
return userBrowseRecordService.getUserBrowseRecords(userID, resourceType, limit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加浏览记录
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public ResultDomain<TbUserBrowseRecord> addBrowseRecord(@RequestBody TbUserBrowseRecord browseRecord) {
|
||||
return userBrowseRecordService.addBrowseRecord(browseRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空浏览记录
|
||||
*/
|
||||
@DeleteMapping("/clear/{userID}")
|
||||
public ResultDomain<Boolean> clearBrowseRecords(
|
||||
@PathVariable String userID,
|
||||
@RequestParam(required = false) Integer resourceType) {
|
||||
return userBrowseRecordService.clearUserBrowseRecords(userID, resourceType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取浏览数量
|
||||
*/
|
||||
@GetMapping("/count/{userID}")
|
||||
public ResultDomain<Integer> getBrowseCount(
|
||||
@PathVariable String userID,
|
||||
@RequestParam(required = false) Integer resourceType) {
|
||||
return userBrowseRecordService.getBrowseCount(userID, resourceType);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package org.xyzh.usercenter.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.api.usercenter.collection.UserCollectionService;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.usercenter.TbUserCollection;
|
||||
|
||||
/**
|
||||
* @description 用户收藏控制器
|
||||
* @filename UserCollectionController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/usercenter/collection")
|
||||
public class UserCollectionController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(UserCollectionController.class);
|
||||
|
||||
@Autowired
|
||||
private UserCollectionService userCollectionService;
|
||||
|
||||
/**
|
||||
* 获取用户收藏列表
|
||||
*/
|
||||
@GetMapping("/user/{userID}")
|
||||
public ResultDomain<TbUserCollection> getUserCollections(
|
||||
@PathVariable String userID,
|
||||
@RequestParam(required = false) Integer resourceType,
|
||||
@RequestParam(required = false) String resourceID) {
|
||||
return userCollectionService.getUserCollections(userID, resourceType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加收藏
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public ResultDomain<TbUserCollection> addCollection(@RequestBody TbUserCollection userCollection) {
|
||||
return userCollectionService.addCollection(userCollection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消收藏
|
||||
*/
|
||||
@DeleteMapping("/remove")
|
||||
public ResultDomain<Boolean> removeCollection(
|
||||
@RequestParam String userID,
|
||||
@RequestParam String resourceID,
|
||||
@RequestParam Integer resourceType) {
|
||||
return userCollectionService.removeCollection(userID, resourceType, resourceID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否已收藏
|
||||
*/
|
||||
@GetMapping("/check")
|
||||
public ResultDomain<Boolean> isCollected(
|
||||
@RequestParam String userID,
|
||||
@RequestParam String resourceID,
|
||||
@RequestParam Integer resourceType) {
|
||||
return userCollectionService.isCollected(userID, resourceType, resourceID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收藏数量
|
||||
*/
|
||||
@GetMapping("/count/{userID}")
|
||||
public ResultDomain<Integer> getCollectionCount(
|
||||
@PathVariable String userID,
|
||||
@RequestParam(required = false) Integer resourceType,
|
||||
@RequestParam(required = false) String resourceID) {
|
||||
return userCollectionService.getCollectionCount(userID, resourceType, resourceID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package org.xyzh.usercenter.controller;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.usercenter.TbUserPoints;
|
||||
import org.xyzh.common.dto.usercenter.TbPointsRecord;
|
||||
import org.xyzh.usercenter.service.UCUserPointsService;
|
||||
|
||||
/**
|
||||
* @description 用户积分控制器
|
||||
* @filename UserPointsController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/usercenter/points")
|
||||
public class UserPointsController {
|
||||
|
||||
@Autowired
|
||||
private UCUserPointsService userPointsService;
|
||||
|
||||
/**
|
||||
* 获取用户积分信息
|
||||
*/
|
||||
@GetMapping("/user/{userID}")
|
||||
public ResultDomain<TbUserPoints> getUserPoints(@PathVariable String userID) {
|
||||
return userPointsService.getUserPoints(userID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新用户积分
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
public ResultDomain<TbUserPoints> updateUserPoints(@RequestBody TbUserPoints userPoints) {
|
||||
return userPointsService.updateUserPoints(userPoints);
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加用户积分
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public ResultDomain<TbUserPoints> addUserPoints(
|
||||
@RequestParam String userID,
|
||||
@RequestParam Integer points,
|
||||
@RequestParam Integer sourceType,
|
||||
@RequestParam String sourceID,
|
||||
@RequestParam(required = false) String description) {
|
||||
return userPointsService.addUserPoints(userID, points, sourceType, sourceID, description);
|
||||
}
|
||||
|
||||
/**
|
||||
* 消费用户积分
|
||||
*/
|
||||
@PostMapping("/consume")
|
||||
public ResultDomain<TbUserPoints> consumeUserPoints(
|
||||
@RequestParam String userID,
|
||||
@RequestParam Integer points,
|
||||
@RequestParam Integer sourceType,
|
||||
@RequestParam String sourceID,
|
||||
@RequestParam(required = false) String description) {
|
||||
return userPointsService.consumeUserPoints(userID, points, sourceType, sourceID, description);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户积分记录
|
||||
*/
|
||||
@GetMapping("/records/{userID}")
|
||||
public ResultDomain<TbPointsRecord> getPointsRecords(
|
||||
@PathVariable String userID,
|
||||
@RequestParam(required = false) Integer type,
|
||||
@RequestParam(required = false) Integer sourceType) {
|
||||
return userPointsService.getPointsRecords(userID, type, sourceType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加积分记录
|
||||
*/
|
||||
@PostMapping("/record")
|
||||
public ResultDomain<TbPointsRecord> addPointsRecord(@RequestBody TbPointsRecord pointsRecord) {
|
||||
return userPointsService.addPointsRecord(pointsRecord);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
package org.xyzh.usercenter.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.user.TbSysUserInfo;
|
||||
import org.xyzh.common.annotation.HttpLogin;
|
||||
import org.xyzh.common.core.domain.LoginDomain;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description 个人中心控制器
|
||||
* @filename UserProfileController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/usercenter/profile")
|
||||
public class UserProfileController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(UserProfileController.class);
|
||||
|
||||
// ==================== 个人信息管理 ====================
|
||||
|
||||
/**
|
||||
* 获取个人信息
|
||||
*/
|
||||
@GetMapping("/info")
|
||||
public ResultDomain<TbSysUserInfo> getUserProfile(@HttpLogin LoginDomain loginDomain) {
|
||||
// TODO: 实现获取个人信息
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新个人信息
|
||||
*/
|
||||
@PutMapping("/info/update")
|
||||
public ResultDomain<TbSysUserInfo> updateUserProfile(@HttpLogin LoginDomain loginDomain, @RequestBody TbSysUserInfo userInfo) {
|
||||
// TODO: 实现更新个人信息(姓名、部门、联系方式等)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传用户头像
|
||||
*/
|
||||
@PostMapping("/avatar/upload")
|
||||
public ResultDomain<String> uploadAvatar(@RequestParam("file") String file) {
|
||||
// TODO: 实现上传用户头像
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新用户头像
|
||||
*/
|
||||
@PutMapping("/avatar/update")
|
||||
public ResultDomain<String> updateAvatar(@HttpLogin LoginDomain loginDomain, @RequestParam String avatarUrl) {
|
||||
// TODO: 实现更新用户头像
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 账号设置 ====================
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
*/
|
||||
@PutMapping("/password/change")
|
||||
public ResultDomain<Boolean> changePassword(@HttpLogin LoginDomain loginDomain, @RequestBody Map<String, Object> params) {
|
||||
// TODO: 实现修改密码
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定手机号
|
||||
*/
|
||||
@PutMapping("/phone/bind")
|
||||
public ResultDomain<Boolean> bindPhone(@HttpLogin LoginDomain loginDomain, @RequestBody Map<String, Object> params) {
|
||||
// TODO: 实现绑定手机号
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定邮箱
|
||||
*/
|
||||
@PutMapping("/email/bind")
|
||||
public ResultDomain<Boolean> bindEmail(@HttpLogin LoginDomain loginDomain, @RequestBody Map<String, Object> params) {
|
||||
// TODO: 实现绑定邮箱
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解绑手机号
|
||||
*/
|
||||
@PutMapping("/phone/unbind")
|
||||
public ResultDomain<Boolean> unbindPhone(@HttpLogin LoginDomain loginDomain) {
|
||||
// TODO: 实现解绑手机号
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解绑邮箱
|
||||
*/
|
||||
@PutMapping("/email/unbind")
|
||||
public ResultDomain<Boolean> unbindEmail(@HttpLogin LoginDomain loginDomain) {
|
||||
// TODO: 实现解绑邮箱
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请账号注销
|
||||
*/
|
||||
@PostMapping("/account/delete-request")
|
||||
public ResultDomain<Boolean> requestAccountDeletion(@HttpLogin LoginDomain loginDomain, @RequestBody Map<String, Object> params) {
|
||||
// TODO: 实现申请账号注销
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取账号安全信息
|
||||
*/
|
||||
@GetMapping("/security/info")
|
||||
public ResultDomain<Map<String, Object>> getSecurityInfo(@HttpLogin LoginDomain loginDomain) {
|
||||
// TODO: 实现获取账号安全信息
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证身份信息
|
||||
*/
|
||||
@PostMapping("/security/verify")
|
||||
public ResultDomain<Boolean> verifyIdentity(@HttpLogin LoginDomain loginDomain, @RequestBody Map<String, Object> params) {
|
||||
// TODO: 实现验证身份信息
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 学习记录统计 ====================
|
||||
|
||||
/**
|
||||
* 获取学习记录统计
|
||||
*/
|
||||
@GetMapping("/learning/statistics")
|
||||
public ResultDomain<Map<String, Object>> getLearningStatistics(@HttpLogin LoginDomain loginDomain) {
|
||||
// TODO: 实现获取学习记录统计(折线图展示每日学习时长,柱状图展示各资源学习次数)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按时间筛选学习记录
|
||||
*/
|
||||
@GetMapping("/learning/filter")
|
||||
public ResultDomain<Map<String, Object>> filterLearningRecords(
|
||||
@HttpLogin LoginDomain loginDomain,
|
||||
@RequestParam(required = false) String timeRange) {
|
||||
// TODO: 实现按时间筛选学习记录(周/月)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学习时长图表数据
|
||||
*/
|
||||
@GetMapping("/learning/duration-chart")
|
||||
public ResultDomain<Map<String, Object>> getLearningDurationChart(@HttpLogin LoginDomain loginDomain) {
|
||||
// TODO: 实现获取学习时长图表数据(折线图)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取资源学习次数图表数据
|
||||
*/
|
||||
@GetMapping("/learning/resource-chart")
|
||||
public ResultDomain<Map<String, Object>> getResourceLearningChart(@HttpLogin LoginDomain loginDomain) {
|
||||
// TODO: 实现获取资源学习次数图表数据(柱状图)
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.xyzh.usercenter.service;
|
||||
|
||||
import org.xyzh.api.usercenter.achievement.UserAchievementService;
|
||||
|
||||
/**
|
||||
* @description 用户成就服务接口
|
||||
* @filename UCUserAchievementService.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
public interface UCUserAchievementService extends UserAchievementService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.xyzh.usercenter.service;
|
||||
|
||||
import org.xyzh.api.usercenter.browse.UserBrowseRecordService;
|
||||
|
||||
/**
|
||||
* @description 用户浏览记录服务接口
|
||||
* @filename UCUserBrowseRecordService.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
public interface UCUserBrowseRecordService extends UserBrowseRecordService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.xyzh.usercenter.service;
|
||||
|
||||
import org.xyzh.api.usercenter.collection.UserCollectionService;
|
||||
|
||||
/**
|
||||
* @description 用户收藏服务接口
|
||||
* @filename UCUserCollectionService.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
public interface UCUserCollectionService extends UserCollectionService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.xyzh.usercenter.service;
|
||||
|
||||
import org.xyzh.api.usercenter.points.UserPointsService;
|
||||
|
||||
/**
|
||||
* @description 用户积分服务接口
|
||||
* @filename UCUserPointsService.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
public interface UCUserPointsService extends UserPointsService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package org.xyzh.usercenter.service.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.usercenter.TbAchievement;
|
||||
import org.xyzh.common.dto.usercenter.TbUserAchievement;
|
||||
import org.xyzh.usercenter.mapper.AchievementMapper;
|
||||
import org.xyzh.usercenter.mapper.UserAchievementMapper;
|
||||
import org.xyzh.usercenter.service.UCUserAchievementService;
|
||||
|
||||
/**
|
||||
* @description 用户成就服务实现类
|
||||
* @filename UCUserAchievementServiceImpl.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@Service
|
||||
public class UCUserAchievementServiceImpl implements UCUserAchievementService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(UCUserAchievementServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private AchievementMapper achievementMapper;
|
||||
|
||||
@Autowired
|
||||
private UserAchievementMapper userAchievementMapper;
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbAchievement> getAllAchievements(Integer type, Integer level) {
|
||||
// TODO: 实现获取所有成就列表
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbUserAchievement> getUserAchievements(String userID, Integer type) {
|
||||
// TODO: 实现获取用户已获得的成就
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> hasAchievement(String userID, String achievementID) {
|
||||
// TODO: 实现检查用户是否已获得成就
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbUserAchievement> grantAchievement(String userID, String achievementID) {
|
||||
// TODO: 实现授予用户成就
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbAchievement> getAchievementDetail(String achievementID) {
|
||||
// TODO: 实现获取成就详情
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> checkAchievementCondition(String userID, String achievementID) {
|
||||
// TODO: 实现检查用户是否满足成就条件
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package org.xyzh.usercenter.service.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.usercenter.TbUserBrowseRecord;
|
||||
import org.xyzh.usercenter.mapper.UserBrowseRecordMapper;
|
||||
import org.xyzh.usercenter.service.UCUserBrowseRecordService;
|
||||
|
||||
/**
|
||||
* @description 用户浏览记录服务实现类
|
||||
* @filename UCUserBrowseRecordServiceImpl.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@Service
|
||||
public class UCUserBrowseRecordServiceImpl implements UCUserBrowseRecordService {
|
||||
private static final Logger logger = LoggerFactory.getLogger(UCUserBrowseRecordServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private UserBrowseRecordMapper userBrowseRecordMapper;
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbUserBrowseRecord> addBrowseRecord(TbUserBrowseRecord browseRecord) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> clearUserBrowseRecords(String userID, Integer browseType) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> deleteBrowseRecord(String recordID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Integer> getBrowseCount(String userID, Integer browseType) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbUserBrowseRecord> getUserBrowseRecords(String userID, Integer browseType, Integer limit) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package org.xyzh.usercenter.service.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.usercenter.TbUserCollection;
|
||||
import org.xyzh.usercenter.mapper.UserCollectionMapper;
|
||||
import org.xyzh.usercenter.service.UCUserCollectionService;
|
||||
|
||||
/**
|
||||
* @description 用户收藏服务实现类
|
||||
* @filename UCUserCollectionServiceImpl.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@Service
|
||||
public class UCUserCollectionServiceImpl implements UCUserCollectionService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(UCUserCollectionServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private UserCollectionMapper userCollectionMapper;
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbUserCollection> addCollection(TbUserCollection userCollection) {
|
||||
// TODO: 实现添加收藏
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbUserCollection> getCollectionDetail(String userID, Integer collectionType,
|
||||
String collectionID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbUserCollection> getUserCollections(String userID, Integer collectionType) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> isCollected(String userID, Integer collectionType, String collectionID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> removeCollection(String userID, Integer collectionType, String collectionID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Integer> getCollectionCount(String userID, Integer collectionType, String collectionID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package org.xyzh.usercenter.service.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.usercenter.TbUserPoints;
|
||||
import org.xyzh.common.dto.usercenter.TbPointsRecord;
|
||||
import org.xyzh.usercenter.mapper.UserPointsMapper;
|
||||
import org.xyzh.usercenter.mapper.PointsRecordMapper;
|
||||
import org.xyzh.usercenter.service.UCUserPointsService;
|
||||
|
||||
/**
|
||||
* @description 用户积分服务实现类
|
||||
* @filename UCUserPointsServiceImpl.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@Service
|
||||
public class UCUserPointsServiceImpl implements UCUserPointsService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(UCUserPointsServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private UserPointsMapper userPointsMapper;
|
||||
|
||||
@Autowired
|
||||
private PointsRecordMapper pointsRecordMapper;
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbUserPoints> getUserPoints(String userID) {
|
||||
// TODO: 实现获取用户积分信息
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbUserPoints> updateUserPoints(TbUserPoints userPoints) {
|
||||
// TODO: 实现更新用户积分
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbUserPoints> addUserPoints(String userID, Integer points, Integer sourceType, String sourceID, String description) {
|
||||
// TODO: 实现增加用户积分
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbUserPoints> consumeUserPoints(String userID, Integer points, Integer sourceType, String sourceID, String description) {
|
||||
// TODO: 实现消费用户积分
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbPointsRecord> getPointsRecords(String userID, Integer type, Integer sourceType) {
|
||||
// TODO: 实现获取用户积分记录
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbPointsRecord> addPointsRecord(TbPointsRecord pointsRecord) {
|
||||
// TODO: 实现添加积分记录
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user