Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
|
4dfc3382a2 | |
|
9cb37f0a83 | |
|
d907a9f445 |
|
@ -10,8 +10,6 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
接口列表
|
||||
*/
|
||||
|
@ -46,25 +44,5 @@ public class Connector extends BaseEntity {
|
|||
*/
|
||||
private Integer status;
|
||||
|
||||
//添加
|
||||
public static Connector addBuild(Connector connector){
|
||||
return Connector.builder()
|
||||
.connectorName(connector.connectorName)
|
||||
.connectorDescription(connector.connectorDescription)
|
||||
.connectorNum(connector.connectorNum)
|
||||
.status(connector.status)
|
||||
.build();
|
||||
}
|
||||
|
||||
//修改
|
||||
public static Connector updBuild(Connector connector, Supplier<Long> supplier){
|
||||
return Connector.builder()
|
||||
.connectorId(supplier.get())
|
||||
.connectorName(connector.connectorName)
|
||||
.connectorDescription(connector.connectorDescription)
|
||||
.connectorNum(connector.connectorNum)
|
||||
.status(connector.status)
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ import lombok.NoArgsConstructor;
|
|||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/***
|
||||
* 支付表
|
||||
|
@ -46,25 +45,4 @@ public class Pay extends BaseEntity {
|
|||
*/
|
||||
private Date payTime;
|
||||
|
||||
//添加
|
||||
public static Pay addBuild(Pay pay){
|
||||
return Pay.builder()
|
||||
.payStatus(pay.payStatus)
|
||||
.payTime(pay.payTime)
|
||||
.payType(pay.payType)
|
||||
.userId(pay.userId)
|
||||
.build();
|
||||
}
|
||||
|
||||
//修改
|
||||
public static Pay updBuild(Pay pay, Supplier<Long> supplier){
|
||||
return Pay.builder()
|
||||
.payId(supplier.get())
|
||||
.payStatus(pay.payStatus)
|
||||
.payTime(pay.payTime)
|
||||
.payType(pay.payType)
|
||||
.userId(pay.userId)
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -36,5 +36,4 @@ public class Rule extends BaseEntity {
|
|||
/** 使用次数 */
|
||||
private Integer ruleNum ;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 分页参数
|
||||
* @author yami
|
||||
*/
|
||||
@Schema
|
||||
@ParameterObject
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
|
@ -100,7 +98,6 @@
|
|||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-nacos-remote</artifactId>
|
||||
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
package com.muyu.market.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.market.domian.Connector;
|
||||
import com.muyu.market.domian.Pay;
|
||||
import com.muyu.market.service.ConnectorService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/connector")
|
||||
@Tag(name = "接口调用展示",description = "进行接口调用量的展示")
|
||||
public class ConnectorController {
|
||||
|
||||
@Autowired
|
||||
private ConnectorService service;
|
||||
|
||||
|
||||
/**
|
||||
* 查询接口调用量
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(path = "/list",method = RequestMethod.POST)
|
||||
@Operation(summary = "查询接口调用量",description = "查询接口调用量")
|
||||
public Result<List<Connector>> showList(){
|
||||
List<Connector> list=service.showList();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加信息
|
||||
* @param
|
||||
* @return 添加结果
|
||||
*/
|
||||
@PostMapping
|
||||
@Operation(summary = "信息添加",description = "添加信息,添加成功之后才可以只用支付类的产品")
|
||||
public Result<String> save(@Validated @RequestBody Connector connector){
|
||||
service.save(Connector.addBuild(connector));
|
||||
return Result.success(null,"操作成功");
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 修改客户
|
||||
// * @param
|
||||
// * @return 修改结果
|
||||
// */
|
||||
// @PutMapping("/{connectorId}")
|
||||
// @Operation(summary = "客户信息修改",description = "通过ID修改客户信息")
|
||||
// public Result<String> update(
|
||||
// @Schema(title = "客户ID",type = "Long",defaultValue = "1",description = "修改客户信息需要依据的唯一条件")
|
||||
// @PathVariable("connectorId") Long connectorId,
|
||||
// @RequestBody @Validated Connector connector){
|
||||
// service.updateById(Connector.updBuild(connector,
|
||||
// () -> connectorId));
|
||||
// return Result.success(null,"操作成功");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 删除客户
|
||||
* @param connectorId 删除客户请求信息
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping("/{connectorId}")
|
||||
@Operation(summary = "信息删除",description = "通过ID删除信息")
|
||||
public Result<String> delete(@PathVariable("connectorId") Long connectorId){
|
||||
service.removeById(connectorId);
|
||||
return Result.success(null,"操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID获取客户
|
||||
* @param connectorId ID
|
||||
* @return 客户信息
|
||||
*/
|
||||
@GetMapping("/{connectorId}")
|
||||
@Operation(summary = "通过ID获取信息",description = "通过ID获取信息")
|
||||
public Result<Connector> findById(@PathVariable("connectorId") Long connectorId){
|
||||
return Result.success(service.getById(connectorId),"操作成功");
|
||||
}
|
||||
|
||||
}
|
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
import com.dtflys.forest.springboot.annotation.ForestScannerRegister;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.market.domian.Defined;
|
||||
import com.muyu.market.domian.config.PageParam;
|
||||
import com.muyu.market.domian.req.DefinedReq;
|
||||
|
@ -44,6 +43,7 @@ public class DefinedController {
|
|||
private DefinedService definedService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 接口列表 分页 查询
|
||||
*/
|
||||
|
@ -67,7 +67,6 @@ public class DefinedController {
|
|||
);
|
||||
|
||||
PageParam<Defined>pageDTO=definedService.page(page,queryWrapper);
|
||||
|
||||
return Result.success(pageDTO);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package com.muyu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.market.domian.Logs;
|
||||
import com.muyu.market.domian.config.PageParam;
|
||||
import com.muyu.market.service.LogsService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
@ -10,9 +11,6 @@ import lombok.extern.log4j.Log4j2;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/logs")
|
||||
|
@ -26,11 +24,13 @@ public class LogsController {
|
|||
* 查询日志列表
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(path = "/list",method = RequestMethod.POST)
|
||||
@Operation(summary = "查询",description = "查询日志列表")
|
||||
public Result<List<Logs>> list(){
|
||||
List<Logs> list=service.showList();
|
||||
return Result.success(list);
|
||||
@Operation(summary = "查询日志列表",description = "查询用户操作日志列表")
|
||||
@GetMapping("/list")
|
||||
public Result<PageParam<Logs>> show(PageParam<Logs>page){
|
||||
LambdaQueryWrapper<Logs> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(Logs::getLogsId);//根据用户id查询
|
||||
PageParam<Logs> pageDTO=service.page(page,queryWrapper);
|
||||
return Result.success(pageDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,6 +45,7 @@ public class LogsController {
|
|||
return Result.success(null,"操作成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询信息
|
||||
* @param logsId
|
||||
|
|
|
@ -1,112 +0,0 @@
|
|||
package com.muyu.market.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.market.domian.Pay;
|
||||
import com.muyu.market.service.PayService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/pay")
|
||||
@Tag(name = "支付接口",description = "进行支付管理,查看等相关操作")
|
||||
public class PayController {
|
||||
|
||||
@Autowired
|
||||
private PayService service;
|
||||
|
||||
/**
|
||||
* 查询支付日志列表
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(path = "/list",method = RequestMethod.POST)
|
||||
@Operation(summary = "支付接口查询",description = "查询支付接口日志列表")
|
||||
public Result<List<Pay>> showList(){
|
||||
List<Pay> list=service.showList();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加支付信息
|
||||
* @param
|
||||
* @return 添加结果
|
||||
*/
|
||||
@PostMapping
|
||||
@Operation(summary = "客户信息添加",description = "添加支付平台客户信息,添加成功之后才可以只用支付类的产品")
|
||||
public Result<String> save(@Validated @RequestBody Pay pay){
|
||||
service.save(Pay.addBuild(pay));
|
||||
return Result.success(null,"操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户
|
||||
* @param
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping("/{payId}")
|
||||
@Operation(summary = "客户信息修改",description = "通过ID修改客户信息")
|
||||
public Result<String> update(
|
||||
@Schema(title = "客户ID",type = "Long",defaultValue = "1",description = "修改客户信息需要依据的唯一条件")
|
||||
@PathVariable("payId") Long payId,
|
||||
@RequestBody @Validated Pay pay){
|
||||
service.updateById(Pay.updBuild(pay,
|
||||
() -> payId));
|
||||
return Result.success(null,"操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户
|
||||
* @param payId 删除客户请求信息
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping("/{payId}")
|
||||
@Operation(summary = "客户信息删除",description = "通过ID删除客户信息,七天内存在支付先关记录的客户,不可进行删除")
|
||||
public Result<String> delete(@PathVariable("payId") Long payId){
|
||||
service.removeById(payId);
|
||||
return Result.success(null,"操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID获取客户
|
||||
* @param payId ID
|
||||
* @return 客户信息
|
||||
*/
|
||||
@GetMapping("/{payId}")
|
||||
@Operation(summary = "通过ID获取客户",description = "通过ID获取客户")
|
||||
public Result<Pay> findById(@PathVariable("payId") Long payId){
|
||||
return Result.success(service.getById(payId),"操作成功");
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 通过ID禁用
|
||||
// * @param payId ID
|
||||
// * @return 禁用结果
|
||||
// */
|
||||
// @GetMapping("/disable/{orderCustomerId}")
|
||||
// @Operation(summary = "通过ID禁用客户",description = "通过ID获取客户,禁用之后禁止调用支付相关接口")
|
||||
// public Result<String> disable(@PathVariable("payId") Long payId){
|
||||
// this.service.disable(payId);
|
||||
// return Result.success(null,"操作成功");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过ID启用
|
||||
// * @param payId ID
|
||||
// * @return 启用结果
|
||||
// */
|
||||
// @GetMapping("/enable/{orderCustomerId}")
|
||||
// @Operation(summary = "通过ID启用客户",description = "通过ID启用客户,启用之后可以进行支付相关接口的调用")
|
||||
// public Result<String> enable(@PathVariable("payId") Long payId){
|
||||
// this.service.enable(payId);
|
||||
// return Result.success(null,"操作成功");
|
||||
// }
|
||||
|
||||
}
|
|
@ -1,110 +0,0 @@
|
|||
package com.muyu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.market.domian.Connector;
|
||||
import com.muyu.market.domian.Defined;
|
||||
import com.muyu.market.domian.Rule;
|
||||
import com.muyu.market.domian.config.PageParam;
|
||||
import com.muyu.market.domian.req.DefinedReq;
|
||||
import com.muyu.market.domian.req.RuleReq;
|
||||
import com.muyu.market.service.ConnectorService;
|
||||
import com.muyu.market.service.RuleService;
|
||||
import io.micrometer.common.util.StringUtils;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/rule")
|
||||
@Tag(name = "接口调用展示",description = "进行接口调用量的展示")
|
||||
public class RuleController {
|
||||
|
||||
@Autowired
|
||||
private RuleService service;
|
||||
|
||||
|
||||
/**
|
||||
* 接口列表 分页 查询
|
||||
*/
|
||||
@RequestMapping(path = "/list",method = RequestMethod.POST)
|
||||
@Operation(summary = "查询",description = "根据接口的名称 有效期 等可以进行筛选")
|
||||
public Result<PageParam<Rule>> selectList(PageParam<Rule> page,
|
||||
@Validated @RequestBody RuleReq ruleReq) {
|
||||
|
||||
/**模糊查询 名称**/
|
||||
LambdaQueryWrapper<Rule> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.like(
|
||||
StringUtils.isNotEmpty(ruleReq.getRuleName()),
|
||||
Rule::getRuleName,ruleReq.getRuleName()
|
||||
);
|
||||
|
||||
/**模糊查询 有效期**/
|
||||
queryWrapper.like(
|
||||
StringUtils.isNotEmpty(String.valueOf(ruleReq.getStatus())),
|
||||
Rule::getStatus,
|
||||
ruleReq.getStatus()
|
||||
);
|
||||
|
||||
PageParam<Rule>pageDTO=service.page(page,queryWrapper);
|
||||
|
||||
return Result.success(pageDTO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@PostMapping
|
||||
@Operation(summary = "添加", description = "根据接口实体类添加,添加成功之后才可以使用支付类产品")
|
||||
public Result<String> save(@Validated @RequestBody Rule rule) {
|
||||
service.save(rule);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 修改客户
|
||||
// * @param
|
||||
// * @return 修改结果
|
||||
// */
|
||||
// @PutMapping("/{connectorId}")
|
||||
// @Operation(summary = "客户信息修改",description = "通过ID修改客户信息")
|
||||
// public Result<String> update(
|
||||
// @Schema(title = "客户ID",type = "Long",defaultValue = "1",description = "修改客户信息需要依据的唯一条件")
|
||||
// @PathVariable("connectorId") Long connectorId,
|
||||
// @RequestBody @Validated Connector connector){
|
||||
// service.updateById(Connector.updBuild(connector,
|
||||
// () -> connectorId));
|
||||
// return Result.success(null,"操作成功");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 删除客户
|
||||
* @param ruleId 删除客户请求信息
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping("/{ruleId}")
|
||||
@Operation(summary = "信息删除",description = "通过ID删除信息")
|
||||
public Result<String> delete(@PathVariable("ruleId") Long ruleId){
|
||||
service.removeById(ruleId);
|
||||
return Result.success(null,"操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID获取客户
|
||||
* @param ruleId ID
|
||||
* @return 客户信息
|
||||
*/
|
||||
@GetMapping("/{ruleId}")
|
||||
@Operation(summary = "通过ID获取信息",description = "通过ID获取信息")
|
||||
public Result<Rule> findById(@PathVariable("ruleId") Long ruleId){
|
||||
return Result.success(service.getById(ruleId),"操作成功");
|
||||
}
|
||||
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
package com.muyu.market.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.market.domian.Connector;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface ConnectorMapper extends BaseMapper<Connector> {
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package com.muyu.market.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.market.domian.Pay;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Mapper
|
||||
public interface PayMapper extends BaseMapper<Pay> {
|
||||
|
||||
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package com.muyu.market.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.market.domian.Rule;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @Author:ChenYan
|
||||
* @Project:2112-cloud-market
|
||||
* @Package:com.muyu.market.mapper
|
||||
* @Filename:RuleMapper
|
||||
* @Description TODO
|
||||
* @Date:2024/8/25 14:12
|
||||
*/
|
||||
@Mapper
|
||||
public interface RuleMapper extends BaseMapper<Rule> {
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package com.muyu.market.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.market.domian.Connector;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ConnectorService extends IService<Connector> {
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
* @return
|
||||
*/
|
||||
List<Connector> showList();
|
||||
}
|
|
@ -3,11 +3,8 @@ package com.muyu.market.service;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.market.domian.Logs;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface LogsService extends IService<Logs> {
|
||||
|
||||
|
||||
List<Logs> showList();
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
package com.muyu.market.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.market.domian.Logs;
|
||||
import com.muyu.market.domian.Pay;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface PayService extends IService<Pay> {
|
||||
|
||||
|
||||
List<Pay> showList();
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package com.muyu.market.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.market.domian.Rule;
|
||||
|
||||
/**
|
||||
* @Author:ChenYan
|
||||
* @Project:2112-cloud-market
|
||||
* @Package:com.muyu.market.service
|
||||
* @Filename:RuleService
|
||||
* @Description TODO
|
||||
* @Date:2024/8/25 14:10
|
||||
*/
|
||||
public interface RuleService extends IService<Rule> {
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
package com.muyu.market.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.market.domian.Connector;
|
||||
import com.muyu.market.mapper.ConnectorMapper;
|
||||
import com.muyu.market.service.ConnectorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class ConnectorServiceImpl
|
||||
extends ServiceImpl<ConnectorMapper, Connector>
|
||||
implements ConnectorService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private ConnectorMapper mapper;
|
||||
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Connector> showList() {
|
||||
|
||||
LambdaQueryWrapper<Connector> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(Connector::getConnectorId);
|
||||
List<Connector> list = this.list();
|
||||
list.stream().map(Connector::getConnectorId).collect(Collectors.toSet());
|
||||
return this.list(queryWrapper).stream().toList();
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
package com.muyu.market.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.market.domian.Logs;
|
||||
import com.muyu.market.mapper.LogsMapper;
|
||||
|
@ -8,9 +7,6 @@ import com.muyu.market.service.LogsService;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class LogsServiceImpl
|
||||
extends ServiceImpl<LogsMapper, Logs>
|
||||
|
@ -20,12 +16,4 @@ public class LogsServiceImpl
|
|||
private LogsMapper mapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<Logs> showList() {
|
||||
LambdaQueryWrapper<Logs> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(Logs::getLogsId);
|
||||
List<Logs> list = this.list();
|
||||
list.stream().map(Logs::getLogsId).collect(Collectors.toSet());
|
||||
return this.list(queryWrapper).stream().toList();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
package com.muyu.market.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.market.domian.Pay;
|
||||
import com.muyu.market.mapper.PayMapper;
|
||||
import com.muyu.market.service.PayService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class PayServiceImpl
|
||||
extends ServiceImpl<PayMapper, Pay>
|
||||
implements PayService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<Pay> showList() {
|
||||
LambdaQueryWrapper<Pay> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(Pay::getPayId);
|
||||
List<Pay> list = this.list();
|
||||
|
||||
list.stream().map(Pay::getPayId).collect(Collectors.toSet());
|
||||
return this.list(queryWrapper).stream().toList();
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package com.muyu.market.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.Mapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.market.domian.Rule;
|
||||
import com.muyu.market.mapper.RuleMapper;
|
||||
import com.muyu.market.service.RuleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Author:ChenYan
|
||||
* @Project:2112-cloud-market
|
||||
* @Package:com.muyu.market.service.impl
|
||||
* @Filename:RuleServiceImpl
|
||||
* @Description TODO
|
||||
* @Date:2024/8/25 14:11
|
||||
*/
|
||||
@Service
|
||||
public class RuleServiceImpl extends ServiceImpl<RuleMapper,Rule> implements RuleService {
|
||||
|
||||
@Autowired
|
||||
private RuleMapper ruleMapper;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue