修改物资编辑价格失败问题

master
郑明梁 2 years ago
parent 810ecde3be
commit 58d8214ca8

@ -40,6 +40,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
@ -681,7 +682,8 @@ public class UdiRelevanceController extends BaseController {
if (udiProductEntity.getRelSupId() != null) { if (udiProductEntity.getRelSupId() != null) {
UdiRlSupEntity udiRlSupEntity = new UdiRlSupEntity(); UdiRlSupEntity udiRlSupEntity = new UdiRlSupEntity();
udiRlSupEntity.setUpdateTime(new Date()); udiRlSupEntity.setUpdateTime(new Date());
udiRlSupEntity.setId(udiProductEntity.getId()); udiRlSupEntity.setPrice(new BigDecimal(udiProductEntity.getPrice()));
udiRlSupEntity.setId(udiProductEntity.getRelSupId());
udiRlSupService.updateCompanyProductRelevance(udiRlSupEntity); udiRlSupService.updateCompanyProductRelevance(udiRlSupEntity);
} }
if (falg) { if (falg) {

@ -30,6 +30,8 @@ public interface UdiRlSupService {
int updateCompanyProductRelevance(UdiRlSupEntity companyCertEntity); int updateCompanyProductRelevance(UdiRlSupEntity companyCertEntity);
int updateCompanyProductRelevanceByUdiFk(UdiRlSupEntity companyCertEntity);
boolean insertCompanyProductRelevance(UdiRlSupEntity companyCertEntity); boolean insertCompanyProductRelevance(UdiRlSupEntity companyCertEntity);
boolean deleteById(String id); boolean deleteById(String id);

@ -1,5 +1,6 @@
package com.glxp.api.service.basic.impl; package com.glxp.api.service.basic.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.basic.UdiRlSupDao; import com.glxp.api.dao.basic.UdiRlSupDao;
import com.glxp.api.entity.basic.UdiRlSupEntity; import com.glxp.api.entity.basic.UdiRlSupEntity;
@ -103,6 +104,13 @@ public class UdiRlSupServiceImpl implements UdiRlSupService {
return udiRlSupDao.updateById(udiRlSupEntity); return udiRlSupDao.updateById(udiRlSupEntity);
} }
@Override
public int updateCompanyProductRelevanceByUdiFk(UdiRlSupEntity companyCertEntity) {
QueryWrapper<UdiRlSupEntity> ew=new QueryWrapper<>();
ew.eq("udiRlIdFk",companyCertEntity.getUdiRlIdFk());
return udiRlSupDao.update(companyCertEntity,ew);
}
@Override @Override
public boolean insertCompanyProductRelevance(UdiRlSupEntity udiRlSupEntity) { public boolean insertCompanyProductRelevance(UdiRlSupEntity udiRlSupEntity) {
return udiRlSupDao.insertCompanyProductRelevance(udiRlSupEntity); return udiRlSupDao.insertCompanyProductRelevance(udiRlSupEntity);

Loading…
Cancel
Save