xuhy
2024-02-29 7c9ec6e5b5ad5e744ddb65f876c4db4c4ae90501
系统配置
6个文件已添加
4个文件已修改
256 ■■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TConfigController.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCustomerServiceController.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/domain/TConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/domain/TCustomerService.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TCustomerServiceMapper.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/TCustomerServiceService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TCustomerServiceServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TCustomerServiceMapper.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TConfigController.java
@@ -1,8 +1,17 @@
package com.ruoyi.web.controller.api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.TConfig;
import com.ruoyi.system.domain.TCustomerService;
import com.ruoyi.system.service.TConfigService;
import com.ruoyi.system.service.TCustomerServiceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * <p>
@@ -12,9 +21,37 @@
 * @author xiaochen
 * @since 2024-02-29
 */
@Api(tags = "基础配置")
@RestController
@RequestMapping("/tConfig")
public class TConfigController {
    private final TConfigService configService;
    @Autowired
    public TConfigController(TConfigService configService) {
        this.configService = configService;
    }
    /**
     * 通过id查询协议内容
     */
    @ApiOperation(value = "通过id查询协议内容",notes = "1=创业合伙人配置 2=会员说明 3=剧本出售说明 4=短剧出售说明 5=用户协议 6=隐私协议 7=注销协议")
    @GetMapping("/getConfigById")
    public AjaxResult<TConfig> getConfigById(@RequestParam Long id)
    {
        return AjaxResult.success(configService.getById(id));
    }
    /**
     * 修改协议内容
     */
    @ApiOperation(value = "修改协议内容",notes = "修改协议内容")
    @PostMapping("/updateConfigById")
    public AjaxResult<TConfig> updateConfigById(@RequestBody TConfig config)
    {
        return AjaxResult.success(configService.updateById(config));
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCustomerServiceController.java
New file
@@ -0,0 +1,67 @@
package com.ruoyi.web.controller.api;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.TAdvertisementConfig;
import com.ruoyi.system.domain.TCustomerService;
import com.ruoyi.system.service.TConfigService;
import com.ruoyi.system.service.TCustomerServiceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * <p>
 * 客服配置表 前端控制器
 * </p>
 *
 * @author xiaochen
 * @since 2024-02-29
 */
@Api(tags = "客服配置")
@RestController
@RequestMapping("/tCustomerService")
public class TCustomerServiceController {
    private final TCustomerServiceService customerServiceService;
    @Autowired
    public TCustomerServiceController(TCustomerServiceService customerServiceService) {
        this.customerServiceService = customerServiceService;
    }
    /**
     * 查询客服配置
     */
    @ApiOperation(value = "查询客服配置")
    @GetMapping("/getCustomerServiceList")
    public AjaxResult<List<TCustomerService>> getCustomerServiceList()
    {
        return AjaxResult.success(customerServiceService.list());
    }
    /**
     * 添加客服配置
     */
    @ApiOperation(value = "添加客服配置")
    @PostMapping("/addCustomerService")
    public AjaxResult addCustomerService(@RequestBody TCustomerService customerService)
    {
        return AjaxResult.success(customerServiceService.save(customerService));
    }
    /**
     * 删除客服配置
     */
    @ApiOperation(value = "删除客服配置")
    @DeleteMapping("/deleteCustomerService")
    public AjaxResult deleteCustomerService(@RequestParam Long serviceId)
    {
        return AjaxResult.success(customerServiceService.removeById(serviceId));
    }
}
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
@@ -1,5 +1,6 @@
package com.ruoyi.common.core.domain.entity;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.*;
@@ -118,10 +119,21 @@
    private Integer ifBlack;
    /**
     * 区县id
     * 会员类型 1=个人会员 2=企业会员 3=普通用户
     */
    @ApiModelProperty(value = "区县id")
    private Integer districtId;
    @ApiModelProperty(value = "会员类型 1=个人会员 2=企业会员 3=普通用户")
    private Integer vipType;
    @ApiModelProperty(value = "注册时间")
    private Date insertTime;
    @ApiModelProperty(value = "首次成为会员时间")
    private Integer firstVipTime;
    @ApiModelProperty(value = "会员开始时间")
    private Integer startTime;
    @ApiModelProperty(value = "会员到期时间")
    private Integer endTime;
    @ApiModelProperty(value = "已消费金额")
    private BigDecimal consumptionAmount;
    @TableField(exist = false)
    private String roleName;
@@ -134,14 +146,6 @@
    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }
    public Integer getDistrictId() {
        return districtId;
    }
    public void setDistrictId(Integer districtId) {
        this.districtId = districtId;
    }
    public SysUser()
ruoyi-system/src/main/java/com/ruoyi/system/domain/TConfig.java
@@ -30,7 +30,7 @@
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "内容 1=创业合伙人配置 2=会员说明 3=剧本出售说明 4=短剧出售说明")
    @ApiModelProperty(value = "内容 1=创业合伙人配置 2=会员说明 3=剧本出售说明 4=短剧出售说明 5=用户协议 6=隐私协议 7=注销协议")
    @TableField("content")
    private String content;
