|
|
|
@@ -2,12 +2,13 @@ package com.iformall.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.vo.WxCardSpendVo; |
|
|
|
import com.iformall.domain.vo.WxCardVo; |
|
|
|
import com.iformall.enums.EnumCardSpendStatus; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.WxCardInfoService; |
|
|
|
import com.iformall.service.WxCardSpendService; |
|
|
|
import com.iformall.service.WxMerchantService; |
|
|
|
@@ -83,7 +84,9 @@ public class WxCardPayController extends BaseController { |
|
|
|
public ResultData cardSpendlist(@ModelAttribute WxCardSpendVo wxCardSpendVo, Integer pageNum, Integer pageSize) { |
|
|
|
String ipStr = getIpAddr(); |
|
|
|
logger.info("cardSpendlist: " + ipStr); |
|
|
|
if (wxCardSpendVo == null) wxCardSpendVo = new WxCardSpendVo(); |
|
|
|
if (wxCardSpendVo == null) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "过滤条件为空"); |
|
|
|
} |
|
|
|
MallUserInfo user = getUser(); |
|
|
|
wxCardSpendVo.setTenantId(user.getTenantId()); |
|
|
|
if(StringUtils.isNotBlank(wxCardSpendVo.getPayStatusStr())) { |
|
|
|
@@ -105,7 +108,9 @@ public class WxCardPayController extends BaseController { |
|
|
|
public ResultData sumCardSpendList(@ModelAttribute WxCardSpendVo wxCardSpend) { |
|
|
|
String ipStr = getIpAddr(); |
|
|
|
logger.info("sumCardSpendList: " + ipStr + " :" + wxCardSpend.toString()); |
|
|
|
if (wxCardSpend == null) wxCardSpend = new WxCardSpendVo(); |
|
|
|
if (wxCardSpend == null) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "过滤条件为空"); |
|
|
|
} |
|
|
|
MallUserInfo user = getUser(); |
|
|
|
wxCardSpend.setTenantId(user.getTenantId()); |
|
|
|
final Map map = wxCardSpendService.sumCardSpendForMerchant(wxCardSpend); |
|
|
|
@@ -116,6 +121,9 @@ public class WxCardPayController extends BaseController { |
|
|
|
@GetMapping("/exportData") |
|
|
|
public void exportData(@ModelAttribute WxCardSpendVo wxCardSpendVo, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
logger.info("[" + getIpAddr() + "] WxCardPayController::exportData"); |
|
|
|
if (wxCardSpendVo == null) { |
|
|
|
throw new MallinkException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "过滤条件为空"); |
|
|
|
} |
|
|
|
wxCardSpendVo.setTenantId(getTenantId()); |
|
|
|
if(StringUtils.isNotBlank(wxCardSpendVo.getPayStatusStr())) { |
|
|
|
String [] statusAttr = wxCardSpendVo.getPayStatusStr().split(","); |
|
|
|
@@ -135,8 +143,9 @@ public class WxCardPayController extends BaseController { |
|
|
|
public ResultData update(@RequestBody WxCardSpendVo wxCardSpendVo) { |
|
|
|
String ipStr = getIpAddr(); |
|
|
|
logger.info("subsidy/update: " + ipStr + " :" + wxCardSpendVo.toString()); |
|
|
|
if (wxCardSpendVo == null) |
|
|
|
return new ResultData(Result.SUCCESS, "无更新条件"); |
|
|
|
if (wxCardSpendVo == null) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "过滤条件为空"); |
|
|
|
} |
|
|
|
MallUserInfo user = getUser(); |
|
|
|
wxCardSpendVo.setTenantId(user.getTenantId()); |
|
|
|
wxCardSpendVo.setStatus(EnumCardSpendStatus.MANUAL_PAY.getCode()); |
|
|
|
|