|
@@ -23,10 +23,17 @@ import shop.alien.util.common.Constants;
|
|
|
|
|
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * 平台用户举报服务实现类
|
|
|
|
|
+ * 实现用户举报信息的查询、详情获取和审核处理等核心业务逻辑
|
|
|
|
|
+ */
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
@Service
|
|
@Service
|
|
|
public class PlatformUserViolationServiceImpl extends ServiceImpl<SecondUserViolationMapper, SecondUserViolationVo> implements PlatformUserViolationService {
|
|
public class PlatformUserViolationServiceImpl extends ServiceImpl<SecondUserViolationMapper, SecondUserViolationVo> implements PlatformUserViolationService {
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 视频文件类型列表
|
|
|
|
|
+ */
|
|
|
List<String> videoFileType = Arrays.asList("mp4", "avi", "flv", "mkv", "rmvb", "wmv", "3gp", "mov");
|
|
List<String> videoFileType = Arrays.asList("mp4", "avi", "flv", "mkv", "rmvb", "wmv", "3gp", "mov");
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -46,6 +53,17 @@ public class PlatformUserViolationServiceImpl extends ServiceImpl<SecondUserViol
|
|
|
private SecondGoodsService secondGoodsService;
|
|
private SecondGoodsService secondGoodsService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 分页获取用户举报信息
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param page 分页参数
|
|
|
|
|
+ * @param reportingUserName 举报人姓名
|
|
|
|
|
+ * @param reportingDate 举报日期
|
|
|
|
|
+ * @param processingStatus 处理状态
|
|
|
|
|
+ * @param reportContextType 举报内容类型
|
|
|
|
|
+ * @return 分页的用户举报信息列表
|
|
|
|
|
+ * @throws Exception 查询过程中可能发生的异常
|
|
|
|
|
+ */
|
|
|
@Override
|
|
@Override
|
|
|
public IPage<SecondUserViolationVo> getUserViolationByPage(IPage<SecondUserViolationVo> page, String reportingUserName,
|
|
public IPage<SecondUserViolationVo> getUserViolationByPage(IPage<SecondUserViolationVo> page, String reportingUserName,
|
|
|
String reportingDate, String processingStatus, String reportContextType) throws Exception {
|
|
String reportingDate, String processingStatus, String reportContextType) throws Exception {
|
|
@@ -57,6 +75,14 @@ public class PlatformUserViolationServiceImpl extends ServiceImpl<SecondUserViol
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取用户举报详情
|
|
|
|
|
+ * 包括举报基本信息、相关商品信息(如果举报类型为商品)以及相关图片/视频信息
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param id 举报记录ID
|
|
|
|
|
+ * @return 用户举报详情信息
|
|
|
|
|
+ * @throws Exception 查询过程中可能发生的异常
|
|
|
|
|
+ */
|
|
|
@Override
|
|
@Override
|
|
|
public SecondUserViolationDetailVo getUserViolationDetail(Integer id) throws Exception {
|
|
public SecondUserViolationDetailVo getUserViolationDetail(Integer id) throws Exception {
|
|
|
try {
|
|
try {
|
|
@@ -97,6 +123,14 @@ public class PlatformUserViolationServiceImpl extends ServiceImpl<SecondUserViol
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 更新用户举报信息(审核操作)
|
|
|
|
|
+ * 更新举报记录的处理状态、处理时间和举报结果
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param row 包含审核信息的举报记录对象
|
|
|
|
|
+ * @return 更新记录数,大于0表示更新成功
|
|
|
|
|
+ * @throws Exception 更新过程中可能发生的异常
|
|
|
|
|
+ */
|
|
|
@Override
|
|
@Override
|
|
|
public int updateUserViolation(LifeUserViolation row) throws Exception {
|
|
public int updateUserViolation(LifeUserViolation row) throws Exception {
|
|
|
LambdaUpdateWrapper<LifeUserViolation> updateWrapper = new LambdaUpdateWrapper<>();
|
|
LambdaUpdateWrapper<LifeUserViolation> updateWrapper = new LambdaUpdateWrapper<>();
|
|
@@ -108,6 +142,12 @@ public class PlatformUserViolationServiceImpl extends ServiceImpl<SecondUserViol
|
|
|
return lifeUserViolationMapper.update(null, updateWrapper);
|
|
return lifeUserViolationMapper.update(null, updateWrapper);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 判断URL是否为视频文件
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param url 文件URL
|
|
|
|
|
+ * @return 如果是视频文件返回true,否则返回false
|
|
|
|
|
+ */
|
|
|
private static boolean isVideoUrl(String url) {
|
|
private static boolean isVideoUrl(String url) {
|
|
|
if (url == null) return false;
|
|
if (url == null) return false;
|
|
|
url = url.toLowerCase();
|
|
url = url.toLowerCase();
|
|
@@ -119,4 +159,4 @@ public class PlatformUserViolationServiceImpl extends ServiceImpl<SecondUserViol
|
|
|
url.endsWith(".mkv");
|
|
url.endsWith(".mkv");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-}
|
|
|
|
|
|
|
+}
|