deleted
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.mapper.EnterpriseConfigMapper;
|
||||
import com.cool.store.entity.EnterpriseConfigDO;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: EnterpriseConfigDAO
|
||||
* @Description:
|
||||
* @date 2023-05-18 11:15
|
||||
*/
|
||||
@Repository
|
||||
public class EnterpriseConfigDAO {
|
||||
|
||||
@Resource
|
||||
private EnterpriseConfigMapper enterpriseConfigMapper;
|
||||
|
||||
|
||||
public EnterpriseConfigDO selectByEnterpriseId() {
|
||||
//return enterpriseConfigMapper.selectByEnterpriseId(enterpriseId);
|
||||
return null;
|
||||
}
|
||||
|
||||
public EnterpriseConfigDO getDbInfoByDbName(String dbName) {
|
||||
if(StringUtils.isBlank(dbName)){
|
||||
return null;
|
||||
}
|
||||
return enterpriseConfigMapper.getDbInfoByDbName(dbName);
|
||||
}
|
||||
|
||||
public List<EnterpriseConfigDO> getDistinctDbServer() {
|
||||
return enterpriseConfigMapper.getDistinctDbServer();
|
||||
}
|
||||
|
||||
public EnterpriseConfigDO getConfigByCorpIdAndAppType(String corpId, String appType){
|
||||
if(StringUtils.isAnyBlank(corpId, appType)){
|
||||
return null;
|
||||
}
|
||||
return enterpriseConfigMapper.getConfigByCorpIdAndAppType(corpId, appType);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.EnterpriseDO;
|
||||
import com.cool.store.mapper.EnterpriseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: EnterpriseDAO
|
||||
* @Description:
|
||||
* @date 2023-05-23 13:52
|
||||
*/
|
||||
@Repository
|
||||
public class EnterpriseDAO {
|
||||
|
||||
@Resource
|
||||
private EnterpriseMapper enterpriseMapper;
|
||||
|
||||
|
||||
public EnterpriseDO getEnterpriseById(){
|
||||
//return enterpriseMapper.getEnterpriseById(enterpriseId);
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,18 +1,12 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.enums.UserSelectRangeEnum;
|
||||
import com.cool.store.enums.UserStatusEnum;
|
||||
import com.cool.store.mapper.EnterpriseUserMapper;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
@@ -32,111 +26,16 @@ public class EnterpriseUserDAO {
|
||||
return enterpriseUserMapper.getUserInfoById(userId);
|
||||
}
|
||||
|
||||
public void batchInsertOrUpdate(List<EnterpriseUserDO> users) {
|
||||
List<EnterpriseUserDO> result = new ArrayList<>();
|
||||
users.forEach(user -> {
|
||||
if (StringUtils.isBlank(user.getUnionid()) || StringUtils.isBlank(user.getUserId())) {
|
||||
return;
|
||||
}
|
||||
if (StringUtils.isBlank(user.getName())) {
|
||||
user.setName(user.getUserId());
|
||||
}
|
||||
result.add(user);
|
||||
});
|
||||
enterpriseUserMapper.batchInsertOrUpdate(result);
|
||||
public void batchInsertOrUpdate(List<EnterpriseUserDO> collect) {
|
||||
}
|
||||
|
||||
public void batchUpdateDiffUserDiffRegionIds(List<EnterpriseUserDO> enterpriseUserList) {
|
||||
if(CollectionUtils.isEmpty(enterpriseUserList)){
|
||||
return;
|
||||
}
|
||||
enterpriseUserMapper.batchUpdateDiffUserDiffRegionIds(enterpriseUserList);
|
||||
public void insertEnterpriseUser(EnterpriseUserDO enterpriseUser) {
|
||||
}
|
||||
|
||||
public List<EnterpriseUserDO> fuzzyUsersByDepartment(
|
||||
String deptId,
|
||||
Long roleId,
|
||||
String orderBy,
|
||||
String orderRule,
|
||||
String userName,
|
||||
String jobnumber,
|
||||
Integer userStatus,
|
||||
List<String> userIdList,
|
||||
String regionId){
|
||||
return enterpriseUserMapper.fuzzyUsersByDepartment(deptId, roleId, orderBy, orderRule, userName, jobnumber, userStatus, userIdList, regionId);
|
||||
public void updateEnterpriseUser(EnterpriseUserDO enterpriseUser) {
|
||||
}
|
||||
|
||||
public List<EnterpriseUserDO> fuzzyUsersByNotRole(
|
||||
String deptId,
|
||||
String orderBy,
|
||||
String orderRule,
|
||||
String userName,
|
||||
String jobnumber,
|
||||
Integer userStatus,
|
||||
List<String> userIdList,
|
||||
String regionId){
|
||||
return enterpriseUserMapper.fuzzyUsersByNotRole(deptId, orderBy, orderRule, userName, jobnumber, userStatus, userIdList, regionId);
|
||||
}
|
||||
|
||||
public List<EnterpriseUserDO> selectUsersByUserIds(List<String> userIds) {
|
||||
return enterpriseUserMapper.selectUsersByUserIds(userIds);
|
||||
}
|
||||
|
||||
public List<EnterpriseUserDO> listUserByGroupId(String groupId, String userName, List<String> userIdList){
|
||||
if(StringUtils.isAnyBlank(groupId)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return enterpriseUserMapper.listUserByGroupId(groupId, userName, userIdList);
|
||||
}
|
||||
|
||||
public List<EnterpriseUserDO> listByRegionIdList(List<String> regionIdList){
|
||||
if(CollectionUtils.isEmpty(regionIdList)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return enterpriseUserMapper.listByRegionIdList(regionIdList);
|
||||
}
|
||||
|
||||
public Boolean insertEnterpriseUser(EnterpriseUserDO entity) {
|
||||
if(Objects.isNull(entity.getUserStatus())){
|
||||
entity.setUserStatus(UserStatusEnum.NORMAL.getCode());
|
||||
}
|
||||
if(Objects.isNull(entity.getActive())){
|
||||
entity.setActive(true);
|
||||
}
|
||||
if(StringUtils.isBlank(entity.getThirdOaUniqueFlag())){
|
||||
entity.setThirdOaUniqueFlag(null);
|
||||
}
|
||||
entity.setSubordinateRange(UserSelectRangeEnum.ALL.getCode());
|
||||
if (StringUtils.isBlank(entity.getUnionid()) || StringUtils.isBlank(entity.getUserId())) {
|
||||
return false;
|
||||
}
|
||||
if (StringUtils.isBlank(entity.getName())) {
|
||||
entity.setName(entity.getUserId());
|
||||
}
|
||||
enterpriseUserMapper.insertEnterpriseUser(entity);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void updateEnterpriseUser(EnterpriseUserDO enterpriseUser){
|
||||
if(Objects.isNull(enterpriseUser)){
|
||||
return;
|
||||
}
|
||||
enterpriseUserMapper.updateEnterpriseUser(enterpriseUser);
|
||||
}
|
||||
|
||||
public List<String> getMainAdminUserIds(){
|
||||
return enterpriseUserMapper.getMainAdminUserIds();
|
||||
}
|
||||
|
||||
public List<String> selectSpecifyNodeUserIds( String dingDeptId) {
|
||||
return enterpriseUserMapper.selectSpecifyNodeUserIds(dingDeptId);
|
||||
}
|
||||
|
||||
public List<String> selectAllUserId() {
|
||||
return enterpriseUserMapper.selectAllUserIds();
|
||||
}
|
||||
|
||||
public EnterpriseUserDO selectByUserIdIgnoreActive(String userId) {
|
||||
return enterpriseUserMapper.selectByUserIdIgnoreActive(userId);
|
||||
public List<String> getMainAdminUserIds() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.EnterpriseConfigDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @date 2023-05-18 11:09
|
||||
*/
|
||||
public interface EnterpriseConfigMapper {
|
||||
|
||||
/**
|
||||
* 根据企业id获取config
|
||||
* @param enterpriseId
|
||||
* @return
|
||||
*/
|
||||
EnterpriseConfigDO selectByEnterpriseId(@Param("enterpriseId") String enterpriseId);
|
||||
|
||||
/**
|
||||
* 获取dbServer
|
||||
* @return
|
||||
*/
|
||||
List<EnterpriseConfigDO> getDistinctDbServer();
|
||||
|
||||
/**
|
||||
* 根据dbName 获取数据库信息
|
||||
* @param dbName
|
||||
* @return
|
||||
*/
|
||||
EnterpriseConfigDO getDbInfoByDbName(@Param("dbName")String dbName);
|
||||
|
||||
/**
|
||||
* 根据corpId 和 appType 获取config信息
|
||||
* @param corpId
|
||||
* @param appType
|
||||
* @return
|
||||
*/
|
||||
EnterpriseConfigDO getConfigByCorpIdAndAppType(@Param("corpId")String corpId, @Param("appType")String appType);
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.EnterpriseDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @date 2023-05-23 11:36
|
||||
*/
|
||||
public interface EnterpriseMapper {
|
||||
/**
|
||||
*
|
||||
* 默认插入方法,只会给有值的字段赋值
|
||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
||||
* dateTime:2023-05-23 11:36
|
||||
*/
|
||||
int insertSelective(EnterpriseDO record);
|
||||
|
||||
/**
|
||||
*
|
||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
||||
* dateTime:2023-05-23 11:36
|
||||
*/
|
||||
int updateByPrimaryKeySelective(EnterpriseDO record);
|
||||
|
||||
/**
|
||||
* 获取企业信息
|
||||
* @param enterpriseId
|
||||
* @return
|
||||
*/
|
||||
EnterpriseDO getEnterpriseById(@Param("id") String id);
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.enterprise.EnterpriseUserDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @date 2023-05-19 02:58
|
||||
*/
|
||||
public interface EnterpriseUserMapper {
|
||||
/**
|
||||
*
|
||||
* 默认插入方法,只会给有值的字段赋值
|
||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
||||
* dateTime:2023-05-19 02:58
|
||||
*/
|
||||
int insertSelective(@Param("record") EnterpriseUserDO record);
|
||||
|
||||
/**
|
||||
*
|
||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
||||
* dateTime:2023-05-19 02:58
|
||||
*/
|
||||
int updateByPrimaryKeySelective(@Param("record") EnterpriseUserDO record);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param enterpriseId
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
EnterpriseUserDO getUserInfoById(@Param("userId")String userId);
|
||||
|
||||
/**
|
||||
* 批量插入或更新
|
||||
* @param enterpriseId
|
||||
* @param users
|
||||
*/
|
||||
void batchInsertOrUpdate(@Param("list") List<EnterpriseUserDO> users);
|
||||
|
||||
/**
|
||||
* 批量更新不同用户 不同的userRegionids
|
||||
* @param eid
|
||||
* @param enterpriseUserDOList
|
||||
* @return
|
||||
*/
|
||||
Boolean batchUpdateDiffUserDiffRegionIds(@Param("list") List<EnterpriseUserDO> enterpriseUserDOList);
|
||||
|
||||
List<EnterpriseUserDO> fuzzyUsersByDepartment(@Param("deptId") String deptId,
|
||||
@Param("roleId") Long roleId,
|
||||
@Param("orderBy") String orderBy,
|
||||
@Param("orderRule") String orderRule,
|
||||
@Param("userName") String userName,
|
||||
@Param("jobNumber") String jobnumber,
|
||||
@Param("userStatus") Integer userStatus,
|
||||
@Param("userIdList") List<String> userIdList,
|
||||
@Param("regionId") String regionId);
|
||||
|
||||
List<EnterpriseUserDO> fuzzyUsersByNotRole(@Param("deptId") String deptId,
|
||||
@Param("orderBy") String orderBy,
|
||||
@Param("orderRule") String orderRule,
|
||||
@Param("userName") String userName,
|
||||
@Param("jobNumber") String jobnumber,
|
||||
@Param("userStatus") Integer userStatus,
|
||||
@Param("userIdList") List<String> userIdList,
|
||||
@Param("regionId") String regionId);
|
||||
|
||||
/**
|
||||
* 根据用户id数组获取用户
|
||||
* @param eid
|
||||
* @param userIds
|
||||
* @return
|
||||
*/
|
||||
List<EnterpriseUserDO> selectUsersByUserIds(@Param("userIds") List<String> userIds);
|
||||
|
||||
|
||||
List<EnterpriseUserDO> listUserByGroupId(@Param("groupId") String groupId,
|
||||
@Param("userName") String userName,
|
||||
@Param("userIdList") List<String> userIdList);
|
||||
|
||||
List<EnterpriseUserDO> listByRegionIdList(@Param("regionIdList") List<String> regionIdList);
|
||||
|
||||
void updateEnterpriseUser(@Param("enterpriseUserDO") EnterpriseUserDO enterpriseUserDO);
|
||||
|
||||
|
||||
List<String> getMainAdminUserIds();
|
||||
|
||||
List<String> selectSpecifyNodeUserIds(@Param("dingDeptId") String dingDeptId);
|
||||
|
||||
List<String> selectAllUserIds();
|
||||
|
||||
EnterpriseUserDO selectByUserIdIgnoreActive(@Param("userId") String userId);
|
||||
|
||||
void insertEnterpriseUser(@Param("entity") EnterpriseUserDO entity);
|
||||
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.EnterpriseConfigMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.EnterpriseConfigDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="current_package" jdbcType="BIGINT" property="currentPackage"/>
|
||||
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/>
|
||||
<result column="staff_count" jdbcType="INTEGER" property="staffCount"/>
|
||||
<result column="db_source_name" jdbcType="VARCHAR" property="dbSourceName"/>
|
||||
<result column="db_server" jdbcType="VARCHAR" property="dbServer"/>
|
||||
<result column="db_port" jdbcType="INTEGER" property="dbPort"/>
|
||||
<result column="db_name" jdbcType="VARCHAR" property="dbName"/>
|
||||
<result column="db_user" jdbcType="VARCHAR" property="dbUser"/>
|
||||
<result column="db_pwd" jdbcType="VARCHAR" property="dbPwd"/>
|
||||
<result column="license" jdbcType="VARCHAR" property="license"/>
|
||||
<result column="license_expires" jdbcType="TIMESTAMP" property="licenseExpires"/>
|
||||
<result column="license_type" jdbcType="INTEGER" property="licenseType"/>
|
||||
<result column="ding_corp_id" jdbcType="VARCHAR" property="dingCorpId"/>
|
||||
<result column="ding_corp_secret" jdbcType="VARCHAR" property="dingCorpSecret"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser"/>
|
||||
<result column="main_corp_id" jdbcType="VARCHAR" property="mainCorpId"/>
|
||||
<result column="app_type" jdbcType="VARCHAR" property="appType"/>
|
||||
<result column="permanent_code" jdbcType="VARCHAR" property="permanentCode"/>
|
||||
<result column="agentid" jdbcType="VARCHAR" property="agentid"/>
|
||||
<result column="cool_college_enterprise_id" jdbcType="VARCHAR" property="coolCollegeEnterpriseId"/>
|
||||
<result column="cool_college_secret" jdbcType="VARCHAR" property="coolCollegeSecret"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, current_package, enterprise_id, staff_count, db_source_name, db_server, db_port,
|
||||
db_name, db_user, db_pwd, license, license_expires, license_type, ding_corp_id, ding_corp_secret,
|
||||
create_time, create_user, main_corp_id, app_type, permanent_code, agentid, cool_college_enterprise_id,
|
||||
cool_college_secret
|
||||
</sql>
|
||||
|
||||
<select id="selectByEnterpriseId" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
enterprise_config
|
||||
where
|
||||
enterprise_id = #{enterpriseId}
|
||||
</select>
|
||||
|
||||
<select id="getDistinctDbServer" resultMap="BaseResultMap">
|
||||
select
|
||||
distinct db_server, db_port, db_user, db_pwd, db_name
|
||||
from
|
||||
enterprise_config
|
||||
</select>
|
||||
|
||||
<select id="getDbInfoByDbName" resultMap="BaseResultMap">
|
||||
select
|
||||
db_server, db_port, db_user, db_pwd
|
||||
from
|
||||
enterprise_config
|
||||
where
|
||||
db_name = #{dbName} limit 1
|
||||
</select>
|
||||
|
||||
<select id="getConfigByCorpIdAndAppType" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
enterprise_config
|
||||
where
|
||||
ding_corp_id = #{corpId} and app_type = #{appType}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,295 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.EnterpriseMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.EnterpriseDO">
|
||||
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="original_name" jdbcType="VARCHAR" property="originalName"/>
|
||||
<result column="mobile" jdbcType="CHAR" property="mobile"/>
|
||||
<result column="province" jdbcType="VARCHAR" property="province"/>
|
||||
<result column="city" jdbcType="VARCHAR" property="city"/>
|
||||
<result column="status" jdbcType="INTEGER" property="status"/>
|
||||
<result column="logo" jdbcType="VARCHAR" property="logo"/>
|
||||
<result column="is_vip" jdbcType="INTEGER" property="isVip"/>
|
||||
<result column="auth_type" jdbcType="INTEGER" property="authType"/>
|
||||
<result column="auth_user_id" jdbcType="VARCHAR" property="authUserId"/>
|
||||
<result column="industry" jdbcType="VARCHAR" property="industry"/>
|
||||
<result column="logo_name" jdbcType="VARCHAR" property="logoName"/>
|
||||
<result column="corp_logo_url" jdbcType="VARCHAR" property="corpLogoUrl"/>
|
||||
<result column="is_authenticated" jdbcType="INTEGER" property="isAuthenticated"/>
|
||||
<result column="auth_level" jdbcType="INTEGER" property="authLevel"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
<result column="package_begin_date" jdbcType="TIMESTAMP" property="packageBeginDate"/>
|
||||
<result column="package_end_date" jdbcType="TIMESTAMP" property="packageEndDate"/>
|
||||
<result column="aliyun_person_group_crop_id" jdbcType="VARCHAR" property="aliyunPersonGroupCropId"/>
|
||||
<result column="app_type" jdbcType="VARCHAR" property="appType"/>
|
||||
<result column="tag" jdbcType="VARCHAR" property="tag"/>
|
||||
<result column="dataware_config" jdbcType="VARCHAR" property="datawareConfig"/>
|
||||
<result column="is_leave_info" jdbcType="BIT" property="isLeaveInfo"/>
|
||||
<result column="limit_store_count" jdbcType="INTEGER" property="limitStoreCount"/>
|
||||
<result column="limit_device_count" jdbcType="INTEGER" property="limitDeviceCount"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, name, original_name, mobile, province, city, status, logo, is_vip, auth_type,
|
||||
auth_user_id, industry, logo_name, corp_logo_url, is_authenticated, auth_level, create_time,
|
||||
update_time, package_begin_date, package_end_date, aliyun_person_group_crop_id, app_type,
|
||||
tag, dataware_config, is_leave_info, limit_store_count, limit_device_count
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into enterprise
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="originalName != null">
|
||||
original_name,
|
||||
</if>
|
||||
<if test="mobile != null">
|
||||
mobile,
|
||||
</if>
|
||||
<if test="province != null">
|
||||
province,
|
||||
</if>
|
||||
<if test="city != null">
|
||||
city,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="logo != null">
|
||||
logo,
|
||||
</if>
|
||||
<if test="isVip != null">
|
||||
is_vip,
|
||||
</if>
|
||||
<if test="authType != null">
|
||||
auth_type,
|
||||
</if>
|
||||
<if test="authUserId != null">
|
||||
auth_user_id,
|
||||
</if>
|
||||
<if test="industry != null">
|
||||
industry,
|
||||
</if>
|
||||
<if test="logoName != null">
|
||||
logo_name,
|
||||
</if>
|
||||
<if test="corpLogoUrl != null">
|
||||
corp_logo_url,
|
||||
</if>
|
||||
<if test="isAuthenticated != null">
|
||||
is_authenticated,
|
||||
</if>
|
||||
<if test="authLevel != null">
|
||||
auth_level,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="packageBeginDate != null">
|
||||
package_begin_date,
|
||||
</if>
|
||||
<if test="packageEndDate != null">
|
||||
package_end_date,
|
||||
</if>
|
||||
<if test="aliyunPersonGroupCropId != null">
|
||||
aliyun_person_group_crop_id,
|
||||
</if>
|
||||
<if test="appType != null">
|
||||
app_type,
|
||||
</if>
|
||||
<if test="tag != null">
|
||||
tag,
|
||||
</if>
|
||||
<if test="datawareConfig != null">
|
||||
dataware_config,
|
||||
</if>
|
||||
<if test="isLeaveInfo != null">
|
||||
is_leave_info,
|
||||
</if>
|
||||
<if test="limitStoreCount != null">
|
||||
limit_store_count,
|
||||
</if>
|
||||
<if test="limitDeviceCount != null">
|
||||
limit_device_count,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name},
|
||||
</if>
|
||||
<if test="originalName != null">
|
||||
#{originalName},
|
||||
</if>
|
||||
<if test="mobile != null">
|
||||
#{mobile},
|
||||
</if>
|
||||
<if test="province != null">
|
||||
#{province},
|
||||
</if>
|
||||
<if test="city != null">
|
||||
#{city},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status},
|
||||
</if>
|
||||
<if test="logo != null">
|
||||
#{logo},
|
||||
</if>
|
||||
<if test="isVip != null">
|
||||
#{isVip},
|
||||
</if>
|
||||
<if test="authType != null">
|
||||
#{authType},
|
||||
</if>
|
||||
<if test="authUserId != null">
|
||||
#{authUserId},
|
||||
</if>
|
||||
<if test="industry != null">
|
||||
#{industry},
|
||||
</if>
|
||||
<if test="logoName != null">
|
||||
#{logoName},
|
||||
</if>
|
||||
<if test="corpLogoUrl != null">
|
||||
#{corpLogoUrl},
|
||||
</if>
|
||||
<if test="isAuthenticated != null">
|
||||
#{isAuthenticated},
|
||||
</if>
|
||||
<if test="authLevel != null">
|
||||
#{authLevel},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="packageBeginDate != null">
|
||||
#{packageBeginDate},
|
||||
</if>
|
||||
<if test="packageEndDate != null">
|
||||
#{packageEndDate},
|
||||
</if>
|
||||
<if test="aliyunPersonGroupCropId != null">
|
||||
#{aliyunPersonGroupCropId},
|
||||
</if>
|
||||
<if test="appType != null">
|
||||
#{appType},
|
||||
</if>
|
||||
<if test="tag != null">
|
||||
#{tag},
|
||||
</if>
|
||||
<if test="datawareConfig != null">
|
||||
#{datawareConfig},
|
||||
</if>
|
||||
<if test="isLeaveInfo != null">
|
||||
#{isLeaveInfo},
|
||||
</if>
|
||||
<if test="limitStoreCount != null">
|
||||
#{limitStoreCount},
|
||||
</if>
|
||||
<if test="limitDeviceCount != null">
|
||||
#{limitDeviceCount},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update enterprise
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="originalName != null">
|
||||
original_name = #{originalName},
|
||||
</if>
|
||||
<if test="mobile != null">
|
||||
mobile = #{mobile},
|
||||
</if>
|
||||
<if test="province != null">
|
||||
province = #{province},
|
||||
</if>
|
||||
<if test="city != null">
|
||||
city = #{city},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="logo != null">
|
||||
logo = #{logo},
|
||||
</if>
|
||||
<if test="isVip != null">
|
||||
is_vip = #{isVip},
|
||||
</if>
|
||||
<if test="authType != null">
|
||||
auth_type = #{authType},
|
||||
</if>
|
||||
<if test="authUserId != null">
|
||||
auth_user_id = #{authUserId},
|
||||
</if>
|
||||
<if test="industry != null">
|
||||
industry = #{industry},
|
||||
</if>
|
||||
<if test="logoName != null">
|
||||
logo_name = #{logoName},
|
||||
</if>
|
||||
<if test="corpLogoUrl != null">
|
||||
corp_logo_url = #{corpLogoUrl},
|
||||
</if>
|
||||
<if test="isAuthenticated != null">
|
||||
is_authenticated = #{isAuthenticated},
|
||||
</if>
|
||||
<if test="authLevel != null">
|
||||
auth_level = #{authLevel},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
<if test="packageBeginDate != null">
|
||||
package_begin_date = #{packageBeginDate},
|
||||
</if>
|
||||
<if test="packageEndDate != null">
|
||||
package_end_date = #{packageEndDate},
|
||||
</if>
|
||||
<if test="aliyunPersonGroupCropId != null">
|
||||
aliyun_person_group_crop_id = #{aliyunPersonGroupCropId},
|
||||
</if>
|
||||
<if test="appType != null">
|
||||
app_type = #{appType},
|
||||
</if>
|
||||
<if test="tag != null">
|
||||
tag = #{tag},
|
||||
</if>
|
||||
<if test="datawareConfig != null">
|
||||
dataware_config = #{datawareConfig},
|
||||
</if>
|
||||
<if test="isLeaveInfo != null">
|
||||
is_leave_info = #{isLeaveInfo},
|
||||
</if>
|
||||
<if test="limitStoreCount != null">
|
||||
limit_store_count = #{limitStoreCount},
|
||||
</if>
|
||||
<if test="limitDeviceCount != null">
|
||||
limit_device_count = #{limitDeviceCount},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getEnterpriseById" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
enterprise
|
||||
where
|
||||
id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,888 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.EnterpriseUserMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.EnterpriseUserDO">
|
||||
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="tel" jdbcType="VARCHAR" property="tel"/>
|
||||
<result column="work_place" jdbcType="VARCHAR" property="workPlace"/>
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||
<result column="mobile" jdbcType="VARCHAR" property="mobile"/>
|
||||
<result column="email" jdbcType="VARCHAR" property="email"/>
|
||||
<result column="org_email" jdbcType="VARCHAR" property="orgEmail"/>
|
||||
<result column="active" jdbcType="BIT" property="active"/>
|
||||
<result column="order_in_depts" jdbcType="VARCHAR" property="orderInDepts"/>
|
||||
<result column="main_admin" jdbcType="TINYINT" property="mainAdmin"/>
|
||||
<result column="is_admin" jdbcType="BIT" property="isAdmin"/>
|
||||
<result column="is_boss" jdbcType="BIT" property="isBoss"/>
|
||||
<result column="dingId" jdbcType="VARCHAR" property="dingid"/>
|
||||
<result column="unionid" jdbcType="VARCHAR" property="unionid"/>
|
||||
<result column="is_hide" jdbcType="BIT" property="isHide"/>
|
||||
<result column="position" jdbcType="VARCHAR" property="position"/>
|
||||
<result column="avatar" jdbcType="VARCHAR" property="avatar"/>
|
||||
<result column="extattr" jdbcType="VARCHAR" property="extattr"/>
|
||||
<result column="is_enterprise" jdbcType="BIT" property="isEnterprise"/>
|
||||
<result column="roles" jdbcType="VARCHAR" property="roles"/>
|
||||
<result column="is_leader" jdbcType="BIT" property="isLeader"/>
|
||||
<result column="face_url" jdbcType="VARCHAR" property="faceUrl"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="language" jdbcType="CHAR" property="language"/>
|
||||
<result column="user_status" jdbcType="TINYINT" property="userStatus"/>
|
||||
<result column="third_oa_unique_flag" jdbcType="VARCHAR" property="thirdOaUniqueFlag"/>
|
||||
<result column="subordinate_change" jdbcType="TINYINT" property="subordinateChange"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
<result column="subordinate_range" jdbcType="VARCHAR" property="subordinateRange"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.cool.store.entity.EnterpriseUserDO">
|
||||
<result column="is_leader_in_depts" jdbcType="LONGVARCHAR" property="isLeaderInDepts"/>
|
||||
<result column="department" jdbcType="LONGVARCHAR" property="department"/>
|
||||
<result column="jobnumber" jdbcType="LONGVARCHAR" property="jobnumber"/>
|
||||
<result column="monitored_departments" jdbcType="LONGVARCHAR" property="monitoredDepartments"/>
|
||||
<result column="departments" jdbcType="LONGVARCHAR" property="departments"/>
|
||||
<result column="user_region_ids" jdbcType="LONGVARCHAR" property="userRegionIds"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, name, tel, work_place, remark, mobile, email, org_email, active, order_in_depts,
|
||||
main_admin, is_admin, is_boss, dingId, unionid, is_hide, position, avatar, extattr,
|
||||
is_enterprise, roles, is_leader, face_url, create_time, language, user_status, third_oa_unique_flag,
|
||||
subordinate_change, update_time, subordinate_range
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
is_leader_in_depts, department, jobnumber, monitored_departments, departments, user_region_ids
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into enterprise_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="record.tel != null">
|
||||
tel,
|
||||
</if>
|
||||
<if test="record.workPlace != null">
|
||||
work_place,
|
||||
</if>
|
||||
<if test="record.remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="record.mobile != null">
|
||||
mobile,
|
||||
</if>
|
||||
<if test="record.email != null">
|
||||
email,
|
||||
</if>
|
||||
<if test="record.orgEmail != null">
|
||||
org_email,
|
||||
</if>
|
||||
<if test="record.active != null">
|
||||
active,
|
||||
</if>
|
||||
<if test="record.orderInDepts != null">
|
||||
order_in_depts,
|
||||
</if>
|
||||
<if test="record.mainAdmin != null">
|
||||
main_admin,
|
||||
</if>
|
||||
<if test="record.isAdmin != null">
|
||||
is_admin,
|
||||
</if>
|
||||
<if test="record.isBoss != null">
|
||||
is_boss,
|
||||
</if>
|
||||
<if test="record.dingid != null">
|
||||
dingId,
|
||||
</if>
|
||||
<if test="record.unionid != null">
|
||||
unionid,
|
||||
</if>
|
||||
<if test="record.isHide != null">
|
||||
is_hide,
|
||||
</if>
|
||||
<if test="record.position != null">
|
||||
position,
|
||||
</if>
|
||||
<if test="record.avatar != null">
|
||||
avatar,
|
||||
</if>
|
||||
<if test="record.extattr != null">
|
||||
extattr,
|
||||
</if>
|
||||
<if test="record.isEnterprise != null">
|
||||
is_enterprise,
|
||||
</if>
|
||||
<if test="record.roles != null">
|
||||
roles,
|
||||
</if>
|
||||
<if test="record.isLeader != null">
|
||||
is_leader,
|
||||
</if>
|
||||
<if test="record.faceUrl != null">
|
||||
face_url,
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="record.language != null">
|
||||
language,
|
||||
</if>
|
||||
<if test="record.userStatus != null">
|
||||
user_status,
|
||||
</if>
|
||||
<if test="record.thirdOaUniqueFlag != null">
|
||||
third_oa_unique_flag,
|
||||
</if>
|
||||
<if test="record.subordinateChange != null">
|
||||
subordinate_change,
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="record.subordinateRange != null">
|
||||
subordinate_range,
|
||||
</if>
|
||||
<if test="record.isLeaderInDepts != null">
|
||||
is_leader_in_depts,
|
||||
</if>
|
||||
<if test="record.department != null">
|
||||
department,
|
||||
</if>
|
||||
<if test="record.jobnumber != null">
|
||||
jobnumber,
|
||||
</if>
|
||||
<if test="record.monitoredDepartments != null">
|
||||
monitored_departments,
|
||||
</if>
|
||||
<if test="record.departments != null">
|
||||
departments,
|
||||
</if>
|
||||
<if test="record.userRegionIds != null">
|
||||
user_region_ids,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.userId != null">
|
||||
#{record.userId},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
#{record.name},
|
||||
</if>
|
||||
<if test="record.tel != null">
|
||||
#{record.tel},
|
||||
</if>
|
||||
<if test="record.workPlace != null">
|
||||
#{record.workPlace},
|
||||
</if>
|
||||
<if test="record.remark != null">
|
||||
#{record.remark},
|
||||
</if>
|
||||
<if test="record.mobile != null">
|
||||
#{record.mobile},
|
||||
</if>
|
||||
<if test="record.email != null">
|
||||
#{record.email},
|
||||
</if>
|
||||
<if test="record.orgEmail != null">
|
||||
#{record.orgEmail},
|
||||
</if>
|
||||
<if test="record.active != null">
|
||||
#{record.active},
|
||||
</if>
|
||||
<if test="record.orderInDepts != null">
|
||||
#{record.orderInDepts},
|
||||
</if>
|
||||
<if test="record.mainAdmin != null">
|
||||
#{record.mainAdmin},
|
||||
</if>
|
||||
<if test="record.isAdmin != null">
|
||||
#{record.isAdmin},
|
||||
</if>
|
||||
<if test="record.isBoss != null">
|
||||
#{record.isBoss},
|
||||
</if>
|
||||
<if test="record.dingid != null">
|
||||
#{record.dingid},
|
||||
</if>
|
||||
<if test="record.unionid != null">
|
||||
#{record.unionid},
|
||||
</if>
|
||||
<if test="record.isHide != null">
|
||||
#{record.isHide},
|
||||
</if>
|
||||
<if test="record.position != null">
|
||||
#{record.position},
|
||||
</if>
|
||||
<if test="record.avatar != null">
|
||||
#{record.avatar},
|
||||
</if>
|
||||
<if test="record.extattr != null">
|
||||
#{record.extattr},
|
||||
</if>
|
||||
<if test="record.isEnterprise != null">
|
||||
#{record.isEnterprise},
|
||||
</if>
|
||||
<if test="record.roles != null">
|
||||
#{record.roles},
|
||||
</if>
|
||||
<if test="record.isLeader != null">
|
||||
#{record.isLeader},
|
||||
</if>
|
||||
<if test="record.faceUrl != null">
|
||||
#{record.faceUrl},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
#{record.createTime},
|
||||
</if>
|
||||
<if test="record.language != null">
|
||||
#{record.language},
|
||||
</if>
|
||||
<if test="record.userStatus != null">
|
||||
#{record.userStatus},
|
||||
</if>
|
||||
<if test="record.thirdOaUniqueFlag != null">
|
||||
#{record.thirdOaUniqueFlag},
|
||||
</if>
|
||||
<if test="record.subordinateChange != null">
|
||||
#{record.subordinateChange},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
#{record.updateTime},
|
||||
</if>
|
||||
<if test="record.subordinateRange != null">
|
||||
#{record.subordinateRange},
|
||||
</if>
|
||||
<if test="record.isLeaderInDepts != null">
|
||||
#{record.isLeaderInDepts},
|
||||
</if>
|
||||
<if test="record.department != null">
|
||||
#{record.department},
|
||||
</if>
|
||||
<if test="record.jobnumber != null">
|
||||
#{record.jobnumber},
|
||||
</if>
|
||||
<if test="record.monitoredDepartments != null">
|
||||
#{record.monitoredDepartments},
|
||||
</if>
|
||||
<if test="record.departments != null">
|
||||
#{record.departments},
|
||||
</if>
|
||||
<if test="record.userRegionIds != null">
|
||||
#{record.userRegionIds},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update enterprise_user
|
||||
<set>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name},
|
||||
</if>
|
||||
<if test="record.tel != null">
|
||||
tel = #{record.tel},
|
||||
</if>
|
||||
<if test="record.workPlace != null">
|
||||
work_place = #{record.workPlace},
|
||||
</if>
|
||||
<if test="record.remark != null">
|
||||
remark = #{record.remark},
|
||||
</if>
|
||||
<if test="record.mobile != null">
|
||||
mobile = #{record.mobile},
|
||||
</if>
|
||||
<if test="record.email != null">
|
||||
email = #{record.email},
|
||||
</if>
|
||||
<if test="record.orgEmail != null">
|
||||
org_email = #{record.orgEmail},
|
||||
</if>
|
||||
<if test="record.active != null">
|
||||
active = #{record.active},
|
||||
</if>
|
||||
<if test="record.orderInDepts != null">
|
||||
order_in_depts = #{record.orderInDepts},
|
||||
</if>
|
||||
<if test="record.mainAdmin != null">
|
||||
main_admin = #{record.mainAdmin},
|
||||
</if>
|
||||
<if test="record.isAdmin != null">
|
||||
is_admin = #{record.isAdmin},
|
||||
</if>
|
||||
<if test="record.isBoss != null">
|
||||
is_boss = #{record.isBoss},
|
||||
</if>
|
||||
<if test="record.dingid != null">
|
||||
dingId = #{record.dingid},
|
||||
</if>
|
||||
<if test="record.unionid != null">
|
||||
unionid = #{record.unionid},
|
||||
</if>
|
||||
<if test="record.isHide != null">
|
||||
is_hide = #{record.isHide},
|
||||
</if>
|
||||
<if test="record.position != null">
|
||||
position = #{record.position},
|
||||
</if>
|
||||
<if test="record.avatar != null">
|
||||
avatar = #{record.avatar},
|
||||
</if>
|
||||
<if test="record.extattr != null">
|
||||
extattr = #{record.extattr},
|
||||
</if>
|
||||
<if test="record.isEnterprise != null">
|
||||
is_enterprise = #{record.isEnterprise},
|
||||
</if>
|
||||
<if test="record.roles != null">
|
||||
roles = #{record.roles},
|
||||
</if>
|
||||
<if test="record.isLeader != null">
|
||||
is_leader = #{record.isLeader},
|
||||
</if>
|
||||
<if test="record.faceUrl != null">
|
||||
face_url = #{record.faceUrl},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime},
|
||||
</if>
|
||||
<if test="record.language != null">
|
||||
language = #{record.language},
|
||||
</if>
|
||||
<if test="record.userStatus != null">
|
||||
user_status = #{record.userStatus},
|
||||
</if>
|
||||
<if test="record.thirdOaUniqueFlag != null">
|
||||
third_oa_unique_flag = #{record.thirdOaUniqueFlag},
|
||||
</if>
|
||||
<if test="record.subordinateChange != null">
|
||||
subordinate_change = #{record.subordinateChange},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
<if test="record.subordinateRange != null">
|
||||
subordinate_range = #{record.subordinateRange},
|
||||
</if>
|
||||
<if test="record.isLeaderInDepts != null">
|
||||
is_leader_in_depts = #{record.isLeaderInDepts},
|
||||
</if>
|
||||
<if test="record.department != null">
|
||||
department = #{record.department},
|
||||
</if>
|
||||
<if test="record.jobnumber != null">
|
||||
jobnumber = #{record.jobnumber},
|
||||
</if>
|
||||
<if test="record.monitoredDepartments != null">
|
||||
monitored_departments = #{record.monitoredDepartments},
|
||||
</if>
|
||||
<if test="record.departments != null">
|
||||
departments = #{record.departments},
|
||||
</if>
|
||||
<if test="record.userRegionIds != null">
|
||||
user_region_ids = #{record.userRegionIds},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
|
||||
<select id="getUserInfoById" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from
|
||||
enterprise_user
|
||||
where
|
||||
user_id = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="batchInsertOrUpdate" parameterType="java.util.List">
|
||||
insert into enterprise_user (
|
||||
id,
|
||||
user_id,
|
||||
`name`,
|
||||
mobile,
|
||||
email,
|
||||
active,
|
||||
order_in_depts,
|
||||
main_admin,
|
||||
is_admin,
|
||||
is_boss,
|
||||
dingId,
|
||||
unionid,
|
||||
is_leader_in_depts,
|
||||
is_hide,
|
||||
departments,
|
||||
`position`,
|
||||
avatar,
|
||||
jobnumber,
|
||||
extattr,
|
||||
roles,
|
||||
is_leader,
|
||||
create_time
|
||||
) values
|
||||
|
||||
<foreach collection="list" item="it" separator=",">
|
||||
|
||||
(
|
||||
#{it.id, jdbcType=VARCHAR},
|
||||
#{it.userId, jdbcType=VARCHAR},
|
||||
#{it.name, jdbcType=VARCHAR},
|
||||
#{it.mobile, jdbcType=VARCHAR},
|
||||
#{it.email, jdbcType=VARCHAR},
|
||||
#{it.active, jdbcType=BOOLEAN},
|
||||
#{it.orderInDepts, jdbcType=VARCHAR},
|
||||
#{it.mainAdmin, jdbcType=BOOLEAN},
|
||||
#{it.isAdmin, jdbcType=BOOLEAN},
|
||||
#{it.isBoss, jdbcType=BOOLEAN},
|
||||
#{it.dingid, jdbcType=VARCHAR},
|
||||
#{it.unionid, jdbcType=VARCHAR},
|
||||
#{it.isLeaderInDepts, jdbcType=VARCHAR},
|
||||
#{it.isHide, jdbcType=BOOLEAN},
|
||||
#{it.departments, jdbcType=VARCHAR},
|
||||
#{it.position, jdbcType=VARCHAR},
|
||||
#{it.avatar, jdbcType=VARCHAR},
|
||||
#{it.jobnumber, jdbcType=VARCHAR},
|
||||
#{it.extattr, jdbcType=VARCHAR},
|
||||
#{it.roles, jdbcType=VARCHAR},
|
||||
#{it.isLeader, jdbcType=BOOLEAN},
|
||||
sysdate()
|
||||
)
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
departments=values(departments),
|
||||
`name`=values(name),
|
||||
main_admin=values(main_admin),
|
||||
is_admin=values(is_admin),
|
||||
mobile = values(mobile),
|
||||
order_in_depts=values(order_in_depts),
|
||||
is_leader_in_depts=values(is_leader_in_depts),
|
||||
avatar=values(avatar),
|
||||
active=values(active),
|
||||
`position`=values(position),
|
||||
roles=values(roles),
|
||||
jobnumber=values(jobnumber)
|
||||
</insert>
|
||||
|
||||
<update id="batchUpdateDiffUserDiffRegionIds">
|
||||
update enterprise_user
|
||||
set user_region_ids =
|
||||
<foreach collection="list" item="item" index="index" separator=" " open="case user_id" close="end">
|
||||
when #{item.userId} then #{item.userRegionIds}
|
||||
</foreach>
|
||||
where user_id in
|
||||
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item.userId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="fuzzyUsersByDepartment" resultType="com.cool.store.entity.EnterpriseUserDO">
|
||||
select
|
||||
u.user_id as userId,
|
||||
u.name as name,
|
||||
u.roles as roles,
|
||||
u.jobnumber as jobnumber,
|
||||
u.remark as remark,
|
||||
u.mobile as mobile,
|
||||
u.email as email,
|
||||
u.org_email as orgEmail,
|
||||
u.avatar as avatar,
|
||||
u.user_status as userStatus,
|
||||
u.unionid as unionid
|
||||
from enterprise_user u
|
||||
left join enterprise_user_role ul on u.user_id=ul.user_id
|
||||
left join sys_role r on ul.role_id=r.id
|
||||
<where>
|
||||
u.active = true and u.user_id != 'a100000001'
|
||||
<if test="deptId !=null and deptId !=''">
|
||||
and u.departments like concat('%/',#{deptId},'/%')
|
||||
</if>
|
||||
<if test="userName !=null and userName !=''">
|
||||
and u.name like concat('%',#{userName},'%')
|
||||
</if>
|
||||
<if test="jobNumber !=null and jobNumber !=''">
|
||||
and u.jobnumber = #{jobNumber}
|
||||
</if>
|
||||
<if test="roleId !=null ">
|
||||
and r.id=#{roleId}
|
||||
</if>
|
||||
<if test="userStatus !=null ">
|
||||
and u.user_status=#{userStatus}
|
||||
</if>
|
||||
<if test="regionId !=null and regionId !=''">
|
||||
and user_region_ids like concat('%/',#{regionId},'/%')
|
||||
</if>
|
||||
<if test="userIdList != null and userIdList.size > 0">
|
||||
and u.user_id in
|
||||
<foreach collection="userIdList" item="userId" separator="," open="(" close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY u.user_id
|
||||
<if test="orderBy != null and orderBy != '' ">
|
||||
order by u.${orderBy} ${orderRule}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="fuzzyUsersByNotRole" resultType="com.cool.store.entity.EnterpriseUserDO">
|
||||
select
|
||||
user_id as userId,
|
||||
name as name,
|
||||
jobnumber as jobnumber,
|
||||
remark as remark,
|
||||
mobile as mobile,
|
||||
email as email,
|
||||
org_email as orgEmail,
|
||||
avatar as avatar,
|
||||
roles as roles,
|
||||
departments as departments,
|
||||
user_status as userStatus,
|
||||
unionid
|
||||
from enterprise_user
|
||||
<where>
|
||||
active = true and user_id != 'a100000001'
|
||||
<if test="deptId !=null and deptId !=''">
|
||||
and departments like concat('%/',#{deptId},'/%')
|
||||
</if>
|
||||
<if test="userName !=null and userName !=''">
|
||||
and name like concat('%',#{userName},'%')
|
||||
</if>
|
||||
<if test="jobNumber !=null and jobNumber !=''">
|
||||
and jobnumber = #{jobNumber}
|
||||
</if>
|
||||
<if test="userStatus !=null">
|
||||
and user_status = #{userStatus}
|
||||
</if>
|
||||
<if test="regionId !=null and regionId !=''">
|
||||
and user_region_ids like concat('%/',#{regionId},'/%')
|
||||
</if>
|
||||
<if test="userIdList != null and userIdList.size > 0">
|
||||
and user_id in
|
||||
<foreach collection="userIdList" item="userId" separator="," open="(" close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</where>
|
||||
ORDER BY user_id
|
||||
<if test="orderBy != null and orderBy != '' ">
|
||||
, ${orderBy}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectUsersByUserIds" resultType="com.cool.store.entity.EnterpriseUserDO">
|
||||
select
|
||||
id,
|
||||
user_id as userId,
|
||||
`name` as name,
|
||||
avatar,
|
||||
active,
|
||||
mobile,
|
||||
jobnumber,
|
||||
`language`,
|
||||
user_status as userStatus,
|
||||
subordinate_range as subordinateRange
|
||||
from enterprise_user
|
||||
<where>
|
||||
user_id != 'a100000001'
|
||||
and
|
||||
<if test="userIds.size()>0 and userIds!=null">or
|
||||
user_id in
|
||||
<foreach
|
||||
collection="userIds" item="userId" separator="," open="(" close=")">
|
||||
#{userId, jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="listUserByGroupId" resultType="com.cool.store.entity.EnterpriseUserDO">
|
||||
select
|
||||
u.user_id as userId,
|
||||
u.name as name,
|
||||
u.roles as roles,
|
||||
u.jobnumber as jobnumber,
|
||||
u.mobile as mobile,
|
||||
u.email as email,
|
||||
u.org_email as orgEmail,
|
||||
u.avatar as avatar,
|
||||
u.departments as departments,
|
||||
u.user_status as userStatus,
|
||||
u.unionid as unionid
|
||||
from enterprise_user u
|
||||
left join enterprise_user_group_mapping ug on u.user_id=ug.user_id
|
||||
<where>
|
||||
ug.group_id = #{groupId} and u.active = true and u.user_id != 'a100000001'
|
||||
<if test="userName !=null and userName !=''">
|
||||
and u.name like concat('%',#{userName},'%')
|
||||
</if>
|
||||
<if test="userIdList != null and userIdList.size > 0">
|
||||
and u.user_id in
|
||||
<foreach collection="userIdList" item="userId" separator="," open="(" close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY u.user_id
|
||||
</select>
|
||||
|
||||
<select id="listByRegionIdList" resultType="com.cool.store.entity.EnterpriseUserDO">
|
||||
select
|
||||
id as id,
|
||||
user_id as userId,
|
||||
`name` as name,
|
||||
tel as tel,
|
||||
work_place as workPlace,
|
||||
remark as remark,
|
||||
mobile as mobile,
|
||||
email as email,
|
||||
org_email as orgEmail,
|
||||
active as active,
|
||||
order_in_depts as orderInDepts,
|
||||
is_admin as isAdmin,
|
||||
is_boss as isBoss,
|
||||
dingId as dingId,
|
||||
unionid as unionid,
|
||||
is_leader_in_depts as isLeaderInDepts,
|
||||
is_hide as isHide,
|
||||
`position` as position,
|
||||
avatar as avatar,
|
||||
jobnumber as jobnumber,
|
||||
extattr as extattr,
|
||||
is_enterprise as isEnterprise,
|
||||
roles as roles,
|
||||
monitored_departments as monitoredDepartments,
|
||||
departments as departments,
|
||||
is_leader as isLeader,
|
||||
face_url as faceUrl,
|
||||
create_time as createTime,
|
||||
`language` as language
|
||||
from enterprise_user where user_id != 'a100000001'
|
||||
<foreach collection="regionIdList" item="regionId" separator=" or " open="and (" close=" )">
|
||||
user_region_ids like concat('%/', #{regionId}, '/%')
|
||||
</foreach>
|
||||
order by id
|
||||
</select>
|
||||
|
||||
<update id="updateEnterpriseUser">
|
||||
update enterprise_user
|
||||
<set>
|
||||
<if test="enterpriseUserDO.name != null and enterpriseUserDO.name !=''">`name` = #{enterpriseUserDO.name},</if>
|
||||
<if test="enterpriseUserDO.tel != null and enterpriseUserDO.tel !=''">`tel` = #{enterpriseUserDO.tel},</if>
|
||||
<if test="enterpriseUserDO.workPlace != null and enterpriseUserDO.workPlace !=''">`work_place` =
|
||||
#{enterpriseUserDO.workPlace},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.mobile != null and enterpriseUserDO.mobile !=''">`mobile` =
|
||||
#{enterpriseUserDO.mobile},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.email != null and enterpriseUserDO.email !=''">`email` = #{enterpriseUserDO.email},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.orgEmail != null and enterpriseUserDO.orgEmail !=''">`org_email` =
|
||||
#{enterpriseUserDO.orgEmail},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.active != null">`active` =
|
||||
#{enterpriseUserDO.active},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.orderInDepts != null and enterpriseUserDO.orderInDepts !=''">`order_in_depts` =
|
||||
#{enterpriseUserDO.orderInDepts},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.mainAdmin != null">`main_admin` = #{enterpriseUserDO.mainAdmin},</if>
|
||||
<if test="enterpriseUserDO.isAdmin != null">`is_admin` = #{enterpriseUserDO.isAdmin},</if>
|
||||
<if test="enterpriseUserDO.isBoss != null">`is_boss` = #{enterpriseUserDO.isBoss},</if>
|
||||
<if test="enterpriseUserDO.dingid != null and enterpriseUserDO.dingid !=''">`dingId` =
|
||||
#{enterpriseUserDO.dingid},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.unionid != null and enterpriseUserDO.unionid !=''">`unionid` =
|
||||
#{enterpriseUserDO.unionid},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.isLeaderInDepts != null and enterpriseUserDO.isLeaderInDepts !=''">
|
||||
`is_leader_in_depts` = #{enterpriseUserDO.isLeaderInDepts},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.isHide != null">`is_hide` = #{enterpriseUserDO.isHide},</if>
|
||||
|
||||
<if test="enterpriseUserDO.position != null and enterpriseUserDO.position !=''">`position` =
|
||||
#{enterpriseUserDO.position},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.avatar != null and enterpriseUserDO.avatar !=''">`avatar` =
|
||||
#{enterpriseUserDO.avatar},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.jobnumber != null and enterpriseUserDO.jobnumber !=''">`jobnumber` =
|
||||
#{enterpriseUserDO.jobnumber},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.extattr != null and enterpriseUserDO.extattr !=''">`extattr` =
|
||||
#{enterpriseUserDO.extattr},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.isEnterprise != null">`is_enterprise` =
|
||||
#{enterpriseUserDO.isEnterprise},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.roles != null and enterpriseUserDO.roles !=''">`roles` = #{enterpriseUserDO.roles},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.monitoredDepartments != null and enterpriseUserDO.monitoredDepartments !=''">`
|
||||
monitored_departments` = #{enterpriseUserDO.monitoredDepartments},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.departments != null and enterpriseUserDO.departments !=''">`departments` =
|
||||
#{enterpriseUserDO.departments},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.isLeader != null">`is_leader` = #{enterpriseUserDO.isLeader},</if>
|
||||
<if test="enterpriseUserDO.faceUrl != null and enterpriseUserDO.faceUrl !=''">`face_url` =
|
||||
#{enterpriseUserDO.faceUrl},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.createTime != null">`create_time` = #{enterpriseUserDO.createTime},</if>
|
||||
<if test="enterpriseUserDO.language != null and enterpriseUserDO.language !=''">`language` =
|
||||
#{enterpriseUserDO.language},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.userStatus != null">`user_status` =
|
||||
#{enterpriseUserDO.userStatus},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.thirdOaUniqueFlag != null and enterpriseUserDO.thirdOaUniqueFlag !=''">`third_oa_unique_flag` =
|
||||
#{enterpriseUserDO.thirdOaUniqueFlag},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.userRegionIds != null and enterpriseUserDO.userRegionIds !=''">
|
||||
`user_region_ids` = #{enterpriseUserDO.userRegionIds},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.subordinateChange != null and enterpriseUserDO.subordinateChange !=''">
|
||||
`subordinate_change` = #{enterpriseUserDO.subordinateChange},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.subordinateRange != null and enterpriseUserDO.subordinateRange !=''">
|
||||
`subordinate_range` = #{enterpriseUserDO.subordinateRange},
|
||||
</if>
|
||||
<if test="enterpriseUserDO.remark != null and enterpriseUserDO.remark !=''">
|
||||
`remark` = #{enterpriseUserDO.remark},
|
||||
</if>
|
||||
</set>
|
||||
where user_id =#{enterpriseUserDO.userId}
|
||||
</update>
|
||||
|
||||
<select id="getMainAdminUserIds" resultType="string">
|
||||
select user_id from enterprise_user where main_admin = true and active = true
|
||||
</select>
|
||||
|
||||
<select id="selectSpecifyNodeUserIds" resultType="string">
|
||||
select
|
||||
user_id
|
||||
from
|
||||
enterprise_user
|
||||
where
|
||||
departments like concat('%/',#{dingDeptId},'/%')
|
||||
</select>
|
||||
|
||||
<select id="selectAllUserIds" resultType="java.lang.String">
|
||||
select user_id as userId from enterprise_user
|
||||
</select>
|
||||
|
||||
<select id="selectByUserIdIgnoreActive" resultType="com.cool.store.entity.EnterpriseUserDO">
|
||||
select
|
||||
id as id,
|
||||
user_id as userId,
|
||||
`name` as name,
|
||||
tel as tel,
|
||||
work_place as workPlace,
|
||||
remark as remark,
|
||||
mobile as mobile,
|
||||
email as email,
|
||||
org_email as orgEmail,
|
||||
active as active,
|
||||
order_in_depts as orderInDepts,
|
||||
is_admin as isAdmin,
|
||||
is_boss as isBoss,
|
||||
dingId as dingId,
|
||||
unionid as unionid,
|
||||
is_leader_in_depts as isLeaderInDepts,
|
||||
is_hide as isHide,
|
||||
`position` as position,
|
||||
avatar as avatar,
|
||||
face_url as faceUrl,
|
||||
jobnumber as jobnumber,
|
||||
extattr as extattr,
|
||||
is_enterprise as isEnterprise,
|
||||
roles as roles,
|
||||
monitored_departments as monitoredDepartments,
|
||||
departments as departments,
|
||||
is_leader as isLeader,
|
||||
create_time as createTime,
|
||||
`language` as language,
|
||||
third_oa_unique_flag as thirdOaUniqueFlag,
|
||||
subordinate_change as subordinateChange,
|
||||
subordinate_range as subordinateRange
|
||||
from enterprise_user where user_id = #{userId, jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<insert id="insertEnterpriseUser">
|
||||
insert into enterprise_user
|
||||
( `id`,
|
||||
`user_id`,
|
||||
`name`,
|
||||
`tel`,
|
||||
`work_place`,
|
||||
`remark`,
|
||||
`mobile`,
|
||||
`email`,
|
||||
`org_email`,
|
||||
`active`,
|
||||
`order_in_depts`,
|
||||
`main_admin`,
|
||||
`is_admin`,
|
||||
`is_boss`,
|
||||
`dingId`,
|
||||
`unionid`,
|
||||
`is_leader_in_depts`,
|
||||
`is_hide`,
|
||||
`position`,
|
||||
`avatar`,
|
||||
`jobnumber`,
|
||||
`extattr`,
|
||||
`is_enterprise`,
|
||||
`roles`,
|
||||
`monitored_departments`,
|
||||
`departments`,
|
||||
`is_leader`,
|
||||
`face_url`,
|
||||
`create_time`,
|
||||
`user_status`,
|
||||
`third_oa_unique_flag`,
|
||||
`subordinate_range`
|
||||
)
|
||||
values
|
||||
(
|
||||
#{entity.id},
|
||||
#{entity.userId},
|
||||
#{entity.name},
|
||||
#{entity.tel},
|
||||
#{entity.workPlace},
|
||||
#{entity.remark},
|
||||
#{entity.mobile},
|
||||
#{entity.email},
|
||||
#{entity.orgEmail},
|
||||
#{entity.active},
|
||||
#{entity.orderInDepts},
|
||||
#{entity.mainAdmin},
|
||||
#{entity.isAdmin},
|
||||
#{entity.isBoss},
|
||||
#{entity.dingid},
|
||||
#{entity.unionid},
|
||||
#{entity.isLeaderInDepts},
|
||||
#{entity.isHide},
|
||||
#{entity.position},
|
||||
#{entity.avatar},
|
||||
#{entity.jobnumber},
|
||||
#{entity.extattr},
|
||||
#{entity.isEnterprise},
|
||||
#{entity.roles},
|
||||
#{entity.monitoredDepartments},
|
||||
#{entity.departments},
|
||||
#{entity.isLeader},
|
||||
#{entity.faceUrl},
|
||||
now(),
|
||||
#{entity.userStatus},
|
||||
#{entity.thirdOaUniqueFlag},
|
||||
#{entity.subordinateRange}
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -1,6 +1,6 @@
|
||||
jdbc.driver = com.mysql.cj.jdbc.Driver
|
||||
jdbc.url = jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_base?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true
|
||||
jdbc.url = jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_hy?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true
|
||||
jdbc.user= coolstore
|
||||
jdbc.password = CSCErYcXniNYm7bT
|
||||
|
||||
table.name = enterprise_user_department_e88b6a2bc1334164b54977a4dbfe5d9d
|
||||
table.name = enterprise_user
|
||||
Reference in New Issue
Block a user