|
|
@@ -1,5 +1,6 @@
|
|
|
package org.springblade.gateway.login_gateway.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
@@ -8,12 +9,17 @@ import lombok.AllArgsConstructor;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.gateway.login_gateway.service.LoginService;
|
|
|
+import org.springblade.sing.heat.entity.UserHeat;
|
|
|
+import org.springblade.sing.heat.service.IUserHeatService;
|
|
|
+import org.springblade.sing.point.entity.UserPufaPoint;
|
|
|
+import org.springblade.sing.point.service.IUserPufaPointService;
|
|
|
import org.springblade.sing.user.entity.LoginUser;
|
|
|
import org.springblade.sing.user.service.ILoginUserService;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -25,8 +31,10 @@ import javax.validation.Valid;
|
|
|
@AllArgsConstructor
|
|
|
public class LoginController {
|
|
|
|
|
|
- private LoginService loginService;
|
|
|
- private ILoginUserService loginUserService;
|
|
|
+ private final LoginService loginService;
|
|
|
+ private final ILoginUserService loginUserService;
|
|
|
+ private final IUserPufaPointService userPufaPointService;
|
|
|
+ private final IUserHeatService userHeatService;
|
|
|
|
|
|
/**
|
|
|
* 登陆校验
|
|
|
@@ -55,4 +63,41 @@ public class LoginController {
|
|
|
}
|
|
|
return R.data(user);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询用户积分
|
|
|
+ */
|
|
|
+ @PostMapping("/userPufaPoint")
|
|
|
+ @ApiOperationSupport(order = 7)
|
|
|
+ @ApiOperation(value = "查询用户普法积分")
|
|
|
+ public R<UserPufaPoint> userPufaPoint(@ApiParam(value = "用户手机号码",required = true) @RequestParam String phone) {
|
|
|
+ return R.data(userPufaPointService.getOne(
|
|
|
+ Wrappers.<UserPufaPoint>lambdaQuery()
|
|
|
+ .eq(UserPufaPoint::getPhone,phone)));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询用户热力值
|
|
|
+ */
|
|
|
+ @PostMapping("/userHeatValue")
|
|
|
+ @ApiOperationSupport(order = 8)
|
|
|
+ @ApiOperation(value = "查询用户热力值")
|
|
|
+ public R<UserHeat> userHeatValue(@ApiParam(value = "用户手机号码",required = true) @RequestParam String phone) {
|
|
|
+ return R.data(userHeatService.getOne(
|
|
|
+ Wrappers.<UserHeat>lambdaQuery()
|
|
|
+ .eq(UserHeat::getPhone,phone)));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询用户热力值和普法积分
|
|
|
+ */
|
|
|
+ @PostMapping("/userHeatValueAndPufaPoint")
|
|
|
+ @ApiOperationSupport(order = 8)
|
|
|
+ @ApiOperation(value = "查询用户热力值和普法积分")
|
|
|
+ public R<Map<String,?>> userHeatValueAndPufaPoint(@ApiParam(value = "用户手机号码",required = true) @RequestParam String phone) {
|
|
|
+ Map<String, Object> hashMap = new HashMap<>();
|
|
|
+ hashMap.put("userHeatValue",userHeatValue(phone));
|
|
|
+ hashMap.put("userPufaPoint",userPufaPoint(phone));
|
|
|
+ return R.data(hashMap);
|
|
|
+ }
|
|
|
}
|