Compare commits
No commits in common. "7b7154f5321f4fa1990f90fb2b67bb797eaa39e5" and "50e667f95b5e31d6f050ba9614d72ac32a16a31c" have entirely different histories.
7b7154f532
...
50e667f95b
|
@ -1,4 +1,4 @@
|
||||||
package com.mcwl.web.controller.system;
|
package com.mcwl.web.controller.email;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
@ -19,15 +19,16 @@ import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 邮箱
|
* 邮箱
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("sys/email")
|
@RequestMapping("email")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Api(tags = "邮箱")
|
@Api(tags = "邮箱")
|
||||||
public class SysEmailController {
|
public class EmailController {
|
||||||
|
|
||||||
private final ISysEmailService sysEmailService;
|
private final ISysEmailService sysEmailService;
|
||||||
|
|
|
@ -1,91 +0,0 @@
|
||||||
package com.mcwl.web.controller.system;
|
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.mcwl.common.constant.HttpStatus;
|
|
||||||
import com.mcwl.common.core.domain.R;
|
|
||||||
import com.mcwl.system.domain.SysEmail;
|
|
||||||
import com.mcwl.system.domain.SysTool;
|
|
||||||
import com.mcwl.system.domain.dto.AddEmailRes;
|
|
||||||
import com.mcwl.system.domain.dto.AddToolRes;
|
|
||||||
import com.mcwl.system.domain.dto.EditEmailRes;
|
|
||||||
import com.mcwl.system.domain.dto.EditToolRes;
|
|
||||||
import com.mcwl.system.domain.vo.EmailVo;
|
|
||||||
import com.mcwl.system.domain.vo.ToolVo;
|
|
||||||
import com.mcwl.system.service.ISysEmailService;
|
|
||||||
import com.mcwl.system.service.ISysToolService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/***
|
|
||||||
* 工具
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("sys/tool")
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Api(tags = "工具")
|
|
||||||
public class SysToolController {
|
|
||||||
|
|
||||||
private final ISysToolService sysToolService;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询工具列表
|
|
||||||
*/
|
|
||||||
@GetMapping("listTool")
|
|
||||||
@ApiOperation(value = "查询工具列表")
|
|
||||||
public R<List<ToolVo>> listTool() {
|
|
||||||
List<SysTool> sysToolList = sysToolService.list(new LambdaQueryWrapper<SysTool>()
|
|
||||||
.orderByDesc(SysTool::getStatus)
|
|
||||||
.orderByDesc(SysTool::getCreateTime));
|
|
||||||
|
|
||||||
return R.ok(BeanUtil.copyToList(sysToolList, ToolVo.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按id查询工具
|
|
||||||
*/
|
|
||||||
@GetMapping("getTool")
|
|
||||||
@ApiOperation(value = "按id查询工具")
|
|
||||||
public R<ToolVo> getTool(@Valid @NotNull(message = "工具id不能为空") Long toolId) {
|
|
||||||
SysTool sysTool = sysToolService.getById(toolId);
|
|
||||||
return R.ok(BeanUtil.toBean(sysTool, ToolVo.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("addTool")
|
|
||||||
@ApiOperation(value = "添加工具")
|
|
||||||
public R<String> addTool(@Valid @RequestBody AddToolRes addToolRes) {
|
|
||||||
|
|
||||||
SysTool sysTool = BeanUtil.toBean(addToolRes, SysTool.class);
|
|
||||||
return sysToolService.save(sysTool) ? R.ok(null,"添加成功") : R.fail(null,"添加失败");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑工具
|
|
||||||
*/
|
|
||||||
@PostMapping("editTool")
|
|
||||||
@ApiOperation(value = "编辑工具")
|
|
||||||
public R<String> editTool(@Valid @RequestBody EditToolRes editToolRes) {
|
|
||||||
SysTool sysTool = BeanUtil.toBean(editToolRes, SysTool.class);
|
|
||||||
return sysToolService.updateById(sysTool) ? R.ok(null,"编辑成功") : R.fail(null,"编辑失败");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除工具
|
|
||||||
*/
|
|
||||||
@GetMapping("delTool")
|
|
||||||
@ApiOperation(value = "删除工具")
|
|
||||||
public R<String> delTool(@Valid @NotNull(message = "工具id不能为空") Long toolId) {
|
|
||||||
return sysToolService.removeById(toolId) ? R.ok(null,"删除成功") : R.fail(null,"删除失败");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -631,16 +631,6 @@ public class AliPayServiceImpl implements AliPayService {
|
||||||
|
|
||||||
AlipayConfig config = new AlipayConfig();
|
AlipayConfig config = new AlipayConfig();
|
||||||
|
|
||||||
|
|
||||||
//设置连接池中的最大可缓存的空闲连接数
|
|
||||||
config.setMaxIdleConnections(5);
|
|
||||||
//连接超时,单位:毫秒,默认3000
|
|
||||||
config.setConnectTimeout(3000);
|
|
||||||
//读取超时,单位:毫秒,默认15000
|
|
||||||
config.setReadTimeout(15000);
|
|
||||||
//空闲连接存活时间,单位:毫秒,默认10000L
|
|
||||||
config.setKeepAliveDuration(10000L);
|
|
||||||
|
|
||||||
// 设置网关地址
|
// 设置网关地址
|
||||||
config.setServerUrl(aliConfig.getGatewayUrl());
|
config.setServerUrl(aliConfig.getGatewayUrl());
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,6 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.mcwl.common.core.domain.BaseEntity;
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
/**
|
|
||||||
* 邮箱
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@TableName("sys_email")
|
@TableName("sys_email")
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
package com.mcwl.system.domain;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.mcwl.common.core.domain.BaseEntity;
|
|
||||||
import lombok.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工具
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@TableName("sys_tool")
|
|
||||||
@Builder
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class SysTool extends BaseEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 邮箱id
|
|
||||||
*/
|
|
||||||
@TableId
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 图片url
|
|
||||||
*/
|
|
||||||
private String imageUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 状态 0不可用 1可用
|
|
||||||
*/
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
package com.mcwl.system.domain.dto;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.Pattern;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Builder
|
|
||||||
@ApiModel(value = "新增工具请求对象")
|
|
||||||
public class AddToolRes {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 图片url
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "图片url", required = true)
|
|
||||||
@NotBlank(message = "图片url不能为空")
|
|
||||||
private String imageUrl;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
package com.mcwl.system.domain.dto;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Builder
|
|
||||||
@ApiModel(value = "编辑工具请求对象")
|
|
||||||
public class EditToolRes {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工具id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "工具id", required = true)
|
|
||||||
@NotNull(message = "工具id不能为空")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 图片url
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "图片url", required = true)
|
|
||||||
@NotBlank(message = "图片url不能为空")
|
|
||||||
private String imageUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 状态
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "状态", required = true)
|
|
||||||
@NotNull(message = "状态不能为空")
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,46 +0,0 @@
|
||||||
package com.mcwl.system.domain.vo;
|
|
||||||
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.*;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工具返回对象
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@ApiModel(value = "工具返回对象")
|
|
||||||
public class ToolVo {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工具id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "工具id")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 图片url
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "图片url")
|
|
||||||
private String imageUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 状态 0不可用 1可用
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "状态 0不可用 1可用")
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
||||||
@ApiModelProperty(value = "创建时间")
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
}
|
|
|
@ -6,7 +6,7 @@ import com.mcwl.system.domain.SysUserPayAccountLog;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邮箱
|
* 用户提现
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface SysEmailMapper extends BaseMapper<SysEmail> {
|
public interface SysEmailMapper extends BaseMapper<SysEmail> {
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.mcwl.system.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.mcwl.system.domain.SysEmail;
|
|
||||||
import com.mcwl.system.domain.SysTool;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工具
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SysToolMapper extends BaseMapper<SysTool> {
|
|
||||||
|
|
||||||
}
|
|
|
@ -7,7 +7,7 @@ import com.mcwl.system.domain.SysUserPayAccountLog;
|
||||||
import com.mcwl.system.domain.dto.WithdrawalPageRes;
|
import com.mcwl.system.domain.dto.WithdrawalPageRes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邮箱 服务层
|
* 用户提现 服务层
|
||||||
*
|
*
|
||||||
* @author mcwl
|
* @author mcwl
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.mcwl.system.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.mcwl.system.domain.SysEmail;
|
|
||||||
import com.mcwl.system.domain.SysTool;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工具 服务层
|
|
||||||
*
|
|
||||||
* @author mcwl
|
|
||||||
*/
|
|
||||||
public interface ISysToolService extends IService<SysTool> {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -18,7 +18,7 @@ import org.springframework.stereotype.Service;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邮箱
|
* 用户提现
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SysEmailServiceImpl extends ServiceImpl<SysEmailMapper, SysEmail> implements ISysEmailService {
|
public class SysEmailServiceImpl extends ServiceImpl<SysEmailMapper, SysEmail> implements ISysEmailService {
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
package com.mcwl.system.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.mcwl.system.domain.SysEmail;
|
|
||||||
import com.mcwl.system.domain.SysTool;
|
|
||||||
import com.mcwl.system.mapper.SysEmailMapper;
|
|
||||||
import com.mcwl.system.mapper.SysToolMapper;
|
|
||||||
import com.mcwl.system.service.ISysEmailService;
|
|
||||||
import com.mcwl.system.service.ISysToolService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工具
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class SysToolServiceImpl extends ServiceImpl<SysToolMapper, SysTool> implements ISysToolService {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue