记得上下班打卡 | git大法好,push需谨慎

Commit eb6004c8 authored by jiangxiulong's avatar jiangxiulong

完善登陆

parent 393db94f
...@@ -34,8 +34,7 @@ public class SweetLoginController { ...@@ -34,8 +34,7 @@ public class SweetLoginController {
@RequestParam() String iv, @RequestParam() String iv,
@RequestParam(defaultValue = "1") Integer type @RequestParam(defaultValue = "1") Integer type
) { ) {
sweetLoginService.userInfo(code, encryptedData, iv, type); return sweetLoginService.userInfo(code, encryptedData, iv, type);
return ResponseDto.success();
} }
} }
...@@ -7,10 +7,7 @@ import io.swagger.annotations.ApiImplicitParam; ...@@ -7,10 +7,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "公众号模版消息") @Api(tags = "公众号模版消息")
@RestController @RestController
...@@ -38,13 +35,13 @@ public class SweetTemplateController { ...@@ -38,13 +35,13 @@ public class SweetTemplateController {
return ResponseDto.success(); return ResponseDto.success();
} }
@GetMapping("remind") @PostMapping("remind")
@ApiOperation("提醒记录") @ApiOperation("提醒记录")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "code", value = "微信code", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "code", value = "微信code", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "encryptedData", value = "encryptedData", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "encryptedData", value = "encryptedData", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "iv", value = "iv", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "iv", value = "iv", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk"), @ApiImplicitParam(type = "form", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk"),
}) })
public ResponseDto remind( public ResponseDto remind(
@RequestParam() String code, @RequestParam() String code,
......
...@@ -12,6 +12,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -12,6 +12,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Objects; import java.util.Objects;
/** /**
...@@ -82,7 +83,11 @@ public class SweetLoginServiceImpl { ...@@ -82,7 +83,11 @@ public class SweetLoginServiceImpl {
String unionId = sessionInfo.getUnionid(); String unionId = sessionInfo.getUnionid();
String openId = sessionInfo.getOpenid(); String openId = sessionInfo.getOpenid();
return ResponseDto.success(); HashMap userInfo = new HashMap();
userInfo.put("unionId", unionId);
userInfo.put("openId", openId);
return ResponseDto.success(userInfo);
} catch (Exception e) { } catch (Exception e) {
return ResponseDto.failure(); return ResponseDto.failure();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment