src/controller/HetongController.java
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import Pojo.Apply;
import Pojo.Checkout;
import Pojo.Hetong;
import Pojo.Houselist;
import Pojo.Zulist;
import service.ApplyService;
import service.CheckoutService;
import service.HetongService;
import service.HouselistService;
import service.ZulistService;
@Controller
@RequestMapping("/hetong")
public class HetongController {
@Autowired
private HetongService hetongService;
@Autowired
private HouselistService houselistService;
@Autowired
private ApplyService applyService;
@Autowired
private ZulistService zulistService;
@Autowired
private CheckoutService checkoutService;
//新增合同信息,修改房屋列表的状态,从申请列表中删除,增添到租赁列表当中
@RequestMapping("/inserthetong")
public String inserthetong(Model model,Hetong hetong){
//新增合同信息
hetongService.inserthetong(hetong);
Hetong hetong1=hetongService.findhetong(hetong.getHouse_id());
//修改房屋列表状态
Houselist houselist=houselistService.findhouseid(hetong1.getHouse_id());
houselist.setStatus("已租赁");
houselistService.updatehousestatus(houselist);
//添加到租赁列表当中
Zulist zulist=new Zulist();
Apply apply=applyService.findbyhouse_id(hetong.getHouse_id());
zulist.setHouse_id(hetong.getHouse_id());
zulist.setUserlist_id(apply.getUserlist_id());
zulist.setContract_id(hetong1.getId());
zulist.setPrice(apply.getPrice());
zulist.setAddress(apply.getAddress());
zulistService.insertzulist(zulist);
//从申请列表中删除
applyService.deletebyhouse_id(hetong1.getHouse_id());
model.addAttribute("error", "zusuccess");
return "redirect:/zulist/findzulist.action";
}
@RequestMapping("/seehetong")
public String seehetong(String house_id,Model model){
Hetong hetong=hetongService.findhetong(house_id);
model.addAttribute("hetong", hetong);
后面还有 43 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。