| | |
| | | |
| | | </if> |
| | | <if test="!itemto.flag"> |
| | | or ( is_del = 0 and enabled=1) <include refid="where_condition"></include> |
| | | or ( DE.is_del = 0 and DE.enabled=1) <include refid="where_condition"></include> |
| | | </if> |
| | | </when> |
| | | <when test="inx==2"> |
| | |
| | | AND |
| | | <foreach item="itemtoto" collection="itemto.object" separator="or" open="(" close=")" |
| | | index=""> |
| | | create_user_org_code = #{itemtoto.orgCode} |
| | | DE.create_user_org_code = #{itemtoto.orgCode} |
| | | </foreach> |
| | | </if> |
| | | <if test="!itemto.flag"> |
| | | or ( |
| | | <foreach item="itemtoto" collection="itemto.object" separator="or" open="(" close=")" |
| | | index=""> |
| | | create_user_org_code = #{itemtoto.orgCode} |
| | | DE.create_user_org_code = #{itemtoto.orgCode} |
| | | </foreach> |
| | | and is_del = 0 and enabled=1 <include refid="where_condition"></include> |
| | | and DE.is_del = 0 and DE.enabled=1 <include refid="where_condition"></include> |
| | | ) |
| | | </if> |
| | | </when> |
| | | <when test="inx == 3"> |
| | | <if test="itemto.flag"> |
| | | AND |
| | | create_user_org_code = #{itemto.object} |
| | | DE.create_user_org_code = #{itemto.object} |
| | | </if> |
| | | <if test="!itemto.flag"> |
| | | or (create_user_org_code = #{itemto.object} and is_del = 0 and enabled=1) <include refid="where_condition"></include> |
| | | or (DE.create_user_org_code = #{itemto.object} and DE.is_del = 0 and DE.enabled=1) <include refid="where_condition"></include> |
| | | </if> |
| | | </when> |
| | | <when test="inx == 4"> |
| | | <if test="itemto.flag"> |
| | | AND |
| | | create_user_org_code like '${itemto.object}%' |
| | | DE.create_user_org_code like '${itemto.object}%' |
| | | </if> |
| | | <if test="!itemto.flag"> |
| | | or (create_user_org_code like '${itemto.object}%' and is_del = 0 and enabled=1) <include refid="where_condition"></include> |
| | | or (DE.create_user_org_code like '${itemto.object}%' and DE.is_del = 0 and DE.enabled=1) <include refid="where_condition"></include> |
| | | </if> |
| | | </when> |
| | | <when test="inx == 5"> |
| | | <if test="itemto.flag"> |
| | | AND |
| | | create_user_id = #{itemto.object} |
| | | DE.create_user_id = #{itemto.object} |
| | | </if> |
| | | <if test="!itemto.flag"> |
| | | or (create_user_id = #{itemto.object} and is_del = 0 and enabled=1) <include refid="where_condition"></include> |
| | | or (DE.create_user_id = #{itemto.object} and DE.is_del = 0 and DE.enabled=1) <include refid="where_condition"></include> |
| | | </if> |
| | | </when> |
| | | <otherwise> |
| | | AND id is null |
| | | AND DE.id is null |
| | | </otherwise> |
| | | </choose> |
| | | </foreach> |
| | |
| | | FROM |
| | | product_order_record DE |
| | | LEFT JOIN product_order PRO ON DE.order_id = PRO.id |
| | | <include refid="wherelimit"/> |
| | | <where> |
| | | <include refid="where_condition"/> |
| | | </where> |
| | | |
| | | order by DE.id desc |
| | | </select> |
| | | <select id="groupProductDetail" resultType="com.kidgrow.oprationcenter.vo.GroupProductDetail"> |