|
|
@@ -643,7 +643,7 @@ public class promotion extends Controller {
|
|
|
Long sa_promotionid = content.getLong("sa_promotionid");
|
|
|
boolean isrecheck = content.getBooleanValue("isrecheck");
|
|
|
Rows rows = dbConnect
|
|
|
- .runSqlQuery("select sa_promotionid,status,promnum from sa_promotion where sa_promotionid ='"
|
|
|
+ .runSqlQuery("select sa_promotionid,status,promnum,type from sa_promotion where sa_promotionid ='"
|
|
|
+ sa_promotionid + "' and siteid='" + siteid + "'");
|
|
|
for (Row row : rows) {
|
|
|
if (isrecheck) {
|
|
|
@@ -656,11 +656,14 @@ public class promotion extends Controller {
|
|
|
return getErrReturnObject().setErrMsg("单号为:【" + row.getString("promnum") + "】的促销方案为非发布状态,无法反发布")
|
|
|
.toString();
|
|
|
}
|
|
|
- Rows orderRows = dbConnect.runSqlQuery("select * from sa_order where sa_promotionid="+sa_promotionid+" and siteid='"+siteid+"'");
|
|
|
- if(orderRows.isNotEmpty()){
|
|
|
- return getErrReturnObject().setErrMsg("该方案已存在订单,无法取消发布")
|
|
|
- .toString();
|
|
|
+ if(row.getString("type").equals("套餐活动")){
|
|
|
+ Rows orderRows = dbConnect.runSqlQuery("select * from sa_order where sa_promotionid="+sa_promotionid+" and siteid='"+siteid+"'");
|
|
|
+ if(orderRows.isNotEmpty()){
|
|
|
+ return getErrReturnObject().setErrMsg("该方案已存在订单,无法取消发布")
|
|
|
+ .toString();
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|