ssk 1 kuukausi sitten
vanhempi
commit
0b9d522d8c

+ 6 - 2
alien-entity/src/main/java/shop/alien/entity/store/LifeUserViolation.java

@@ -2,12 +2,16 @@ package shop.alien.entity.store;
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+
 import java.util.Date;
+
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableField;
+
 import java.io.Serializable;
+
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -25,7 +29,7 @@ import lombok.experimental.Accessors;
 @Data
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
-@ApiModel(value="LifeUserViolation对象", description="用户举报")
+@ApiModel(value = "LifeUserViolation对象", description = "用户举报")
 public class LifeUserViolation extends Model<LifeUserViolation> {
 
     private static final long serialVersionUID = 1L;
@@ -50,7 +54,7 @@ public class LifeUserViolation extends Model<LifeUserViolation> {
     @TableField("reporting_user_id")
     private String reportingUserId;
 
-    @ApiModelProperty(value = "举报内容分类")
+    @ApiModelProperty(value = "举报内容分类(0:商户, 1:用户,2:动态,3:评论, 4:二手商品, 5:二手用户)")
     @TableField("report_context_type")
     private String reportContextType;
 

+ 4 - 0
alien-entity/src/main/java/shop/alien/entity/store/excelVo/LifeUserOrderExcelVo.java

@@ -58,6 +58,10 @@ public class LifeUserOrderExcelVo {
     @ApiModelProperty(value = "完成时间")
     private String finishTime;
 
+    @ExcelHeader("取消时间")
+    @ApiModelProperty(value = "取消时间")
+    private String cancelTime;
+
     @ExcelHeader("订单状态")
     @ApiModelProperty(value = "订单状态")
     private String orderStatus;

+ 18 - 112
alien-store/src/main/java/shop/alien/store/controller/StoreInfoController.java

@@ -207,42 +207,10 @@ public class StoreInfoController {
      */
     @ApiOperation("web-分页查询店铺信息")
     @ApiOperationSupport(order = 7)
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
-            @ApiImplicitParam(name = "pageSize", value = "页容", dataType = "int", paramType = "query", required = true),
-            @ApiImplicitParam(name = "storeName", value = "门店名称", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "storeContact", value = "门店联系人", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "storePhone", value = "门店电话", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "storeType", value = "门店类型", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "expiredState", value = "过期状态", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "businessSection", value = "经营板块", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "storeApplicationStatus", value = "门店审核状态", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "jingdu", value = "jingdu", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "weidu", value = "weidu", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "renewContractStatus", value = "门店续签合同状态", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "foodLicenceStatus", value = "门店经营许可证状态", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "foodLicenceWhetherExpiredStatus", value = "门店经营许可证是否过期状态", dataType = "String", paramType = "query")
-    })
+    @ApiImplicitParams({@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), @ApiImplicitParam(name = "pageSize", value = "页容", dataType = "int", paramType = "query", required = true), @ApiImplicitParam(name = "storeName", value = "门店名称", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storeContact", value = "门店联系人", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storePhone", value = "门店电话", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storeType", value = "门店类型", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "expiredState", value = "过期状态", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "businessSection", value = "经营板块", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storeApplicationStatus", value = "门店审核状态", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "jingdu", value = "jingdu", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "weidu", value = "weidu", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "renewContractStatus", value = "门店续签合同状态", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "foodLicenceStatus", value = "门店经营许可证状态", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "foodLicenceWhetherExpiredStatus", value = "门店经营许可证是否过期状态", dataType = "String", paramType = "query")})
     @GetMapping("/getStorePage")
-    public R<IPage<StoreInfoVo>> getStoresPage(
-            @RequestParam(defaultValue = "1") int pageNum,
-            @RequestParam(defaultValue = "10") int pageSize,
-            @RequestParam(required = false) String storeName,
-            @RequestParam(required = false) String storeContact,
-            @RequestParam(required = false) String id,
-            @RequestParam(required = false) String storePhone,
-            @RequestParam(required = false) String storeType,
-            @RequestParam(required = false) String expiredState,
-            @RequestParam(required = false) String storeApplicationStatus,
-            @RequestParam(required = false) String businessSection,
-            @RequestParam(required = false) String storeStatus,
-            @RequestParam(required = false) String jingdu,
-            @RequestParam(required = false) String weidu,
-            @RequestParam(required = false) String renewContractStatus,
-            @RequestParam(required = false) String foodLicenceStatus,
-            @RequestParam(required = false) String foodLicenceWhetherExpiredStatus) {
-        log.info("StoreInfoController.getStoresPage?pageNum={},pageSize={},storeName={},storeContact={},id={},storePhone={},storeType={},expiredState={},storeApplicationStatus={},storeStatus={},businessSection={},jingdu={},weidu={},renewContractStatus={},foodLicenceStatus={},foodLicenceWhetherExpiredStatus={}",
-                pageNum, pageSize, storeName, storeContact, id, storePhone, storeType, expiredState, storeApplicationStatus, storeStatus, businessSection, jingdu, weidu, renewContractStatus, foodLicenceStatus, foodLicenceWhetherExpiredStatus);
+    public R<IPage<StoreInfoVo>> getStoresPage(@RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "10") int pageSize, @RequestParam(required = false) String storeName, @RequestParam(required = false) String storeContact, @RequestParam(required = false) String id, @RequestParam(required = false) String storePhone, @RequestParam(required = false) String storeType, @RequestParam(required = false) String expiredState, @RequestParam(required = false) String storeApplicationStatus, @RequestParam(required = false) String businessSection, @RequestParam(required = false) String storeStatus, @RequestParam(required = false) String jingdu, @RequestParam(required = false) String weidu, @RequestParam(required = false) String renewContractStatus, @RequestParam(required = false) String foodLicenceStatus, @RequestParam(required = false) String foodLicenceWhetherExpiredStatus) {
+        log.info("StoreInfoController.getStoresPage?pageNum={},pageSize={},storeName={},storeContact={},id={},storePhone={},storeType={},expiredState={},storeApplicationStatus={},storeStatus={},businessSection={},jingdu={},weidu={},renewContractStatus={},foodLicenceStatus={},foodLicenceWhetherExpiredStatus={}", pageNum, pageSize, storeName, storeContact, id, storePhone, storeType, expiredState, storeApplicationStatus, storeStatus, businessSection, jingdu, weidu, renewContractStatus, foodLicenceStatus, foodLicenceWhetherExpiredStatus);
         return R.data(storeInfoService.getStorePage(pageNum, pageSize, storeName, storeContact, id, storePhone, storeType, expiredState, storeApplicationStatus, storeStatus, businessSection, jingdu, weidu, renewContractStatus, foodLicenceStatus, foodLicenceWhetherExpiredStatus));
     }
 
@@ -254,9 +222,7 @@ public class StoreInfoController {
      */
     @ApiOperation("web-重置门店密码")
     @ApiOperationSupport(order = 8)
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "storeId", value = "门店id", dataType = "int", paramType = "query")
-    })
+    @ApiImplicitParams({@ApiImplicitParam(name = "storeId", value = "门店id", dataType = "int", paramType = "query")})
     @GetMapping("/resetPassword")
     public R<Boolean> resetPassword(@RequestParam("storeId") String storeId) {
         log.info("StoreInfoController.resetPassword?id={}", storeId);
@@ -275,10 +241,7 @@ public class StoreInfoController {
      */
     @ApiOperation("web-修改门店状态")
     @ApiOperationSupport(order = 9)
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "storeId", value = "门店id", dataType = "int", paramType = "query"),
-            @ApiImplicitParam(name = "businessStatus", value = "营业状态(0:正常营业, 1:暂停营业, 2:筹建中, 99:永久关门)", dataType = "int", paramType = "query")
-    })
+    @ApiImplicitParams({@ApiImplicitParam(name = "storeId", value = "门店id", dataType = "int", paramType = "query"), @ApiImplicitParam(name = "businessStatus", value = "营业状态(0:正常营业, 1:暂停营业, 2:筹建中, 99:永久关门)", dataType = "int", paramType = "query")})
     @GetMapping("/setStoreState")
     public R<Boolean> setStoreState(@RequestParam("storeId") String storeId, @RequestParam("businessStatus") Integer businessStatus) {
         log.info("StoreInfoController.setStoreState?storeId={},storeState={}", storeId, businessStatus);
@@ -312,13 +275,12 @@ public class StoreInfoController {
     @GetMapping("/export")
     public ResponseEntity<byte[]> exportToExcel() {
         log.info("StoreInfoController.exportToExcel");
-        return storeInfoService.exportToExcel();
+        return storeInfoService. exportToExcel();
     }
 
     @ApiOperation(value = "web端查询经营板块信息")
     @ApiOperationSupport(order = 6)
     @GetMapping("/getBusinessSection")
-    @ResponseBody
     public R<List<StoreDictionaryVo>> getBusinessSection() {
         log.info("StoreInfoController.getBusinessSection");
         return R.data(storeInfoService.getBusinessSection());
@@ -327,7 +289,6 @@ public class StoreInfoController {
     @ApiOperation(value = "web端查询经营板块的经营种类信息")
     @ApiOperationSupport(order = 6)
     @GetMapping("/getBusinessSectionTypes")
-    @ResponseBody
     public R<List<StoreDictionaryVo>> getBusinessSectionTypes(@RequestParam("parentId") String parentId) {
         log.info("StoreInfoController.getBusinessSectionTypes?parentId={}", parentId);
         return R.data(storeInfoService.getBusinessSectionTypes(parentId));
@@ -336,7 +297,6 @@ public class StoreInfoController {
     @ApiOperation(value = "web端查询未绑定店铺的商家端账号")
     @ApiOperationSupport(order = 6)
     @GetMapping("/getUnboundAccountList")
-    @ResponseBody
     public R<List<StoreUserVo>> getUnboundAccountList(@RequestParam(value = "id", required = false) String id) {
         log.info("StoreInfoController.getUnboundAccountList");
         return R.data(storeInfoService.getUnboundAccountList(id));
@@ -345,7 +305,6 @@ public class StoreInfoController {
     @ApiOperation(value = "web端新增经营板块及经营类型")
     @ApiOperationSupport(order = 6)
     @PostMapping("/addBusinessSectionAndTypes")
-    @ResponseBody
     public R addBusinessSectionAndTypes(@RequestBody StoreInfoDto storeInfoDto) {
         log.info("StoreInfoController.addBusinessSectionAndTypes");
         storeInfoService.addBusinessSectionAndTypes(storeInfoDto);
@@ -355,11 +314,7 @@ public class StoreInfoController {
     @ApiOperation(value = "web端获取店铺明细详情")
     @ApiOperationSupport(order = 6)
     @GetMapping("/getStoreDetail")
-    @ResponseBody
-    public R getStoreDetail(@RequestParam("id") String id,
-                            @RequestParam(value = "userId", required = false) String userId,
-                            @RequestParam(value = "jingdu", required = false) String jingdu,
-                            @RequestParam(value = "weidu", required = false) String weidu) {
+    public R getStoreDetail(@RequestParam("id") String id, @RequestParam(value = "userId", required = false) String userId, @RequestParam(value = "jingdu", required = false) String jingdu, @RequestParam(value = "weidu", required = false) String weidu) {
         log.info("StoreInfoController.getStoreDetail?id={},userId={},jingdu={},weidu={}", id, jingdu, weidu);
         StoreInfoVo storeDetail = storeInfoService.getStoreDetail(id, userId, jingdu, weidu);
         return R.data(storeDetail);
@@ -368,12 +323,7 @@ public class StoreInfoController {
     @ApiOperation(value = "web端审批店铺")
     @ApiOperationSupport(order = 6)
     @GetMapping("/approveStoreInfo")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "门店id", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "approvalStatus", value = "审批状态(1:审批成功,2:审批失败)", dataType = "int", paramType = "query"),
-            @ApiImplicitParam(name = "reason", value = "原因", dataType = "String", paramType = "query")
-    })
-    @ResponseBody
+    @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "门店id", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "approvalStatus", value = "审批状态(1:审批成功,2:审批失败)", dataType = "int", paramType = "query"), @ApiImplicitParam(name = "reason", value = "原因", dataType = "String", paramType = "query")})
     public R approveStoreInfo(@RequestParam("id") String id, @RequestParam("approvalStatus") Integer approvalStatus, @RequestParam(value = "reason", required = false) String reason) {
         log.info("StoreInfoController.approveStoreInfo?id={}&approvalStatus={}&reason={}", id, approvalStatus, reason);
         storeInfoService.approveStoreInfo(id, approvalStatus, reason);
@@ -383,17 +333,8 @@ public class StoreInfoController {
     @ApiOperation(value = "web端导出店铺信息")
     @ApiOperationSupport(order = 6)
     @GetMapping("/exportExcel")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "门店id", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "storePhone", value = "联系电话", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "businessSection", value = "经营板块", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "storeApplicationStatus", value = "审核状态", dataType = "String", paramType = "query"),
-    })
-    @ResponseBody
-    public R exportExcel(@RequestParam(value = "id", required = false) String id
-            , @RequestParam(value = "storePhone", required = false) String storePhone
-            , @RequestParam(value = "businessSection", required = false) String businessSection
-            , @RequestParam(value = "storeApplicationStatus", required = false) String storeApplicationStatus) throws IOException {
+    @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "门店id", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storePhone", value = "联系电话", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "businessSection", value = "经营板块", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storeApplicationStatus", value = "审核状态", dataType = "String", paramType = "query"),})
+    public R exportExcel(@RequestParam(value = "id", required = false) String id, @RequestParam(value = "storePhone", required = false) String storePhone, @RequestParam(value = "businessSection", required = false) String businessSection, @RequestParam(value = "storeApplicationStatus", required = false) String storeApplicationStatus) throws IOException {
         log.info("StoreInfoController.exportExcel");
         String excelPath = storeInfoService.exportExcel(id, storePhone, businessSection, storeApplicationStatus);
         return R.data(excelPath);
@@ -402,16 +343,8 @@ public class StoreInfoController {
     @ApiOperation(value = "web端导出商铺到期时间信息")
     @ApiOperationSupport(order = 6)
     @GetMapping("/exportExcelExpirationTime")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "门店id", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "storePhone", value = "联系电话", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "businessSection", value = "经营板块", dataType = "String", paramType = "query"),
-            @ApiImplicitParam(name = "storeApplicationStatus", value = "审核状态", dataType = "String", paramType = "query"),
-    })
-    @ResponseBody
-    public R exportExcelExpirationTime(
-            @RequestParam(value = "id", required = false) String id
-            , @RequestParam(value = "expiredState", required = false) String expiredState) throws IOException {
+    @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "门店id", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storePhone", value = "联系电话", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "businessSection", value = "经营板块", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storeApplicationStatus", value = "审核状态", dataType = "String", paramType = "query"),})
+    public R exportExcelExpirationTime(@RequestParam(value = "id", required = false) String id, @RequestParam(value = "expiredState", required = false) String expiredState) throws IOException {
         log.info("StoreInfoController.exportExcelExpirationTime");
         String excelPath = storeInfoService.exportExcelExpirationTime(id, expiredState);
         return R.data(excelPath);
@@ -465,25 +398,13 @@ public class StoreInfoController {
         if (screeningOfEightMajorCategoriesVO == null) {
             return R.fail("筛选参数不能为空");
         }
-
         // 记录请求日志
-        log.info("八大类用户端筛选请求 - 参数: screeningId={}, lon={}, lat={}, distance={}, flag={}, pageNum={}, pageSize={}",
-                screeningOfEightMajorCategoriesVO.getScreeningId(),
-                screeningOfEightMajorCategoriesVO.getLon(),
-                screeningOfEightMajorCategoriesVO.getLat(),
-                screeningOfEightMajorCategoriesVO.getDistance(),
-                screeningOfEightMajorCategoriesVO.getFlag(),
-                screeningOfEightMajorCategoriesVO.getPageNum(),
-                screeningOfEightMajorCategoriesVO.getPageSize());
-
+        log.info("八大类用户端筛选请求 - 参数: screeningId={}, lon={}, lat={}, distance={}, flag={}, pageNum={}, pageSize={}", screeningOfEightMajorCategoriesVO.getScreeningId(), screeningOfEightMajorCategoriesVO.getLon(), screeningOfEightMajorCategoriesVO.getLat(), screeningOfEightMajorCategoriesVO.getDistance(), screeningOfEightMajorCategoriesVO.getFlag(), screeningOfEightMajorCategoriesVO.getPageNum(), screeningOfEightMajorCategoriesVO.getPageSize());
         try {
             // 调用服务层获取筛选结果
             IPage<StoreInfo> result = storeInfoService.getScreening(screeningOfEightMajorCategoriesVO);
-
             // 记录响应日志
-            log.info("八大类用户端筛选响应 - 总记录数: {}, 当前页: {}, 页大小: {}",
-                    result.getTotal(), result.getCurrent(), result.getSize());
-
+            log.info("八大类用户端筛选响应 - 总记录数: {}, 当前页: {}, 页大小: {}", result.getTotal(), result.getCurrent(), result.getSize());
             return R.data(result);
         } catch (IllegalArgumentException e) {
             log.warn("八大类用户端筛选参数错误: {}", e.getMessage());
@@ -508,24 +429,13 @@ public class StoreInfoController {
         if (screeningOfEightMajorCategoriesVO == null) {
             return R.fail("筛选参数不能为空");
         }
-
         // 记录请求日志
-        log.info("新八大类用户端筛选请求 - 参数: screeningId={}, lon={}, lat={}, distance={}, flag={}, pageNum={}, pageSize={}",
-                screeningOfEightMajorCategoriesVO.getScreeningId(),
-                screeningOfEightMajorCategoriesVO.getLon(),
-                screeningOfEightMajorCategoriesVO.getLat(),
-                screeningOfEightMajorCategoriesVO.getDistance(),
-                screeningOfEightMajorCategoriesVO.getFlag(),
-                screeningOfEightMajorCategoriesVO.getPageNum(),
-                screeningOfEightMajorCategoriesVO.getPageSize());
-
+        log.info("新八大类用户端筛选请求 - 参数: screeningId={}, lon={}, lat={}, distance={}, flag={}, pageNum={}, pageSize={}", screeningOfEightMajorCategoriesVO.getScreeningId(), screeningOfEightMajorCategoriesVO.getLon(), screeningOfEightMajorCategoriesVO.getLat(), screeningOfEightMajorCategoriesVO.getDistance(), screeningOfEightMajorCategoriesVO.getFlag(), screeningOfEightMajorCategoriesVO.getPageNum(), screeningOfEightMajorCategoriesVO.getPageSize());
         try {
             // 调用服务层获取筛选结果
             IPage<StoreInfoVo> result = storeInfoService.getScreeningNew(screeningOfEightMajorCategoriesVO);
-
             // 记录响应日志
-            log.info("新八大类用户端筛选响应 - 总记录数: {}, 当前页: {}, 页大小: {}",
-                    result.getTotal(), result.getCurrent(), result.getSize());
+            log.info("新八大类用户端筛选响应 - 总记录数: {}, 当前页: {}, 页大小: {}", result.getTotal(), result.getCurrent(), result.getSize());
 
             return R.data(result);
         } catch (IllegalArgumentException e) {
@@ -547,9 +457,7 @@ public class StoreInfoController {
      */
     @ApiOperation("八大类用户端经营类型筛选")
     @ApiOperationSupport(order = 13)
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "businessTypesNames", value = "经营类型名称,多个类型用逗号分隔", dataType = "String", paramType = "query")
-    })
+    @ApiImplicitParams({@ApiImplicitParam(name = "businessTypesNames", value = "经营类型名称,多个类型用逗号分隔", dataType = "String", paramType = "query")})
     @GetMapping(value = "getBusinessTypesName")
     public R<List<StoreInfo>> getBusinessTypesName(@RequestParam(value = "businessTypesNames", required = false) String businessTypesNames) {
         log.info("StoreInfoController.getBusinessTypesName?businessTypesNames={}", businessTypesNames);
@@ -738,9 +646,7 @@ public class StoreInfoController {
 
     @ApiOperation(value = "AI服务-门店评价标签")
     @GetMapping("/getStoreEvaluateTags")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "storeId", value = "门店id", dataType = "int", paramType = "query")
-    })
+    @ApiImplicitParams({@ApiImplicitParam(name = "storeId", value = "门店id", dataType = "int", paramType = "query")})
     public R<List<TagsMainVo>> getStoreEvaluateTags(int storeId) {
         log.info("StoreInfoController.getStoreEvaluateTags?storeId={}", storeId);
         List<TagsMainVo> voList = tagsMainMapper.getStoreEvaluateTags(storeId);

+ 3 - 3
alien-store/src/main/java/shop/alien/store/controller/UserViolationController.java

@@ -44,9 +44,9 @@ public class UserViolationController {
     @ApiOperation("举报")
     @ApiOperationSupport(order = 1)
     @PostMapping("/reporting")
-    public R<String> reporting(@RequestBody LifeUserViolation lifeuserViolation) throws Exception  {
-        log.info("UserViolationController.reporting?lifeuserViolation={}", lifeuserViolation.toString());
-        int reporting = lifeUserViolationService.reporting(lifeuserViolation);
+    public R<String> reporting(@RequestBody LifeUserViolation lifeUserViolation) throws Exception {
+        log.info("UserViolationController.reporting?lifeuserViolation={}", lifeUserViolation.toString());
+        int reporting = lifeUserViolationService.reporting(lifeUserViolation);
         if (0 == reporting) {
             return R.fail("举报失败");
         } else {

+ 39 - 22
alien-store/src/main/java/shop/alien/store/service/LifeUserOrderService.java

@@ -27,7 +27,6 @@ import shop.alien.store.config.GaoDeMapUtil;
 import shop.alien.store.config.WebSocketProcess;
 import shop.alien.store.util.ali.AliApi;
 import shop.alien.util.ali.AliOSSUtil;
-import shop.alien.util.common.AlipayTradeRefund;
 import shop.alien.util.common.UniqueRandomNumGenerator;
 import shop.alien.util.common.constant.CouponStatusEnum;
 import shop.alien.util.common.constant.CouponTypeEnum;
@@ -58,12 +57,8 @@ public class LifeUserOrderService extends ServiceImpl<LifeUserOrderMapper, LifeU
 
     private final StoreInfoMapper storeInfoMapper;
 
-    private final AlipayTradeRefund alipayTradeRefund;
-
     private final LifeUserService lifeUserService;
 
-    private final StoreIncomeDetailsRecordMapper storeIncomeDetailsRecordMapper;
-
     private final GaoDeMapUtil gaoDeMapUtil;
 
     private final LifeFansMapper lifeFansMapper;
@@ -77,12 +72,17 @@ public class LifeUserOrderService extends ServiceImpl<LifeUserOrderMapper, LifeU
     private final StoreImgMapper storeImgMapper;
 
     private final StoreUserMapper storeUserMapper;
+
     private final LifeDiscountCouponUserMapper lifeDiscountCouponUserMapper;
+
     private final OrderCouponMiddleService orderCouponMiddleService;
 
     private final AliOSSUtil aliOSSUtil;
+
     private final OrderCouponMiddleMapper orderCouponMiddleMapper;
+
     private final LifeGroupBuyMainMapper lifeGroupBuyMainMapper;
+
     private final AliApi aliApi;
 
     private final LifeDiscountCouponMapper lifeDiscountCouponMapper;
@@ -91,12 +91,9 @@ public class LifeUserOrderService extends ServiceImpl<LifeUserOrderMapper, LifeU
 
     @Value("${spring.web.resources.excel-path}")
     private String excelPath;
-    @Value("${spring.web.resources.excel-clearing-receipt}")
-    private String excelClearingReceipt;
+
     @Value("${spring.web.resources.excel-generate-path}")
     private String excelGeneratePath;
-    @Value("${spring.web.resources.url}")
-    private String fileUrl;
 
     public List<Map<String, Object>> getOrderListByStatus(Integer page, Integer size, String userId, String status,
                                                           String quanNameSearch, Integer storeType, String baojiaStatus, String orderNo, Integer storeId) {
@@ -655,24 +652,44 @@ public class LifeUserOrderService extends ServiceImpl<LifeUserOrderMapper, LifeU
             String orderNum = orderDetails.toString();
             List<LifeUserOrder> order = orderDetailsGrouped.getOrDefault(orderNum, Collections.emptyList());
             LifeUserOrder lifeUserOrder = order.get(0);
-            LifeCoupon quan = lifeCouponMapper.selectById(lifeUserOrder.getQuanId());
+            LifeUserOrderExcelVo lifeUserOrderExcelVo = new LifeUserOrderExcelVo();
+            if (lifeUserOrder.getCouponType() == 1) {
+                if (null != lifeUserOrder.getQuanId() && !"".equals(lifeUserOrder.getQuanId())) {
+                    LifeDiscountCouponUser lifeDiscountCouponUser = lifeDiscountCouponUserMapper.selectById(lifeUserOrder.getQuanId());
+                    LifeCoupon quan = lifeCouponMapper.selectById(lifeDiscountCouponUser.getCouponId());
+                    if (null != quan) {
+                        lifeUserOrderExcelVo.setCouponName(quan.getName());
+                        lifeUserOrderExcelVo.setImage(quan.getImagePath());
+                        lifeUserOrderExcelVo.setPrice("¥" + quan.getPrice());
+                    }
+                }
+            } else {
+                OrderCouponMiddle orderCouponMiddle = orderCouponMiddleMapper.selectOne(new LambdaQueryWrapper<OrderCouponMiddle>().eq(OrderCouponMiddle::getOrderId, lifeUserOrder.getId()));
+                LifeGroupBuyMain lifeGroupBuyMain = lifeGroupBuyMainMapper.selectOne(new LambdaQueryWrapper<LifeGroupBuyMain>().eq(LifeGroupBuyMain::getId, orderCouponMiddle.getCouponId()));
+                lifeUserOrderExcelVo.setCouponName(lifeGroupBuyMain.getGroupName());
+                lifeUserOrderExcelVo.setImage(storeImgMapper.selectById(Integer.parseInt(lifeGroupBuyMain.getImageId())).getImgUrl());
+                lifeUserOrderExcelVo.setPrice("¥" + lifeGroupBuyMain.getPreferentialPrice());
+            }
             QueryWrapper<StoreInfoVo> queryWrapper = new QueryWrapper<>();
             queryWrapper.eq("a.id", lifeUserOrder.getStoreId());
             StoreInfoVo storeInfoVoOne = storeInfoMapper.getStoreInfoVoOne(queryWrapper);
-            LifeUserOrderExcelVo lifeUserOrderExcelVo = new LifeUserOrderExcelVo();
             lifeUserOrderExcelVo.setSerialNumber(++serialNumber);
             lifeUserOrderExcelVo.setOrderNo(lifeUserOrder.getOrderNo());
             lifeUserOrderExcelVo.setStoreId(lifeUserOrder.getStoreId());
-            lifeUserOrderExcelVo.setCouponName(quan.getName());
-            lifeUserOrderExcelVo.setImage(quan.getImagePath());
-            lifeUserOrderExcelVo.setPrice("¥" + quan.getPrice());
+
             lifeUserOrderExcelVo.setStoreContact(storeInfoVoOne.getStoreContact());
             lifeUserOrderExcelVo.setPhone(storeInfoVoOne.getStorePhone());
-            Instant instant = lifeUserOrder.getPayTime().toInstant();
-            // 格式化时间
-            String formattedTime = instant.atZone(ZoneId.systemDefault()).toLocalDateTime().format(formatter);
-            lifeUserOrderExcelVo.setPayTime(formattedTime);
-            lifeUserOrderExcelVo.setFinishTime(formattedTime);
+            if (lifeUserOrder.getStatus() == 4) {
+                Instant instant = lifeUserOrder.getCancelTime().toInstant();
+                String formattedTime = instant.atZone(ZoneId.systemDefault()).toLocalDateTime().format(formatter);
+                lifeUserOrderExcelVo.setCancelTime(formattedTime);
+            } else if(lifeUserOrder.getStatus() != 0){
+                Instant instant = lifeUserOrder.getPayTime().toInstant();
+                // 格式化时间
+                String formattedTime = instant.atZone(ZoneId.systemDefault()).toLocalDateTime().format(formatter);
+                lifeUserOrderExcelVo.setPayTime(formattedTime);
+                lifeUserOrderExcelVo.setFinishTime(formattedTime);
+            }
             lifeUserOrderExcelVo.setOrderStatus(String.valueOf(lifeUserOrder.getStatus()));
             // 订单状态转换
             switch (lifeUserOrder.getStatus()) {
@@ -802,7 +819,7 @@ public class LifeUserOrderService extends ServiceImpl<LifeUserOrderMapper, LifeU
         }
 // 判断库存扣减结果
         if (updateRows == 0) {
-            log.error("couponid:"+lifeUserOrderDto.getCouponId()+" 库存不足,当前购买数量:"+ buyCount);
+            log.error("couponid:" + lifeUserOrderDto.getCouponId() + " 库存不足,当前购买数量:" + buyCount);
             // 手动抛出异常,触发事务回滚(回滚之前创建的订单和优惠券状态变更)
             throw new RuntimeException("库存不足,下单失败");
         }
@@ -1143,9 +1160,9 @@ public class LifeUserOrderService extends ServiceImpl<LifeUserOrderMapper, LifeU
         // 状态(0草稿/1待审核/2未开始/3审核拒绝/4已售罄/5进行中/6已下架/7已结束/8=2+手动下架)
         if (status != CouponStatusEnum.ONGOING.getCode()) {
             returnMap.put("success", false);
-            if( status == CouponStatusEnum.SOLD_OUT.getCode()){
+            if (status == CouponStatusEnum.SOLD_OUT.getCode()) {
                 returnMap.put("reason", "团购/代金券已售罄");
-            }else{
+            } else {
                 returnMap.put("reason", "团购/代金券未开始");
             }
             return returnMap;

+ 83 - 82
alien-store/src/main/java/shop/alien/store/service/impl/LifeUserViolationServiceImpl.java

@@ -106,34 +106,34 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
             }
             int result = lifeUserViolationMapper.insert(lifeuserViolation);
             if (result > 0) {
-                    //String phoneId = Objects.requireNonNull(JwtUtil.getCurrentUserInfo()).getString("userType") + "_" + JwtUtil.getCurrentUserInfo().getString("phone");
-                    // 举报人消息
-                    LifeNotice lifeNotice = getLifeNotice(lifeuserViolation);
-                    lifeNoticeMapper.insert(lifeNotice);
-                    WebSocketVo websocketVo = new WebSocketVo();
-                    websocketVo.setSenderId("system");
-                    websocketVo.setReceiverId(lifeNotice.getReceiverId());
-                    websocketVo.setCategory("notice");
-                    websocketVo.setNoticeType("1");
-                    websocketVo.setIsRead(0);
-                    websocketVo.setText(com.alibaba.fastjson2.JSONObject.from(lifeNotice).toJSONString());
-                    webSocketProcess.sendMessage(lifeNotice.getReceiverId(), com.alibaba.fastjson2.JSONObject.from(websocketVo).toJSONString());
-
-                    // 被举报人消息
-                    if(StringUtils.isNotEmpty(lifeuserViolation.getReportContextType()) && "1,2,3".contains(lifeuserViolation.getReportContextType())){
-                        LifeNotice lifeNoticeReported = getLifeReportedNotice(lifeuserViolation);
-                        if (lifeNoticeReported != null) {
-                            lifeNoticeMapper.insert(lifeNoticeReported);
-                            WebSocketVo websocketVoReported = new WebSocketVo();
-                            websocketVoReported.setSenderId("system");
-                            websocketVoReported.setReceiverId(lifeNoticeReported.getReceiverId());
-                            websocketVoReported.setCategory("notice");
-                            websocketVoReported.setNoticeType("1");
-                            websocketVoReported.setIsRead(0);
-                            websocketVoReported.setText(com.alibaba.fastjson2.JSONObject.from(lifeNoticeReported).toJSONString());
-                            webSocketProcess.sendMessage(lifeNoticeReported.getReceiverId(), com.alibaba.fastjson2.JSONObject.from(websocketVoReported).toJSONString());
-                        }
+                //String phoneId = Objects.requireNonNull(JwtUtil.getCurrentUserInfo()).getString("userType") + "_" + JwtUtil.getCurrentUserInfo().getString("phone");
+                // 举报人消息
+                LifeNotice lifeNotice = getLifeNotice(lifeuserViolation);
+                lifeNoticeMapper.insert(lifeNotice);
+                WebSocketVo websocketVo = new WebSocketVo();
+                websocketVo.setSenderId("system");
+                websocketVo.setReceiverId(lifeNotice.getReceiverId());
+                websocketVo.setCategory("notice");
+                websocketVo.setNoticeType("1");
+                websocketVo.setIsRead(0);
+                websocketVo.setText(com.alibaba.fastjson2.JSONObject.from(lifeNotice).toJSONString());
+                webSocketProcess.sendMessage(lifeNotice.getReceiverId(), com.alibaba.fastjson2.JSONObject.from(websocketVo).toJSONString());
+
+                // 被举报人消息
+                if (StringUtils.isNotEmpty(lifeuserViolation.getReportContextType()) && "1,2,3".contains(lifeuserViolation.getReportContextType())) {
+                    LifeNotice lifeNoticeReported = getLifeReportedNotice(lifeuserViolation);
+                    if (lifeNoticeReported != null) {
+                        lifeNoticeMapper.insert(lifeNoticeReported);
+                        WebSocketVo websocketVoReported = new WebSocketVo();
+                        websocketVoReported.setSenderId("system");
+                        websocketVoReported.setReceiverId(lifeNoticeReported.getReceiverId());
+                        websocketVoReported.setCategory("notice");
+                        websocketVoReported.setNoticeType("1");
+                        websocketVoReported.setIsRead(0);
+                        websocketVoReported.setText(com.alibaba.fastjson2.JSONObject.from(lifeNoticeReported).toJSONString());
+                        webSocketProcess.sendMessage(lifeNoticeReported.getReceiverId(), com.alibaba.fastjson2.JSONObject.from(websocketVoReported).toJSONString());
                     }
+                }
                 return result;
             }
         } catch (Exception e) {
@@ -158,16 +158,16 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
 
         if ("1".equals(lifeuserViolation.getReportingUserType())) {
             StoreUser storeUsers = storeUserMapper.selectById(reportUserId);
-            phoneId = "store_"+storeUsers.getPhone();
+            phoneId = "store_" + storeUsers.getPhone();
         } else {
             LifeUser lifeUsers = lifeUserMapper.selectById(reportUserId);
-            phoneId = "user_"+lifeUsers.getUserPhone();
+            phoneId = "user_" + lifeUsers.getUserPhone();
         }
 
         lifeNotice.setReceiverId(phoneId);
 
-        if(StringUtils.isNotEmpty(reportContextType) && "1,2,3".contains(reportContextType)){
-            String violationType = StringUtils.isNotEmpty(lifeuserViolation.getViolationType())?lifeuserViolation.getViolationType():"13";
+        if (StringUtils.isNotEmpty(reportContextType) && "1,2,3".contains(reportContextType)) {
+            String violationType = StringUtils.isNotEmpty(lifeuserViolation.getViolationType()) ? lifeuserViolation.getViolationType() : "13";
             String violationText = EnumUtil.getStatusValue(Integer.parseInt(violationType));
 
             String storeOrUserName = "";
@@ -187,25 +187,25 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
 
             switch (reportContextType) {
                 case "1":
-                    message = "您在" + storeDate + "举报用户“" + storeOrUserName + "”,涉嫌"+violationText+",已提交至平台审核,1-3个工作日会将审核结果发送到您应用内的消息-通知中,请注意查收。";
+                    message = "您在" + storeDate + "举报用户“" + storeOrUserName + "”,涉嫌" + violationText + ",已提交至平台审核,1-3个工作日会将审核结果发送到您应用内的消息-通知中,请注意查收。";
                     break;
                 case "2":
                     String dynamicsId = lifeuserViolation.getDynamicsId();
                     String dynamicsDate = simpleDateFormat.format(new Date());
-                    if(StringUtils.isNotEmpty(dynamicsId)){
+                    if (StringUtils.isNotEmpty(dynamicsId)) {
                         LifeUserDynamics lifeUserDynamics = lifeUserDynamicsMapper.selectById(dynamicsId);
                         dynamicsDate = simpleDateFormats.format(lifeUserDynamics.getCreatedTime());
                     }
-                    message = "您在" + storeDate + "举报用户“" + storeOrUserName + "”在"+dynamicsDate+"发布的动态,涉嫌"+violationText+",已提交至平台审核,1-3个工作日会将审核结果发送到您应用内的消息-通知中,请注意查收。";
+                    message = "您在" + storeDate + "举报用户“" + storeOrUserName + "”在" + dynamicsDate + "发布的动态,涉嫌" + violationText + ",已提交至平台审核,1-3个工作日会将审核结果发送到您应用内的消息-通知中,请注意查收。";
                     break;
                 case "3":
                     String commonId = lifeuserViolation.getCommentId();
                     String commonDate = simpleDateFormat.format(new Date());
-                    if(StringUtils.isNotEmpty(commonId)){
-                        StoreComment storeComment  = storeCommentMapper.selectById(commonId);
+                    if (StringUtils.isNotEmpty(commonId)) {
+                        StoreComment storeComment = storeCommentMapper.selectById(commonId);
                         commonDate = simpleDateFormats.format(storeComment.getCreatedTime());
                     }
-                    message = "您在" + storeDate + "举报用户“" + storeOrUserName + "”在"+commonDate+"发布的评论,涉嫌"+violationText+",已提交至平台审核,1-3个工作日会将审核结果发送到您应用内的消息-通知中,请注意查收。";
+                    message = "您在" + storeDate + "举报用户“" + storeOrUserName + "”在" + commonDate + "发布的评论,涉嫌" + violationText + ",已提交至平台审核,1-3个工作日会将审核结果发送到您应用内的消息-通知中,请注意查收。";
                     break;
             }
         }
@@ -234,7 +234,7 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
             lifeNotice.setReceiverId("user_" + phoneId);
 
         }
-        if (StringUtils.isEmpty(phoneId)){
+        if (StringUtils.isEmpty(phoneId)) {
             return null;
         }
         String violationText = EnumUtil.getStatusValue(Integer.parseInt(lifeuserViolation.getViolationType()));
@@ -248,8 +248,8 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
         String storeDate = simpleDateFormat.format(new Date());
         String reportContextType = lifeuserViolation.getReportContextType();
 
-        if(StringUtils.isNotEmpty(reportContextType) && reportContextType.equals("1")){
-            message = "您在" + storeDate + "被举报涉嫌"+violationText+",平台将会进行核实。如确实存在违规行为,平台将禁用您的账号**天,到期后账号可恢复使用,应用内的环境需要我们共同维护。";
+        if (StringUtils.isNotEmpty(reportContextType) && reportContextType.equals("1")) {
+            message = "您在" + storeDate + "被举报涉嫌" + violationText + ",平台将会进行核实。如确实存在违规行为,平台将禁用您的账号**天,到期后账号可恢复使用,应用内的环境需要我们共同维护。";
         } else {
             return null;
         }
@@ -313,40 +313,41 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
     public IPage<LifeUserViolationDto> getViolationPage(int page, int size, String nickName, String phone, String processingStatus) {
         IPage<LifeUserViolationVo> pageRequest = new Page<>(page, size);
         QueryWrapper<LifeUserViolationVo> queryWrapper = new QueryWrapper<>();
-        
+
         // 基础查询条件
         queryWrapper.eq("luv.delete_flag", 0)
-                .in("luv.report_context_type", Arrays.asList("1", "2", "3"));
-        
+                //排除二手的举报
+                .notIn("luv.report_context_type", Arrays.asList("4", "5"));
+
         // 动态查询条件
         queryWrapper.like(StringUtils.isNotEmpty(nickName), "ui.nick_name", nickName)
                 .like(StringUtils.isNotEmpty(phone), "ui.phone", phone);
-        
+
         if (StringUtils.isNotEmpty(processingStatus)) {
             queryWrapper.eq("luv.processing_status", processingStatus);
         }
-        
+
         queryWrapper.orderByDesc("luv.updated_time");
-        
+
         IPage<LifeUserViolationVo> resultPage = lifeUserViolationMapper.getViolationPage(pageRequest, queryWrapper);
 
         return resultPage.convert(e -> {
             LifeUserViolationDto dto = new LifeUserViolationDto();
             BeanUtils.copyProperties(e, dto);
-            
+
             // 处理举报凭证图片
             if (Objects.nonNull(e.getReportEvidenceImg())) {
                 List<String> imageList = Arrays.stream(e.getReportEvidenceImg().split(","))
                         .map(String::trim)
                         .filter(StringUtils::isNotEmpty)
                         .collect(Collectors.toList());
-                
+
                 if (!imageList.isEmpty()) {
                     dto.setImage(imageList.get(0));
                     dto.setImageList(imageList);
                 }
             }
-            
+
             dto.setNickname(e.getNickName());
             return dto;
         });
@@ -354,7 +355,7 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
 
     @Override
     public void approve(int id, String processingStatus, String reportResult) {
-        if(id==0 || StringUtils.isBlank(processingStatus)){
+        if (id == 0 || StringUtils.isBlank(processingStatus)) {
             return;
         }
         LifeUserViolation v = lifeUserViolationMapper.selectById(id);
@@ -368,15 +369,15 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
         String violationTime = simpleDateFormat.format(v.getCreatedTime());
         // 被举报人信息
         String reportedUserName = "";
-        if(StringUtils.isNotEmpty(v.getReportedUserId())){
+        if (StringUtils.isNotEmpty(v.getReportedUserId())) {
             if (v.getReportedUserType().equals("1")) {
                 StoreUser storeUser = storeUserMapper.selectById(v.getReportedUserId());
-                if(storeUser != null){
+                if (storeUser != null) {
                     reportedUserName = storeUser.getNickName();
                 }
-            } else{
+            } else {
                 LifeUser lifeUser = lifeUserMapper.selectById(v.getReportedUserId());
-                if(lifeUser != null) {
+                if (lifeUser != null) {
                     reportedUserName = lifeUser.getUserName();
                 }
             }
@@ -384,15 +385,15 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
         // 被举报动态信息
         String dynamicsId = v.getDynamicsId();
         String dynamicsDate = simpleDateFormats.format(new Date());
-        if(StringUtils.isNotEmpty(dynamicsId)){
+        if (StringUtils.isNotEmpty(dynamicsId)) {
             LifeUserDynamics lifeUserDynamics = lifeUserDynamicsMapper.selectById(dynamicsId);
             dynamicsDate = simpleDateFormats.format(lifeUserDynamics.getCreatedTime());
         }
         // 被举报评论信息
         String commonId = v.getCommentId();
         String commonDate = simpleDateFormats.format(new Date());
-        if(StringUtils.isNotEmpty(commonId)){
-            StoreComment storeComment  = storeCommentMapper.selectById(commonId);
+        if (StringUtils.isNotEmpty(commonId)) {
+            StoreComment storeComment = storeCommentMapper.selectById(commonId);
             commonDate = simpleDateFormats.format(storeComment.getCreatedTime());
         }
 
@@ -405,13 +406,13 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
             // 通过
             if (v.getReportContextType().equals("1")) {
                 // 用户
-                message = "您在"+violationTime+"举报用户“"+reportedUserName+"”,涉嫌违法违规,经核实,确实存在违规行为,平台已将用户禁用,感谢您为此做出的贡献。";
+                message = "您在" + violationTime + "举报用户“" + reportedUserName + "”,涉嫌违法违规,经核实,确实存在违规行为,平台已将用户禁用,感谢您为此做出的贡献。";
                 title = "用户举报成功通知";
             }
             if (v.getReportContextType().equals("2")) {
                 // 动态
-                message = "您在"+violationTime+"举报用户“"+reportedUserName+"”在"+dynamicsDate+"发布的动态,涉嫌违法违规,经核实,确实存在违规行为,平台已将此动态下架,感谢您为此做出的贡献";
-                reportedMessage = "您在"+dynamicsDate+"发布的动态,经核实,确实存在违规行为,平台已将此动态下架,应用内的环境需要我们共同维护";
+                message = "您在" + violationTime + "举报用户“" + reportedUserName + "”在" + dynamicsDate + "发布的动态,涉嫌违法违规,经核实,确实存在违规行为,平台已将此动态下架,感谢您为此做出的贡献";
+                reportedMessage = "您在" + dynamicsDate + "发布的动态,经核实,确实存在违规行为,平台已将此动态下架,应用内的环境需要我们共同维护";
                 lifeUserDynamicsService.removeById(v.getDynamicsId());
                 title = "动态举报成功通知";
             }
@@ -419,29 +420,29 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
                 // 评论
                 if (v.getReportedUserType().equals("1")) {
                     // 商户
-                    message = "您在"+violationTime+"举报用户“"+reportedUserName+"”在"+commonDate+"发布的评论,涉嫌违法违规,经核实,确实存在违规行为,平台已将此评论下架,感谢您为此做出的贡献。";
+                    message = "您在" + violationTime + "举报用户“" + reportedUserName + "”在" + commonDate + "发布的评论,涉嫌违法违规,经核实,确实存在违规行为,平台已将此评论下架,感谢您为此做出的贡献。";
                     storeCommentService.removeById(v.getCommentId());
                 } else {
                     // 用户
-                    message = "您在"+violationTime+"举报用户“"+reportedUserName+"”在"+commonDate+"发布的评论,涉嫌违法违规,经核实,确实存在违规行为,平台已将此评论下架,感谢您为此做出的贡献。";
+                    message = "您在" + violationTime + "举报用户“" + reportedUserName + "”在" + commonDate + "发布的评论,涉嫌违法违规,经核实,确实存在违规行为,平台已将此评论下架,感谢您为此做出的贡献。";
                     lifeCommentMapper.deleteById(v.getCommentId());
                 }
-                reportedMessage = "您在"+commonDate+"发布的评论,经核实,确实存在违规行为,平台已将此评论下架,应用内的环境需要我们共同维护。";
+                reportedMessage = "您在" + commonDate + "发布的评论,经核实,确实存在违规行为,平台已将此评论下架,应用内的环境需要我们共同维护。";
                 title = "评论举报成功通知";
             }
         } else {
             // 驳回
             switch (v.getReportContextType()) {
                 case "1":
-                    message = "您在"+violationTime+"举报用户“"+reportedUserName+"”,涉嫌违法违规,经核实,不存在违规行为,感谢您为此做出的贡献。";
+                    message = "您在" + violationTime + "举报用户“" + reportedUserName + "”,涉嫌违法违规,经核实,不存在违规行为,感谢您为此做出的贡献。";
                     title = "用户举报失败通知";
                     break;
                 case "2":
-                    message = "您在"+violationTime+"举报用户“"+reportedUserName+"”在"+dynamicsDate+"发布的动态,涉嫌违法违规,经核实,不存在违规行为,感谢您为此做出的贡献。";
+                    message = "您在" + violationTime + "举报用户“" + reportedUserName + "”在" + dynamicsDate + "发布的动态,涉嫌违法违规,经核实,不存在违规行为,感谢您为此做出的贡献。";
                     title = "动态举报失败通知";
                     break;
                 case "3":
-                    message = "您在"+violationTime+"举报用户“"+reportedUserName+"”在"+commonDate+"发布的评论,涉嫌违法违规,经核实,不存在违规行为,感谢您为此做出的贡献。";
+                    message = "您在" + violationTime + "举报用户“" + reportedUserName + "”在" + commonDate + "发布的评论,涉嫌违法违规,经核实,不存在违规行为,感谢您为此做出的贡献。";
                     title = "评论举报失败通知";
                     break;
             }
@@ -483,7 +484,7 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
 
 
         // 被举报通知
-        if(StringUtils.isNotEmpty(reportedMessage)) {
+        if (StringUtils.isNotEmpty(reportedMessage)) {
             LifeNotice reportedLifeMessage = new LifeNotice();
             com.alibaba.fastjson2.JSONObject jsonObjectReported = new com.alibaba.fastjson2.JSONObject();
             jsonObjectReported.put("message", reportedMessage);
@@ -578,7 +579,7 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
         queryWrapper.orderByDesc("luv.updated_time");
 
         List<LifeUserViolationVo> violationList = lifeUserViolationMapper.getViolationList(queryWrapper);
-        
+
         // 如果查询结果为空,返回空列表生成的Excel
         if (CollectionUtils.isEmpty(violationList)) {
             log.warn("导出Excel时查询结果为空,nickName={}, phone={}, processingStatus={}", nickName, phone, processingStatus);
@@ -586,7 +587,7 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
 
         // 日期格式化器(复用)
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-        
+
         // 使用Stream API进行转换,提高性能和可读性
         AtomicInteger serialNumber = new AtomicInteger(1);
         List<LifeUserViolationExcelVO> excelDataList = violationList.stream()
@@ -596,10 +597,10 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
         // 生成Excel文件
         String fileName = UUID.randomUUID().toString().replace("-", "");
         String filePath = ExcelGenerator.generateExcel(
-                excelPath + excelGeneratePath + fileName + ".xlsx", 
-                excelDataList, 
+                excelPath + excelGeneratePath + fileName + ".xlsx",
+                excelDataList,
                 LifeUserViolationExcelVO.class);
-        
+
         // 上传到OSS并返回URL
         return aliOSSUtil.uploadFile(new File(filePath), "excel/" + fileName + ".xlsx");
     }
@@ -607,18 +608,18 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
     /**
      * 将 LifeUserViolationVo 转换为 LifeUserViolationExcelVO
      *
-     * @param vo 源对象
+     * @param vo           源对象
      * @param serialNumber 序号
-     * @param formatter 日期格式化器
+     * @param formatter    日期格式化器
      * @return Excel VO对象
      */
     private LifeUserViolationExcelVO convertToExcelVO(LifeUserViolationVo vo, int serialNumber, DateTimeFormatter formatter) {
         LifeUserViolationExcelVO excelVO = new LifeUserViolationExcelVO();
         BeanUtils.copyProperties(vo, excelVO);
-        
+
         excelVO.setId(serialNumber);
         excelVO.setNickname(vo.getNickName());
-        
+
         // 处理举报凭证图片(安全分割,避免数组越界)
         if (StringUtils.isNotEmpty(vo.getReportEvidenceImg())) {
             String[] imageParts = vo.getReportEvidenceImg().split(",");
@@ -626,7 +627,7 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
                 excelVO.setReportEvidenceImg(imageParts[0].trim());
             }
         }
-        
+
         // 处理举报内容类型
         if (StringUtils.isNotEmpty(vo.getReportContextType())) {
             try {
@@ -636,7 +637,7 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
                 excelVO.setReportContextType(vo.getReportContextType());
             }
         }
-        
+
         // 处理举报理由
         if (StringUtils.isNotEmpty(vo.getViolationType())) {
             try {
@@ -646,7 +647,7 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
                 excelVO.setViolationType(vo.getViolationType());
             }
         }
-        
+
         // 处理处理状态
         if (StringUtils.isNotEmpty(vo.getProcessingStatus())) {
             try {
@@ -656,7 +657,7 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
                 excelVO.setProcessingStatus(vo.getProcessingStatus());
             }
         }
-        
+
         // 格式化创建时间
         if (Objects.nonNull(vo.getCreatedTime())) {
             try {
@@ -669,7 +670,7 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
                 log.warn("格式化创建时间失败,createdTime={}, error={}", vo.getCreatedTime(), e.getMessage());
             }
         }
-        
+
         // 格式化处理时间
         if (Objects.nonNull(vo.getProcessingTime())) {
             try {
@@ -682,7 +683,7 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
                 log.warn("格式化处理时间失败,processingTime={}, error={}", vo.getProcessingTime(), e.getMessage());
             }
         }
-        
+
         return excelVO;
     }
 

+ 3 - 2
alien-store/src/main/java/shop/alien/store/service/impl/PlatformStoreCouponServiceImpl.java

@@ -548,8 +548,9 @@ public class PlatformStoreCouponServiceImpl implements PlatformStoreCouponServic
             lifeGroupBuyMainVo.setExpiredState("1"); // 当前时间超过 endDate → 已到期
         }
         // 不可用日期
-        if(lifeGroupBuyMainVo.getDisableDateType()==1){
-            String afterSemicolon = lifeGroupBuyMain.getDisableDateValue().split(";")[1];
+        if (lifeGroupBuyMainVo.getDisableDateType() == 1) {
+            String[] split = lifeGroupBuyMain.getDisableDateValue().split(";");
+            String afterSemicolon = split.length > 2 ? split[1] : split[0];
             if (StringUtils.isNotEmpty(afterSemicolon)) {
                 List<String> collectUnavailableDate = Arrays.stream(afterSemicolon.split(",")).map(String::trim).collect(Collectors.toList());
                 if (CollectionUtils.isNotEmpty(collectUnavailableDate)) {