huanghongfa
2022-04-19 d89d4a28653657528dc0718f1aa55e1c84ad1e6f
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComBatteryCommodityActivityMapper.xml
@@ -46,6 +46,7 @@
        cbca.update_at,
        cbca.update_by,
        cbca.specs_id,
        cbca.commodity_sale_num,
        cbcs.`name` as specsName,
        cbc.`name` as commodityName,
        cbc.`code` as commodityCode,
@@ -79,6 +80,7 @@
        cbca.update_at,
        cbca.update_by,
        cbca.specs_id,
        cbca.commodity_sale_num,
        cbcs.`name` as specsName,
        cbc.`name` as commodityName,
        cbc.`code` as commodityCode,
@@ -88,6 +90,9 @@
        left join com_battery_commodity as cbc on cbc.id = cbca.commodity_id
        left join com_battery_store as cbs on cbs.id = cbca.store_id
        left join com_battery_commodity_specs as cbcs on cbcs.id = cbca.specs_id
        <if test="dto.userId != null">
            left join com_battery_commodity_order as cbco on cbco.activity_id = cbca.id
        </if>
        <where>
            and cbca.is_del = 2
            <if test="dto.id != null">
@@ -95,6 +100,9 @@
            </if>
            <if test="dto.type != null">
                and cbca.type = #{dto.type}
            </if>
            <if test="dto.userId != null">
                and cbco.user_id = #{dto.userId} and cbco.pay_status = 2 and cbco.is_del = 2
            </if>
            <if test="dto.commodityId != null">
                and cbca.commodity_id = #{dto.commodityId}
@@ -104,6 +112,9 @@
            </if>
            <if test="dto.status != null">
                and cbca.status = #{dto.status}
            </if>
            <if test="dto.isApplets != null and dto.isApplets == 1">
                and cbca.status in (1,3)
            </if>
            <if test="dto.keyWord != null and dto.keyWord != ''">
                and (
@@ -137,6 +148,7 @@
        cbca.update_at,
        cbca.update_by,
        cbca.specs_id,
        cbca.commodity_sale_num,
        cbcs.`name` as specsName,
        cbc.`name` as commodityName,
        cbc.`code` as commodityCode,
@@ -146,10 +158,16 @@
        left join com_battery_commodity as cbc on cbc.id = cbca.commodity_id
        left join com_battery_store as cbs on cbs.id = cbca.store_id
        left join com_battery_commodity_specs as cbcs on cbcs.id = cbca.specs_id
        <if test="dto.userId != null">
            left join com_battery_commodity_order as cbco on cbco.activity_id = cbca.id
        </if>
        <where>
            and cbca.is_del = 2
            <if test="dto.id != null">
                and cbca.id = #{dto.id}
            </if>
            <if test="dto.userId != null">
                and cbco.user_id = #{dto.userId} and cbco.pay_status = 2 and cbco.is_del = 2
            </if>
            <if test="dto.type != null">
                and cbca.type = #{dto.type}
@@ -163,6 +181,9 @@
            <if test="dto.status != null">
                and cbca.status = #{dto.status}
            </if>
            <if test="dto.isApplets != null and dto.isApplets == 1">
                and cbca.status in (1,3)
            </if>
            <if test="dto.keyWord != null and dto.keyWord != ''">
                and (
                    cbca.`name` like concat ('%',#{statisticsAdminDTO.keyWord},'%') or