ruoyi-system/src/main/java/com/ruoyi/system/domain/TCustomerService.java
New file
@@ -0,0 +1,38 @@
package com.ruoyi.system.domain;
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 com.ruoyi.common.core.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
 * <p>
 * t_customer_service表
 * </p>
 *
 * @author xiaochen
 * @since 2024-02-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_customer_service")
@ApiModel(value="tCustomerService对象", description="t_customer_service表")
public class TCustomerService implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "客服电话")
    @TableField("servicePhone")
    private String servicePhone;
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TCustomerServiceMapper.java
New file
@@ -0,0 +1,19 @@
package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.TBanner;
import com.ruoyi.system.domain.TCustomerService;
import org.apache.ibatis.annotations.Mapper;
/**
 * <p>
 * TCustomerService表 Mapper 接口
 * </p>
 *
 * @author xiaochen
 * @since 2024-02-29
 */
@Mapper
public interface TCustomerServiceMapper extends BaseMapper<TCustomerService> {
}
ruoyi-system/src/main/java/com/ruoyi/system/service/TCustomerServiceService.java
New file
@@ -0,0 +1,17 @@
package com.ruoyi.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.domain.TConfig;
import com.ruoyi.system.domain.TCustomerService;
/**
 * <p>
 * 客服配置表 服务类
 * </p>
 *
 * @author xiaochen
 * @since 2024-02-29
 */
public interface TCustomerServiceService extends IService<TCustomerService> {
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TCustomerServiceServiceImpl.java
New file
@@ -0,0 +1,23 @@
package com.ruoyi.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.TConfig;
import com.ruoyi.system.domain.TCustomerService;
import com.ruoyi.system.mapper.TConfigMapper;
import com.ruoyi.system.mapper.TCustomerServiceMapper;
import com.ruoyi.system.service.TConfigService;
import com.ruoyi.system.service.TCustomerServiceService;
import org.springframework.stereotype.Service;
/**
 * <p>
 * 客服配置表 服务实现类
 * </p>
 *
 * @author xiaochen
 * @since 2024-02-29
 */
@Service
public class TCustomerServiceServiceImpl extends ServiceImpl<TCustomerServiceMapper, TCustomerService> implements TCustomerServiceService {
}
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -24,7 +24,12 @@
        <result property="updateTime"   column="update_time"  />
        <result property="remark"       column="remark"       />
        <result property="ifBlack"       column="ifBlack"       />
        <result property="districtId"       column="districtId"       />
        <result property="vipType"       column="vipType"       />
        <result property="insertTime"       column="insertTime"       />
        <result property="firstVipTime"       column="firstVipTime"       />
        <result property="startTime"       column="startTime"       />
        <result property="endTime"       column="endTime"       />
        <result property="consumptionAmount"       column="consumptionAmount"       />
        <association property="dept"    javaType="SysDept"         resultMap="deptResult" />
        <collection  property="roles"   javaType="java.util.List"  resultMap="RoleResult" />
    </resultMap>
ruoyi-system/src/main/resources/mapper/system/TCustomerServiceMapper.xml
New file
@@ -0,0 +1,16 @@
<?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.ruoyi.system.mapper.TCustomerServiceMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.TCustomerService">
        <id column="id" property="id" />
        <result column="servicePhone" property="servicePhone" />
    </resultMap>
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, servicePhone
    </sql>
</mapper>