Browse Source

update

Signed-off-by: anderx <312518615@qq.com>
anderx 5 years ago
parent
commit
f42639b3d1

+ 5 - 2
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -1325,9 +1325,12 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		OrderOutsourceDtails oo=null;
 		if (o.getId()==null) {
 			oo=tOrderOutsourceMapper.selectByOrderNo(null,String.valueOf(o.getTid()));
+			if (oo==null) tOrderOutsourceMapper.insertSelective(o);
+			else tOrderOutsourceMapper.updateByPrimaryKeySelective(o);
+		}else {
+			tOrderOutsourceMapper.updateByPrimaryKeySelective(o);
 		}
-		if (oo==null) tOrderOutsourceMapper.insertSelective(o);
-		else tOrderOutsourceMapper.updateByPrimaryKeySelective(o);
+		
 			
 		updateOrderCostAmount(o.getTid(),o.getStartType());
 		return 1;