权限管理修改,接口优化
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?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.zf.foodpurchase.system.mapper.FoodProductMaterialMapper">
|
||||
|
||||
<select id="selectByFoodProductId" resultType="com.zf.foodpurchase.fdsafe.entity.FoodProductMaterial"
|
||||
parameterType="java.lang.Long">
|
||||
select id,food_product_id foodProductId,food_id foodId from food_product_material where food_product_id = #{foodProductId}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.zf.foodpurchase.fdsafe.entity.FoodProductMaterial" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into food_product_material(
|
||||
<if test="foodProductId != null">food_product_id,</if>
|
||||
<if test="foodId != null">food_id</if>
|
||||
)values(
|
||||
<if test="foodProductId != null">#{foodProductId},</if>
|
||||
<if test="foodId != null">#{foodId}</if>
|
||||
</insert>
|
||||
|
||||
<insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="true">
|
||||
INSERT INTO food_product_material (food_product_id, food_id)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.foodProductId}, #{item.foodId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
spec_id, spec_label, del_flag, create_time, update_time,status
|
||||
spec_id, spec_label, del_flag, create_time, update_time, dept_id
|
||||
</sql>
|
||||
<select id="queryFoodSpecVO" resultType="com.zf.foodpurchase.fdsafe.vo.FoodSpecVO"
|
||||
parameterType="com.zf.foodpurchase.fdsafe.vo.FoodSpecVO">
|
||||
@@ -21,8 +21,11 @@
|
||||
<if test="delFlag != null">
|
||||
and del_flag = #{delFlag}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
and dept_id in
|
||||
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
group by r.id,r.merchant_id,r.repo_num,r.repo_name,r.area_code,r.detail_address,r.default_repo,r.create_time,r.update_time,r.oper_id,r.manager,r.order_num,d.dept_name;
|
||||
group by r.id,r.merchant_id,r.repo_num,r.repo_name,r.area_code,r.detail_address,r.default_repo,r.create_time,r.update_time,r.oper_id,r.manager,r.order_num,d.dept_name order by r.order_num
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<select id="querySchoolOrderItemVO" resultType="com.zf.foodpurchase.fdsafe.vo.SchoolOrderItemVO"
|
||||
parameterType="com.zf.foodpurchase.fdsafe.vo.SchoolOrderItemVO">
|
||||
select soi.order_item_no, soi.order_no,soi.food_id, soi.school_id, soi.edu_id, soi.supplier_id, soi.food_product_id, soi.food_name, soi.price, soi.product_num, soi.type_id, soi.unit_id, soi.order_item_status, soi.create_time, soi.update_time, soi.order_item_remark,soi.refund_num,
|
||||
ft.type_label,fu.unit_label,fp.remark as food_product_remark,sup.supplier_name supplierName,fu.unit_label modelName
|
||||
ft.type_label,fu.unit_label,fp.remark as food_product_remark,sup.supplier_name supplierName,fu.unit_label modelName,fp.num
|
||||
from school_order_item soi
|
||||
left join supplier sup on soi.supplier_id=sup.supplier_id
|
||||
left join school_order so on soi.order_no = so.order_no
|
||||
|
||||
@@ -32,11 +32,17 @@
|
||||
<if test="orderStatus != null">
|
||||
and so.order_status = #{orderStatus}
|
||||
</if>
|
||||
<if test="operatorPerson != null and operatorPerson != ''">
|
||||
and so.operator_person = #{operatorPerson}
|
||||
</if>
|
||||
<if test="operatorPhone != null and operatorPhone != ''">
|
||||
and so.operator_phone = #{operatorPhone}
|
||||
</if>
|
||||
<if test="beginTime != null">
|
||||
AND date_format(so.create_time,'%Y%m%d') >= date_format(#{beginTime},'%Y%m%d')
|
||||
AND so.create_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and date_format(so.create_time,'%Y%m%d') <=date_format(#{endTime},'%Y%m%d')
|
||||
AND so.create_time <= #{endTime}
|
||||
</if>
|
||||
<if test = 'orderSettleStatus !=null'>
|
||||
and so.order_settle_status = #{orderSettleStatus}
|
||||
|
||||
@@ -38,7 +38,16 @@
|
||||
<if test="status!=null">
|
||||
and sp.status = #{status}
|
||||
</if>
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
and sp.supplier_id in
|
||||
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMaxId" resultType="java.lang.Integer">
|
||||
select max(supplier_id) id
|
||||
from supplier
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -101,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
insert into sys_dept(
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name,</if>
|
||||
<if test="ancestors != null and ancestors != ''">ancestors,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
@@ -117,6 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
)values(
|
||||
<if test="deptId != null and deptId != 0">#{deptId},</if>
|
||||
<if test="parentId != null and parentId != 0">#{parentId},</if>
|
||||
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
|
||||
<if test="deptName != null and deptName != ''">#{deptName},</if>
|
||||
<if test="ancestors != null and ancestors != ''">#{ancestors},</if>
|
||||
<if test="orderNum != null">#{orderNum},</if>
|
||||
@@ -137,6 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
update sys_dept
|
||||
<set>
|
||||
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
|
||||
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
|
||||
<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
@@ -183,6 +186,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
update sys_dept
|
||||
<set>
|
||||
<if test="dept.parentId != null and dept.parentId != 0">parent_id = #{dept.parentId},</if>
|
||||
<if test="dept.tenantId != null and dept.tenantId != ''">tenant_id = #{dept.tenantId},</if>
|
||||
<if test="dept.deptName != null and dept.deptName != ''">dept_name = #{dept.deptName},</if>
|
||||
<if test="dept.ancestors != null and dept.ancestors != ''">ancestors = #{dept.ancestors},</if>
|
||||
<if test="dept.orderNum != null">order_num = #{dept.orderNum},</if>
|
||||
@@ -231,4 +235,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaxId" resultType="java.lang.Long">
|
||||
select max(dept_id) id
|
||||
from sys_dept
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user