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";

    }

    }

  • 相关阅读:
    eclipse常用快捷键
    .net操作Excel快速
    treeview使用sort以后取消排序
    行转列,参数是文本类型
    easyui分页控件汉化扩展
    在子页面中获取父frameset中元素
    easyui-datagrid自定义分页控件样式
    字符串和图片转换
    VS2012设置随笔
    DevExpress之GridControl
  • 原文地址:https://www.cnblogs.com/liuzhaolong/p/12971402.html
Copyright © 2011-2022 走看看