Merge branch 'preview' of https://gitea.qinmian.online/CY/mcwl-ai into feature/resource
# Conflicts: # mcwl-admin/pom.xmlfeature/comment
commit
49e8e7f231
|
@ -54,35 +54,46 @@
|
||||||
<groupId>com.mcwl</groupId>
|
<groupId>com.mcwl</groupId>
|
||||||
<artifactId>mcwl-quartz</artifactId>
|
<artifactId>mcwl-quartz</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- 资源中心模块-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mcwl</groupId>
|
<groupId>com.mcwl</groupId>
|
||||||
<artifactId>mcwl-memberCenter</artifactId>
|
<artifactId>mcwl-resource</artifactId>
|
||||||
<version>3.8.8</version>
|
<version>3.8.8</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<!-- 我的邀请模块-->
|
<!-- 我的邀请模块-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mcwl</groupId>
|
<groupId>com.mcwl</groupId>
|
||||||
<artifactId>mcwl-myInvitation</artifactId>
|
<artifactId>mcwl-myInvitation</artifactId>
|
||||||
<version>3.8.8</version>
|
<version>3.8.8</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- 资源中心模块-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mcwl</groupId>
|
||||||
|
<artifactId>mcwl-resource</artifactId>
|
||||||
|
<version>3.8.8</version>
|
||||||
|
</dependency>
|
||||||
<!-- 代码生成-->
|
<!-- 代码生成-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mcwl</groupId>
|
<groupId>com.mcwl</groupId>
|
||||||
<artifactId>mcwl-generator</artifactId>
|
<artifactId>mcwl-generator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mcwl</groupId>
|
||||||
|
<artifactId>mcwl-memberCenter</artifactId>
|
||||||
|
<version>3.8.8</version>
|
||||||
|
</dependency>
|
||||||
<!-- rabbitmq依赖 -->
|
<!-- rabbitmq依赖 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-amqp</artifactId>
|
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||||
<version>3.1.2</version>
|
<version>3.1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -1,16 +1,19 @@
|
||||||
package com.mcwl.web.controller.resource;
|
package com.mcwl.web.controller.resource;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import com.mcwl.common.core.controller.BaseController;
|
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.domain.MallProduct;
|
||||||
import com.mcwl.resource.service.MallProductService;
|
import com.mcwl.resource.service.MallProductService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author:ChenYan
|
* @Author:ChenYan
|
||||||
* @Project:McWl
|
* @Project:McWl
|
||||||
|
@ -24,73 +27,13 @@ import java.util.List;
|
||||||
public class MallProductController extends BaseController {
|
public class MallProductController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
private final MallProductService mallProductService;
|
private final MallProductService mallProductRuleInfoService;
|
||||||
|
|
||||||
public MallProductController(MallProductService mallProductService) {
|
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);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,3 +164,15 @@ xss:
|
||||||
excludes: /system/notice
|
excludes: /system/notice
|
||||||
# 匹配链接
|
# 匹配链接
|
||||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||||
|
|
||||||
|
|
||||||
|
#aliyun-oss
|
||||||
|
aliyun:
|
||||||
|
oss:
|
||||||
|
file:
|
||||||
|
endPoint: "http://oss-cn-beijing.aliyuncs.com" // 一般不用改,选择自己的地址即可
|
||||||
|
keyid: "保存的key"
|
||||||
|
keyecrets: "保存的secret"
|
||||||
|
#bucket可以在控制台创建,也可以使用java代码创建
|
||||||
|
bucketname: "实例名称"
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,23 @@
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<dependencies>
|
<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框架基本的核心工具 -->
|
<!-- Spring框架基本的核心工具 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
package com.mcwl.resource.service;
|
package com.mcwl.resource.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
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 com.mcwl.resource.domain.MallProduct;
|
||||||
|
import kotlin.Result;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,4 +16,8 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface MallProductService extends IService<MallProduct> {
|
public interface MallProductService extends IService<MallProduct> {
|
||||||
|
|
||||||
|
|
||||||
|
List<MallProduct> selectMallProductRuleInfoList(MallProduct mallProductRuleInfo);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,10 @@ package com.mcwl.resource.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
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.domain.MallProduct;
|
||||||
import com.mcwl.resource.mapper.MallProductMapper;
|
import com.mcwl.resource.mapper.MallProductMapper;
|
||||||
import com.mcwl.resource.service.MallProductService;
|
import com.mcwl.resource.service.MallProductService;
|
||||||
|
import kotlin.Result;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -25,22 +23,20 @@ import java.util.List;
|
||||||
@Service
|
@Service
|
||||||
public class MallProductServiceImpl extends ServiceImpl<MallProductMapper,MallProduct> implements MallProductService {
|
public class MallProductServiceImpl extends ServiceImpl<MallProductMapper,MallProduct> implements MallProductService {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private MallProductMapper mapper;
|
|
||||||
|
|
||||||
// @Override
|
|
||||||
// public List<MallProduct> selectMallProductList(MallProduct mallProduct) {
|
@Autowired
|
||||||
//
|
private MallProductMapper postMapper;
|
||||||
// QueryWrapper<MallProduct> queryWrapper = new QueryWrapper<>();
|
|
||||||
// queryWrapper.lambda().eq(MallProduct::getProductName, mallProduct.getProductName());
|
@Override
|
||||||
// queryWrapper.lambda().eq(MallProduct::getName, mallProduct.getName());
|
public List<MallProduct> selectMallProductRuleInfoList(MallProduct mallProduct) {
|
||||||
// queryWrapper.lambda().eq(MallProduct::getAmount, mallProduct.getAmount());
|
QueryWrapper<MallProduct> queryWrapper = new QueryWrapper<>();
|
||||||
// mapper.selectList(queryWrapper);
|
queryWrapper.lambda().eq(MallProduct::getProductName, mallProduct.getProductName());
|
||||||
//
|
queryWrapper.lambda().eq(MallProduct::getName, mallProduct.getName());
|
||||||
// serviceEntity.setMessage(ResponseCodeEnum.SUCCESS_STATE_ENUM.getName());
|
queryWrapper.lambda().eq(MallProduct::getAmount, mallProduct.getAmount());
|
||||||
// return ;
|
MallProduct mallProducts = postMapper.selectOne(queryWrapper);
|
||||||
//
|
return (List<MallProduct>) mallProducts;
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue