Merge branch 'master' into sy
commit
085640abc4
|
@ -0,0 +1,35 @@
|
||||||
|
package com.muyu.market.domian.req;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.*;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
接口列表
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Tag(name = "接口列表")
|
||||||
|
public class ConnectorReq extends BaseEntity {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口名称
|
||||||
|
*/
|
||||||
|
private String connectorName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.muyu.market.domian.req;
|
||||||
|
|
||||||
|
import com.muyu.market.domian.Defined;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:ChenYan
|
||||||
|
* @Project:2112-cloud-market
|
||||||
|
* @Package:com.muyu.market.domian.req
|
||||||
|
* @Filename:DefinedReq
|
||||||
|
* @Description TODO
|
||||||
|
* @Date:2024/8/22 22:01
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Tag(name = "定义接口列表")
|
||||||
|
public class DefinedReq {
|
||||||
|
|
||||||
|
;
|
||||||
|
/**
|
||||||
|
* 定义名称
|
||||||
|
*/
|
||||||
|
private String definedName ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效期(天)
|
||||||
|
*/
|
||||||
|
private Integer definedDateValidity ;
|
||||||
|
|
||||||
|
|
||||||
|
// private List<DefinedReq>definedReqList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据库对象构建为返回结果对象
|
||||||
|
* @param
|
||||||
|
* @return 视图对象
|
||||||
|
*/
|
||||||
|
|
||||||
|
//
|
||||||
|
// public static DefinedReq definedBuild(Defined defined, Supplier<List<DefinedReq>>function) {
|
||||||
|
//
|
||||||
|
// return DefinedReq.builder()
|
||||||
|
// .definedDateValidity(defined.getDefinedDateValidity())
|
||||||
|
// .definedName(defined.getDefinedName())
|
||||||
|
// .definedReqList(function.get())
|
||||||
|
// .build();
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.muyu.market.domian.req;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.*;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 支付表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Tag(name = "支付列表")
|
||||||
|
public class PayReq extends BaseEntity {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付类型
|
||||||
|
*/
|
||||||
|
private Integer payType;
|
||||||
|
/**
|
||||||
|
* 支付状态
|
||||||
|
*/
|
||||||
|
private Integer payStatus;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付时间
|
||||||
|
*/
|
||||||
|
private Date payTime;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.muyu.market.domian.req;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:ChenYan
|
||||||
|
* @Description 接口规则
|
||||||
|
* @Date:2024/8/20 11:17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Tag(name = "接口规则列表")
|
||||||
|
public class RuleReq extends BaseEntity {
|
||||||
|
|
||||||
|
|
||||||
|
/** 规则名称 */
|
||||||
|
private String ruleName ;
|
||||||
|
|
||||||
|
|
||||||
|
/** 规则状态 */
|
||||||
|
private Integer status ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,8 +1,10 @@
|
||||||
package com.muyu.master.controller;
|
package com.muyu.master.controller;
|
||||||
|
|
||||||
|
import com.dtflys.forest.springboot.annotation.ForestScannerRegister;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||||
import com.muyu.market.domian.Defined;
|
import com.muyu.market.domian.Defined;
|
||||||
|
import com.muyu.market.domian.req.DefinedReq;
|
||||||
import com.muyu.master.service.DefinedService;
|
import com.muyu.master.service.DefinedService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
@ -30,50 +32,53 @@ import java.util.List;
|
||||||
@Tag(name = "定义接口控制层",description = "进行客户管理,查看等相关操作")
|
@Tag(name = "定义接口控制层",description = "进行客户管理,查看等相关操作")
|
||||||
public class DefinedController {
|
public class DefinedController {
|
||||||
|
|
||||||
|
public DefinedController() {
|
||||||
|
log.info("forest扫描路径:{}", ForestScannerRegister.getBasePackages());
|
||||||
|
}
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * 接口业务层
|
* 接口业务层
|
||||||
// */
|
*/
|
||||||
// @Autowired
|
@Autowired
|
||||||
// private DefinedService definedService;
|
private DefinedService definedService;
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 接口列表
|
* 接口列表
|
||||||
// */
|
*/
|
||||||
// @RequestMapping(path = "/list",method = RequestMethod.POST)
|
@RequestMapping(path = "/list",method = RequestMethod.POST)
|
||||||
// @Operation(summary = "查询",description = "根据接口的名称、编码,是否开启等可以进行筛选")
|
@Operation(summary = "查询",description = "根据接口的名称、编码,是否开启等可以进行筛选")
|
||||||
// public Result<List<Defined>> selectList(
|
public Result<List<Defined>> selectList(
|
||||||
// @Validated @RequestBody Defined defined) {
|
@Validated @RequestBody DefinedReq definedReq) {
|
||||||
// return Result.success(
|
return Result.success(
|
||||||
// definedService.selectList(defined)
|
definedService.selectList(definedReq)
|
||||||
// );
|
);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 接口添加
|
* 接口添加
|
||||||
// */
|
*/
|
||||||
// @PostMapping
|
@PostMapping
|
||||||
// @Operation(summary = "添加", description = "根据接口实体类添加,添加成功之后才可以使用支付类产品")
|
@Operation(summary = "添加", description = "根据接口实体类添加,添加成功之后才可以使用支付类产品")
|
||||||
// public Result<String> save(@Validated @RequestBody Defined defined) {
|
public Result<String> save(@Validated @RequestBody Defined defined) {
|
||||||
// definedService.save(defined);
|
definedService.save(defined);
|
||||||
// return Result.success();
|
return Result.success();
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 接口修改
|
* 接口修改
|
||||||
// */
|
*/
|
||||||
// @PutMapping("/{definedId}")
|
@PutMapping("/{definedId}")
|
||||||
// @Operation(summary = "修改", description = "通过ID修改信息")
|
@Operation(summary = "修改", description = "通过ID修改信息")
|
||||||
// public Result<String> updateById(
|
public Result<String> updateById(
|
||||||
// @Validated @RequestBody Defined defined,
|
@Validated @RequestBody Defined defined,
|
||||||
// @Schema(title = "ID", defaultValue = "1", type = "Long", description = "修改信息所需的唯一条件")
|
@Schema(title = "ID", defaultValue = "1", type = "Long", description = "修改信息所需的唯一条件")
|
||||||
// @PathVariable("definedId") Long definedId) {
|
@PathVariable("definedId") Long definedId) {
|
||||||
//
|
|
||||||
// definedService.updateById(defined);
|
definedService.updateById(defined);
|
||||||
// return Result.success();
|
return Result.success();
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ package com.muyu.master.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.market.domian.Defined;
|
import com.muyu.market.domian.Defined;
|
||||||
|
import com.muyu.market.domian.req.DefinedReq;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,4 +16,8 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface DefinedService extends IService<Defined> {
|
public interface DefinedService extends IService<Defined> {
|
||||||
|
|
||||||
|
List<Defined> selectList(DefinedReq definedReq);
|
||||||
|
// public Object definedBuild(String code, int limit);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.muyu.market.domian.Defined;
|
import com.muyu.market.domian.Defined;
|
||||||
|
import com.muyu.market.domian.req.DefinedReq;
|
||||||
import com.muyu.master.mapper.DefinedMapper;
|
import com.muyu.master.mapper.DefinedMapper;
|
||||||
|
|
||||||
import com.muyu.master.service.DefinedService;
|
import com.muyu.master.service.DefinedService;
|
||||||
|
@ -29,6 +30,29 @@ public class DefinedServiceImpl
|
||||||
@Autowired
|
@Autowired
|
||||||
private DefinedMapper definedMapper;
|
private DefinedMapper definedMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DefinedService definedService;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Defined> selectList(DefinedReq definedReq) {
|
||||||
|
|
||||||
|
/**模糊查询 名称**/
|
||||||
|
LambdaQueryWrapper<Defined> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.like(
|
||||||
|
StringUtils.isNotEmpty(definedReq.getDefinedName()),
|
||||||
|
Defined::getDefinedName,definedReq.getDefinedName()
|
||||||
|
);
|
||||||
|
|
||||||
|
/**模糊查询 有效期**/
|
||||||
|
queryWrapper.like(
|
||||||
|
StringUtils.isNotEmpty(String.valueOf(definedReq.getDefinedDateValidity())),
|
||||||
|
Defined::getDefinedDateValidity,
|
||||||
|
definedReq.getDefinedDateValidity()
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Defined> list = this.list(queryWrapper);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue