This commit is contained in:
jishenghua
2024-04-02 14:29:38 +08:00
9 changed files with 46 additions and 53 deletions

View File

@@ -610,16 +610,16 @@
FROM jsh_material m
left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
left join jsh_material_current_stock mcs on m.id = mcs.material_id and ifnull(mcs.delete_flag,'0') !='1'
left JOIN jsh_unit u on m.unit_id = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_material_category mc on m.category_id = mc.id and ifnull(mc.delete_Flag,'0') !='1'
where 1=1
and me.default_flag=1
<if test="depotList.size()>0">
and mcs.depot_id in
<foreach collection="depotList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
left JOIN jsh_unit u on m.unit_id = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_material_category mc on m.category_id = mc.id and ifnull(mc.delete_Flag,'0') !='1'
where 1=1
and me.default_flag=1
<if test="idList.size()>0">
and m.category_id in
<foreach collection="idList" item="item" index="index" separator="," open="(" close=")">
@@ -655,16 +655,16 @@
(select m.id, ifnull(sum(mcs.current_number),0) currentStock from jsh_material m
left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
left join jsh_material_current_stock mcs on m.id = mcs.material_id and ifnull(mcs.delete_flag,'0') !='1'
left JOIN jsh_unit u on m.unit_id = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_material_category mc on m.category_id = mc.id and ifnull(mc.delete_Flag,'0') !='1'
where 1=1
and me.default_flag=1
<if test="depotList.size()>0">
and mcs.depot_id in
<foreach collection="depotList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
left JOIN jsh_unit u on m.unit_id = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_material_category mc on m.category_id = mc.id and ifnull(mc.delete_Flag,'0') !='1'
where 1=1
and me.default_flag=1
<if test="idList.size()>0">
and m.category_id in
<foreach collection="idList" item="item" index="index" separator="," open="(" close=")">

View File

@@ -153,8 +153,7 @@
</select>
<update id="updateUserWithWeixinOpenId">
update jsh_user u set u.weixin_open_id = #{weixinOpenId}
where u.login_name = #{loginName} and u.password = #{password}
and ifnull(u.status,'0') not in('1','2')
update jsh_user u set u.weixin_open_id = null where u.weixin_open_id = #{weixinOpenId};
update jsh_user u set u.weixin_open_id = #{weixinOpenId} where u.login_name = #{loginName} and u.password = #{password} and ifnull(u.status,'0') not in('1','2');
</update>
</mapper>