Преглед изворни кода

调整了积分明细接口的代码位置

jinshihui пре 1 дан
родитељ
комит
e0f53d58be

+ 0 - 29
nightFragrance-admin/src/main/java/com/ylx/web/controller/massage/WxController.java

@@ -93,11 +93,6 @@ public class WxController extends BaseController {
     @Autowired
     private CouponReceiveService couponReceiveService;
 
-    @Resource
-    private IPointUserLogService pointUserLogService;
-
-
-
     @Resource(name = "commonAsyncExecutor")
     private ThreadPoolTaskExecutor threadPoolTaskExecutor;
 
@@ -377,28 +372,4 @@ public class WxController extends BaseController {
             throw new RuntimeException(e);
         }
     }
-
-    /**
-     * PC端根据用户openId查询用户积分详情
-     *
-     * @param page 分页参数
-     * @param queryDTO 查询条件,包含用户openId、积分项目、开始时间、结束时间
-     * @return R<Page<UserPointDetailVO>> 用户积分详情分页列表
-     */
-    @GetMapping("pc/getUserPointDetailList")
-    @ApiOperation("PC端根据用户openId查询用户积分详情")
-    public R<Page<UserPointDetailVO>> getUserPointDetailList(Page<UserPointDetailVO> page, UserPointDetailQueryDTO queryDTO) {
-        try {
-            if (queryDTO == null || StringUtils.isBlank(queryDTO.getOpenId())) {
-                return R.fail("openId不能为空");
-            }
-            return R.ok(pointUserLogService.getPcUserPointDetailList(page, queryDTO));
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw new RuntimeException(e);
-        }
-    }
-
-
-
 }

+ 44 - 0
nightFragrance-massage/src/main/java/com/ylx/point/controller/AdminPointController.java

@@ -0,0 +1,44 @@
+package com.ylx.point.controller;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ylx.common.core.domain.R;
+import com.ylx.point.domain.dto.UserPointDetailQueryDTO;
+import com.ylx.point.domain.vo.UserPointDetailVO;
+import com.ylx.point.service.IPointUserLogService;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+
+/**
+ * PC后端积分Controller
+ */
+@RestController
+@RequestMapping("/admin/point")
+public class AdminPointController {
+
+    @Resource
+    private IPointUserLogService pointUserLogService;
+
+    /**
+     * 根据用户openId查询用户积分详情
+     *
+     * @param page 分页参数
+     * @param queryDTO 查询条件,包含用户openId、积分项目、开始时间、结束时间
+     * @return R<Page<UserPointDetailVO>> 用户积分详情分页列表
+     */
+    @GetMapping("/getUserPointDetailList")
+    @ApiOperation("PC端根据用户openId查询用户积分详情")
+    public R<Page<UserPointDetailVO>> getUserPointDetailList(Page<UserPointDetailVO> page, UserPointDetailQueryDTO queryDTO) {
+        try {
+            if (StringUtils.isBlank(queryDTO.getOpenId())) {
+                return R.fail("openId不能为空");
+            }
+            return R.ok(pointUserLogService.getPcUserPointDetailList(page, queryDTO));
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
+    }
+}

+ 4 - 0
nightFragrance-massage/src/main/java/com/ylx/point/service/impl/PointUserLogServiceImpl.java

@@ -111,6 +111,10 @@ public class PointUserLogServiceImpl extends ServiceImpl<PointUserLogMapper, Poi
         return this.pointUserLogMapper.selectPcUserPointDetailList(page, dto);
     }
 
+    /**
+     * 格式化时间范围
+     * @param dto
+     */
     private void normalizeTimeRange(UserPointDetailQueryDTO dto) {
         if (StringUtils.isNotBlank(dto.getStartTime()) && dto.getStartTime().trim().length() == 10) {
             dto.setStartTime(dto.getStartTime().trim() + " 00:00:00");