|
|
|
@@ -5,17 +5,14 @@ import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.controller.base.BaseController; |
|
|
|
import com.iformall.domain.po.MallUserInfo; |
|
|
|
import com.iformall.domain.po.WxBillRent; |
|
|
|
import com.iformall.domain.po.WxPayAccountBill; |
|
|
|
import com.iformall.domain.po.WxRentContract; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.enums.EnumFromType; |
|
|
|
import com.iformall.enums.EnumRentStartType; |
|
|
|
import com.iformall.mapper.WxRentContractMapper; |
|
|
|
import com.iformall.service.WxBillRentService; |
|
|
|
import com.iformall.service.WxMerchantService; |
|
|
|
import com.iformall.service.WxPayAccountBillService; |
|
|
|
import com.iformall.service.WxRentContractService; |
|
|
|
import com.iformall.service.WxShopService; |
|
|
|
import com.iformall.utils.DateUtils; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
@@ -47,7 +44,7 @@ public class WxRentContractController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private WxPayAccountBillService payAccountBillService; |
|
|
|
@Autowired |
|
|
|
private WxShopService wxShopService; |
|
|
|
private WxMerchantService wxMerchantService; |
|
|
|
@Autowired |
|
|
|
private WxRentContractMapper wxRentContractMapper; |
|
|
|
|
|
|
|
@@ -85,6 +82,13 @@ public class WxRentContractController extends BaseController { |
|
|
|
public ResultData add(@RequestBody WxRentContract wxRentContract) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::add"); |
|
|
|
|
|
|
|
WxMerchant wxMerchant = new WxMerchant(); |
|
|
|
wxMerchant.setName(wxRentContract.getMerchantName()); |
|
|
|
wxMerchant.setId(wxRentContract.getMerchantId()); |
|
|
|
if (wxMerchantService.hasMerchant(wxMerchant)) { |
|
|
|
return new ResultData(ErrorCode.MERCHANT_NAME_IS_FOUND); |
|
|
|
} |
|
|
|
|
|
|
|
MallUserInfo user = getUser(); |
|
|
|
wxRentContract.setTenantId(user.getTenantId()); |
|
|
|
wxRentContract.setAdjustPeriodHandle(); |
|
|
|
|