diff --git a/addons/system_dict/controllers/system_dict_option.py b/addons/system_dict/controllers/system_dict_option.py index d904a5f913978d1894cbbdfe86588208ecec6185..38dc83b4665c01205eea3d7eb7357a128563f4ee 100644 --- a/addons/system_dict/controllers/system_dict_option.py +++ b/addons/system_dict/controllers/system_dict_option.py @@ -22,7 +22,7 @@ class SystemDictOptionController(http.Controller): """ dict_ = M('system.dict').search_one([('code', '=', code)]) dict_.ensure_one(f'数据字典不存在:{code}') - options = M('system.dict.option').search_read(domain=[('dict_id', '=', dict_.id)], fields=fields_) + options = M('system.dict.option').search_read(domain=[('dict_id', '=', dict_.id)], fields=fields_, order="sort DESC") return R.data(options) @restapi_route("system/dict//option", methods=['POST']) diff --git a/addons/xcj_system/models/sys_models.py b/addons/xcj_system/models/sys_models.py index 661d5c19b6ae62a3be8e51edde07889e037e809b..7df9280ff7a1422d227876707f49198d5c6401ba 100644 --- a/addons/xcj_system/models/sys_models.py +++ b/addons/xcj_system/models/sys_models.py @@ -558,5 +558,7 @@ class SysUserTokenEntity(ModelMixin): token = get_header('token') if not token: return False + print("-" * 30) + print(token) domain = [("access_token", "=", token), ('expire_time', '>', get_current_seconds())] return self.search(domain=domain).user_id