From 5419e8d107ca2864ff90dc45bbf93b5bec8494a2 Mon Sep 17 00:00:00 2001 From: tamguo Date: Mon, 23 Jul 2018 17:08:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/model/condition/SysPostCondition.java | 29 +++++++++++++++++++ .../sys/model/enums/SysPostStatusEnum.java | 1 - .../main/resources/mappers/SysPostMapper.xml | 15 ++++++++++ .../templates/modules/sys/post/index.html | 26 ++++++++++------- 4 files changed, 60 insertions(+), 11 deletions(-) diff --git a/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/condition/SysPostCondition.java b/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/condition/SysPostCondition.java index 61645e1..25b97f7 100644 --- a/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/condition/SysPostCondition.java +++ b/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/condition/SysPostCondition.java @@ -2,9 +2,38 @@ package com.tamguo.modules.sys.model.condition; public class SysPostCondition { + private String code; + private String name; + private String postType; + private String status; + private Integer pageNo; private Integer pageSize; + public String getCode() { + return code; + } + public void setCode(String code) { + this.code = code; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getPostType() { + return postType; + } + public void setPostType(String postType) { + this.postType = postType; + } + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } public Integer getPageNo() { return pageNo; } diff --git a/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/enums/SysPostStatusEnum.java b/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/enums/SysPostStatusEnum.java index a381e4d..206dbaf 100644 --- a/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/enums/SysPostStatusEnum.java +++ b/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/enums/SysPostStatusEnum.java @@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.enums.IEnum; */ public enum SysPostStatusEnum implements IEnum { NORMAL("normal", "正常"), - LOCKED("locked", "锁定"), DISABLED("disable" , "禁用"); private String value; diff --git a/tamguo-oms/src/main/resources/mappers/SysPostMapper.xml b/tamguo-oms/src/main/resources/mappers/SysPostMapper.xml index cfaf32e..439f14e 100644 --- a/tamguo-oms/src/main/resources/mappers/SysPostMapper.xml +++ b/tamguo-oms/src/main/resources/mappers/SysPostMapper.xml @@ -15,6 +15,21 @@ p.status FROM sys_post p + + 1 = 1 + + and p.code = #{code} + + + and p.name like #{name} + + + and p.post_type like #{postType} + + + and p.status like #{status} + + \ No newline at end of file diff --git a/tamguo-oms/src/main/resources/templates/modules/sys/post/index.html b/tamguo-oms/src/main/resources/templates/modules/sys/post/index.html index 40de2f9..e160fc0 100644 --- a/tamguo-oms/src/main/resources/templates/modules/sys/post/index.html +++ b/tamguo-oms/src/main/resources/templates/modules/sys/post/index.html @@ -33,28 +33,36 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
- +
- +
- -
+ +
- -
+ +
@@ -108,8 +116,6 @@ $('#dataGrid').dataGrid({ {header:'状态', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){ if(val == "normal"){ return '正常'; - }else if(val == "locked"){ - return '锁定'; }else if(val == "disabled"){ return '禁用'; }else{