| | |
| | | void supportsMerchantAppLoginForHotelMerchants() { |
| | | assertThat(service.supportsMerchantAppLogin("酒店服务")).isTrue(); |
| | | } |
| | | |
| | | @Test |
| | | void productSalesCountComesFromValidOrders() { |
| | | // 商品表上的 sales_count 只有部分流程会累加,销量必须按有效订单算,否则后台列表一直是空的。 |
| | | String salesSelect = service.salesCountSelect("r.product_id", "p"); |
| | | |
| | | assertThat(salesSelect) |
| | | .contains("greatest") |
| | | .contains("from benefit_order bo") |
| | | .contains("bo.product_id = r.product_id") |
| | | .contains("bo.order_status = 1") |
| | | .contains("bo.refund_status is null or bo.refund_status = 0") |
| | | .endsWith("as sales_count"); |
| | | } |
| | | } |