java110
2020-06-07 a8c5ab7f20c29589d06bfcda09929d3294d4e4cf
java110-db/src/main/resources/mapper/center/CenterServiceDAOImplMapper.xml
@@ -203,7 +203,7 @@
                    select cb.b_id bId,co.o_id oId,cb.business_type_cd businessTypeCd  from c_orders co,c_business cb where co.o_id = cb.o_id
                    and cb.business_type_cd in ('110100030001','110100040001','110100050001','111100030001','111100050001')
                    and cb.status_cd <> 'C1'
                    and cb.status_cd = 'C'
        ]]>
    </select>
@@ -213,7 +213,7 @@
                select cb.b_id bId,co.o_id oId,cb.business_type_cd businessTypeCd  from c_orders co,c_business cb where co.o_id = cb.o_id
                and cb.business_type_cd in ('200200030001','200200040001','200200050001')
                and cb.status_cd <> 'C1'
                and cb.status_cd = 'C'
        ]]>
    </select>
@@ -224,12 +224,25 @@
                select cb.b_id bId,co.o_id oId,cb.business_type_cd businessTypeCd  from c_orders co,c_business cb where co.o_id = cb.o_id
                and cb.business_type_cd in ('240200040001','240200050001')
                and cb.status_cd <> 'C1'
                and cb.status_cd = 'C'
        ]]>
    </select>
    <update id="updateBusinessStatusCd" parameterType="Map" >
    <select id="queryOrderByBusinessType" parameterType="map" resultType="map">
        select cb.b_id bId,co.o_id oId,cb.business_type_cd businessTypeCd
        from c_orders co,c_business cb
        where co.o_id = cb.o_id
        and cb.status_cd = 'C'
        <if test="businessTypeCds !=null">
            and cb.business_type_cd in
            <foreach collection="businessTypeCds" item="item" index="index" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
    </select>
    <update id="updateBusinessStatusCd" parameterType="Map">
        update c_business cb set cb.status_cd = 'C1'
        where cb.b_id = #{bId}
    </update>
@@ -238,30 +251,30 @@
    <!-- querySameOrderBusiness 查询同订单 订单项 -->
    <select id="querySameOrderBusiness" parameterType="map" resultType="map">
                SELECT
                    cb1.b_id bId,
                    cb1.o_id oId,
                    cb1.create_time createTime,
                    cb1.business_type_cd businessTypeCd,
                    cb1.finish_time finishTime,
                    cb1.status_cd statusCd
                FROM
                    c_business cb1
                    <if test="bId != null and bId != ''">
                        ,c_business cb2
                    </if>
                WHERE
                    1=1
                    <if test="bId != null and bId != ''">
                        and cb1.o_id = cb2.o_id
                        AND cb2.b_id = #{bId}
                    </if>
                    <if test="oId != null and oId != ''">
                        and cb1.o_id = #{oId}
                    </if>
                    <if test="businessTypeCd != null and businessTypeCd != ''">
                        and cb1.business_type_cd = #{businessTypeCd}
                    </if>
        SELECT
        cb1.b_id bId,
        cb1.o_id oId,
        cb1.create_time createTime,
        cb1.business_type_cd businessTypeCd,
        cb1.finish_time finishTime,
        cb1.status_cd statusCd
        FROM
        c_business cb1
        <if test="bId != null and bId != ''">
            ,c_business cb2
        </if>
        WHERE
        1=1
        <if test="bId != null and bId != ''">
            and cb1.o_id = cb2.o_id
            AND cb2.b_id = #{bId}
        </if>
        <if test="oId != null and oId != ''">
            and cb1.o_id = #{oId}
        </if>
        <if test="businessTypeCd != null and businessTypeCd != ''">
            and cb1.business_type_cd = #{businessTypeCd}
        </if>
    </select>