|
|
|
@@ -1,12 +1,13 @@ |
|
|
|
package com.iformall.controller; |
|
|
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.MallUserInfo; |
|
|
|
import com.iformall.domain.po.WxMerchantSubsidy; |
|
|
|
import com.iformall.domain.vo.WxCardSpendVo; |
|
|
|
import com.iformall.domain.vo.WxMerchantSubsidyVo; |
|
|
|
import com.iformall.enums.EnumMerchantSubsidyStatus; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.WxMerchantSubsidyService; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
@@ -39,7 +40,9 @@ public class WxMerchantSubsidyController extends BaseController { |
|
|
|
public ResultData count(@ModelAttribute WxMerchantSubsidy wxMerchantSubsidy) { |
|
|
|
String ipStr = getIpAddr(); |
|
|
|
logger.info("subsidy/sum: " + ipStr + " :" + wxMerchantSubsidy.toString()); |
|
|
|
if (wxMerchantSubsidy == null) wxMerchantSubsidy = new WxMerchantSubsidy(); |
|
|
|
if (wxMerchantSubsidy == null) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "过滤条件为空"); |
|
|
|
} |
|
|
|
MallUserInfo user = getUser(); |
|
|
|
wxMerchantSubsidy.setTenantId(user.getTenantId()); |
|
|
|
if(StringUtils.isNotBlank(wxMerchantSubsidy.getStatusStr())) { |
|
|
|
@@ -64,7 +67,9 @@ public class WxMerchantSubsidyController extends BaseController { |
|
|
|
public ResultData listMonth(@ModelAttribute WxMerchantSubsidy wxMerchantSubsidy, Integer pageNum, Integer pageSize) { |
|
|
|
String ipStr = getIpAddr(); |
|
|
|
logger.info("subsidy/list: " + ipStr + " :" + wxMerchantSubsidy.toString()); |
|
|
|
if (wxMerchantSubsidy == null) wxMerchantSubsidy = new WxMerchantSubsidy(); |
|
|
|
if (wxMerchantSubsidy == null) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "过滤条件为空"); |
|
|
|
} |
|
|
|
MallUserInfo user = getUser(); |
|
|
|
wxMerchantSubsidy.setTenantId(user.getTenantId()); |
|
|
|
if(StringUtils.isNotBlank(wxMerchantSubsidy.getStatusStr())) { |
|
|
|
@@ -86,7 +91,9 @@ public class WxMerchantSubsidyController extends BaseController { |
|
|
|
public ResultData updateSubsidied(@RequestBody WxMerchantSubsidy wxMerchantSubsidy) { |
|
|
|
String ipStr = getIpAddr(); |
|
|
|
logger.info("subsidy/update: " + ipStr + " :" + wxMerchantSubsidy.toString()); |
|
|
|
if (wxMerchantSubsidy == null) wxMerchantSubsidy = new WxMerchantSubsidy(); |
|
|
|
if (wxMerchantSubsidy == null) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "过滤条件为空"); |
|
|
|
} |
|
|
|
MallUserInfo user = getUser(); |
|
|
|
wxMerchantSubsidy.setTenantId(user.getTenantId()); |
|
|
|
wxMerchantSubsidy.setStatus(EnumMerchantSubsidyStatus.MANUAL_SUBSIDIED.getCode()); |
|
|
|
@@ -99,6 +106,9 @@ public class WxMerchantSubsidyController extends BaseController { |
|
|
|
@GetMapping("/exportData") |
|
|
|
public void exportData(@ModelAttribute WxMerchantSubsidy wxMerchantSubsidy, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
logger.info("[" + getIpAddr() + "] subsidy/exportData"); |
|
|
|
if (wxMerchantSubsidy == null) { |
|
|
|
throw new MallinkException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "过滤条件不能为空"); |
|
|
|
} |
|
|
|
wxMerchantSubsidy.setTenantId(getTenantId()); |
|
|
|
if(StringUtils.isNotBlank(wxMerchantSubsidy.getStatusStr())) { |
|
|
|
String [] statusAttr = wxMerchantSubsidy.getStatusStr().split(","); |
|
|
|
|