@ -1,31 +1,48 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace= "com.bgs.system.mapper.BaseLocationInfoMapper" >
<resultMap type= "BaseLocationInfo" id= "BaseLocationInfoResult" >
<result property= "objId" column= "obj_id" />
<result property= "locationCode" column= "location_code" />
<result property= "locationName" column= "location_name" />
<result property= "localtionType" column= "localtion_type" />
<result property= "locationDescribe" column= "location_describe" />
<result property= "storeCode" column= "store_code" />
<result property= "maxAmount" column= "max_amount" />
<result property= "usedAmount" column= "used_amount" />
<result property= "maxVolume" column= "max_volume" />
<result property= "usedVolume" column= "used_volume" />
<result property= "locationStatus" column= "location_status" />
<result property= "isFlag" column= "is_flag" />
<result property= "remark" column= "remark" />
<result property= "createdBy" column= "created_by" />
<result property= "createdTime" column= "created_time" />
<result property= "updatedBy" column= "updated_by" />
<result property= "updatedTime" column= "updated_time" />
<result property= "objId" column= "obj_id" />
<result property= "locationCode" column= "location_code" />
<result property= "locationName" column= "location_name" />
<result property= "localtionType" column= "localtion_type" />
<result property= "locationDescribe" column= "location_describe" />
<result property= "storeCode" column= "store_code" />
<result property= "maxAmount" column= "max_amount" />
<result property= "usedAmount" column= "used_amount" />
<result property= "maxVolume" column= "max_volume" />
<result property= "usedVolume" column= "used_volume" />
<result property= "locationStatus" column= "location_status" />
<result property= "isFlag" column= "is_flag" />
<result property= "remark" column= "remark" />
<result property= "createdBy" column= "created_by" />
<result property= "createdTime" column= "created_time" />
<result property= "updatedBy" column= "updated_by" />
<result property= "updatedTime" column= "updated_time" />
</resultMap>
<sql id= "selectBaseLocationInfoVo" >
select obj_id, location_code, location_name, localtion_type, location_describe, store_code, max_amount, used_amount, max_volume, used_volume, location_status, is_flag, remark, created_by, created_time, updated_by, updated_time from base_location_info
select obj_id,
location_code,
location_name,
localtion_type,
location_describe,
store_code,
max_amount,
used_amount,
max_volume,
used_volume,
location_status,
is_flag,
remark,
created_by,
created_time,
updated_by,
updated_time
from base_location_info
</sql>
@ -50,13 +67,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from base_location_info t1
left join base_basket_info t2 on t1.remark = t2.basket_epc
<where >
<if test= "locationCode != null and locationCode != ''" > and t1.location_code = #{locationCode}</if>
<if test= "locationName != null and locationName != ''" > and t1.location_name like concat('%', #{locationName}, '%')</if>
<if test= "localtionType != null " > and t1.localtion_type = #{localtionType}</if>
<if test= "storeCode != null and storeCode != ''" > and t1.store_code = #{storeCode}</if>
<if test= "locationStatus != null " > and t1.location_status = #{locationStatus}</if>
<if test= "isFlag != null " > and t1.is_flag = #{isFlag}</if>
<if test= "params.beginUpdatedTime != null and params.beginUpdatedTime != '' and params.endUpdatedTime != null and params.endUpdatedTime != ''" > and t1.updated_time between #{params.beginUpdatedTime} and #{params.endUpdatedTime}</if>
<if test= "locationCode != null and locationCode != ''" > and t1.location_code = #{locationCode}</if>
<if test= "locationName != null and locationName != ''" > and t1.location_name like concat('%',
#{locationName}, '%')
</if>
<if test= "localtionType != null " > and t1.localtion_type = #{localtionType}</if>
<if test= "storeCode != null and storeCode != ''" > and t1.store_code = #{storeCode}</if>
<if test= "locationStatus != null " > and t1.location_status = #{locationStatus}</if>
<if test= "isFlag != null " > and t1.is_flag = #{isFlag}</if>
<if test= "params.beginUpdatedTime != null and params.beginUpdatedTime != '' and params.endUpdatedTime != null and params.endUpdatedTime != ''" >
and t1.updated_time between #{params.beginUpdatedTime} and #{params.endUpdatedTime}
</if>
</where>
</select>
@ -84,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "createdTime != null" > created_time,</if>
<if test= "updatedBy != null" > updated_by,</if>
<if test= "updatedTime != null" > updated_time,</if>
</trim>
</trim>
<trim prefix= "values (" suffix= ")" suffixOverrides= "," >
<if test= "locationCode != null" > #{locationCode},</if>
<if test= "locationName != null" > #{locationName},</if>
@ -102,7 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "createdTime != null" > #{createdTime},</if>
<if test= "updatedBy != null" > #{updatedBy},</if>
<if test= "updatedTime != null" > #{updatedTime},</if>
</trim>
</trim>
</insert>
<update id= "updateBaseLocationInfo" parameterType= "BaseLocationInfo" >
@ -129,7 +150,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id= "deleteBaseLocationInfoByObjId" parameterType= "Long" >
delete from base_location_info where obj_id = #{objId}
delete
from base_location_info
where obj_id = #{objId}
</delete>
<delete id= "deleteBaseLocationInfoByObjIds" parameterType= "String" >