Commit 1df7bbf9 by 桂前礼

bug: [none] fixbug NPE

parent f7495493
......@@ -27,6 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
import java.util.Optional;
/**
* (AppletRecord)表控制层
......@@ -136,6 +137,9 @@ public class AppletRecordFacade {
@RequestMapping(value = "/addFootstep", method = RequestMethod.POST)
public ResponseDto<Void> addFootstep(@CookieValue("userInfo") String userInfo,
@RequestBody AddFootstepDto addFootstepDto) {
if (!Optional.ofNullable(addFootstepDto).map(AddFootstepDto::getTypeName).isPresent()) {
return new ResponseDto<>();
}
Long wechatUserId = Cookie.getId(userInfo, Cookie._WECHAT_USER_ID);
Integer fromType = addFootstepDto.getFromType();
String typeName = addFootstepDto.getTypeName();
......
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