修改登录1
This commit is contained in:
parent
c41d50c54f
commit
e667e312ab
@ -17,6 +17,7 @@ import com.example.caseData.service.UserService;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -30,6 +31,7 @@ import java.util.Random;
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/api")
|
||||
@Slf4j
|
||||
public class PublicController {
|
||||
@Resource
|
||||
private UserService userService;
|
||||
@ -78,6 +80,7 @@ public class PublicController {
|
||||
}
|
||||
|
||||
Map resultMap = userService.getAppUser(phoneInfo.getPurePhoneNumber());
|
||||
log.info(resultMap.toString());
|
||||
// 取出code
|
||||
Integer code = (Integer) resultMap.get("code");
|
||||
if (code != 200){
|
||||
|
||||
@ -379,6 +379,7 @@ public class UserService {
|
||||
String signature = Sha256Util.getSign(params, "zd8V2LYD4achjFZrbHgD2PuzKuthDCVx");
|
||||
params.put("signature", signature);
|
||||
String result = HttpUtil.post("https://wx.igandan.com/hcp/getInfo", params);
|
||||
log.info(result);
|
||||
// 解析JSON
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
Map resultMap = objectMapper.readValue(result, Map.class);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user