1.分页: <div class="pagination">${page }</div>

2.日历:onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"

3.确认删除提示框:<a href="${ctx}/sys/onDuty2/delete?id=${onduty.id}" onclick="return confirm('确认要删除吗?')" class="btn btn-sm btn-primary">删除</a>

4.保存提示框:

 function tijiao(){
document.getElementById("updateForm").submit();
/* layer.confirm("确认保存吗?", function(r) {
if(r){
document.getElementById("updateForm").submit();
}
layer.close(r);
}); */ /* var msg=comfirm("确认保存?");
if(msg==true){
document.getElementById("updateForm").submit();
}else{
return false;
} */ }

5.类A包含类B:在建表时,全部使用string类型,表A中只记录B的id。在建实体类时,在类A中使用String BId,String BName,通过查询将表B的信息记录在实体类中。而数据库中之保存id。

xml

 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.thinkgem.jeesite.modules.business.monitor.dao.DeviceDao"> <sql id="Base_Column_List">
d.id, d.num, d.name, d.model, d.type, d.is_bind, d.binder_id,
u.name as BinderName, d.state, d.del_flag
</sql> <sql id="Joins">
LEFT JOIN sys_users u ON u.id = d.binder_id
</sql> <!-- 查询单个 -->
<select id="selectById" parameterType="java.lang.String" resultType="Device">
select
<include refid="Base_Column_List" />
from mon_device
where id = #{id}
</select> <!-- 查询全部/条件查询列表 -->
<select id="selectList" parameterType="Device" resultType="Device">
select
<include refid="Base_Column_List" />
FROM mon_Device d
<include refid="Joins"/>
<where>
<if test="num != null">
d.num = #{num}
</if>
<if test="name != null">
d.name = #{name}
</if>
<if test="model != null">
d.model = #{model}
</if>
<if test="type != null">
d.type = #{type}
</if>
<if test="isBind != null">
d.is_bind = #{isBind}
</if>
<if test="binderId != null">
d.binder_id = #{binderId},
</if>
<if test="state != null">
d.state = #{state}
</if>
<if test="1 != 0">
AND d.del_flag = '0'
</if>
</where>
</select> <!-- 添加 -->
<insert id="insert" parameterType="Device">
insert into mon_device
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="num != null">
num,
</if>
<if test="name != null">
name,
</if>
<if test="model != null">
model,
</if>
<if test="type != null">
type,
</if>
<if test="isBind != null">
is_bind,
</if>
<if test="binderId != null">
binder_id,
</if>
<if test="state != null">
state,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createDate != null">
create_date,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="updateDate != null">
update_date,
</if>
<if test="delFlag != null">
del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id},
</if>
<if test="num != null">
#{num},
</if>
<if test="name != null">
#{name},
</if>
<if test="model != null">
#{model},
</if>
<if test="type != null">
#{type},
</if>
<if test="isBind != null">
#{isBind},
</if>
<if test="binderId != null">
#{binderId},
</if>
<if test="state != null">
#{state},
</if>
<if test="createBy != null">
#{createBy.id},
</if>
<if test="createDate != null">
#{createDate},
</if>
<if test="updateBy != null">
#{updateBy.id},
</if>
<if test="updateDate != null">
#{updateDate},
</if>
<if test="delFlag != null">
#{delFlag},
</if>
</trim>
</insert> <!-- 修改 -->
<update id="update" parameterType="Device">
update mon_device
<set>
<if test="num != null">
num = #{num},
</if>
<if test="name != null">
name = #{name},
</if>
<if test="model != null">
model = #{model},
</if>
<if test="type != null">
type = #{type},
</if>
<if test="isBind != null">
is_bind = #{isBind},
</if>
<if test="binderId != null">
binder_id = #{binderId},
</if>
<if test="state != null">
state = #{state},
</if>
<if test="createBy != null">
create_by = #{createBy},
</if>
<if test="createDate != null">
create_date = #{createDate},
</if>
<if test="updateBy != null">
update_by = #{updateBy},
</if>
<if test="updateDate != null">
update_date = #{updateDate},
</if>
<if test="delFlag != null">
del_flag = #{delFlag},
</if>
</set>
where id = #{id}
</update> <!-- 删除 -->
<update id="deleteById" >
update mon_device set del_flag = '1'
where id = #{id }
</update> </mapper>
 类A包含类B

