修复用户信息修改页面数据绑定方式,改为使用axios进行数据获取和绑定

This commit is contained in:
F嘉阳
2018-02-23 10:49:55 +08:00
parent 3abbd49f65
commit c91ee252a3
7 changed files with 168 additions and 15 deletions

View File

@@ -9,8 +9,12 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import static com.fjy.spring.constant.GlobalConstant.USER_SESSION_KEY;
@RestController
public class DataController {
@@ -38,6 +42,9 @@ public class DataController {
@Autowired
private VUserfileService vUserfileService;
@Resource
HttpServletRequest httpServletRequest;
@GetMapping("/home/findAllHomework")
public List<VWorkDetail> findAllHomework(){
List<VWorkDetail> homeworks = workDetailService.findAll();
@@ -108,4 +115,10 @@ public class DataController {
new UserException(ResultEnum.EMPTY_DATA);
return null;
}
@GetMapping("/home/userinfo")
public VUserinfo findUserInfo(){
TbUser user= (TbUser)httpServletRequest.getSession().getAttribute(USER_SESSION_KEY);
return userService.findUserInfo(user.getColuserid());
}
}