|
@@ -1,85 +0,0 @@
|
|
|
-package com.xy.service;
|
|
|
-
|
|
|
-import com.xy.entity.MercFeeConfigAlgorithm;
|
|
|
-import com.xy.mapper.MercFeeConfigAlgorithmMapper;
|
|
|
-import com.xy.service.MercFeeConfigAlgorithmService;
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import lombok.AllArgsConstructor;
|
|
|
-
|
|
|
-import java.util.List;
|
|
|
-import com.xy.utils.R;
|
|
|
-import com.xy.utils.PageBean;
|
|
|
-import com.xy.dto.MercFeeConfigAlgorithmDto;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
-import com.xy.utils.MybatisPlusQuery;
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
-import org.springframework.validation.annotation.Validated;
|
|
|
-import com.xy.utils.Emptys;
|
|
|
-
|
|
|
-import static com.xy.utils.Beans.copy;
|
|
|
-import static com.xy.utils.PlusBeans.toIPage;
|
|
|
-import static com.xy.utils.PlusBeans.toPageBean;
|
|
|
-
|
|
|
-
|
|
|
-/**
|
|
|
-* <p>
|
|
|
-* 商户算法预充配置扩展 服务实现类
|
|
|
-* </p>
|
|
|
-*
|
|
|
-* @author 谭斌
|
|
|
-* @since 2024-04-07
|
|
|
-*/
|
|
|
-@Service
|
|
|
-@AllArgsConstructor
|
|
|
-@Api(tags = "商户算法预充配置扩展")
|
|
|
-public class MercFeeConfigAlgorithmServiceImpl extends ServiceImpl<MercFeeConfigAlgorithmMapper, MercFeeConfigAlgorithm> implements MercFeeConfigAlgorithmService {
|
|
|
-
|
|
|
- @PostMapping("obj")
|
|
|
- @ApiOperation("对象查询")
|
|
|
- public R<MercFeeConfigAlgorithmDto.Vo> obj(@RequestBody MercFeeConfigAlgorithmDto.Vo vo) {
|
|
|
- MercFeeConfigAlgorithmDto.SelectList selectList = copy(MercFeeConfigAlgorithmDto.SelectList.class, vo);
|
|
|
- List<MercFeeConfigAlgorithmDto.Vo> list = list(selectList).getData();
|
|
|
- if(Emptys.check(list)) {
|
|
|
- return R.ok(list.get(0));
|
|
|
- }
|
|
|
- return R.ok();
|
|
|
- }
|
|
|
-
|
|
|
- @PostMapping("list")
|
|
|
- @ApiOperation("集合查询")
|
|
|
- public R<List<MercFeeConfigAlgorithmDto.Vo>> list(@RequestBody MercFeeConfigAlgorithmDto.SelectList selectList) {
|
|
|
- LambdaQueryWrapper<MercFeeConfigAlgorithm> lambdaQueryWrapper = new MybatisPlusQuery().eqWrapper(selectList, MercFeeConfigAlgorithm.class).build();
|
|
|
- List<MercFeeConfigAlgorithm> list = list(lambdaQueryWrapper);
|
|
|
- return R.ok(copy(MercFeeConfigAlgorithmDto.Vo.class, list));
|
|
|
- }
|
|
|
-
|
|
|
- @PostMapping("page")
|
|
|
- @ApiOperation("分页查询")
|
|
|
- public R<PageBean<MercFeeConfigAlgorithmDto.Vo>> page(@RequestBody MercFeeConfigAlgorithmDto.Page page) {
|
|
|
- PageBean pageBean = page.getPage();
|
|
|
- LambdaQueryWrapper<MercFeeConfigAlgorithm> lambdaQueryWrapper = new MybatisPlusQuery().eqWrapper(page, MercFeeConfigAlgorithm.class).build();
|
|
|
- IPage<MercFeeConfigAlgorithm> iPage = page(toIPage(pageBean), lambdaQueryWrapper);
|
|
|
- return R.ok(toPageBean(MercFeeConfigAlgorithmDto.Vo.class, iPage));
|
|
|
- }
|
|
|
-
|
|
|
- @PostMapping("save")
|
|
|
- @ApiOperation("添加")
|
|
|
- public R save(@RequestBody @Validated MercFeeConfigAlgorithmDto.Save save) {
|
|
|
- MercFeeConfigAlgorithm saveInfo = copy(MercFeeConfigAlgorithm.class, save);
|
|
|
- save(saveInfo);
|
|
|
- return R.ok();
|
|
|
- }
|
|
|
-
|
|
|
- @PostMapping("update")
|
|
|
- @ApiOperation("修改")
|
|
|
- public R update(@RequestBody @Validated MercFeeConfigAlgorithmDto.Update update) {
|
|
|
- MercFeeConfigAlgorithm updateInfo = copy(MercFeeConfigAlgorithm.class, update);
|
|
|
- updateById(updateInfo);
|
|
|
- return R.ok();
|
|
|
- }
|
|
|
-}
|