作者 朱兆平

第一次从SVN转过来

正在显示 42 个修改的文件 包含 4833 行增加0 行删除

要显示太多修改。

为保证性能只显示 42 of 42+ 个文件。

... ... @@ -20,3 +20,4 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
.idea/*
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.tianbo</groupId>
<artifactId>statistics</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<finalName>statistics</finalName>
<plugins>
<!--mybatis 逆向工程插件-->
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
</configuration>
<dependencies>
<dependency>
<groupId>com.tianbo</groupId>
<artifactId>plugin</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>/Users/mrz/Documents/maven/plugin.jar</systemPath>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<includes>
<include>**/*.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<spring.version>4.3.10.RELEASE</spring.version>
<shiro.version>1.2.3</shiro.version>
<!-- log4j日志文件管理包版本 -->
<slf4j.version>1.6.6</slf4j.version>
<log4j.version>1.2.17</log4j.version>
<commons-lang3.version>3.3</commons-lang3.version>
<commons-collections.version>3.2.1</commons-collections.version>
<jackson.version>2.8.9</jackson.version>
<junit.version>4.12</junit.version>
<ehcache.version>2.6.8</ehcache.version>
</properties>
<dependencies>
<!-- springframe start -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- springframe end -->
<!--aspectj start-->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.8.6</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.6</version>
</dependency>
<!--aspectj end-->
<!--c3p0-->
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.5.1</version>
</dependency>
<!--servlet/jsp api start-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<!--servlet/jsp api end-->
<!--junit4-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<!--mybatis-->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.3.0</version>
</dependency>
<!--mybatis spring整合-->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.2.3</version>
</dependency>
<!--mysql driver-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<!--jstl-->
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!--oracle driver-->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.4.0-atlassian-hosted</version>
</dependency>
<!-- ehcache -->
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>${ehcache.version}</version>
</dependency>
<!--shiro-->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>${shiro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId>
<version>${shiro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-cas</artifactId>
<version>${shiro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>${shiro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-ehcache</artifactId>
<version>${shiro.version}</version>
</dependency>
<!-- 日志文件管理包 -->
<!-- log start -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- log end -->
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>${commons-collections.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<!--jackson-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf</artifactId>
<version>2.7.18</version>
<type>pom</type>
</dependency>
</dependencies>
</project>
\ No newline at end of file
... ...
package com.tianbo.common;
import com.tianbo.util.dao.Page;
import com.tianbo.util.dao.Totals;
import java.io.Serializable;
import java.util.List;
/**
* 返回对象以及对象分页
* @param <T>
*/
public class ModelAndPage<T> implements Serializable {
private static final long serialVersionUID = 6732325477388107799L;
private List<T> modelList;
private Page page;
private Totals totals;
public ModelAndPage(){
}
public ModelAndPage(List<T> list,Page page){
this.modelList = list;
this.page = page;
}
public ModelAndPage(List<T> list,Page page,Totals totals){
this.modelList = list;
this.page = page;
this.totals = totals;
}
public List<T> getModel() {
return modelList;
}
public void setModel(List<T> model) {
this.modelList = model;
}
public Page getPage() {
return page;
}
public void setPage(Page page) {
this.page = page;
}
public Totals getTotals() {
return totals;
}
public void setTotals(Totals totals) {
this.totals = totals;
}
}
... ...
package com.tianbo.controller;
import com.tianbo.common.ModelAndPage;
import com.tianbo.service.EtlmessageService;
import com.tianbo.util.dao.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
/**
* Created by Mr.Xu on 2017/9/14.
*/
@Controller
@RequestMapping("/messagebak")
public class ETLMessageBakController {
@Autowired
private EtlmessageService etlmessageService;
@RequestMapping("/showlist")
public ModelAndView findEtlMessage(@ModelAttribute Page page) throws Exception{
int pagelenth=10;
int start = 0;
if(page.getBegin()>=0){ start = page.getBegin(); }
if (page.getLength()>0){ pagelenth = page.getLength();}
ModelAndView modelAndView=new ModelAndView();
ModelAndPage modelAndPage=new ModelAndPage();
modelAndPage=etlmessageService.findEtlMessage(start,pagelenth);
modelAndView.addObject("modelAndPage",modelAndPage);
modelAndView.setViewName("messagebak/list");
return modelAndView;
}
@RequestMapping("list")
public String list(){return "messagebak/list";}
}
... ...
package com.tianbo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class IndexController {
@RequestMapping("/")
public String index(){
return "index";
}
@RequestMapping("/index")
public String indexJSP(){
return "index";
}
}
... ...
package com.tianbo.controller;
import com.tianbo.model.TKpiCargoWaybill;
import com.tianbo.service.KPICargoBillServcie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
/**
* 运单表
*/
@Controller
@RequestMapping("/kpi")
public class KPIController {
@Autowired
KPICargoBillServcie kpiService;
@RequestMapping("list")
public ModelAndView list(){
TKpiCargoWaybill waybill = new TKpiCargoWaybill();
return new ModelAndView("kpi/list","waybill",waybill);
}
}
... ...
package com.tianbo.controller;
import com.tianbo.util.json.ResponseModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.*;
import org.apache.shiro.authz.UnauthenticatedException;
import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
/**
* Created by mrz on 2017/8/28.
*/
@Controller
public class MainController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@RequestMapping("/login")
public String login(){
return "login";
}
@RequestMapping("/main/info")
public String index(){
return "main/info";
}
@RequestMapping("/main")
public String main(){
return "main";
}
@Transactional
@RequestMapping(value = "/doLogin", method = RequestMethod.POST)
@ResponseBody
public ResponseModel dologin(String username, String password, String captcha){
ResponseModel md = new ResponseModel(200,"",null);
String msg = "";
UsernamePasswordToken token = new UsernamePasswordToken(username,password);
token.setRememberMe(true);
Subject subject = SecurityUtils.getSubject();
logger.info("token="+token);
try {
subject.login(token);
if (subject.isAuthenticated()){
subject.getSession().setAttribute("username",username);
return md;
}
}catch (IncorrectCredentialsException e) {
msg = "登录密码错误. Password for account " + token.getPrincipal() + " was incorrect.";
md.setStatus(500);
System.out.println(msg);
} catch (ExcessiveAttemptsException e) {
msg = "登录失败次数过多";
md.setStatus(500);
System.out.println(msg);
} catch (LockedAccountException e) {
msg = "帐号已被锁定. The account for username " + token.getPrincipal() + " was locked.";
md.setStatus(500);
System.out.println(msg);
} catch (DisabledAccountException e) {
msg = "帐号已被禁用. The account for username " + token.getPrincipal() + " was disabled.";
md.setStatus(500);
System.out.println(msg);
} catch (ExpiredCredentialsException e) {
msg = "帐号已过期. the account for username " + token.getPrincipal() + " was expired.";
md.setStatus(500);
System.out.println(msg);
} catch (UnknownAccountException e) {
msg = "帐号不存在. There is no user with username of " + token.getPrincipal();
md.setStatus(500);
System.out.println(msg);
} catch (UnauthenticatedException e) {
msg = "您没有得到相应的授权!" + e.getMessage();
md.setStatus(500);
System.out.println(msg);
}
md.setMsg(msg);
return md;
}
}
... ...
package com.tianbo.controller;
import com.tianbo.model.TKpiCargoManifest;
import com.tianbo.service.ManiFestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
/**
* 仓单表
*/
@Controller
@RequestMapping("/man")
public class ManiFestController {
@Autowired
ManiFestService maniFestService;
@RequestMapping("list")
public ModelAndView list(){
TKpiCargoManifest manifest = new TKpiCargoManifest();
return new ModelAndView("man/list","man",manifest);
}
}
... ...
package com.tianbo.controller;
import com.tianbo.common.ModelAndPage;
import com.tianbo.model.TOlapColumn;
import com.tianbo.model.TOlapDataset;
import com.tianbo.service.OlapColumnService;
import com.tianbo.service.OlapDataSetService;
import com.tianbo.util.dao.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.List;
/**
* Created by Mr.Xu on 2017/9/13.
*/
@Controller
@RequestMapping("/olapcolumn")
public class OlapColumnController {
@Autowired
private OlapColumnService olapColumnService;
@Autowired
private OlapDataSetService olapDataSetService;
@RequestMapping("showlist")
public ModelAndView findOlapColumn(@ModelAttribute Page page) throws Exception{
int pagelenth=10;
int start=0;
if(page.getBegin()>=0){start=page.getBegin();}
if(page.getLength()>0){pagelenth=page.getLength();}
ModelAndView modelAndView=new ModelAndView();
ModelAndPage modelAndPage=new ModelAndPage();
modelAndPage=olapColumnService.findOlapColumn(start,pagelenth);
List<TOlapDataset> olapDatasetList=olapDataSetService.findOlapDataSet();
modelAndView.addObject("modelAndPage",modelAndPage);
modelAndView.addObject("olapDatasetList",olapDatasetList);
modelAndView.setViewName("olapcolumn/list");
return modelAndView;
}
@RequestMapping("/selectlist")
public ModelAndView selectOlapColumn(HttpServletRequest request,BigDecimal datasetid)throws Exception{
String id=request.getParameter("datasetid");
BigDecimal bd=new BigDecimal(id);
ModelAndView modelAndView=new ModelAndView();
List<TOlapColumn> tOlapColumnList=olapColumnService.selectOlapColumn(bd);
TOlapDataset tOlapDataset=olapDataSetService.findByid(bd);
modelAndView.addObject("tOlapColumnList",tOlapColumnList);
modelAndView.addObject("tOlapDataset",tOlapDataset);
modelAndView.setViewName("olapcolumn/list");
return modelAndView;
}
@RequestMapping("/findByid")
public ModelAndView findByid(HttpServletRequest request,BigDecimal columnid) throws Exception{
ModelAndView modelAndView=new ModelAndView();
String id=request.getParameter("columnid");
BigDecimal bd=new BigDecimal(id);
TOlapColumn olapColumn=olapColumnService.findByid(bd);
List<TOlapDataset> olapDatasetList=olapDataSetService.findOlapDataSet();
modelAndView.addObject("olapDatasetList",olapDatasetList);
modelAndView.addObject("olapColumn",olapColumn);
modelAndView.setViewName("olapcolumn/edit");
return modelAndView;
}
@RequestMapping("/addColumn")
public String addOlapColumn(HttpServletRequest request,TOlapColumn olapColumn,RedirectAttributes attr){
String columnname=request.getParameter("columnname");
String datafield=request.getParameter("datafield");
String nodename=request.getParameter("nodename");
String active=request.getParameter("active");
String datasetid=request.getParameter("datasetid");
olapColumn.setActive(active);
olapColumn.setDatasetid(new BigDecimal(datasetid));
olapColumn.setNodename(nodename);
olapColumn.setColumnname(columnname);
olapColumn.setDatafield(datafield);
olapColumnService.addOlapColumn(olapColumn);
attr.addAttribute("datasetid",new BigDecimal(datasetid));
return "redirect:/olapcolumn/selectlist";
}
@RequestMapping("/deleteByPrimaryKey")
public String deleteByPrimaryKey(HttpServletRequest request,BigDecimal columnid,RedirectAttributes attr){
String id=request.getParameter("columnid");
String datasetid=request.getParameter("datasetid");
BigDecimal bd=new BigDecimal(id);
olapColumnService.deleteByPrimaryKey(bd);
attr.addAttribute("datasetid",new BigDecimal(datasetid));
return "redirect:/olapcolumn/selectlist";
}
@RequestMapping("/updateColumn")
public String updateColumn(HttpServletRequest request,TOlapColumn olapColumn,RedirectAttributes attr){
String id=request.getParameter("columnid");
BigDecimal bd=new BigDecimal(id);
String columnname=request.getParameter("columnname");
String datafield=request.getParameter("datafield");
String nodename=request.getParameter("nodename");
String datasetid=request.getParameter("datasetid");
String active=request.getParameter("active");
olapColumn.setColumnid(bd);
olapColumn.setColumnname(columnname);
olapColumn.setDatafield(datafield);
olapColumn.setNodename(nodename);
olapColumn.setDatasetid(new BigDecimal(datasetid));
olapColumn.setActive(active);
olapColumnService.updateOlapColumn(olapColumn);
attr.addAttribute("datasetid",new BigDecimal(datasetid));
return "redirect:/olapcolumn/selectlist";
}
@RequestMapping("list")
public String list(){return "olapcolumn/list";}
}
... ...
package com.tianbo.controller;
import com.tianbo.common.ModelAndPage;
import com.tianbo.model.TOlapDataset;
import com.tianbo.service.OlapColumnService;
import com.tianbo.service.OlapDataSetService;
import com.tianbo.util.dao.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
/**
* Created by Mr.Xu on 2017/9/12.
*/
@Controller
@RequestMapping("/olapdata")
public class OlapDataSetController {
@Autowired
private OlapDataSetService olapDataSetService;
@Autowired
private OlapColumnService olapColumnService;
@RequestMapping("/showlist")
public ModelAndView findOlapDataSet(@ModelAttribute Page page) throws Exception {
int pagelenth=10;
int start=0;
if(page.getBegin()>=0){start=page.getBegin();}
if(page.getLength()>0){pagelenth=page.getLength();}
ModelAndView modelAndView = new ModelAndView();
ModelAndPage modelAndPage=new ModelAndPage();
modelAndPage= olapDataSetService.findOlapDataSet(start,pagelenth);
modelAndView.addObject("modelAndPage", modelAndPage);
modelAndView.setViewName("olapdata/list");
return modelAndView;
}
@RequestMapping("/addDataset")
public ModelAndView addOlapDataset(HttpServletRequest request,TOlapDataset olapDataset) throws Exception {
String datasetname=request.getParameter("datasetname");
String viewname=request.getParameter("viewname");
String active=request.getParameter("active");
olapDataset.setDatasetname(datasetname);
olapDataset.setViewname(viewname);
olapDataset.setActive(active);
olapDataSetService.addOlapDataSet(olapDataset);
ModelAndView modelAndView=new ModelAndView();
modelAndView.setViewName("redirect:/olapdata/showlist");
return modelAndView;
}
@RequestMapping("/deleteDataset")
public String deleteDataset(HttpServletRequest request, BigDecimal datasetid){
String id=request.getParameter("datasetid");
BigDecimal bd=new BigDecimal(id);
int result = olapColumnService.deleteOlapColumn(bd);
if(result>0){
olapDataSetService.deleteOlapDataset(bd);
return "redirect:/olapdata/showlist";
}else {
return "500";
}
}
@RequestMapping("/findByid")
public ModelAndView findByid(HttpServletRequest request,BigDecimal datasetid)throws Exception{
ModelAndView modelAndView=new ModelAndView();
String id=request.getParameter("datasetid");
TOlapDataset olapDataset=olapDataSetService.findByid(new BigDecimal(id));
modelAndView.addObject("olapDataset",olapDataset);
modelAndView.setViewName("olapdata/edit");
return modelAndView;
}
@RequestMapping("/updateDateset")
public String updateDateset(HttpServletRequest request,TOlapDataset olapDataset){
String datasetid=request.getParameter("datasetid");
String datasetname=request.getParameter("datasetname");
String viewname=request.getParameter("viewname");
String active=request.getParameter("active");
olapDataset.setDatasetid(new BigDecimal(datasetid));
olapDataset.setDatasetname(datasetname);
olapDataset.setViewname(viewname);
olapDataset.setActive(active);
olapDataSetService.updateOlapDataset(olapDataset);
return "redirect:/olapdata/showlist";
}
@RequestMapping("list")
public String list() {
return "olapdata/list";
}
}
... ...
package com.tianbo.controller;
import com.tianbo.common.ModelAndPage;
import com.tianbo.model.TOlapDataset;
import com.tianbo.model.TOlapXmldoc;
import com.tianbo.service.OlapDataSetService;
import com.tianbo.service.OlapXmldocService;
import com.tianbo.service.OlapXmlnodeService;
import com.tianbo.util.dao.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.List;
/**
* Created by Mr.Xu on 2017/9/14.
*/
@Controller
@RequestMapping("/olapxmldoc")
public class OlapXmldocController {
@Autowired
private OlapXmldocService olapXmldocService;
@Autowired
private OlapDataSetService olapDataSetService;
@Autowired
private OlapXmlnodeService olapXmlnodeService;
@RequestMapping("showlist")
public ModelAndView findXmldoc(@ModelAttribute Page page)throws Exception{
int pagelenth=10;
int start=0;
if(page.getBegin()>=0){start=page.getBegin();}
if(page.getLength()>0){pagelenth=page.getLength();}
ModelAndView modelAndView=new ModelAndView();
ModelAndPage modelAndPage=new ModelAndPage();
modelAndPage=olapXmldocService.findXmldoc(start,pagelenth);
List<TOlapDataset> olapDatasetList=olapDataSetService.findOlapDataSet();
modelAndView.addObject("modelAndPage",modelAndPage);
modelAndView.addObject("olapDatasetList",olapDatasetList);
modelAndView.setViewName("olapxmldoc/list");
return modelAndView;
}
@RequestMapping("addxmldoc")
public String addXmldoc(HttpServletRequest request,TOlapXmldoc olapXmldoc){
String doctype=request.getParameter("doctype");
String docname=request.getParameter("docname");
String datasetid=request.getParameter("datasetid");
String active=request.getParameter("active");
olapXmldoc.setDoctype(doctype);
olapXmldoc.setDocname(docname);
olapXmldoc.setDatasetid(new BigDecimal(datasetid));
olapXmldoc.setActive(active);
olapXmldocService.addXmldoc(olapXmldoc);
return "redirect:/olapxmldoc/showlist";
}
@RequestMapping("findByid")
public ModelAndView findByid(HttpServletRequest request,BigDecimal docid) throws Exception{
ModelAndView modelAndView=new ModelAndView();
String id=request.getParameter("docid");
BigDecimal bd=new BigDecimal(id);
TOlapXmldoc olapXmldoc=olapXmldocService.findByid(bd);
List<TOlapDataset> olapDatasetList=olapDataSetService.findOlapDataSet();
modelAndView.addObject("olapDatasetList",olapDatasetList);
modelAndView.addObject("olapXmldoc",olapXmldoc);
modelAndView.setViewName("olapxmldoc/edit");
return modelAndView;
}
@RequestMapping("updateXmldoc")
public String updateXmldoc(HttpServletRequest request,TOlapXmldoc olapXmldoc){
String docid=request.getParameter("docid");
String doctype=request.getParameter("doctype");
String docname=request.getParameter("docname");
String datasetid=request.getParameter("datasetid");
String active=request.getParameter("active");
olapXmldoc.setActive(active);
olapXmldoc.setDatasetid(new BigDecimal(datasetid));
olapXmldoc.setDocname(docname);
olapXmldoc.setDoctype(doctype);
olapXmldoc.setDocid(new BigDecimal(docid));
olapXmldocService.updateXmldoc(olapXmldoc);
return "redirect:/olapxmldoc/showlist";
}
@RequestMapping("deleteXmldoc")
public String updateXmldoc(HttpServletRequest request,BigDecimal docid){
String id=request.getParameter("docid");
int result=olapXmlnodeService.deleteXmlnode(new BigDecimal(id));
if(result>0){
olapXmldocService.deleteXmldoc(new BigDecimal(id));
return "redirect:/olapxmldoc/showlist";
}else{
return "500";
}
}
}
... ...
package com.tianbo.controller;
import com.tianbo.common.ModelAndPage;
import com.tianbo.model.TOlapColumn;
import com.tianbo.model.TOlapXmldoc;
import com.tianbo.model.TOlapXmlnode;
import com.tianbo.service.OlapColumnService;
import com.tianbo.service.OlapXmldocService;
import com.tianbo.service.OlapXmlnodeService;
import com.tianbo.util.dao.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.List;
/**
* Created by Mr.Xu on 2017/9/14.
*/
@Controller
@RequestMapping("/olapxmlnode")
public class OlapXmlnodeController {
@Autowired
private OlapXmlnodeService olapXmlnodeService;
@Autowired
private OlapXmldocService olapXmldocService;
@Autowired
private OlapColumnService olapColumnService;
@RequestMapping("showlist")
public ModelAndView findXmlnode(@ModelAttribute Page page)throws Exception{
int pagelenth=10;
int start=0;
if(page.getBegin()>=0){start=page.getBegin();}
if(page.getLength()>0){pagelenth=page.getLength();}
ModelAndView modelAndView=new ModelAndView();
ModelAndPage modelAndPage=new ModelAndPage();
modelAndPage=olapXmlnodeService.findXmlnode(start,pagelenth);
List<TOlapXmldoc> olapXmldocList=olapXmldocService.findXmldoc();
List<TOlapColumn> olapColumnList=olapColumnService.findOlapColumn();
modelAndView.addObject("olapXmldocList",olapXmldocList);
modelAndView.addObject("olapColumnList",olapColumnList);
modelAndView.addObject("modelAndPage",modelAndPage);
modelAndView.setViewName("olapxmlnode/list");
return modelAndView;
}
@RequestMapping("addXmlnode")
public String addXmlnode(HttpServletRequest request,TOlapXmlnode olapXmlnode,RedirectAttributes attr){
String docid=request.getParameter("docid");
String columnid=request.getParameter("columnid");
olapXmlnode.setDocid(new BigDecimal(docid));
olapXmlnode.setColumnid(new BigDecimal(columnid));
olapXmlnodeService.addXmlnode(olapXmlnode);
attr.addAttribute("docid",new BigDecimal(docid));
return "redirect:/olapxmlnode/selectlist";
}
@RequestMapping("findByid")
public ModelAndView findByid(HttpServletRequest request,BigDecimal nodeid)throws Exception{
ModelAndView modelAndView=new ModelAndView();
String id=request.getParameter("nodeid");
TOlapXmlnode olapXmlnode=olapXmlnodeService.findByid(new BigDecimal(id));
List<TOlapXmldoc> olapXmldocList=olapXmldocService.findXmldoc();
List<TOlapColumn> olapColumnList=olapColumnService.findOlapColumn();
modelAndView.addObject("olapXmldocList",olapXmldocList);
modelAndView.addObject("olapColumnList",olapColumnList);
modelAndView.addObject("olapXmlnode",olapXmlnode);
modelAndView.setViewName("olapxmlnode/edit");
return modelAndView;
}
@RequestMapping("selectlist")
public ModelAndView selectXmlnode(HttpServletRequest request,BigDecimal docid)throws Exception{
ModelAndView modelAndView=new ModelAndView();
String id=request.getParameter("docid");
BigDecimal bd=new BigDecimal(id);
List<TOlapXmlnode> tOlapXmlnodeList=olapXmlnodeService.selectXmlnode(bd);
TOlapXmldoc tOlapXmldoc=olapXmldocService.findByid(bd);
List<TOlapColumn> olapColumnList=olapColumnService.findOlapColumn();
modelAndView.addObject("tOlapXmlnodeList",tOlapXmlnodeList);
modelAndView.addObject("tOlapXmldoc",tOlapXmldoc);
modelAndView.addObject("olapColumnList",olapColumnList);
modelAndView.setViewName("olapxmlnode/list");
return modelAndView;
}
@RequestMapping("updateXmlnode")
public String updateXmlnode(HttpServletRequest request,TOlapXmlnode olapXmlnode,RedirectAttributes attr){
String nodeid=request.getParameter("nodeid");
String docid=request.getParameter("docid");
String columnid=request.getParameter("columnid");
olapXmlnode.setColumnid(new BigDecimal(columnid));
olapXmlnode.setDocid(new BigDecimal(docid));
olapXmlnode.setNodeid(new BigDecimal(nodeid));
olapXmlnodeService.updateXmlnode(olapXmlnode);
attr.addAttribute("docid",new BigDecimal(docid));
return "redirect:/olapxmlnode/selectlist";
}
@RequestMapping("deleteByPrimaryKey")
public String deleteByPrimaryKey(HttpServletRequest request,BigDecimal nodeid,RedirectAttributes attr){
String id=request.getParameter("nodeid");
String docid=request.getParameter("docid");
olapXmlnodeService.deleteByPrimaryKey(new BigDecimal(id));
attr.addAttribute("docid",new BigDecimal(docid));
return "redirect:/olapxmlnode/selectlist";
}
@RequestMapping("list")
public String list(){return "olapxmlnode/list";}
}
... ...
package com.tianbo.controller;
import com.tianbo.model.Role;
import com.tianbo.model.Users;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
@Controller
@RequestMapping("/permission")
public class PermissionController {
@RequestMapping("list")
public ModelAndView listView(@ModelAttribute Role role){
return new ModelAndView("permission/list","role",role);
}
}
... ...
package com.tianbo.controller;
import com.tianbo.controller.base.BaseController;
import com.tianbo.model.Role;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
@Controller
@RequestMapping("/role")
public class RoleController {
@RequestMapping("list")
public String listView(){
return "role/list";
}
@RequestMapping("add")
public ModelAndView add(){
Role role = new Role();
return new ModelAndView("role/add","role",role) ;
}
}
... ...
package com.tianbo.controller;
import com.tianbo.common.ModelAndPage;
import com.tianbo.model.Users;
import com.tianbo.model.UsersExample;
import com.tianbo.service.UserService;
import com.tianbo.util.dao.Page;
import com.tianbo.util.tools.MD5Tools;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by mrz on 2017/8/23.
*/
@Controller
@RequestMapping("/user")
public class UserController {
//service类
@Autowired
private UserService userService;
@RequestMapping("add")
@RequiresRoles("admin")
public ModelAndView addUserV(){
Users newUser = new Users();
return new ModelAndView("user/add","user",newUser);
}
@RequestMapping("/edit")
@RequiresRoles("admin")
@RequiresPermissions({"user:edit","user:find"})
public ModelAndView userId(@ModelAttribute Users user){
String username = (String) SecurityUtils.getSubject().getSession().getAttribute("username");
//这里需要判断下,当前用户是可以编辑自己的资料的,或者再起一个ACTION,单独判断权限
return new ModelAndView("user/edit","user",user);
}
@RequiresRoles("admin")
@RequestMapping("list")
public String list(){
return "user/list";
}
}
... ...
package com.tianbo.controller.base;
public class BaseController {
public Integer defaultDataStart = 0;
public Integer defaultPerPage = 20;
public Boolean checkPropertyNull(String property){
if(property!=null && property!=""){
return Boolean.TRUE;
}else{
return Boolean.FALSE;
}
}
}
... ...
package com.tianbo.controller.json;
import com.tianbo.common.ModelAndPage;
import com.tianbo.controller.base.BaseController;
import com.tianbo.model.TKpiCargoWaybill;
import com.tianbo.model.TKpiCargoWaybillExample;
import com.tianbo.model.TKpiCargoWaybillExample.Criteria;
import com.tianbo.service.KPICargoBillServcie;
import com.tianbo.util.dao.Page;
import com.tianbo.util.dao.Totals;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.util.List;
@Controller
@RequestMapping("/kpi")
public class KPIJsonController extends BaseController{
@Autowired
KPICargoBillServcie kpiService;
/**
* 查找所用用户控制器方法
* @return
* @throws Exception
*/
@RequestMapping(value = "list.json",method = RequestMethod.POST)
@RequiresRoles("admin")
@ResponseBody
public ModelAndPage kpiList(@ModelAttribute Page frontPage, @ModelAttribute TKpiCargoWaybill kpi) throws Exception{
if(frontPage.getBegin()>=0){
defaultDataStart = frontPage.getBegin();
}
if (frontPage.getLength()>0){
defaultPerPage = frontPage.getLength();
}
//example
//调用mapper类中的selectByExample方法,如果传入类型为null,则表示无条件查找
TKpiCargoWaybillExample example = new TKpiCargoWaybillExample();
Criteria criteria = example.createCriteria();
Criteria criteria2= example.createCriteria();
Criteria criteria3= example.createCriteria();
Criteria criteria4= example.createCriteria();
//根据国内国际搜索
if (checkPropertyNull(kpi.getDomint())){
criteria.andDomintEqualTo(kpi.getDomint());
criteria2.andDomintEqualTo(kpi.getDomint());
criteria3.andDomintEqualTo(kpi.getDomint());
criteria4.andDomintEqualTo(kpi.getDomint());
}
//根据运单前缀,前缀有主单的情况是三位前缀,分单的情况是主单号
if(checkPropertyNull(kpi.getWaybillpre())){
criteria.andWaybillpreEqualTo(kpi.getWaybillpre());
criteria2.andWaybillpreEqualTo(kpi.getWaybillpre());
criteria3.andWaybillpreEqualTo(kpi.getWaybillpre());
criteria4.andWaybillpreEqualTo(kpi.getWaybillpre());
}
//根据运单类型
if(checkPropertyNull(kpi.getWaybilltype())){
criteria.andWaybilltypeEqualTo(kpi.getWaybilltype());
criteria2.andWaybilltypeEqualTo(kpi.getWaybilltype());
criteria3.andWaybilltypeEqualTo(kpi.getWaybilltype());
criteria4.andWaybilltypeEqualTo(kpi.getWaybilltype());
}
//根据代理人id
if(checkPropertyNull(kpi.getAgentid())){
criteria.andAgentidEqualTo(kpi.getAgentid());
criteria2.andAgentidEqualTo(kpi.getAgentid());
criteria3.andAgentidEqualTo(kpi.getAgentid());
criteria4.andAgentidEqualTo(kpi.getAgentid());
}
//根据货主
if(checkPropertyNull(kpi.getShprname())){
criteria.andShprnameEqualTo(kpi.getShprname());
criteria2.andAgentidEqualTo(kpi.getAgentid());
criteria3.andAgentidEqualTo(kpi.getAgentid());
criteria4.andAgentidEqualTo(kpi.getAgentid());
}
//根据货物id
if(checkPropertyNull(kpi.getProductid())){
criteria.andProductidEqualTo(kpi.getProductid());
criteria2.andAgentidEqualTo(kpi.getAgentid());
criteria3.andAgentidEqualTo(kpi.getAgentid());
criteria4.andAgentidEqualTo(kpi.getAgentid());
}
//根据货物名称
if(checkPropertyNull(kpi.getProductname())){
criteria.andProductnameEqualTo(kpi.getProductname());
criteria2.andProductnameEqualTo(kpi.getProductname());
criteria3.andProductnameEqualTo(kpi.getProductname());
criteria4.andProductnameEqualTo(kpi.getProductname());
}
//根据进口
if(checkPropertyNull(kpi.getImp())){
criteria.andImpEqualTo(kpi.getImp());
criteria2.andImpEqualTo(kpi.getImp());
criteria3.andImpEqualTo(kpi.getImp());
criteria4.andImpEqualTo(kpi.getImp());
}
//根据出口
if(checkPropertyNull(kpi.getExp())){
criteria.andExpEqualTo(kpi.getExp());
criteria2.andExpEqualTo(kpi.getExp());
criteria3.andExpEqualTo(kpi.getExp());
criteria4.andExpEqualTo(kpi.getExp());
}
//根据时间段-年
if(kpi.getCuryear()!=null&&kpi.getEndyear()!=null){
criteria.andCuryearBetween(kpi.getCuryear(),kpi.getEndyear());
criteria2.andCuryearBetween(kpi.getCuryear(),kpi.getEndyear());
criteria3.andCuryearBetween(kpi.getCuryear(),kpi.getEndyear());
criteria4.andCuryearBetween(kpi.getCuryear(),kpi.getEndyear());
}
//根据时间段-月
if(kpi.getCurmonth()!=null&&kpi.getEndmonth()!=null){
criteria.andCurmonthBetween(kpi.getCurmonth(),kpi.getEndmonth());
criteria2.andCurmonthBetween(kpi.getCurmonth(),kpi.getEndmonth());
criteria3.andCurmonthBetween(kpi.getCurmonth(),kpi.getEndmonth());
criteria4.andCurmonthBetween(kpi.getCurmonth(),kpi.getEndmonth());
}
//根据时间段-日
if(kpi.getCurweek()!=null&&kpi.getEndweek()!=null){
criteria.andCurweekBetween(kpi.getCurweek(),kpi.getEndweek());
criteria2.andCurweekBetween(kpi.getCurweek(),kpi.getEndweek());
criteria3.andCurweekBetween(kpi.getCurweek(),kpi.getEndweek());
criteria4.andCurweekBetween(kpi.getCurweek(),kpi.getEndweek());
}
//根据承运人搜索
if (checkPropertyNull(kpi.getAirline1())){
String carrier = kpi.getAirline1();
criteria.andAirline1EqualTo(carrier);
criteria2.andAirline2EqualTo(carrier);
criteria3.andAirline3EqualTo(carrier);
criteria4.andAirline4EqualTo(carrier);
example.or(criteria2);
example.or(criteria3);
example.or(criteria4);
}
//example.setOrderByClause("user_id"); //设置order 字段
//没加入分页前的搜索总数据数
int count = kpiService.countByExample(example);
BigDecimal weight = kpiService.sumWeightByExample(example);
BigDecimal pcs= kpiService.sumPcsByExample(example);
BigDecimal vol= kpiService.sumVolByExample(example);
BigDecimal hbillqty= kpiService.sumHbillqtyByExample(example);
Totals totals = new Totals(weight,pcs,vol,hbillqty);
Page page = new Page(defaultDataStart,defaultPerPage);
page.setCount(count);
example.setPage(page); //oracle 用这个
List<TKpiCargoWaybill> kpilist = kpiService.selectByExample(example);
ModelAndPage<TKpiCargoWaybill> modelAndPage = new ModelAndPage(kpilist,page,totals);
return modelAndPage;
}
}
... ...
package com.tianbo.controller.json;
import com.tianbo.common.ModelAndPage;
import com.tianbo.controller.base.BaseController;
import com.tianbo.model.TKpiCargoManifest;
import com.tianbo.model.TKpiCargoManifestExample;
import com.tianbo.model.TKpiCargoManifestExample.Criteria;
import com.tianbo.service.ManiFestService;
import com.tianbo.util.dao.Page;
import com.tianbo.util.dao.Totals;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.math.BigDecimal;
import java.util.List;
@Controller
@RequestMapping("/man")
public class ManiFestJsonController extends BaseController{
@Autowired
ManiFestService maniFestService;
@RequestMapping(value = "list.json",method = RequestMethod.POST)
@RequiresRoles("admin")
@ResponseBody
public ModelAndPage<TKpiCargoManifest> maniList(@ModelAttribute TKpiCargoManifest manifest, @ModelAttribute Page frontPage){
if(frontPage.getBegin()>=0){
defaultDataStart = frontPage.getBegin();
}
if (frontPage.getLength()>0){
defaultPerPage = frontPage.getLength();
}
TKpiCargoManifestExample example = new TKpiCargoManifestExample();
Criteria criteria = example.createCriteria();
//根据时间段-年
if(manifest.getCuryear()!=null&&manifest.getEndyear()!=null){
criteria.andCuryearBetween(manifest.getCuryear(),manifest.getEndyear());
}
//根据时间段-月
if(manifest.getCurmonth()!=null&&manifest.getEndmonth()!=null){
criteria.andCurmonthBetween(manifest.getCurmonth(),manifest.getEndmonth());
}
//根据时间段-日
if(manifest.getCurweek()!=null&&manifest.getEndweek()!=null){
criteria.andCurweekBetween(manifest.getCurweek(),manifest.getEndweek());
}
//根据机号
if(checkPropertyNull(manifest.getPlaneno())){
criteria.andPlanenoEqualTo(manifest.getPlaneno());
}
//根据航班号
if(checkPropertyNull(manifest.getFlightno())){
criteria.andFlightnoEqualTo(manifest.getFlightno());
}
//根据机型
if(checkPropertyNull(manifest.getPlanetype())){
criteria.andPlanetypeEqualTo(manifest.getPlanetype());
}
//根据航空公司
if(checkPropertyNull(manifest.getAircorpid())){
criteria.andAircorpidEqualTo(manifest.getAircorpid());
}
//进出港
if(checkPropertyNull(manifest.getExpimp())){
criteria.andExpimpEqualTo(manifest.getExpimp());
}
//国内国际
if(checkPropertyNull(manifest.getDomint())){
criteria.andDomintEqualTo(manifest.getDomint());
}
//运单类型
if(checkPropertyNull(manifest.getWaybilltype())){
criteria.andWaybilltypeEqualTo(manifest.getWaybilltype());
}
//营业点
if(checkPropertyNull(manifest.getOperdepartid())){
criteria.andOperdepartidEqualTo(manifest.getOperdepartid());
}
int count = maniFestService.countByExample(example);
BigDecimal weight = maniFestService.sumWeightByExample(example);
BigDecimal pcs= maniFestService.sumPcsByExample(example);
BigDecimal vol= maniFestService.sumVolByExample(example);
Totals totals = new Totals(weight,pcs,vol);
Page page = new Page(defaultDataStart,defaultPerPage);
page.setCount(count);
example.setPage(page); //oracle 用这个
List<TKpiCargoManifest> maniList = maniFestService.selectByExample(example);
ModelAndPage<TKpiCargoManifest> modelAndPage = new ModelAndPage<TKpiCargoManifest>(maniList,page,totals);
return modelAndPage;
}
}
... ...
package com.tianbo.controller.json;
import com.tianbo.common.ModelAndPage;
import com.tianbo.model.*;
import com.tianbo.service.PermissionService;
import com.tianbo.service.RolePermissionService;
import com.tianbo.util.dao.Page;
import com.tianbo.util.json.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.List;
@Controller
@RequestMapping("/permission")
public class PermissionJsonContorller {
//service类
@Autowired
private PermissionService permissionService;
@Autowired
private RolePermissionService rolePermissionService;
@RequestMapping("list.json")
@ResponseBody
public ModelAndPage Permissionlist(){ //所有权限列表
PermissionExample example = new PermissionExample();
//调用service方法得到用户列表
List<Permission> pms = permissionService.selectByExample(example);
ModelAndPage modelAndPage = new ModelAndPage(pms,new Page());
return modelAndPage;
}
@RequestMapping(value = "listByRole.json",method = RequestMethod.POST)
@ResponseBody
public ModelAndPage listByRole(@RequestBody RolePermission rolePermission){ //角色权限列表
BigDecimal testID = new BigDecimal(1);
RolePermissionExample example = new RolePermissionExample();
example.createCriteria().andRoleIdEqualTo(testID);
//调用service方法得到用户列表
List<RolePermission> rp = rolePermissionService.selectByExample(example);
ModelAndPage modelAndPage = new ModelAndPage(rp,new Page());
return modelAndPage;
}
@RequestMapping("update.json")
@ResponseBody
public ResponseModel insertByroleID(@RequestBody RolePermission rolePermission){
BigDecimal roleId = rolePermission.getRoleId();
//先删除以前的权限绑定。
//再插入新的权限绑定.
RolePermissionExample delExample = new RolePermissionExample();
delExample.createCriteria().andRoleIdEqualTo(roleId);
int delSuccess = rolePermissionService.deleteByExample(delExample);
if (delSuccess>0){
//循环取出提交的已选择的Permission id列表,再插入
for(Integer PmsId:rolePermission.getPmList()){
RolePermission rolePermission1 = new RolePermission();
rolePermission1.setRoleId(roleId);
rolePermission1.setPermissionId(new BigDecimal(PmsId));
int i = rolePermissionService.insert(rolePermission1);
if (i<=0){
return new ResponseModel(500,"权限更新失败");
}
}
}else {
return new ResponseModel(500,"权限更新失败");
}
return new ResponseModel(200,"权限更新成功");
}
@RequestMapping("edit.json")
@ResponseBody
public ModelAndPage edit(){
PermissionExample example = new PermissionExample();
//调用service方法得到用户列表
List<Permission> pms = permissionService.selectByExample(example);
ModelAndPage modelAndPage = new ModelAndPage(pms,new Page());
return modelAndPage;
}
}
... ...
package com.tianbo.controller.json;
import com.tianbo.common.ModelAndPage;
import com.tianbo.controller.base.BaseController;
import com.tianbo.model.Role;
import com.tianbo.model.RoleExample;
import com.tianbo.service.RoleService;
import com.tianbo.util.dao.Page;
import com.tianbo.util.json.ResponseModel;
import com.tianbo.util.tools.MD5Tools;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
@Controller
@RequestMapping("/role")
public class RoleJsonController extends BaseController{
//service类
@Autowired
private RoleService roleService;
@RequestMapping("list.json")
@RequiresRoles("admin")
@ResponseBody
public ModelAndPage list(@ModelAttribute Page frontPage, @ModelAttribute Role role) throws Exception{
RoleExample example = new RoleExample();
example.setOrderByClause("role_id");
//调用service方法得到用户列表
List<Role> roles = roleService.selectByExample(example);
ModelAndPage modelAndPage = new ModelAndPage(roles,new Page());
return modelAndPage;
}
@RequestMapping("roleExamlpe.json")
@ResponseBody
public Role example(){
return new Role();
}
@RequestMapping(value = "add.json",method = RequestMethod.POST)
@RequiresRoles("admin")
@ResponseBody
public ResponseModel add(@RequestBody Role role){
ResponseModel responseModel = new ResponseModel();
if (checkRole(role)){
int i = roleService.insert(role);
if(i>0){
responseModel.setStatus(200);
responseModel.setMsg("添加角色成功");
}else {
responseModel.setStatus(500);
responseModel.setMsg("添加角色失败");
}
}else {
responseModel.setStatus(500);
responseModel.setMsg("添加角色失败,已存在相同名称的角色");
}
return responseModel;
}
private Boolean checkRole( Role role){
if (roleService.checkRole(role)){
return Boolean.FALSE; //存在用户,返回false
}else {
return Boolean.TRUE; //不存在用户,返回true,可以添加用户
}
}
}
... ...
package com.tianbo.controller.json;
import com.tianbo.common.ModelAndPage;
import com.tianbo.controller.base.BaseController;
import com.tianbo.model.Users;
import com.tianbo.model.UsersExample;
import com.tianbo.service.UserService;
import com.tianbo.util.dao.Page;
import com.tianbo.util.json.ResponseModel;
import com.tianbo.util.tools.MD5Tools;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Created by mrz on 2017/8/23.
*/
@Controller
@RequestMapping("/user")
public class UserJsonController extends BaseController{
//service类
@Autowired
private UserService userService;
@RequestMapping("userExample.json")
@RequiresRoles("admin")
@ResponseBody
public Users userExample() {
Users users = new Users();
return users;
}
@RequestMapping("userById.json")
@RequiresRoles("admin")
@ResponseBody
public Users userList(@ModelAttribute Users user) throws Exception{
Users users = userService.selectByUserId(user.getUserId());
return users;
}
/**
* 查找所用用户控制器方法
* @return
* @throws Exception
*/
@RequestMapping("list.json")
@RequiresRoles("admin")
@ResponseBody
public ModelAndPage userList(@ModelAttribute Page frontPage,@ModelAttribute Users user) throws Exception{
if(frontPage.getBegin()>=0){ defaultDataStart = frontPage.getBegin();}
if (frontPage.getLength()>0){ defaultPerPage = frontPage.getLength();}
//调用service方法得到用户列表
ModelAndPage users = userService.userList(defaultDataStart,defaultPerPage,user);
return users;
}
@RequestMapping(value = "baseUpdate.json",method = RequestMethod.POST)
@RequiresRoles("admin")
@RequiresPermissions("user:edit")
@ResponseBody
public ResponseModel baseUpdate(@RequestBody Users user){
user.setUpdatetime(new Date());
int n = userService.updateByPrimaryKey(user);
ResponseModel responseModel = new ResponseModel();
if (n>0){
responseModel.setStatus(200);
responseModel.setMsg("用户资料更新成功");
return responseModel;
}else {
responseModel.setStatus(500);
responseModel.setMsg("用户资料更新失败");
return responseModel;
}
}
@RequestMapping(value = "add.json",method = RequestMethod.POST)
@RequiresRoles("admin")
@ResponseBody
public ResponseModel add(@RequestBody Users user){
ResponseModel responseModel = new ResponseModel();
if(checkUser(user)){
String userPW = user.getPassword();
String PWMD5 = MD5Tools.MD5(userPW);
user.setPassword(PWMD5);
user.setCreattime(new Date());
int n = userService.insert(user);
if (n>0){
responseModel.setStatus(200);
responseModel.setMsg("用户添加成功");
}else {
}
}else {
responseModel.setStatus(500);
responseModel.setMsg("用户添加失败,已存在用户");
}
return responseModel;
}
@RequestMapping(value = "del.json",method = RequestMethod.POST)
@RequiresRoles("admin")
@ResponseBody
public ResponseModel del(@ModelAttribute Users user){
ResponseModel responseModel = new ResponseModel();
int n = userService.deleteByPrimaryKey(user.getUserId());
if (n>0){
responseModel.setStatus(200);
responseModel.setMsg("用户删除成功");
}else {
responseModel.setStatus(500);
responseModel.setMsg("用户删除失败");
}
return responseModel;
}
private Boolean checkUser( Users user){
if (userService.checkUser(user)){
return Boolean.FALSE; //存在用户,返回false
}else {
return Boolean.TRUE; //不存在用户,返回true,可以添加用户
}
}
}
... ...
package com.tianbo.mapper;
import com.tianbo.model.MessageBak;
import com.tianbo.model.MessageBakExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
public interface MessageBakMapper {
int countByExample(MessageBakExample example);
int deleteByExample(MessageBakExample example);
int deleteByPrimaryKey(Short fid);
int insert(MessageBak record);
int insertSelective(MessageBak record);
List<MessageBak> selectByExampleWithBLOBs(MessageBakExample example);
List<MessageBak> selectByExample(MessageBakExample example);
MessageBak selectByPrimaryKey(Short fid);
int updateByExampleSelective(@Param("record") MessageBak record, @Param("example") MessageBakExample example);
int updateByExampleWithBLOBs(@Param("record") MessageBak record, @Param("example") MessageBakExample example);
int updateByExample(@Param("record") MessageBak record, @Param("example") MessageBakExample example);
int updateByPrimaryKeySelective(MessageBak record);
int updateByPrimaryKeyWithBLOBs(MessageBak record);
int updateByPrimaryKey(MessageBak record);
}
\ No newline at end of file
... ...
package com.tianbo.mapper;
import com.tianbo.model.Permission;
import com.tianbo.model.PermissionExample;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PermissionMapper {
int countByExample(PermissionExample example);
int deleteByExample(PermissionExample example);
int deleteByPrimaryKey(BigDecimal permissionId);
int insert(Permission record);
int insertSelective(Permission record);
List<Permission> selectByExample(PermissionExample example);
Permission selectByPrimaryKey(BigDecimal permissionId);
int updateByExampleSelective(@Param("record") Permission record, @Param("example") PermissionExample example);
int updateByExample(@Param("record") Permission record, @Param("example") PermissionExample example);
int updateByPrimaryKeySelective(Permission record);
int updateByPrimaryKey(Permission record);
}
\ No newline at end of file
... ...
package com.tianbo.mapper;
import com.tianbo.model.Role;
import com.tianbo.model.RoleExample;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface RoleMapper {
int countByExample(RoleExample example);
int deleteByExample(RoleExample example);
int deleteByPrimaryKey(BigDecimal roleId);
int insert(Role record);
int insertSelective(Role record);
List<Role> selectByExample(RoleExample example);
Role selectByPrimaryKey(BigDecimal roleId);
int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);
int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);
int updateByPrimaryKeySelective(Role record);
int updateByPrimaryKey(Role record);
}
\ No newline at end of file
... ...
package com.tianbo.mapper;
import com.tianbo.model.RolePermission;
import com.tianbo.model.RolePermissionExample;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface RolePermissionMapper {
int countByExample(RolePermissionExample example);
int deleteByExample(RolePermissionExample example);
int deleteByPrimaryKey(BigDecimal id);
int insert(RolePermission record);
int insertSelective(RolePermission record);
List<RolePermission> selectByExample(RolePermissionExample example);
RolePermission selectByPrimaryKey(BigDecimal id);
int updateByExampleSelective(@Param("record") RolePermission record, @Param("example") RolePermissionExample example);
int updateByExample(@Param("record") RolePermission record, @Param("example") RolePermissionExample example);
int updateByPrimaryKeySelective(RolePermission record);
int updateByPrimaryKey(RolePermission record);
}
\ No newline at end of file
... ...
package com.tianbo.mapper;
import com.tianbo.model.TEtlMessage;
import com.tianbo.model.TEtlMessageExample;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TEtlMessageMapper {
int countByExample(TEtlMessageExample example);
int deleteByExample(TEtlMessageExample example);
int deleteByPrimaryKey(BigDecimal fid);
int insert(TEtlMessage record);
int insertSelective(TEtlMessage record);
List<TEtlMessage> selectByExampleWithBLOBs(TEtlMessageExample example);
List<TEtlMessage> selectByExample(TEtlMessageExample example);
TEtlMessage selectByPrimaryKey(BigDecimal fid);
int updateByExampleSelective(@Param("record") TEtlMessage record, @Param("example") TEtlMessageExample example);
int updateByExampleWithBLOBs(@Param("record") TEtlMessage record, @Param("example") TEtlMessageExample example);
int updateByExample(@Param("record") TEtlMessage record, @Param("example") TEtlMessageExample example);
int updateByPrimaryKeySelective(TEtlMessage record);
int updateByPrimaryKeyWithBLOBs(TEtlMessage record);
int updateByPrimaryKey(TEtlMessage record);
}
\ No newline at end of file
... ...
package com.tianbo.mapper;
import com.tianbo.model.TKpiCargoManifest;
import com.tianbo.model.TKpiCargoManifestExample;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TKpiCargoManifestMapper {
int countByExample(TKpiCargoManifestExample example);
int deleteByExample(TKpiCargoManifestExample example);
int deleteByPrimaryKey(BigDecimal fid);
int insert(TKpiCargoManifest record);
int insertSelective(TKpiCargoManifest record);
List<TKpiCargoManifest> selectByExample(TKpiCargoManifestExample example);
TKpiCargoManifest selectByPrimaryKey(BigDecimal fid);
int updateByExampleSelective(@Param("record") TKpiCargoManifest record, @Param("example") TKpiCargoManifestExample example);
int updateByExample(@Param("record") TKpiCargoManifest record, @Param("example") TKpiCargoManifestExample example);
int updateByPrimaryKeySelective(TKpiCargoManifest record);
int updateByPrimaryKey(TKpiCargoManifest record);
BigDecimal sumWeightByExample(TKpiCargoManifestExample example);
BigDecimal sumPcsByExample(TKpiCargoManifestExample example);
BigDecimal sumVolByExample(TKpiCargoManifestExample example);
}
\ No newline at end of file
... ...
package com.tianbo.mapper;
import com.tianbo.model.TKpiCargoWaybill;
import com.tianbo.model.TKpiCargoWaybillExample;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TKpiCargoWaybillMapper {
int countByExample(TKpiCargoWaybillExample example);
int deleteByExample(TKpiCargoWaybillExample example);
int deleteByPrimaryKey(BigDecimal fid);
int insert(TKpiCargoWaybill record);
int insertSelective(TKpiCargoWaybill record);
List<TKpiCargoWaybill> selectByExample(TKpiCargoWaybillExample example);
TKpiCargoWaybill selectByPrimaryKey(BigDecimal fid);
int updateByExampleSelective(@Param("record") TKpiCargoWaybill record, @Param("example") TKpiCargoWaybillExample example);
int updateByExample(@Param("record") TKpiCargoWaybill record, @Param("example") TKpiCargoWaybillExample example);
int updateByPrimaryKeySelective(TKpiCargoWaybill record);
int updateByPrimaryKey(TKpiCargoWaybill record);
BigDecimal sumWeightByExample(TKpiCargoWaybillExample example);
BigDecimal sumPcsByExample(TKpiCargoWaybillExample example);
BigDecimal sumVolByExample(TKpiCargoWaybillExample example);
BigDecimal sumHbillqtyByExample(TKpiCargoWaybillExample example);
}
\ No newline at end of file
... ...
package com.tianbo.mapper;
import com.tianbo.model.TOlapColumn;
import com.tianbo.model.TOlapColumnExample;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TOlapColumnMapper {
int countByExample(TOlapColumnExample example);
int deleteByExample(TOlapColumnExample example);
int deleteByPrimaryKey(BigDecimal columnid);
int insert(TOlapColumn record);
int insertSelective(TOlapColumn record);
List<TOlapColumn> selectByExample(TOlapColumnExample example);
TOlapColumn selectByPrimaryKey(BigDecimal columnid);
int updateByExampleSelective(@Param("record") TOlapColumn record, @Param("example") TOlapColumnExample example);
int updateByExample(@Param("record") TOlapColumn record, @Param("example") TOlapColumnExample example);
int updateByPrimaryKeySelective(TOlapColumn record);
int updateByPrimaryKey(TOlapColumn record);
}
\ No newline at end of file
... ...
package com.tianbo.mapper;
import com.tianbo.model.TOlapDataset;
import com.tianbo.model.TOlapDatasetExample;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TOlapDatasetMapper {
int countByExample(TOlapDatasetExample example);
int deleteByExample(TOlapDatasetExample example);
int deleteByPrimaryKey(BigDecimal datasetid);
int insert(TOlapDataset record);
int insertSelective(TOlapDataset record);
List<TOlapDataset> selectByExample(TOlapDatasetExample example);
TOlapDataset selectByPrimaryKey(BigDecimal datasetid);
int updateByExampleSelective(@Param("record") TOlapDataset record, @Param("example") TOlapDatasetExample example);
int updateByExample(@Param("record") TOlapDataset record, @Param("example") TOlapDatasetExample example);
int updateByPrimaryKeySelective(TOlapDataset record);
int updateByPrimaryKey(TOlapDataset record);
}
\ No newline at end of file
... ...
package com.tianbo.mapper;
import com.tianbo.model.TOlapXmldoc;
import com.tianbo.model.TOlapXmldocExample;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TOlapXmldocMapper {
int countByExample(TOlapXmldocExample example);
int deleteByExample(TOlapXmldocExample example);
int deleteByPrimaryKey(BigDecimal docid);
int insert(TOlapXmldoc record);
int insertSelective(TOlapXmldoc record);
List<TOlapXmldoc> selectByExample(TOlapXmldocExample example);
TOlapXmldoc selectByPrimaryKey(BigDecimal docid);
int updateByExampleSelective(@Param("record") TOlapXmldoc record, @Param("example") TOlapXmldocExample example);
int updateByExample(@Param("record") TOlapXmldoc record, @Param("example") TOlapXmldocExample example);
int updateByPrimaryKeySelective(TOlapXmldoc record);
int updateByPrimaryKey(TOlapXmldoc record);
}
\ No newline at end of file
... ...
package com.tianbo.mapper;
import com.tianbo.model.TOlapXmlnode;
import com.tianbo.model.TOlapXmlnodeExample;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TOlapXmlnodeMapper {
int countByExample(TOlapXmlnodeExample example);
int deleteByExample(TOlapXmlnodeExample example);
int deleteByPrimaryKey(BigDecimal nodeid);
int insert(TOlapXmlnode record);
int insertSelective(TOlapXmlnode record);
List<TOlapXmlnode> selectByExample(TOlapXmlnodeExample example);
TOlapXmlnode selectByPrimaryKey(BigDecimal nodeid);
int updateByExampleSelective(@Param("record") TOlapXmlnode record, @Param("example") TOlapXmlnodeExample example);
int updateByExample(@Param("record") TOlapXmlnode record, @Param("example") TOlapXmlnodeExample example);
int updateByPrimaryKeySelective(TOlapXmlnode record);
int updateByPrimaryKey(TOlapXmlnode record);
}
\ No newline at end of file
... ...
package com.tianbo.mapper;
import com.tianbo.model.UserRole;
import com.tianbo.model.UserRoleExample;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UserRoleMapper {
int countByExample(UserRoleExample example);
int deleteByExample(UserRoleExample example);
int deleteByPrimaryKey(BigDecimal id);
int insert(UserRole record);
int insertSelective(UserRole record);
List<UserRole> selectByExample(UserRoleExample example);
UserRole selectByPrimaryKey(BigDecimal id);
int updateByExampleSelective(@Param("record") UserRole record, @Param("example") UserRoleExample example);
int updateByExample(@Param("record") UserRole record, @Param("example") UserRoleExample example);
int updateByPrimaryKeySelective(UserRole record);
int updateByPrimaryKey(UserRole record);
}
\ No newline at end of file
... ...
package com.tianbo.mapper;
import com.tianbo.model.Users;
import com.tianbo.model.UsersExample;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UsersMapper {
int countByExample(UsersExample example);
int deleteByExample(UsersExample example);
int deleteByPrimaryKey(BigDecimal userId);
int insert(Users record);
int insertSelective(Users record);
List<Users> selectByExample(UsersExample example);
Users selectByPrimaryKey(BigDecimal userId);
int updateByExampleSelective(@Param("record") Users record, @Param("example") UsersExample example);
int updateByExample(@Param("record") Users record, @Param("example") UsersExample example);
int updateByPrimaryKeySelective(Users record);
int updateByPrimaryKey(Users record);
}
\ No newline at end of file
... ...
package com.tianbo.model;
import java.math.BigDecimal;
import java.util.Date;
public class MessageBak {
private Short fid;
private String messtype;
private String sndr;
private String seqn;
private Date sntm;
private String type;
private Date btime;
private String reasoncode;
private String styp;
private Short isinsert;
private Short ishistroy;
private BigDecimal isshipmentstatus;
private String content;
public Short getFid() {
return fid;
}
public void setFid(Short fid) {
this.fid = fid;
}
public String getMesstype() {
return messtype;
}
public void setMesstype(String messtype) {
this.messtype = messtype == null ? null : messtype.trim();
}
public String getSndr() {
return sndr;
}
public void setSndr(String sndr) {
this.sndr = sndr == null ? null : sndr.trim();
}
public String getSeqn() {
return seqn;
}
public void setSeqn(String seqn) {
this.seqn = seqn == null ? null : seqn.trim();
}
public Date getSntm() {
return sntm;
}
public void setSntm(Date sntm) {
this.sntm = sntm;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type == null ? null : type.trim();
}
public Date getBtime() {
return btime;
}
public void setBtime(Date btime) {
this.btime = btime;
}
public String getReasoncode() {
return reasoncode;
}
public void setReasoncode(String reasoncode) {
this.reasoncode = reasoncode == null ? null : reasoncode.trim();
}
public String getStyp() {
return styp;
}
public void setStyp(String styp) {
this.styp = styp == null ? null : styp.trim();
}
public Short getIsinsert() {
return isinsert;
}
public void setIsinsert(Short isinsert) {
this.isinsert = isinsert;
}
public Short getIshistroy() {
return ishistroy;
}
public void setIshistroy(Short ishistroy) {
this.ishistroy = ishistroy;
}
public BigDecimal getIsshipmentstatus() {
return isshipmentstatus;
}
public void setIsshipmentstatus(BigDecimal isshipmentstatus) {
this.isshipmentstatus = isshipmentstatus;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content == null ? null : content.trim();
}
}
\ No newline at end of file
... ...
package com.tianbo.model;
import com.tianbo.util.dao.Page;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class MessageBakExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected Page page;
public MessageBakExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setPage(Page page) {
this.page=page;
}
public Page getPage() {
return page;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andFidIsNull() {
addCriterion("FID is null");
return (Criteria) this;
}
public Criteria andFidIsNotNull() {
addCriterion("FID is not null");
return (Criteria) this;
}
public Criteria andFidEqualTo(Short value) {
addCriterion("FID =", value, "fid");
return (Criteria) this;
}
public Criteria andFidNotEqualTo(Short value) {
addCriterion("FID <>", value, "fid");
return (Criteria) this;
}
public Criteria andFidGreaterThan(Short value) {
addCriterion("FID >", value, "fid");
return (Criteria) this;
}
public Criteria andFidGreaterThanOrEqualTo(Short value) {
addCriterion("FID >=", value, "fid");
return (Criteria) this;
}
public Criteria andFidLessThan(Short value) {
addCriterion("FID <", value, "fid");
return (Criteria) this;
}
public Criteria andFidLessThanOrEqualTo(Short value) {
addCriterion("FID <=", value, "fid");
return (Criteria) this;
}
public Criteria andFidIn(List<Short> values) {
addCriterion("FID in", values, "fid");
return (Criteria) this;
}
public Criteria andFidNotIn(List<Short> values) {
addCriterion("FID not in", values, "fid");
return (Criteria) this;
}
public Criteria andFidBetween(Short value1, Short value2) {
addCriterion("FID between", value1, value2, "fid");
return (Criteria) this;
}
public Criteria andFidNotBetween(Short value1, Short value2) {
addCriterion("FID not between", value1, value2, "fid");
return (Criteria) this;
}
public Criteria andMesstypeIsNull() {
addCriterion("MESSTYPE is null");
return (Criteria) this;
}
public Criteria andMesstypeIsNotNull() {
addCriterion("MESSTYPE is not null");
return (Criteria) this;
}
public Criteria andMesstypeEqualTo(String value) {
addCriterion("MESSTYPE =", value, "messtype");
return (Criteria) this;
}
public Criteria andMesstypeNotEqualTo(String value) {
addCriterion("MESSTYPE <>", value, "messtype");
return (Criteria) this;
}
public Criteria andMesstypeGreaterThan(String value) {
addCriterion("MESSTYPE >", value, "messtype");
return (Criteria) this;
}
public Criteria andMesstypeGreaterThanOrEqualTo(String value) {
addCriterion("MESSTYPE >=", value, "messtype");
return (Criteria) this;
}
public Criteria andMesstypeLessThan(String value) {
addCriterion("MESSTYPE <", value, "messtype");
return (Criteria) this;
}
public Criteria andMesstypeLessThanOrEqualTo(String value) {
addCriterion("MESSTYPE <=", value, "messtype");
return (Criteria) this;
}
public Criteria andMesstypeLike(String value) {
addCriterion("MESSTYPE like", value, "messtype");
return (Criteria) this;
}
public Criteria andMesstypeNotLike(String value) {
addCriterion("MESSTYPE not like", value, "messtype");
return (Criteria) this;
}
public Criteria andMesstypeIn(List<String> values) {
addCriterion("MESSTYPE in", values, "messtype");
return (Criteria) this;
}
public Criteria andMesstypeNotIn(List<String> values) {
addCriterion("MESSTYPE not in", values, "messtype");
return (Criteria) this;
}
public Criteria andMesstypeBetween(String value1, String value2) {
addCriterion("MESSTYPE between", value1, value2, "messtype");
return (Criteria) this;
}
public Criteria andMesstypeNotBetween(String value1, String value2) {
addCriterion("MESSTYPE not between", value1, value2, "messtype");
return (Criteria) this;
}
public Criteria andSndrIsNull() {
addCriterion("SNDR is null");
return (Criteria) this;
}
public Criteria andSndrIsNotNull() {
addCriterion("SNDR is not null");
return (Criteria) this;
}
public Criteria andSndrEqualTo(String value) {
addCriterion("SNDR =", value, "sndr");
return (Criteria) this;
}
public Criteria andSndrNotEqualTo(String value) {
addCriterion("SNDR <>", value, "sndr");
return (Criteria) this;
}
public Criteria andSndrGreaterThan(String value) {
addCriterion("SNDR >", value, "sndr");
return (Criteria) this;
}
public Criteria andSndrGreaterThanOrEqualTo(String value) {
addCriterion("SNDR >=", value, "sndr");
return (Criteria) this;
}
public Criteria andSndrLessThan(String value) {
addCriterion("SNDR <", value, "sndr");
return (Criteria) this;
}
public Criteria andSndrLessThanOrEqualTo(String value) {
addCriterion("SNDR <=", value, "sndr");
return (Criteria) this;
}
public Criteria andSndrLike(String value) {
addCriterion("SNDR like", value, "sndr");
return (Criteria) this;
}
public Criteria andSndrNotLike(String value) {
addCriterion("SNDR not like", value, "sndr");
return (Criteria) this;
}
public Criteria andSndrIn(List<String> values) {
addCriterion("SNDR in", values, "sndr");
return (Criteria) this;
}
public Criteria andSndrNotIn(List<String> values) {
addCriterion("SNDR not in", values, "sndr");
return (Criteria) this;
}
public Criteria andSndrBetween(String value1, String value2) {
addCriterion("SNDR between", value1, value2, "sndr");
return (Criteria) this;
}
public Criteria andSndrNotBetween(String value1, String value2) {
addCriterion("SNDR not between", value1, value2, "sndr");
return (Criteria) this;
}
public Criteria andSeqnIsNull() {
addCriterion("SEQN is null");
return (Criteria) this;
}
public Criteria andSeqnIsNotNull() {
addCriterion("SEQN is not null");
return (Criteria) this;
}
public Criteria andSeqnEqualTo(String value) {
addCriterion("SEQN =", value, "seqn");
return (Criteria) this;
}
public Criteria andSeqnNotEqualTo(String value) {
addCriterion("SEQN <>", value, "seqn");
return (Criteria) this;
}
public Criteria andSeqnGreaterThan(String value) {
addCriterion("SEQN >", value, "seqn");
return (Criteria) this;
}
public Criteria andSeqnGreaterThanOrEqualTo(String value) {
addCriterion("SEQN >=", value, "seqn");
return (Criteria) this;
}
public Criteria andSeqnLessThan(String value) {
addCriterion("SEQN <", value, "seqn");
return (Criteria) this;
}
public Criteria andSeqnLessThanOrEqualTo(String value) {
addCriterion("SEQN <=", value, "seqn");
return (Criteria) this;
}
public Criteria andSeqnLike(String value) {
addCriterion("SEQN like", value, "seqn");
return (Criteria) this;
}
public Criteria andSeqnNotLike(String value) {
addCriterion("SEQN not like", value, "seqn");
return (Criteria) this;
}
public Criteria andSeqnIn(List<String> values) {
addCriterion("SEQN in", values, "seqn");
return (Criteria) this;
}
public Criteria andSeqnNotIn(List<String> values) {
addCriterion("SEQN not in", values, "seqn");
return (Criteria) this;
}
public Criteria andSeqnBetween(String value1, String value2) {
addCriterion("SEQN between", value1, value2, "seqn");
return (Criteria) this;
}
public Criteria andSeqnNotBetween(String value1, String value2) {
addCriterion("SEQN not between", value1, value2, "seqn");
return (Criteria) this;
}
public Criteria andSntmIsNull() {
addCriterion("SNTM is null");
return (Criteria) this;
}
public Criteria andSntmIsNotNull() {
addCriterion("SNTM is not null");
return (Criteria) this;
}
public Criteria andSntmEqualTo(Date value) {
addCriterion("SNTM =", value, "sntm");
return (Criteria) this;
}
public Criteria andSntmNotEqualTo(Date value) {
addCriterion("SNTM <>", value, "sntm");
return (Criteria) this;
}
public Criteria andSntmGreaterThan(Date value) {
addCriterion("SNTM >", value, "sntm");
return (Criteria) this;
}
public Criteria andSntmGreaterThanOrEqualTo(Date value) {
addCriterion("SNTM >=", value, "sntm");
return (Criteria) this;
}
public Criteria andSntmLessThan(Date value) {
addCriterion("SNTM <", value, "sntm");
return (Criteria) this;
}
public Criteria andSntmLessThanOrEqualTo(Date value) {
addCriterion("SNTM <=", value, "sntm");
return (Criteria) this;
}
public Criteria andSntmIn(List<Date> values) {
addCriterion("SNTM in", values, "sntm");
return (Criteria) this;
}
public Criteria andSntmNotIn(List<Date> values) {
addCriterion("SNTM not in", values, "sntm");
return (Criteria) this;
}
public Criteria andSntmBetween(Date value1, Date value2) {
addCriterion("SNTM between", value1, value2, "sntm");
return (Criteria) this;
}
public Criteria andSntmNotBetween(Date value1, Date value2) {
addCriterion("SNTM not between", value1, value2, "sntm");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("TYPE is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("TYPE is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(String value) {
addCriterion("TYPE =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(String value) {
addCriterion("TYPE <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(String value) {
addCriterion("TYPE >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(String value) {
addCriterion("TYPE >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(String value) {
addCriterion("TYPE <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(String value) {
addCriterion("TYPE <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLike(String value) {
addCriterion("TYPE like", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotLike(String value) {
addCriterion("TYPE not like", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<String> values) {
addCriterion("TYPE in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<String> values) {
addCriterion("TYPE not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(String value1, String value2) {
addCriterion("TYPE between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(String value1, String value2) {
addCriterion("TYPE not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andBtimeIsNull() {
addCriterion("BTIME is null");
return (Criteria) this;
}
public Criteria andBtimeIsNotNull() {
addCriterion("BTIME is not null");
return (Criteria) this;
}
public Criteria andBtimeEqualTo(Date value) {
addCriterion("BTIME =", value, "btime");
return (Criteria) this;
}
public Criteria andBtimeNotEqualTo(Date value) {
addCriterion("BTIME <>", value, "btime");
return (Criteria) this;
}
public Criteria andBtimeGreaterThan(Date value) {
addCriterion("BTIME >", value, "btime");
return (Criteria) this;
}
public Criteria andBtimeGreaterThanOrEqualTo(Date value) {
addCriterion("BTIME >=", value, "btime");
return (Criteria) this;
}
public Criteria andBtimeLessThan(Date value) {
addCriterion("BTIME <", value, "btime");
return (Criteria) this;
}
public Criteria andBtimeLessThanOrEqualTo(Date value) {
addCriterion("BTIME <=", value, "btime");
return (Criteria) this;
}
public Criteria andBtimeIn(List<Date> values) {
addCriterion("BTIME in", values, "btime");
return (Criteria) this;
}
public Criteria andBtimeNotIn(List<Date> values) {
addCriterion("BTIME not in", values, "btime");
return (Criteria) this;
}
public Criteria andBtimeBetween(Date value1, Date value2) {
addCriterion("BTIME between", value1, value2, "btime");
return (Criteria) this;
}
public Criteria andBtimeNotBetween(Date value1, Date value2) {
addCriterion("BTIME not between", value1, value2, "btime");
return (Criteria) this;
}
public Criteria andReasoncodeIsNull() {
addCriterion("REASONCODE is null");
return (Criteria) this;
}
public Criteria andReasoncodeIsNotNull() {
addCriterion("REASONCODE is not null");
return (Criteria) this;
}
public Criteria andReasoncodeEqualTo(String value) {
addCriterion("REASONCODE =", value, "reasoncode");
return (Criteria) this;
}
public Criteria andReasoncodeNotEqualTo(String value) {
addCriterion("REASONCODE <>", value, "reasoncode");
return (Criteria) this;
}
public Criteria andReasoncodeGreaterThan(String value) {
addCriterion("REASONCODE >", value, "reasoncode");
return (Criteria) this;
}
public Criteria andReasoncodeGreaterThanOrEqualTo(String value) {
addCriterion("REASONCODE >=", value, "reasoncode");
return (Criteria) this;
}
public Criteria andReasoncodeLessThan(String value) {
addCriterion("REASONCODE <", value, "reasoncode");
return (Criteria) this;
}
public Criteria andReasoncodeLessThanOrEqualTo(String value) {
addCriterion("REASONCODE <=", value, "reasoncode");
return (Criteria) this;
}
public Criteria andReasoncodeLike(String value) {
addCriterion("REASONCODE like", value, "reasoncode");
return (Criteria) this;
}
public Criteria andReasoncodeNotLike(String value) {
addCriterion("REASONCODE not like", value, "reasoncode");
return (Criteria) this;
}
public Criteria andReasoncodeIn(List<String> values) {
addCriterion("REASONCODE in", values, "reasoncode");
return (Criteria) this;
}
public Criteria andReasoncodeNotIn(List<String> values) {
addCriterion("REASONCODE not in", values, "reasoncode");
return (Criteria) this;
}
public Criteria andReasoncodeBetween(String value1, String value2) {
addCriterion("REASONCODE between", value1, value2, "reasoncode");
return (Criteria) this;
}
public Criteria andReasoncodeNotBetween(String value1, String value2) {
addCriterion("REASONCODE not between", value1, value2, "reasoncode");
return (Criteria) this;
}
public Criteria andStypIsNull() {
addCriterion("STYP is null");
return (Criteria) this;
}
public Criteria andStypIsNotNull() {
addCriterion("STYP is not null");
return (Criteria) this;
}
public Criteria andStypEqualTo(String value) {
addCriterion("STYP =", value, "styp");
return (Criteria) this;
}
public Criteria andStypNotEqualTo(String value) {
addCriterion("STYP <>", value, "styp");
return (Criteria) this;
}
public Criteria andStypGreaterThan(String value) {
addCriterion("STYP >", value, "styp");
return (Criteria) this;
}
public Criteria andStypGreaterThanOrEqualTo(String value) {
addCriterion("STYP >=", value, "styp");
return (Criteria) this;
}
public Criteria andStypLessThan(String value) {
addCriterion("STYP <", value, "styp");
return (Criteria) this;
}
public Criteria andStypLessThanOrEqualTo(String value) {
addCriterion("STYP <=", value, "styp");
return (Criteria) this;
}
public Criteria andStypLike(String value) {
addCriterion("STYP like", value, "styp");
return (Criteria) this;
}
public Criteria andStypNotLike(String value) {
addCriterion("STYP not like", value, "styp");
return (Criteria) this;
}
public Criteria andStypIn(List<String> values) {
addCriterion("STYP in", values, "styp");
return (Criteria) this;
}
public Criteria andStypNotIn(List<String> values) {
addCriterion("STYP not in", values, "styp");
return (Criteria) this;
}
public Criteria andStypBetween(String value1, String value2) {
addCriterion("STYP between", value1, value2, "styp");
return (Criteria) this;
}
public Criteria andStypNotBetween(String value1, String value2) {
addCriterion("STYP not between", value1, value2, "styp");
return (Criteria) this;
}
public Criteria andIsinsertIsNull() {
addCriterion("ISINSERT is null");
return (Criteria) this;
}
public Criteria andIsinsertIsNotNull() {
addCriterion("ISINSERT is not null");
return (Criteria) this;
}
public Criteria andIsinsertEqualTo(Short value) {
addCriterion("ISINSERT =", value, "isinsert");
return (Criteria) this;
}
public Criteria andIsinsertNotEqualTo(Short value) {
addCriterion("ISINSERT <>", value, "isinsert");
return (Criteria) this;
}
public Criteria andIsinsertGreaterThan(Short value) {
addCriterion("ISINSERT >", value, "isinsert");
return (Criteria) this;
}
public Criteria andIsinsertGreaterThanOrEqualTo(Short value) {
addCriterion("ISINSERT >=", value, "isinsert");
return (Criteria) this;
}
public Criteria andIsinsertLessThan(Short value) {
addCriterion("ISINSERT <", value, "isinsert");
return (Criteria) this;
}
public Criteria andIsinsertLessThanOrEqualTo(Short value) {
addCriterion("ISINSERT <=", value, "isinsert");
return (Criteria) this;
}
public Criteria andIsinsertIn(List<Short> values) {
addCriterion("ISINSERT in", values, "isinsert");
return (Criteria) this;
}
public Criteria andIsinsertNotIn(List<Short> values) {
addCriterion("ISINSERT not in", values, "isinsert");
return (Criteria) this;
}
public Criteria andIsinsertBetween(Short value1, Short value2) {
addCriterion("ISINSERT between", value1, value2, "isinsert");
return (Criteria) this;
}
public Criteria andIsinsertNotBetween(Short value1, Short value2) {
addCriterion("ISINSERT not between", value1, value2, "isinsert");
return (Criteria) this;
}
public Criteria andIshistroyIsNull() {
addCriterion("ISHISTROY is null");
return (Criteria) this;
}
public Criteria andIshistroyIsNotNull() {
addCriterion("ISHISTROY is not null");
return (Criteria) this;
}
public Criteria andIshistroyEqualTo(Short value) {
addCriterion("ISHISTROY =", value, "ishistroy");
return (Criteria) this;
}
public Criteria andIshistroyNotEqualTo(Short value) {
addCriterion("ISHISTROY <>", value, "ishistroy");
return (Criteria) this;
}
public Criteria andIshistroyGreaterThan(Short value) {
addCriterion("ISHISTROY >", value, "ishistroy");
return (Criteria) this;
}
public Criteria andIshistroyGreaterThanOrEqualTo(Short value) {
addCriterion("ISHISTROY >=", value, "ishistroy");
return (Criteria) this;
}
public Criteria andIshistroyLessThan(Short value) {
addCriterion("ISHISTROY <", value, "ishistroy");
return (Criteria) this;
}
public Criteria andIshistroyLessThanOrEqualTo(Short value) {
addCriterion("ISHISTROY <=", value, "ishistroy");
return (Criteria) this;
}
public Criteria andIshistroyIn(List<Short> values) {
addCriterion("ISHISTROY in", values, "ishistroy");
return (Criteria) this;
}
public Criteria andIshistroyNotIn(List<Short> values) {
addCriterion("ISHISTROY not in", values, "ishistroy");
return (Criteria) this;
}
public Criteria andIshistroyBetween(Short value1, Short value2) {
addCriterion("ISHISTROY between", value1, value2, "ishistroy");
return (Criteria) this;
}
public Criteria andIshistroyNotBetween(Short value1, Short value2) {
addCriterion("ISHISTROY not between", value1, value2, "ishistroy");
return (Criteria) this;
}
public Criteria andIsshipmentstatusIsNull() {
addCriterion("ISSHIPMENTSTATUS is null");
return (Criteria) this;
}
public Criteria andIsshipmentstatusIsNotNull() {
addCriterion("ISSHIPMENTSTATUS is not null");
return (Criteria) this;
}
public Criteria andIsshipmentstatusEqualTo(BigDecimal value) {
addCriterion("ISSHIPMENTSTATUS =", value, "isshipmentstatus");
return (Criteria) this;
}
public Criteria andIsshipmentstatusNotEqualTo(BigDecimal value) {
addCriterion("ISSHIPMENTSTATUS <>", value, "isshipmentstatus");
return (Criteria) this;
}
public Criteria andIsshipmentstatusGreaterThan(BigDecimal value) {
addCriterion("ISSHIPMENTSTATUS >", value, "isshipmentstatus");
return (Criteria) this;
}
public Criteria andIsshipmentstatusGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("ISSHIPMENTSTATUS >=", value, "isshipmentstatus");
return (Criteria) this;
}
public Criteria andIsshipmentstatusLessThan(BigDecimal value) {
addCriterion("ISSHIPMENTSTATUS <", value, "isshipmentstatus");
return (Criteria) this;
}
public Criteria andIsshipmentstatusLessThanOrEqualTo(BigDecimal value) {
addCriterion("ISSHIPMENTSTATUS <=", value, "isshipmentstatus");
return (Criteria) this;
}
public Criteria andIsshipmentstatusIn(List<BigDecimal> values) {
addCriterion("ISSHIPMENTSTATUS in", values, "isshipmentstatus");
return (Criteria) this;
}
public Criteria andIsshipmentstatusNotIn(List<BigDecimal> values) {
addCriterion("ISSHIPMENTSTATUS not in", values, "isshipmentstatus");
return (Criteria) this;
}
public Criteria andIsshipmentstatusBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("ISSHIPMENTSTATUS between", value1, value2, "isshipmentstatus");
return (Criteria) this;
}
public Criteria andIsshipmentstatusNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("ISSHIPMENTSTATUS not between", value1, value2, "isshipmentstatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
... ...
package com.tianbo.model;
import java.math.BigDecimal;
public class Permission {
private BigDecimal permissionId;
private String permissionName;
private String permissionSign;
private String description;
private String groupName;
public BigDecimal getPermissionId() {
return permissionId;
}
public void setPermissionId(BigDecimal permissionId) {
this.permissionId = permissionId;
}
public String getPermissionName() {
return permissionName;
}
public void setPermissionName(String permissionName) {
this.permissionName = permissionName == null ? null : permissionName.trim();
}
public String getPermissionSign() {
return permissionSign;
}
public void setPermissionSign(String permissionSign) {
this.permissionSign = permissionSign == null ? null : permissionSign.trim();
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description == null ? null : description.trim();
}
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName == null ? null : groupName.trim();
}
}
\ No newline at end of file
... ...
package com.tianbo.model;
import com.tianbo.util.dao.Page;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
public class PermissionExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected Page page;
public PermissionExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setPage(Page page) {
this.page=page;
}
public Page getPage() {
return page;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andPermissionIdIsNull() {
addCriterion("PERMISSION_ID is null");
return (Criteria) this;
}
public Criteria andPermissionIdIsNotNull() {
addCriterion("PERMISSION_ID is not null");
return (Criteria) this;
}
public Criteria andPermissionIdEqualTo(BigDecimal value) {
addCriterion("PERMISSION_ID =", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdNotEqualTo(BigDecimal value) {
addCriterion("PERMISSION_ID <>", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdGreaterThan(BigDecimal value) {
addCriterion("PERMISSION_ID >", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("PERMISSION_ID >=", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdLessThan(BigDecimal value) {
addCriterion("PERMISSION_ID <", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdLessThanOrEqualTo(BigDecimal value) {
addCriterion("PERMISSION_ID <=", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdIn(List<BigDecimal> values) {
addCriterion("PERMISSION_ID in", values, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdNotIn(List<BigDecimal> values) {
addCriterion("PERMISSION_ID not in", values, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("PERMISSION_ID between", value1, value2, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("PERMISSION_ID not between", value1, value2, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionNameIsNull() {
addCriterion("PERMISSION_NAME is null");
return (Criteria) this;
}
public Criteria andPermissionNameIsNotNull() {
addCriterion("PERMISSION_NAME is not null");
return (Criteria) this;
}
public Criteria andPermissionNameEqualTo(String value) {
addCriterion("PERMISSION_NAME =", value, "permissionName");
return (Criteria) this;
}
public Criteria andPermissionNameNotEqualTo(String value) {
addCriterion("PERMISSION_NAME <>", value, "permissionName");
return (Criteria) this;
}
public Criteria andPermissionNameGreaterThan(String value) {
addCriterion("PERMISSION_NAME >", value, "permissionName");
return (Criteria) this;
}
public Criteria andPermissionNameGreaterThanOrEqualTo(String value) {
addCriterion("PERMISSION_NAME >=", value, "permissionName");
return (Criteria) this;
}
public Criteria andPermissionNameLessThan(String value) {
addCriterion("PERMISSION_NAME <", value, "permissionName");
return (Criteria) this;
}
public Criteria andPermissionNameLessThanOrEqualTo(String value) {
addCriterion("PERMISSION_NAME <=", value, "permissionName");
return (Criteria) this;
}
public Criteria andPermissionNameLike(String value) {
addCriterion("PERMISSION_NAME like", value, "permissionName");
return (Criteria) this;
}
public Criteria andPermissionNameNotLike(String value) {
addCriterion("PERMISSION_NAME not like", value, "permissionName");
return (Criteria) this;
}
public Criteria andPermissionNameIn(List<String> values) {
addCriterion("PERMISSION_NAME in", values, "permissionName");
return (Criteria) this;
}
public Criteria andPermissionNameNotIn(List<String> values) {
addCriterion("PERMISSION_NAME not in", values, "permissionName");
return (Criteria) this;
}
public Criteria andPermissionNameBetween(String value1, String value2) {
addCriterion("PERMISSION_NAME between", value1, value2, "permissionName");
return (Criteria) this;
}
public Criteria andPermissionNameNotBetween(String value1, String value2) {
addCriterion("PERMISSION_NAME not between", value1, value2, "permissionName");
return (Criteria) this;
}
public Criteria andPermissionSignIsNull() {
addCriterion("PERMISSION_SIGN is null");
return (Criteria) this;
}
public Criteria andPermissionSignIsNotNull() {
addCriterion("PERMISSION_SIGN is not null");
return (Criteria) this;
}
public Criteria andPermissionSignEqualTo(String value) {
addCriterion("PERMISSION_SIGN =", value, "permissionSign");
return (Criteria) this;
}
public Criteria andPermissionSignNotEqualTo(String value) {
addCriterion("PERMISSION_SIGN <>", value, "permissionSign");
return (Criteria) this;
}
public Criteria andPermissionSignGreaterThan(String value) {
addCriterion("PERMISSION_SIGN >", value, "permissionSign");
return (Criteria) this;
}
public Criteria andPermissionSignGreaterThanOrEqualTo(String value) {
addCriterion("PERMISSION_SIGN >=", value, "permissionSign");
return (Criteria) this;
}
public Criteria andPermissionSignLessThan(String value) {
addCriterion("PERMISSION_SIGN <", value, "permissionSign");
return (Criteria) this;
}
public Criteria andPermissionSignLessThanOrEqualTo(String value) {
addCriterion("PERMISSION_SIGN <=", value, "permissionSign");
return (Criteria) this;
}
public Criteria andPermissionSignLike(String value) {
addCriterion("PERMISSION_SIGN like", value, "permissionSign");
return (Criteria) this;
}
public Criteria andPermissionSignNotLike(String value) {
addCriterion("PERMISSION_SIGN not like", value, "permissionSign");
return (Criteria) this;
}
public Criteria andPermissionSignIn(List<String> values) {
addCriterion("PERMISSION_SIGN in", values, "permissionSign");
return (Criteria) this;
}
public Criteria andPermissionSignNotIn(List<String> values) {
addCriterion("PERMISSION_SIGN not in", values, "permissionSign");
return (Criteria) this;
}
public Criteria andPermissionSignBetween(String value1, String value2) {
addCriterion("PERMISSION_SIGN between", value1, value2, "permissionSign");
return (Criteria) this;
}
public Criteria andPermissionSignNotBetween(String value1, String value2) {
addCriterion("PERMISSION_SIGN not between", value1, value2, "permissionSign");
return (Criteria) this;
}
public Criteria andDescriptionIsNull() {
addCriterion("DESCRIPTION is null");
return (Criteria) this;
}
public Criteria andDescriptionIsNotNull() {
addCriterion("DESCRIPTION is not null");
return (Criteria) this;
}
public Criteria andDescriptionEqualTo(String value) {
addCriterion("DESCRIPTION =", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotEqualTo(String value) {
addCriterion("DESCRIPTION <>", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionGreaterThan(String value) {
addCriterion("DESCRIPTION >", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
addCriterion("DESCRIPTION >=", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLessThan(String value) {
addCriterion("DESCRIPTION <", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLessThanOrEqualTo(String value) {
addCriterion("DESCRIPTION <=", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLike(String value) {
addCriterion("DESCRIPTION like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotLike(String value) {
addCriterion("DESCRIPTION not like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionIn(List<String> values) {
addCriterion("DESCRIPTION in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotIn(List<String> values) {
addCriterion("DESCRIPTION not in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionBetween(String value1, String value2) {
addCriterion("DESCRIPTION between", value1, value2, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotBetween(String value1, String value2) {
addCriterion("DESCRIPTION not between", value1, value2, "description");
return (Criteria) this;
}
public Criteria andGroupNameIsNull() {
addCriterion("GROUP_NAME is null");
return (Criteria) this;
}
public Criteria andGroupNameIsNotNull() {
addCriterion("GROUP_NAME is not null");
return (Criteria) this;
}
public Criteria andGroupNameEqualTo(String value) {
addCriterion("GROUP_NAME =", value, "groupName");
return (Criteria) this;
}
public Criteria andGroupNameNotEqualTo(String value) {
addCriterion("GROUP_NAME <>", value, "groupName");
return (Criteria) this;
}
public Criteria andGroupNameGreaterThan(String value) {
addCriterion("GROUP_NAME >", value, "groupName");
return (Criteria) this;
}
public Criteria andGroupNameGreaterThanOrEqualTo(String value) {
addCriterion("GROUP_NAME >=", value, "groupName");
return (Criteria) this;
}
public Criteria andGroupNameLessThan(String value) {
addCriterion("GROUP_NAME <", value, "groupName");
return (Criteria) this;
}
public Criteria andGroupNameLessThanOrEqualTo(String value) {
addCriterion("GROUP_NAME <=", value, "groupName");
return (Criteria) this;
}
public Criteria andGroupNameLike(String value) {
addCriterion("GROUP_NAME like", value, "groupName");
return (Criteria) this;
}
public Criteria andGroupNameNotLike(String value) {
addCriterion("GROUP_NAME not like", value, "groupName");
return (Criteria) this;
}
public Criteria andGroupNameIn(List<String> values) {
addCriterion("GROUP_NAME in", values, "groupName");
return (Criteria) this;
}
public Criteria andGroupNameNotIn(List<String> values) {
addCriterion("GROUP_NAME not in", values, "groupName");
return (Criteria) this;
}
public Criteria andGroupNameBetween(String value1, String value2) {
addCriterion("GROUP_NAME between", value1, value2, "groupName");
return (Criteria) this;
}
public Criteria andGroupNameNotBetween(String value1, String value2) {
addCriterion("GROUP_NAME not between", value1, value2, "groupName");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
... ...
package com.tianbo.model;
import java.math.BigDecimal;
public class Role {
private BigDecimal roleId;
private String roleName;
private String roleSign;
private String description;
public BigDecimal getRoleId() {
return roleId;
}
public void setRoleId(BigDecimal roleId) {
this.roleId = roleId;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName == null ? null : roleName.trim();
}
public String getRoleSign() {
return roleSign;
}
public void setRoleSign(String roleSign) {
this.roleSign = roleSign == null ? null : roleSign.trim();
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description == null ? null : description.trim();
}
}
\ No newline at end of file
... ...
package com.tianbo.model;
import com.tianbo.util.dao.Page;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
public class RoleExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected Page page;
public RoleExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setPage(Page page) {
this.page=page;
}
public Page getPage() {
return page;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andRoleIdIsNull() {
addCriterion("ROLE_ID is null");
return (Criteria) this;
}
public Criteria andRoleIdIsNotNull() {
addCriterion("ROLE_ID is not null");
return (Criteria) this;
}
public Criteria andRoleIdEqualTo(BigDecimal value) {
addCriterion("ROLE_ID =", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotEqualTo(BigDecimal value) {
addCriterion("ROLE_ID <>", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdGreaterThan(BigDecimal value) {
addCriterion("ROLE_ID >", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("ROLE_ID >=", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdLessThan(BigDecimal value) {
addCriterion("ROLE_ID <", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdLessThanOrEqualTo(BigDecimal value) {
addCriterion("ROLE_ID <=", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdIn(List<BigDecimal> values) {
addCriterion("ROLE_ID in", values, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotIn(List<BigDecimal> values) {
addCriterion("ROLE_ID not in", values, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("ROLE_ID between", value1, value2, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("ROLE_ID not between", value1, value2, "roleId");
return (Criteria) this;
}
public Criteria andRoleNameIsNull() {
addCriterion("ROLE_NAME is null");
return (Criteria) this;
}
public Criteria andRoleNameIsNotNull() {
addCriterion("ROLE_NAME is not null");
return (Criteria) this;
}
public Criteria andRoleNameEqualTo(String value) {
addCriterion("ROLE_NAME =", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameNotEqualTo(String value) {
addCriterion("ROLE_NAME <>", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameGreaterThan(String value) {
addCriterion("ROLE_NAME >", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameGreaterThanOrEqualTo(String value) {
addCriterion("ROLE_NAME >=", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameLessThan(String value) {
addCriterion("ROLE_NAME <", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameLessThanOrEqualTo(String value) {
addCriterion("ROLE_NAME <=", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameLike(String value) {
addCriterion("ROLE_NAME like", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameNotLike(String value) {
addCriterion("ROLE_NAME not like", value, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameIn(List<String> values) {
addCriterion("ROLE_NAME in", values, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameNotIn(List<String> values) {
addCriterion("ROLE_NAME not in", values, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameBetween(String value1, String value2) {
addCriterion("ROLE_NAME between", value1, value2, "roleName");
return (Criteria) this;
}
public Criteria andRoleNameNotBetween(String value1, String value2) {
addCriterion("ROLE_NAME not between", value1, value2, "roleName");
return (Criteria) this;
}
public Criteria andRoleSignIsNull() {
addCriterion("ROLE_SIGN is null");
return (Criteria) this;
}
public Criteria andRoleSignIsNotNull() {
addCriterion("ROLE_SIGN is not null");
return (Criteria) this;
}
public Criteria andRoleSignEqualTo(String value) {
addCriterion("ROLE_SIGN =", value, "roleSign");
return (Criteria) this;
}
public Criteria andRoleSignNotEqualTo(String value) {
addCriterion("ROLE_SIGN <>", value, "roleSign");
return (Criteria) this;
}
public Criteria andRoleSignGreaterThan(String value) {
addCriterion("ROLE_SIGN >", value, "roleSign");
return (Criteria) this;
}
public Criteria andRoleSignGreaterThanOrEqualTo(String value) {
addCriterion("ROLE_SIGN >=", value, "roleSign");
return (Criteria) this;
}
public Criteria andRoleSignLessThan(String value) {
addCriterion("ROLE_SIGN <", value, "roleSign");
return (Criteria) this;
}
public Criteria andRoleSignLessThanOrEqualTo(String value) {
addCriterion("ROLE_SIGN <=", value, "roleSign");
return (Criteria) this;
}
public Criteria andRoleSignLike(String value) {
addCriterion("ROLE_SIGN like", value, "roleSign");
return (Criteria) this;
}
public Criteria andRoleSignNotLike(String value) {
addCriterion("ROLE_SIGN not like", value, "roleSign");
return (Criteria) this;
}
public Criteria andRoleSignIn(List<String> values) {
addCriterion("ROLE_SIGN in", values, "roleSign");
return (Criteria) this;
}
public Criteria andRoleSignNotIn(List<String> values) {
addCriterion("ROLE_SIGN not in", values, "roleSign");
return (Criteria) this;
}
public Criteria andRoleSignBetween(String value1, String value2) {
addCriterion("ROLE_SIGN between", value1, value2, "roleSign");
return (Criteria) this;
}
public Criteria andRoleSignNotBetween(String value1, String value2) {
addCriterion("ROLE_SIGN not between", value1, value2, "roleSign");
return (Criteria) this;
}
public Criteria andDescriptionIsNull() {
addCriterion("DESCRIPTION is null");
return (Criteria) this;
}
public Criteria andDescriptionIsNotNull() {
addCriterion("DESCRIPTION is not null");
return (Criteria) this;
}
public Criteria andDescriptionEqualTo(String value) {
addCriterion("DESCRIPTION =", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotEqualTo(String value) {
addCriterion("DESCRIPTION <>", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionGreaterThan(String value) {
addCriterion("DESCRIPTION >", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
addCriterion("DESCRIPTION >=", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLessThan(String value) {
addCriterion("DESCRIPTION <", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLessThanOrEqualTo(String value) {
addCriterion("DESCRIPTION <=", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLike(String value) {
addCriterion("DESCRIPTION like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotLike(String value) {
addCriterion("DESCRIPTION not like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionIn(List<String> values) {
addCriterion("DESCRIPTION in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotIn(List<String> values) {
addCriterion("DESCRIPTION not in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionBetween(String value1, String value2) {
addCriterion("DESCRIPTION between", value1, value2, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotBetween(String value1, String value2) {
addCriterion("DESCRIPTION not between", value1, value2, "description");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
... ...
package com.tianbo.model;
import java.math.BigDecimal;
import java.util.List;
public class RolePermission {
private BigDecimal id;
private BigDecimal roleId;
private BigDecimal permissionId;
public List<Integer> pmList;
public BigDecimal getId() {
return id;
}
public void setId(BigDecimal id) {
this.id = id;
}
public BigDecimal getRoleId() {
return roleId;
}
public void setRoleId(BigDecimal roleId) {
this.roleId = roleId;
}
public BigDecimal getPermissionId() {
return permissionId;
}
public void setPermissionId(BigDecimal permissionId) {
this.permissionId = permissionId;
}
public List<Integer> getPmList() {
return pmList;
}
public void setPmList(List<Integer> pmList) {
this.pmList = pmList;
}
}
\ No newline at end of file
... ...
package com.tianbo.model;
import com.tianbo.util.dao.Page;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
public class RolePermissionExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected Page page;
public RolePermissionExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setPage(Page page) {
this.page=page;
}
public Page getPage() {
return page;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("ID is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("ID is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(BigDecimal value) {
addCriterion("ID =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(BigDecimal value) {
addCriterion("ID <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(BigDecimal value) {
addCriterion("ID >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("ID >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(BigDecimal value) {
addCriterion("ID <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(BigDecimal value) {
addCriterion("ID <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<BigDecimal> values) {
addCriterion("ID in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<BigDecimal> values) {
addCriterion("ID not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("ID between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("ID not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andRoleIdIsNull() {
addCriterion("ROLE_ID is null");
return (Criteria) this;
}
public Criteria andRoleIdIsNotNull() {
addCriterion("ROLE_ID is not null");
return (Criteria) this;
}
public Criteria andRoleIdEqualTo(BigDecimal value) {
addCriterion("ROLE_ID =", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotEqualTo(BigDecimal value) {
addCriterion("ROLE_ID <>", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdGreaterThan(BigDecimal value) {
addCriterion("ROLE_ID >", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("ROLE_ID >=", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdLessThan(BigDecimal value) {
addCriterion("ROLE_ID <", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdLessThanOrEqualTo(BigDecimal value) {
addCriterion("ROLE_ID <=", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdIn(List<BigDecimal> values) {
addCriterion("ROLE_ID in", values, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotIn(List<BigDecimal> values) {
addCriterion("ROLE_ID not in", values, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("ROLE_ID between", value1, value2, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("ROLE_ID not between", value1, value2, "roleId");
return (Criteria) this;
}
public Criteria andPermissionIdIsNull() {
addCriterion("PERMISSION_ID is null");
return (Criteria) this;
}
public Criteria andPermissionIdIsNotNull() {
addCriterion("PERMISSION_ID is not null");
return (Criteria) this;
}
public Criteria andPermissionIdEqualTo(BigDecimal value) {
addCriterion("PERMISSION_ID =", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdNotEqualTo(BigDecimal value) {
addCriterion("PERMISSION_ID <>", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdGreaterThan(BigDecimal value) {
addCriterion("PERMISSION_ID >", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("PERMISSION_ID >=", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdLessThan(BigDecimal value) {
addCriterion("PERMISSION_ID <", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdLessThanOrEqualTo(BigDecimal value) {
addCriterion("PERMISSION_ID <=", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdIn(List<BigDecimal> values) {
addCriterion("PERMISSION_ID in", values, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdNotIn(List<BigDecimal> values) {
addCriterion("PERMISSION_ID not in", values, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("PERMISSION_ID between", value1, value2, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("PERMISSION_ID not between", value1, value2, "permissionId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
... ...