|
@@ -57,7 +57,7 @@ public class SyncRemotePtCardCenterService {
|
|
|
public void batchRecharge(Object msg) throws ServiceException{
|
|
public void batchRecharge(Object msg) throws ServiceException{
|
|
|
JSONObject msgObj = JSONUtil.parseObj(msg);
|
|
JSONObject msgObj = JSONUtil.parseObj(msg);
|
|
|
RemotePurseInOutBo bo = msgObj.getJSONObject("bo").toBean(RemotePurseInOutBo.class);
|
|
RemotePurseInOutBo bo = msgObj.getJSONObject("bo").toBean(RemotePurseInOutBo.class);
|
|
|
- Long[] userIds = (Long[]) msgObj.get("userIds");
|
|
|
|
|
|
|
+ Long[] userIds = msgObj.getJSONArray("userIds").toArray(new Long[0]);
|
|
|
boolean flag = bagService.batchRecharge(bo, userIds);
|
|
boolean flag = bagService.batchRecharge(bo, userIds);
|
|
|
if (!flag){
|
|
if (!flag){
|
|
|
throw new ServiceException("批量充值失败");
|
|
throw new ServiceException("批量充值失败");
|
|
@@ -70,7 +70,7 @@ public class SyncRemotePtCardCenterService {
|
|
|
public void batchRefund(Object msg) throws ServiceException{
|
|
public void batchRefund(Object msg) throws ServiceException{
|
|
|
JSONObject msgObj = JSONUtil.parseObj(msg);
|
|
JSONObject msgObj = JSONUtil.parseObj(msg);
|
|
|
RemotePurseInOutBo bo = msgObj.getJSONObject("bo").toBean(RemotePurseInOutBo.class);
|
|
RemotePurseInOutBo bo = msgObj.getJSONObject("bo").toBean(RemotePurseInOutBo.class);
|
|
|
- Long[] userIds = (Long[]) msgObj.get("userIds");
|
|
|
|
|
|
|
+ Long[] userIds = msgObj.getJSONArray("userIds").toArray(new Long[0]);
|
|
|
boolean flag = bagService.batchRefund(bo, userIds);
|
|
boolean flag = bagService.batchRefund(bo, userIds);
|
|
|
if (!flag){
|
|
if (!flag){
|
|
|
throw new ServiceException("批量退款失败");
|
|
throw new ServiceException("批量退款失败");
|
|
@@ -83,7 +83,7 @@ public class SyncRemotePtCardCenterService {
|
|
|
public void batchSetBalance(Object msg) throws ServiceException{
|
|
public void batchSetBalance(Object msg) throws ServiceException{
|
|
|
JSONObject msgObj = JSONUtil.parseObj(msg);
|
|
JSONObject msgObj = JSONUtil.parseObj(msg);
|
|
|
RemotePurseInOutBo bo = msgObj.getJSONObject("bo").toBean(RemotePurseInOutBo.class);
|
|
RemotePurseInOutBo bo = msgObj.getJSONObject("bo").toBean(RemotePurseInOutBo.class);
|
|
|
- Long[] userIds = (Long[]) msgObj.get("userIds");
|
|
|
|
|
|
|
+ Long[] userIds = msgObj.getJSONArray("userIds").toArray(new Long[0]);
|
|
|
boolean flag = bagService.batchSetBalance(bo, userIds);
|
|
boolean flag = bagService.batchSetBalance(bo, userIds);
|
|
|
if (!flag){
|
|
if (!flag){
|
|
|
throw new ServiceException("批量设置余额失败");
|
|
throw new ServiceException("批量设置余额失败");
|