Merge remote-tracking branch 'origin/dev/feat/partner1.5.2_20231121' into dev/feat/partner1.5.2_20231121
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.SuperAdminConfigDO;
|
||||
import com.cool.store.mapper.SuperAdminConfigMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/11/9 14:26
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Repository
|
||||
public class SuperAdminConfigDAO {
|
||||
|
||||
@Resource
|
||||
SuperAdminConfigMapper superAdminConfigMapper;
|
||||
|
||||
public SuperAdminConfigDO selectByPrimaryKey(Long id){
|
||||
if (id==null){
|
||||
return null;
|
||||
}
|
||||
return superAdminConfigMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
|
||||
public SuperAdminConfigDO isSuperAdmin(String userId){
|
||||
return superAdminConfigMapper.isSuperAdmin(userId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.SuperAdminConfigDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @date 2023-11-09 02:24
|
||||
*/
|
||||
public interface SuperAdminConfigMapper {
|
||||
|
||||
SuperAdminConfigDO selectByPrimaryKey(Long id);
|
||||
|
||||
SuperAdminConfigDO isSuperAdmin(@Param("userId") String userId);
|
||||
}
|
||||
@@ -598,11 +598,6 @@
|
||||
<if test="storeKeyword!=null and storeKeyword!='' and storeKeywordType!=null and storeKeywordType=='partnerMobile'">
|
||||
AND hpuinfo.recommend_partner_mobile like concat('%',#{storeKeyword},'%')
|
||||
</if>
|
||||
<if test="userIdList!=null and userIdList.size>0 and developmentManagerList!=null and developmentManagerList.size==0">
|
||||
<foreach collection="userIdList" item="userId" open="and hpli.investment_manager in (" close=")" separator=",">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userPortraitIdList!=null and userPortraitIdList.size>0 and userPortraitQueryType!=null and userPortraitQueryType=='contains'">
|
||||
<foreach collection="userPortraitIdList" separator="or" open="and (" close=")" item="userPortraitId">
|
||||
bi.user_portrait like concat("%,", #{userPortraitId}, ",%")
|
||||
@@ -630,6 +625,11 @@
|
||||
<if test="userChannelQueryType!=null and userChannelQueryType == 'blank' ">
|
||||
AND hpuinfo.user_channel_id is null
|
||||
</if>
|
||||
<if test="userIdList!=null and userIdList.size>0 and developmentManagerList!=null and developmentManagerList.size==0">
|
||||
<foreach collection="userIdList" item="userId" open="and hpli.investment_manager in (" close=")" separator=",">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userIdList!=null and userIdList.size==0 and developmentManagerList!=null and developmentManagerList.size>0">
|
||||
<foreach collection="developmentManagerList" item="developmentManager" open="and hpli.development_manager in (" close=")" separator=",">
|
||||
#{developmentManager}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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.SuperAdminConfigMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.SuperAdminConfigDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="super_admin_user_id" jdbcType="VARCHAR" property="superAdminUserId" />
|
||||
<result column="deleted" jdbcType="TINYINT" property="deleted" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, super_admin_user_id, deleted, create_time, update_time, create_user_id, update_user_id
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"></include>
|
||||
from super_admin_config where
|
||||
id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<select id="isSuperAdmin" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"></include>
|
||||
from super_admin_config
|
||||
where deleted = 0 and super_admin_user_id = #{userId} limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -29,7 +29,7 @@
|
||||
<!-- targetPackage:mapper接口生成的位置 -->
|
||||
<javaClientGenerator targetPackage="com.cool.store.mapper" targetProject="coolstore-partner-dao/src/main/java" type="XMLMAPPER" />
|
||||
|
||||
<table tableName="${table.name}" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
|
||||
<table tableName="super_admin_config" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
|
||||
enableSelectByExample="false" selectByExampleQueryId="false">
|
||||
<generatedKey column="id" sqlStatement="Mysql" identity="true" type=""/>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user