| | |
| | | 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, |
| | |
| | | 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, |
| | |
| | | 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"> |
| | |
| | | </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} |
| | |
| | | </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 ( |
| | |
| | | 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, |
| | |
| | | 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} |
| | |
| | | <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 |