Commit 7422fd7c authored by yangyang's avatar yangyang

农户注册、发起合同增加日志

parent c597bc22
......@@ -19,6 +19,7 @@ import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -47,6 +48,7 @@ import java.util.stream.Collectors;
@RestController
@Api(tags = "Api")
@RequestMapping(value = "/household-contract")
@Slf4j
public class HouseholdContractController extends BaseController {
private static final Logger logger = LoggerFactory.getLogger(HouseholdContractController.class);
@Autowired
......@@ -319,6 +321,7 @@ public class HouseholdContractController extends BaseController {
try {
householdContract = householdContractServiceImpl.reissueinitiateHouseholdContract(model);
}catch (Exception e){
log.error("重新发起合同错误, 入参: {}, error:", JSON.toJSONString(model), e);
throw new BadRequest(e.getMessage());
}
return ResponseHelper.buildResponse(householdContract);
......
package com.yeejoin.amos.boot.module.hygf.biz.controller;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.module.hygf.api.config.UserLimits;
import com.yeejoin.amos.boot.module.hygf.api.dto.DropDown;
import com.yeejoin.amos.boot.module.hygf.api.entity.Maintenance;
......@@ -9,6 +10,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.JpStationMapper;
import com.yeejoin.amos.boot.module.hygf.api.mapper.MaintenanceMapper;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
......@@ -22,6 +24,7 @@ import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.MaintenanceServiceImpl;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -43,6 +46,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
@RestController
@Api(tags = "运维人员Api")
@RequestMapping(value = "/maintenance")
@Slf4j
public class MaintenanceController extends BaseController {
@Autowired
......@@ -62,7 +66,12 @@ public class MaintenanceController extends BaseController {
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增运维人员", notes = "新增运维人员")
public ResponseModel<Maintenance> save(@RequestBody Maintenance model) {
try {
model = maintenanceServiceImpl.saveMaintenance(model);
} catch (Exception e) {
log.error("农户注册错误, 入参: {}, error:", JSON.toJSONString(model), e);
throw new BadRequest(e.getMessage());
}
return ResponseHelper.buildResponse(model);
}
......
......@@ -30,6 +30,7 @@ import com.yeejoin.amos.boot.module.hygf.biz.service.impl.QiyuesuoServiceImpl;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.ToDoTasksServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -59,6 +60,7 @@ import java.util.Map;
@RestController
@Api(tags = "契税锁Api")
@RequestMapping(value = "/qiyuesuo")
@Slf4j
public class QiyuesuoController extends BaseController {
private static final Logger logger = LoggerFactory.getLogger(QiyuesuoController.class);
......@@ -139,6 +141,7 @@ public class QiyuesuoController extends BaseController {
try {
householdContract = householdContractServiceImpl.initiateHouseholdContract(model);
} catch (Exception e) {
log.error("创建合同错误, 入参: {}, error:", JSON.toJSONString(model), e);
throw new BadRequest(e.getMessage());
}
return ResponseHelper.buildResponse(householdContract);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment