Coder Social home page Coder Social logo

nwf's People

Contributors

elvinzeng avatar gitter-badger avatar links7094 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nwf's Issues

不同路径下的同名controller会被覆盖

不同路径下的同名controller会被覆盖,比如:www/controller/aaa/DemoController.lua与www/controller/bbb/DemoController.lua,在注册controller时将会出现相互覆盖的bug.

2017.04.19

配置了模块搜索路径的时候 load会加载搜索路径下的全部模块

404等页面

需要增加404、5XX等自定义异常页面

请求id异常

貌似请求的nid一直都是1,好像现在不会变化了。

关联查询异常

错误信息:
error: function [get], file [www/controller/DemoController.lua], line number [38].

[string "script/ide/STL/UnorderedArraySet.lua"]:115: table index is nil

stack traceback:
[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:284: in function '__newindex'
[string "script/ide/STL/UnorderedArraySet.lua"]:115: in function 'add'
[string "npl_packages/nwf/npl_mod/nwf/db/dbTemplate.lua"]:84: in function 'getListFromCursor'
[string "npl_packages/nwf/npl_mod/nwf/db/dbTemplate.lua"]:270: in function 'queryFirst'
[string "www/controller/DemoController.lua"]:67: in function 'action'
[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:261: in function <[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:242>
[C]: in function 'xpcall'
[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:242: in function 'process'
[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:305: in function <[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:304>
[C]: in function 'xpcall'
[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:304: in function 'doNext'
[string "npl_packages/nwf/npl_mod/nwf/session.lua"]:157: in function <[string "npl_packages/nwf/npl_mod/nwf/session.lua"]:149>
[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:300: in function <[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:299>
[C]: in function 'xpcall'
[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:299: in function 'doFilter'
[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:302: in function 'doNext'
[string "npl_packages/nwf/npl_mod/nwf/loader.lua"]:49: in function <[string "npl_packages/nwf/npl_mod/nwf/loader.lua"]:40>
[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:300: in function <[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:299>
[C]: in function 'xpcall'
[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:299: in function 'doFilter'
[string "npl_packages/nwf/npl_mod/nwf/dispatcher.lua"]:340: in function 'handle'
[string "www/router.lua"]:9: in function <[string "www/router.lua"]:8>

测试代码:
local sql = "SELECT c.cart_id AS cid , u.user_name AS uname FROM tb_cart c LEFT JOIN tb_user u ON c.user_id = u.user_id WHERE c.cart_id='7f293e5d-a1bf-403c-c091-49d144021be9'";

local data,err = dbTemplate:queryFirst(sql, {"tb_cart","tb_user"});

model内容:

local user = commonlib.gettable("entity.user");
user.tbName = "tb_user";
user.fields = {
user_id = {notNil = true,isPrimaryKey = true},
user_name = {notNil = false},
password = {notNil = false},
eidt_time = {notNil = false},
create_time = {notNil = false},
is_deleted = {notNil = false}
}

local cart = commonlib.gettable("entity.cart");
cart.tbName = "tb_cart";
cart.fields = {
cart_id = {notNil = true,isPrimaryKey = true},
user_id = {notNil = true},
product_price = {notNil = true},
eidt_time = {notNil = false},
create_time = {notNil = false},
is_deleted = {notNil = false}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.