增加防御代码,防止恶意攻击(优化)
This commit is contained in:
@@ -52,26 +52,6 @@ public class SupplierController {
|
|||||||
@Resource
|
@Resource
|
||||||
private UserService userService;
|
private UserService userService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新供应商-只更新预付款,其余用原来的值
|
|
||||||
* @param supplierId
|
|
||||||
* @param advanceIn
|
|
||||||
* @param request
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping(value = "/updateAdvanceIn")
|
|
||||||
public String updateAdvanceIn(@RequestParam("supplierId") Long supplierId,
|
|
||||||
@RequestParam("advanceIn") BigDecimal advanceIn,
|
|
||||||
HttpServletRequest request)throws Exception {
|
|
||||||
Map<String, Object> objectMap = new HashMap<String, Object>();
|
|
||||||
int res = supplierService.updateAdvanceIn(supplierId, advanceIn);
|
|
||||||
if(res > 0) {
|
|
||||||
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
|
|
||||||
} else {
|
|
||||||
return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查找客户信息-下拉框
|
* 查找客户信息-下拉框
|
||||||
* @param request
|
* @param request
|
||||||
|
|||||||
@@ -240,9 +240,6 @@ public class SupplierService {
|
|||||||
|
|
||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public int updateAdvanceIn(Long supplierId, BigDecimal advanceIn)throws Exception{
|
public int updateAdvanceIn(Long supplierId, BigDecimal advanceIn)throws Exception{
|
||||||
logService.insertLog("商家",
|
|
||||||
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(supplierId).toString(),
|
|
||||||
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
|
||||||
Supplier supplier=null;
|
Supplier supplier=null;
|
||||||
try{
|
try{
|
||||||
supplier = supplierMapper.selectByPrimaryKey(supplierId);
|
supplier = supplierMapper.selectByPrimaryKey(supplierId);
|
||||||
|
|||||||
Reference in New Issue
Block a user