ai模块
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
package org.xyzh.system.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.xyzh.api.system.service.GuestService;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.core.page.PageRequest;
|
||||
import org.xyzh.common.dto.sys.TbGuestDTO;
|
||||
import org.xyzh.common.utils.validation.ValidationUtils;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @description 来客控制器
|
||||
* @filename GuestController.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/system/guest")
|
||||
public class GuestController {
|
||||
|
||||
@DubboReference(version = "1.0.0", group = "system", timeout = 3000, retries = 0)
|
||||
private GuestService guestService;
|
||||
|
||||
|
||||
@PostMapping
|
||||
public ResultDomain<TbGuestDTO> createGuest(TbGuestDTO guest) {
|
||||
ValidationUtils.validate(guest, Arrays.asList(
|
||||
ValidationUtils.requiredString("name", "姓名"),
|
||||
ValidationUtils.atLeastOne(
|
||||
Arrays.asList("phone", "email", "wechatId"),
|
||||
Arrays.asList("电话", "邮箱", "微信ID")
|
||||
)
|
||||
));
|
||||
return guestService.createGuest(guest);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public ResultDomain<TbGuestDTO> updateGuest(TbGuestDTO guest) {
|
||||
ValidationUtils.validate(guest, Arrays.asList(
|
||||
ValidationUtils.requiredString("name", "姓名"),
|
||||
ValidationUtils.atLeastOne(
|
||||
Arrays.asList("phone", "email", "wechatId"),
|
||||
Arrays.asList("电话", "邮箱", "微信ID")
|
||||
)
|
||||
));
|
||||
return guestService.updateGuest(guest);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
public ResultDomain<TbGuestDTO> deleteGuest(@NotNull String userId) {
|
||||
return guestService.deleteGuest(userId);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/list")
|
||||
public ResultDomain<TbGuestDTO> listGuest(TbGuestDTO filter) {
|
||||
return guestService.selectGuestList(filter);
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
public ResultDomain<TbGuestDTO> pageGuest(PageRequest<TbGuestDTO> pageRequest) {
|
||||
return guestService.selectGuestPage(pageRequest);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package org.xyzh.system.mapper.user;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.xyzh.common.core.page.PageParam;
|
||||
import org.xyzh.common.dto.sys.TbGuestDTO;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @description 来客Mapper
|
||||
* @filename TbGuestMapper.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbGuestMapper extends BaseMapper<TbGuestDTO>{
|
||||
|
||||
/**
|
||||
* @description 插入来客
|
||||
* @param guest 来客信息
|
||||
* @author yslg
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
int insertGuest(TbGuestDTO guest);
|
||||
|
||||
/**
|
||||
* @description 更新来客
|
||||
* @param guest 来客信息
|
||||
* @author yslg
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
int updateGuest(TbGuestDTO guest);
|
||||
|
||||
/**
|
||||
* @description 删除来客
|
||||
* @param userId 来客ID
|
||||
* @author yslg
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
int deleteGuest(String userId);
|
||||
|
||||
/**
|
||||
* @description 查询单个来客
|
||||
* @param guest 来客信息
|
||||
* @author yslg
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
TbGuestDTO selectGuestOne(TbGuestDTO guest);
|
||||
|
||||
/**
|
||||
* @description 查询来客列表
|
||||
* @param guest 来客信息
|
||||
* @author yslg
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
List<TbGuestDTO> selectGuestList(TbGuestDTO guest);
|
||||
|
||||
/**
|
||||
* @description 查询来客分页列表
|
||||
* @param guest 来客信息
|
||||
* @param pageParam 分页参数
|
||||
* @author yslg
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
List<TbGuestDTO> selectGuestPage(TbGuestDTO guest, PageParam pageParam);
|
||||
|
||||
int countGuest(TbGuestDTO guest);
|
||||
}
|
||||
@@ -14,7 +14,7 @@ import org.xyzh.common.core.page.PageParam;
|
||||
import org.xyzh.common.core.page.PageRequest;
|
||||
import org.xyzh.common.dto.sys.TbSysAclDTO;
|
||||
import org.xyzh.common.dto.sys.TbSysAclPolicyDTO;
|
||||
import org.xyzh.common.utils.IDUtils;
|
||||
import org.xyzh.common.utils.id.IdUtil;
|
||||
import org.xyzh.common.utils.StringUtils;
|
||||
import org.xyzh.system.mapper.acl.TbSysAclMapper;
|
||||
import org.xyzh.system.mapper.acl.TbSysAclPolicyMapper;
|
||||
@@ -54,7 +54,7 @@ public class AclServiceImpl implements AclService {
|
||||
return ResultDomain.failure(MSG_ACL_PARAM_REQUIRED);
|
||||
}
|
||||
if (StringUtils.isBlank(aclDTO.getAclId())) {
|
||||
aclDTO.setAclId(IDUtils.generateID());
|
||||
aclDTO.setAclId(IdUtil.generateID());
|
||||
}
|
||||
if (aclDTO.getCreateTime() == null) {
|
||||
aclDTO.setCreateTime(new Date());
|
||||
@@ -178,7 +178,7 @@ public class AclServiceImpl implements AclService {
|
||||
return ResultDomain.failure(MSG_POLICY_PARAM_REQUIRED);
|
||||
}
|
||||
if (StringUtils.isBlank(aclPolicyDTO.getPolicyId())) {
|
||||
aclPolicyDTO.setPolicyId(IDUtils.generateID());
|
||||
aclPolicyDTO.setPolicyId(IdUtil.generateID());
|
||||
}
|
||||
if (aclPolicyDTO.getCreateTime() == null) {
|
||||
aclPolicyDTO.setCreateTime(new Date());
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.xyzh.common.dto.sys.TbSysDeptRoleDTO;
|
||||
import org.xyzh.common.dto.sys.TbSysRoleDTO;
|
||||
import org.xyzh.common.dto.sys.TbSysRolePermissionDTO;
|
||||
import org.xyzh.common.dto.sys.TbSysUserRoleDTO;
|
||||
import org.xyzh.common.utils.IDUtils;
|
||||
import org.xyzh.common.utils.id.IdUtil;
|
||||
import org.xyzh.common.utils.StringUtils;
|
||||
import org.xyzh.system.mapper.dept.TbSysDeptMapper;
|
||||
import org.xyzh.system.mapper.role.TbSysRoleMapper;
|
||||
@@ -67,7 +67,7 @@ public class DeptRoleServiceImpl implements DeptRoleService {
|
||||
return ResultDomain.failure(MSG_DEPT_PARAM_REQUIRED);
|
||||
}
|
||||
if (StringUtils.isBlank(deptDTO.getDeptId())) {
|
||||
deptDTO.setDeptId(IDUtils.generateID());
|
||||
deptDTO.setDeptId(IdUtil.generateID());
|
||||
}
|
||||
if (deptDTO.getCreateTime() == null) {
|
||||
deptDTO.setCreateTime(new Date());
|
||||
@@ -166,7 +166,7 @@ public class DeptRoleServiceImpl implements DeptRoleService {
|
||||
return ResultDomain.failure(MSG_ROLE_PARAM_REQUIRED);
|
||||
}
|
||||
if (StringUtils.isBlank(roleDTO.getRoleId())) {
|
||||
roleDTO.setRoleId(IDUtils.generateID());
|
||||
roleDTO.setRoleId(IdUtil.generateID());
|
||||
}
|
||||
if (roleDTO.getCreateTime() == null) {
|
||||
roleDTO.setCreateTime(new Date());
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package org.xyzh.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.xyzh.api.system.service.GuestService;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.core.page.PageDomain;
|
||||
import org.xyzh.common.core.page.PageRequest;
|
||||
import org.xyzh.common.dto.sys.TbGuestDTO;
|
||||
import org.xyzh.system.mapper.user.TbGuestMapper;
|
||||
|
||||
|
||||
/**
|
||||
* @description 来客服务接口实现
|
||||
* @filename GuestServiceImpl.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
@DubboService(
|
||||
version = "1.0.0",
|
||||
group = "system",
|
||||
timeout = 3000,
|
||||
retries = 0
|
||||
)
|
||||
public class GuestServiceImpl implements GuestService{
|
||||
private static final Logger logger = LoggerFactory.getLogger(GuestServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private TbGuestMapper guestMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public ResultDomain<TbGuestDTO> createGuest(TbGuestDTO guest) {
|
||||
guestMapper.insertGuest(guest);
|
||||
return ResultDomain.success("创建成功",guest);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public ResultDomain<TbGuestDTO> updateGuest(TbGuestDTO guest) {
|
||||
guestMapper.updateGuest(guest);
|
||||
return ResultDomain.success("更新成功",guest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbGuestDTO> deleteGuest(String userId) {
|
||||
guestMapper.deleteGuest(userId);
|
||||
return ResultDomain.success("删除成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbGuestDTO> selectGuestList(TbGuestDTO guest) {
|
||||
guestMapper.selectGuestList(guest);
|
||||
return ResultDomain.success("查询成功",guest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbGuestDTO> selectGuestOne(TbGuestDTO guest) {
|
||||
guestMapper.selectGuestOne(guest);
|
||||
return ResultDomain.success("查询成功",guest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbGuestDTO> selectGuestPage(PageRequest<TbGuestDTO> pageRequest) {
|
||||
List<TbGuestDTO> guestList = guestMapper.selectGuestPage(pageRequest.getFilter(),pageRequest.getPageParam());
|
||||
int total = guestMapper.countGuest(pageRequest.getFilter());
|
||||
PageDomain<TbGuestDTO> pageDomain = new PageDomain<>();
|
||||
pageDomain.setPageParam(pageRequest.getPageParam());
|
||||
pageDomain.getPageParam().setTotal(total);
|
||||
|
||||
pageDomain.setDataList(guestList);
|
||||
return ResultDomain.success("查询成功",pageDomain);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import org.xyzh.common.core.page.PageParam;
|
||||
import org.xyzh.common.core.page.PageDomain;
|
||||
import org.xyzh.common.utils.IDUtils;
|
||||
import org.xyzh.common.utils.id.IdUtil;
|
||||
import org.xyzh.common.utils.StringUtils;
|
||||
import org.xyzh.system.mapper.module.TbSysModuleMapper;
|
||||
import org.xyzh.system.mapper.permission.TbSysPermissionMapper;
|
||||
@@ -61,7 +61,7 @@ public class ModulePermissionServiceImpl implements ModulePermissionService {
|
||||
return ResultDomain.failure(MSG_MODULE_PARAM_REQUIRED);
|
||||
}
|
||||
if (StringUtils.isBlank(moduleDTO.getModuleId())) {
|
||||
moduleDTO.setModuleId(IDUtils.generateID());
|
||||
moduleDTO.setModuleId(IdUtil.generateID());
|
||||
}
|
||||
if (moduleDTO.getCreateTime() == null) {
|
||||
moduleDTO.setCreateTime(new Date());
|
||||
@@ -138,7 +138,7 @@ public class ModulePermissionServiceImpl implements ModulePermissionService {
|
||||
return ResultDomain.failure(MSG_PERMISSION_PARAM_REQUIRED);
|
||||
}
|
||||
if (StringUtils.isBlank(permissionDTO.getPermissionId())) {
|
||||
permissionDTO.setPermissionId(IDUtils.generateID());
|
||||
permissionDTO.setPermissionId(IdUtil.generateID());
|
||||
}
|
||||
if (permissionDTO.getCreateTime() == null) {
|
||||
permissionDTO.setCreateTime(new Date());
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
import org.xyzh.common.core.page.PageParam;
|
||||
import org.xyzh.common.core.page.PageDomain;
|
||||
|
||||
import org.xyzh.common.utils.IDUtils;
|
||||
import org.xyzh.common.utils.id.IdUtil;
|
||||
import org.xyzh.common.utils.StringUtils;
|
||||
import org.xyzh.system.mapper.config.TbSysConfigMapper;
|
||||
|
||||
@@ -231,7 +231,7 @@ public class SysConfigServiceImpl implements SysConfigService {
|
||||
return ResultDomain.failure(MSG_CONFIG_PARAM_REQUIRED);
|
||||
}
|
||||
if (StringUtils.isBlank(configDTO.getConfigId())) {
|
||||
configDTO.setConfigId(IDUtils.generateID());
|
||||
configDTO.setConfigId(IdUtil.generateID());
|
||||
}
|
||||
if (configDTO.getCreateTime() == null) {
|
||||
configDTO.setCreateTime(new Date());
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
import org.xyzh.common.core.page.PageParam;
|
||||
import org.xyzh.common.core.page.PageDomain;
|
||||
|
||||
import org.xyzh.common.utils.IDUtils;
|
||||
import org.xyzh.common.utils.id.IdUtil;
|
||||
import org.xyzh.common.utils.NonUtils;
|
||||
import org.xyzh.common.utils.StringUtils;
|
||||
import org.xyzh.common.utils.crypto.AesEncryptUtil;
|
||||
@@ -80,7 +80,7 @@ public class SysUserServiceImpl implements SysUserService {
|
||||
// 设置用户基本信息
|
||||
Date now = new Date();
|
||||
if (StringUtils.isBlank(dto.getUserId())) {
|
||||
dto.setUserId(IDUtils.generateID());
|
||||
dto.setUserId(IdUtil.generateID());
|
||||
}
|
||||
dto.setPhone(userVO.getPhone());
|
||||
dto.setCreateTime(now);
|
||||
@@ -299,7 +299,7 @@ public class SysUserServiceImpl implements SysUserService {
|
||||
if (StringUtils.isBlank(userId)) {
|
||||
return ResultDomain.failure(MSG_USER_ID_REQUIRED);
|
||||
}
|
||||
String newPwd = IDUtils.generateID();
|
||||
String newPwd = IdUtil.generateID();
|
||||
if (newPwd.length() > 12) {
|
||||
newPwd = newPwd.substring(0, 12);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.xyzh.common.core.page.PageParam;
|
||||
import org.xyzh.common.core.page.PageRequest;
|
||||
import org.xyzh.common.dto.sys.TbSysViewDTO;
|
||||
import org.xyzh.common.dto.sys.TbSysViewPermissionDTO;
|
||||
import org.xyzh.common.utils.IDUtils;
|
||||
import org.xyzh.common.utils.id.IdUtil;
|
||||
import org.xyzh.common.utils.StringUtils;
|
||||
import org.xyzh.system.mapper.view.TbSysViewMapper;
|
||||
import org.xyzh.system.mapper.view.TbSysViewPermissionMapper;
|
||||
@@ -50,7 +50,7 @@ public class ViewServiceImpl implements ViewService {
|
||||
return ResultDomain.failure("视图参数不能为空");
|
||||
}
|
||||
if (StringUtils.isBlank(viewDTO.getViewId())) {
|
||||
viewDTO.setViewId(IDUtils.generateID());
|
||||
viewDTO.setViewId(IdUtil.generateID());
|
||||
}
|
||||
if (viewDTO.getCreateTime() == null) {
|
||||
viewDTO.setCreateTime(new Date());
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
<?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="org.xyzh.system.mapper.user.TbGuestMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.sys.TbGuestDTO">
|
||||
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||||
<result column="user_id" property="userId" jdbcType="VARCHAR"/>
|
||||
<result column="name" property="name" jdbcType="VARCHAR"/>
|
||||
<result column="phone" property="phone" jdbcType="VARCHAR"/>
|
||||
<result column="email" property="email" jdbcType="VARCHAR"/>
|
||||
<result column="wechat_id" property="wechatId" jdbcType="VARCHAR"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
optsn, user_id, name, phone, email, wechat_id, create_time, update_time, delete_time, deleted
|
||||
</sql>
|
||||
|
||||
<insert id="insertGuest" parameterType="org.xyzh.common.dto.sys.TbGuestDTO">
|
||||
INSERT INTO sys.tb_guest (
|
||||
optsn, user_id, name
|
||||
<if test="phone != null">, phone</if>
|
||||
<if test="email != null">, email</if>
|
||||
<if test="wechatId != null">, wechat_id</if>
|
||||
<if test="createTime != null">, create_time</if>
|
||||
<if test="deleted != null">, deleted</if>
|
||||
) VALUES (
|
||||
#{optsn}, #{userId}, #{name}
|
||||
<if test="phone != null">, #{phone}</if>
|
||||
<if test="email != null">, #{email}</if>
|
||||
<if test="wechatId != null">, #{wechatId}</if>
|
||||
<if test="createTime != null">, #{createTime}</if>
|
||||
<if test="deleted != null">, #{deleted}</if>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateGuest" parameterType="org.xyzh.common.dto.sys.TbGuestDTO">
|
||||
UPDATE sys.tb_guest
|
||||
<set>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="email != null">email = #{email},</if>
|
||||
<if test="wechatId != null">wechat_id = #{wechatId},</if>
|
||||
update_time = now()
|
||||
</set>
|
||||
WHERE user_id = #{userId} AND deleted = false
|
||||
</update>
|
||||
|
||||
<update id="deleteGuest">
|
||||
UPDATE sys.tb_guest
|
||||
SET deleted = true,
|
||||
delete_time = now()
|
||||
WHERE user_id = #{userId} AND deleted = false
|
||||
</update>
|
||||
|
||||
<select id="selectGuestOne" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM sys.tb_guest
|
||||
<where>
|
||||
deleted = false
|
||||
|
||||
<if test="name != null and name != ''">
|
||||
AND name LIKE CONCAT('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
AND phone LIKE CONCAT('%', #{phone}, '%')
|
||||
</if>
|
||||
<if test="email != null and email != ''">
|
||||
AND email = #{email}
|
||||
</if>
|
||||
<if test="wechatId != null and wechatId != ''">
|
||||
AND wechat_id = #{wechatId}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectGuestList" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM sys.tb_guest
|
||||
WHERE deleted = false
|
||||
<if test="filter != null">
|
||||
<if test="filter.name != null and filter.name != ''">
|
||||
AND name LIKE CONCAT('%', #{filter.name}, '%')
|
||||
</if>
|
||||
<if test="filter.phone != null and filter.phone != ''">
|
||||
AND phone LIKE CONCAT('%', #{filter.phone}, '%')
|
||||
</if>
|
||||
<if test="filter.email != null and filter.email != ''">
|
||||
AND email = #{filter.email}
|
||||
</if>
|
||||
<if test="filter.wechatId != null and filter.wechatId != ''">
|
||||
AND wechat_id = #{filter.wechatId}
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectGuestPage" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM sys.tb_guest
|
||||
WHERE deleted = false
|
||||
<if test="filter != null">
|
||||
<if test="filter.name != null and filter.name != ''">
|
||||
AND name LIKE CONCAT('%', #{filter.name}, '%')
|
||||
</if>
|
||||
<if test="filter.phone != null and filter.phone != ''">
|
||||
AND phone LIKE CONCAT('%', #{filter.phone}, '%')
|
||||
</if>
|
||||
<if test="filter.email != null and filter.email != ''">
|
||||
AND email = #{filter.email}
|
||||
</if>
|
||||
<if test="filter.wechatId != null and filter.wechatId != ''">
|
||||
AND wechat_id = #{filter.wechatId}
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY create_time DESC
|
||||
LIMIT #{pageParam.pageSize} OFFSET #{pageParam.offset}
|
||||
</select>
|
||||
|
||||
<select id="countGuest">
|
||||
SELECT COUNT(user_id)
|
||||
FROM sys.tb_guest
|
||||
<where>
|
||||
deleted = false
|
||||
|
||||
<if test="name != null and name != ''">
|
||||
AND name LIKE CONCAT('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
AND phone LIKE CONCAT('%', #{phone}, '%')
|
||||
</if>
|
||||
<if test="email != null and email != ''">
|
||||
AND email = #{email}
|
||||
</if>
|
||||
<if test="wechatId != null and wechatId != ''">
|
||||
AND wechat_id = #{wechatId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user