2 Комити 89e5effdaa ... d56ab433ac

Аутор SHA1 Порука Датум
  李亚非 d56ab433ac Merge remote-tracking branch 'origin/sit' into sit пре 2 месеци
  李亚非 f19f3356aa fix: 修复了用户举报分页查询遗漏问题,重点在 UserViolationController 对应的 allPage 查询链路。 пре 2 месеци

+ 3 - 3
alien-entity/src/main/java/shop/alien/mapper/LifeUserViolationMapper.java

@@ -133,17 +133,17 @@ public interface LifeUserViolationMapper extends BaseMapper<LifeUserViolation> {
             " FROM life_user_violation luv " +
             " LEFT JOIN userInfo ui ON ui.type = luv.reporting_user_type AND ui.id = luv.reporting_user_id " +
             " left join store_img img on luv.id = img.store_id and img.delete_flag = 0 " +
-            " where luv.delete_flag = 0 and luv.report_context_type in ('1', '2', '3') " +
+            " where ifnull(luv.delete_flag, 0) = 0 and luv.report_context_type in ('0', '1', '2', '3') " +
             " union all " +
             " select " +
-            " luv.id, lu.user_name nick_name, lu.user_phone phone, luv.report_context_type, sd.dict_detail violation_type_name,  " +
+            " luv.id, lu.user_name nick_name, lu.user_phone phone, luv.report_context_type, ifnull(sd.dict_detail, '其他原因') violation_type_name,  " +
             " case when luv.report_context_type = '4' then '商品' else '用户' end report_context_name,  " +
             " luv.processing_status, case when luv.processing_status = 0 then '待处理' when luv.processing_status = 1 then '已通过' else '已驳回' end processing_name, " +
             " luv.processing_time, luv.created_time, '' image, luv.updated_time " +
             " from life_user_violation luv " +
             " left join life_user lu on luv.reporting_user_id = lu.id and lu.delete_flag = 0 " +
             " left join store_dictionary sd on luv.dict_type = sd.type_name and luv.dict_id = sd.dict_id and sd.delete_flag = 0 " +
-            " where luv.report_context_type in ('4', '5') and sd.delete_flag = 0 " +
+            " where ifnull(luv.delete_flag, 0) = 0 and luv.report_context_type in ('4', '5') " +
             " ) " +
             " select * from violationInfo " +
             " ${ew.customSqlSegment}" +

+ 2 - 0
alien-store/src/main/java/shop/alien/store/service/impl/LifeUserViolationServiceImpl.java

@@ -104,6 +104,8 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
     @Override
     public int reporting(LifeUserViolation lifeuserViolation) throws Exception {
         try {
+            lifeuserViolation.setProcessingStatus("0");
+            lifeuserViolation.setDeleteFlag(0);
             if ("4".equals(lifeuserViolation.getReportContextType())) {
                 LambdaQueryWrapper<SecondGoodsRecord> goodsWrapper = new LambdaQueryWrapper<>();
                 goodsWrapper.eq(SecondGoodsRecord::getGoodsId, lifeuserViolation.getBusinessId());