|
@@ -1,17 +1,18 @@
|
|
|
package com.chelvc.cloud.maintain.controller;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-import javax.validation.Valid;
|
|
|
-import javax.validation.constraints.Min;
|
|
|
-
|
|
|
import com.chelvc.cloud.maintain.copier.MerchantCopier;
|
|
|
import com.chelvc.cloud.maintain.vo.MerchantDetailVO;
|
|
|
import com.chelvc.cloud.maintain.vo.SimpleMerchantVO;
|
|
|
+import com.chelvc.cloud.vehicle.api.dto.MerchantBalanceDetailDTO;
|
|
|
import com.chelvc.cloud.vehicle.api.param.LocationQueryParam;
|
|
|
import com.chelvc.cloud.vehicle.api.param.MerchantQueryParam;
|
|
|
+import com.chelvc.cloud.vehicle.api.param.QueryMerchantBalanceParam;
|
|
|
import com.chelvc.cloud.vehicle.api.service.FavoriteService;
|
|
|
+import com.chelvc.cloud.vehicle.api.service.MerchantBalanceDetailService;
|
|
|
import com.chelvc.cloud.vehicle.api.service.MerchantService;
|
|
|
import com.chelvc.framework.base.annotation.ResponseWrapping;
|
|
|
+import com.chelvc.framework.base.context.SessionContextHolder;
|
|
|
+import com.chelvc.framework.common.model.Pagination;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -19,6 +20,10 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import javax.validation.Valid;
|
|
|
+import javax.validation.constraints.Min;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* 商家接口
|
|
|
*
|
|
@@ -35,6 +40,9 @@ public class MerchantController {
|
|
|
@DubboReference
|
|
|
private FavoriteService favoriteService;
|
|
|
|
|
|
+ @DubboReference
|
|
|
+ private MerchantBalanceDetailService merchantBalanceDetailService;
|
|
|
+
|
|
|
/**
|
|
|
* 获取商家列表
|
|
|
*
|
|
@@ -69,4 +77,23 @@ public class MerchantController {
|
|
|
public Long addMerchantFavorite(@PathVariable("id") @Min(value = 1, message = "商家ID不能小于1") Long id) {
|
|
|
return this.favoriteService.addMerchantFavorite(id);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询商家余额明细
|
|
|
+ *
|
|
|
+ * @param param 查询条件
|
|
|
+ * @param pageNum
|
|
|
+ * @param pageSize
|
|
|
+ * @return 收藏ID
|
|
|
+ */
|
|
|
+ @GetMapping("/merchant/balance/detail")
|
|
|
+ public Pagination<MerchantBalanceDetailDTO> queryBalanceDetail(@Validated QueryMerchantBalanceParam param, Integer pageNum, Integer pageSize) {
|
|
|
+ if (pageNum == null) {
|
|
|
+ pageNum = 1;
|
|
|
+ }
|
|
|
+ if (pageSize == null) {
|
|
|
+ pageSize = 20;
|
|
|
+ }
|
|
|
+ return this.merchantBalanceDetailService.queryByUserId(param, pageNum, pageSize, SessionContextHolder.getId());
|
|
|
+ }
|
|
|
}
|