当前位置: 首页 > news >正文

广州市城市建设档案馆网站百度怎么推广广告

广州市城市建设档案馆网站,百度怎么推广广告,做外贸哪个网站比较好2017,wordpress更新报错if标签 用于判断条件是否成立。使用test属性进行条件判断&#xff0c;如果条件为true&#xff0c;则拼接sql。 <where>标签用于识别语句是否需要连接词and&#xff0c;识别sql语句。 package com.t0.maybatisc.mapper;import com.t0.maybatisc.pojo.Emp; import org.a…

if标签

用于判断条件是否成立。使用test属性进行条件判断,如果条件为true,则拼接sql。

<where>标签用于识别语句是否需要连接词and,识别sql语句。

package com.t0.maybatisc.mapper;import com.t0.maybatisc.pojo.Emp;
import org.apache.ibatis.annotations.*;import java.time.LocalDate;
import java.util.List;@Mapper
public interface EmpMapper {
//    条件查询public List<Emp> list( String name,  Short gender,  LocalDate begin,  LocalDate end);}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.t0.maybatisc.mapper.EmpMapper"><select id="list" resultType="com.t0.maybatisc.pojo.Emp">select * from emp<where><if test="name != null">name like concat('%',#{name},'%')</if><if test="gender != null">and gender = #{gender}</if><if test="begin != null and end != null">and entrydate between #{begin} and #{end}</if></where>order by update_time desc</select>
</mapper>
//    根据条件查询@Testpublic void list(){
//        List<Emp> empList =empMapper.list("张",(short) 1,LocalDate.of(2010,01,01),LocalDate.of(2020,01,01));List<Emp> empList =empMapper.list(null,(short)1,null,null);System.out.println(empList);}
}

用于select、upgrade。

foreach标签

package com.t0.maybatisc.mapper;import com.t0.maybatisc.pojo.Emp;
import org.apache.ibatis.annotations.*;import java.time.LocalDate;
import java.util.List;@Mapper
public interface EmpMapper {
//    多条删除public  void deleteByids(List<Integer> ids);}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.t0.maybatisc.mapper.EmpMapper"><select id="deleteByids" resultType="com.t0.maybatisc.pojo.Emp">delete from emp where id in<foreach collection="ids" item="id" separator="," open="(" close=")">#{id}</foreach></select></mapper>

collection="ids" item="id" separator="," open="(" close=")"

    @Testpublic void TestdeleteByids(){List<Integer> ids = Arrays.asList(19,18,16);empMapper.deleteByids(ids);}

sql和include

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.t0.maybatisc.mapper.EmpMapper"><sql id="commonS">select id,username,password,name,gender,image,job,entrydate,dept_id,create_time,update_timefrom emp</sql><select id="list" resultType="com.t0.maybatisc.pojo.Emp"><include refid="commonS"></include><where><if test="name != null">name like concat('%',#{name},'%')</if><if test="gender != null">and gender = #{gender}</if><if test="begin != null and end != null">and entrydate between #{begin} and #{end}</if></where>order by update_time desc</select>
</mapper>

 

http://www.mmbaike.com/news/516.html

相关文章:

  • 安徽省网站建设公司广州网络科技有限公司
  • 网站维护的方法郑州网络推广专业公司
  • 绵阳做网站公司百度站长工具如何使用
  • vs2010网站开发实例长沙网站推广智投未来
  • 在线图片制作工具大全百度seo优化方法
  • 南京网站设计开发今日头条新闻头条
  • 坪山网站建设设计网站服务器ip查询
  • 网站建设公司如何进行工作百度页面推广
  • 做乒乓球网站的图片网站移动端优化工具
  • 网站建设公司如何拓宽业务日本域名注册网站
  • 做外贸的人经常用什么网站app注册推广
  • android毕业设计代做网站阳山网站seo
  • 七台河做网站北京网
  • 长沙网站制作价南宁seo计费管理
  • 上海知名网站建设公司营销方案网站
  • 浙江杭州网站建设服务公司哪家好郑州seo排名哪有
  • wordpress cdn jquery厦门seo外包
  • 帝国红色政府网站cms模板百度企业官网认证
  • .la域名做的网站广州百度搜索优化
  • 成都高校网站建设服务公司seo整站优化报价
  • 大连商城网站建设郑州seo优化培训
  • 单位网站建设管理情况卡点视频软件下载
  • 怎样设计网站首页云南最新消息
  • 贵州省城乡与建设厅网站国外推广网站有什么
  • 盲盒app开发seo关键词查询排名软件
  • 企业网站建设方案怎么写互联网营销专家
  • 移动网站建设制作公司全媒体运营师报考条件
  • 网站是谁做的一份完整的营销策划方案
  • 网站开发工作总结论文百度seo关键词排名优化
  • 开发系统网站建设百度一下首页百度