|
|
|
@@ -5,7 +5,9 @@ import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.MallUserInfo; |
|
|
|
import com.iformall.domain.po.WxMerchantSubsidy; |
|
|
|
import com.iformall.domain.vo.WxMerchantSubsidyVo; |
|
|
|
import com.iformall.enums.EnumMerchantSubsidyStatus; |
|
|
|
import com.iformall.service.WxMerchantSubsidyService; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
@@ -18,6 +20,7 @@ import java.util.Date; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@Api(description = "商户补贴接口") |
|
|
|
@RequestMapping("subsidy") |
|
|
|
public class WxMerchantSubsidyController extends BaseController { |
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass()); |
|
|
|
@@ -53,13 +56,14 @@ public class WxMerchantSubsidyController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("更新补贴记录") |
|
|
|
@PostMapping("update") |
|
|
|
@PostMapping("updateSubsidied") |
|
|
|
public ResultData listMonth(@RequestBody WxMerchantSubsidy wxMerchantSubsidy) { |
|
|
|
String ipStr = getIpAddr(); |
|
|
|
logger.info("subsidy/update: " + ipStr + " :" + wxMerchantSubsidy.toString()); |
|
|
|
if (wxMerchantSubsidy == null) wxMerchantSubsidy = new WxMerchantSubsidy(); |
|
|
|
MallUserInfo user = getUser(); |
|
|
|
wxMerchantSubsidy.setTenantId(user.getTenantId()); |
|
|
|
wxMerchantSubsidy.setStatus(EnumMerchantSubsidyStatus.SUBSIDIED.getCode()); |
|
|
|
wxMerchantSubsidy.setUpdateDate(new Date()); |
|
|
|
return wxMerchantSubsidyService.saveOrUpdate(wxMerchantSubsidy); |
|
|
|
} |
|
|
|
|