build:依赖 工具

feature/comment
ChenYan 2024-12-31 19:05:37 +08:00
parent 9d5cf6040d
commit b778e26fbc
6 changed files with 63 additions and 87 deletions

View File

@ -54,6 +54,12 @@
<groupId>com.mcwl</groupId>
<artifactId>mcwl-quartz</artifactId>
</dependency>
<!-- 资源中心模块-->
<dependency>
<groupId>com.mcwl</groupId>
<artifactId>mcwl-resource</artifactId>
<version>3.8.8</version>
</dependency>
<!-- 我的邀请模块-->
<dependency>

View File

@ -1,16 +1,19 @@
package com.mcwl.web.controller.resource;
import com.mcwl.common.core.controller.BaseController;
import com.mcwl.common.utils.ResponsePageEntity;
import com.mcwl.common.core.page.TableDataInfo;
import com.mcwl.resource.domain.MallProduct;
import com.mcwl.resource.service.MallProductService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @AuthorChenYan
* @ProjectMcWl
@ -24,73 +27,13 @@ import java.util.List;
public class MallProductController extends BaseController {
private final MallProductService mallProductService;
private final MallProductService mallProductRuleInfoService;
public MallProductController(MallProductService mallProductService) {
this.mallProductService = mallProductService;
this.mallProductRuleInfoService = mallProductService;
}
// /**
// * 通过id查询商品图片信息
// *
// * @param id 系统ID
// * @return 商品图片信息
// */
// @ApiOperation(notes = "通过id查询商品图片信息", value = "通过id查询商品图片信息")
// @GetMapping("/findById")
// public MallProduct findById(Long id) {
// return mallProductService.findById(id);
// }
//
// /**
// * 根据条件查询商品图片列表
// *
// * @param mallProduct 条件
// * @return 商品图片列表
// */
// @ApiOperation(notes = "根据条件查询商品图片列表", value = "根据条件查询商品图片列表")
// @PostMapping("/searchByPage")
// public ResponsePageEntity<MallProduct> searchByPage(@RequestBody MallProduct mallProduct) {
// return mallProductService.searchByPage(mallProduct);
// }
//
//
// /**
// * 添加商品图片
// *
// * @param mallProduct 商品实体
// * @return 影响行数
// */
// @ApiOperation(notes = "添加商品", value = "添加商品")
// @PostMapping("/insert")
// public int insert(@RequestBody MallProduct mallProduct) {
// return mallProductService.insert(mallProduct);
// }
//
// /**
// * 修改商品
// *
// * @param mallProduct 商品实体
// * @return 影响行数
// */
// @ApiOperation(notes = "修改商品", value = "修改商品")
// @PostMapping("/update")
// public int update(@RequestBody MallProduct mallProduct) {
// return mallProductService.update(mallProduct);
// }
//
// /**
// * 批量删除商品
// *
// * @param ids 商品ID集合
// * @return 影响行数
// */
// @ApiOperation(notes = "批量删除商品", value = "批量删除商品")
// @PostMapping("/deleteByIds")
// public int deleteByIds(@RequestBody @NotNull List<Long> ids) {
// return mallProductService.deleteByIds(ids);
// }
//
}

View File

@ -164,3 +164,15 @@ xss:
excludes: /system/notice
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
#aliyun-oss
aliyun:
oss:
file:
endPoint: "http://oss-cn-beijing.aliyuncs.com" // 一般不用改,选择自己的地址即可
keyid: "保存的key"
keyecrets: "保存的secret"
#bucket可以在控制台创建也可以使用java代码创建
bucketname: "实例名称"

View File

@ -17,6 +17,23 @@
</description>
<dependencies>
<!--OSS-->
<dependency>
<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
<version>3.17.1</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1.3</version>
</dependency>
<!-- Spring框架基本的核心工具 -->
<dependency>
<groupId>org.springframework</groupId>

View File

@ -1,11 +1,9 @@
package com.mcwl.resource.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mcwl.common.domain.response.ServerResponseEntity;
import com.mcwl.common.utils.ResponsePageEntity;
import com.mcwl.resource.domain.MallProduct;
import kotlin.Result;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
@ -18,4 +16,8 @@ import java.util.List;
*/
public interface MallProductService extends IService<MallProduct> {
List<MallProduct> selectMallProductRuleInfoList(MallProduct mallProductRuleInfo);
}

View File

@ -2,12 +2,10 @@ package com.mcwl.resource.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mcwl.common.annotation.DataSource;
import com.mcwl.common.enums.DataSourceType;
import com.mcwl.common.enums.ResponseCodeEnum;
import com.mcwl.resource.domain.MallProduct;
import com.mcwl.resource.mapper.MallProductMapper;
import com.mcwl.resource.service.MallProductService;
import kotlin.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -25,22 +23,20 @@ import java.util.List;
@Service
public class MallProductServiceImpl extends ServiceImpl<MallProductMapper,MallProduct> implements MallProductService {
@Autowired
private MallProductMapper mapper;
// @Override
// public List<MallProduct> selectMallProductList(MallProduct mallProduct) {
//
// QueryWrapper<MallProduct> queryWrapper = new QueryWrapper<>();
// queryWrapper.lambda().eq(MallProduct::getProductName, mallProduct.getProductName());
// queryWrapper.lambda().eq(MallProduct::getName, mallProduct.getName());
// queryWrapper.lambda().eq(MallProduct::getAmount, mallProduct.getAmount());
// mapper.selectList(queryWrapper);
//
// serviceEntity.setMessage(ResponseCodeEnum.SUCCESS_STATE_ENUM.getName());
// return ;
//
// }
@Autowired
private MallProductMapper postMapper;
@Override
public List<MallProduct> selectMallProductRuleInfoList(MallProduct mallProduct) {
QueryWrapper<MallProduct> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(MallProduct::getProductName, mallProduct.getProductName());
queryWrapper.lambda().eq(MallProduct::getName, mallProduct.getName());
queryWrapper.lambda().eq(MallProduct::getAmount, mallProduct.getAmount());
MallProduct mallProducts = postMapper.selectOne(queryWrapper);
return (List<MallProduct>) mallProducts;
}
}