Bläddra i källkod

供应链数据修改

yumeng 2 år sedan
förälder
incheckning
135393c1c4

+ 3 - 3
ruixuan-live/src/main/java/com/ruixuan/isc/controller/SupplyChainController.java

@@ -39,7 +39,7 @@ public class SupplyChainController extends BaseController {
     public TableDataInfo orderList(@ApiParam("订单开始时间") @RequestParam(value = "orderStartDate", required = false) String orderStartDate,
                                    @ApiParam("订单结束时间") @RequestParam(value = "orderEndDate", required = false) String orderEndDate,
                                    @ApiParam("达人名称") @RequestParam(value = "promoterNickName", required = false) String promoterNickName,
-                                   @ApiParam("达人ID") @RequestParam(value = "promoterId", required = false) String promoterId) {
+                                   @ApiParam("达人ID") @RequestParam(value = "promoterId", required = false) Long promoterId) {
 
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(orderStartDate)) {
@@ -212,8 +212,8 @@ public class SupplyChainController extends BaseController {
             @ApiParam("商品ID") @RequestParam(value = "itemId", required = false) String itemId,
             @ApiParam("订单开始时间") @RequestParam(value = "orderStartDate", required = false) String orderStartDate,
             @ApiParam("订单结束时间") @RequestParam(value = "orderEndDate", required = false) String orderEndDate,
-            @ApiParam("达人Id") @RequestParam(value = "itemId", required = false) String promoterId,
-            @ApiParam("商品名称") @RequestParam(value = "promoterNickName", required = false) String promoterNickName) {
+            @ApiParam("达人Id") @RequestParam(value = "promoterId", required = false) String promoterId,
+            @ApiParam("达人名称") @RequestParam(value = "promoterNickName", required = false) String promoterNickName) {
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(orderStartDate)) {
             Long start = DateUtils.getStartLongTime(orderStartDate);

+ 1 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/SupplyChainServiceImpl.java

@@ -50,7 +50,7 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
         if(!Check.isNull(list)){
             for (int i = 0; i < list.size(); i++) {
                 JSONObject jsonObject = list.get(i);
-                Long itemId = jsonObject.getLong("promoterId");
+                Long itemId = jsonObject.getLong("itemId");
                 requestMap.put("itemId", itemId);
                 List<JSONObject> topAnchors = supplyChainMapper.getTopAnchors(requestMap);
                 jsonObject.put("topAnchors", topAnchors);

+ 4 - 4
ruixuan-live/src/main/resources/mapper/isc/SupplyChainMapper.xml

@@ -178,8 +178,8 @@
         sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
         sum(case when order_status = 80 then 1 else 0 end) as 'invalidOrderNUm',
         regimental_promotion_rate as 'regimentalPromotionRate',
-        sum(case when order_status != 80 pay_amount then 1 else 0 end) as 'payAmount',
-        sum(case when order_status != 80 then regimental_promotion_amount else 0 end) as 'regimentalPromotionAmount',
+        sum(case when order_status != 80 then pay_amount  else 0 end) as 'payAmount',
+        sum(case when order_status != 80 then regimental_promotion_amount else 0 end) as 'regimentalPromotionAmount'
         from kuaishou_supply_chain
         where 1= 1
         <if test="start != null and start != ''">
@@ -238,8 +238,8 @@
     </select>
     <select id="getAmountTotal" resultType="com.alibaba.fastjson.JSONObject">
         select
-        base_amount as 'baseAmount',
-        pay_amount as 'payAmount'
+        sum(base_amount) as 'baseAmount',
+        sum(pay_amount) as 'payAmount'
         from kuaishou_supply_chain
         where 1= 1
         <if test="start != null and start != ''">