queryByCondtion
===

```sql
select 
@pageTag(){
u.*,o.name org_name
@}
from core_user u left join core_org o on u.org_id=o.id where 1=1 and u.del_flag = 0 
@//数据权限，该sql语句功能点  
and #function("user.query")#
 @if(!isEmpty(orgId)){
    and  u.org_id =#orgId#
@}
@if(!isEmpty(code)){
    and  u.code like #"%"+code+"%"#
@}
@if(!isEmpty(name)){
    and  u.name like #"%"+name+"%"#
@}
@if(!isEmpty(state)){
    and  u.state = #state#
@}
@if(!isEmpty(jobType0)){
    and  u.job_type0= #jobType0#
@}
@if(!isEmpty(jobType1)){
    and  u.job_type1= #jobType1#
@}
@if(!isEmpty(createTimeStart)){
    and  u.create_time>= #createTimeStart#
@}
@if(!isEmpty(createTimeEnd)){
    and  u.create_time< #nextDay(createTimeEnd)#
@}
```
@ mapping("UsersMapping");

batchDelUserByIds
===
    update core_user set del_flag = 1 where id in( #join(ids)#)
    
batchUpdateUserState
===
    update core_user set state = #state# where id in( #join(ids)#)
    
queryUserRole
===

* 查询用户所有权限

```sql
select	
ur.*, u.code as user_code,
u.name as user_name,
org.name as org_name, role.name as role_name
from core_user_role ur
left join core_org org on org.id = ur.org_id
left join core_user u on u.id = ur.user_id
left join core_role role on role.id = ur.role_id
where u.id=#id# 
@if(isNotEmpty(orgId)){
    and org.id=#orgId#
@}
@if(isNotEmpty(roleId)){
    and role.id=#roleId#
@}
```

UsersMapping
===
```
    var user_mapping_var={
                      "id": "core_user_map",
                      "mapping": {
                          "resultType": "com.ibeetl.admin.core.entity.CoreUser",
                          "id": "id",
                          "createTime": "create_time",
                          "code": "code",
                          "name": "name",
                          "state": "state",
                          "jobType0": "job_type0",
                          "jobType1": "job_type1",
                          "updateTime": "update_time",
                          "attachmentId": "attachment_id",
                          "org": {
                              "resultType": "com.ibeetl.admin.core.entity.CoreOrg",
                              "id": "org_id",
                              "name": "org_name"
                          }
                      }
                  };
```