src/main/java/com/phms/controller/user/UserPetController.java
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.phms.controller.user;
import com.phms.pojo.Pet;
import com.phms.pojo.User;
import com.phms.service.PetService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
/**
* 用户宠物管理
*/
@Controller("UserPetController")
@RequestMapping("/user/pet")
public class UserPetController {
@Autowired
private PetService petService;
private final Logger logger = LoggerFactory.getLogger(this.getClass());
/**
* 医生管理宠物页面user/petListDoctor.html
*/
@RequestMapping("/petListDoctor")
public String petListDoctor() {
return "user/petListDoctor";
}
/**
* 普通用户管理宠物页面user/petList.html
*/
@RequestMapping("/petList")
public String petList() {
return "user/petList";
}
/**
* 普通用户返回查询数据
*/
@RequestMapping("/getAllByLimit")
@ResponseBody
public Object getAllByLimit(Pet pojo) {
Subject subject = SecurityUtils.getSubject();
User user = (User) subject.getPrincipal();
pojo.setUserId(user.getId());
return petService.getAllByLimit(pojo);
}
/**
* 医生返回查询数据
*/
@RequestMapping("/getAllByLimitDoctor")
@ResponseBody
后面还有 53 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