jeesite框架常用插件的更多相关文章

  1. 【转载】Grunt常用插件介绍

    项目名称 grunt-contrib v0.8.0 项目地址 https://github.com/gruntjs/grunt-contrib 项目介绍 此项目是对grunt常用插件的集合,刚接触gr ...

  2. maven常用插件总结

    maven本质上是一个插件框架,几乎所有的功能都是通过各种各样的插件来实现的.maven默认会依据项目类型自动把构建时的各阶段(Lifecycle和phase)自动绑定(Lifecycle Mappi ...

  3. maven常用插件配置详解

    常用插件配置详解Java代码    <!-- 全局属性配置 --> <properties> <project.build.name>tools</proje ...

  4. logstash常用插件解析

    官方地址:https://www.elastic.co/guide/en/logstash-versioned-plugins/current/index.html 配置文件写法: # 日志导入inp ...

  5. Bootstrap 框架、插件

    Bootstrap,前端工程师比较常用的框架.插件,根据它的定义,我们不妨这样理解,Bootstrap就是用于前端开发的一个模板,就是别人做好了我们直接可以搬过来直接使用或者根据自己需要略加修改设计自 ...

  6. .Net 常用插件及第三方库

    .Net 常用插件及第三方库 一:第三方插件 1:基于响应式编程思想的oc 地址:https://github.com/ReactiveCocoa/ReactiveCocoa 2:hud提示框 地址: ...

  7. Xcode 常用插件

    1.Xcode 插件 从 Xcode 8 起 Apple 禁用 Xcode 插件. 1)Xcode 插件安装目录 ~/library/Application Support/Developer/Sha ...

  8. unity assetStore 常用插件

    常用插件 20180723============= 教程类 =============<Mecanim Example Scenes > 官方示例场景<Surivial Shoot ...

  9. CDN公共库、前端开发常用插件一览表(VendorPluginLib)

    =======================================================================================前端CDN公共库===== ...

随机推荐

  1. go语言从例子开始之Example5.for循环

    for 是 Go 中唯一的循环结构.这里有 for 循环的三个基本使用方式. package main import "fmt" func main() { 最常用的方式,带单个循 ...

  2. Linux Centos 7 下部署 .NetCore + MySql + Redis + mssql2007 部署过程

    1.  net core 安装及运行配置 安装 1)rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-p ...

  3. tomcat-性能优化参考

    转摘 http://blog.csdn.net/lifetragedy/article/details/7708724. ###jdk1.6.未验证.仅供参考### linux环境下Tomcat调优 ...

  4. PHP基础知识------页面静态化

    1.在开发项目时,有时会遇到一些页面数据量特别大,但是又不经常改变的情况,如商城首页等,这时候就需要进行页面静态化,减轻服务器和数据库的压力. 这里我们先用原生的PHP写一个简单的demo,用来理解页 ...

  5. C#排列组合类,写彩票算法的朋友们可以来看一看

    public class PermutationAndCombination<T>    {        /// <summary>        /// 交换两个变量    ...

  6. JVM 和JMM的区别

    首先从定义上看 JVM (Java Virtual Machine)Java虚拟机模型 主要描述的是Java虚拟机内部的结构以及各个结构之间的关系. JMM(Java Memory Model) Ja ...

  7. JMeter ServerAgent服务器资源监控插件

    本文介绍对Linux服务器的服务进行压测时,使用jmeter serverAgent插件监控服务器资源. 1.插件准备 所需插件: JMeterPlugins-Extras.jar JMeterPlu ...

  8. 探索Redis设计与实现6:Redis内部数据结构详解——skiplist

    本文转自互联网 本系列文章将整理到我在GitHub上的<Java面试指南>仓库,更多精彩内容请到我的仓库里查看 https://github.com/h2pl/Java-Tutorial ...

  9. 使用 nuxt+iview-admin+koa2 开发项目

    公司最近在做的一个项目,依然是采用熟悉的vue开发,数据平台因为其数据量大的特点,采用传统的spa模式,首页加载时间很长,而SSR这种方式对于首屏的加载时间优化显而易见,同时还可以方便的进行SEO.因 ...

  10. (转)使用OpenGL显示图像(六)响应触摸事件

    响应触摸事件 编写:jdneo - 原文:http://developer.android.com/training/graphics/opengl/touch.html 让对象根据预设的程序运动(如 ...