| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.yuanchu.mom.mapper.ConsignmentMapper"> |
| | | <select id="selectAll" resultType="com.yuanchu.mom.pojo.Consignment"> |
| | | select * from mom_ocean.consignment where state=1 |
| | | select * |
| | | from mom_ocean.consignment |
| | | where state = 1 |
| | | </select> |
| | | <select id="selectAllCon" resultType="java.util.Map"> |
| | | select id, |
| | | name, |
| | | specifications, |
| | | quality_traceability, |
| | | customer_code, |
| | | unit, |
| | | number, |
| | | check_name, |
| | | fit_name, |
| | | user_name |
| | | from mom_ocean.consignment |
| | | where state=1 |
| | | <if test="name!=null and name!=''"> |
| | | and name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="specifications!=null and specifications!=''"> |
| | | and specifications like concat('%',#{specifications},'%') |
| | | </if> |
| | | <if test="time!=null and time!=''"> |
| | | and DATE_FORMAT(create_time, '%Y-%m-%d')=#{time} |
| | | </if> |
| | | order by id desc |
| | | </select> |
| | | </mapper> |