|
|
|
@ -245,23 +245,55 @@
|
|
|
|
|
<if test="enable != null">
|
|
|
|
|
AND basic_bussiness_type.enable = #{enable}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="spUse != null and spUse == '3'.toString()">
|
|
|
|
|
<if test="spUse == 3">
|
|
|
|
|
AND basic_bussiness_type.spUse > 0
|
|
|
|
|
</if>
|
|
|
|
|
<if test="spUse != null and spUse != '3'.toString()">
|
|
|
|
|
<if test="spUse != null and spUse != 3">
|
|
|
|
|
AND basic_bussiness_type.spUse = #{spUse}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="code != ''and code != null">
|
|
|
|
|
AND subInvCode = #{code}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="invCode != ''and invCode != null">
|
|
|
|
|
AND subInvCode = #{code}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="userId != ''and userId != null">
|
|
|
|
|
AND auth_user_bustype.`userId` = #{userId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="spUse != null">
|
|
|
|
|
</where>
|
|
|
|
|
group by basic_bussiness_type.action
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="filterJoinByInv" parameterType="com.glxp.api.req.basic.FilterBussinessTypeRequest"
|
|
|
|
|
resultType="com.glxp.api.res.basic.BasicBussinessTypeResponse">
|
|
|
|
|
SELECT basic_bussiness_type.*
|
|
|
|
|
FROM basic_bussiness_type
|
|
|
|
|
left JOIN auth_warehouse_bustype ON basic_bussiness_type.action = auth_warehouse_bustype.action
|
|
|
|
|
<where>
|
|
|
|
|
<if test="name != ''and name != null">
|
|
|
|
|
AND basic_bussiness_type.name LIKE concat('%', #{name}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="inStock != null">
|
|
|
|
|
AND basic_bussiness_type.inStock = #{inStock}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="action != ''and action != null">
|
|
|
|
|
AND basic_bussiness_type.action = #{action}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="enable != null">
|
|
|
|
|
AND basic_bussiness_type.enable = #{enable}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="spUse == 3">
|
|
|
|
|
AND basic_bussiness_type.spUse > 0
|
|
|
|
|
</if>
|
|
|
|
|
<if test="spUse != null and spUse != 3">
|
|
|
|
|
AND basic_bussiness_type.spUse = #{spUse}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="busType != null">
|
|
|
|
|
AND busType = #{busType}
|
|
|
|
|
<if test="code != ''and code != null">
|
|
|
|
|
AND auth_warehouse_bustype.code = #{code}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="invCode != ''and invCode != null">
|
|
|
|
|
AND auth_warehouse_bustype.code = #{code}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
group by basic_bussiness_type.action
|
|
|
|
|