| | |
| | | <result property="signOrder" column="SIGN_ORDER"/> |
| | | <result property="signDate" column="SIGN_DATE"/> |
| | | <result property="salarGrad" column="salarGrad"/> |
| | | <result property="allCustomer" column="allCustomer"/> |
| | | |
| | | <!-- 扩展属性 --> |
| | | <result property="shopName" column="SHOP_NAME"/> |
| | |
| | | <set> |
| | | update_time=now(), |
| | | <if test="updateBy!=null"> |
| | | update_by = #{btnKey}, |
| | | update_by = #{updateBy}, |
| | | </if> |
| | | <if |
| | | test="(suName!=null and suName!='') or (suName!='' and suName==0)"> |
| | |
| | | </update> |
| | | |
| | | <!-- 批量删除 --> |
| | | <delete id="deleteByIds" parameterType="java.util.List"> |
| | | delete from sys_users where su_id in |
| | | <update id="deleteByIds" parameterType="java.util.List"> |
| | | update sys_users set su_valid='N' where su_id in |
| | | <foreach collection="list" index="index" item="item" open="(" |
| | | separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </delete> |
| | | </update> |
| | | |
| | | <!-- 根据id删除 --> |
| | | <delete id="deleteById" parameterType="Long"> |
| | | DELETE FROM sys_users |
| | | where su_id=#{suId} |
| | | </delete> |
| | | <update id="deleteById" parameterType="Long"> |
| | | update sys_users set su_valid='N' |
| | | where su_id=#{suId} |
| | | </update> |
| | | |
| | | <!-- 根据对象删除 --> |
| | | <delete id="deleteByModel" parameterType="Long"> |
| | |
| | | select *, |
| | | (SELECT IF(COUNT(1)>0,'Y','N') FROM sys_role a WHERE FIND_IN_SET(a.role_id,role_ids) AND role_remark ='是') |
| | | shopRole, |
| | | (SELECT IF(COUNT(1)>0,'Y','N') FROM sys_role a WHERE FIND_IN_SET(a.role_id,role_ids) AND customer ='是') |
| | | allCustomer, |
| | | (select GROUP_CONCAT(role_name separator ',') from sys_role where find_in_set(role_id,role_ids) ) roleName, |
| | | (select com_name from sys_company where com_id=company_id) as company_name, |
| | | (select shop_name from sys_shop_info where shop_id=id) as SHOP_NAME |
| | |
| | | <select id="selectById" resultMap="SysUsersMap"> |
| | | select *, |
| | | (SELECT IF(COUNT(1)>0,'Y','N') FROM sys_role a WHERE FIND_IN_SET(a.role_id,role_ids) AND role_remark ='是') shopRole, |
| | | (SELECT IF(COUNT(1)>0,'Y','N') FROM sys_role a WHERE FIND_IN_SET(a.role_id,role_ids) AND customer ='是') |
| | | allCustomer, |
| | | (select GROUP_CONCAT(role_name separator ',') from sys_role where find_in_set(role_id,role_ids) ) roleName, |
| | | role_ids |
| | | from sys_users |
| | |
| | | select *, |
| | | (SELECT IF(COUNT(1)>0,'Y','N') FROM sys_role a WHERE FIND_IN_SET(a.role_id,role_ids) AND role_remark ='是') |
| | | shopRole, |
| | | (SELECT IF(COUNT(1)>0,'Y','N') FROM sys_role a WHERE FIND_IN_SET(a.role_id,role_ids) AND customer ='是') |
| | | allCustomer, |
| | | (select GROUP_CONCAT(role_name separator ',') from sys_role where find_in_set(role_id,role_ids) ) roleName, |
| | | role_ids |
| | | from sys_users |
| | |
| | | </if> |
| | | <if |
| | | test="(record.suName!=null and record.suName!='') or (record.suName!='' and record.suName==0)"> |
| | | and su_name like concat('%',#{record.suName},'%') |
| | | and (su_name like concat('%',concat(#{record.suName},'%')) or su_tel = #{record.suName}) |
| | | </if> |
| | | <if |
| | | test="(record.suTel!=null and record.suTel!='') or (record.suTel!='' and record.suTel==0)"> |
| | |
| | | <select id="selectByRoleName" resultMap="SysUsersMap"> |
| | | |
| | | SELECT |
| | | a.* |
| | | distinct a.* |
| | | FROM |
| | | sys_users a |
| | | LEFT JOIN sys_role r ON FIND_IN_SET(r.role_id, a.role_ids) |
| | |
| | | <if test="users.shopId !=null and users.shopId !=''"> |
| | | AND a.SHOP_ID = #{users.shopId} |
| | | </if> |
| | | |
| | | ORDER BY |
| | | a.SIGN_ORDER IS NULL, |
| | | a.SIGN_ORDER |
| | |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | |
| | | <select id="selectAppVersion" resultType="com.matrix.system.hive.bean.AppVersion"> |
| | | select * from app_version |
| | | </select> |
| | | </mapper> |