Просмотр исходного кода

[租赁物业合同][修改][修改请求方式及判断是否存在合同]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
39e1319488
2 измененных файлов: 6 добавлений и 5 удалений
  1. +2
    -4
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java
  2. +4
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

+ 2
- 4
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java Просмотреть файл

@@ -9,10 +9,7 @@ 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.WxShop;
import com.iformall.enums.EnumFromType;
import com.iformall.enums.EnumRentContractAdjustPeriod;
import com.iformall.enums.EnumRentShopType;
import com.iformall.enums.EnumRentStartType;
import com.iformall.mapper.WxRentContractMapper;
import com.iformall.service.WxBillRentService;
@@ -27,6 +24,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
@@ -236,7 +234,7 @@ public class WxRentContractController extends BaseController {
wxRentContractService.exportContract(request,response,getTenantId(),id);
}

@GetMapping("updateRentContractStatus")
@PostMapping("updateRentContractStatus")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)
@SystemControllerLog(description = "租赁合同-更新合同状态")
public ResultData updateRentContractStatus(Long id) {


+ 4
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -1332,13 +1332,16 @@ public class WxRentContractServiceImpl implements WxRentContractService {
if (id == null) {
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
}
WxRentContract record = wxRentContractMapper.selectByPrimaryKey(id);
if (record == null) {
return new ResultData(ErrorCode.RENT_CONTRACT_IS_NOT_FOUND);
}
//更新合同状态为签约
WxRentContract wxRentContract = new WxRentContract();
wxRentContract.setId(id);
wxRentContract.setStatus(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode());
wxRentContractMapper.updateByPrimaryKeySelective(wxRentContract);
//建立账单
WxRentContract record = wxRentContractMapper.selectByPrimaryKey(id);
if (record != null &&
record.getMerchantId() != null &&
record.getStatus().equals(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()) &&


Загрузка…
Отмена
Сохранить