|
@@ -54,8 +54,6 @@ public class FinanceManagementController extends SimpleController {
|
|
@RequestMapping
|
|
@RequestMapping
|
|
public String index(Model model, @RequestParam HashMap<String, Object> paramMap,
|
|
public String index(Model model, @RequestParam HashMap<String, Object> paramMap,
|
|
@RequestParam(defaultValue = "1") int page) {
|
|
@RequestParam(defaultValue = "1") int page) {
|
|
-// //这里搜索条件还没有从前端传值所以这里自己测试一下
|
|
|
|
-// paramMap.put("num", "20150915112098");
|
|
|
|
int totalRow = 0;
|
|
int totalRow = 0;
|
|
Pager pager = null;
|
|
Pager pager = null;
|
|
pager = new Pager();
|
|
pager = new Pager();
|
|
@@ -121,16 +119,11 @@ public class FinanceManagementController extends SimpleController {
|
|
public @ResponseBody
|
|
public @ResponseBody
|
|
String disable(Long[] id, String reason) {
|
|
String disable(Long[] id, String reason) {
|
|
if (ArrayUtils.isNotEmpty(id)) {
|
|
if (ArrayUtils.isNotEmpty(id)) {
|
|
-
|
|
|
|
-
|
|
|
|
- //设置状态为审核不通过并且把原因写入数据库
|
|
|
|
- operatorBalanceService.updateStatus(LangUtil.array2List(id), reason, 2);
|
|
|
|
-
|
|
|
|
- //把这些审核不通过的提取金额加回去
|
|
|
|
- for(int i = 0; i < id.length; i++) {
|
|
|
|
- operatorBalanceService.moneyBackToOperator(id[i]);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ Map<String, Object> paramMap = new HashMap<String, Object>();
|
|
|
|
+ paramMap.put("reason", reason);
|
|
|
|
+ paramMap.put("id", id);
|
|
|
|
+ operatorBalanceService.failureAudit(paramMap);
|
|
|
|
+ }
|
|
return OK;
|
|
return OK;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -148,7 +141,6 @@ public class FinanceManagementController extends SimpleController {
|
|
Pager pager = null;
|
|
Pager pager = null;
|
|
pager = new Pager();
|
|
pager = new Pager();
|
|
//统计充值记录总数
|
|
//统计充值记录总数
|
|
- //totalRow = advBalanceService.countByParams(paramMap);
|
|
|
|
totalRow = advBalanceService.countByParamsBack(paramMap);
|
|
totalRow = advBalanceService.countByParamsBack(paramMap);
|
|
pager.setPage(page);
|
|
pager.setPage(page);
|
|
pager.setTotalRow(totalRow);
|
|
pager.setTotalRow(totalRow);
|
|
@@ -204,7 +196,7 @@ public class FinanceManagementController extends SimpleController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 广告主充值中的撤销操作,执行撤销操作的话要把这里的充值
|
|
|
|
|
|
+ * 广告主充值中的撤销操作,执行撤销操作的话,就相当于执行一个充值为该撤销金额负数的充值
|
|
* 前端需要传递一个advBalanceId
|
|
* 前端需要传递一个advBalanceId
|
|
* @param model
|
|
* @param model
|
|
* @param paramMap
|
|
* @param paramMap
|
|
@@ -226,10 +218,17 @@ public class FinanceManagementController extends SimpleController {
|
|
Double money = advBalance.getCharge();
|
|
Double money = advBalance.getCharge();
|
|
//撤销完后的余额
|
|
//撤销完后的余额
|
|
balance = new Double(balance - money);
|
|
balance = new Double(balance - money);
|
|
- //更新当前代理商的账户余额
|
|
|
|
- advBalanceService.updateBalanceByAgentId(advBalance.getAgentId(), balance);
|
|
|
|
- //将这条充值记录删除掉
|
|
|
|
- advBalanceService.deleteAdvBalanceById(advBalanceId);
|
|
|
|
|
|
+
|
|
|
|
+ paramMap.put("charge", (-money));
|
|
|
|
+ paramMap.put("balance", balance);
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
|
+ SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
+ paramMap.put("num", sdf.format(new Date()));
|
|
|
|
+ paramMap.put("actTime", sdf1.format(new Date()));
|
|
|
|
+ paramMap.put("accountId", getLoginUser().getId());
|
|
|
|
+ paramMap.put("agentId", advBalance.getAgentId());
|
|
|
|
+
|
|
|
|
+ advBalanceService.backOut(paramMap);
|
|
|
|
|
|
return OK;
|
|
return OK;
|
|
}
|
|
}
|