提交代码

dev-discount
胡锐 3 years ago
parent e3f0131316
commit 1e9806066b
  1. 30
      hai-service/src/main/java/com/hai/dao/HighMerchantAccountMapperExt.java
  2. 2
      hai-service/src/main/java/com/hai/service/impl/HighOilCardRecordServiceImpl.java

@ -14,23 +14,25 @@ public interface HighMerchantAccountMapperExt {
@Select({"select " +
"case when sum(total_price) is not null then sum(total_price) ELSE 0 end " +
"from high_child_order " +
"where goods_type = 3 " +
"and goods_id in (SELECT id from high_merchant_store where merchant_id = #{merId})" +
"and child_orde_status in (2,3)"})
" case when sum(b.total_price) is not null then sum(b.total_price) ELSE 0 end " +
" from high_child_order a, high_order b" +
" where goods_type = 3 " +
" and a.order_id = b.id" +
" and goods_id in (SELECT id from high_merchant_store where merchant_id = #{merId}) " +
" and b.order_status in (2,3,6,7)"})
BigDecimal countMerGasOilAmount(@Param("merId") Long merId);
@Select({
" SELECT a.id, a.store_name, a.address," +
" (select " +
" case when sum(total_price) is not null then sum(total_price) else 0 end " +
" from high_child_order " +
" where goods_type = 3 " +
" and goods_id = a.id" +
" and child_orde_status in (2,3)) countPrice" +
" from high_merchant_store a where a.merchant_id = #{merId}" +
" ORDER BY countPrice desc"
" SELECT ms.id, ms.store_name, ms.address," +
" (select " +
" case when sum(b.total_price) is not null then sum(b.total_price) else 0 end" +
" from high_child_order a, high_order b" +
" where a.order_id = b.id" +
" and goods_type = 3" +
" and goods_id = ms.id" +
" and b.order_status in (2,3,6,7)) countPrice" +
" from high_merchant_store ms where ms.merchant_id = #{merId}" +
" ORDER BY countPrice desc"
})
List<Map<String, Object>> selectStoreGasOilAmountByMer(@Param("merId") Long merId);
}

@ -36,7 +36,7 @@ public class HighOilCardRecordServiceImpl implements HighOilCardRecordService {
oilCardRecord.setOpUserName(userInfoModel.getSecUser().getUserName());
}
HighUserModel userModel = userCenter.getSessionModel(HighUserModel.class);
if (userModel == null) {
if (userModel != null) {
oilCardRecord.setOpUserId(userModel.getHighUser().getId());
oilCardRecord.setOpUserName(userModel.getHighUser().getName());
}

Loading…
Cancel
Save