Commit 6393dcbe authored by tangfang's avatar tangfang

修改余额为0的处理,

添加银行卡空指针问题
parent 46050cc9
...@@ -5,6 +5,7 @@ import com.pangding.web.authority.service.company.CompanyTollPointService; ...@@ -5,6 +5,7 @@ import com.pangding.web.authority.service.company.CompanyTollPointService;
import com.pangding.web.vo.system.pd.company.CompanyTollPointVo; import com.pangding.web.vo.system.pd.company.CompanyTollPointVo;
import com.pangding.web.vo.system.req.company.CompanyTollPointReqVo; import com.pangding.web.vo.system.req.company.CompanyTollPointReqVo;
import com.pangding.web.vo.system.res.company.CompanyTollPointResVo; import com.pangding.web.vo.system.res.company.CompanyTollPointResVo;
import com.yanzuoguang.util.helper.CheckerHelper;
import com.yanzuoguang.util.vo.PageSizeData; import com.yanzuoguang.util.vo.PageSizeData;
import com.yanzuoguang.util.vo.ResponseResult; import com.yanzuoguang.util.vo.ResponseResult;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -44,6 +45,12 @@ public class CompanyTollPointController { ...@@ -44,6 +45,12 @@ public class CompanyTollPointController {
@RequestMapping(value = "/save", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "/save", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ApiOperation(value = "保存公司收费点", notes = "返回公司收费点信息") @ApiOperation(value = "保存公司收费点", notes = "返回公司收费点信息")
public ResponseResult<CompanyTollPointVo> save(@RequestBody CompanyTollPointReqVo req) { public ResponseResult<CompanyTollPointVo> save(@RequestBody CompanyTollPointReqVo req) {
CheckerHelper.newInstance()
.notBlankCheck("tollPoints", req.getTollPoints())
.notBlankCheck("companyId", req.getCompanyId())
.notBlankCheck("tollPointsName", req.getTollPointsName())
// .notBlankCheck("tollPointsModel", req.getTollPointsModel())
.checkException();
return ResponseResult.result(companyTollPointService.save(req)); return ResponseResult.result(companyTollPointService.save(req));
} }
...@@ -57,10 +64,12 @@ public class CompanyTollPointController { ...@@ -57,10 +64,12 @@ public class CompanyTollPointController {
@RequestMapping(value = "/delCompanyTollPoint", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "/delCompanyTollPoint", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ApiOperation(value = "删除公司收费点", notes = "返回删除结果") @ApiOperation(value = "删除公司收费点", notes = "返回删除结果")
public ResponseResult<String> delCompanyTollPoint(@RequestBody CompanyTollPointReqVo req) { public ResponseResult<String> delCompanyTollPoint(@RequestBody CompanyTollPointReqVo req) {
CheckerHelper.newInstance()
.notBlankCheck("companyPointId", req.getCompanyPointId())
.checkException();
companyTollPointService.delCompanyTollPoint(req); companyTollPointService.delCompanyTollPoint(req);
return ResponseResult.result("处理完成"); return ResponseResult.result("处理完成");
} }
} }
...@@ -40,9 +40,8 @@ public class CompanyTollPointServiceImpl implements CompanyTollPointService { ...@@ -40,9 +40,8 @@ public class CompanyTollPointServiceImpl implements CompanyTollPointService {
companyTollPointVo.setCompanyPointId(StringHelper.getNewID()); companyTollPointVo.setCompanyPointId(StringHelper.getNewID());
companyTollPointDao.create(companyTollPointVo); companyTollPointDao.create(companyTollPointVo);
} else { } else {
ObjectHelper.writeWithFromClass(companyTollPointVo, req); req.setCompanyPointId(companyTollPointVo.getCompanyPointId());
companyTollPointVo.setCompanyPointId(companyTollPointVo.getCompanyPointId()); companyTollPointDao.update(req);
companyTollPointDao.update(companyTollPointVo);
} }
return companyTollPointVo; return companyTollPointVo;
} }
......
...@@ -41,6 +41,7 @@ public class CompanyCodeServiceImpl implements CompanyCodeService { ...@@ -41,6 +41,7 @@ public class CompanyCodeServiceImpl implements CompanyCodeService {
companyCodeReqVo.setCompanyId(req.getCompanyId()); companyCodeReqVo.setCompanyId(req.getCompanyId());
companyCodeReqVo.setCodeCode(req.getCodeCode()); companyCodeReqVo.setCodeCode(req.getCodeCode());
companyCodeReqVo.setCodeType(req.getCodeType()); companyCodeReqVo.setCodeType(req.getCodeType());
companyCodeReqVo.setCodeLink(req.getCodeLink());
CompanyCodeVo companyCodeVo = companyCodeDao.load(companyCodeReqVo, CompanyCodeVo.class); CompanyCodeVo companyCodeVo = companyCodeDao.load(companyCodeReqVo, CompanyCodeVo.class);
if(StringHelper.isEmpty(companyCodeVo)){ if(StringHelper.isEmpty(companyCodeVo)){
companyCodeVo = new CompanyCodeVo(); companyCodeVo = new CompanyCodeVo();
......
...@@ -1472,9 +1472,12 @@ public class CompanyServiceImpl implements CompanyService { ...@@ -1472,9 +1472,12 @@ public class CompanyServiceImpl implements CompanyService {
CompanyResVo companyResVo = companyDao.load(req.getId(), CompanyResVo.class); CompanyResVo companyResVo = companyDao.load(req.getId(), CompanyResVo.class);
if(!StringHelper.isEmpty(req.getTollPoint())){ // 1 == req.getQuerySource() if(!StringHelper.isEmpty(req.getTollPoint())){ // 1 == req.getQuerySource()
CompanyTollPointReqVo companyTollPointReqVo = new CompanyTollPointReqVo(); CompanyTollPointReqVo companyTollPointReqVo = new CompanyTollPointReqVo();
companyTollPointReqVo.setCompanyId(req.getCompanyId()); companyTollPointReqVo.setCompanyId(req.getId());
companyTollPointReqVo.setTollPoints(req.getTollPoint()); companyTollPointReqVo.setTollPoints(req.getTollPoint());
List<CompanyTollPointVo> companyTollPointVos = companyTollPointDao.loadList(companyTollPointReqVo, CompanyTollPointVo.class); List<CompanyTollPointVo> companyTollPointVos = companyTollPointDao.loadList(companyTollPointReqVo, CompanyTollPointVo.class);
if(StringHelper.isEmpty(companyTollPointVos) || companyTollPointVos.size() == 0){
throw new CodeException("99", "未获取到收费点,请联系客服人员查询二维码是否正确。");
}
companyResVo.setCompanyTollPointVoList(companyTollPointVos); companyResVo.setCompanyTollPointVoList(companyTollPointVos);
} }
CompanyVo companyVo = new CompanyVo(); CompanyVo companyVo = new CompanyVo();
......
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