select stamp
from user_info
where id = #{id}
select stamp
from user_info
where id in
#{item}
SELECT user_info.*,
user_group.`name` AS group_name,
user_group.en_name AS group_en_name,
agent_level.`name` AS agent_level_name,
agent_level.en_name AS agent_level_en_name,
user_role.`name` as role_name,
area.area_name as area_name,
coun.`name` countryName,coun.`en_name` countryEnName
FROM user_info
LEFT JOIN user_group ON user_group.id= user_info.group_id
LEFT JOIN agent_level ON agent_level.id=user_info.agent_level
LEFT JOIN user_role ON user_role.id =user_info.role_id
LEFT JOIN sys_area area ON area.id =user_info.area_id
LEFT JOIN sys_country coun ON coun.code =user_info.country
order by user_info.add_time desc
limit #{page.offset},#{page.row}
SELECT count(user_info.id)
FROM user_info
where user_info.role_id!=-1
and user_info.name like concat('%',#{name},'%')
and user_info.username like concat('%',#{username},'%')
and user_info.email like concat('%',#{email},'%')
and user_info.ib_no like concat('%',#{ibNo},'%')
and user_info.role_id =#{roleId}
and user_info.valid =#{valid}
AND user_info.add_time>#{startDate}
AND user_info.verified>#{verified}
AND (user_info.secret_key is null or user_info.secret_key='')
AND user_info.secret_key is not null and user_info.secret_key!=''
AND #{endDate}>user_info.add_time
and user_info.country = #{country}
and user_info.merchant_id = #{merchantId}
SELECT user_info.*,
user_group.`name` AS group_name,
user_group.en_name AS group_en_name,
agent_level.`name` AS agent_level_name,
agent_level.en_name AS agent_level_en_name,
user_role.`name` as role_name,
user_role.department_id,
area.area_name
FROM user_info
LEFT JOIN user_group ON user_group.id = user_info.group_id
LEFT JOIN agent_level ON agent_level.id = user_info.agent_level
LEFT JOIN user_role ON user_role.id = user_info.role_id
LEFT JOIN sys_area area ON area.id = user_info.area_id
where user_info.id = #{id}
select sales.id, sales.`name`, sales.email, sales.ib_no
from user_info sales
left join user_role role on sales.role_id = role.id
where role.`code` = #{roleCode}
and sales.valid=1
and sales.pid = #{pId}
select sales.id, sales.`name`, sales.email, sales.ib_no
from user_info sales
left join user_role role on sales.role_id = role.id
where role.`code` ='ROLE_SALE' and ifnull(sales.leader_id,0) != sales.id
and sales.sales_type=2
and sales.valid=1 ;
select *
from user_info
where role_id is null limit 0,1
select *
from user_info
where stamp like binary concat(#{stamp}
, '%')
and stamp != binary #{stamp}
select *
from user_info
where stamp like binary concat(#{stamp}
, '%')
select ui.*
from user_info ui
inner join user_role ur on ui.role_id = ur.id
where ur.`code` = 'ROLE_SALE'
and ui.stamp like binary concat(#{stamp}
, '%')
select MAX(binary stamp)
from user_info
where pid = #{pid}
update user_info
when id=#{item.id} then #{item.stamp}
when id=#{item.id} then #{item.pStamp}
when id=#{item.id} then #{item.idStamp}
and id in
#{item.id}
select stamp
from user_info
where id = #{id}
update user_info sales
set sales.sales_share = #{share}
where stamp like binary concat(#{stamp}
, '%')
select *
from user_info
where ib_no = #{ibNo} limit 0,1
select 1
from user_info
where area_id = #{areaId} limit 1
update user_info
when id=#{item.id} then #{item.idStamp}
and id in
#{item.id}
select id,ib_no
from user_info
where ib_no in
#{item}
update user_info
set balance = #{balance}
where id = #{id}
select *
from user_info
where id = #{id}
select id, pid, ib_no, `name`, ib_no_temp
from user_info
where role_id = #{roleId}
order by pid asc
select id, pid, ib_no, `name`
from user_info
where email = #{email}
SELECT count(a.id) FROM user_info a
LEFT JOIN user_role b ON a.role_id = b.id
where b.code = 'ROLE_SALE'
and a.name like concat('%',#{name},'%')
and a.email like concat('%',#{email},'%')
and a.ib_no like concat('%',#{ibNo},'%')
SELECT a.id,a.email, a.ib_no, a.name ,a.username, a.ib_no_temp,a.valid,
b.name role_name, c.`name` group_name,c.en_name group_en_name, d.area_name
FROM user_info a
LEFT JOIN user_role b ON a.role_id = b.id
LEFT JOIN user_group c ON a.group_id= c.id
LEFT JOIN sys_area d ON a.area_id= d.id
where b.code = 'ROLE_SALE' and valid = 1
and a.name like concat('%',#{name},'%')
and a.email like concat('%',#{email},'%')
and a.ib_no like concat('%',#{ibNo},'%')
order by a.id desc
limit #{page.offset},#{page.row}
SELECT a.id,a.email, a.ib_no, a.name ,a.username, a.ib_no_temp,a.valid
FROM user_info a
and a.email like concat(#{email},'%')
and a.ib_no like concat(,#{ibNo},'%')
order by a.id desc
select ib_no
from user_info
where role_id = -1 and ib_no in
#{item}