|
@@ -1,6 +1,5 @@
|
|
|
package com.rf.psychological.scale.rest;
|
|
|
|
|
|
-import cn.hutool.core.date.DateUnit;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.rf.psychological.base.rest.BaseController;
|
|
@@ -9,26 +8,18 @@ import com.rf.psychological.scale.dao.model.UserRecordEntity;
|
|
|
import com.rf.psychological.scale.service.UserRecordService;
|
|
|
import com.rf.psychological.security.AesEncryptUtils;
|
|
|
import com.rf.psychological.security.SafetyProcess;
|
|
|
-import com.rf.psychological.utils.Constant;
|
|
|
import com.rf.psychological.utils.Result;
|
|
|
import com.rf.psychological.wxpay.model.OrderInfo;
|
|
|
-import com.rf.psychological.wxpay.model.PromotionInfo;
|
|
|
import com.rf.psychological.wxpay.service.OrderInfoService;
|
|
|
-import com.rf.psychological.wxpay.service.PromotionInfoService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-import static cn.hutool.core.date.DatePattern.PURE_DATETIME_PATTERN;
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* @author zsy
|
|
@@ -46,15 +37,9 @@ public class UserRecordController extends BaseController {
|
|
|
@Autowired
|
|
|
private UserRecordService userRecordService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private PromotionInfoService promotionInfoService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private OrderInfoService orderInfoService;
|
|
|
|
|
|
- @Value("${spring.profiles.active}")
|
|
|
- private String profileValue;
|
|
|
-
|
|
|
/**
|
|
|
* 微博分享-通过手机号查询测试记录
|
|
|
* @param jsonParam 参数
|
|
@@ -89,6 +74,34 @@ public class UserRecordController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据id查询测试详细信息
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @SafetyProcess
|
|
|
+ @GetMapping("/getWeiboRecordById")
|
|
|
+ @ApiOperation(value = "根据id查询测试详细信息")
|
|
|
+ public Result getWeiboRecordById(@RequestParam(name = "id") String id) {
|
|
|
+ try {
|
|
|
+ log.info("获取记录开始时间==========================="+DateUtil.current());
|
|
|
+ //获取测试记录信息
|
|
|
+ UserRecordEntity userRecordEntity = this.userRecordService.getUserRecordById(id);
|
|
|
+ log.info("获取记录查询时间==========================="+DateUtil.current());
|
|
|
+ if (userRecordEntity == null){
|
|
|
+ return fail("参数错误");
|
|
|
+ }
|
|
|
+ JSONObject result = new JSONObject();
|
|
|
+ result.put("userRecordEntity", userRecordEntity);
|
|
|
+ log.info("获取记录结束时间==========================="+DateUtil.current());
|
|
|
+ return success(result);
|
|
|
+ }catch (Exception e){
|
|
|
+ log.error(e.getMessage());
|
|
|
+ return fail("操作失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
}
|