Commit 7422fd7c authored by yangyang's avatar yangyang

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

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