|
|
|
@@ -14,6 +14,7 @@ import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@@ -28,7 +29,7 @@ public class WxMerchantSubsidyController extends BaseController { |
|
|
|
@GetMapping("sum") |
|
|
|
public ResultData count(@ModelAttribute WxMerchantSubsidy wxMerchantSubsidy) { |
|
|
|
String ipStr = getIpAddr(); |
|
|
|
logger.info("subsidysum: " + ipStr + " :" + wxMerchantSubsidy.toString()); |
|
|
|
logger.info("subsidy/sum: " + ipStr + " :" + wxMerchantSubsidy.toString()); |
|
|
|
if (wxMerchantSubsidy == null) wxMerchantSubsidy = new WxMerchantSubsidy(); |
|
|
|
MallUserInfo user = getUser(); |
|
|
|
wxMerchantSubsidy.setTenantId(user.getTenantId()); |
|
|
|
@@ -43,7 +44,7 @@ public class WxMerchantSubsidyController extends BaseController { |
|
|
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) |
|
|
|
public ResultData listMonth(@ModelAttribute WxMerchantSubsidy wxMerchantSubsidy, Integer pageNum, Integer pageSize) { |
|
|
|
String ipStr = getIpAddr(); |
|
|
|
logger.info("subsidylist: " + ipStr + " :" + wxMerchantSubsidy.toString()); |
|
|
|
logger.info("subsidy/list: " + ipStr + " :" + wxMerchantSubsidy.toString()); |
|
|
|
if (wxMerchantSubsidy == null) wxMerchantSubsidy = new WxMerchantSubsidy(); |
|
|
|
MallUserInfo user = getUser(); |
|
|
|
wxMerchantSubsidy.setTenantId(user.getTenantId()); |
|
|
|
@@ -51,4 +52,16 @@ public class WxMerchantSubsidyController extends BaseController { |
|
|
|
return new ResultData(page); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("更新补贴记录") |
|
|
|
@PostMapping("update") |
|
|
|
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.setUpdateDate(new Date()); |
|
|
|
return wxMerchantSubsidyService.saveOrUpdate(wxMerchantSubsidy); |
|
|
|
} |
|
|
|
|
|
|
|
} |