初始化v1
This commit is contained in:
21
target/classes/mapper/InventoryLogMapper.xml
Normal file
21
target/classes/mapper/InventoryLogMapper.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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.nlshop.mapper.InventoryLogMapper">
|
||||
<resultMap id="BaseResultMap" type="com.nlshop.entity.InventoryLog">
|
||||
<id column="id" property="id"/>
|
||||
<result column="inventory_id" property="inventoryId"/>
|
||||
<result column="operation_type" property="operationType"/>
|
||||
<result column="quantity" property="quantity"/>
|
||||
<result column="operator" property="operator"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="insert" parameterType="com.nlshop.entity.InventoryLog" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO inventory_log (inventory_id, operation_type, quantity, operator)
|
||||
VALUES (#{inventoryId}, #{operationType}, #{quantity}, #{operator})
|
||||
</insert>
|
||||
|
||||
<select id="selectByInventoryId" resultMap="BaseResultMap">
|
||||
SELECT * FROM inventory_log WHERE inventory_id = #{inventoryId} ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user