拆分think模块包

This commit is contained in:
2024-08-13 17:51:18 +08:00
parent 9dc17cd63e
commit 09a752e12a
1547 changed files with 88305 additions and 10329 deletions
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.AccessKey;
import com.gxwebsoft.common.system.param.AccessKeyParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 访问凭证管理Mapper
*
* @author 科技小王子
* @since 2023-05-16 19:19:55
*/
public interface AccessKeyMapper extends BaseMapper<AccessKey> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<AccessKey>
*/
List<AccessKey> selectPageRel(@Param("page") IPage<AccessKey> page,
@Param("param") AccessKeyParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<AccessKey> selectListRel(@Param("param") AccessKeyParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.App;
import com.gxwebsoft.common.system.param.AppParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 应用管理记录表Mapper
*
* @author 科技小王子
* @since 2023-10-30 22:20:23
*/
public interface AppMapper extends BaseMapper<App> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<App>
*/
List<App> selectPageRel(@Param("page") IPage<App> page,
@Param("param") AppParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<App> selectListRel(@Param("param") AppParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.AppRenew;
import com.gxwebsoft.common.system.param.AppRenewParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 续费管理Mapper
*
* @author 科技小王子
* @since 2023-11-14 14:14:07
*/
public interface AppRenewMapper extends BaseMapper<AppRenew> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<AppRenew>
*/
List<AppRenew> selectPageRel(@Param("page") IPage<AppRenew> page,
@Param("param") AppRenewParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<AppRenew> selectListRel(@Param("param") AppRenewParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.AppUrl;
import com.gxwebsoft.common.system.param.AppUrlParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 域名管理记录表Mapper
*
* @author 科技小王子
* @since 2023-10-30 22:20:23
*/
public interface AppUrlMapper extends BaseMapper<AppUrl> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<AppUrl>
*/
List<AppUrl> selectPageRel(@Param("page") IPage<AppUrl> page,
@Param("param") AppUrlParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<AppUrl> selectListRel(@Param("param") AppUrlParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.AppUser;
import com.gxwebsoft.common.system.param.AppUserParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 应用成员Mapper
*
* @author 科技小王子
* @since 2023-10-30 22:20:23
*/
public interface AppUserMapper extends BaseMapper<AppUser> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<AppUser>
*/
List<AppUser> selectPageRel(@Param("page") IPage<AppUser> page,
@Param("param") AppUserParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<AppUser> selectListRel(@Param("param") AppUserParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.ChatConversation;
import com.gxwebsoft.common.system.param.ChatConversationParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 聊天消息表Mapper
*
* @author 科技小王子
* @since 2024-04-27 15:57:27
*/
public interface ChatConversationMapper extends BaseMapper<ChatConversation> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<ChatConversation>
*/
List<ChatConversation> selectPageRel(@Param("page") IPage<ChatConversation> page,
@Param("param") ChatConversationParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<ChatConversation> selectListRel(@Param("param") ChatConversationParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.ChatMessage;
import com.gxwebsoft.common.system.param.ChatMessageParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 聊天消息表Mapper
*
* @author 科技小王子
* @since 2024-04-27 15:57:27
*/
public interface ChatMessageMapper extends BaseMapper<ChatMessage> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<ChatMessage>
*/
List<ChatMessage> selectPageRel(@Param("page") IPage<ChatMessage> page,
@Param("param") ChatMessageParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<ChatMessage> selectListRel(@Param("param") ChatMessageParam param);
}
@@ -0,0 +1,61 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.core.web.ExistenceParam;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.system.entity.Company;
import com.gxwebsoft.common.system.entity.User;
import com.gxwebsoft.common.system.param.CompanyParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 企业信息Mapper
*
* @author 科技小王子
* @since 2023-05-27 14:57:34
*/
public interface CompanyMapper extends BaseMapper<Company> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Company>
*/
List<Company> selectPageRel(@Param("page") IPage<Company> page,
@Param("param") CompanyParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<Company> selectListRel(@Param("param") CompanyParam param);
@InterceptorIgnore(tenantLine = "true")
List<Company> getCount(@Param("param") CompanyParam param);
@InterceptorIgnore(tenantLine = "true")
List<Company> selectPageRelAll(PageParam<Company, CompanyParam> page, CompanyParam param);
@InterceptorIgnore(tenantLine = "true")
Company getCompanyAll(@Param("companyId") Integer companyId);
@InterceptorIgnore(tenantLine = "true")
void updateByCompanyId(@Param("param") Company company);
@InterceptorIgnore(tenantLine = "true")
boolean removeCompanyAll(Integer id);
@InterceptorIgnore(tenantLine = "true")
boolean undeleteAll(Integer id);
@InterceptorIgnore(tenantLine = "true")
boolean updateByIdAll(Company company);
}
@@ -0,0 +1,47 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.DictData;
import com.gxwebsoft.common.system.param.DictDataParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 字典数据Mapper
*
* @author WebSoft
* @since 2020-03-14 11:29:04
*/
public interface DictDataMapper extends BaseMapper<DictData> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<DictData>
*/
List<DictData> selectPageRel(@Param("page") IPage<DictData> page,
@Param("param") DictDataParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<DictData>
*/
List<DictData> selectListRel(@Param("param") DictDataParam param);
/**
* 根据dictCode和dictDataName查询
*
* @param dictCode 字典标识
* @param dictDataName 字典项名称
* @return List<DictData>
*/
List<DictData> getByDictCodeAndName(@Param("dictCode") String dictCode,
@Param("dictDataName") String dictDataName);
}
@@ -0,0 +1,14 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.common.system.entity.Dict;
/**
* 字典Mapper
*
* @author WebSoft
* @since 2020-03-14 11:29:03
*/
public interface DictMapper extends BaseMapper<Dict> {
}
@@ -0,0 +1,47 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.DictionaryData;
import com.gxwebsoft.common.system.param.DictionaryDataParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 字典数据Mapper
*
* @author WebSoft
* @since 2020-03-14 11:29:04
*/
public interface DictionaryDataMapper extends BaseMapper<DictionaryData> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<DictionaryData>
*/
List<DictionaryData> selectPageRel(@Param("page") IPage<DictionaryData> page,
@Param("param") DictionaryDataParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<DictionaryData>
*/
List<DictionaryData> selectListRel(@Param("param") DictionaryDataParam param);
/**
* 根据dictCode和dictDataName查询
*
* @param dictCode 字典标识
* @param dictDataName 字典项名称
* @return List<DictionaryData>
*/
List<DictionaryData> getByDictCodeAndName(@Param("dictCode") String dictCode,
@Param("dictDataName") String dictDataName);
}
@@ -0,0 +1,14 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.common.system.entity.Dictionary;
/**
* 字典Mapper
*
* @author WebSoft
* @since 2020-03-14 11:29:03
*/
public interface DictionaryMapper extends BaseMapper<Dictionary> {
}
@@ -0,0 +1,14 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.common.system.entity.EmailRecord;
/**
* 邮件记录Mapper
*
* @author WebSoft
* @since 2020-03-14 11:29:04
*/
public interface EmailRecordMapper extends BaseMapper<EmailRecord> {
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.Environment;
import com.gxwebsoft.common.system.param.EnvironmentParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 环境管理Mapper
*
* @author 科技小王子
* @since 2023-10-18 08:45:13
*/
public interface EnvironmentMapper extends BaseMapper<Environment> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Environment>
*/
List<Environment> selectPageRel(@Param("page") IPage<Environment> page,
@Param("param") EnvironmentParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<Environment> selectListRel(@Param("param") EnvironmentParam param);
}
@@ -0,0 +1,47 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.FileRecord;
import com.gxwebsoft.common.system.param.FileRecordParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 文件上传记录Mapper
*
* @author WebSoft
* @since 2021-08-30 11:18:04
*/
public interface FileRecordMapper extends BaseMapper<FileRecord> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<FileRecord>
*/
List<FileRecord> selectPageRel(@Param("page") IPage<FileRecord> page,
@Param("param") FileRecordParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<FileRecord>
*/
List<FileRecord> selectListRel(@Param("param") FileRecordParam param);
/**
* 根据path查询
*
* @param path 文件路径
* @return FileRecord
*/
@InterceptorIgnore(tenantLine = "true")
List<FileRecord> getByIdPath(@Param("path") String path);
}
@@ -0,0 +1,48 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.LoginRecord;
import com.gxwebsoft.common.system.param.LoginRecordParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 登录日志Mapper
*
* @author WebSoft
* @since 2018-12-24 16:10:11
*/
public interface LoginRecordMapper extends BaseMapper<LoginRecord> {
/**
* 添加, 排除租户拦截
*
* @param entity LoginRecord
* @return int
*/
@Override
@InterceptorIgnore(tenantLine = "true")
int insert(LoginRecord entity);
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<LoginRecord>
*/
List<LoginRecord> selectPageRel(@Param("page") IPage<LoginRecord> page,
@Param("param") LoginRecordParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<LoginRecord>
*/
List<LoginRecord> selectListRel(@Param("param") LoginRecordParam param);
}
@@ -0,0 +1,22 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.common.system.entity.Menu;
import com.gxwebsoft.common.system.param.MenuParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 菜单Mapper
*
* @author WebSoft
* @since 2018-12-24 16:10:32
*/
public interface MenuMapper extends BaseMapper<Menu> {
@InterceptorIgnore(tenantLine = "true")
List<Menu> getMenuByClone(@Param("param") MenuParam param);
}
@@ -0,0 +1,41 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.MerchantAccount;
import com.gxwebsoft.common.system.param.MerchantAccountParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 商户账号Mapper
*
* @author 科技小王子
* @since 2024-04-19 12:02:24
*/
public interface MerchantAccountMapper extends BaseMapper<MerchantAccount> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<MerchantAccount>
*/
List<MerchantAccount> selectPageRel(@Param("page") IPage<MerchantAccount> page,
@Param("param") MerchantAccountParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<MerchantAccount> selectListRel(@Param("param") MerchantAccountParam param);
@InterceptorIgnore(tenantLine = "true")
MerchantAccount getMerchantAccountByPhone(@Param("param") MerchantAccountParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.MerchantApply;
import com.gxwebsoft.common.system.param.MerchantApplyParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 商户入驻申请Mapper
*
* @author 科技小王子
* @since 2024-04-05 01:24:36
*/
public interface MerchantApplyMapper extends BaseMapper<MerchantApply> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<MerchantApply>
*/
List<MerchantApply> selectPageRel(@Param("page") IPage<MerchantApply> page,
@Param("param") MerchantApplyParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<MerchantApply> selectListRel(@Param("param") MerchantApplyParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.Merchant;
import com.gxwebsoft.common.system.param.MerchantParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 商户Mapper
*
* @author 科技小王子
* @since 2024-04-05 00:03:54
*/
public interface MerchantMapper extends BaseMapper<Merchant> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Merchant>
*/
List<Merchant> selectPageRel(@Param("page") IPage<Merchant> page,
@Param("param") MerchantParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<Merchant> selectListRel(@Param("param") MerchantParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.MerchantType;
import com.gxwebsoft.common.system.param.MerchantTypeParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 商户类型Mapper
*
* @author 科技小王子
* @since 2024-04-05 00:08:51
*/
public interface MerchantTypeMapper extends BaseMapper<MerchantType> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<MerchantType>
*/
List<MerchantType> selectPageRel(@Param("page") IPage<MerchantType> page,
@Param("param") MerchantTypeParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<MerchantType> selectListRel(@Param("param") MerchantTypeParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.Modules;
import com.gxwebsoft.common.system.param.ModulesParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 模块管理Mapper
*
* @author 科技小王子
* @since 2023-10-18 15:53:43
*/
public interface ModulesMapper extends BaseMapper<Modules> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Modules>
*/
List<Modules> selectPageRel(@Param("page") IPage<Modules> page,
@Param("param") ModulesParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<Modules> selectListRel(@Param("param") ModulesParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.Notice;
import com.gxwebsoft.common.system.param.NoticeParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 消息记录表Mapper
*
* @author 科技小王子
* @since 2023-10-08 13:22:21
*/
public interface NoticeMapper extends BaseMapper<Notice> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Notice>
*/
List<Notice> selectPageRel(@Param("page") IPage<Notice> page,
@Param("param") NoticeParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<Notice> selectListRel(@Param("param") NoticeParam param);
}
@@ -0,0 +1,48 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.OperationRecord;
import com.gxwebsoft.common.system.param.OperationRecordParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 操作日志Mapper
*
* @author WebSoft
* @since 2018-12-24 16:10:03
*/
public interface OperationRecordMapper extends BaseMapper<OperationRecord> {
/**
* 添加, 排除租户拦截
*
* @param entity OperationRecord
* @return int
*/
@Override
@InterceptorIgnore(tenantLine = "true")
int insert(OperationRecord entity);
/**
* 分页查询
*
* @param page 分页参数
* @param param 查询参数
* @return List<OperationRecord>
*/
List<OperationRecord> selectPageRel(@Param("page") IPage<OperationRecord> page,
@Param("param") OperationRecordParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<OperationRecord>
*/
List<OperationRecord> selectListRel(@Param("param") OperationRecordParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.OrderInfo;
import com.gxwebsoft.common.system.param.OrderInfoParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* Mapper
*
* @author 科技小王子
* @since 2024-05-10 18:02:54
*/
public interface OrderInfoMapper extends BaseMapper<OrderInfo> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<OrderInfo>
*/
List<OrderInfo> selectPageRel(@Param("page") IPage<OrderInfo> page,
@Param("param") OrderInfoParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<OrderInfo> selectListRel(@Param("param") OrderInfoParam param);
}
@@ -0,0 +1,44 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.Order;
import com.gxwebsoft.common.system.param.OrderParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 订单Mapper
*
* @author 科技小王子
* @since 2024-04-24 13:46:21
*/
public interface OrderMapper extends BaseMapper<Order> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Order>
*/
List<Order> selectPageRel(@Param("page") IPage<Order> page,
@Param("param") OrderParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<Order> selectListRel(@Param("param") OrderParam param);
@InterceptorIgnore(tenantLine = "true")
List<Order> getByOutTradeNo(OrderParam param);
@InterceptorIgnore(tenantLine = "true")
void updateByOutTradeNo(@Param("param") Order outTradeNo);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.Organization;
import com.gxwebsoft.common.system.param.OrganizationParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 组织机构Mapper
*
* @author WebSoft
* @since 2020-03-14 11:29:04
*/
public interface OrganizationMapper extends BaseMapper<Organization> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Organization>
*/
List<Organization> selectPageRel(@Param("page") IPage<Organization> page,
@Param("param") OrganizationParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<Organization>
*/
List<Organization> selectListRel(@Param("param") OrganizationParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.Payment;
import com.gxwebsoft.common.system.param.PaymentParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 支付方式Mapper
*
* @author 科技小王子
* @since 2024-05-11 12:39:11
*/
public interface PaymentMapper extends BaseMapper<Payment> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Payment>
*/
List<Payment> selectPageRel(@Param("page") IPage<Payment> page,
@Param("param") PaymentParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<Payment> selectListRel(@Param("param") PaymentParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.Plug;
import com.gxwebsoft.common.system.param.PlugParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 插件扩展Mapper
*
* @author 科技小王子
* @since 2023-10-12 09:53:07
*/
public interface PlugMapper extends BaseMapper<Plug> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Plug>
*/
List<Plug> selectPageRel(@Param("page") IPage<Plug> page,
@Param("param") PlugParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<Plug> selectListRel(@Param("param") PlugParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.RechargeOrder;
import com.gxwebsoft.common.system.param.RechargeOrderParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 会员充值订单表Mapper
*
* @author 科技小王子
* @since 2024-07-26 23:18:48
*/
public interface RechargeOrderMapper extends BaseMapper<RechargeOrder> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<RechargeOrder>
*/
List<RechargeOrder> selectPageRel(@Param("page") IPage<RechargeOrder> page,
@Param("param") RechargeOrderParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<RechargeOrder> selectListRel(@Param("param") RechargeOrderParam param);
}
@@ -0,0 +1,22 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.common.system.entity.Role;
import com.gxwebsoft.common.system.param.RoleParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 角色Mapper
*
* @author WebSoft
* @since 2018-12-24 16:10:44
*/
public interface RoleMapper extends BaseMapper<Role> {
@InterceptorIgnore(tenantLine = "true")
List<Role> selectListAll(@Param("param") RoleParam param);
}
@@ -0,0 +1,39 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.common.system.entity.Menu;
import com.gxwebsoft.common.system.entity.RoleMenu;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 角色菜单Mapper
*
* @author WebSoft
* @since 2018-12-24 16:10:21
*/
public interface RoleMenuMapper extends BaseMapper<RoleMenu> {
/**
* 查询用户的菜单
*
* @param userId 用户id
* @param menuType 菜单类型
* @return List<Menu>
*/
@InterceptorIgnore(tenantLine = "true")
List<Menu> listMenuByUserId(@Param("userId") Integer userId, @Param("menuType") Integer menuType);
/**
* 根据角色id查询菜单
*
* @param roleIds 角色id
* @param menuType 菜单类型
* @return List<Menu>
*/
@InterceptorIgnore(tenantLine = "true")
List<Menu> listMenuByRoleIds(@Param("roleIds") List<Integer> roleIds, @Param("menuType") Integer menuType);
}
@@ -0,0 +1,40 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.Setting;
import com.gxwebsoft.common.system.param.SettingParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 系统设置Mapper
*
* @author WebSoft
* @since 2022-11-19 13:54:27
*/
public interface SettingMapper extends BaseMapper<Setting> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Setting>
*/
List<Setting> selectPageRel(@Param("page") IPage<Setting> page,
@Param("param") SettingParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<Setting> selectListRel(@Param("param") SettingParam param);
@InterceptorIgnore(tenantLine = "true")
Setting getBySettingKeyIgnore(@Param("param") SettingParam param);
}
@@ -0,0 +1,42 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.Tenant;
import com.gxwebsoft.common.system.param.TenantParam;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 租户Mapper
*
* @author 科技小王子
* @since 2023-07-17 17:49:53
*/
public interface TenantMapper extends BaseMapper<Tenant> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Tenant>
*/
List<Tenant> selectPageRel(@Param("page") IPage<Tenant> page,
@Param("param") TenantParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<Tenant> selectListRel(@Param("param") TenantParam param);
@InterceptorIgnore(tenantLine = "true")
boolean destructionAll(Integer id);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.UserBalanceLog;
import com.gxwebsoft.common.system.param.UserBalanceLogParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 用户余额变动明细表Mapper
*
* @author 科技小王子
* @since 2023-04-21 15:59:09
*/
public interface UserBalanceLogMapper extends BaseMapper<UserBalanceLog> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<UserBalanceLog>
*/
List<UserBalanceLog> selectPageRel(@Param("page") IPage<UserBalanceLog> page,
@Param("param") UserBalanceLogParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<UserBalanceLog> selectListRel(@Param("param") UserBalanceLogParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.UserCollection;
import com.gxwebsoft.common.system.param.UserCollectionParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 我的收藏Mapper
*
* @author 科技小王子
* @since 2024-04-28 18:08:32
*/
public interface UserCollectionMapper extends BaseMapper<UserCollection> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<UserCollection>
*/
List<UserCollection> selectPageRel(@Param("page") IPage<UserCollection> page,
@Param("param") UserCollectionParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<UserCollection> selectListRel(@Param("param") UserCollectionParam param);
}
@@ -0,0 +1,14 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.common.system.entity.UserFile;
/**
* 用户文件Mapper
*
* @author WebSoft
* @since 2022-07-21 14:34:40
*/
public interface UserFileMapper extends BaseMapper<UserFile> {
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.UserGrade;
import com.gxwebsoft.common.system.param.UserGradeParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 用户会员等级表Mapper
*
* @author 科技小王子
* @since 2023-10-07 22:51:17
*/
public interface UserGradeMapper extends BaseMapper<UserGrade> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<UserGrade>
*/
List<UserGrade> selectPageRel(@Param("page") IPage<UserGrade> page,
@Param("param") UserGradeParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<UserGrade> selectListRel(@Param("param") UserGradeParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.UserGroup;
import com.gxwebsoft.common.system.param.UserGroupParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 用户分组管理表Mapper
*
* @author 科技小王子
* @since 2023-10-28 15:16:39
*/
public interface UserGroupMapper extends BaseMapper<UserGroup> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<UserGroup>
*/
List<UserGroup> selectPageRel(@Param("page") IPage<UserGroup> page,
@Param("param") UserGroupParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<UserGroup> selectListRel(@Param("param") UserGroupParam param);
}
@@ -0,0 +1,55 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.User;
import com.gxwebsoft.common.system.param.UserParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 用户Mapper
*
* @author WebSoft
* @since 2018-12-24 16:10:14
*/
public interface UserMapper extends BaseMapper<User> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<User>
*/
List<User> selectPageRel(@Param("page") IPage<User> page,
@Param("param") UserParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<User> selectListRel(@Param("param") UserParam param);
/**
* 根据账号查询
*
* @param username 账号
* @param tenantId 租户id
* @return User
*/
@InterceptorIgnore(tenantLine = "true")
User selectByUsername(@Param("username") String username, @Param("tenantId") Integer tenantId);
@InterceptorIgnore(tenantLine = "true")
List<User> getOne(@Param("param") UserParam param);
List<User> selectListStatisticsRel(@Param("param") UserParam param);
@InterceptorIgnore(tenantLine = "true")
void updateByUserId(@Param("param") User param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.UserOauth;
import com.gxwebsoft.common.system.param.UserOauthParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 第三方用户信息表Mapper
*
* @author 科技小王子
* @since 2023-10-07 22:39:46
*/
public interface UserOauthMapper extends BaseMapper<UserOauth> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<UserOauth>
*/
List<UserOauth> selectPageRel(@Param("page") IPage<UserOauth> page,
@Param("param") UserOauthParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<UserOauth> selectListRel(@Param("param") UserOauthParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.UserReferee;
import com.gxwebsoft.common.system.param.UserRefereeParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 用户推荐关系表Mapper
*
* @author 科技小王子
* @since 2023-10-07 22:56:36
*/
public interface UserRefereeMapper extends BaseMapper<UserReferee> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<UserReferee>
*/
List<UserReferee> selectPageRel(@Param("page") IPage<UserReferee> page,
@Param("param") UserRefereeParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<UserReferee> selectListRel(@Param("param") UserRefereeParam param);
}
@@ -0,0 +1,45 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.common.system.entity.Role;
import com.gxwebsoft.common.system.entity.UserRole;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 用户角色Mapper
*
* @author WebSoft
* @since 2018-12-24 16:10:02
*/
public interface UserRoleMapper extends BaseMapper<UserRole> {
/**
* 批量添加用户角色
*
* @param userId 用户id
* @param roleIds 角色id集合
* @return int
*/
int insertBatch(@Param("userId") Integer userId, @Param("roleIds") List<Integer> roleIds);
/**
* 根据用户id查询角色
*
* @param userId 用户id
* @return List<Role>
*/
@InterceptorIgnore(tenantLine = "true")
List<Role> selectByUserId(@Param("userId") Integer userId);
/**
* 批量根据用户id查询角色
*
* @param userIds 用户id集合
* @return List<RoleResult>
*/
List<Role> selectByUserIds(@Param("userIds") List<Integer> userIds);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.Version;
import com.gxwebsoft.common.system.param.VersionParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 版本更新Mapper
*
* @author 科技小王子
* @since 2024-01-15 18:52:24
*/
public interface VersionMapper extends BaseMapper<Version> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Version>
*/
List<Version> selectPageRel(@Param("page") IPage<Version> page,
@Param("param") VersionParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<Version> selectListRel(@Param("param") VersionParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.WhiteDomain;
import com.gxwebsoft.common.system.param.WhiteDomainParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 服务器白名单Mapper
*
* @author 科技小王子
* @since 2024-03-26 00:22:21
*/
public interface WhiteDomainMapper extends BaseMapper<WhiteDomain> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<WhiteDomain>
*/
List<WhiteDomain> selectPageRel(@Param("page") IPage<WhiteDomain> page,
@Param("param") WhiteDomainParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<WhiteDomain> selectListRel(@Param("param") WhiteDomainParam param);
}
@@ -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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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>