zoujiajian 2 rokov pred
rodič
commit
a7b2c8ab93

+ 1 - 1
netflix-dao/src/main/java/com/cyksj/mapper/OrderDonMapper.java

@@ -48,5 +48,5 @@ public interface OrderDonMapper extends BaseMapper<OrderDon> {
 
 	Map<String, Object> getOrderDetailByGoodsType(@Param("type") Integer type, @Param("noOrderStatus") List<String> noOrderStatus, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
 
-	Map<String, Integer> selectYhShopDistributeOrderDetail(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
+	Map<String, Object> selectYhShopDistributeOrderDetail(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
 }

+ 2 - 2
netflix-dao/src/main/java/com/cyksj/mapper/shop/YhShopMapper.java

@@ -21,11 +21,11 @@ public interface YhShopMapper extends BaseMapper<YhShop> {
 
 	YhShopDistributeView getApplyDetailByUserId(Long userId);
 
-	Map<String, Integer> selectYhShopDetail(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
+	Map<String, Object> selectYhShopDetail(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
 
 	BigDecimal selectYhShopTakeMoney(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
 
-	Map<String, Integer> selectYhShopApplyMoney(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
+	Map<String, Object> selectYhShopApplyMoney(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
 
 	YhShopDistributeMoneyApply selectRelationBusiness(Long userId);
 }

+ 1 - 1
netflix-dao/src/main/java/com/cyksj/model/views/YhShopDistributeView.java

@@ -37,7 +37,7 @@ public class YhShopDistributeView {
 	@DbIgnore
 	private String nickname;
 
-	@DbField("count(yp.order_id)")
+	@DbField("count(od.id)")
 	private Integer orders;
 
 	@DbField("ys.custom_id")

+ 2 - 6
netflix-dao/src/main/resources/mapper/UserDistributeMapper.xml

@@ -4,12 +4,8 @@
 
     <select id="count" resultType="java.lang.Integer">
         select count(*)
-        from `user_distribute_shared` us
-                 inner join `order_don` od
-                            on od.user_id = us.user_id
-        where us.shared_id = #{userId}
-          and od.is_fixed_distribute is true
-          and od.status not in ('close', 'noPayment')
+        from distribute_waiting_send_points
+        where shared_id = #{userId}
     </select>
 
     <select id="countUserNum" resultType="java.lang.Integer">

+ 9 - 9
netflix-service/src/main/java/com/cyksj/service/mange/statistics/impl/StatisticsDataServiceImpl.java

@@ -337,24 +337,24 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
 	public void yhShopDistribute(BackgroundDataView backgroundDataView, Date startDate, Date endDate) {
 		//店铺数量
 		//注册用户
-		Map<String, Integer> yhShopDetail = yhShopMapper.selectYhShopDetail(startDate, endDate);
-		backgroundDataView.setNumOfYhShop(yhShopDetail.get("numOfYhShop"));
-		backgroundDataView.setNumOfYhShopRegisterUser(yhShopDetail.get("numOfRegisterYhShopUser"));
+		Map<String, Object> yhShopDetail = yhShopMapper.selectYhShopDetail(startDate, endDate);
+		backgroundDataView.setNumOfYhShop(Integer.parseInt(yhShopDetail.get("numOfYhShop").toString()));
+		backgroundDataView.setNumOfYhShopRegisterUser(Integer.parseInt(yhShopDetail.get("numOfRegisterYhShopUser").toString()));
 		//销售单数
 		//销售金额
-		Map<String, Integer> yhShopOrderDetail = orderDonMapper.selectYhShopDistributeOrderDetail(startDate, endDate);
-		backgroundDataView.setNumOfYhShopDsOrders(yhShopOrderDetail.get("numOfDsOrder"));
-		backgroundDataView.setYhShopAmount(BigDecimal.valueOf(yhShopOrderDetail.get("dsMoney")).divide(BigDecimal.valueOf(100)));
+		Map<String, Object> yhShopOrderDetail = orderDonMapper.selectYhShopDistributeOrderDetail(startDate, endDate);
+		backgroundDataView.setNumOfYhShopDsOrders(Integer.parseInt(yhShopOrderDetail.get("numOfDsOrder").toString()));
+		backgroundDataView.setYhShopAmount(BigDecimal.valueOf(Long.parseLong(yhShopOrderDetail.get("dsMoney").toString())).divide(BigDecimal.valueOf(100)));
 		//提成金额
 		BigDecimal yhShopTakeMoney = yhShopMapper.selectYhShopTakeMoney(startDate, endDate);
 		backgroundDataView.setYhShopTakeMoney(yhShopTakeMoney.divide(BigDecimal.valueOf(100)));
 
 
-		Map<String,Integer> yhShopApplyDetail = yhShopMapper.selectYhShopApplyMoney(startDate, endDate);
+		Map<String,Object> yhShopApplyDetail = yhShopMapper.selectYhShopApplyMoney(startDate, endDate);
 		//已提现
-		backgroundDataView.setDistributeGotMoney(BigDecimal.valueOf(yhShopApplyDetail.get("s")).divide(BigDecimal.valueOf(100)));
+		backgroundDataView.setDistributeGotMoney(BigDecimal.valueOf(Long.parseLong(yhShopApplyDetail.get("s").toString())).divide(BigDecimal.valueOf(100)));
 		//待审核
-		backgroundDataView.setDistributeVerifyingMoney(BigDecimal.valueOf(yhShopApplyDetail.get("vf")).divide(BigDecimal.valueOf(100)));
+		backgroundDataView.setDistributeVerifyingMoney(BigDecimal.valueOf(Long.parseLong(yhShopApplyDetail.get("vf").toString())).divide(BigDecimal.valueOf(100)));
 	}
 
 	public void exportAllTypeData(List<ExcelSheetAndData> excelSheetDataList, String startDate, String endDate) {

+ 1 - 0
netflix-service/src/main/java/com/cyksj/service/shop/impl/YhShopServiceImpl.java

@@ -82,6 +82,7 @@ public class YhShopServiceImpl implements YhShopFrontService {
 
 			YhShopApplyRecord yhShopApplyRecord = new YhShopApplyRecord();
 			yhShopApplyRecord.setName(name);
+			yhShopApplyRecord.setUserId(userId);
 			yhShopApplyRecord.setCustomId(customId);
 			yhShopApplyRecord.setVerifyStatus(YhShopApplyRecord.Status.verify);
 			yhShopApplyRecordMapper.insert(yhShopApplyRecord);