服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-08-28 0920be497d5028a5535019b3ba54d7897d51cc9c
Tiger.Business/DbCache/CodeRuleCache.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Text;
@@ -374,10 +375,21 @@
                    his.RULE_ID = rule.ID;
                    his.GEN_CODE = string.Concat(rule.Details.OrderBy(q => q.RULE_SEQ).Select(q => q.CodeValue));
                    his.GEN_DATE = DateTime.Now;
                    Biz.Db.Insertable(his).ExecuteCommand();
                    try
                    {
                       Biz.Db.Insertable(his).ExecuteCommand();
                    }
                    catch (System.Exception ex)
                    {
                        throw new DataException(his.GEN_CODE, ex);
                    }
                    result.Data = his.GEN_CODE;
                }
            }
            catch (DataException ex)
            {
                result.CatchExceptionWithLog(ex.InnerException, Biz.L("BAS.CodeRule.GenerateSnHisException", ruleCode, ex.Message));
            }
            catch (System.Exception ex)
            {
                result.CatchExceptionWithLog(ex, Biz.L("BAS.CodeRule.GenerateException", ruleCode, string.Join(", ", args)));