Explorar o código

早筛后台管理+7天套餐

hurixing hai 8 meses
pai
achega
678b44c6f4

+ 27 - 0
hcp-core/src/main/java/com/yingyangfly/core/domain/EaDetectDetail.java

@@ -0,0 +1,27 @@
+package com.yingyangfly.core.domain;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class EaDetectDetail {
+
+    private Long detectId;
+
+    private Date topicStartTime;
+
+    private Date topicEndTime;
+
+    private String userTime;
+
+    private int results;
+
+    private String topicMainPic;
+
+    private String topicRightPic;
+
+    private String userChosePic;
+
+    private String stageLevel;
+}

+ 7 - 0
hcp-core/src/main/java/com/yingyangfly/core/domain/LearningPackage.java

@@ -104,6 +104,9 @@ public class LearningPackage implements Serializable {
         if ("F".equals(getTimeType())) {
             return 1095;
         }
+        if ("G".equals(getTimeType())){
+            return 7;
+        }
         return 0;
     }
 
@@ -138,6 +141,10 @@ public class LearningPackage implements Serializable {
                 orderEndDate =  DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,endTime);
             }
 
+            if ("G".equals(getTimeType())){
+                Date endTime = DateUtils.addDays(startDate,7);
+                orderEndDate =  DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,endTime);
+            }
             return orderEndDate;
         }catch (Exception e){
             log.error("<<<<<<<<<获取订单结束日期异常:>>>>>>>>>>>>",e);

+ 9 - 0
hcp-core/src/main/java/com/yingyangfly/core/mapper/EaDetectDetailMapper.java

@@ -0,0 +1,9 @@
+package com.yingyangfly.core.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.yingyangfly.core.domain.EaDetectDetail;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface EaDetectDetailMapper extends BaseMapper<EaDetectDetail> {
+}

+ 12 - 0
hcp-core/src/main/java/com/yingyangfly/core/service/EaDetectDetailService.java

@@ -0,0 +1,12 @@
+package com.yingyangfly.core.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yingyangfly.core.domain.EaDetectDetail;
+
+import java.util.List;
+
+public interface EaDetectDetailService extends IService<EaDetectDetail> {
+
+    List<EaDetectDetail> selectList(EaDetectDetail eaDetectDetail);
+}

+ 29 - 0
hcp-core/src/main/java/com/yingyangfly/core/service/impl/EaDetectDetailServiceImpl.java

@@ -0,0 +1,29 @@
+package com.yingyangfly.core.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yingyangfly.core.domain.EaDetectDetail;
+import com.yingyangfly.core.mapper.EaDetectDetailMapper;
+import com.yingyangfly.core.service.EaDetectDetailService;
+import org.springframework.stereotype.Service;
+
+import java.util.Collections;
+import java.util.List;
+
+@Service
+public class EaDetectDetailServiceImpl extends ServiceImpl<EaDetectDetailMapper, EaDetectDetail> implements EaDetectDetailService {
+
+
+
+    @Override
+    public List<EaDetectDetail> selectList(EaDetectDetail eaDetectDetail) {
+        if (eaDetectDetail == null || eaDetectDetail.getDetectId() == null) {
+            // 根据业务需求返回空列表或抛出异常
+            return Collections.emptyList();
+        }
+
+        return baseMapper.selectList(lambdaQuery()
+                .eq(EaDetectDetail::getDetectId, eaDetectDetail.getDetectId())
+                // 可根据需要添加其他查询条件
+                .getWrapper());
+    }
+}

+ 7 - 0
hcp-core/src/main/java/com/yingyangfly/core/vo/LearningPackageVo.java

@@ -91,6 +91,9 @@ public class LearningPackageVo implements Serializable {
         if ("F".equals(getTimeType())) {
             return 1095;
         }
+        if ("G".equals(getTimeType())){
+            return 7;
+        }
         return 0;
     }
 
@@ -123,6 +126,10 @@ public class LearningPackageVo implements Serializable {
                 Date endTime = DateUtils.addYears(startDate,3);
                 orderEndDate =  DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,endTime);
             }
+            if ("G".equals(getTimeType())){
+                Date endTime = DateUtils.addDays(startDate,7);
+                orderEndDate =  DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,endTime);
+            }
 
             return orderEndDate;
         }catch (Exception e){

+ 28 - 0
hcp-platform/src/main/java/com/yingyangfly/platform/controller/EaDetectDetailController.java

@@ -0,0 +1,28 @@
+package com.yingyangfly.platform.controller;
+
+import com.yingyangfly.common.dto.ResultResponse;
+import com.yingyangfly.common.log.annotation.TraceLog;
+import com.yingyangfly.core.domain.EaDetectDetail;
+import com.yingyangfly.core.service.EaDetectDetailService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+@Slf4j
+@RestController
+@RequestMapping("/ea/detect/Detail")
+public class EaDetectDetailController {
+
+    @Resource
+    private EaDetectDetailService eaDetectDetailService;
+
+    @PostMapping("/selectByIdList")
+    @TraceLog
+    public ResultResponse selectList(@RequestBody EaDetectDetail eaDetectDetail) {
+        return ResultResponse.success(eaDetectDetailService.selectList(eaDetectDetail));
+    }
+}