新增 用户无障碍设置
This commit is contained in:
@@ -0,0 +1,105 @@
|
|||||||
|
package com.vetti.web.controller.hotake;
|
||||||
|
|
||||||
|
import com.vetti.common.annotation.Log;
|
||||||
|
import com.vetti.common.core.controller.BaseController;
|
||||||
|
import com.vetti.common.core.domain.R;
|
||||||
|
import com.vetti.common.core.page.TableWebDataInfo;
|
||||||
|
import com.vetti.common.enums.BusinessType;
|
||||||
|
import com.vetti.hotake.domain.HotakeAccessibility;
|
||||||
|
import com.vetti.hotake.service.IHotakeAccessibilityService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户无障碍设置Controller
|
||||||
|
*
|
||||||
|
* @author vetti
|
||||||
|
* @date 2026-02-01
|
||||||
|
*/
|
||||||
|
@Api(tags = "用户无障碍设置")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/hotake/accessibility")
|
||||||
|
public class HotakeAccessibilityController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private IHotakeAccessibilityService hotakeAccessibilityService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户无障碍设置列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("查询用户无障碍设置列表(分页)")
|
||||||
|
@GetMapping("/getPagelist")
|
||||||
|
public TableWebDataInfo<HotakeAccessibility> list(HotakeAccessibility hotakeAccessibility) {
|
||||||
|
startPage();
|
||||||
|
hotakeAccessibility.setCreateBy(getUsername());
|
||||||
|
List<HotakeAccessibility> list = hotakeAccessibilityService.selectHotakeAccessibilityList(hotakeAccessibility);
|
||||||
|
return getWebDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户无障碍设置列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("查询用户无障碍设置列表(无分页)")
|
||||||
|
@GetMapping("/getList")
|
||||||
|
public R<List<HotakeAccessibility>> getList(HotakeAccessibility hotakeAccessibility) {
|
||||||
|
hotakeAccessibility.setCreateBy(getUsername());
|
||||||
|
List<HotakeAccessibility> list = hotakeAccessibilityService.selectHotakeAccessibilityList(hotakeAccessibility);
|
||||||
|
return R.ok(list, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户无障碍设置详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取用户无障碍设置详细信息")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public R<HotakeAccessibility> getInfo(@ApiParam("设置ID") @PathVariable("id") Integer id) {
|
||||||
|
return R.ok(hotakeAccessibilityService.selectHotakeAccessibilityById(id), "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户无障碍设置
|
||||||
|
*/
|
||||||
|
@ApiOperation("新增用户无障碍设置")
|
||||||
|
@Log(title = "用户无障碍设置", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public R<HotakeAccessibility> add(@RequestBody HotakeAccessibility hotakeAccessibility) {
|
||||||
|
return R.ok(hotakeAccessibilityService.insertHotakeAccessibility(hotakeAccessibility));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户无障碍设置
|
||||||
|
*/
|
||||||
|
@ApiOperation("修改用户无障碍设置")
|
||||||
|
@Log(title = "用户无障碍设置", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public R<HotakeAccessibility> edit(@RequestBody HotakeAccessibility hotakeAccessibility) {
|
||||||
|
return R.ok(hotakeAccessibilityService.updateHotakeAccessibility(hotakeAccessibility));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户无障碍设置
|
||||||
|
*/
|
||||||
|
@ApiOperation("删除用户无障碍设置")
|
||||||
|
@Log(title = "用户无障碍设置", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public R remove(@PathVariable Integer id) {
|
||||||
|
return R.ok(hotakeAccessibilityService.deleteHotakeAccessibilityById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前登录用户的无障碍设置
|
||||||
|
* 如果不存在则自动创建默认设置
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取当前登录用户的无障碍设置")
|
||||||
|
@GetMapping("/getCurrentUser")
|
||||||
|
public R<HotakeAccessibility> getCurrentUserAccessibility() {
|
||||||
|
String username = getUsername();
|
||||||
|
HotakeAccessibility accessibility = hotakeAccessibilityService.getCurrentUserAccessibility(username);
|
||||||
|
return R.ok(accessibility, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.vetti.hotake.domain;
|
||||||
|
|
||||||
|
import com.vetti.common.annotation.Excel;
|
||||||
|
import com.vetti.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户无障碍设置对象 hotake_accessibility
|
||||||
|
*
|
||||||
|
* @author vetti
|
||||||
|
* @date 2026-02-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class HotakeAccessibility extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键ID */
|
||||||
|
@ApiModelProperty("主键ID")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/** 颜色模式: light(明亮), dark(暗黑), system(系统) */
|
||||||
|
@ApiModelProperty("颜色模式: light(明亮), dark(暗黑), system(系统)")
|
||||||
|
@Excel(name = "颜色模式")
|
||||||
|
private String colorMode;
|
||||||
|
|
||||||
|
/** 高对比度模式: 0-关闭, 1-开启 */
|
||||||
|
@ApiModelProperty("高对比度模式: 0-关闭, 1-开启")
|
||||||
|
@Excel(name = "高对比度模式")
|
||||||
|
private Integer highContrastMode;
|
||||||
|
|
||||||
|
/** 减少动画: 0-关闭, 1-开启 */
|
||||||
|
@ApiModelProperty("减少动画: 0-关闭, 1-开启")
|
||||||
|
@Excel(name = "减少动画")
|
||||||
|
private Integer reduceMotion;
|
||||||
|
|
||||||
|
/** 字体大小: small(小), medium(中), large(大), extra_large(特大) */
|
||||||
|
@ApiModelProperty("字体大小: small(小), medium(中), large(大), extra_large(特大)")
|
||||||
|
@Excel(name = "字体大小")
|
||||||
|
private String fontSize;
|
||||||
|
|
||||||
|
/** 屏幕阅读器支持: 0-关闭, 1-开启 */
|
||||||
|
@ApiModelProperty("屏幕阅读器支持: 0-关闭, 1-开启")
|
||||||
|
@Excel(name = "屏幕阅读器支持")
|
||||||
|
private Integer screenReaderSupport;
|
||||||
|
|
||||||
|
/** 音频描述: 0-关闭, 1-开启 */
|
||||||
|
@ApiModelProperty("音频描述: 0-关闭, 1-开启")
|
||||||
|
@Excel(name = "音频描述")
|
||||||
|
private Integer audioDescriptions;
|
||||||
|
|
||||||
|
/** 增强键盘导航: 0-关闭, 1-开启 */
|
||||||
|
@ApiModelProperty("增强键盘导航: 0-关闭, 1-开启")
|
||||||
|
@Excel(name = "增强键盘导航")
|
||||||
|
private Integer enhancedKeyboardNavigation;
|
||||||
|
|
||||||
|
/** 焦点指示器: 0-关闭, 1-开启 */
|
||||||
|
@ApiModelProperty("焦点指示器: 0-关闭, 1-开启")
|
||||||
|
@Excel(name = "焦点指示器")
|
||||||
|
private Integer focusIndicators;
|
||||||
|
|
||||||
|
/** 语言设置: en(英语), zh(中文)等 */
|
||||||
|
@ApiModelProperty("语言设置: en(英语), zh(中文)等")
|
||||||
|
@Excel(name = "语言设置")
|
||||||
|
private String language;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.vetti.hotake.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.vetti.hotake.domain.HotakeAccessibility;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户无障碍设置Mapper接口
|
||||||
|
*
|
||||||
|
* @author vetti
|
||||||
|
* @date 2026-02-01
|
||||||
|
*/
|
||||||
|
public interface HotakeAccessibilityMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询用户无障碍设置
|
||||||
|
*
|
||||||
|
* @param id 用户无障碍设置主键
|
||||||
|
* @return 用户无障碍设置
|
||||||
|
*/
|
||||||
|
public HotakeAccessibility selectHotakeAccessibilityById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户无障碍设置列表
|
||||||
|
*
|
||||||
|
* @param hotakeAccessibility 用户无障碍设置
|
||||||
|
* @return 用户无障碍设置集合
|
||||||
|
*/
|
||||||
|
public List<HotakeAccessibility> selectHotakeAccessibilityList(HotakeAccessibility hotakeAccessibility);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户无障碍设置
|
||||||
|
*
|
||||||
|
* @param hotakeAccessibility 用户无障碍设置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertHotakeAccessibility(HotakeAccessibility hotakeAccessibility);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户无障碍设置
|
||||||
|
*
|
||||||
|
* @param hotakeAccessibility 用户无障碍设置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateHotakeAccessibility(HotakeAccessibility hotakeAccessibility);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户无障碍设置
|
||||||
|
*
|
||||||
|
* @param id 用户无障碍设置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteHotakeAccessibilityById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除用户无障碍设置
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteHotakeAccessibilityByIds(Integer[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.vetti.hotake.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.vetti.hotake.domain.HotakeAccessibility;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户无障碍设置Service接口
|
||||||
|
*
|
||||||
|
* @author vetti
|
||||||
|
* @date 2026-02-01
|
||||||
|
*/
|
||||||
|
public interface IHotakeAccessibilityService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询用户无障碍设置
|
||||||
|
*
|
||||||
|
* @param id 用户无障碍设置主键
|
||||||
|
* @return 用户无障碍设置
|
||||||
|
*/
|
||||||
|
public HotakeAccessibility selectHotakeAccessibilityById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户无障碍设置列表
|
||||||
|
*
|
||||||
|
* @param hotakeAccessibility 用户无障碍设置
|
||||||
|
* @return 用户无障碍设置集合
|
||||||
|
*/
|
||||||
|
public List<HotakeAccessibility> selectHotakeAccessibilityList(HotakeAccessibility hotakeAccessibility);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户无障碍设置
|
||||||
|
*
|
||||||
|
* @param hotakeAccessibility 用户无障碍设置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public HotakeAccessibility insertHotakeAccessibility(HotakeAccessibility hotakeAccessibility);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户无障碍设置
|
||||||
|
*
|
||||||
|
* @param hotakeAccessibility 用户无障碍设置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public HotakeAccessibility updateHotakeAccessibility(HotakeAccessibility hotakeAccessibility);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除用户无障碍设置
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的用户无障碍设置主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteHotakeAccessibilityByIds(Integer[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户无障碍设置信息
|
||||||
|
*
|
||||||
|
* @param id 用户无障碍设置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteHotakeAccessibilityById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前登录用户的无障碍设置
|
||||||
|
* 如果不存在则自动创建默认设置
|
||||||
|
*
|
||||||
|
* @param username 用户名
|
||||||
|
* @return 用户无障碍设置
|
||||||
|
*/
|
||||||
|
public HotakeAccessibility getCurrentUserAccessibility(String username);
|
||||||
|
}
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
package com.vetti.hotake.service.impl;
|
||||||
|
|
||||||
|
import com.vetti.common.core.service.BaseServiceImpl;
|
||||||
|
import com.vetti.common.enums.FillTypeEnum;
|
||||||
|
import com.vetti.hotake.domain.HotakeAccessibility;
|
||||||
|
import com.vetti.hotake.mapper.HotakeAccessibilityMapper;
|
||||||
|
import com.vetti.hotake.service.IHotakeAccessibilityService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户无障碍设置Service业务层处理
|
||||||
|
*
|
||||||
|
* @author vetti
|
||||||
|
* @date 2026-02-01
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class HotakeAccessibilityServiceImpl extends BaseServiceImpl implements IHotakeAccessibilityService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HotakeAccessibilityMapper hotakeAccessibilityMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户无障碍设置
|
||||||
|
*
|
||||||
|
* @param id 用户无障碍设置主键
|
||||||
|
* @return 用户无障碍设置
|
||||||
|
*/
|
||||||
|
@Transactional(readOnly = true)
|
||||||
|
@Override
|
||||||
|
public HotakeAccessibility selectHotakeAccessibilityById(Integer id) {
|
||||||
|
return hotakeAccessibilityMapper.selectHotakeAccessibilityById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户无障碍设置列表
|
||||||
|
*
|
||||||
|
* @param hotakeAccessibility 用户无障碍设置
|
||||||
|
* @return 用户无障碍设置
|
||||||
|
*/
|
||||||
|
@Transactional(readOnly = true)
|
||||||
|
@Override
|
||||||
|
public List<HotakeAccessibility> selectHotakeAccessibilityList(HotakeAccessibility hotakeAccessibility) {
|
||||||
|
return hotakeAccessibilityMapper.selectHotakeAccessibilityList(hotakeAccessibility);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户无障碍设置
|
||||||
|
*
|
||||||
|
* @param hotakeAccessibility 用户无障碍设置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public HotakeAccessibility insertHotakeAccessibility(HotakeAccessibility hotakeAccessibility) {
|
||||||
|
fill(FillTypeEnum.INSERT.getCode(), hotakeAccessibility);
|
||||||
|
hotakeAccessibilityMapper.insertHotakeAccessibility(hotakeAccessibility);
|
||||||
|
return hotakeAccessibility;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户无障碍设置
|
||||||
|
*
|
||||||
|
* @param hotakeAccessibility 用户无障碍设置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public HotakeAccessibility updateHotakeAccessibility(HotakeAccessibility hotakeAccessibility) {
|
||||||
|
fill(FillTypeEnum.UPDATE.getCode(), hotakeAccessibility);
|
||||||
|
hotakeAccessibilityMapper.updateHotakeAccessibility(hotakeAccessibility);
|
||||||
|
return hotakeAccessibility;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除用户无障碍设置
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的用户无障碍设置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public int deleteHotakeAccessibilityByIds(Integer[] ids) {
|
||||||
|
return hotakeAccessibilityMapper.deleteHotakeAccessibilityByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户无障碍设置信息
|
||||||
|
*
|
||||||
|
* @param id 用户无障碍设置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public int deleteHotakeAccessibilityById(Integer id) {
|
||||||
|
return hotakeAccessibilityMapper.deleteHotakeAccessibilityById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前登录用户的无障碍设置
|
||||||
|
* 如果不存在则自动创建默认设置
|
||||||
|
*
|
||||||
|
* @param username 用户名
|
||||||
|
* @return 用户无障碍设置
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public HotakeAccessibility getCurrentUserAccessibility(String username) {
|
||||||
|
// 查询当前用户的设置
|
||||||
|
HotakeAccessibility query = new HotakeAccessibility();
|
||||||
|
query.setCreateBy(username);
|
||||||
|
List<HotakeAccessibility> list = hotakeAccessibilityMapper.selectHotakeAccessibilityList(query);
|
||||||
|
|
||||||
|
// 如果存在,返回第一条
|
||||||
|
if (list != null && !list.isEmpty()) {
|
||||||
|
return list.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果不存在,创建默认设置
|
||||||
|
HotakeAccessibility defaultAccessibility = new HotakeAccessibility();
|
||||||
|
// 设置默认值(根据数据库表定义)
|
||||||
|
defaultAccessibility.setColorMode("light"); // 默认明亮模式
|
||||||
|
defaultAccessibility.setHighContrastMode(0); // 默认关闭
|
||||||
|
defaultAccessibility.setReduceMotion(0); // 默认关闭
|
||||||
|
defaultAccessibility.setFontSize("medium"); // 默认中等字体
|
||||||
|
defaultAccessibility.setScreenReaderSupport(1); // 默认开启
|
||||||
|
defaultAccessibility.setAudioDescriptions(1); // 默认开启
|
||||||
|
defaultAccessibility.setEnhancedKeyboardNavigation(0); // 默认关闭
|
||||||
|
defaultAccessibility.setFocusIndicators(0); // 默认关闭
|
||||||
|
defaultAccessibility.setLanguage("en"); // 默认英语
|
||||||
|
|
||||||
|
// 保存并返回
|
||||||
|
return insertHotakeAccessibility(defaultAccessibility);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
<?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.vetti.hotake.mapper.HotakeAccessibilityMapper">
|
||||||
|
|
||||||
|
<resultMap type="HotakeAccessibility" id="HotakeAccessibilityResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="colorMode" column="color_mode" />
|
||||||
|
<result property="highContrastMode" column="high_contrast_mode" />
|
||||||
|
<result property="reduceMotion" column="reduce_motion" />
|
||||||
|
<result property="fontSize" column="font_size" />
|
||||||
|
<result property="screenReaderSupport" column="screen_reader_support" />
|
||||||
|
<result property="audioDescriptions" column="audio_descriptions" />
|
||||||
|
<result property="enhancedKeyboardNavigation" column="enhanced_keyboard_navigation" />
|
||||||
|
<result property="focusIndicators" column="focus_indicators" />
|
||||||
|
<result property="language" column="language" />
|
||||||
|
<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="selectHotakeAccessibilityVo">
|
||||||
|
select id, color_mode, high_contrast_mode, reduce_motion, font_size,
|
||||||
|
screen_reader_support, audio_descriptions, enhanced_keyboard_navigation,
|
||||||
|
focus_indicators, language,
|
||||||
|
del_flag, create_by, create_time, update_by, update_time, remark
|
||||||
|
from hotake_accessibility
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectHotakeAccessibilityList" parameterType="HotakeAccessibility" resultMap="HotakeAccessibilityResult">
|
||||||
|
<include refid="selectHotakeAccessibilityVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="colorMode != null and colorMode != ''"> and color_mode = #{colorMode}</if>
|
||||||
|
<if test="highContrastMode != null"> and high_contrast_mode = #{highContrastMode}</if>
|
||||||
|
<if test="reduceMotion != null"> and reduce_motion = #{reduceMotion}</if>
|
||||||
|
<if test="fontSize != null and fontSize != ''"> and font_size = #{fontSize}</if>
|
||||||
|
<if test="screenReaderSupport != null"> and screen_reader_support = #{screenReaderSupport}</if>
|
||||||
|
<if test="audioDescriptions != null"> and audio_descriptions = #{audioDescriptions}</if>
|
||||||
|
<if test="enhancedKeyboardNavigation != null"> and enhanced_keyboard_navigation = #{enhancedKeyboardNavigation}</if>
|
||||||
|
<if test="focusIndicators != null"> and focus_indicators = #{focusIndicators}</if>
|
||||||
|
<if test="language != null and language != ''"> and language = #{language}</if>
|
||||||
|
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
|
||||||
|
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectHotakeAccessibilityById" parameterType="Integer" resultMap="HotakeAccessibilityResult">
|
||||||
|
<include refid="selectHotakeAccessibilityVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertHotakeAccessibility" parameterType="HotakeAccessibility" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into hotake_accessibility
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="colorMode != null and colorMode != ''">color_mode,</if>
|
||||||
|
<if test="highContrastMode != null">high_contrast_mode,</if>
|
||||||
|
<if test="reduceMotion != null">reduce_motion,</if>
|
||||||
|
<if test="fontSize != null and fontSize != ''">font_size,</if>
|
||||||
|
<if test="screenReaderSupport != null">screen_reader_support,</if>
|
||||||
|
<if test="audioDescriptions != null">audio_descriptions,</if>
|
||||||
|
<if test="enhancedKeyboardNavigation != null">enhanced_keyboard_navigation,</if>
|
||||||
|
<if test="focusIndicators != null">focus_indicators,</if>
|
||||||
|
<if test="language != null and language != ''">language,</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="colorMode != null and colorMode != ''">#{colorMode},</if>
|
||||||
|
<if test="highContrastMode != null">#{highContrastMode},</if>
|
||||||
|
<if test="reduceMotion != null">#{reduceMotion},</if>
|
||||||
|
<if test="fontSize != null and fontSize != ''">#{fontSize},</if>
|
||||||
|
<if test="screenReaderSupport != null">#{screenReaderSupport},</if>
|
||||||
|
<if test="audioDescriptions != null">#{audioDescriptions},</if>
|
||||||
|
<if test="enhancedKeyboardNavigation != null">#{enhancedKeyboardNavigation},</if>
|
||||||
|
<if test="focusIndicators != null">#{focusIndicators},</if>
|
||||||
|
<if test="language != null and language != ''">#{language},</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="updateHotakeAccessibility" parameterType="HotakeAccessibility">
|
||||||
|
update hotake_accessibility
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="colorMode != null and colorMode != ''">color_mode = #{colorMode},</if>
|
||||||
|
<if test="highContrastMode != null">high_contrast_mode = #{highContrastMode},</if>
|
||||||
|
<if test="reduceMotion != null">reduce_motion = #{reduceMotion},</if>
|
||||||
|
<if test="fontSize != null and fontSize != ''">font_size = #{fontSize},</if>
|
||||||
|
<if test="screenReaderSupport != null">screen_reader_support = #{screenReaderSupport},</if>
|
||||||
|
<if test="audioDescriptions != null">audio_descriptions = #{audioDescriptions},</if>
|
||||||
|
<if test="enhancedKeyboardNavigation != null">enhanced_keyboard_navigation = #{enhancedKeyboardNavigation},</if>
|
||||||
|
<if test="focusIndicators != null">focus_indicators = #{focusIndicators},</if>
|
||||||
|
<if test="language != null and language != ''">language = #{language},</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>
|
||||||
|
|
||||||
|
<delete id="deleteHotakeAccessibilityById" parameterType="Integer">
|
||||||
|
delete from hotake_accessibility where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteHotakeAccessibilityByIds" parameterType="String">
|
||||||
|
delete from hotake_accessibility where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user