|
|
@@ -16,6 +16,7 @@ import com.iformall.service.WxBillRentService; |
|
|
import com.iformall.service.WxPayAccountBillService; |
|
|
import com.iformall.service.WxPayAccountBillService; |
|
|
import com.iformall.service.WxRentContractService; |
|
|
import com.iformall.service.WxRentContractService; |
|
|
import com.iformall.service.WxShopService; |
|
|
import com.iformall.service.WxShopService; |
|
|
|
|
|
import com.iformall.utils.DateUtils; |
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@@ -25,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
import java.util.HashMap; |
|
|
import java.util.HashMap; |
|
|
import java.util.Map; |
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
@@ -45,6 +47,21 @@ public class WxRentContractController extends BaseController { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private WxShopService wxShopService; |
|
|
private WxShopService wxShopService; |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("getDateDiff") |
|
|
|
|
|
@ApiImplicitParams({ |
|
|
|
|
|
@ApiImplicitParam(name = "startDate", value = "开始时间", dataType = "string", paramType = "query", required = true), |
|
|
|
|
|
@ApiImplicitParam(name = "endtDate", value = "结束时间", dataType = "string", paramType = "query", required = true)}) |
|
|
|
|
|
@SystemControllerLog(description = "获取两个时间相差,返回n月零n天") |
|
|
|
|
|
public ResultData getDateDiff(String startDate, String endtDate) throws Exception{ |
|
|
|
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::getTimeDiff"); |
|
|
|
|
|
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
|
|
int[] array = DateUtils.getDiff(sd.parse(startDate),sd.parse(endtDate)); |
|
|
|
|
|
Map<String,Integer> map = new HashMap<>(); |
|
|
|
|
|
map.put("month",array[0]); |
|
|
|
|
|
map.put("day",array[1]); |
|
|
|
|
|
return new ResultData(map); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("list") |
|
|
@GetMapping("list") |
|
|
@ApiImplicitParams({ |
|
|
@ApiImplicitParams({ |
|
|
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), |
|
|
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), |
|
|
|