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. shells - 有效登录 shell 的路径名

    描述 /etc/shells 是一个文本文件,其中包含有效登录 shell 的路径全名. chsh(1) 需要参考这个文件,并且其他程序也可以查询该文件.有些程序从这个文件判断用户是不是标准用户.比如 ...

  2. 一、Nuget管理

    一.注册账号 http://www.nuget.org 可用微软账户登录注册 手机端授权 二.打包Nuget 1.新建一个.NET Standard 的类库项目(取名类库) 更改方法 2.选择项目属性 ...

  3. Pandas之loc\iloc\ix

    ---------------------------------------------------------------------------------------------------- ...

  4. testNG 并发测试

     invocationCount是并发数,threadPoolSize是线程数,当线程是1的时候就是依次执行n次,当线程是并发次数时,就是同时执行n次    @Test public void abc ...

  5. 【leetcode】976. Largest Perimeter Triangle

    题目如下: Given an array A of positive lengths, return the largest perimeter of a triangle with non-zero ...

  6. 火狐插件火狐黑客插件将Firefox变成黑客工具的七个插件

    目前很多插件不支持 Firefox 3.5 哦1. Add N Edit Cookies 查看和修改本地的Cookie,Cookie欺骗必备. 下载:http://code.google.com/p/ ...

  7. Android 模糊搜索rawquery bind or column index out of range: handle 0x2fb180 报错

    做模糊搜索时,出现了  bind or column index out of range: handle 0x2fb180 报错 public Cursor getTitle(String word ...

  8. Linux Bash Shell快速入门(一)

    BASH 的基本语法· 最简单的例子 —— Hello World! · 关于输入.输出和错误输出 · BASH 中对变量的规定(与 C 语言的异同) · BASH 中的基本流程控制语法 · 函数的使 ...

  9. redis常用命令-2

    redis常用命令 type your_key #查看Key类型 del your_key #删除key keys * #所有key info #信息 /usr/local/bin/redis-cli ...

  10. mysql5.6和5.7安装 centos

    mysql5.7安装 tar xf mysql--linux-glibc2.-x86_64.tar.gz mv mysql--linux-glibc2.-x86_64 /opt/mysql yum i ...