feat(custom-service): 新增客服信息查询接口及实体
This commit is contained in:
@@ -4,12 +4,14 @@ import com.yupi.springbootinit.common.BaseResponse;
|
||||
import com.yupi.springbootinit.common.ResultUtils;
|
||||
import com.yupi.springbootinit.model.entity.AiComment;
|
||||
import com.yupi.springbootinit.model.entity.AiTemplate;
|
||||
import com.yupi.springbootinit.model.entity.ServerCustomServiceInfo;
|
||||
import com.yupi.springbootinit.model.vo.common.AccountCrawlCount;
|
||||
import com.yupi.springbootinit.model.vo.country.CountryInfoVO;
|
||||
import com.yupi.springbootinit.service.AiCommentService;
|
||||
import com.yupi.springbootinit.service.AiTemplateService;
|
||||
import com.yupi.springbootinit.service.CommonService;
|
||||
import com.yupi.springbootinit.service.CountryInfoService;
|
||||
import com.yupi.springbootinit.service.ServerCustomServiceInfoService;
|
||||
import com.yupi.springbootinit.service.SystemNoticeService;
|
||||
import com.yupi.springbootinit.model.entity.SystemNotice;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -44,6 +46,9 @@ public class CommonController {
|
||||
@Resource
|
||||
private SystemNoticeService systemNoticeService;
|
||||
|
||||
@Resource
|
||||
private ServerCustomServiceInfoService serverCustomServiceInfoService;
|
||||
|
||||
@PostMapping("country_info")
|
||||
public BaseResponse<List<CountryInfoVO>> countryInfo() {
|
||||
|
||||
@@ -85,5 +90,11 @@ public class CommonController {
|
||||
return ResultUtils.success(systemNoticeService.getActiveNoticeList());
|
||||
}
|
||||
|
||||
@GetMapping("custom_service_info")
|
||||
public BaseResponse<List<ServerCustomServiceInfo>> listCustomServiceInfo() {
|
||||
return ResultUtils.success(serverCustomServiceInfoService.listNotDeleted());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.yupi.springbootinit.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yupi.springbootinit.model.entity.ServerCustomServiceInfo;
|
||||
|
||||
/*
|
||||
* @author: ziin
|
||||
* @date: 2026/3/3 21:32
|
||||
*/
|
||||
|
||||
public interface ServerCustomServiceInfoMapper extends BaseMapper<ServerCustomServiceInfo> {
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.yupi.springbootinit.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/*
|
||||
* @author: ziin
|
||||
* @date: 2026/3/3 21:32
|
||||
*/
|
||||
|
||||
/**
|
||||
* 客服信息表
|
||||
*/
|
||||
@ApiModel(description="客服信息表")
|
||||
@Data
|
||||
@TableName(value = "server_custom_service_info")
|
||||
public class ServerCustomServiceInfo {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value="主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@TableField(value = "`name`")
|
||||
@ApiModelProperty(value="姓名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@TableField(value = "avater")
|
||||
@ApiModelProperty(value="头像")
|
||||
private String avater;
|
||||
|
||||
/**
|
||||
* 简介
|
||||
*/
|
||||
@TableField(value = "description")
|
||||
@ApiModelProperty(value="简介")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 微信
|
||||
*/
|
||||
@TableField(value = "`concat`")
|
||||
@ApiModelProperty(value="微信")
|
||||
private String concat;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@TableField(value = "phone")
|
||||
@ApiModelProperty(value="手机号")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "creator")
|
||||
@ApiModelProperty(value="创建人")
|
||||
private String creator;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@ApiModelProperty(value="创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(value = "updater")
|
||||
@ApiModelProperty(value="更新人")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
@ApiModelProperty(value="更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@TableField(value = "deleted")
|
||||
@ApiModelProperty(value="是否删除")
|
||||
private Boolean deleted;
|
||||
|
||||
/**
|
||||
* 租户Id
|
||||
*/
|
||||
@TableField(value = "tenant_id")
|
||||
@ApiModelProperty(value="租户Id")
|
||||
private Long tenantId;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.yupi.springbootinit.service;
|
||||
|
||||
import com.yupi.springbootinit.model.entity.ServerCustomServiceInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
/*
|
||||
* @author: ziin
|
||||
* @date: 2026/3/3 21:32
|
||||
*/
|
||||
|
||||
public interface ServerCustomServiceInfoService extends IService<ServerCustomServiceInfo>{
|
||||
|
||||
/**
|
||||
* 查询所有未删除的客服信息
|
||||
*
|
||||
* @return 未删除的客服信息列表
|
||||
*/
|
||||
List<ServerCustomServiceInfo> listNotDeleted();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yupi.springbootinit.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yupi.springbootinit.model.entity.ServerCustomServiceInfo;
|
||||
import com.yupi.springbootinit.mapper.ServerCustomServiceInfoMapper;
|
||||
import com.yupi.springbootinit.service.ServerCustomServiceInfoService;
|
||||
|
||||
import java.util.List;
|
||||
/*
|
||||
* @author: ziin
|
||||
* @date: 2026/3/3 21:32
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class ServerCustomServiceInfoServiceImpl extends ServiceImpl<ServerCustomServiceInfoMapper, ServerCustomServiceInfo> implements ServerCustomServiceInfoService{
|
||||
|
||||
@Override
|
||||
public List<ServerCustomServiceInfo> listNotDeleted() {
|
||||
QueryWrapper<ServerCustomServiceInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("deleted", false);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
25
src/main/resources/mapper/ServerCustomServiceInfoMapper.xml
Normal file
25
src/main/resources/mapper/ServerCustomServiceInfoMapper.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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.yupi.springbootinit.mapper.ServerCustomServiceInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.yupi.springbootinit.model.entity.ServerCustomServiceInfo">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table server_custom_service_info-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="avater" jdbcType="VARCHAR" property="avater" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="concat" jdbcType="VARCHAR" property="concat" />
|
||||
<result column="phone" jdbcType="VARCHAR" property="phone" />
|
||||
<result column="creator" jdbcType="VARCHAR" property="creator" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="updater" jdbcType="BIGINT" property="updater" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, `name`, avater, description, `concat`, phone, creator, create_time, updater,
|
||||
update_time, deleted, tenant_id
|
||||
</sql>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user