|
|
@@ -6,15 +6,11 @@ import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.dromara.backstage.api.RemoteBagService;
|
|
|
-import org.dromara.backstage.api.RemoteMealTypeService;
|
|
|
import org.dromara.backstage.api.domain.bo.RemoteConsumptionBo;
|
|
|
-import org.dromara.backstage.api.domain.bo.RemotePtMealTypeBo;
|
|
|
import org.dromara.backstage.api.domain.bo.RemotePurseInOutBo;
|
|
|
import org.dromara.common.core.exception.ServiceException;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.util.Collection;
|
|
|
-
|
|
|
/**
|
|
|
* 卡务中心卡务操作同步
|
|
|
*/
|
|
|
@@ -28,7 +24,6 @@ public class SyncRemotePtCardCenterService {
|
|
|
|
|
|
/**
|
|
|
* 远程调用充值
|
|
|
- * @param msg
|
|
|
*/
|
|
|
public void recharge(Object msg) throws ServiceException{
|
|
|
boolean flag = bagService.recharge(JSONUtil.parseObj(msg).toBean(RemotePurseInOutBo.class));
|
|
|
@@ -39,10 +34,9 @@ public class SyncRemotePtCardCenterService {
|
|
|
|
|
|
/**
|
|
|
* 远程调用退款
|
|
|
- * @param msg
|
|
|
*/
|
|
|
public void refund(Object msg) throws ServiceException{
|
|
|
- boolean flag = bagService.recharge(JSONUtil.parseObj(msg).toBean(RemotePurseInOutBo.class));
|
|
|
+ boolean flag = bagService.refund(JSONUtil.parseObj(msg).toBean(RemotePurseInOutBo.class));
|
|
|
if (!flag){
|
|
|
throw new ServiceException("退款失败");
|
|
|
}
|
|
|
@@ -50,7 +44,6 @@ public class SyncRemotePtCardCenterService {
|
|
|
|
|
|
/**
|
|
|
* 远程调用错扣补款
|
|
|
- * @param msg
|
|
|
*/
|
|
|
public void errFill(Object msg) throws ServiceException{
|
|
|
boolean flag = bagService.createErrFillRecord(JSONUtil.parseObj(msg).toBean(RemoteConsumptionBo.class));
|
|
|
@@ -60,7 +53,6 @@ public class SyncRemotePtCardCenterService {
|
|
|
}
|
|
|
/**
|
|
|
* 远程调用批量充值
|
|
|
- * @param msg
|
|
|
*/
|
|
|
public void batchRecharge(Object msg) throws ServiceException{
|
|
|
JSONObject msgObj = JSONUtil.parseObj(msg);
|
|
|
@@ -74,8 +66,6 @@ public class SyncRemotePtCardCenterService {
|
|
|
|
|
|
/**
|
|
|
* 远程调用批量退款
|
|
|
- * @param msg
|
|
|
- * @throws ServiceException
|
|
|
*/
|
|
|
public void batchRefund(Object msg) throws ServiceException{
|
|
|
JSONObject msgObj = JSONUtil.parseObj(msg);
|
|
|
@@ -89,14 +79,12 @@ public class SyncRemotePtCardCenterService {
|
|
|
|
|
|
/**
|
|
|
* 远程调用批量设置余额
|
|
|
- * @param msg
|
|
|
- * @throws ServiceException
|
|
|
*/
|
|
|
public void batchSetBalance(Object msg) throws ServiceException{
|
|
|
JSONObject msgObj = JSONUtil.parseObj(msg);
|
|
|
RemotePurseInOutBo bo = msgObj.getJSONObject("bo").toBean(RemotePurseInOutBo.class);
|
|
|
Long[] userIds = (Long[]) msgObj.get("userIds");
|
|
|
- boolean flag = bagService.batchRecharge(bo, userIds);
|
|
|
+ boolean flag = bagService.batchSetBalance(bo, userIds);
|
|
|
if (!flag){
|
|
|
throw new ServiceException("批量设置余额失败");
|
|
|
}
|
|
|
@@ -104,8 +92,6 @@ public class SyncRemotePtCardCenterService {
|
|
|
|
|
|
/**
|
|
|
* 远程调用卡片挂失
|
|
|
- * @param msg
|
|
|
- * @throws ServiceException
|
|
|
*/
|
|
|
public void lockCard(Object msg) throws ServiceException{
|
|
|
boolean flag = bagService.lockCard(JSONUtil.parseObj(msg).getLong("cardId"));
|
|
|
@@ -115,8 +101,6 @@ public class SyncRemotePtCardCenterService {
|
|
|
}
|
|
|
/**
|
|
|
* 远程调用卡片解挂
|
|
|
- * @param msg
|
|
|
- * @throws ServiceException
|
|
|
*/
|
|
|
public void unlockCard(Object msg) throws ServiceException{
|
|
|
boolean flag = bagService.unlockCard(JSONUtil.parseObj(msg).getLong("cardId"));
|