| | |
| | | } |
| | | private static readonly ObjectCache Cache = MemoryCache.Default; |
| | | private const string CachePrefix = "ClickProtection_"; |
| | | private const int CacheDurationInSeconds = 2; |
| | | private const int CacheDurationInSeconds = 5; |
| | | |
| | | public static bool IsClickAllowed(string parameter) |
| | | { |
| | |
| | | |
| | | |
| | | var result = new SimpleResult(); |
| | | if (!IsClickAllowed(model.cntr_code)) |
| | | if (!IsClickAllowed("1")) |
| | | { |
| | | // 提示用户5秒内已点击过 |
| | | result.resultMsg = "您已点击过,请2秒后再试。"; |
| | | result.resultMsg = "您已点击过,请5秒后再试。"; |
| | | result.resultCode = 1; |
| | | return result; |
| | | } |
| | |
| | | { |
| | | result = await CBAddOutboundOrder(GZRQ, db, model.MaterList, model.arrival_no, model.cntr_code, start); |
| | | } |
| | | if (result.resultCode == 1) |
| | | { |
| | | return result; |
| | | } |
| | | //if (result.resultCode == 1) |
| | | //{ |
| | | // return result; |
| | | //} |
| | | //通用接口 对容器货品的删减 和生成回库单 都要用的接口 |
| | | result = await AllTYAddOutboundOrder(db, model.MaterList, model.arrival_no, model.cntr_code, start, po.S_OUT_TYPE, model.cntr_type); |
| | | if (result.resultCode == 1) |
| | |
| | | { |
| | | |
| | | var result = new SimpleResult(); |
| | | if (!IsClickAllowed(model.cntr_code)) |
| | | if (!IsClickAllowed("1")) |
| | | { |
| | | // 提示用户5秒内已点击过 |
| | | result.resultMsg = "您已点击过,请2秒后再试。"; |
| | | result.resultMsg = "您已点击过,请5秒后再试。"; |
| | | result.resultCode = 1; |
| | | return result; |
| | | } |