| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.JSONPath; |
| | | import com.java110.core.factory.DataTransactionFactory; |
| | | import com.java110.db.dao.IQueryServiceDAO; |
| | | import com.java110.entity.service.ServiceSql; |
| | | import com.java110.service.context.DataQuery; |
| | | import com.java110.service.smo.IQueryServiceSMO; |
| | | import com.java110.utils.cache.ServiceSqlCache; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.BusinessException; |
| | | import com.java110.core.factory.DataTransactionFactory; |
| | | import com.java110.utils.log.LoggerEngine; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.service.context.DataQuery; |
| | | import com.java110.entity.service.ServiceSql; |
| | | import com.java110.service.dao.IQueryServiceDAO; |
| | | import com.java110.service.smo.IQueryServiceSMO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.ibatis.ognl.Ognl; |
| | | import org.apache.ibatis.ognl.OgnlException; |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> fallBack(String fallBackInfo) throws BusinessException { |
| | | |
| | | JSONArray params = JSONArray.parseArray(fallBackInfo); |
| | | for (int paramIndex = 0; paramIndex < params.size(); paramIndex++) { |
| | | JSONObject param = params.getJSONObject(paramIndex); |
| | | String sql = param.getString("fallBackSql"); |
| | | if (StringUtil.isEmpty(sql)) { |
| | | return new ResponseEntity<String>("未包含sql信息", HttpStatus.BAD_REQUEST); |
| | | } |
| | | int flag = queryServiceDAOImpl.updateSql(sql, null); |
| | | |
| | | } |
| | | return new ResponseEntity<String>("回退成功", HttpStatus.OK); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * {"PARAM:"{ |
| | | * "param1": "$.a.#A#Object", |