Commit 08968a8b authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/base-modify' into base-modify

parents c2bdac60 d6bfcc28
......@@ -145,7 +145,11 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
sellingWater.setGoodNumber(goodsDto.getGoodNumber());
sellingWater.setCommission(commission);
insertSelective(sellingWater);
log.info("购买计算用户拥成功----payOrderWater--------userId===" + userId);
log.info("购买计算用户拥成功----payOrderWater--------userId===" + userId+"----type===="+type);
if(type!=null&&type==3){
finishOrderWater(orderWaterDTO);
}
}
}
}
......
......@@ -78,6 +78,9 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
BigDecimal totalConsumpution = userIdAndTotalConsumptionMap==null?new BigDecimal(0):userIdAndTotalConsumptionMap.get(wallet.getUserId())==null?new BigDecimal(0):userIdAndTotalConsumptionMap.get(wallet.getUserId());
BigDecimal withDrawaling = userIdAndWithdrawalingMap==null?new BigDecimal(0):userIdAndWithdrawalingMap.get(wallet.getUserId())==null?new BigDecimal(0):userIdAndWithdrawalingMap.get(wallet.getUserId());
walletpg.setWithdrawaling(withDrawaling);
walletpg.setWithdrawals(walletpg.getWithdrawals()==null?new BigDecimal(0):walletpg.getWithdrawals());
walletpg.setUnbooked(walletpg.getUnbooked()==null?new BigDecimal(0):walletpg.getUnbooked());
walletpg.setTotalAmount(walletpg.getTodayAmount()==null?walletpg.getUnbooked():walletpg.getTotalAmount().add(walletpg.getUnbooked()));
walletpg.setTotalConsumption(totalConsumpution);
walletPageVos.add(walletpg);
}
......
......@@ -199,6 +199,7 @@ public class AppPermissionService {
userRedisTemplate.expire(redisLockKey, 5, TimeUnit.MINUTES);//5分钟内过期
}
} catch (Exception e) {
e.printStackTrace();
return JsonResultUtil.createFailedResult(ResultCode.EXCEPTION_CODE, "出现异常");
}
return JsonResultUtil.createSuccessResultWithObj(result);
......
......@@ -4,20 +4,26 @@
<select id="accquireIncomeByMemberIds" resultType="com.github.wxiaoqi.security.admin.bo.UserIncomeBo">
SELECT DISTINCT
`source_id`as userId,
(( SELECT SUM(commission) FROM `app_user_selling_water` WHERE source_id=ausw.source_id AND `status` = 0 AND `waiting` = 1 )
- ( SELECT SUM(commission) FROM `app_user_selling_water` WHERE source_id=ausw.source_id AND `status` = 1 AND `waiting` = 1 )) as `income`
FROM
`app_user_selling_water` as ausw
WHERE
source_id in
<foreach collection="memberIds" item="memberId" open="(" close=")" separator=",">
#{memberId}
</foreach>
SELECT DISTINCT
`source_id`as userId,
(( SELECT SUM(commission) FROM `app_user_selling_water` WHERE source_id=ausw.source_id AND `status` = 0 AND
`waiting` = 1 )
- ( SELECT SUM(commission) FROM `app_user_selling_water` WHERE source_id=ausw.source_id AND `status` = 1 AND
`waiting` = 1 )) as `income`
FROM
`app_user_selling_water` as ausw
WHERE
source_id in
<foreach collection="memberIds" item="memberId" open="(" close=")" separator=",">
#{memberId}
</foreach>
</select>
<select id="selectTotalIncomeByUserId" resultType="java.math.BigDecimal">
SELECT SUM(commission) FROM app_user_selling_water WHERE `user_id`=#{userId}
SELECT
( auswu.upIncome - auswd.dowIncome ) AS `income`
FROM
( SELECT SUM( commission ) AS upIncome FROM `app_user_selling_water` WHERE STATUS = 0 AND `user_id` = #{userId} ) AS `auswu`,
( SELECT SUM( commission ) AS `dowIncome` FROM `app_user_selling_water` WHERE STATUS = 1 AND `user_id` = #{userId} ) AS `auswd`;
</select>
</mapper>
\ No newline at end of file
......@@ -77,6 +77,7 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
log.error("-----参数为空-----------");
return JsonResultUtil.createFailedResult(ResultCode.NULL_CODE, "参数为空");
}
log.error("-----payAmoun======="+payAmount+"------refundAmount======"+refundAmount);
Example example =new Example(OrderPay.class);
example.createCriteria().andEqualTo("orderNo", order_no).andEqualTo("isDel",0).andEqualTo("status",1);
List<OrderPay> list=payBiz.selectByExample(example);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment