sqlite的api,便于内部使用
liuxiaolong
2019-10-11 af1996626affb7e34ad88978f618b5eec7e1972a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package dbapi
 
import "encoding/json"
 
type SysRoleApi struct {
 
}
 
func (sra SysRoleApi) FindAll() (bool,interface{}) {
    url := BASIC_URL + DATA_URL_PREFIX + "/role/findAll"
    client := NewClient()
    body, err := client.DoGetRequest(url, nil, nil)
    if err != nil {
        return false,nil
    }
 
    var res Result
    if err = json.Unmarshal(body, &res); err != nil {
        return false,nil
    }
    return true,res.Data
}