整理swagger接口说明
This commit is contained in:
@@ -69,7 +69,9 @@ public class MybatisPlusConfig {
|
||||
"sys_plug",
|
||||
"sys_version",
|
||||
"sys_order",
|
||||
"sys_white_domain"
|
||||
"sys_white_domain",
|
||||
"sys_modules",
|
||||
"sys_environment"
|
||||
).contains(tableName);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -60,7 +60,8 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
||||
final SignCheckUtil checkUtil = new SignCheckUtil();
|
||||
String key = "WhiteDomain:" + jwtSubject.getTenantId();
|
||||
List<String> whiteDomains = redisUtil.get(key, List.class);
|
||||
if (!checkUtil.checkWhiteDomains(whiteDomains, request.getServerName())) {
|
||||
System.out.println("request.getServerName() = " + request.getServerName());
|
||||
if (!checkUtil.checkWhiteDomains(whiteDomains, request.getServerName()) && !"localhost".equals(request.getServerName())) {
|
||||
throw new UsernameNotFoundException("The requested domain name is not on the whitelist");
|
||||
}
|
||||
|
||||
|
||||
@@ -73,10 +73,10 @@ public class SocketIOConfig implements InitializingBean {
|
||||
config.setKeyStorePassword("123456"); // 设置证书密码
|
||||
|
||||
// 启动socket服务
|
||||
SocketIOServer server = new SocketIOServer(config);
|
||||
server.addListeners(socketIOHandler);
|
||||
server.start();
|
||||
ClientCache.setSocketIOServer(server);
|
||||
logger.debug("Netty SocketIO启动:{}:{}",host,port);
|
||||
// SocketIOServer server = new SocketIOServer(config);
|
||||
// server.addListeners(socketIOHandler);
|
||||
// server.start();
|
||||
// ClientCache.setSocketIOServer(server);
|
||||
// logger.debug("Netty SocketIO启动:{}:{}",host,port);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-05-16 19:19:55
|
||||
*/
|
||||
@Api(tags = "访问凭证管理管理")
|
||||
@Api(tags = "安全访问凭证")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/access-key")
|
||||
public class AccessKeyController extends BaseController {
|
||||
@@ -33,7 +33,7 @@ public class AccessKeyController extends BaseController {
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:accessKey:list')")
|
||||
@OperationLog
|
||||
@ApiOperation("分页查询访问凭证管理")
|
||||
@ApiOperation("分页查询访问凭证")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<AccessKey>> page(AccessKeyParam param) {
|
||||
// 使用关联查询
|
||||
|
||||
@@ -49,7 +49,7 @@ import java.util.Map;
|
||||
* @author WebSoft
|
||||
* @since 2022-11-19 13:54:27
|
||||
*/
|
||||
@Api(tags = "阿里云OSS云存储")
|
||||
@Api(tags = "阿里云OSS")
|
||||
@RestController
|
||||
@RequestMapping("/api/oss")
|
||||
public class AliOssController extends BaseController {
|
||||
@@ -234,7 +234,7 @@ public class AliOssController extends BaseController {
|
||||
* 获取前端表单提交的参数
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("")
|
||||
@ApiOperation("获取前端表单提交的参数")
|
||||
@GetMapping("/getPostForm")
|
||||
public ApiResult<?> getPostForm(){
|
||||
String endpoint = config.getEndpoint();
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-30 22:20:23
|
||||
*/
|
||||
@Api(tags = "应用管理记录表管理")
|
||||
@Api(tags = "应用")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/app")
|
||||
public class AppController extends BaseController {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-11-14 14:14:07
|
||||
*/
|
||||
@Api(tags = "续费管理管理")
|
||||
@Api(tags = "应用续费")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/app-renew")
|
||||
public class AppRenewController extends BaseController {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-30 22:20:23
|
||||
*/
|
||||
@Api(tags = "域名管理记录表管理")
|
||||
@Api(tags = "应用域名")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/app-url")
|
||||
public class AppUrlController extends BaseController {
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-30 22:20:23
|
||||
*/
|
||||
@Api(tags = "应用成员管理")
|
||||
@Api(tags = "应用成员")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/app-user")
|
||||
public class AppUserController extends BaseController {
|
||||
|
||||
@@ -28,14 +28,10 @@ import java.util.concurrent.TimeUnit;
|
||||
* @author WebSoft
|
||||
* @since 2022-11-19 13:54:27
|
||||
*/
|
||||
@Api(tags = "缓存管理")
|
||||
@Api(tags = "Redis缓存")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/cache")
|
||||
public class CacheController extends BaseController {
|
||||
@Resource
|
||||
private SettingService settingService;
|
||||
@Resource
|
||||
private CacheClient cacheClient;
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
@Resource
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-27 15:57:27
|
||||
*/
|
||||
@Api(tags = "聊天消息表管理")
|
||||
@Api(tags = "聊天")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/chat-conversation")
|
||||
public class ChatConversationController extends BaseController {
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-27 15:57:27
|
||||
*/
|
||||
@Api(tags = "聊天消息表管理")
|
||||
@Api(tags = "聊天")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/chat-message")
|
||||
public class ChatMessageController extends BaseController {
|
||||
|
||||
@@ -38,7 +38,7 @@ import java.util.stream.Collectors;
|
||||
* @author 科技小王子
|
||||
* @since 2023-05-27 14:57:34
|
||||
*/
|
||||
@Api(tags = "企业信息管理")
|
||||
@Api(tags = "企业")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/company")
|
||||
public class CompanyController extends BaseController {
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.stream.Collectors;
|
||||
* @author WebSoft
|
||||
* @since 2020-03-14 11:29:03
|
||||
*/
|
||||
@Api(tags = "字典管理(业务类)")
|
||||
@Api(tags = "字典")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/dict")
|
||||
public class DictController extends BaseController {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
* @author WebSoft
|
||||
* @since 2020-03-14 11:29:04
|
||||
*/
|
||||
@Api(tags = "字典数据管理(业务类)")
|
||||
@Api(tags = "字典")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/dict-data")
|
||||
public class DictDataController extends BaseController {
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.stream.Collectors;
|
||||
* @author WebSoft
|
||||
* @since 2020-03-14 11:29:03
|
||||
*/
|
||||
@Api(tags = "字典管理(系统类)")
|
||||
@Api(tags = "字典(公共字典)")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/dictionary")
|
||||
public class DictionaryController extends BaseController {
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
* @author WebSoft
|
||||
* @since 2020-03-14 11:29:04
|
||||
*/
|
||||
@Api(tags = "字典数据管理(系统类)")
|
||||
@Api(tags = "字典(公共字典)")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/dictionary-data")
|
||||
public class DictionaryDataController extends BaseController {
|
||||
|
||||
@@ -17,12 +17,12 @@ import javax.annotation.Resource;
|
||||
import javax.mail.MessagingException;
|
||||
|
||||
/**
|
||||
* 邮件功能控制器
|
||||
* 邮件控制器
|
||||
*
|
||||
* @author WebSoft
|
||||
* @since 2020-03-21 00:37:11
|
||||
*/
|
||||
@Api(tags = "邮件功能")
|
||||
@Api(tags = "邮件")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/email")
|
||||
public class EmailController extends BaseController {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-18 08:45:13
|
||||
*/
|
||||
@Api(tags = "环境管理管理")
|
||||
@Api(tags = "环境管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/environment")
|
||||
public class EnvironmentController extends BaseController {
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.List;
|
||||
* @author WebSoft
|
||||
* @since 2018-12-24 16:10:23
|
||||
*/
|
||||
@Api(tags = "菜单管理")
|
||||
@Api(tags = "菜单")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/menu")
|
||||
public class MenuController extends BaseController {
|
||||
|
||||
@@ -1,178 +0,0 @@
|
||||
package com.gxwebsoft.common.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||
import com.gxwebsoft.common.core.utils.CommonUtil;
|
||||
import com.gxwebsoft.common.core.utils.RequestUtil;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.entity.MerchantAccount;
|
||||
import com.gxwebsoft.common.system.entity.UserRole;
|
||||
import com.gxwebsoft.common.system.mapper.MerchantAccountMapper;
|
||||
import com.gxwebsoft.common.system.param.MerchantAccountParam;
|
||||
import com.gxwebsoft.common.system.service.MerchantAccountService;
|
||||
import com.gxwebsoft.common.system.service.UserRoleService;
|
||||
import com.gxwebsoft.common.system.service.UserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商户账号控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-19 12:02:24
|
||||
*/
|
||||
@Api(tags = "商户账号管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/merchant-account")
|
||||
public class MerchantAccountController extends BaseController {
|
||||
@Resource
|
||||
private MerchantAccountService merchantAccountService;
|
||||
@Resource
|
||||
private MerchantAccountMapper merchantAccountMapper;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
@Resource
|
||||
private UserRoleService userRoleService;
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantAccount:list')")
|
||||
@ApiOperation("分页查询商户账号")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<MerchantAccount>> page(MerchantAccountParam param) {
|
||||
// 使用关联查询
|
||||
return success(merchantAccountService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantAccount:list')")
|
||||
@ApiOperation("查询全部商户账号")
|
||||
@GetMapping()
|
||||
public ApiResult<List<MerchantAccount>> list(MerchantAccountParam param) {
|
||||
// 使用关联查询
|
||||
return success(merchantAccountService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantAccount:list')")
|
||||
@ApiOperation("根据id查询商户账号")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<MerchantAccount> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(merchantAccountService.getByIdRel(id));
|
||||
}
|
||||
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantAccount:save')")
|
||||
@ApiOperation("添加商户账号")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody MerchantAccount merchantAccount, HttpServletRequest request) {
|
||||
if (merchantAccountService.count(new LambdaQueryWrapper<MerchantAccount>().eq(MerchantAccount::getPhone,merchantAccount.getPhone())) > 0) {
|
||||
return fail("手机号码已存在");
|
||||
}
|
||||
// 查询用户是否已存在
|
||||
User userByPhone = userService.getByPhone(merchantAccount.getPhone());
|
||||
if (userByPhone != null){
|
||||
merchantAccount.setUserId(userByPhone.getUserId());
|
||||
if (userRoleService.count(new LambdaQueryWrapper<UserRole>().eq(UserRole::getRoleId,merchantAccount.getRoleId())) == 0) {
|
||||
// 添加角色
|
||||
final UserRole userRole = new UserRole();
|
||||
userRole.setUserId(userByPhone.getUserId());
|
||||
userRole.setRoleId(merchantAccount.getRoleId());
|
||||
userRoleService.save(userRole);
|
||||
}
|
||||
merchantAccountService.save(merchantAccount);
|
||||
return success("添加成功");
|
||||
}
|
||||
|
||||
// 添加用户
|
||||
User user = new User();
|
||||
user.setUsername(merchantAccount.getPhone());
|
||||
user.setPhone(merchantAccount.getPhone());
|
||||
user.setPassword(userService.encodePassword(merchantAccount.getPassword()));
|
||||
user.setNickname(merchantAccount.getRealName());
|
||||
user.setIsAdmin(true);
|
||||
user.setPlatform("ADMIN");
|
||||
user.setMerchantId(merchantAccount.getMerchantId());
|
||||
userService.save(user);
|
||||
// 添加角色
|
||||
final UserRole userRole = new UserRole();
|
||||
userRole.setUserId(user.getUserId());
|
||||
userRole.setRoleId(merchantAccount.getRoleId());
|
||||
userRoleService.save(userRole);
|
||||
merchantAccount.setUserId(user.getUserId());
|
||||
// 保存账号
|
||||
if (merchantAccountService.save(merchantAccount)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantAccount:update')")
|
||||
@ApiOperation("修改商户账号")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody MerchantAccount merchantAccount) {
|
||||
if (merchantAccountService.updateById(merchantAccount)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantAccount:remove')")
|
||||
@ApiOperation("删除商户账号")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (merchantAccountService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantAccount:save')")
|
||||
@ApiOperation("批量添加商户账号")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<MerchantAccount> list) {
|
||||
if (merchantAccountService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantAccount:update')")
|
||||
@ApiOperation("批量修改商户账号")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<MerchantAccount> batchParam) {
|
||||
if (batchParam.update(merchantAccountService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantAccount:remove')")
|
||||
@ApiOperation("批量删除商户账号")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (merchantAccountService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("根据手机号码查询商户账号信息")
|
||||
@GetMapping("/getMerchantAccountByPhone")
|
||||
public ApiResult<MerchantAccount> getMerchantAccountByPhone(MerchantAccountParam param){
|
||||
param.setTenantId(getTenantId());
|
||||
final MerchantAccount merchantAccount = merchantAccountMapper.getMerchantAccountByPhone(param);
|
||||
if(merchantAccount == null){
|
||||
return fail("账号不存在",null);
|
||||
}
|
||||
return success(merchantAccount);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
package com.gxwebsoft.common.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.web.*;
|
||||
import com.gxwebsoft.common.system.entity.Merchant;
|
||||
import com.gxwebsoft.common.system.entity.MerchantApply;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.param.MerchantApplyParam;
|
||||
import com.gxwebsoft.common.system.service.MerchantApplyService;
|
||||
import com.gxwebsoft.common.system.service.MerchantService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商户入驻申请控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-05 01:24:36
|
||||
*/
|
||||
@Api(tags = "商户入驻申请管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/merchant-apply")
|
||||
public class MerchantApplyController extends BaseController {
|
||||
@Resource
|
||||
private MerchantService merchantService;
|
||||
@Resource
|
||||
private MerchantApplyService merchantApplyService;
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantApply:list')")
|
||||
@ApiOperation("分页查询商户入驻申请")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<MerchantApply>> page(MerchantApplyParam param) {
|
||||
// 使用关联查询
|
||||
return success(merchantApplyService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantApply:list')")
|
||||
@ApiOperation("查询全部商户入驻申请")
|
||||
@GetMapping()
|
||||
public ApiResult<List<MerchantApply>> list(MerchantApplyParam param) {
|
||||
// 使用关联查询
|
||||
return success(merchantApplyService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantApply:list')")
|
||||
@ApiOperation("根据id查询商户入驻申请")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<MerchantApply> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(merchantApplyService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加商户入驻申请")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody MerchantApply merchantApply) {
|
||||
if (merchantService.count(new LambdaQueryWrapper<Merchant>().eq(Merchant::getMerchantName,merchantApply.getMerchantName())) > 0) {
|
||||
return fail("该租户名称已存在");
|
||||
}
|
||||
if (merchantService.count(new LambdaQueryWrapper<Merchant>().eq(Merchant::getPhone,merchantApply.getPhone())) > 0) {
|
||||
return fail("该手机号码已存在");
|
||||
}
|
||||
if (merchantApplyService.save(merchantApply)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantApply:update')")
|
||||
@ApiOperation("修改商户入驻申请")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody MerchantApply merchantApply) {
|
||||
if (merchantApplyService.updateById(merchantApply)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantApply:remove')")
|
||||
@ApiOperation("删除商户入驻申请")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (merchantApplyService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantApply:save')")
|
||||
@ApiOperation("批量添加商户入驻申请")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<MerchantApply> list) {
|
||||
if (merchantApplyService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantApply:update')")
|
||||
@ApiOperation("批量修改商户入驻申请")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<MerchantApply> batchParam) {
|
||||
if (batchParam.update(merchantApplyService, "apply_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantApply:remove')")
|
||||
@ApiOperation("批量删除商户入驻申请")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (merchantApplyService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
package com.gxwebsoft.common.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||
import com.gxwebsoft.common.core.utils.RequestUtil;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.Merchant;
|
||||
import com.gxwebsoft.common.system.entity.MerchantAccount;
|
||||
import com.gxwebsoft.common.system.param.MerchantParam;
|
||||
import com.gxwebsoft.common.system.service.MerchantAccountService;
|
||||
import com.gxwebsoft.common.system.service.MerchantService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商户控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-05 00:03:54
|
||||
*/
|
||||
@Api(tags = "商户管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/merchant")
|
||||
public class MerchantController extends BaseController {
|
||||
@Resource
|
||||
private MerchantService merchantService;
|
||||
@Resource
|
||||
private MerchantAccountService merchantAccountService;
|
||||
|
||||
@ApiOperation("分页查询商户")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Merchant>> page(MerchantParam param) {
|
||||
// 使用关联查询
|
||||
System.out.println("param = " + param);
|
||||
return success(merchantService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部商户")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Merchant>> list(MerchantParam param) {
|
||||
// 使用关联查询
|
||||
return success(merchantService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询商户")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Merchant> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(merchantService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchant:save')")
|
||||
@ApiOperation("添加商户")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Merchant merchant, HttpServletRequest request) {
|
||||
if (merchantService.count(new LambdaQueryWrapper<Merchant>().eq(Merchant::getPhone,merchant.getPhone())) > 0) {
|
||||
return fail("商户手机号码" + merchant.getPhone() + "已存在");
|
||||
}
|
||||
if (merchantService.save(merchant)) {
|
||||
// 设置商家后台入口
|
||||
merchant.setAdminUrl(merchant.getTenantId() + ".m.wsdns.cn");
|
||||
merchantService.updateById(merchant);
|
||||
// 获取用户信息
|
||||
final RequestUtil requestUtil = new RequestUtil();
|
||||
String access_token = JwtUtil.getAccessToken(request);
|
||||
requestUtil.setAccessToken(access_token);
|
||||
requestUtil.setTenantId(getTenantId().toString());
|
||||
final MerchantAccount merchantAccount = new MerchantAccount();
|
||||
merchantAccount.setMerchantId(merchant.getMerchantId());
|
||||
merchantAccount.setPhone(merchant.getPhone());
|
||||
merchantAccount.setPassword(merchant.getPhone().substring(merchant.getPhone().length() - 6));
|
||||
merchantAccount.setRealName(merchant.getRealName());
|
||||
merchantAccount.setRoleId(merchant.getRoleId());
|
||||
merchantAccount.setRoleName(merchant.getRoleName());
|
||||
requestUtil.saveUserByPhone(merchantAccount);
|
||||
merchantAccountService.save(merchantAccount);
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchant:update')")
|
||||
@ApiOperation("修改商户")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Merchant merchant) {
|
||||
if (merchantService.updateById(merchant)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchant:remove')")
|
||||
@ApiOperation("删除商户")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (merchantService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchant:save')")
|
||||
@ApiOperation("批量添加商户")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Merchant> list) {
|
||||
if (merchantService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchant:update')")
|
||||
@ApiOperation("批量修改商户")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Merchant> batchParam) {
|
||||
if (batchParam.update(merchantService, "merchant_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchant:remove')")
|
||||
@ApiOperation("批量删除商户")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (merchantService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
package com.gxwebsoft.common.system.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.MerchantType;
|
||||
import com.gxwebsoft.common.system.entity.MerchantType;
|
||||
import com.gxwebsoft.common.system.param.MerchantTypeParam;
|
||||
import com.gxwebsoft.common.system.service.MerchantTypeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商户类型控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-05 00:08:51
|
||||
*/
|
||||
@Api(tags = "商户类型管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/merchant-type")
|
||||
public class MerchantTypeController extends BaseController {
|
||||
@Resource
|
||||
private MerchantTypeService merchantTypeService;
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantType:list')")
|
||||
@ApiOperation("分页查询商户类型")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<MerchantType>> page(MerchantTypeParam param) {
|
||||
// 使用关联查询
|
||||
return success(merchantTypeService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantType:list')")
|
||||
@ApiOperation("查询全部商户类型")
|
||||
@GetMapping()
|
||||
public ApiResult<List<MerchantType>> list(MerchantTypeParam param) {
|
||||
// 使用关联查询
|
||||
return success(merchantTypeService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantType:list')")
|
||||
@ApiOperation("根据id查询商户类型")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<MerchantType> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(merchantTypeService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantType:save')")
|
||||
@ApiOperation("添加商户类型")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody MerchantType merchantType) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// merchantType.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (merchantTypeService.save(merchantType)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantType:update')")
|
||||
@ApiOperation("修改商户类型")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody MerchantType merchantType) {
|
||||
if (merchantTypeService.updateById(merchantType)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantType:remove')")
|
||||
@ApiOperation("删除商户类型")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (merchantTypeService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantType:update')")
|
||||
@ApiOperation("批量添加商户类型")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<MerchantType> list) {
|
||||
if (merchantTypeService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantType:update')")
|
||||
@ApiOperation("批量修改商户类型")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<MerchantType> batchParam) {
|
||||
if (batchParam.update(merchantTypeService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:merchantType:remove')")
|
||||
@ApiOperation("批量删除商户类型")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (merchantTypeService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-18 15:53:43
|
||||
*/
|
||||
@Api(tags = "模块管理管理")
|
||||
@Api(tags = "模块")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/modules")
|
||||
public class ModulesController extends BaseController {
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-08 13:22:21
|
||||
*/
|
||||
@Api(tags = "消息记录表管理")
|
||||
@Api(tags = "通知")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/notice")
|
||||
public class NoticeController extends BaseController {
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.GroupSequence;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -24,7 +25,7 @@ import java.util.Map;
|
||||
* @author 科技小王子
|
||||
* @since 2023-06-20 18:07:50
|
||||
*/
|
||||
@Api(tags = "余额支付结果通知(未完成)")
|
||||
@Api(tags = "支付")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/balance-pay")
|
||||
public class NotifyByBalancePayController extends BaseController {
|
||||
@@ -37,7 +38,7 @@ public class NotifyByBalancePayController extends BaseController {
|
||||
@Resource
|
||||
private ConfigProperties conf;
|
||||
|
||||
@ApiModelProperty("异步通知")
|
||||
@ApiModelProperty("余额支付通知(未完成)")
|
||||
@PostMapping("/notify/{tenantId}")
|
||||
public String wxNotify(@RequestHeader Map<String, String> header, @RequestBody String body, @PathVariable("tenantId") Integer tenantId) {
|
||||
System.out.println("异步通知*************** = ");
|
||||
|
||||
@@ -1,180 +0,0 @@
|
||||
package com.gxwebsoft.common.system.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.Order;
|
||||
import com.gxwebsoft.common.system.entity.OrderInfo;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.param.OrderParam;
|
||||
import com.gxwebsoft.common.system.service.CompanyService;
|
||||
import com.gxwebsoft.common.system.service.OrderInfoService;
|
||||
import com.gxwebsoft.common.system.service.OrderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 订单控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-24 13:46:21
|
||||
*/
|
||||
@Api(tags = "订单管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/order")
|
||||
public class OrderController extends BaseController {
|
||||
@Resource
|
||||
private OrderService orderService;
|
||||
@Resource
|
||||
private CompanyService companyService;
|
||||
@Resource
|
||||
private OrderInfoService orderInfoService;
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:order:list')")
|
||||
@OperationLog
|
||||
@ApiOperation("分页查询订单")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Order>> page(OrderParam param) {
|
||||
// 使用关联查询
|
||||
return success(orderService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:order:list')")
|
||||
@OperationLog
|
||||
@ApiOperation("查询全部订单")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Order>> list(OrderParam param) {
|
||||
// 使用关联查询
|
||||
return success(orderService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:order:list')")
|
||||
@OperationLog
|
||||
@ApiOperation("根据id查询订单")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Order> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(orderService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:order:save')")
|
||||
@OperationLog
|
||||
@ApiOperation("添加订单")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Order order) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return fail("请先登录");
|
||||
}
|
||||
// 微信openid(必填)
|
||||
if(StrUtil.isBlank(loginUser.getOpenid())){
|
||||
return fail("微信openid(必填)");
|
||||
}
|
||||
// 商品描述(必填)
|
||||
if(StrUtil.isBlank(order.getComments())){
|
||||
return fail("商品描述(必填)");
|
||||
}
|
||||
// 微信支付(商品金额不能为0)
|
||||
if(order.getPayType().equals(1)){
|
||||
if (order.getTotalPrice().compareTo(BigDecimal.ZERO) == 0) {
|
||||
return fail("商品金额不能为0");
|
||||
}
|
||||
}
|
||||
|
||||
// 订单信息
|
||||
long timeMillis = System.currentTimeMillis();
|
||||
long orderNo = IdUtil.getSnowflakeNextId();
|
||||
order.setOrderNo(Long.toString(orderNo));
|
||||
order.setUserId(loginUser.getUserId());
|
||||
order.setOpenid(loginUser.getOpenid());
|
||||
order.setRealName(loginUser.getRealName());
|
||||
order.setPhone(loginUser.getPhone());
|
||||
final List<Integer> collect = order.getOrderInfoList().stream().map(OrderInfo::getStartTime).collect(Collectors.toList());
|
||||
order.setStartTime(Collections.min(collect));
|
||||
order.setVersion(10);
|
||||
if (orderService.save(order)) {
|
||||
order.getOrderInfoList().forEach(d -> {
|
||||
d.setOid(order.getOrderId());
|
||||
d.setTimeFlag(timeMillis);
|
||||
d.setVersion(10);
|
||||
d.setOrderTime(timeMillis / 1000);
|
||||
});
|
||||
orderInfoService.saveBatch(order.getOrderInfoList());
|
||||
// 创建微信订单
|
||||
if (order.getPayType().equals(1)) {
|
||||
return success("下单成功",orderService.createWxOrder(order));
|
||||
}
|
||||
}
|
||||
return fail("下单失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:order:update')")
|
||||
@OperationLog
|
||||
@ApiOperation("修改订单")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Order order) {
|
||||
if (orderService.updateById(order)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:order:remove')")
|
||||
@OperationLog
|
||||
@ApiOperation("删除订单")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (orderService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:order:save')")
|
||||
@OperationLog
|
||||
@ApiOperation("批量添加订单")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Order> list) {
|
||||
if (orderService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:order:update')")
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改订单")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Order> batchParam) {
|
||||
if (batchParam.update(orderService, "order_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:order:remove')")
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除订单")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (orderService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
package com.gxwebsoft.common.system.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.OrderInfoService;
|
||||
import com.gxwebsoft.common.system.entity.OrderInfo;
|
||||
import com.gxwebsoft.common.system.param.OrderInfoParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-05-10 18:02:54
|
||||
*/
|
||||
@Api(tags = "管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/order-info")
|
||||
public class OrderInfoController extends BaseController {
|
||||
@Resource
|
||||
private OrderInfoService orderInfoService;
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:orderInfo:list')")
|
||||
@OperationLog
|
||||
@ApiOperation("分页查询")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<OrderInfo>> page(OrderInfoParam param) {
|
||||
PageParam<OrderInfo, OrderInfoParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(orderInfoService.page(page, page.getWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(orderInfoService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:orderInfo:list')")
|
||||
@OperationLog
|
||||
@ApiOperation("查询全部")
|
||||
@GetMapping()
|
||||
public ApiResult<List<OrderInfo>> list(OrderInfoParam param) {
|
||||
PageParam<OrderInfo, OrderInfoParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(orderInfoService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(orderInfoService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:orderInfo:list')")
|
||||
@OperationLog
|
||||
@ApiOperation("根据id查询")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<OrderInfo> get(@PathVariable("id") Integer id) {
|
||||
return success(orderInfoService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(orderInfoService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:orderInfo:save')")
|
||||
@OperationLog
|
||||
@ApiOperation("添加")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody OrderInfo orderInfo) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
}
|
||||
if (orderInfoService.save(orderInfo)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:orderInfo:update')")
|
||||
@OperationLog
|
||||
@ApiOperation("修改")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody OrderInfo orderInfo) {
|
||||
if (orderInfoService.updateById(orderInfo)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:orderInfo:remove')")
|
||||
@OperationLog
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (orderInfoService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:orderInfo:save')")
|
||||
@OperationLog
|
||||
@ApiOperation("批量添加")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<OrderInfo> list) {
|
||||
if (orderInfoService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:orderInfo:update')")
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<OrderInfo> batchParam) {
|
||||
if (batchParam.update(orderInfoService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:orderInfo:remove')")
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (orderInfoService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
* @author WebSoft
|
||||
* @since 2020-03-14 11:29:04
|
||||
*/
|
||||
@Api(tags = "组织机构管理")
|
||||
@Api(tags = "组织架构")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/organization")
|
||||
public class OrganizationController extends BaseController {
|
||||
|
||||
@@ -41,7 +41,7 @@ import static com.gxwebsoft.common.core.constants.BalanceConstants.BALANCE_USE;
|
||||
* @author 科技小王子
|
||||
* @since 2024-05-11 12:39:11
|
||||
*/
|
||||
@Api(tags = "支付方式管理")
|
||||
@Api(tags = "支付")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/payment")
|
||||
public class PaymentController extends BaseController {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-12 09:53:07
|
||||
*/
|
||||
@Api(tags = "插件扩展管理")
|
||||
@Api(tags = "插件")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/plug")
|
||||
public class PlugController extends BaseController {
|
||||
|
||||
@@ -33,7 +33,7 @@ import static com.gxwebsoft.common.core.constants.BalanceConstants.BALANCE_ADMIN
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-26 23:18:48
|
||||
*/
|
||||
@Api(tags = "会员充值订单表管理")
|
||||
@Api(tags = "用户充值订单")
|
||||
@RestController
|
||||
@RequestMapping("/api/sys/recharge-order")
|
||||
public class RechargeOrderController extends BaseController {
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/redis-util")
|
||||
@Api(tags = "Redis缓存工具接口")
|
||||
@Api(tags = "Redis缓存")
|
||||
public class RedisUtilController extends BaseController {
|
||||
private CacheClient cacheClient;
|
||||
private final StringRedisTemplate redisTemplate;
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.stream.Collectors;
|
||||
* @author WebSoft
|
||||
* @since 2018-12-24 16:10:02
|
||||
*/
|
||||
@Api(tags = "角色管理")
|
||||
@Api(tags = "角色")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/role")
|
||||
public class RoleController extends BaseController {
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.List;
|
||||
* @author WebSoft
|
||||
* @since 2018-12-24 16:10:01
|
||||
*/
|
||||
@Api(tags = "角色菜单管理")
|
||||
@Api(tags = "角色菜单")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/role-menu")
|
||||
public class RoleMenuController extends BaseController {
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.List;
|
||||
* @author WebSoft
|
||||
* @since 2022-11-19 13:54:27
|
||||
*/
|
||||
@Api(tags = "系统设置管理")
|
||||
@Api(tags = "系统设置")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/setting")
|
||||
public class SettingController extends BaseController {
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.util.stream.Collectors;
|
||||
* @author 科技小王子
|
||||
* @since 2023-07-17 17:49:53
|
||||
*/
|
||||
@Api(tags = "租户管理")
|
||||
@Api(tags = "系统租户")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/tenant")
|
||||
public class TenantController extends BaseController {
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-04-21 15:59:09
|
||||
*/
|
||||
@Api(tags = "用户余额变动明细表管理")
|
||||
@Api(tags = "用户余额明细")
|
||||
@RestController
|
||||
@RequestMapping("/api/sys/user-balance-log")
|
||||
public class UserBalanceLogController extends BaseController {
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-28 18:08:32
|
||||
*/
|
||||
@Api(tags = "我的收藏管理")
|
||||
@Api(tags = "用户收藏")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/user-collection")
|
||||
public class UserCollectionController extends BaseController {
|
||||
|
||||
@@ -37,7 +37,7 @@ import java.util.stream.Collectors;
|
||||
* @author WebSoft
|
||||
* @since 2018-12-24 16:10:41
|
||||
*/
|
||||
@Api(tags = "用户管理")
|
||||
@Api(tags = "用户")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/user")
|
||||
public class UserController extends BaseController {
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.List;
|
||||
* @author WebSoft
|
||||
* @since 2022-07-21 14:34:40
|
||||
*/
|
||||
@Api(tags = "用户文件管理")
|
||||
@Api(tags = "用户上传文件")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/user-file")
|
||||
public class UserFileController extends BaseController {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-07 22:51:17
|
||||
*/
|
||||
@Api(tags = "用户会员等级表管理")
|
||||
@Api(tags = "用户等级")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/user-grade")
|
||||
public class UserGradeController extends BaseController {
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-28 15:16:39
|
||||
*/
|
||||
@Api(tags = "用户分组管理表管理")
|
||||
@Api(tags = "用户")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/user-group")
|
||||
public class UserGroupController extends BaseController {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-07 22:39:46
|
||||
*/
|
||||
@Api(tags = "第三方用户信息表管理")
|
||||
@Api(tags = "第三方用户")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/user-oauth")
|
||||
public class UserOauthController extends BaseController {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2023-10-07 22:56:36
|
||||
*/
|
||||
@Api(tags = "用户推荐关系表管理")
|
||||
@Api(tags = "用户")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/user-referee")
|
||||
public class UserRefereeController extends BaseController {
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "域名所有权验证")
|
||||
@Api(tags = "安全")
|
||||
@RestController
|
||||
@RequestMapping("/lvQ4EoivKJ.txt")
|
||||
public class VerifyTxt {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
* @author 科技小王子
|
||||
* @since 2024-01-15 18:52:24
|
||||
*/
|
||||
@Api(tags = "版本更新管理")
|
||||
@Api(tags = "系统版本")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/version")
|
||||
public class VersionController extends BaseController {
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.stream.Collectors;
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-26 00:22:21
|
||||
*/
|
||||
@Api(tags = "服务器白名单管理")
|
||||
@Api(tags = "安全")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/white-domain")
|
||||
public class WhiteDomainController extends BaseController {
|
||||
|
||||
@@ -16,7 +16,6 @@ import com.gxwebsoft.common.core.exception.BusinessException;
|
||||
import com.gxwebsoft.common.core.security.JwtSubject;
|
||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||
import com.gxwebsoft.common.core.utils.CommonUtil;
|
||||
import com.gxwebsoft.common.core.utils.JSONUtil;
|
||||
import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
@@ -36,7 +35,6 @@ import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static com.gxwebsoft.common.core.constants.PlatformConstants.MP_OFFICIAL;
|
||||
import static com.gxwebsoft.common.core.constants.PlatformConstants.MP_WEIXIN;
|
||||
import static com.gxwebsoft.common.core.constants.RedisConstants.ACCESS_TOKEN_KEY;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class EmailRecord implements Serializable {
|
||||
@ApiModelProperty("发件邮箱")
|
||||
private String sender;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
@ApiModelProperty("创建人ID")
|
||||
private Integer createUserId;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
|
||||
@@ -370,7 +370,7 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, Tenant> impleme
|
||||
menuService.save(menu);
|
||||
menu.setMenuType(0);
|
||||
menu.setParentId(parentId);
|
||||
menu.setTitle("字典管理");
|
||||
menu.setTitle("字典");
|
||||
menu.setPath("/system/dict");
|
||||
menu.setComponent("/system/dict");
|
||||
menu.setIcon("profile-outlined");
|
||||
|
||||
Reference in New Issue
Block a user