|
|
@@ -2272,6 +2272,24 @@ func System_FindOptionsetPage(c *entitys.CtrlContext) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+// _GetOptionsetByCode
|
|
|
+// @Title _GetOptionsetByCode
|
|
|
+// @Description 根据编码查找字典
|
|
|
+// @Param code string false "字典编码"
|
|
|
+// @Success 200 {object} Account
|
|
|
+// @Failure 403 :id is empty
|
|
|
+func System_GetOptionsetByCode(c *entitys.CtrlContext) {
|
|
|
+ code := c.Ctx.Query("code")
|
|
|
+
|
|
|
+ var option sysmodel.SysOptionset
|
|
|
+ exit, err := c.Db.Table(new(sysmodel.SysOptionset)).Where("code = ?", code).Get(&option)
|
|
|
+ if exit && err == nil {
|
|
|
+ c.Ctx.JSON(200, sysmodel.SysReturn{200, "", option})
|
|
|
+ } else {
|
|
|
+ c.Ctx.JSON(500, sysmodel.SysReturn{500, "", nil})
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
func __none_func_system__(params ...interface{}) bool {
|
|
|
return true
|
|
|
}
|