mirror of
https://github.com/kerwincui/FastBee.git
synced 2025-10-20 14:55:22 +08:00
fix(登录问题): 修复登录用户缓存为空的问题
This commit is contained in:
@@ -29,6 +29,11 @@
|
||||
<version>${dynamic-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
@@ -0,0 +1,76 @@
|
||||
package com.fastbee.system.convert;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fastbee.system.domain.SysClient;
|
||||
import com.fastbee.system.domain.vo.SysClientVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统授权Convert转换类
|
||||
*
|
||||
* @author zhuangpeng.li
|
||||
* @date 2024-12-12
|
||||
*/
|
||||
@Mapper
|
||||
public interface SysClientConvert
|
||||
{
|
||||
/** 代码生成区域 可直接覆盖**/
|
||||
SysClientConvert INSTANCE = Mappers.getMapper(SysClientConvert.class);
|
||||
|
||||
/**
|
||||
* 实体类转换为VO类
|
||||
*
|
||||
* @param sysClient
|
||||
* @return 系统授权集合
|
||||
*/
|
||||
SysClientVO convertSysClientVO(SysClient sysClient);
|
||||
|
||||
/**
|
||||
* VO类转换为实体类集合
|
||||
*
|
||||
* @param sysClientVO
|
||||
* @return 系统授权集合
|
||||
*/
|
||||
SysClient convertSysClient(SysClientVO sysClientVO);
|
||||
|
||||
/**
|
||||
* 实体类转换为VO类集合
|
||||
*
|
||||
* @param sysClientList
|
||||
* @return 系统授权集合
|
||||
*/
|
||||
List<SysClientVO> convertSysClientVOList(List<SysClient> sysClientList);
|
||||
|
||||
/**
|
||||
* VO类转换为实体类
|
||||
*
|
||||
* @param sysClientVOList
|
||||
* @return 系统授权集合
|
||||
*/
|
||||
List<SysClient> convertSysClientList(List<SysClientVO> sysClientVOList);
|
||||
|
||||
/**
|
||||
* 实体类转换为VO类分页
|
||||
*
|
||||
* @param sysClientPage
|
||||
* @return 系统授权分页
|
||||
*/
|
||||
Page<SysClientVO> convertSysClientVOPage(Page<SysClient> sysClientPage);
|
||||
|
||||
/**
|
||||
* VO类转换为实体类
|
||||
*
|
||||
* @param sysClientVOPage
|
||||
* @return 系统授权分页
|
||||
*/
|
||||
Page<SysClient> convertSysClientPage(Page<SysClientVO> sysClientVOPage);
|
||||
/** 代码生成区域 可直接覆盖END**/
|
||||
|
||||
/** 自定义代码区域 **/
|
||||
|
||||
|
||||
/** 自定义代码区域 END**/
|
||||
}
|
@@ -0,0 +1,64 @@
|
||||
package com.fastbee.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 系统授权对象 sys_client
|
||||
*
|
||||
* @author zhuangpeng.li
|
||||
* @date 2024-12-12
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "SysClient", description = "系统授权 sys_client")
|
||||
@Data
|
||||
@TableName("sys_client" )
|
||||
public class SysClient extends BaseEntity {
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/** id唯一标识 */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty("id唯一标识")
|
||||
private Long id;
|
||||
|
||||
/** 客户端key */
|
||||
@ApiModelProperty("客户端key")
|
||||
private String clientKey;
|
||||
|
||||
/** 客户端秘钥 */
|
||||
@ApiModelProperty("客户端秘钥")
|
||||
private String clientSecret;
|
||||
|
||||
/** 客户端token */
|
||||
@ApiModelProperty("客户端token")
|
||||
private String token;
|
||||
|
||||
/** 授权类型 */
|
||||
@ApiModelProperty("授权类型")
|
||||
private String grantType;
|
||||
|
||||
/** 设备类型 */
|
||||
@ApiModelProperty("设备类型")
|
||||
private String deviceType;
|
||||
|
||||
/** token固定超时 */
|
||||
@ApiModelProperty("token固定超时")
|
||||
private Long timeout;
|
||||
|
||||
/** 是否生效(0-不生效,1-生效) */
|
||||
@ApiModelProperty("是否生效")
|
||||
private String enable;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ApiModelProperty("删除标志")
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
}
|
@@ -0,0 +1,105 @@
|
||||
package com.fastbee.system.domain.vo;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.PageEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 系统授权对象 sys_client
|
||||
*
|
||||
* @author zhuangpeng.li
|
||||
* @date 2024-12-12
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "SysClientVO", description = "系统授权 sys_client")
|
||||
@Data
|
||||
public class SysClientVO extends PageEntity {
|
||||
/** 代码生成区域 可直接覆盖**/
|
||||
/** id唯一标识 */
|
||||
@Excel(name = "id唯一标识")
|
||||
@ApiModelProperty("id唯一标识")
|
||||
private Long id;
|
||||
|
||||
/** 客户端key */
|
||||
@Excel(name = "客户端key")
|
||||
@ApiModelProperty("客户端key")
|
||||
private String clientKey;
|
||||
|
||||
/** 客户端秘钥 */
|
||||
@Excel(name = "客户端秘钥")
|
||||
@ApiModelProperty("客户端秘钥")
|
||||
private String clientSecret;
|
||||
|
||||
/** 客户端token */
|
||||
@Excel(name = "客户端token")
|
||||
@ApiModelProperty("客户端token")
|
||||
private String token;
|
||||
|
||||
/** 授权类型 */
|
||||
@Excel(name = "授权类型")
|
||||
@ApiModelProperty("授权类型")
|
||||
private String grantType;
|
||||
|
||||
/** 设备类型 */
|
||||
@Excel(name = "设备类型")
|
||||
@ApiModelProperty("设备类型")
|
||||
private String deviceType;
|
||||
|
||||
/** token固定超时 */
|
||||
@Excel(name = "token固定超时")
|
||||
@ApiModelProperty("token固定超时")
|
||||
private Long timeout;
|
||||
|
||||
/** 是否生效(0-不生效,1-生效) */
|
||||
@ApiModelProperty("是否生效")
|
||||
@Excel(name = "是否生效")
|
||||
private String enable;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ApiModelProperty("删除标志")
|
||||
@Excel(name = "删除标志")
|
||||
private String delFlag;
|
||||
|
||||
/** 创建者 */
|
||||
@Excel(name = "创建者")
|
||||
@ApiModelProperty("创建者")
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("创建时间")
|
||||
@Excel(name = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
@Excel(name = "更新者")
|
||||
@ApiModelProperty("更新者")
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("更新时间")
|
||||
@Excel(name = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
/** 代码生成区域 可直接覆盖END**/
|
||||
|
||||
/** 自定义代码区域 **/
|
||||
|
||||
|
||||
/** 自定义代码区域 END**/
|
||||
}
|
@@ -0,0 +1,49 @@
|
||||
package com.fastbee.system.mapper;
|
||||
|
||||
|
||||
import com.fastbee.common.mybatis.mapper.BaseMapperX;
|
||||
import com.fastbee.system.domain.SysClient;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统授权Mapper接口
|
||||
*
|
||||
* @author zhuangpeng.li
|
||||
* @date 2024-07-26
|
||||
*/
|
||||
public interface SysClientMapper extends BaseMapperX<SysClient>
|
||||
{
|
||||
/**
|
||||
* 查询系统授权
|
||||
*
|
||||
* @param id 系统授权主键
|
||||
* @return 系统授权
|
||||
*/
|
||||
public SysClient selectSysClientById(Long id);
|
||||
|
||||
/**
|
||||
* 查询系统授权列表
|
||||
*
|
||||
* @param sysClient 系统授权
|
||||
* @return 系统授权集合
|
||||
*/
|
||||
public List<SysClient> selectSysClientList(SysClient sysClient);
|
||||
|
||||
/**
|
||||
* 新增系统授权
|
||||
*
|
||||
* @param sysClient 系统授权
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysClient(SysClient sysClient);
|
||||
|
||||
/**
|
||||
* 修改系统授权
|
||||
*
|
||||
* @param sysClient 系统授权
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysClient(SysClient sysClient);
|
||||
|
||||
}
|
@@ -0,0 +1,73 @@
|
||||
package com.fastbee.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fastbee.system.domain.SysClient;
|
||||
import com.fastbee.system.domain.vo.SysClientVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统授权Service接口
|
||||
*
|
||||
* @author zhuangpeng.li
|
||||
* @date 2024-07-26
|
||||
*/
|
||||
public interface ISysClientService extends IService<SysClient>
|
||||
{
|
||||
/**
|
||||
* 查询系统授权
|
||||
*
|
||||
* @param id 系统授权主键
|
||||
* @return 系统授权
|
||||
*/
|
||||
public SysClient selectSysClientById(Long id);
|
||||
|
||||
/**
|
||||
* 查询系统授权列表
|
||||
*
|
||||
* @param sysClient 系统授权
|
||||
* @return 系统授权集合
|
||||
*/
|
||||
public List<SysClientVO> selectSysClientList(SysClient sysClient);
|
||||
|
||||
/**
|
||||
* 查询系统授权列表
|
||||
*
|
||||
* @param sysClient 系统授权
|
||||
* @return 系统授权分页集合
|
||||
*/
|
||||
Page<SysClientVO> pageSysClientVO(SysClient sysClient);
|
||||
|
||||
/**
|
||||
* 新增系统授权
|
||||
*
|
||||
* @param sysClient 系统授权
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysClient(SysClient sysClient);
|
||||
|
||||
/**
|
||||
* 修改系统授权
|
||||
*
|
||||
* @param sysClient 系统授权
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysClient(SysClient sysClient);
|
||||
|
||||
/**
|
||||
* 批量删除系统授权
|
||||
*
|
||||
* @param ids 需要删除的系统授权主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysClientByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除系统授权信息
|
||||
*
|
||||
* @param id 系统授权主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysClientById(Long id);
|
||||
}
|
@@ -0,0 +1,147 @@
|
||||
package com.fastbee.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fastbee.common.utils.DateUtils;
|
||||
import com.fastbee.common.utils.StringUtils;
|
||||
import com.fastbee.system.convert.SysClientConvert;
|
||||
import com.fastbee.system.domain.SysClient;
|
||||
import com.fastbee.system.domain.vo.SysClientVO;
|
||||
import com.fastbee.system.mapper.SysClientMapper;
|
||||
import com.fastbee.system.service.ISysClientService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 系统授权Service业务层处理
|
||||
*
|
||||
* @author zhuangpeng.li
|
||||
* @date 2024-07-26
|
||||
*/
|
||||
@Service
|
||||
public class SysClientServiceImpl extends ServiceImpl<SysClientMapper,SysClient> implements ISysClientService
|
||||
{
|
||||
@Resource
|
||||
private SysClientMapper sysClientMapper;
|
||||
|
||||
/**
|
||||
* 查询系统授权
|
||||
*
|
||||
* @param id 系统授权主键
|
||||
* @return 系统授权
|
||||
*/
|
||||
@Override
|
||||
public SysClient selectSysClientById(Long id)
|
||||
{
|
||||
return sysClientMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询系统授权列表
|
||||
*
|
||||
* @param sysClient 系统授权
|
||||
* @return 系统授权
|
||||
*/
|
||||
@Override
|
||||
public List<SysClientVO> selectSysClientList(SysClient sysClient)
|
||||
{
|
||||
LambdaQueryWrapper<SysClient> lqw = buildQueryWrapper(sysClient);
|
||||
List<SysClient> sysClientList = baseMapper.selectList(lqw);
|
||||
return SysClientConvert.INSTANCE.convertSysClientVOList(sysClientList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询系统授权分页列表
|
||||
*
|
||||
* @param sysClient 系统授权
|
||||
* @return 系统授权
|
||||
*/
|
||||
@Override
|
||||
public Page<SysClientVO> pageSysClientVO(SysClient sysClient) {
|
||||
LambdaQueryWrapper<SysClient> lqw = buildQueryWrapper(sysClient);
|
||||
Page<SysClient> sysClientPage = baseMapper.selectPage(new Page<>(sysClient.getPageNum(), sysClient.getPageSize()), lqw);
|
||||
return SysClientConvert.INSTANCE.convertSysClientVOPage(sysClientPage);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<SysClient> buildQueryWrapper(SysClient query) {
|
||||
Map<String, Object> params = query.getParams();
|
||||
LambdaQueryWrapper<SysClient> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(query.getId() != null, SysClient::getId, query.getId());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getClientKey()), SysClient::getClientKey, query.getClientKey());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getClientSecret()), SysClient::getClientSecret, query.getClientSecret());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getToken()), SysClient::getToken, query.getToken());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getGrantType()), SysClient::getGrantType, query.getGrantType());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getDeviceType()), SysClient::getDeviceType, query.getDeviceType());
|
||||
lqw.eq(query.getTimeout() != null, SysClient::getTimeout, query.getTimeout());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getEnable()), SysClient::getEnable, query.getEnable());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getDelFlag()), SysClient::getDelFlag, query.getDelFlag());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getCreateBy()), SysClient::getCreateBy, query.getCreateBy());
|
||||
lqw.eq(query.getCreateTime() != null, SysClient::getCreateTime, query.getCreateTime());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getUpdateBy()), SysClient::getUpdateBy, query.getUpdateBy());
|
||||
lqw.eq(query.getUpdateTime() != null, SysClient::getUpdateTime, query.getUpdateTime());
|
||||
lqw.eq(StringUtils.isNotBlank(query.getRemark()), SysClient::getRemark, query.getRemark());
|
||||
|
||||
if (!Objects.isNull(params.get("beginTime")) &&
|
||||
!Objects.isNull(params.get("endTime"))) {
|
||||
lqw.between(SysClient::getCreateTime, params.get("beginTime"), params.get("endTime"));
|
||||
}
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增系统授权
|
||||
*
|
||||
* @param sysClient 系统授权
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysClient(SysClient sysClient)
|
||||
{
|
||||
sysClient.setCreateTime(DateUtils.getNowDate());
|
||||
return sysClientMapper.insert(sysClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改系统授权
|
||||
*
|
||||
* @param sysClient 系统授权
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysClient(SysClient sysClient)
|
||||
{
|
||||
sysClient.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysClientMapper.updateById(sysClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除系统授权
|
||||
*
|
||||
* @param ids 需要删除的系统授权主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysClientByIds(Long[] ids)
|
||||
{
|
||||
return sysClientMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统授权信息
|
||||
*
|
||||
* @param id 系统授权主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysClientById(Long id)
|
||||
{
|
||||
return sysClientMapper.deleteById(id);
|
||||
}
|
||||
}
|
@@ -0,0 +1,101 @@
|
||||
<?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.fastbee.system.mapper.SysClientMapper">
|
||||
|
||||
<resultMap type="SysClient" id="SysClientResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientKey" column="client_key" />
|
||||
<result property="clientSecret" column="client_secret" />
|
||||
<result property="token" column="token" />
|
||||
<result property="grantType" column="grant_type" />
|
||||
<result property="deviceType" column="device_type" />
|
||||
<result property="timeout" column="timeout" />
|
||||
<result property="enable" column="enable" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysClientVo">
|
||||
select id, client_key, client_secret, token, grant_type, device_type, timeout, enable, del_flag, create_by, create_time, update_by, update_time, remark from sys_client
|
||||
</sql>
|
||||
|
||||
<select id="selectSysClientList" parameterType="SysClient" resultMap="SysClientResult">
|
||||
<include refid="selectSysClientVo"/>
|
||||
<where>
|
||||
<if test="clientKey != null and clientKey != ''"> and client_key = #{clientKey}</if>
|
||||
<if test="clientSecret != null and clientSecret != ''"> and client_secret = #{clientSecret}</if>
|
||||
<if test="token != null and token != ''"> and token = #{token}</if>
|
||||
<if test="grantType != null and grantType != ''"> and grant_type = #{grantType}</if>
|
||||
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
|
||||
<if test="timeout != null "> and timeout = #{timeout}</if>
|
||||
<if test="enable != null and enable != ''"> and enable = #{enable}</if>
|
||||
and del_flag = '0'
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysClientById" parameterType="Long" resultMap="SysClientResult">
|
||||
<include refid="selectSysClientVo"/>
|
||||
where id = #{id} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<insert id="insertSysClient" parameterType="SysClient" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_client
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientKey != null">client_key,</if>
|
||||
<if test="clientSecret != null">client_secret,</if>
|
||||
<if test="token != null">token,</if>
|
||||
<if test="grantType != null">grant_type,</if>
|
||||
<if test="deviceType != null">device_type,</if>
|
||||
<if test="timeout != null">timeout,</if>
|
||||
<if test="enable != null">enable,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientKey != null">#{clientKey},</if>
|
||||
<if test="clientSecret != null">#{clientSecret},</if>
|
||||
<if test="token != null">#{token},</if>
|
||||
<if test="grantType != null">#{grantType},</if>
|
||||
<if test="deviceType != null">#{deviceType},</if>
|
||||
<if test="timeout != null">#{timeout},</if>
|
||||
<if test="enable != null">#{enable},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysClient" parameterType="SysClient">
|
||||
update sys_client
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientKey != null">client_key = #{clientKey},</if>
|
||||
<if test="clientSecret != null">client_secret = #{clientSecret},</if>
|
||||
<if test="token != null">token = #{token},</if>
|
||||
<if test="grantType != null">grant_type = #{grantType},</if>
|
||||
<if test="deviceType != null">device_type = #{deviceType},</if>
|
||||
<if test="timeout != null">timeout = #{timeout},</if>
|
||||
<if test="enable != null">enable = #{enable},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user