| New file |
| | |
| | | <?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.example.erp.mapper.sd.BasicGlassTypeMapper"> |
| | | <select id="getOneLevel"> |
| | | select |
| | | * |
| | | from |
| | | basic_glass_type as a |
| | | where a.level=1 |
| | | </select> |
| | | <select id="getTwoLevel"> |
| | | select |
| | | * |
| | | from |
| | | basic_glass_type as a |
| | | where a.level=2 |
| | | ORDER BY a.id ; |
| | | </select> |
| | | |
| | | <select id="selectMaxType"> |
| | | select |
| | | * |
| | | from |
| | | basic_glass_type as a |
| | | where a.level=1 |
| | | ORDER BY a.id desc limit 1; |
| | | |
| | | </select> |
| | | |
| | | <select id="selectMaxTowLevelType"> |
| | | select |
| | | * |
| | | from |
| | | basic_glass_type as a |
| | | where |
| | | a.level=2 |
| | | and a.belong = #{type} |
| | | |
| | | ORDER BY a.id desc limit 1; |
| | | </select> |
| | | |
| | | <update id="updateGlassTypeName" parameterType="com.example.erp.entity.sd.BasicGlassType" > |
| | | update |
| | | basic_glass_type as a |
| | | set a.type_name = #{basicGlassType.typeName} |
| | | where a.id = #{basicGlassType.id} |
| | | </update> |
| | | |
| | | </mapper> |