拆分think模块包
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?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.gxwebsoft.common.system.mapper.AccessKeyMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_access_key a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.accessKey != null">
|
||||
AND a.accessKey LIKE CONCAT('%', #{param.accessKey}, '%')
|
||||
</if>
|
||||
<if test="param.accessSecret != null">
|
||||
AND a.accessSecret LIKE CONCAT('%', #{param.accessSecret}, '%')
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.AccessKey">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.AccessKey">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,203 @@
|
||||
<?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.gxwebsoft.common.system.mapper.AppMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_app a
|
||||
<where>
|
||||
<if test="param.appId != null">
|
||||
AND a.app_id = #{param.appId}
|
||||
</if>
|
||||
<if test="param.appName != null">
|
||||
AND a.app_name LIKE CONCAT('%', #{param.appName}, '%')
|
||||
</if>
|
||||
<if test="param.appCode != null">
|
||||
AND a.app_code LIKE CONCAT('%', #{param.appCode}, '%')
|
||||
</if>
|
||||
<if test="param.parentId != null">
|
||||
AND a.parent_id = #{param.parentId}
|
||||
</if>
|
||||
<if test="param.appType != null">
|
||||
AND a.app_type LIKE CONCAT('%', #{param.appType}, '%')
|
||||
</if>
|
||||
<if test="param.appTypeMultiple != null">
|
||||
AND a.app_type_multiple LIKE CONCAT('%', #{param.appTypeMultiple}, '%')
|
||||
</if>
|
||||
<if test="param.menuType != null">
|
||||
AND a.menu_type = #{param.menuType}
|
||||
</if>
|
||||
<if test="param.companyId != null">
|
||||
AND a.company_id = #{param.companyId}
|
||||
</if>
|
||||
<if test="param.companyName != null">
|
||||
AND a.company_name LIKE CONCAT('%', #{param.companyName}, '%')
|
||||
</if>
|
||||
<if test="param.appIcon != null">
|
||||
AND a.app_icon LIKE CONCAT('%', #{param.appIcon}, '%')
|
||||
</if>
|
||||
<if test="param.appQrcode != null">
|
||||
AND a.app_qrcode LIKE CONCAT('%', #{param.appQrcode}, '%')
|
||||
</if>
|
||||
<if test="param.appUrl != null">
|
||||
AND a.app_url LIKE CONCAT('%', #{param.appUrl}, '%')
|
||||
</if>
|
||||
<if test="param.adminUrl != null">
|
||||
AND a.admin_url LIKE CONCAT('%', #{param.adminUrl}, '%')
|
||||
</if>
|
||||
<if test="param.downUrl != null">
|
||||
AND a.down_url LIKE CONCAT('%', #{param.downUrl}, '%')
|
||||
</if>
|
||||
<if test="param.serverUrl != null">
|
||||
AND a.server_url LIKE CONCAT('%', #{param.serverUrl}, '%')
|
||||
</if>
|
||||
<if test="param.fileUrl != null">
|
||||
AND a.file_url LIKE CONCAT('%', #{param.fileUrl}, '%')
|
||||
</if>
|
||||
<if test="param.callbackUrl != null">
|
||||
AND a.callback_url LIKE CONCAT('%', #{param.callbackUrl}, '%')
|
||||
</if>
|
||||
<if test="param.docsUrl != null">
|
||||
AND a.docs_url LIKE CONCAT('%', #{param.docsUrl}, '%')
|
||||
</if>
|
||||
<if test="param.gitUrl != null">
|
||||
AND a.git_url LIKE CONCAT('%', #{param.gitUrl}, '%')
|
||||
</if>
|
||||
<if test="param.prototypeUrl != null">
|
||||
AND a.prototype_url LIKE CONCAT('%', #{param.prototypeUrl}, '%')
|
||||
</if>
|
||||
<if test="param.ipAddress != null">
|
||||
AND a.ip_address LIKE CONCAT('%', #{param.ipAddress}, '%')
|
||||
</if>
|
||||
<if test="param.images != null">
|
||||
AND a.images LIKE CONCAT('%', #{param.images}, '%')
|
||||
</if>
|
||||
<if test="param.packageName != null">
|
||||
AND a.package_name LIKE CONCAT('%', #{param.packageName}, '%')
|
||||
</if>
|
||||
<if test="param.clicks != null">
|
||||
AND a.clicks = #{param.clicks}
|
||||
</if>
|
||||
<if test="param.installs != null">
|
||||
AND a.installs = #{param.installs}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.requirement != null">
|
||||
AND a.requirement LIKE CONCAT('%', #{param.requirement}, '%')
|
||||
</if>
|
||||
<if test="param.developer != null">
|
||||
AND a.developer LIKE CONCAT('%', #{param.developer}, '%')
|
||||
</if>
|
||||
<if test="param.director != null">
|
||||
AND a.director LIKE CONCAT('%', #{param.director}, '%')
|
||||
</if>
|
||||
<if test="param.projectDirector != null">
|
||||
AND a.project_director LIKE CONCAT('%', #{param.projectDirector}, '%')
|
||||
</if>
|
||||
<if test="param.salesman != null">
|
||||
AND a.salesman LIKE CONCAT('%', #{param.salesman}, '%')
|
||||
</if>
|
||||
<if test="param.price != null">
|
||||
AND a.price = #{param.price}
|
||||
</if>
|
||||
<if test="param.linePrice != null">
|
||||
AND a.line_price = #{param.linePrice}
|
||||
</if>
|
||||
<if test="param.score != null">
|
||||
AND a.score LIKE CONCAT('%', #{param.score}, '%')
|
||||
</if>
|
||||
<if test="param.star != null">
|
||||
AND a.star LIKE CONCAT('%', #{param.star}, '%')
|
||||
</if>
|
||||
<if test="param.path != null">
|
||||
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||
</if>
|
||||
<if test="param.component != null">
|
||||
AND a.component LIKE CONCAT('%', #{param.component}, '%')
|
||||
</if>
|
||||
<if test="param.authority != null">
|
||||
AND a.authority LIKE CONCAT('%', #{param.authority}, '%')
|
||||
</if>
|
||||
<if test="param.target != null">
|
||||
AND a.target LIKE CONCAT('%', #{param.target}, '%')
|
||||
</if>
|
||||
<if test="param.hide != null">
|
||||
AND a.hide = #{param.hide}
|
||||
</if>
|
||||
<if test="param.search != null">
|
||||
AND a.search = #{param.search}
|
||||
</if>
|
||||
<if test="param.active != null">
|
||||
AND a.active LIKE CONCAT('%', #{param.active}, '%')
|
||||
</if>
|
||||
<if test="param.meta != null">
|
||||
AND a.meta LIKE CONCAT('%', #{param.meta}, '%')
|
||||
</if>
|
||||
<if test="param.edition != null">
|
||||
AND a.edition LIKE CONCAT('%', #{param.edition}, '%')
|
||||
</if>
|
||||
<if test="param.version != null">
|
||||
AND a.version LIKE CONCAT('%', #{param.version}, '%')
|
||||
</if>
|
||||
<if test="param.isUse != null">
|
||||
AND a.is_use = #{param.isUse}
|
||||
</if>
|
||||
<if test="param.file1 != null">
|
||||
AND a.file1 LIKE CONCAT('%', #{param.file1}, '%')
|
||||
</if>
|
||||
<if test="param.file2 != null">
|
||||
AND a.file2 LIKE CONCAT('%', #{param.file2}, '%')
|
||||
</if>
|
||||
<if test="param.file3 != null">
|
||||
AND a.file3 LIKE CONCAT('%', #{param.file3}, '%')
|
||||
</if>
|
||||
<if test="param.appStatus != null">
|
||||
AND a.app_status LIKE CONCAT('%', #{param.appStatus}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.organizationId != null">
|
||||
AND a.organization_id = #{param.organizationId}
|
||||
</if>
|
||||
<if test="param.tenantCode != null">
|
||||
AND a.tenant_code LIKE CONCAT('%', #{param.tenantCode}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.App">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.App">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?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.gxwebsoft.common.system.mapper.AppRenewMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_app_renew a
|
||||
<where>
|
||||
<if test="param.appRenewId != null">
|
||||
AND a.app_renew_id = #{param.appRenewId}
|
||||
</if>
|
||||
<if test="param.money != null">
|
||||
AND a.money = #{param.money}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.startTime != null">
|
||||
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
|
||||
</if>
|
||||
<if test="param.endTime != null">
|
||||
AND a.end_time LIKE CONCAT('%', #{param.endTime}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.appId != null">
|
||||
AND a.app_id = #{param.appId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.AppRenew">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.AppRenew">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?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.gxwebsoft.common.system.mapper.AppUrlMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_app_url a
|
||||
<where>
|
||||
<if test="param.appUrlId != null">
|
||||
AND a.app_url_id = #{param.appUrlId}
|
||||
</if>
|
||||
<if test="param.appId != null">
|
||||
AND a.app_id = #{param.appId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type LIKE CONCAT('%', #{param.type}, '%')
|
||||
</if>
|
||||
<if test="param.domain != null">
|
||||
AND a.domain LIKE CONCAT('%', #{param.domain}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.AppUrl">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.AppUrl">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?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.gxwebsoft.common.system.mapper.AppUserMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*, b.nickname,b.email,b.phone,b.avatar
|
||||
FROM sys_app_user a
|
||||
LEFT JOIN sys_user b ON a.user_id = b.user_id
|
||||
<where>
|
||||
<if test="param.appUserId != null">
|
||||
AND a.app_user_id = #{param.appUserId}
|
||||
</if>
|
||||
<if test="param.role != null">
|
||||
AND a.role = #{param.role}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.appId != null">
|
||||
AND a.app_id = #{param.appId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (b.nickname LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR b.email LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR b.username LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR b.phone LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.AppUser">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.AppUser">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?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.gxwebsoft.common.system.mapper.ChatConversationMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_chat_conversation a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.friendId != null">
|
||||
AND a.friend_id = #{param.friendId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.unRead != null">
|
||||
AND a.un_read = #{param.unRead}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.ChatConversation">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.ChatConversation">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?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.gxwebsoft.common.system.mapper.ChatMessageMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.nickname as formUserName,b.avatar as formUserAvatar,c.nickname as toUserName,c.avatar as toUserAvatar
|
||||
FROM sys_chat_message a
|
||||
LEFT JOIN sys_user b ON a.form_user_id = b.user_id
|
||||
LEFT JOIN sys_user c ON a.to_user_id = c.user_id
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.formUserId != null">
|
||||
AND a.form_user_id = #{param.formUserId}
|
||||
</if>
|
||||
<if test="param.toUserId != null">
|
||||
AND a.to_user_id = #{param.toUserId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type LIKE CONCAT('%', #{param.type}, '%')
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.sideTo != null">
|
||||
AND a.side_to = #{param.sideTo}
|
||||
</if>
|
||||
<if test="param.sideFrom != null">
|
||||
AND a.side_from = #{param.sideFrom}
|
||||
</if>
|
||||
<if test="param.withdraw != null">
|
||||
AND a.withdraw = #{param.withdraw}
|
||||
</if>
|
||||
<if test="param.fileInfo != null">
|
||||
AND a.file_info LIKE CONCAT('%', #{param.fileInfo}, '%')
|
||||
</if>
|
||||
<if test="param.hasContact != null">
|
||||
AND a.has_contact = #{param.hasContact}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
a.content LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR b.nickname LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR b.phone LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR b.real_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.ChatMessage">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.ChatMessage">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,177 @@
|
||||
<?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.gxwebsoft.common.system.mapper.CompanyMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.tenant_id,b.tenant_name,b.tenant_code
|
||||
FROM sys_company a
|
||||
LEFT JOIN sys_tenant b ON a.tenant_id = b.tenant_id
|
||||
<where>
|
||||
<if test="param.companyId != null">
|
||||
AND a.company_id = #{param.companyId}
|
||||
</if>
|
||||
<if test="param.shortName != null">
|
||||
AND a.short_name LIKE CONCAT('%', #{param.shortName}, '%')
|
||||
</if>
|
||||
<if test="param.companyName != null">
|
||||
AND a.company_name LIKE CONCAT('%', #{param.companyName}, '%')
|
||||
</if>
|
||||
<if test="param.companyType != null">
|
||||
AND a.company_type = #{param.companyType}
|
||||
</if>
|
||||
<if test="param.companyLogo != null">
|
||||
AND a.company_logo LIKE CONCAT('%', #{param.companyLogo}, '%')
|
||||
</if>
|
||||
<if test="param.domain != null">
|
||||
AND a.domain LIKE CONCAT('%', #{param.domain}, '%')
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone = #{param.phone}
|
||||
</if>
|
||||
<if test="param.invoiceHeader != null">
|
||||
AND a.Invoice_header LIKE CONCAT('%', #{param.invoiceHeader}, '%')
|
||||
</if>
|
||||
<if test="param.startTime != null">
|
||||
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
|
||||
</if>
|
||||
<if test="param.expirationTime != null">
|
||||
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
|
||||
</if>
|
||||
<if test="param.version != null">
|
||||
AND a.version = #{param.version}
|
||||
</if>
|
||||
<if test="param.members != null">
|
||||
AND a.members = #{param.members}
|
||||
</if>
|
||||
<if test="param.industryParent != null">
|
||||
AND a.industry_parent LIKE CONCAT('%', #{param.industryParent}, '%')
|
||||
</if>
|
||||
<if test="param.industryChild != null">
|
||||
AND a.industry_child LIKE CONCAT('%', #{param.industryChild}, '%')
|
||||
</if>
|
||||
<if test="param.departments != null">
|
||||
AND a.departments = #{param.departments}
|
||||
</if>
|
||||
<if test="param.country != null">
|
||||
AND a.country LIKE CONCAT('%', #{param.country}, '%')
|
||||
</if>
|
||||
<if test="param.province != null">
|
||||
AND a.province LIKE CONCAT('%', #{param.province}, '%')
|
||||
</if>
|
||||
<if test="param.city != null">
|
||||
AND a.city LIKE CONCAT('%', #{param.city}, '%')
|
||||
</if>
|
||||
<if test="param.region != null">
|
||||
AND a.region LIKE CONCAT('%', #{param.region}, '%')
|
||||
</if>
|
||||
<if test="param.address != null">
|
||||
AND a.address LIKE CONCAT('%', #{param.address}, '%')
|
||||
</if>
|
||||
<if test="param.longitude != null">
|
||||
AND a.longitude LIKE CONCAT('%', #{param.longitude}, '%')
|
||||
</if>
|
||||
<if test="param.latitude != null">
|
||||
AND a.latitude LIKE CONCAT('%', #{param.latitude}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.authentication != null">
|
||||
AND a.authentication = #{param.authentication}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.authoritative != null">
|
||||
AND a.authoritative = #{param.authoritative}
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.appName != null">
|
||||
AND a.short_name = #{param.appName}
|
||||
</if>
|
||||
<if test="param.email != null">
|
||||
AND a.email = #{param.email}
|
||||
</if>
|
||||
<if test="param.merchantId != null">
|
||||
AND a.merchant_id = #{param.merchantId}
|
||||
</if>
|
||||
<if test="param.companyIds != null">
|
||||
AND a.company_id IN
|
||||
<foreach collection="param.companyIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.company_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.short_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.tenant_id = #{param.keywords}
|
||||
OR a.domain LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Company">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询不限租户 -->
|
||||
<select id="selectPageRelAll" resultType="com.gxwebsoft.common.system.entity.Company">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 企业查询不限租户 -->
|
||||
<select id="getCompanyAll" resultType="com.gxwebsoft.common.system.entity.Company">
|
||||
SELECT a.*,b.tenant_id,b.tenant_name,b.tenant_code
|
||||
FROM sys_company a
|
||||
LEFT JOIN sys_tenant b ON a.tenant_id = b.tenant_id
|
||||
<where>
|
||||
<if test="companyId != null">
|
||||
AND a.company_id = #{companyId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Company">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 检查是否存在 -->
|
||||
<select id="getCount" resultType="com.gxwebsoft.common.system.entity.Company">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 更新企业信息-->
|
||||
<update id="updateByCompanyId">
|
||||
UPDATE sys_company SET storage = #{param.storage} WHERE company_id = #{param.companyId}
|
||||
</update>
|
||||
|
||||
<!-- 删除企业信息-->
|
||||
<update id="removeCompanyAll">
|
||||
UPDATE sys_company SET deleted = 1 WHERE company_id = #{param.companyId}
|
||||
</update>
|
||||
|
||||
<update id="undeleteAll">
|
||||
UPDATE sys_company SET deleted = 0 WHERE company_id = #{param.companyId}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?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.gxwebsoft.common.system.mapper.DictDataMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,
|
||||
b.dict_code,
|
||||
b.dict_name
|
||||
FROM sys_dict_data a
|
||||
LEFT JOIN sys_dict b ON a.dict_id = b.dict_id
|
||||
<where>
|
||||
AND a.deleted = 0
|
||||
<if test="param.dictDataId != null">
|
||||
AND a.dict_data_id = #{param.dictDataId}
|
||||
</if>
|
||||
<if test="param.dictId != null">
|
||||
AND a.dict_id = #{param.dictId}
|
||||
</if>
|
||||
<if test="param.dictDataCode != null">
|
||||
AND a.dict_data_code LIKE CONCAT('%', #{param.dictDataCode}, '%')
|
||||
</if>
|
||||
<if test="param.dictDataName != null">
|
||||
AND a.dict_data_name LIKE CONCAT('%', #{param.dictDataName}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.dictCode != null">
|
||||
AND b.dict_code = #{param.dictCode}
|
||||
</if>
|
||||
<if test="param.dictName != null">
|
||||
AND b.dict_name = #{param.dictName}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
a.dict_data_code LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.dict_data_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.DictData">
|
||||
<include refid="selectSql"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.DictData">
|
||||
<include refid="selectSql"/>
|
||||
</select>
|
||||
|
||||
<!-- 根据dictCode和dictDataName查询 -->
|
||||
<select id="getByDictCodeAndName" resultType="com.gxwebsoft.common.system.entity.DictData">
|
||||
SELECT a.*,
|
||||
b.dict_code,
|
||||
b.dict_name
|
||||
FROM sys_dict_data a
|
||||
LEFT JOIN sys_dict b ON a.dict_id = b.dict_id
|
||||
WHERE a.dict_data_name = #{dictDataName}
|
||||
AND b.dict_code = #{dictCode}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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.gxwebsoft.common.system.mapper.DictMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?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.gxwebsoft.common.system.mapper.DictionaryDataMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,
|
||||
b.dict_code,
|
||||
b.dict_name
|
||||
FROM sys_dictionary_data a
|
||||
LEFT JOIN sys_dictionary b ON a.dict_id = b.dict_id
|
||||
<where>
|
||||
AND a.deleted = 0
|
||||
<if test="param.dictDataId != null">
|
||||
AND a.dict_data_id = #{param.dictDataId}
|
||||
</if>
|
||||
<if test="param.dictId != null">
|
||||
AND a.dict_id = #{param.dictId}
|
||||
</if>
|
||||
<if test="param.dictDataCode != null">
|
||||
AND a.dict_data_code LIKE CONCAT('%', #{param.dictDataCode}, '%')
|
||||
</if>
|
||||
<if test="param.dictDataName != null">
|
||||
AND a.dict_data_name LIKE CONCAT('%', #{param.dictDataName}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.dictCode != null">
|
||||
AND b.dict_code = #{param.dictCode}
|
||||
</if>
|
||||
<if test="param.dictName != null">
|
||||
AND b.dict_name = #{param.dictName}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
a.dict_data_code LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.dict_data_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.DictionaryData">
|
||||
<include refid="selectSql"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.DictionaryData">
|
||||
<include refid="selectSql"/>
|
||||
</select>
|
||||
|
||||
<!-- 根据dictCode和dictDataName查询 -->
|
||||
<select id="getByDictCodeAndName" resultType="com.gxwebsoft.common.system.entity.DictionaryData">
|
||||
SELECT a.*,
|
||||
b.dict_code,
|
||||
b.dict_name
|
||||
FROM sys_dictionary_data a
|
||||
LEFT JOIN sys_dictionary b ON a.dict_id = b.dict_id
|
||||
WHERE a.dict_data_name = #{dictDataName}
|
||||
AND b.dict_code = #{dictCode}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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.gxwebsoft.common.system.mapper.DictionaryMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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.gxwebsoft.common.system.mapper.EmailRecordMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?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.gxwebsoft.common.system.mapper.EnvironmentMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_environment a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.environmentName != null">
|
||||
AND a.environment_name LIKE CONCAT('%', #{param.environmentName}, '%')
|
||||
</if>
|
||||
<if test="param.environmentCode != null">
|
||||
AND a.environment_code LIKE CONCAT('%', #{param.environmentCode}, '%')
|
||||
</if>
|
||||
<if test="param.brand != null">
|
||||
AND a.brand LIKE CONCAT('%', #{param.brand}, '%')
|
||||
</if>
|
||||
<if test="param.serverIp != null">
|
||||
AND a.server_ip LIKE CONCAT('%', #{param.serverIp}, '%')
|
||||
</if>
|
||||
<if test="param.modulesUrl != null">
|
||||
AND a.modules_url LIKE CONCAT('%', #{param.modulesUrl}, '%')
|
||||
</if>
|
||||
<if test="param.modulesApi != null">
|
||||
AND a.modules_api LIKE CONCAT('%', #{param.modulesApi}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Environment">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Environment">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?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.gxwebsoft.common.system.mapper.FileRecordMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,
|
||||
b.username create_username,
|
||||
b.nickname create_nickname,
|
||||
b.avatar
|
||||
FROM sys_file_record a
|
||||
LEFT JOIN sys_user b ON a.create_user_id = b.user_id
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.`name` LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.path != null">
|
||||
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||
</if>
|
||||
<if test="param.appId != null">
|
||||
AND a.app_id = #{param.appId}
|
||||
</if>
|
||||
<if test="param.companyId != null">
|
||||
AND a.company_id = #{param.companyId}
|
||||
</if>
|
||||
<if test="param.createUserId != null">
|
||||
AND a.create_user_id = #{param.createUserId}
|
||||
</if>
|
||||
<if test="param.groupId != null">
|
||||
AND a.group_id = #{param.groupId}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createUsername != null">
|
||||
AND b.username = #{param.createUsername}
|
||||
</if>
|
||||
<if test="param.createNickname != null">
|
||||
AND b.nickname LIKE CONCAT('%', #{param.createNickname}, '%')
|
||||
</if>
|
||||
<if test="param.contentType != null">
|
||||
AND a.content_type LIKE CONCAT('%', #{param.contentType}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.FileRecord">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.FileRecord">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 根据path查询 -->
|
||||
<select id="getByIdPath" resultType="com.gxwebsoft.common.system.entity.FileRecord">
|
||||
SELECT *
|
||||
FROM sys_file_record
|
||||
WHERE path = #{path}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?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.gxwebsoft.common.system.mapper.LoginRecordMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,
|
||||
b.user_id,
|
||||
b.nickname
|
||||
FROM sys_login_record a
|
||||
LEFT JOIN sys_user b ON a.username = b.username
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.username != null">
|
||||
AND a.username LIKE CONCAT('%', #{param.username}, '%')
|
||||
</if>
|
||||
<if test="param.os != null">
|
||||
AND a.os LIKE CONCAT('%', #{param.os}, '%')
|
||||
</if>
|
||||
<if test="param.device != null">
|
||||
AND a.device LIKE CONCAT('%', #{param.device}, '%')
|
||||
</if>
|
||||
<if test="param.browser != null">
|
||||
AND a.browser LIKE CONCAT('%', #{param.browser}, '%')
|
||||
</if>
|
||||
<if test="param.ip != null">
|
||||
AND a.ip LIKE CONCAT('%', #{param.ip}, '%')
|
||||
</if>
|
||||
<if test="param.loginType != null">
|
||||
AND a.login_type LIKE CONCAT('%', #{param.loginType}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND b.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.nickname != null">
|
||||
AND b.nickname LIKE CONCAT('%', #{param.nickname}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.LoginRecord">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.LoginRecord">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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.gxwebsoft.common.system.mapper.MenuMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_menu a
|
||||
<where>
|
||||
<if test="param.menuId != null">
|
||||
AND a.menu_id = #{param.menuId}
|
||||
</if>
|
||||
<if test="param.parentId != null">
|
||||
AND a.parent_id = #{param.parentId}
|
||||
</if>
|
||||
<if test="param.modules != null">
|
||||
AND a.modules = #{param.modules}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.tenantId != null">
|
||||
AND a.tenant_id = #{param.tenantId}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="getMenuByClone" resultType="com.gxwebsoft.common.system.entity.Menu">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?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.gxwebsoft.common.system.mapper.MerchantAccountMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.merchant_name,b.goods_review
|
||||
FROM sys_merchant_account a
|
||||
LEFT JOIN sys_merchant b ON a.merchant_id = b.merchant_id
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone = #{param.phone}
|
||||
</if>
|
||||
<if test="param.realName != null">
|
||||
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
||||
</if>
|
||||
<if test="param.merchantId != null">
|
||||
AND a.merchant_id = #{param.merchantId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.MerchantAccount">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.MerchantAccount">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<select id="getMerchantAccountByPhone" resultType="com.gxwebsoft.common.system.entity.MerchantAccount">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?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.gxwebsoft.common.system.mapper.MerchantApplyMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_merchant_apply a
|
||||
<where>
|
||||
<if test="param.applyId != null">
|
||||
AND a.apply_id = #{param.applyId}
|
||||
</if>
|
||||
<if test="param.merchantName != null">
|
||||
AND a.merchant_name LIKE CONCAT('%', #{param.merchantName}, '%')
|
||||
</if>
|
||||
<if test="param.image != null">
|
||||
AND a.image LIKE CONCAT('%', #{param.image}, '%')
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||
</if>
|
||||
<if test="param.realName != null">
|
||||
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
||||
</if>
|
||||
<if test="param.shopType != null">
|
||||
AND a.shop_type LIKE CONCAT('%', #{param.shopType}, '%')
|
||||
</if>
|
||||
<if test="param.category != null">
|
||||
AND a.category LIKE CONCAT('%', #{param.category}, '%')
|
||||
</if>
|
||||
<if test="param.commission != null">
|
||||
AND a.commission = #{param.commission}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND a.keywords LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
</if>
|
||||
<if test="param.files != null">
|
||||
AND a.files LIKE CONCAT('%', #{param.files}, '%')
|
||||
</if>
|
||||
<if test="param.ownStore != null">
|
||||
AND a.own_store = #{param.ownStore}
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.goodsReview != null">
|
||||
AND a.goods_review = #{param.goodsReview}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.MerchantApply">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.MerchantApply">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,93 @@
|
||||
<?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.gxwebsoft.common.system.mapper.MerchantMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_merchant a
|
||||
<where>
|
||||
<if test="param.merchantId != null">
|
||||
AND a.merchant_id = #{param.merchantId}
|
||||
</if>
|
||||
<if test="param.merchantName != null">
|
||||
AND a.merchant_name LIKE CONCAT('%', #{param.merchantName}, '%')
|
||||
</if>
|
||||
<if test="param.merchantCode != null">
|
||||
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||
</if>
|
||||
<if test="param.image != null">
|
||||
AND a.image LIKE CONCAT('%', #{param.image}, '%')
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||
</if>
|
||||
<if test="param.realName != null">
|
||||
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
||||
</if>
|
||||
<if test="param.shopType != null">
|
||||
AND a.shop_type LIKE CONCAT('%', #{param.shopType}, '%')
|
||||
</if>
|
||||
<if test="param.category != null">
|
||||
AND a.category LIKE CONCAT('%', #{param.category}, '%')
|
||||
</if>
|
||||
<if test="param.commission != null">
|
||||
AND a.commission = #{param.commission}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND a.keywords LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
</if>
|
||||
<if test="param.files != null">
|
||||
AND a.files LIKE CONCAT('%', #{param.files}, '%')
|
||||
</if>
|
||||
<if test="param.ownStore != null">
|
||||
AND a.own_store = #{param.ownStore}
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.goodsReview != null">
|
||||
AND a.goods_review = #{param.goodsReview}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
a.merchant_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.phone LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.real_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Merchant">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Merchant">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?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.gxwebsoft.common.system.mapper.MerchantTypeMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_merchant_type a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.MerchantType">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.MerchantType">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?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.gxwebsoft.common.system.mapper.ModulesMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_modules a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.modules != null">
|
||||
AND a.modules LIKE CONCAT('%', #{param.modules}, '%')
|
||||
</if>
|
||||
<if test="param.modulesUrl != null">
|
||||
AND a.modules_url LIKE CONCAT('%', #{param.modulesUrl}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Modules">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Modules">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?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.gxwebsoft.common.system.mapper.NoticeMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_notice a
|
||||
<where>
|
||||
<if test="param.noticeId != null">
|
||||
AND a.notice_id = #{param.noticeId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type LIKE CONCAT('%', #{param.type}, '%')
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
</if>
|
||||
<if test="param.icon != null">
|
||||
AND a.icon LIKE CONCAT('%', #{param.icon}, '%')
|
||||
</if>
|
||||
<if test="param.color != null">
|
||||
AND a.color LIKE CONCAT('%', #{param.color}, '%')
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.isRead != null">
|
||||
AND a.is_read = #{param.isRead}
|
||||
</if>
|
||||
<if test="param.progress != null">
|
||||
AND a.progress = #{param.progress}
|
||||
</if>
|
||||
<if test="param.channel != null">
|
||||
AND a.channel = #{param.channel}
|
||||
</if>
|
||||
<if test="param.source != null">
|
||||
AND a.source LIKE CONCAT('%', #{param.source}, '%')
|
||||
</if>
|
||||
<if test="param.sourceId != null">
|
||||
AND a.source_id = #{param.sourceId}
|
||||
</if>
|
||||
<if test="param.path != null">
|
||||
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Notice">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Notice">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?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.gxwebsoft.common.system.mapper.OperationRecordMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,
|
||||
b.nickname,
|
||||
b.username
|
||||
FROM sys_operation_record a
|
||||
LEFT JOIN sys_user b ON a.user_id = b.user_id
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.module != null">
|
||||
AND a.module LIKE CONCAT('%', #{param.module}, '%')
|
||||
</if>
|
||||
<if test="param.description != null">
|
||||
AND a.description LIKE CONCAT('%', #{param.description}, '%')
|
||||
</if>
|
||||
<if test="param.url != null">
|
||||
AND a.url LIKE CONCAT('%', #{param.url}, '%')
|
||||
</if>
|
||||
<if test="param.requestMethod != null">
|
||||
AND a.request_method = #{param.requestMethod}
|
||||
</if>
|
||||
<if test="param.method != null">
|
||||
AND a.method LIKE CONCAT('%', #{param.method}, '%')
|
||||
</if>
|
||||
<if test="param.description != null">
|
||||
AND a.description LIKE CONCAT('%', #{param.description}, '%')
|
||||
</if>
|
||||
<if test="param.ip != null">
|
||||
AND a.ip LIKE CONCAT('%', #{param.ip}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.`status` = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.username != null">
|
||||
AND b.username LIKE CONCAT('%', #{param.username}, '%')
|
||||
</if>
|
||||
<if test="param.nickname != null">
|
||||
AND b.nickname LIKE CONCAT('%', #{param.nickname}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.OperationRecord">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.OperationRecord">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?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.gxwebsoft.common.system.mapper.OrderInfoMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_order_info a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.oid != null">
|
||||
AND a.oid = #{param.oid}
|
||||
</if>
|
||||
<if test="param.sid != null">
|
||||
AND a.sid = #{param.sid}
|
||||
</if>
|
||||
<if test="param.fid != null">
|
||||
AND a.fid = #{param.fid}
|
||||
</if>
|
||||
<if test="param.siteName != null">
|
||||
AND a.site_name LIKE CONCAT('%', #{param.siteName}, '%')
|
||||
</if>
|
||||
<if test="param.fieldName != null">
|
||||
AND a.field_name LIKE CONCAT('%', #{param.fieldName}, '%')
|
||||
</if>
|
||||
<if test="param.dateTime != null">
|
||||
AND a.date_time LIKE CONCAT('%', #{param.dateTime}, '%')
|
||||
</if>
|
||||
<if test="param.price != null">
|
||||
AND a.price = #{param.price}
|
||||
</if>
|
||||
<if test="param.childrenPrice != null">
|
||||
AND a.children_price = #{param.childrenPrice}
|
||||
</if>
|
||||
<if test="param.adultNum != null">
|
||||
AND a.adult_num = #{param.adultNum}
|
||||
</if>
|
||||
<if test="param.childrenNum != null">
|
||||
AND a.children_num = #{param.childrenNum}
|
||||
</if>
|
||||
<if test="param.payStatus != null">
|
||||
AND a.pay_status = #{param.payStatus}
|
||||
</if>
|
||||
<if test="param.isFree != null">
|
||||
AND a.is_free = #{param.isFree}
|
||||
</if>
|
||||
<if test="param.isChildren != null">
|
||||
AND a.is_children = #{param.isChildren}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.mergeData != null">
|
||||
AND a.merge_data LIKE CONCAT('%', #{param.mergeData}, '%')
|
||||
</if>
|
||||
<if test="param.startTime != null">
|
||||
AND a.start_time = #{param.startTime}
|
||||
</if>
|
||||
<if test="param.orderTime != null">
|
||||
AND a.order_time = #{param.orderTime}
|
||||
</if>
|
||||
<if test="param.timeFlag != null">
|
||||
AND a.time_flag LIKE CONCAT('%', #{param.timeFlag}, '%')
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.OrderInfo">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.OrderInfo">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,135 @@
|
||||
<?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.gxwebsoft.common.system.mapper.OrderMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_order a
|
||||
<where>
|
||||
<if test="param.orderId != null">
|
||||
AND a.order_id = #{param.orderId}
|
||||
</if>
|
||||
<if test="param.orderNo != null">
|
||||
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.money != null">
|
||||
AND a.money = #{param.money}
|
||||
</if>
|
||||
<if test="param.payPrice != null">
|
||||
AND a.pay_price = #{param.payPrice}
|
||||
</if>
|
||||
<if test="param.planId != null">
|
||||
AND a.plan_id = #{param.planId}
|
||||
</if>
|
||||
<if test="param.priceId != null">
|
||||
AND a.price_id = #{param.priceId}
|
||||
</if>
|
||||
<if test="param.gradeId != null">
|
||||
AND a.grade_id = #{param.gradeId}
|
||||
</if>
|
||||
<if test="param.priceName != null">
|
||||
AND a.price_name LIKE CONCAT('%', #{param.priceName}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.memberId != null">
|
||||
AND a.member_id = #{param.memberId}
|
||||
</if>
|
||||
<if test="param.realName != null">
|
||||
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||
</if>
|
||||
<if test="param.payTime != null">
|
||||
AND a.pay_time LIKE CONCAT('%', #{param.payTime}, '%')
|
||||
</if>
|
||||
<if test="param.transactionId != null">
|
||||
AND a.transaction_id LIKE CONCAT('%', #{param.transactionId}, '%')
|
||||
</if>
|
||||
<if test="param.payStatus != null">
|
||||
AND a.pay_status = #{param.payStatus}
|
||||
</if>
|
||||
<if test="param.payMethod != null">
|
||||
AND a.pay_method LIKE CONCAT('%', #{param.payMethod}, '%')
|
||||
</if>
|
||||
<if test="param.expirationTime != null">
|
||||
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
|
||||
</if>
|
||||
<if test="param.province != null">
|
||||
AND a.province LIKE CONCAT('%', #{param.province}, '%')
|
||||
</if>
|
||||
<if test="param.city != null">
|
||||
AND a.city LIKE CONCAT('%', #{param.city}, '%')
|
||||
</if>
|
||||
<if test="param.region != null">
|
||||
AND a.region LIKE CONCAT('%', #{param.region}, '%')
|
||||
</if>
|
||||
<if test="param.area != null">
|
||||
AND a.area LIKE CONCAT('%', #{param.area}, '%')
|
||||
</if>
|
||||
<if test="param.address != null">
|
||||
AND a.address LIKE CONCAT('%', #{param.address}, '%')
|
||||
</if>
|
||||
<if test="param.refundImage != null">
|
||||
AND a.refund_image LIKE CONCAT('%', #{param.refundImage}, '%')
|
||||
</if>
|
||||
<if test="param.refundContent != null">
|
||||
AND a.refund_content LIKE CONCAT('%', #{param.refundContent}, '%')
|
||||
</if>
|
||||
<if test="param.isSettled != null">
|
||||
AND a.is_settled = #{param.isSettled}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.merchantId != null">
|
||||
AND a.merchant_id = #{param.merchantId}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Order">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Order">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 按OutTradeNo查询 -->
|
||||
<select id="getByOutTradeNo" resultType="com.gxwebsoft.common.system.entity.Order">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 更新订单状态 -->
|
||||
<select id="updateByOutTradeNo" resultType="com.gxwebsoft.common.system.entity.Order">
|
||||
UPDATE sys_order SET pay_status = #{param.payStatus},pay_time = #{param.payTime},pay_price = #{param.payPrice},transaction_id = #{param.transactionId} WHERE order_no = #{param.orderNo}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?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.gxwebsoft.common.system.mapper.OrganizationMapper">
|
||||
|
||||
<!-- 机构类型字典查询sql -->
|
||||
<sql id="selectOrgTypeDictSql">
|
||||
SELECT ta.*
|
||||
FROM sys_dictionary_data ta
|
||||
LEFT JOIN sys_dictionary tb
|
||||
ON ta.dict_id = tb.dict_id
|
||||
AND tb.deleted = 0
|
||||
WHERE ta.deleted = 0
|
||||
AND tb.dict_code = 'organization_type'
|
||||
</sql>
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,
|
||||
b.dict_data_name organization_type_name,
|
||||
c.nickname leader_nickname,
|
||||
c.username leader_username
|
||||
FROM sys_organization a
|
||||
LEFT JOIN (
|
||||
<include refid="selectOrgTypeDictSql"/>
|
||||
) b ON a.organization_type = b.dict_data_code
|
||||
LEFT JOIN sys_user c ON a.leader_id = c.user_id
|
||||
<where>
|
||||
AND a.deleted = 0
|
||||
<if test="param.organizationId != null">
|
||||
AND a.organization_id = #{param.organizationId}
|
||||
</if>
|
||||
<if test="param.parentId != null">
|
||||
AND a.parent_id = #{param.parentId}
|
||||
</if>
|
||||
<if test="param.organizationName != null">
|
||||
AND a.organization_name LIKE CONCAT('%', #{param.organizationName}, '%')
|
||||
</if>
|
||||
<if test="param.organizationFullName != null">
|
||||
AND a.organization_full_name LIKE CONCAT('%', #{param.organizationFullName}, '%')
|
||||
</if>
|
||||
<if test="param.organizationCode != null">
|
||||
AND a.organization_code LIKE CONCAT('%', #{param.organizationCode}, '%')
|
||||
</if>
|
||||
<if test="param.organizationType != null">
|
||||
AND a.organization_type = #{param.organizationType}
|
||||
</if>
|
||||
<if test="param.leaderId != null">
|
||||
AND a.leader_id = #{param.leaderId}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.organizationTypeName != null">
|
||||
AND b.dict_data_name LIKE CONCAT('%', #{param.organizationTypeName}, '%')
|
||||
</if>
|
||||
<if test="param.leaderNickname != null">
|
||||
AND c.nickname LIKE CONCAT('%', #{param.leaderNickname}, '%')
|
||||
</if>
|
||||
<if test="param.leaderUsername != null">
|
||||
AND c.username LIKE CONCAT('%', #{param.leaderUsername}, '%')
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
a.organization_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Organization">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Organization">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?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.gxwebsoft.common.system.mapper.PaymentMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_payment a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.code != null">
|
||||
AND a.code = #{param.code}
|
||||
</if>
|
||||
<if test="param.wechatType != null">
|
||||
AND a.wechat_type = #{param.wechatType}
|
||||
</if>
|
||||
<if test="param.appId != null">
|
||||
AND a.app_id LIKE CONCAT('%', #{param.appId}, '%')
|
||||
</if>
|
||||
<if test="param.mchId != null">
|
||||
AND a.mch_id LIKE CONCAT('%', #{param.mchId}, '%')
|
||||
</if>
|
||||
<if test="param.apiKey != null">
|
||||
AND a.api_key LIKE CONCAT('%', #{param.apiKey}, '%')
|
||||
</if>
|
||||
<if test="param.apiclientCert != null">
|
||||
AND a.apiclient_cert LIKE CONCAT('%', #{param.apiclientCert}, '%')
|
||||
</if>
|
||||
<if test="param.apiclientKey != null">
|
||||
AND a.apiclient_key LIKE CONCAT('%', #{param.apiclientKey}, '%')
|
||||
</if>
|
||||
<if test="param.merchantSerialNumber != null">
|
||||
AND a.merchant_serial_number LIKE CONCAT('%', #{param.merchantSerialNumber}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Payment">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Payment">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?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.gxwebsoft.common.system.mapper.PlugMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_plug a
|
||||
<where>
|
||||
<if test="param.plugId != null">
|
||||
AND a.plug_id = #{param.plugId}
|
||||
</if>
|
||||
<if test="param.plugName != null">
|
||||
AND a.plug_name LIKE CONCAT('%', #{param.plugName}, '%')
|
||||
</if>
|
||||
<if test="param.plugCode != null">
|
||||
AND a.plug_code LIKE CONCAT('%', #{param.plugCode}, '%')
|
||||
</if>
|
||||
<if test="param.plugType != null">
|
||||
AND a.plug_type = #{param.plugType}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.price != null">
|
||||
AND a.price = #{param.price}
|
||||
</if>
|
||||
<if test="param.score != null">
|
||||
AND a.score = #{param.score}
|
||||
</if>
|
||||
<if test="param.clicks != null">
|
||||
AND a.clicks = #{param.clicks}
|
||||
</if>
|
||||
<if test="param.installs != null">
|
||||
AND a.installs = #{param.installs}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Plug">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Plug">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,106 @@
|
||||
<?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.gxwebsoft.common.system.mapper.RechargeOrderMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.phone,b.nickname,b.user_id,b.avatar,b.real_name,c.organization_id,c.organization_name
|
||||
FROM sys_recharge_order a
|
||||
LEFT JOIN sys_user b ON a.user_id = b.user_id
|
||||
LEFT JOIN sys_organization c ON a.organization_id = c.organization_id
|
||||
<where>
|
||||
<if test="param.orderId != null">
|
||||
AND a.order_id = #{param.orderId}
|
||||
</if>
|
||||
<if test="param.orderNo != null">
|
||||
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.rechargeType != null">
|
||||
AND a.recharge_type = #{param.rechargeType}
|
||||
</if>
|
||||
<if test="param.organizationId != null">
|
||||
AND a.organization_id = #{param.organizationId}
|
||||
</if>
|
||||
<if test="param.planId != null">
|
||||
AND a.plan_id = #{param.planId}
|
||||
</if>
|
||||
<if test="param.payPrice != null">
|
||||
AND a.pay_price = #{param.payPrice}
|
||||
</if>
|
||||
<if test="param.giftMoney != null">
|
||||
AND a.gift_money = #{param.giftMoney}
|
||||
</if>
|
||||
<if test="param.actualMoney != null">
|
||||
AND a.actual_money = #{param.actualMoney}
|
||||
</if>
|
||||
<if test="param.balance != null">
|
||||
AND a.balance = #{param.balance}
|
||||
</if>
|
||||
<if test="param.payMethod != null">
|
||||
AND a.pay_method LIKE CONCAT('%', #{param.payMethod}, '%')
|
||||
</if>
|
||||
<if test="param.payStatus != null">
|
||||
AND a.pay_status = #{param.payStatus}
|
||||
</if>
|
||||
<if test="param.payTime != null">
|
||||
AND a.pay_time = #{param.payTime}
|
||||
</if>
|
||||
<if test="param.tradeId != null">
|
||||
AND a.trade_id = #{param.tradeId}
|
||||
</if>
|
||||
<if test="param.platform != null">
|
||||
AND a.platform LIKE CONCAT('%', #{param.platform}, '%')
|
||||
</if>
|
||||
<if test="param.shopId != null">
|
||||
AND a.shop_id = #{param.shopId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.merchantCode != null">
|
||||
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
b.nickname LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.user_id LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR b.alias LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR b.phone LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR b.real_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.RechargeOrder">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.RechargeOrder">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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.gxwebsoft.common.system.mapper.RoleMapper">
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_role a
|
||||
<where>
|
||||
<if test="param.roleCode != null">
|
||||
AND a.role_code = #{param.roleCode}
|
||||
</if>
|
||||
<if test="param.tenantId != null">
|
||||
AND a.tenant_id = #{param.tenantId}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListAll" resultType="com.gxwebsoft.common.system.entity.Role">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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.gxwebsoft.common.system.mapper.RoleMenuMapper">
|
||||
|
||||
<!-- 查询用户的菜单 -->
|
||||
<select id="listMenuByUserId" resultType="com.gxwebsoft.common.system.entity.Menu">
|
||||
SELECT a.*
|
||||
FROM sys_menu a
|
||||
<where>
|
||||
AND a.menu_id IN (
|
||||
SELECT menu_id FROM sys_role_menu WHERE role_id IN (
|
||||
SELECT ta.role_id FROM sys_user_role ta LEFT JOIN sys_role tb ON ta.role_id = tb.role_id
|
||||
WHERE ta.user_id = #{userId} AND tb.deleted = 0
|
||||
)
|
||||
)
|
||||
<if test="menuType != null">
|
||||
AND a.menu_type = #{menuType}
|
||||
</if>
|
||||
AND a.deleted = 0
|
||||
</where>
|
||||
ORDER BY a.sort_number
|
||||
</select>
|
||||
|
||||
<!-- 根据角色id查询菜单 -->
|
||||
<select id="listMenuByRoleIds" resultType="com.gxwebsoft.common.system.entity.Menu">
|
||||
SELECT a.*
|
||||
FROM sys_menu a
|
||||
<where>
|
||||
AND a.menu_id IN (SELECT menu_id FROM sys_role_menu WHERE role_id IN
|
||||
<foreach collection="roleIds" item="roleId" separator="," open="(" close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
)
|
||||
<if test="menuType != null">
|
||||
AND a.menu_type = #{menuType}
|
||||
</if>
|
||||
AND a.deleted = 0
|
||||
</where>
|
||||
ORDER BY a.sort_number
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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.gxwebsoft.common.system.mapper.SettingMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_setting a
|
||||
<where>
|
||||
<if test="param.settingKey != null">
|
||||
AND a.setting_key = #{param.settingKey}
|
||||
</if>
|
||||
<if test="param.settingId != null">
|
||||
AND a.setting_id = #{param.settingId}
|
||||
</if>
|
||||
<if test="param.tenantId != null">
|
||||
AND a.tenant_id = #{param.tenantId}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="getBySettingKeyIgnore" resultType="com.gxwebsoft.common.system.entity.Setting">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?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.gxwebsoft.common.system.mapper.TenantMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.company_name,b.company_logo as logo
|
||||
FROM sys_tenant a
|
||||
LEFT JOIN sys_company b ON a.tenant_id = b.tenant_id
|
||||
<where>
|
||||
<if test="param.tenantId != null">
|
||||
AND a.tenant_id = #{param.tenantId}
|
||||
</if>
|
||||
<if test="param.tenantName != null">
|
||||
AND a.tenant_name LIKE CONCAT('%', #{param.tenantName}, '%')
|
||||
</if>
|
||||
<if test="param.tenantCode != null">
|
||||
AND a.tenant_code LIKE CONCAT('%', #{param.tenantCode}, '%')
|
||||
</if>
|
||||
<if test="param.logo != null">
|
||||
AND a.logo LIKE CONCAT('%', #{param.logo}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
a.tenant_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.tenant_id = #{param.keywords}
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Tenant">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Tenant">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 销毁租户-->
|
||||
<delete id="destructionAll">
|
||||
DELETE FROM sys_tenant WHERE tenant_id = #{param.tenantId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?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.gxwebsoft.common.system.mapper.UserBalanceLogMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,
|
||||
b.nickname,b.avatar,b.phone
|
||||
FROM sys_user_balance_log a
|
||||
LEFT JOIN sys_user b ON a.user_id = b.user_id
|
||||
<where>
|
||||
<if test="param.logId != null">
|
||||
AND a.log_id = #{param.logId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.scene != null">
|
||||
AND a.scene = #{param.scene}
|
||||
</if>
|
||||
<if test="param.sceneMultiple != null">
|
||||
AND a.scene IN
|
||||
<foreach collection="param.sceneMultiple.split(',')" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.money != null">
|
||||
AND a.money = #{param.money}
|
||||
</if>
|
||||
<if test="param.balance != null">
|
||||
AND a.balance = #{param.balance}
|
||||
</if>
|
||||
<if test="param.describe != null">
|
||||
AND a.describe LIKE CONCAT('%', #{param.describe}, '%')
|
||||
</if>
|
||||
<if test="param.remark != null">
|
||||
AND a.remark LIKE CONCAT('%', #{param.remark}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.merchantCode != null">
|
||||
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
a.user_id = #{param.keywords}
|
||||
OR b.nickname LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR b.alias LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR b.phone = #{param.keywords}
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.UserBalanceLog">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.UserBalanceLog">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?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.gxwebsoft.common.system.mapper.UserCollectionMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_user_collection a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.tid != null">
|
||||
AND a.tid = #{param.tid}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.UserCollection">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.UserCollection">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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.gxwebsoft.common.system.mapper.UserFileMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?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.gxwebsoft.common.system.mapper.UserGradeMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_user_grade a
|
||||
<where>
|
||||
<if test="param.gradeId != null">
|
||||
AND a.grade_id = #{param.gradeId}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.weight != null">
|
||||
AND a.weight = #{param.weight}
|
||||
</if>
|
||||
<if test="param.upgrade != null">
|
||||
AND a.upgrade LIKE CONCAT('%', #{param.upgrade}, '%')
|
||||
</if>
|
||||
<if test="param.equity != null">
|
||||
AND a.equity LIKE CONCAT('%', #{param.equity}, '%')
|
||||
</if>
|
||||
<if test="param.commission != null">
|
||||
AND a.commission LIKE CONCAT('%', #{param.commission}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.UserGrade">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.UserGrade">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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.gxwebsoft.common.system.mapper.UserGroupMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_user_group a
|
||||
<where>
|
||||
<if test="param.groupId != null">
|
||||
AND a.group_id = #{param.groupId}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.UserGroup">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.UserGroup">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,240 @@
|
||||
<?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.gxwebsoft.common.system.mapper.UserMapper">
|
||||
|
||||
<!-- 性别字典查询sql -->
|
||||
<sql id="selectSexDictSql">
|
||||
SELECT ta.*
|
||||
FROM sys_dictionary_data ta
|
||||
LEFT JOIN sys_dictionary tb
|
||||
ON ta.dict_id = tb.dict_id
|
||||
AND tb.deleted = 0
|
||||
WHERE ta.deleted = 0
|
||||
AND tb.dict_code = 'sex'
|
||||
</sql>
|
||||
|
||||
<!-- 用户角色查询sql -->
|
||||
<sql id="selectUserRoleSql">
|
||||
SELECT a.user_id,
|
||||
GROUP_CONCAT(b.role_name) role_name
|
||||
FROM sys_user_role a
|
||||
LEFT JOIN sys_role b ON a.role_id = b.role_id
|
||||
GROUP BY a.user_id
|
||||
</sql>
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,
|
||||
b.organization_name,
|
||||
c.dict_data_name sex_name,
|
||||
e.name as groupName,
|
||||
f.name as gradeName
|
||||
FROM sys_user a
|
||||
LEFT JOIN sys_organization b ON a.organization_id = b.organization_id
|
||||
LEFT JOIN (
|
||||
<include refid="selectSexDictSql"/>
|
||||
) c ON a.sex = c.dict_data_code
|
||||
LEFT JOIN(
|
||||
<include refid="selectUserRoleSql"/>
|
||||
) d ON a.user_id = d.user_id
|
||||
LEFT JOIN sys_user_group e ON a.group_id = e.group_id
|
||||
LEFT JOIN sys_user_grade f ON a.grade_id = f.grade_id
|
||||
<where>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.username != null">
|
||||
AND a.username LIKE CONCAT('%', #{param.username}, '%')
|
||||
</if>
|
||||
<if test="param.nickname != null">
|
||||
AND a.nickname LIKE CONCAT('%', #{param.nickname}, '%')
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.sex != null">
|
||||
AND a.sex = #{param.sex}
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||
</if>
|
||||
<if test="param.email != null">
|
||||
AND a.email LIKE CONCAT('%', #{param.email}, '%')
|
||||
</if>
|
||||
<if test="param.emailVerified != null">
|
||||
AND a.email_verified = #{param.emailVerified}
|
||||
</if>
|
||||
<if test="param.realName != null">
|
||||
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
||||
</if>
|
||||
<if test="param.companyName != null">
|
||||
AND a.company_name LIKE CONCAT('%', #{param.companyName}, '%')
|
||||
</if>
|
||||
<if test="param.idCard != null">
|
||||
AND a.id_card LIKE CONCAT('%', #{param.idCard}, '%')
|
||||
</if>
|
||||
<if test="param.birthday != null">
|
||||
AND a.birthday LIKE CONCAT('%', #{param.birthday}, '%')
|
||||
</if>
|
||||
<if test="param.organizationId != null">
|
||||
AND a.organization_id = #{param.organizationId}
|
||||
</if>
|
||||
<if test="param.groupId != null">
|
||||
AND a.group_id = #{param.groupId}
|
||||
</if>
|
||||
<if test="param.isStaff != null">
|
||||
AND a.organization_id > 0
|
||||
</if>
|
||||
<if test="param.merchantId != null">
|
||||
AND a.merchant_id = #{param.merchantId}
|
||||
</if>
|
||||
<if test="param.platform != null">
|
||||
AND a.platform = #{param.platform}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.`status` = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.gradeId != null">
|
||||
AND a.grade_id = #{param.gradeId}
|
||||
</if>
|
||||
<if test="param.isAdmin != null">
|
||||
AND a.is_admin = #{param.isAdmin}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.roleId != null">
|
||||
AND a.user_id IN (SELECT user_id FROM sys_user_role WHERE role_id=#{param.roleId})
|
||||
</if>
|
||||
<if test="param.roleCode != null">
|
||||
AND a.user_id IN (SELECT user_id FROM sys_user_role WHERE role_code=#{param.roleCode})
|
||||
</if>
|
||||
<if test="param.userIds != null">
|
||||
AND a.user_id IN
|
||||
<foreach collection="param.userIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.phones != null">
|
||||
AND a.phone IN
|
||||
<foreach collection="param.phones" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.province != null">
|
||||
AND a.province LIKE CONCAT('%', #{param.province}, '%')
|
||||
</if>
|
||||
<if test="param.city != null">
|
||||
AND a.city LIKE CONCAT('%', #{param.city}, '%')
|
||||
</if>
|
||||
<if test="param.region != null">
|
||||
AND a.region LIKE CONCAT('%', #{param.region}, '%')
|
||||
</if>
|
||||
<if test="param.organizationName != null">
|
||||
AND b.organization_name LIKE CONCAT('%', #{param.organizationName}, '%')
|
||||
</if>
|
||||
<if test="param.sexName != null">
|
||||
AND c.dict_data_name = #{param.sexName}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
a.username = #{param.keywords}
|
||||
OR a.user_id = #{param.keywords}
|
||||
OR a.merchant_id = #{param.keywords}
|
||||
OR a.nickname LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.real_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.phone LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.email = #{param.keywords}
|
||||
)
|
||||
</if>
|
||||
<if test="param.parentId != null">
|
||||
AND a.organization_id IN (SELECT organization_id FROM sys_organization WHERE parent_id=#{param.parentId})
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.User">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.User">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 根据账号查询 -->
|
||||
<select id="selectByUsername" resultType="com.gxwebsoft.common.system.entity.User">
|
||||
SELECT a.* ,
|
||||
b.organization_name,
|
||||
c.dict_data_name sex_name
|
||||
FROM sys_user a
|
||||
LEFT JOIN sys_organization b ON a.organization_id = b.organization_id
|
||||
LEFT JOIN (
|
||||
<include refid="selectSexDictSql"/>
|
||||
) c ON a.sex = c.dict_data_code
|
||||
<where>
|
||||
AND a.deleted = 0
|
||||
AND (a.username = #{username} OR a.phone = #{username} OR a.email = #{username})
|
||||
AND a.tenant_id = #{tenantId}
|
||||
<!-- <if test="tenantId != null">-->
|
||||
<!-- AND a.tenant_id = #{tenantId}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="tenantId == null">-->
|
||||
<!-- AND a.tenant_id = 1-->
|
||||
<!-- </if>-->
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 根据手机号码查询 -->
|
||||
<select id="selectByPhone" resultType="com.gxwebsoft.common.system.entity.User">
|
||||
SELECT a.*
|
||||
FROM sys_user a
|
||||
<where>
|
||||
AND a.deleted = 0
|
||||
AND a.phone = #{phone}
|
||||
<if test="tenantId != null">
|
||||
AND a.tenant_id = #{tenantId}
|
||||
</if>
|
||||
<if test="tenantId == null">
|
||||
AND a.tenant_id = 1
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 查询单条数据 -->
|
||||
<select id="getOne" resultType="com.gxwebsoft.common.system.entity.User">
|
||||
SELECT * FROM sys_user WHERE user_id = #{param.userId} and deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询统计数据 -->
|
||||
<select id="selectListStatisticsRel" resultType="com.gxwebsoft.common.system.entity.User">
|
||||
SELECT a.*,b.organization_name
|
||||
FROM sys_user a
|
||||
LEFT JOIN sys_organization b ON a.organization_id = b.organization_id
|
||||
<where>
|
||||
AND a.deleted = 0
|
||||
<if test="param.organizationId != null">
|
||||
AND b.organization_id = #{param.organizationId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 更新用户信息 -->
|
||||
<update id="updateByUserId">
|
||||
UPDATE sys_user SET grade_id = #{param.gradeId} WHERE user_id = #{param.userId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?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.gxwebsoft.common.system.mapper.UserOauthMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_user_oauth a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.oauthType != null">
|
||||
AND a.oauth_type LIKE CONCAT('%', #{param.oauthType}, '%')
|
||||
</if>
|
||||
<if test="param.oauthId != null">
|
||||
AND a.oauth_id LIKE CONCAT('%', #{param.oauthId}, '%')
|
||||
</if>
|
||||
<if test="param.unionid != null">
|
||||
AND a.unionid LIKE CONCAT('%', #{param.unionid}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.UserOauth">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.UserOauth">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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.gxwebsoft.common.system.mapper.UserRefereeMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_user_referee a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.dealerId != null">
|
||||
AND a.dealer_id = #{param.dealerId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.level != null">
|
||||
AND a.level = #{param.level}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.UserReferee">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.UserReferee">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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.gxwebsoft.common.system.mapper.UserRoleMapper">
|
||||
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO sys_user_role(user_id, role_id) VALUES
|
||||
<foreach collection="roleIds" item="roleId" separator=",">
|
||||
(#{userId}, #{roleId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="selectByUserId" resultType="com.gxwebsoft.common.system.entity.Role">
|
||||
SELECT *
|
||||
FROM sys_role
|
||||
WHERE role_id IN (
|
||||
SELECT role_id
|
||||
FROM sys_user_role
|
||||
WHERE user_id = #{userId}
|
||||
)
|
||||
AND deleted = 0
|
||||
ORDER BY role_id desc
|
||||
</select>
|
||||
|
||||
<select id="selectByUserIds" resultType="com.gxwebsoft.common.system.entity.Role">
|
||||
SELECT a.user_id, b.*
|
||||
FROM sys_user_role a
|
||||
LEFT JOIN sys_role b ON a.role_id = b.role_id
|
||||
WHERE a.user_id IN
|
||||
<foreach collection="userIds" open="(" close=")" separator="," item="userId">
|
||||
#{userId}
|
||||
</foreach>
|
||||
AND b.deleted = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?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.gxwebsoft.common.system.mapper.VersionMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_version a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.versionName != null">
|
||||
AND a.version_name LIKE CONCAT('%', #{param.versionName}, '%')
|
||||
</if>
|
||||
<if test="param.versionCode != null">
|
||||
AND a.version_code = #{param.versionCode}
|
||||
</if>
|
||||
<if test="param.androidDownloadUrl != null">
|
||||
AND a.android_download_url LIKE CONCAT('%', #{param.androidDownloadUrl}, '%')
|
||||
</if>
|
||||
<if test="param.iosDownloadUrl != null">
|
||||
AND a.ios_download_url LIKE CONCAT('%', #{param.iosDownloadUrl}, '%')
|
||||
</if>
|
||||
<if test="param.updateInfo != null">
|
||||
AND a.update_info LIKE CONCAT('%', #{param.updateInfo}, '%')
|
||||
</if>
|
||||
<if test="param.isHard != null">
|
||||
AND a.is_hard = #{param.isHard}
|
||||
</if>
|
||||
<if test="param.isHot != null">
|
||||
AND a.is_hot = #{param.isHot}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Version">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Version">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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.gxwebsoft.common.system.mapper.WhiteDomainMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_white_domain a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.domain != null">
|
||||
AND a.domain LIKE CONCAT('%', #{param.domain}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.WhiteDomain">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.WhiteDomain">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user