zoukankan      html  css  js  c++  java
  • 双向表-controller

    package com.lzl.controller;

    import org.apache.dubbo.config.annotation.Reference;
    import org.springframework.stereotype.Controller;
    import org.springframework.ui.Model;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RequestParam;

    import com.github.pagehelper.PageInfo;
    import com.lzl.pojo.Mingxi;
    import com.lzl.pojo.Wuliao;
    import com.lzl.service.MingxiService;

    @Controller
    public class MingxiController {

    @Reference
    MingxiService service;

    @RequestMapping("long")
    public String select(Model m,@RequestParam(defaultValue = "1")Integer pageNum,
    @RequestParam(defaultValue = "3")Integer pageSize,
    String ctime1,String ctime2,String cqid,String cname,String ctel) {

    PageInfo<Mingxi> info = service.select(pageNum,pageSize,ctime1,ctime2,cqid,cname,ctel);
    m.addAttribute("info", info);
    m.addAttribute("ctime1", ctime1);
    m.addAttribute("ctime2", ctime2);
    m.addAttribute("cqid", cqid);
    m.addAttribute("cname", cname);
    m.addAttribute("ctel", ctel);


    return "list";
    }

    @RequestMapping("/add")
    public String toadd() {
    return "add";
    }

    @RequestMapping("/addmingxi")
    public String add(Mingxi mingxi,Wuliao wuliao) {

    service.addWuliao(wuliao);
    service.addMingxi(mingxi);

    return "redirect:long";

    }

    }

  • 相关阅读:
    Mysql 存储引擎中InnoDB与Myisam的主要区别
    SELECT FOR UPDATE(转)
    OAuth的机制原理讲解及开发流程 (转)
    缓存
    个人研究
    基础知识
    sql
    面试问题
    mysql的partition分区
    git安装配置和使用
  • 原文地址:https://www.cnblogs.com/liuzhaolong/p/12971402.html
Copyright © 2011-2022 走看看