修改报错
This commit is contained in:
+7
-1
@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bms.common.exception.ServiceException;
|
||||
import com.bms.common.utils.DateUtils;
|
||||
import com.bms.customer.customerinfo.domain.BmsCustomer;
|
||||
import com.bms.customer.customerinfo.domain.BmsCustomerPriceSet;
|
||||
import com.bms.customer.customerinfo.domain.BmsCustomerPriceSetBatch;
|
||||
@@ -93,7 +94,7 @@ public class BmsCustomerPriceSetServiceImpl implements IBmsCustomerPriceSetServi
|
||||
if (existing != null)
|
||||
{
|
||||
bind.setCustomerPricesetId(existing.getCustomerPricesetId());
|
||||
// 弹框已不再采集生效/失效日期,未传入时保留库中原值
|
||||
// UI no longer collects bind dates: keep existing when not passed.
|
||||
if (bind.getPrBegindate() == null)
|
||||
{
|
||||
bind.setPrBegindate(existing.getPrBegindate());
|
||||
@@ -106,6 +107,11 @@ public class BmsCustomerPriceSetServiceImpl implements IBmsCustomerPriceSetServi
|
||||
}
|
||||
else
|
||||
{
|
||||
// pr_begindate NOT NULL; UI omits it — default to now (same as price-set bind).
|
||||
if (bind.getPrBegindate() == null)
|
||||
{
|
||||
bind.setPrBegindate(DateUtils.getNowDate());
|
||||
}
|
||||
rows = bindMapper.insertBind(bind);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user