添加会员余额变动通知
This commit is contained in:
@@ -1120,7 +1120,7 @@ public class PayService {
|
|||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void giveActivate(TbShopUser tbShopUser, BigDecimal memAmount,Integer flowId){
|
public BigDecimal giveActivate(TbShopUser tbShopUser, BigDecimal memAmount,Integer flowId){
|
||||||
TbActivate activate = tbActivateMapper.selectByAmount(tbShopUser.getShopId(), memAmount);
|
TbActivate activate = tbActivateMapper.selectByAmount(tbShopUser.getShopId(), memAmount);
|
||||||
if (ObjectUtil.isNotEmpty(activate) && ObjectUtil.isNotNull(activate)) {
|
if (ObjectUtil.isNotEmpty(activate) && ObjectUtil.isNotNull(activate)) {
|
||||||
if (activate.getIsGiftPro() != null && activate.getIsGiftPro() == 1) {
|
if (activate.getIsGiftPro() != null && activate.getIsGiftPro() == 1) {
|
||||||
@@ -1155,7 +1155,10 @@ public class PayService {
|
|||||||
flow.setBalance(tbShopUser.getAmount());
|
flow.setBalance(tbShopUser.getAmount());
|
||||||
flow.setCreateTime(new Date());
|
flow.setCreateTime(new Date());
|
||||||
tbShopUserFlowMapper.insert(flow);
|
tbShopUserFlowMapper.insert(flow);
|
||||||
|
return amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1203,7 +1206,7 @@ public class PayService {
|
|||||||
flow.setCreateTime(new Date());
|
flow.setCreateTime(new Date());
|
||||||
tbShopUserFlowMapper.insert(flow);
|
tbShopUserFlowMapper.insert(flow);
|
||||||
//会员活动
|
//会员活动
|
||||||
giveActivate(tbShopUser,memberIn.getAmount(),flow.getId());
|
BigDecimal awardAmount= giveActivate(tbShopUser,memberIn.getAmount(),flow.getId());
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("shopId", memberIn.getShopId());
|
jsonObject.put("shopId", memberIn.getShopId());
|
||||||
jsonObject.put("type", "wxMemberIn");
|
jsonObject.put("type", "wxMemberIn");
|
||||||
@@ -1215,7 +1218,7 @@ public class PayService {
|
|||||||
JSONObject baObj=new JSONObject();
|
JSONObject baObj=new JSONObject();
|
||||||
baObj.put("userId", tbShopUser.getUserId());
|
baObj.put("userId", tbShopUser.getUserId());
|
||||||
baObj.put("shopId",tbShopUser.getShopId());
|
baObj.put("shopId",tbShopUser.getShopId());
|
||||||
baObj.put("amount",memberIn.getAmount());
|
baObj.put("amount",ObjectUtil.isNull(awardAmount)?memberIn.getAmount():memberIn.getAmount().add(awardAmount));
|
||||||
baObj.put("balance",tbShopUser.getAmount());
|
baObj.put("balance",tbShopUser.getAmount());
|
||||||
baObj.put("type","充值");
|
baObj.put("type","充值");
|
||||||
baObj.put("time",flow.getCreateTime());
|
baObj.put("time",flow.getCreateTime());
|
||||||
|
|||||||
Reference in New Issue
Block a user