src/com/marry/controller/PhotoController.java
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.marry.controller;
import com.github.pagehelper.PageInfo;
import com.marry.entity.Grapher;
import com.marry.entity.Photo;
import com.marry.entity.Type;
import com.marry.entity.User;
import com.marry.service.GrapherService;
import com.marry.service.PhotoService;
import com.marry.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@Controller
@RequestMapping("photo")
public class PhotoController {
@Autowired
private PhotoService photoService;
@Autowired
private TypeService typeService;
@Autowired
private GrapherService grapherService;
@ModelAttribute
public String path(HttpServletRequest request){
return request.getServletPath();
}
@RequestMapping("list")
public String list(@RequestParam(required = false) Integer tid,@RequestParam(required = false) Integer gid, String title,String name,String isMy, Integer pageNo, Model model, HttpSession session){
if (pageNo==null){
pageNo=1;
}
if (StringUtils.isEmpty(title)){
title=null;
}
if (!StringUtils.isEmpty(name)){
PageInfo<Grapher> pageInfo=grapherService.selectList(name,null,1);
Grapher grapher=pageInfo.getList().get(0);
gid=grapher.getGid();
}
if (tid!=null&&tid==-1){
tid=null;
}
if (gid!=null&&gid==-1){
gid=null;
}
User user= (User) session.getAttribute("login");
后面还有 76 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。