@Override
 protected String getSql() {
   StringBuilder sql = new StringBuilder();
   sql.append(" update ");
   sql.append(OrderEnum.Sales_Promotion.getDb_table());
   sql.append(" as t ");
   sql.append(" set ");
   sql.append(" state = @outOfDate ");
   this.addParam("@outOfDate string", PromotionStatus2.Out_of_date.getCode());
   sql.append(" where ");
   sql.append(" 1 = 1 ");
   //				this.addParam("@tenantsId guid", BillsConstant.getTenantsGuid(context));
   sql.append(" and t.state = @stopstatus ");
   this.addParam("@stopstatus string", PromotionStatus2.Stoped_sales.getCode());
   sql.append(" and t.goodsItemId = @goodsItemId ");
   this.addParam("@goodsItemId guid", event.goodsItemId);
   sql.append(" and t.endDate < @thisDate  ");
   this.addParam("@thisDate date", System.currentTimeMillis());
   return sql.toString();
 }
 @Override
 protected String getSql() {
   StringBuilder sql = new StringBuilder();
   sql.append(" update ");
   sql.append(OrderEnum.Sales_Promotion.getDb_table());
   sql.append(" as t ");
   sql.append(" set ");
   sql.append(" state = @stopstatus ");
   this.addParam("@stopstatus string", PromotionStatus2.Stoped_sales.getCode());
   sql.append(" where ");
   sql.append(" 1 = 1 ");
   //				this.addParam("@tenantsId guid", BillsConstant.getTenantsGuid(context));
   sql.append(" and( ");
   sql.append(" t.state = @issue ");
   this.addParam("@issue string", PromotionStatus2.Issue.getCode());
   sql.append(" or t.state = @promotioning ");
   this.addParam("@promotioning string", PromotionStatus2.Promotioning.getCode());
   sql.append(" ) ");
   sql.append(" and t.goodsItemId = @goodsItemId ");
   this.addParam("@goodsItemId guid", event.goodsItemId);
   return sql.toString();
 }