经纪人,分销员
This commit is contained in:
parent
4d06724254
commit
b2b56c6a7f
|
@ -4618,7 +4618,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
orders.setOneArtificerUserId(oneArtificerUser.getUserId());
|
orders.setOneArtificerUserId(oneArtificerUser.getUserId());
|
||||||
orders.setOneArtificerUserName(oneArtificerUser.getUserName());
|
orders.setOneArtificerUserName(oneArtificerUser.getUserName());
|
||||||
oneArtificerMoney = artificerPrice.multiply(oneArtificerUser.getShopRate());
|
oneArtificerMoney = artificerPrice.multiply(oneArtificerUser.getShopRate());
|
||||||
oneArtificerMoney = oneArtificerMoney.setScale(0, BigDecimal.ROUND_UP);
|
oneArtificerMoney = oneArtificerMoney.setScale(0, BigDecimal.ROUND_HALF_UP);
|
||||||
}
|
}
|
||||||
orders.setOneArtificerMoney(oneArtificerMoney);
|
orders.setOneArtificerMoney(oneArtificerMoney);
|
||||||
BigDecimal shopMoney = BigDecimal.ZERO;
|
BigDecimal shopMoney = BigDecimal.ZERO;
|
||||||
|
@ -4631,13 +4631,24 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
orders.setShopUserId(consortiaUser.getUserId());
|
orders.setShopUserId(consortiaUser.getUserId());
|
||||||
orders.setShopUserName(consortiaUser.getUserName());
|
orders.setShopUserName(consortiaUser.getUserName());
|
||||||
shopMoney = artificerPrice.multiply(consortia.getRate());
|
shopMoney = artificerPrice.multiply(consortia.getRate());
|
||||||
shopMoney = shopMoney.setScale(0, BigDecimal.ROUND_UP);
|
shopMoney = shopMoney.setScale(0, BigDecimal.ROUND_HALF_UP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
orders.setShopMoney(shopMoney);
|
orders.setShopMoney(shopMoney);
|
||||||
|
UserEntity user = userService.selectUserById(orders.getUserId());
|
||||||
|
UserEntity oneUser = userService.queryByInvitationCode(user.getInviterCode());
|
||||||
|
BigDecimal oneUserMoney = BigDecimal.ZERO;
|
||||||
|
if (oneUser != null && oneUser.getIsAgency() != null && oneUser.getIsAgency() == 1) {
|
||||||
|
orders.setOneUserId(oneUser.getUserId());
|
||||||
|
orders.setOneUserName(oneUser.getUserName());
|
||||||
|
oneUserMoney = artificerPrice.multiply(oneUser.getUserRate());
|
||||||
|
oneUserMoney = oneUserMoney.setScale(0, BigDecimal.ROUND_HALF_UP);
|
||||||
|
}
|
||||||
|
orders.setOneUserMoney(oneUserMoney);
|
||||||
artificerPrice = artificerPrice.subtract(oneArtificerMoney);
|
artificerPrice = artificerPrice.subtract(oneArtificerMoney);
|
||||||
artificerPrice = artificerPrice.subtract(shopMoney);
|
artificerPrice = artificerPrice.subtract(shopMoney);
|
||||||
|
artificerPrice = artificerPrice.subtract(oneUserMoney);
|
||||||
|
|
||||||
if(orders.getIsSupplement()!=null && orders.getIsSupplement().equals(2)){
|
if(orders.getIsSupplement()!=null && orders.getIsSupplement().equals(2)){
|
||||||
}else{
|
}else{
|
||||||
|
@ -4652,17 +4663,6 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
pingMoney = pingMoney.subtract(artificerPrice);
|
pingMoney = pingMoney.subtract(artificerPrice);
|
||||||
pingMoney = pingMoney.subtract(shopMoney);
|
pingMoney = pingMoney.subtract(shopMoney);
|
||||||
pingMoney = pingMoney.subtract(oneArtificerMoney);
|
pingMoney = pingMoney.subtract(oneArtificerMoney);
|
||||||
|
|
||||||
UserEntity user = userService.selectUserById(orders.getUserId());
|
|
||||||
UserEntity oneUser = userService.queryByInvitationCode(user.getInviterCode());
|
|
||||||
BigDecimal oneUserMoney = BigDecimal.ZERO;
|
|
||||||
if (oneUser != null && oneUser.getIsAgency() != null && oneUser.getIsAgency() == 1) {
|
|
||||||
orders.setOneUserId(oneUser.getUserId());
|
|
||||||
orders.setOneUserName(oneUser.getUserName());
|
|
||||||
oneUserMoney = pingMoney.multiply(oneUser.getUserRate());
|
|
||||||
oneUserMoney = oneUserMoney.setScale(0, BigDecimal.ROUND_UP);
|
|
||||||
}
|
|
||||||
orders.setOneUserMoney(oneUserMoney);
|
|
||||||
pingMoney = pingMoney.subtract(oneUserMoney);
|
pingMoney = pingMoney.subtract(oneUserMoney);
|
||||||
orders.setPingMoney(pingMoney);
|
orders.setPingMoney(pingMoney);
|
||||||
|
|
||||||
|
@ -5004,7 +5004,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
orders.setOneArtificerUserId(oneArtificerUser.getUserId());
|
orders.setOneArtificerUserId(oneArtificerUser.getUserId());
|
||||||
orders.setOneArtificerUserName(oneArtificerUser.getUserName());
|
orders.setOneArtificerUserName(oneArtificerUser.getUserName());
|
||||||
oneArtificerMoney = artificerPrice.multiply(oneArtificerUser.getShopRate());
|
oneArtificerMoney = artificerPrice.multiply(oneArtificerUser.getShopRate());
|
||||||
oneArtificerMoney = oneArtificerMoney.setScale(0, BigDecimal.ROUND_UP);
|
oneArtificerMoney = oneArtificerMoney.setScale(0, BigDecimal.ROUND_HALF_UP);
|
||||||
}
|
}
|
||||||
orders.setOneArtificerMoney(oneArtificerMoney);
|
orders.setOneArtificerMoney(oneArtificerMoney);
|
||||||
BigDecimal shopMoney = BigDecimal.ZERO;
|
BigDecimal shopMoney = BigDecimal.ZERO;
|
||||||
|
@ -5017,13 +5017,24 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
orders.setShopUserId(consortiaUser.getUserId());
|
orders.setShopUserId(consortiaUser.getUserId());
|
||||||
orders.setShopUserName(consortiaUser.getUserName());
|
orders.setShopUserName(consortiaUser.getUserName());
|
||||||
shopMoney = artificerPrice.multiply(consortia.getRate());
|
shopMoney = artificerPrice.multiply(consortia.getRate());
|
||||||
shopMoney = shopMoney.setScale(0, BigDecimal.ROUND_UP);
|
shopMoney = shopMoney.setScale(0, BigDecimal.ROUND_HALF_UP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
orders.setShopMoney(shopMoney);
|
orders.setShopMoney(shopMoney);
|
||||||
|
UserEntity user = userService.selectUserById(orders.getUserId());
|
||||||
|
UserEntity oneUser = userService.queryByInvitationCode(user.getInviterCode());
|
||||||
|
BigDecimal oneUserMoney = BigDecimal.ZERO;
|
||||||
|
if (oneUser != null && oneUser.getIsAgency() != null && oneUser.getIsAgency() == 1) {
|
||||||
|
orders.setOneUserId(oneUser.getUserId());
|
||||||
|
orders.setOneUserName(oneUser.getUserName());
|
||||||
|
oneUserMoney = artificerPrice.multiply(oneUser.getUserRate());
|
||||||
|
oneUserMoney = oneUserMoney.setScale(0, BigDecimal.ROUND_HALF_UP);
|
||||||
|
}
|
||||||
|
orders.setOneUserMoney(oneUserMoney);
|
||||||
artificerPrice = artificerPrice.subtract(oneArtificerMoney);
|
artificerPrice = artificerPrice.subtract(oneArtificerMoney);
|
||||||
artificerPrice = artificerPrice.subtract(shopMoney);
|
artificerPrice = artificerPrice.subtract(shopMoney);
|
||||||
|
artificerPrice = artificerPrice.subtract(oneUserMoney);
|
||||||
|
|
||||||
if(orders.getIsSupplement()!=null && orders.getIsSupplement().equals(2)){
|
if(orders.getIsSupplement()!=null && orders.getIsSupplement().equals(2)){
|
||||||
}else{
|
}else{
|
||||||
|
@ -5038,17 +5049,6 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
pingMoney = pingMoney.subtract(artificerPrice);
|
pingMoney = pingMoney.subtract(artificerPrice);
|
||||||
pingMoney = pingMoney.subtract(shopMoney);
|
pingMoney = pingMoney.subtract(shopMoney);
|
||||||
pingMoney = pingMoney.subtract(oneArtificerMoney);
|
pingMoney = pingMoney.subtract(oneArtificerMoney);
|
||||||
|
|
||||||
UserEntity user = userService.selectUserById(orders.getUserId());
|
|
||||||
UserEntity oneUser = userService.queryByInvitationCode(user.getInviterCode());
|
|
||||||
BigDecimal oneUserMoney = BigDecimal.ZERO;
|
|
||||||
if (oneUser != null && oneUser.getIsAgency() != null && oneUser.getIsAgency() == 1) {
|
|
||||||
orders.setOneUserId(oneUser.getUserId());
|
|
||||||
orders.setOneUserName(oneUser.getUserName());
|
|
||||||
oneUserMoney = pingMoney.multiply(oneUser.getUserRate());
|
|
||||||
oneUserMoney = oneUserMoney.setScale(0, BigDecimal.ROUND_UP);
|
|
||||||
}
|
|
||||||
orders.setOneUserMoney(oneUserMoney);
|
|
||||||
pingMoney = pingMoney.subtract(oneUserMoney);
|
pingMoney = pingMoney.subtract(oneUserMoney);
|
||||||
orders.setPingMoney(pingMoney);
|
orders.setPingMoney(pingMoney);
|
||||||
|
|
||||||
|
@ -5405,12 +5405,12 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
userMoneyDetails.setTitle("订单号:" + orders.getOrdersNo() + ",订单完成!");
|
userMoneyDetails.setTitle("订单号:" + orders.getOrdersNo() + ",订单完成!");
|
||||||
if (orders.getShopUserId() != null) {
|
if (orders.getShopUserId() != null) {
|
||||||
userMoneyDetails.setContent("支付金额:" + orders.getSumMoney() + ",平台扣除:" + orders.getPingMoney() +
|
userMoneyDetails.setContent("支付金额:" + orders.getSumMoney() + ",平台扣除:" + orders.getPingMoney() +
|
||||||
",商家扣除:" + orders.getShopMoney() + ",用户代理扣除:" + orders.getOneUserMoney() + ",技师代理扣除:" + orders.getOneArtificerMoney() +
|
",商家扣除:" + orders.getShopMoney() + ",分销员扣除:" + orders.getOneUserMoney() + ",经纪人扣除:" + orders.getOneArtificerMoney() +
|
||||||
",打车费:" + orders.getTaxiMoney() + ",平台扣除打车费:" + orders.getPingTaxiMoney() + ",到账打车费:" + orders.getArtificerTaxiMoney() +
|
",打车费:" + orders.getTaxiMoney() + ",平台扣除打车费:" + orders.getPingTaxiMoney() + ",到账打车费:" + orders.getArtificerTaxiMoney() +
|
||||||
",到账总金额:" + orders.getSumArtificerMoney());
|
",到账总金额:" + orders.getSumArtificerMoney());
|
||||||
} else {
|
} else {
|
||||||
userMoneyDetails.setContent("支付金额:" + orders.getSumMoney() + ",平台扣除:" + orders.getPingMoney() +
|
userMoneyDetails.setContent("支付金额:" + orders.getSumMoney() + ",平台扣除:" + orders.getPingMoney() +
|
||||||
",用户代理扣除:" + orders.getOneUserMoney() + ",技师代理扣除:" + orders.getOneArtificerMoney() +
|
",分销员扣除:" + orders.getOneUserMoney() + ",经纪人扣除:" + orders.getOneArtificerMoney() +
|
||||||
",打车费:" + orders.getTaxiMoney() + ",平台扣除打车费:" + orders.getPingTaxiMoney() + ",到账打车费:" + orders.getArtificerTaxiMoney() +
|
",打车费:" + orders.getTaxiMoney() + ",平台扣除打车费:" + orders.getPingTaxiMoney() + ",到账打车费:" + orders.getArtificerTaxiMoney() +
|
||||||
",到账总金额:" + orders.getSumArtificerMoney());
|
",到账总金额:" + orders.getSumArtificerMoney());
|
||||||
}
|
}
|
||||||
|
@ -5442,7 +5442,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
userMoneyDetails.setMoney(orders.getOneUserMoney());
|
userMoneyDetails.setMoney(orders.getOneUserMoney());
|
||||||
userMoneyDetails.setUserId(oneUser.getUserId());
|
userMoneyDetails.setUserId(oneUser.getUserId());
|
||||||
userMoneyDetails.setTitle("订单号:" + orders.getOrdersNo() + ",订单完成!");
|
userMoneyDetails.setTitle("订单号:" + orders.getOrdersNo() + ",订单完成!");
|
||||||
userMoneyDetails.setContent("推广用户收益:" + orders.getOneUserMoney());
|
userMoneyDetails.setContent("分销员收益:" + orders.getOneUserMoney());
|
||||||
userMoneyDetails.setType(1);
|
userMoneyDetails.setType(1);
|
||||||
userMoneyDetails.setState(2);
|
userMoneyDetails.setState(2);
|
||||||
userMoneyDetails.setClassify(5);
|
userMoneyDetails.setClassify(5);
|
||||||
|
@ -5467,7 +5467,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
userMoneyDetails.setMoney(orders.getOneArtificerMoney());
|
userMoneyDetails.setMoney(orders.getOneArtificerMoney());
|
||||||
userMoneyDetails.setUserId(oneArtificerUser.getUserId());
|
userMoneyDetails.setUserId(oneArtificerUser.getUserId());
|
||||||
userMoneyDetails.setTitle("订单号:" + orders.getOrdersNo() + ",订单完成!");
|
userMoneyDetails.setTitle("订单号:" + orders.getOrdersNo() + ",订单完成!");
|
||||||
userMoneyDetails.setContent("推广师傅收益:"+orders.getOneArtificerMoney());
|
userMoneyDetails.setContent("经纪人收益:"+orders.getOneArtificerMoney());
|
||||||
userMoneyDetails.setType(1);
|
userMoneyDetails.setType(1);
|
||||||
userMoneyDetails.setState(2);
|
userMoneyDetails.setState(2);
|
||||||
userMoneyDetails.setClassify(6);
|
userMoneyDetails.setClassify(6);
|
||||||
|
@ -5663,12 +5663,12 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
String value = commonInfoService.findOne(394).getValue();
|
String value = commonInfoService.findOne(394).getValue();
|
||||||
if (orders.getShopUserId() != null) {
|
if (orders.getShopUserId() != null) {
|
||||||
userMoneyDetails.setContent("支付金额:" + orders.getSumMoney() + ",平台扣除:" + orders.getPingMoney() +
|
userMoneyDetails.setContent("支付金额:" + orders.getSumMoney() + ",平台扣除:" + orders.getPingMoney() +
|
||||||
",商家扣除:" + orders.getShopMoney() + ",用户代理扣除:" + orders.getOneUserMoney() + ",技师代理扣除:" + orders.getOneArtificerMoney() +
|
",商家扣除:" + orders.getShopMoney() + ",分销员扣除:" + orders.getOneUserMoney() + ",经纪人扣除:" + orders.getOneArtificerMoney() +
|
||||||
",打车费:" + orders.getTaxiMoney() + ",平台扣除打车费:" + orders.getPingTaxiMoney() + ",到账打车费:" + orders.getArtificerTaxiMoney() +
|
",打车费:" + orders.getTaxiMoney() + ",平台扣除打车费:" + orders.getPingTaxiMoney() + ",到账打车费:" + orders.getArtificerTaxiMoney() +
|
||||||
",到账总金额:" + orders.getSumArtificerMoney());
|
",到账总金额:" + orders.getSumArtificerMoney());
|
||||||
} else {
|
} else {
|
||||||
userMoneyDetails.setContent("支付金额:" + orders.getSumMoney() + ",平台扣除:" + orders.getPingMoney() +
|
userMoneyDetails.setContent("支付金额:" + orders.getSumMoney() + ",平台扣除:" + orders.getPingMoney() +
|
||||||
",用户代理扣除:" + orders.getOneUserMoney() + ",技师代理扣除:" + orders.getOneArtificerMoney() +
|
",分销员扣除:" + orders.getOneUserMoney() + ",经纪人扣除:" + orders.getOneArtificerMoney() +
|
||||||
",打车费:" + orders.getTaxiMoney() + ",平台扣除打车费:" + orders.getPingTaxiMoney() + ",到账打车费:" + orders.getArtificerTaxiMoney() +
|
",打车费:" + orders.getTaxiMoney() + ",平台扣除打车费:" + orders.getPingTaxiMoney() + ",到账打车费:" + orders.getArtificerTaxiMoney() +
|
||||||
",到账总金额:" + orders.getSumArtificerMoney());
|
",到账总金额:" + orders.getSumArtificerMoney());
|
||||||
}
|
}
|
||||||
|
@ -5696,7 +5696,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
userMoneyDetails.setMoney(orders.getOneUserMoney());
|
userMoneyDetails.setMoney(orders.getOneUserMoney());
|
||||||
userMoneyDetails.setUserId(oneUser.getUserId());
|
userMoneyDetails.setUserId(oneUser.getUserId());
|
||||||
userMoneyDetails.setTitle("订单号:" + orders.getOrdersNo() + ",订单完成!");
|
userMoneyDetails.setTitle("订单号:" + orders.getOrdersNo() + ",订单完成!");
|
||||||
userMoneyDetails.setContent("推广用户收益:"+orders.getOneUserMoney());
|
userMoneyDetails.setContent("分销员收益:"+orders.getOneUserMoney());
|
||||||
userMoneyDetails.setType(1);
|
userMoneyDetails.setType(1);
|
||||||
userMoneyDetails.setState(2);
|
userMoneyDetails.setState(2);
|
||||||
userMoneyDetails.setClassify(5);
|
userMoneyDetails.setClassify(5);
|
||||||
|
@ -5721,7 +5721,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
userMoneyDetails.setMoney(orders.getOneArtificerMoney());
|
userMoneyDetails.setMoney(orders.getOneArtificerMoney());
|
||||||
userMoneyDetails.setUserId(oneArtificerUser.getUserId());
|
userMoneyDetails.setUserId(oneArtificerUser.getUserId());
|
||||||
userMoneyDetails.setTitle("订单号:" + orders.getOrdersNo() + ",订单完成!");
|
userMoneyDetails.setTitle("订单号:" + orders.getOrdersNo() + ",订单完成!");
|
||||||
userMoneyDetails.setContent("推广师傅收益:"+orders.getOneArtificerMoney());
|
userMoneyDetails.setContent("经纪人收益:"+orders.getOneArtificerMoney());
|
||||||
userMoneyDetails.setType(1);
|
userMoneyDetails.setType(1);
|
||||||
userMoneyDetails.setState(2);
|
userMoneyDetails.setState(2);
|
||||||
userMoneyDetails.setClassify(6);
|
userMoneyDetails.setClassify(6);
|
||||||
|
|
|
@ -653,8 +653,19 @@ public class AliPayController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
orders.setShopMoney(shopMoney);
|
orders.setShopMoney(shopMoney);
|
||||||
|
UserEntity user = userService.selectUserById(orders.getUserId());
|
||||||
|
UserEntity oneUser = userService.queryByInvitationCode(user.getInviterCode());
|
||||||
|
BigDecimal oneUserMoney = BigDecimal.ZERO;
|
||||||
|
if (oneUser != null && oneUser.getIsAgency() != null && oneUser.getIsAgency() == 1) {
|
||||||
|
orders.setOneUserId(oneUser.getUserId());
|
||||||
|
orders.setOneUserName(oneUser.getUserName());
|
||||||
|
oneUserMoney = artificerPrice.multiply(oneUser.getUserRate());
|
||||||
|
oneUserMoney = oneUserMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||||
|
}
|
||||||
|
orders.setOneUserMoney(oneUserMoney);
|
||||||
artificerPrice = artificerPrice.subtract(oneArtificerMoney);
|
artificerPrice = artificerPrice.subtract(oneArtificerMoney);
|
||||||
artificerPrice = artificerPrice.subtract(shopMoney);
|
artificerPrice = artificerPrice.subtract(shopMoney);
|
||||||
|
artificerPrice = artificerPrice.subtract(oneUserMoney);
|
||||||
if(orders.getIsSupplement()!=null && orders.getIsSupplement().equals(2)){
|
if(orders.getIsSupplement()!=null && orders.getIsSupplement().equals(2)){
|
||||||
}else{
|
}else{
|
||||||
//用户收益加上通行费用
|
//用户收益加上通行费用
|
||||||
|
@ -668,17 +679,6 @@ public class AliPayController {
|
||||||
pingMoney = pingMoney.subtract(artificerPrice);
|
pingMoney = pingMoney.subtract(artificerPrice);
|
||||||
pingMoney = pingMoney.subtract(shopMoney);
|
pingMoney = pingMoney.subtract(shopMoney);
|
||||||
pingMoney = pingMoney.subtract(oneArtificerMoney);
|
pingMoney = pingMoney.subtract(oneArtificerMoney);
|
||||||
|
|
||||||
UserEntity user = userService.selectUserById(orders.getUserId());
|
|
||||||
UserEntity oneUser = userService.queryByInvitationCode(user.getInviterCode());
|
|
||||||
BigDecimal oneUserMoney = BigDecimal.ZERO;
|
|
||||||
if (oneUser != null && oneUser.getIsAgency() != null && oneUser.getIsAgency() == 1) {
|
|
||||||
orders.setOneUserId(oneUser.getUserId());
|
|
||||||
orders.setOneUserName(oneUser.getUserName());
|
|
||||||
oneUserMoney = pingMoney.multiply(oneUser.getUserRate());
|
|
||||||
oneUserMoney = oneUserMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
||||||
}
|
|
||||||
orders.setOneUserMoney(oneUserMoney);
|
|
||||||
pingMoney = pingMoney.subtract(oneUserMoney);
|
pingMoney = pingMoney.subtract(oneUserMoney);
|
||||||
orders.setPingMoney(pingMoney);
|
orders.setPingMoney(pingMoney);
|
||||||
|
|
||||||
|
@ -1983,8 +1983,19 @@ public class AliPayController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
orders.setShopMoney(shopMoney);
|
orders.setShopMoney(shopMoney);
|
||||||
|
UserEntity user = userService.selectUserById(orders.getUserId());
|
||||||
|
UserEntity oneUser = userService.queryByInvitationCode(user.getInviterCode());
|
||||||
|
BigDecimal oneUserMoney = BigDecimal.ZERO;
|
||||||
|
if (oneUser != null && oneUser.getIsAgency() != null && oneUser.getIsAgency() == 1) {
|
||||||
|
orders.setOneUserId(oneUser.getUserId());
|
||||||
|
orders.setOneUserName(oneUser.getUserName());
|
||||||
|
oneUserMoney = artificerPrice.multiply(oneUser.getUserRate());
|
||||||
|
oneUserMoney = oneUserMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||||
|
}
|
||||||
|
orders.setOneUserMoney(oneUserMoney);
|
||||||
artificerPrice = artificerPrice.subtract(oneArtificerMoney);
|
artificerPrice = artificerPrice.subtract(oneArtificerMoney);
|
||||||
artificerPrice = artificerPrice.subtract(shopMoney);
|
artificerPrice = artificerPrice.subtract(shopMoney);
|
||||||
|
artificerPrice = artificerPrice.subtract(oneUserMoney);
|
||||||
if(orders.getIsSupplement()!=null && orders.getIsSupplement().equals(2)){
|
if(orders.getIsSupplement()!=null && orders.getIsSupplement().equals(2)){
|
||||||
}else{
|
}else{
|
||||||
//用户收益加上通行费用
|
//用户收益加上通行费用
|
||||||
|
@ -1998,17 +2009,6 @@ public class AliPayController {
|
||||||
pingMoney = pingMoney.subtract(artificerPrice);
|
pingMoney = pingMoney.subtract(artificerPrice);
|
||||||
pingMoney = pingMoney.subtract(shopMoney);
|
pingMoney = pingMoney.subtract(shopMoney);
|
||||||
pingMoney = pingMoney.subtract(oneArtificerMoney);
|
pingMoney = pingMoney.subtract(oneArtificerMoney);
|
||||||
|
|
||||||
UserEntity user = userService.selectUserById(orders.getUserId());
|
|
||||||
UserEntity oneUser = userService.queryByInvitationCode(user.getInviterCode());
|
|
||||||
BigDecimal oneUserMoney = BigDecimal.ZERO;
|
|
||||||
if (oneUser != null && oneUser.getIsAgency() != null && oneUser.getIsAgency() == 1) {
|
|
||||||
orders.setOneUserId(oneUser.getUserId());
|
|
||||||
orders.setOneUserName(oneUser.getUserName());
|
|
||||||
oneUserMoney = pingMoney.multiply(oneUser.getUserRate());
|
|
||||||
oneUserMoney = oneUserMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
||||||
}
|
|
||||||
orders.setOneUserMoney(oneUserMoney);
|
|
||||||
pingMoney = pingMoney.subtract(oneUserMoney);
|
pingMoney = pingMoney.subtract(oneUserMoney);
|
||||||
orders.setPingMoney(pingMoney);
|
orders.setPingMoney(pingMoney);
|
||||||
|
|
||||||
|
|
|
@ -1455,8 +1455,19 @@ public class WxServiceImpl implements WxService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
orders.setShopMoney(shopMoney);
|
orders.setShopMoney(shopMoney);
|
||||||
|
UserEntity user = userService.selectUserById(orders.getUserId());
|
||||||
|
UserEntity oneUser = userService.queryByInvitationCode(user.getInviterCode());
|
||||||
|
BigDecimal oneUserMoney = BigDecimal.ZERO;
|
||||||
|
if (oneUser != null && oneUser.getIsAgency() != null && oneUser.getIsAgency() == 1) {
|
||||||
|
orders.setOneUserId(oneUser.getUserId());
|
||||||
|
orders.setOneUserName(oneUser.getUserName());
|
||||||
|
oneUserMoney = artificerPrice.multiply(oneUser.getUserRate());
|
||||||
|
oneUserMoney = oneUserMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||||
|
}
|
||||||
|
orders.setOneUserMoney(oneUserMoney);
|
||||||
artificerPrice = artificerPrice.subtract(oneArtificerMoney);
|
artificerPrice = artificerPrice.subtract(oneArtificerMoney);
|
||||||
artificerPrice = artificerPrice.subtract(shopMoney);
|
artificerPrice = artificerPrice.subtract(shopMoney);
|
||||||
|
artificerPrice = artificerPrice.subtract(oneUserMoney);
|
||||||
if(orders.getIsSupplement()!=null && orders.getIsSupplement().equals(2)){
|
if(orders.getIsSupplement()!=null && orders.getIsSupplement().equals(2)){
|
||||||
}else{
|
}else{
|
||||||
//用户收益加上通行费用
|
//用户收益加上通行费用
|
||||||
|
@ -1470,17 +1481,6 @@ public class WxServiceImpl implements WxService {
|
||||||
pingMoney = pingMoney.subtract(artificerPrice);
|
pingMoney = pingMoney.subtract(artificerPrice);
|
||||||
pingMoney = pingMoney.subtract(shopMoney);
|
pingMoney = pingMoney.subtract(shopMoney);
|
||||||
pingMoney = pingMoney.subtract(oneArtificerMoney);
|
pingMoney = pingMoney.subtract(oneArtificerMoney);
|
||||||
|
|
||||||
UserEntity user = userService.selectUserById(orders.getUserId());
|
|
||||||
UserEntity oneUser = userService.queryByInvitationCode(user.getInviterCode());
|
|
||||||
BigDecimal oneUserMoney = BigDecimal.ZERO;
|
|
||||||
if (oneUser != null && oneUser.getIsAgency() != null && oneUser.getIsAgency() == 1) {
|
|
||||||
orders.setOneUserId(oneUser.getUserId());
|
|
||||||
orders.setOneUserName(oneUser.getUserName());
|
|
||||||
oneUserMoney = pingMoney.multiply(oneUser.getUserRate());
|
|
||||||
oneUserMoney = oneUserMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
||||||
}
|
|
||||||
orders.setOneUserMoney(oneUserMoney);
|
|
||||||
pingMoney = pingMoney.subtract(oneUserMoney);
|
pingMoney = pingMoney.subtract(oneUserMoney);
|
||||||
orders.setPingMoney(pingMoney);
|
orders.setPingMoney(pingMoney);
|
||||||
|
|
||||||
|
@ -2211,8 +2211,19 @@ public class WxServiceImpl implements WxService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
orders.setShopMoney(shopMoney);
|
orders.setShopMoney(shopMoney);
|
||||||
|
UserEntity user = userService.selectUserById(orders.getUserId());
|
||||||
|
UserEntity oneUser = userService.queryByInvitationCode(user.getInviterCode());
|
||||||
|
BigDecimal oneUserMoney = BigDecimal.ZERO;
|
||||||
|
if (oneUser != null && oneUser.getIsAgency() != null && oneUser.getIsAgency() == 1) {
|
||||||
|
orders.setOneUserId(oneUser.getUserId());
|
||||||
|
orders.setOneUserName(oneUser.getUserName());
|
||||||
|
oneUserMoney = artificerPrice.multiply(oneUser.getUserRate());
|
||||||
|
oneUserMoney = oneUserMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||||
|
}
|
||||||
|
orders.setOneUserMoney(oneUserMoney);
|
||||||
artificerPrice = artificerPrice.subtract(oneArtificerMoney);
|
artificerPrice = artificerPrice.subtract(oneArtificerMoney);
|
||||||
artificerPrice = artificerPrice.subtract(shopMoney);
|
artificerPrice = artificerPrice.subtract(shopMoney);
|
||||||
|
artificerPrice = artificerPrice.subtract(oneUserMoney);
|
||||||
if(orders.getIsSupplement()!=null && orders.getIsSupplement().equals(2)){
|
if(orders.getIsSupplement()!=null && orders.getIsSupplement().equals(2)){
|
||||||
}else{
|
}else{
|
||||||
//用户收益加上通行费用
|
//用户收益加上通行费用
|
||||||
|
@ -2226,17 +2237,6 @@ public class WxServiceImpl implements WxService {
|
||||||
pingMoney = pingMoney.subtract(artificerPrice);
|
pingMoney = pingMoney.subtract(artificerPrice);
|
||||||
pingMoney = pingMoney.subtract(shopMoney);
|
pingMoney = pingMoney.subtract(shopMoney);
|
||||||
pingMoney = pingMoney.subtract(oneArtificerMoney);
|
pingMoney = pingMoney.subtract(oneArtificerMoney);
|
||||||
|
|
||||||
UserEntity user = userService.selectUserById(orders.getUserId());
|
|
||||||
UserEntity oneUser = userService.queryByInvitationCode(user.getInviterCode());
|
|
||||||
BigDecimal oneUserMoney = BigDecimal.ZERO;
|
|
||||||
if (oneUser != null && oneUser.getIsAgency() != null && oneUser.getIsAgency() == 1) {
|
|
||||||
orders.setOneUserId(oneUser.getUserId());
|
|
||||||
orders.setOneUserName(oneUser.getUserName());
|
|
||||||
oneUserMoney = pingMoney.multiply(oneUser.getUserRate());
|
|
||||||
oneUserMoney = oneUserMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
||||||
}
|
|
||||||
orders.setOneUserMoney(oneUserMoney);
|
|
||||||
pingMoney = pingMoney.subtract(oneUserMoney);
|
pingMoney = pingMoney.subtract(oneUserMoney);
|
||||||
orders.setPingMoney(pingMoney);
|
orders.setPingMoney(pingMoney);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue