<?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.ld.igds.common.mapper.DicDataMapper">
|
|
<!-- 更新 -->
|
<delete id="batchDelPos" parameterType="com.ld.igds.common.dto.PosDto">
|
delete from d_dic_location
|
<where>
|
<if test="dto.companyId != null"> AND COMPANY_ID_ =
|
#{dto.companyId}
|
</if>
|
<if test="dto.selfTag != null"> AND SELF_TAG_ = #{dto.selfTag}
|
</if>
|
<if test="dto.bizTag != null"> AND BIZ_TAG_ = #{dto.bizTag}</if>
|
<if test="dto.depotId != null"> AND DEPOT_ID_ = #{dto.depotId}
|
</if>
|
</where>
|
</delete>
|
|
<!-- 单个数据删除 -->
|
<delete id="delPosByBizId" parameterType="com.ld.igds.common.dto.PosDto">
|
delete from d_dic_location
|
<where>
|
<if test="dto.companyId != null"> AND COMPANY_ID_ = #{dto.companyId}</if>
|
<if test="dto.bizId != null"> AND BIZ_ID_ = #{dto.bizId}</if>
|
</where>
|
</delete>
|
|
|
<!-- 获取坐标信息-->
|
<select id="getPosByBizTag" resultType="com.ld.igds.common.dto.PosDto">
|
select
|
id_ as id,
|
company_id_ as companyId,
|
BIZ_TAG_ as bizTag,
|
biz_id_ as bizId,
|
self_tag_ as selfTag,
|
pos_x_ as posX,
|
pos_y_ as posY,
|
pos_z_ as posZ
|
from d_dic_location
|
<where>
|
COMPANY_ID_ = #{companyId}
|
AND BIZ_TAG_ = #{bizTag}
|
</where>
|
|
</select>
|
|
|
<!-- 新增 -->
|
<insert id="addPos" parameterType="com.ld.igds.common.dto.PosDto">
|
insert into
|
d_dic_location(id_,company_id_,depot_id_,biz_tag_,biz_id_,self_tag_,pos_x_,pos_y_,pos_z_)
|
values(
|
#{dto.id},
|
#{dto.companyId},
|
#{dto.depotId},
|
#{dto.bizTag},
|
#{dto.bizId},
|
#{dto.selfTag},
|
#{dto.posX},
|
#{dto.posY},
|
#{dto.posZ}
|
)
|
</insert>
|
|
<!-- 查询标语 -->
|
<select id="getDicSlogan" resultType="com.ld.igds.models.DicSlogan"
|
parameterType="java.util.Map">
|
select
|
*
|
from D_DIC_SLOGAN g
|
<where>
|
<if test="param.companyId != null">AND g.COMPANY_ID_ =
|
#{param.companyId}</if>
|
<if test="param.status != null">AND g.STATUS_ = #{param.status}
|
</if>
|
order by g.PUSH_TIME_ DESC
|
|
limit 1
|
</where>
|
|
</select>
|
|
<select id="pageFoodLocataion" resultType="com.ld.igds.models.DicFoodOrigin" parameterType="com.ld.igds.data.BaseParam">
|
select
|
ID_ as id,
|
CODE_ as code,
|
NAME_ as name,
|
SIMPLE_ as simple,
|
SORT_ as SORT_,
|
DISABLED_TAG_ as disabledTag
|
from
|
D_DIC_FOOD_ORIGIN
|
|
<where>
|
DISABLED_TAG_ ='N'
|
<if test="param.key != null and ''!= param.key">AND (CODE_ like #{param.key} OR NAME_ like #{param.key} OR SIMPLE_ like #{param.key} )</if>
|
</where>
|
|
order by SORT_
|
</select>
|
</mapper>
|