肿瘤古方 权限
This commit is contained in:
@@ -208,6 +208,8 @@ public class BuyOrderController {
|
|||||||
//五运六气权限
|
//五运六气权限
|
||||||
List<Integer> wylq = Arrays.asList(39,62,123,127);
|
List<Integer> wylq = Arrays.asList(39,62,123,127);
|
||||||
boolean wylq_check = false;
|
boolean wylq_check = false;
|
||||||
|
List<Integer> prescript_b = Arrays.asList(43,62,124);
|
||||||
|
boolean prescriot_b_check = false;
|
||||||
|
|
||||||
|
|
||||||
// 遍历商品总价计算
|
// 遍历商品总价计算
|
||||||
@@ -221,6 +223,9 @@ public class BuyOrderController {
|
|||||||
if(wylq.contains(buyOrderProduct.getProductId())){
|
if(wylq.contains(buyOrderProduct.getProductId())){
|
||||||
wylq_check = true;
|
wylq_check = true;
|
||||||
}
|
}
|
||||||
|
if(prescript_b.contains(buyOrderProduct.getProductId())){
|
||||||
|
prescriot_b_check = true;
|
||||||
|
}
|
||||||
|
|
||||||
Integer productId = buyOrderProduct.getProductId();
|
Integer productId = buyOrderProduct.getProductId();
|
||||||
int quantity = buyOrderProduct.getQuantity();
|
int quantity = buyOrderProduct.getQuantity();
|
||||||
@@ -259,7 +264,7 @@ public class BuyOrderController {
|
|||||||
if (Constants.PAYMENT_METHOD_VIRTUAL.equals(buyOrder.getPaymentMethod())) {
|
if (Constants.PAYMENT_METHOD_VIRTUAL.equals(buyOrder.getPaymentMethod())) {
|
||||||
buyOrder.setOrderStatus(Constants.ORDER_STATUS_TO_BE_SHIPPED);
|
buyOrder.setOrderStatus(Constants.ORDER_STATUS_TO_BE_SHIPPED);
|
||||||
MyUserEntity user = this.myUserService.getById(buyOrder.getUserId());
|
MyUserEntity user = this.myUserService.getById(buyOrder.getUserId());
|
||||||
if (usePeanutCoin(user, totalPrice,sj_check,scqq_check,wylq_check)) {
|
if (usePeanutCoin(user, totalPrice,sj_check,scqq_check,wylq_check,prescriot_b_check)) {
|
||||||
// 更新订单状态
|
// 更新订单状态
|
||||||
buyOrderService.updateOrderStatus(user.getId(), buyOrder.getOrderSn(), "0");
|
buyOrderService.updateOrderStatus(user.getId(), buyOrder.getOrderSn(), "0");
|
||||||
recordTransaction(buyOrder, user, totalPrice);
|
recordTransaction(buyOrder, user, totalPrice);
|
||||||
@@ -809,7 +814,7 @@ public class BuyOrderController {
|
|||||||
* @param totalPrice
|
* @param totalPrice
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private boolean usePeanutCoin(MyUserEntity user, BigDecimal totalPrice,boolean sj_check,boolean scqq_check,boolean wylq_check) {
|
private boolean usePeanutCoin(MyUserEntity user, BigDecimal totalPrice,boolean sj_check,boolean scqq_check,boolean wylq_check,boolean prescript_b_check) {
|
||||||
if (user.getPeanutCoin().compareTo(totalPrice) >= 0) {
|
if (user.getPeanutCoin().compareTo(totalPrice) >= 0) {
|
||||||
user.setPeanutCoin(user.getPeanutCoin().subtract(totalPrice));
|
user.setPeanutCoin(user.getPeanutCoin().subtract(totalPrice));
|
||||||
if (sj_check){
|
if (sj_check){
|
||||||
@@ -821,6 +826,9 @@ public class BuyOrderController {
|
|||||||
if(wylq_check){
|
if(wylq_check){
|
||||||
user.setWylqPower(1);
|
user.setWylqPower(1);
|
||||||
}
|
}
|
||||||
|
if(prescript_b_check){
|
||||||
|
user.setPrescriptBPower(1);
|
||||||
|
}
|
||||||
this.myUserService.updateById(user);
|
this.myUserService.updateById(user);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,6 +233,11 @@ public class AliPayServiceImpl implements AliPayService {
|
|||||||
userService.updateById(userInfo);
|
userService.updateById(userInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(collect.contains(43)||collect.contains(62)||collect.contains(124)){
|
||||||
|
MyUserEntity userInfo = userService.getById(orderEntity.getUserId());
|
||||||
|
userInfo.setPrescriptBPower(1);
|
||||||
|
userService.updateById(userInfo);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -160,6 +160,11 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
|
|||||||
userInfo.setWylqPower(1);
|
userInfo.setWylqPower(1);
|
||||||
userService.updateById(userInfo);
|
userService.updateById(userInfo);
|
||||||
}
|
}
|
||||||
|
if(collect.contains(43)||collect.contains(62)||collect.contains(124)){
|
||||||
|
MyUserEntity userInfo = userService.getById(order.getUserId());
|
||||||
|
userInfo.setPrescriptBPower(1);
|
||||||
|
userService.updateById(userInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
buyOrderService.updateOrderStatus(order.getUserId(), order.getOrderSn(), "0");
|
buyOrderService.updateOrderStatus(order.getUserId(), order.getOrderSn(), "0");
|
||||||
|
|||||||
Reference in New Issue
Block a user