Compare commits
No commits in common. "f41b9a53d2559a2caac780b383c323217eb8f15b" and "bce9420d555169885f74100a5d097399b017f71e" have entirely different histories.
f41b9a53d2
...
bce9420d55
|
@ -2,35 +2,41 @@ package com.mcwl.web.controller.pay.AliPay;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.lang.UUID;
|
import cn.hutool.core.lang.UUID;
|
||||||
|
import cn.hutool.db.sql.Order;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alipay.api.AlipayApiException;
|
import com.alipay.api.*;
|
||||||
import com.alipay.api.AlipayClient;
|
import com.alipay.api.AlipayClient;
|
||||||
import com.alipay.api.AlipayConfig;
|
|
||||||
import com.alipay.api.DefaultAlipayClient;
|
import com.alipay.api.DefaultAlipayClient;
|
||||||
import com.alipay.api.domain.AlipayFundAccountQueryModel;
|
import com.alipay.api.domain.*;
|
||||||
import com.alipay.api.domain.AlipayFundTransToaccountTransferModel;
|
|
||||||
import com.alipay.api.request.AlipayFundAccountQueryRequest;
|
import com.alipay.api.request.AlipayFundAccountQueryRequest;
|
||||||
import com.alipay.api.request.AlipayFundTransToaccountTransferRequest;
|
import com.alipay.api.request.AlipayFundTransToaccountTransferRequest;
|
||||||
|
import com.alipay.api.request.AlipayFundTransUniTransferRequest;
|
||||||
import com.alipay.api.response.AlipayFundAccountQueryResponse;
|
import com.alipay.api.response.AlipayFundAccountQueryResponse;
|
||||||
import com.alipay.api.response.AlipayFundTransToaccountTransferResponse;
|
import com.alipay.api.response.AlipayFundTransToaccountTransferResponse;
|
||||||
|
import com.alipay.api.CertAlipayRequest;
|
||||||
|
import com.alipay.api.response.AlipayFundTransUniTransferResponse;
|
||||||
import com.alipay.easysdk.factory.Factory;
|
import com.alipay.easysdk.factory.Factory;
|
||||||
import com.alipay.easysdk.kernel.Config;
|
import com.alipay.easysdk.kernel.Config;
|
||||||
import com.alipay.easysdk.payment.facetoface.models.AlipayTradePrecreateResponse;
|
import com.alipay.easysdk.payment.facetoface.models.AlipayTradePrecreateResponse;
|
||||||
import com.mcwl.common.core.redis.RedisCache;
|
import com.mcwl.common.core.redis.RedisCache;
|
||||||
import com.mcwl.common.exception.ServiceException;
|
import com.mcwl.common.exception.ServiceException;
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
|
import com.mcwl.memberCenter.domain.Member;
|
||||||
import com.mcwl.memberCenter.domain.MemberLevel;
|
import com.mcwl.memberCenter.domain.MemberLevel;
|
||||||
import com.mcwl.memberCenter.service.MemberLevelService;
|
import com.mcwl.memberCenter.service.MemberLevelService;
|
||||||
import com.mcwl.memberCenter.service.MemberService;
|
import com.mcwl.memberCenter.service.MemberService;
|
||||||
import com.mcwl.pay.config.AliConfig;
|
import com.mcwl.pay.config.AliConfig;
|
||||||
import com.mcwl.pay.domain.OrderTrade;
|
import com.mcwl.pay.domain.OrderTrade;
|
||||||
import com.mcwl.pay.domain.OrderTradeDto;
|
import com.mcwl.pay.domain.OrderTradeDto;
|
||||||
|
import com.mcwl.resource.service.MallProductService;
|
||||||
import com.mcwl.system.service.ISysUserService;
|
import com.mcwl.system.service.ISysUserService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
@ -44,10 +50,17 @@ public class AliPayIntegration {
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisCache redisCache;
|
private RedisCache redisCache;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MemberService memberService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MemberLevelService memberLevelService;
|
private MemberLevelService memberLevelService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MallProductService mallProductService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService sysUserService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AliConfig aliConfig;
|
private AliConfig aliConfig;
|
||||||
|
|
|
@ -1,144 +0,0 @@
|
||||||
package com.mcwl.web.controller.resource;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.mcwl.common.core.controller.BaseController;
|
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
|
||||||
import com.mcwl.resource.domain.ModelProduct;
|
|
||||||
import com.mcwl.resource.domain.vo.MallProductVo;
|
|
||||||
import com.mcwl.resource.service.ModelService;
|
|
||||||
import com.mcwl.web.controller.common.OssUtil;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品
|
|
||||||
* @Author:ChenYan
|
|
||||||
* @Project:McWl
|
|
||||||
* @Package:com.mcwl.web.controller.resource
|
|
||||||
* @Filename:MallProductController
|
|
||||||
* @Description 商品
|
|
||||||
* @Date:2024/12/31 10:48
|
|
||||||
*/
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/model")
|
|
||||||
public class MallProductController extends BaseController {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ModelService modelService;
|
|
||||||
|
|
||||||
|
|
||||||
/***
|
|
||||||
*
|
|
||||||
* 图片
|
|
||||||
* @param file
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/file")
|
|
||||||
public AjaxResult Malifile(@RequestParam MultipartFile file){
|
|
||||||
|
|
||||||
String s = OssUtil.uploadMultipartFile(file);
|
|
||||||
return AjaxResult.success(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***
|
|
||||||
*
|
|
||||||
* zip
|
|
||||||
* @param file
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/zipUrlFile")
|
|
||||||
public AjaxResult zipUrlFile(@RequestParam MultipartFile file){
|
|
||||||
String s = OssUtil.uploadMultipartFile(file);
|
|
||||||
return AjaxResult.success(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***
|
|
||||||
*
|
|
||||||
* 下载zip
|
|
||||||
* @param file
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/zipUrl")
|
|
||||||
public AjaxResult zipUrl(@RequestParam MultipartFile file){
|
|
||||||
String s = OssUtil.uploadMultipartFile(file);
|
|
||||||
return AjaxResult.success(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询商品列表
|
|
||||||
*/
|
|
||||||
@PostMapping("/list")
|
|
||||||
public TableDataInfo list(@RequestBody ModelProduct mallProduct)
|
|
||||||
{
|
|
||||||
startPage();
|
|
||||||
List<ModelProduct> list = modelService.selectMallProductList(mallProduct);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("finbyid")
|
|
||||||
public AjaxResult finbyid(@RequestBody ModelProduct modelVersion)
|
|
||||||
{
|
|
||||||
ModelProduct modelVersion1 = modelService.getById(modelVersion.getId());
|
|
||||||
return AjaxResult.success(modelVersion1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("insert")
|
|
||||||
public AjaxResult insert(@RequestBody ModelProduct modelVersion)
|
|
||||||
{
|
|
||||||
Long userId = SecurityUtils.getUserId();
|
|
||||||
modelVersion.setUserId(userId);
|
|
||||||
modelVersion.setCreateBy(getUsername());
|
|
||||||
modelService.save(modelVersion);
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("update")
|
|
||||||
public AjaxResult update(@RequestBody ModelProduct modelVersion)
|
|
||||||
{
|
|
||||||
Long userId = SecurityUtils.getUserId();
|
|
||||||
modelVersion.setUserId(userId);
|
|
||||||
modelVersion.setUpdateBy(getUsername());
|
|
||||||
modelService.updateById(modelVersion);
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("delete")
|
|
||||||
public AjaxResult delete(@RequestBody ModelProduct modelVersion)
|
|
||||||
{
|
|
||||||
modelService.removeById(modelVersion.getId());
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查看用户发布的作品
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/selectByUserId")
|
|
||||||
public AjaxResult selectByUserId(@RequestBody MallProductVo mallProductVo){
|
|
||||||
|
|
||||||
Page<ModelProduct> mallProductList = modelService.selectByUserId(mallProductVo);
|
|
||||||
return AjaxResult.success(mallProductList);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,118 +0,0 @@
|
||||||
package com.mcwl.web.controller.resource;
|
|
||||||
|
|
||||||
import com.mcwl.common.core.controller.BaseController;
|
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
|
||||||
import com.mcwl.resource.service.ModelVersionService;
|
|
||||||
import com.mcwl.web.controller.common.OssUtil;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/** 模型版本
|
|
||||||
* @Author:ChenYan
|
|
||||||
* @Project:McWl
|
|
||||||
* @Package:com.mcwl.web.controller.resource
|
|
||||||
* @Filename:ModelVersionController
|
|
||||||
* @Description TODO
|
|
||||||
* @Date:2025/1/9 16:47
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("ModelVersion")
|
|
||||||
public class ModelVersionController extends BaseController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ModelVersionService modelVersionService;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***
|
|
||||||
*
|
|
||||||
* 图片
|
|
||||||
* @param file
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/file")
|
|
||||||
public AjaxResult Malifile(@RequestParam MultipartFile file){
|
|
||||||
|
|
||||||
String s = OssUtil.uploadMultipartFile(file);
|
|
||||||
return AjaxResult.success(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***
|
|
||||||
*
|
|
||||||
* zip
|
|
||||||
* @param file
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/zipUrlFile")
|
|
||||||
public AjaxResult zipUrlFile(@RequestParam MultipartFile file){
|
|
||||||
String s = OssUtil.uploadMultipartFile(file);
|
|
||||||
return AjaxResult.success(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***
|
|
||||||
*
|
|
||||||
* 下载zip
|
|
||||||
* @param file
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/zipUrl")
|
|
||||||
public AjaxResult zipUrl(@RequestParam MultipartFile file){
|
|
||||||
String s = OssUtil.uploadMultipartFile(file);
|
|
||||||
return AjaxResult.success(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("list")
|
|
||||||
public TableDataInfo list(@RequestBody ModelVersion modelVersion)
|
|
||||||
{
|
|
||||||
startPage();
|
|
||||||
List<ModelVersion> list = modelVersionService.selectLogininforList(modelVersion);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("finbyid")
|
|
||||||
public AjaxResult finbyid(@RequestBody ModelVersion modelVersion)
|
|
||||||
{
|
|
||||||
ModelVersion modelVersion1 = modelVersionService.getById(modelVersion.getId());
|
|
||||||
return AjaxResult.success(modelVersion1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("insert")
|
|
||||||
public AjaxResult insert(@RequestBody ModelVersion modelVersion)
|
|
||||||
{
|
|
||||||
|
|
||||||
modelVersionService.save(modelVersion);
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("update")
|
|
||||||
public AjaxResult update(@RequestBody ModelVersion modelVersion)
|
|
||||||
{
|
|
||||||
modelVersionService.updateById(modelVersion);
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("delete")
|
|
||||||
public AjaxResult delete(@RequestBody ModelVersion modelVersion)
|
|
||||||
{
|
|
||||||
modelVersionService.removeById(modelVersion.getId());
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,79 +0,0 @@
|
||||||
package com.mcwl.web.controller.resource;
|
|
||||||
|
|
||||||
import com.mcwl.common.core.controller.BaseController;
|
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
|
||||||
import com.mcwl.resource.domain.ToActivity;
|
|
||||||
import com.mcwl.resource.service.ToActivityService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author:ChenYan
|
|
||||||
* @Project:McWl
|
|
||||||
* @Package:com.mcwl.web.controller.resource
|
|
||||||
* @Filename:ToActivityController
|
|
||||||
* @Description TODO
|
|
||||||
* @Date:2025/1/9 17:59
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("ToActivity")
|
|
||||||
public class ToActivityController extends BaseController {
|
|
||||||
@Autowired
|
|
||||||
private ToActivityService toActivityService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询活动列表
|
|
||||||
*/
|
|
||||||
@PostMapping("/list")
|
|
||||||
public TableDataInfo list(@RequestBody ToActivity toActivity)
|
|
||||||
{
|
|
||||||
startPage();
|
|
||||||
List<ToActivity> list = toActivityService.selectToActivityList(toActivity);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("finById")
|
|
||||||
public AjaxResult finById(@RequestBody ToActivity toActivity)
|
|
||||||
{
|
|
||||||
return AjaxResult.success(toActivityService.getById(toActivity));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("add")
|
|
||||||
public AjaxResult add(@RequestBody ToActivity toActivity)
|
|
||||||
{
|
|
||||||
return AjaxResult.success(toActivityService.save(toActivity));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("update")
|
|
||||||
public AjaxResult update(@RequestBody ToActivity toActivity)
|
|
||||||
{
|
|
||||||
return AjaxResult.success(toActivityService.updateById(toActivity));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("delete")
|
|
||||||
public AjaxResult delete(@RequestBody ToActivity toActivity)
|
|
||||||
{
|
|
||||||
return AjaxResult.success(toActivityService.removeById(toActivity));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("deleteByIds")
|
|
||||||
public AjaxResult deleteByIds(@RequestBody List<ToActivity> toActivity)
|
|
||||||
{
|
|
||||||
return AjaxResult.success(toActivityService.removeByIds(toActivity));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.mcwl.common.utils.bean;
|
||||||
|
|
||||||
|
import com.mcwl.common.utils.BetweenTimeUtil;
|
||||||
|
|
||||||
|
|
||||||
|
import com.mcwl.common.domain.RequestConditionEntity;
|
||||||
|
import com.mcwl.common.utils.ResponsePageEntity;
|
||||||
|
import com.mcwl.common.web.BaseMapper;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公共service
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public abstract class BaseService<K, V> {
|
||||||
|
/**
|
||||||
|
* 获取BaseMapper
|
||||||
|
*
|
||||||
|
* @return BaseMapper
|
||||||
|
*/
|
||||||
|
protected abstract BaseMapper getBaseMapper();
|
||||||
|
/**
|
||||||
|
* 用户自定义导出逻辑
|
||||||
|
*
|
||||||
|
* @param v 查询条件
|
||||||
|
* @return 是否自定义
|
||||||
|
*/
|
||||||
|
public boolean customizeExport(V v) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用的分页接口
|
||||||
|
*
|
||||||
|
* @return 数据
|
||||||
|
* @param s 分页请求参数
|
||||||
|
* @param <T> 分页返回实体
|
||||||
|
*/
|
||||||
|
public <S extends RequestConditionEntity, T> ResponsePageEntity<T> searchByPage(S s) {
|
||||||
|
BetweenTimeUtil.parseTime(s);
|
||||||
|
int count = getBaseMapper().searchCount(s);
|
||||||
|
if (count == 0) {
|
||||||
|
return ResponsePageEntity.buildEmpty(s);
|
||||||
|
}
|
||||||
|
List<T> dataList = getBaseMapper().searchByCondition(s);
|
||||||
|
return ResponsePageEntity.build(s, count, dataList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,31 +1,31 @@
|
||||||
//package com.mcwl.common.web;
|
package com.mcwl.common.web;
|
||||||
//
|
|
||||||
//
|
|
||||||
//import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
//
|
|
||||||
//import java.util.List;
|
import java.util.List;
|
||||||
//
|
|
||||||
///**
|
/**
|
||||||
// * 公共mapper
|
* 公共mapper
|
||||||
//
|
|
||||||
// */
|
*/
|
||||||
//public interface BaseMapper<K, V> {
|
public interface BaseMapper<K, V> {
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 根据条件查询数据的数量
|
* 根据条件查询数据的数量
|
||||||
// *
|
*
|
||||||
// * @param v 实体类
|
* @param v 实体类
|
||||||
// * @return 数量
|
* @return 数量
|
||||||
// */
|
*/
|
||||||
// int searchCount(V v);
|
int searchCount(V v);
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 根据条件查询数据
|
* 根据条件查询数据
|
||||||
// *
|
*
|
||||||
// * @param v 实体类
|
* @param v 实体类
|
||||||
// * @return List<K> 实体类的集合
|
* @return List<K> 实体类的集合
|
||||||
// * @throws DataAccessException 数据访问异常
|
* @throws DataAccessException 数据访问异常
|
||||||
// */
|
*/
|
||||||
// List<K> searchByCondition(V v) throws DataAccessException;
|
List<K> searchByCondition(V v) throws DataAccessException;
|
||||||
//
|
|
||||||
//}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@ import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 模型表
|
* 模型表
|
||||||
* @Author:ChenYan
|
* @Author:ChenYan
|
||||||
|
@ -27,18 +29,10 @@ public class ModelProduct extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
@TableId
|
@TableId
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
|
||||||
* 版本ID
|
|
||||||
*/
|
|
||||||
private Long versionId;
|
|
||||||
/**
|
/**
|
||||||
* 名称
|
* 名称
|
||||||
*/
|
*/
|
||||||
private String modelName;
|
private String modelName;
|
||||||
/**
|
|
||||||
* 描述
|
|
||||||
*/
|
|
||||||
private String versionDescription;
|
|
||||||
/***
|
/***
|
||||||
* 用户id
|
* 用户id
|
||||||
*/
|
*/
|
||||||
|
@ -62,7 +56,7 @@ public class ModelProduct extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 参与活动
|
* 参与活动
|
||||||
*/
|
*/
|
||||||
private String activityId;
|
private String activityParticipation;
|
||||||
/**
|
/**
|
||||||
* 是否原创
|
* 是否原创
|
||||||
*/
|
*/
|
||||||
|
@ -74,23 +68,11 @@ public class ModelProduct extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 生图次数
|
* 生图次数
|
||||||
*/
|
*/
|
||||||
private Integer reals;
|
private Integer real;
|
||||||
/**
|
/**
|
||||||
* 下载次数
|
* 下载次数
|
||||||
*/
|
*/
|
||||||
private Integer numbers;
|
private Integer number;
|
||||||
/**
|
|
||||||
* 审核状态
|
|
||||||
*/
|
|
||||||
private Integer auditSatus;
|
|
||||||
/**
|
|
||||||
* 审核失败原因
|
|
||||||
*/
|
|
||||||
private String auditText;
|
|
||||||
/**
|
|
||||||
* 是否推荐模型
|
|
||||||
*/
|
|
||||||
private Integer isRecommend;
|
|
||||||
/**
|
/**
|
||||||
* 删除标志(0代表存在 2代表删除)
|
* 删除标志(0代表存在 2代表删除)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,9 +2,11 @@ package com.mcwl.resource.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.locationtech.jts.noding.SegmentString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 模型版本
|
* 模型版本
|
||||||
|
@ -19,7 +21,7 @@ import lombok.NoArgsConstructor;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Data
|
@Data
|
||||||
@TableName("model_version")
|
@TableName("model_version")
|
||||||
public class ModelVersion {
|
public class ModelVersion extends BaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键ID
|
* 主键ID
|
||||||
|
@ -33,7 +35,7 @@ public class ModelVersion {
|
||||||
/**
|
/**
|
||||||
* 模型类型ID
|
* 模型类型ID
|
||||||
*/
|
*/
|
||||||
private Long modelType;
|
private Long modelTypeId;
|
||||||
/**
|
/**
|
||||||
* 文件地址
|
* 文件地址
|
||||||
*/
|
*/
|
||||||
|
@ -46,22 +48,6 @@ public class ModelVersion {
|
||||||
* 触发词
|
* 触发词
|
||||||
*/
|
*/
|
||||||
private String triggerWords;
|
private String triggerWords;
|
||||||
/**
|
|
||||||
* 采样方法
|
|
||||||
*/
|
|
||||||
private String sampling;
|
|
||||||
/**
|
|
||||||
* 高清修复
|
|
||||||
*/
|
|
||||||
private String high;
|
|
||||||
/**
|
|
||||||
* vae
|
|
||||||
*/
|
|
||||||
private Integer vae;
|
|
||||||
/**
|
|
||||||
* cfg
|
|
||||||
*/
|
|
||||||
private Integer cfg;
|
|
||||||
/**
|
/**
|
||||||
* 是否公开
|
* 是否公开
|
||||||
*/
|
*/
|
||||||
|
@ -103,13 +89,9 @@ public class ModelVersion {
|
||||||
*/
|
*/
|
||||||
private Integer hideImageGenInfo;
|
private Integer hideImageGenInfo;
|
||||||
/**
|
/**
|
||||||
* 审核状态
|
* 状态
|
||||||
*/
|
*/
|
||||||
private Integer auditSatus;
|
private String status;
|
||||||
/**
|
|
||||||
* 审核失败原因
|
|
||||||
*/
|
|
||||||
private String auditText;
|
|
||||||
/**
|
/**
|
||||||
* 删除标志(0代表存在 2代表删除)
|
* 删除标志(0代表存在 2代表删除)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
package com.mcwl.resource.mapper;
|
package com.mcwl.resource.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.mcwl.resource.domain.ModelProduct;
|
import com.mcwl.resource.domain.ModelProduct;
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.mcwl.resource.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author:ChenYan
|
|
||||||
* @Project:McWl
|
|
||||||
* @Package:com.mcwl.resource.mapper
|
|
||||||
* @Filename:ModelVersionMapper
|
|
||||||
* @Description TODO
|
|
||||||
* @Date:2025/1/9 16:55
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface ModelVersionMapper extends BaseMapper<ModelVersion> {
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.mcwl.resource.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.mcwl.resource.domain.ToActivity;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author:ChenYan
|
|
||||||
* @Project:McWl
|
|
||||||
* @Package:com.mcwl.resource.mapper
|
|
||||||
* @Filename:ToActivityMapper
|
|
||||||
* @Description TODO
|
|
||||||
* @Date:2025/1/9 18:01
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface ToActivityMapper extends BaseMapper<ToActivity> {
|
|
||||||
}
|
|
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.mcwl.common.domain.IdsParam;
|
import com.mcwl.common.domain.IdsParam;
|
||||||
import com.mcwl.resource.domain.ModelProduct;
|
import com.mcwl.resource.domain.ModelProduct;
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
|
||||||
import com.mcwl.resource.domain.vo.MallProductVo;
|
import com.mcwl.resource.domain.vo.MallProductVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -17,10 +16,13 @@ import java.util.List;
|
||||||
* @Description TODO
|
* @Description TODO
|
||||||
* @Date:2024/12/30 18:20
|
* @Date:2024/12/30 18:20
|
||||||
*/
|
*/
|
||||||
public interface ModelService extends IService<ModelProduct> {
|
public interface MallProductService extends IService<ModelProduct> {
|
||||||
|
|
||||||
List<ModelProduct> selectMallProductList(ModelProduct sysJob);
|
List<ModelProduct> selectMallProductList(ModelProduct sysJob);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int insertMallProduct(ModelProduct mallProduct);
|
int insertMallProduct(ModelProduct mallProduct);
|
||||||
|
|
||||||
int updateMallProduct(ModelProduct mallProduct);
|
int updateMallProduct(ModelProduct mallProduct);
|
||||||
|
@ -32,4 +34,5 @@ public interface ModelService extends IService<ModelProduct> {
|
||||||
|
|
||||||
Page<ModelProduct> pageLike(MallProductVo mallProductVo, List<Long> list);
|
Page<ModelProduct> pageLike(MallProductVo mallProductVo, List<Long> list);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,21 +0,0 @@
|
||||||
package com.mcwl.resource.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author:ChenYan
|
|
||||||
* @Project:McWl
|
|
||||||
* @Package:com.mcwl.resource.service
|
|
||||||
* @Filename:ModelVersionService
|
|
||||||
* @Description TODO
|
|
||||||
* @Date:2025/1/9 16:52
|
|
||||||
*/
|
|
||||||
|
|
||||||
public interface ModelVersionService extends IService<ModelVersion> {
|
|
||||||
|
|
||||||
List<ModelVersion> selectLogininforList(ModelVersion modelVersion);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
package com.mcwl.resource.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.mcwl.resource.domain.ModelProduct;
|
|
||||||
import com.mcwl.resource.domain.ToActivity;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author:ChenYan
|
|
||||||
* @Project:McWl
|
|
||||||
* @Package:com.mcwl.resource.service
|
|
||||||
* @Filename:ToActivityService
|
|
||||||
* @Description TODO
|
|
||||||
* @Date:2025/1/9 18:00
|
|
||||||
*/
|
|
||||||
public interface ToActivityService extends IService<ToActivity> {
|
|
||||||
List<ToActivity> selectToActivityList(ToActivity toActivity);
|
|
||||||
|
|
||||||
}
|
|
|
@ -7,8 +7,9 @@ import com.mcwl.resource.domain.MallProductLike;
|
||||||
import com.mcwl.resource.domain.ModelProduct;
|
import com.mcwl.resource.domain.ModelProduct;
|
||||||
import com.mcwl.resource.domain.vo.MallProductVo;
|
import com.mcwl.resource.domain.vo.MallProductVo;
|
||||||
import com.mcwl.resource.mapper.MallProductLikeMapper;
|
import com.mcwl.resource.mapper.MallProductLikeMapper;
|
||||||
|
import com.mcwl.resource.mapper.MallProductMapper;
|
||||||
import com.mcwl.resource.service.MallProductLikeService;
|
import com.mcwl.resource.service.MallProductLikeService;
|
||||||
import com.mcwl.resource.service.ModelService;
|
import com.mcwl.resource.service.MallProductService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ public class MallProductLikeServiceImpl implements MallProductLikeService {
|
||||||
private MallProductLikeMapper mallProductLikeMapper;
|
private MallProductLikeMapper mallProductLikeMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ModelService mallProductService;
|
private MallProductService mallProductService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<ModelProduct> selectByUserLike(MallProductVo mallProductVo) {
|
public Page<ModelProduct> selectByUserLike(MallProductVo mallProductVo) {
|
||||||
|
@ -82,6 +83,4 @@ public class MallProductLikeServiceImpl implements MallProductLikeService {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,9 @@ import com.mcwl.common.core.redis.RedisCache;
|
||||||
import com.mcwl.common.domain.IdsParam;
|
import com.mcwl.common.domain.IdsParam;
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
import com.mcwl.resource.domain.ModelProduct;
|
import com.mcwl.resource.domain.ModelProduct;
|
||||||
import com.mcwl.resource.domain.vo.MallProductVo;
|
|
||||||
import com.mcwl.resource.mapper.MallProductMapper;
|
import com.mcwl.resource.mapper.MallProductMapper;
|
||||||
|
import com.mcwl.resource.service.MallProductService;
|
||||||
import com.mcwl.resource.service.ModelService;
|
import com.mcwl.resource.domain.vo.MallProductVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -27,7 +26,7 @@ import java.util.List;
|
||||||
* @Date:2024/12/30 18:22
|
* @Date:2024/12/30 18:22
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class MallProductServiceImpl extends ServiceImpl<MallProductMapper,ModelProduct> implements ModelService {
|
public class MallProductServiceImpl extends ServiceImpl<MallProductMapper,ModelProduct> implements MallProductService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisCache redisCache;
|
private RedisCache redisCache;
|
||||||
|
|
||||||
|
@ -91,8 +90,24 @@ public class MallProductServiceImpl extends ServiceImpl<MallProductMapper,ModelP
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<ModelProduct> pageLike(MallProductVo mallProductVo, List<Long> list) {
|
public Page<ModelProduct> pageLike(MallProductVo mallProductVo, List<Long> list) {
|
||||||
return null;
|
|
||||||
|
// 创建分页对象
|
||||||
|
Page<ModelProduct> mallProductPage = new Page<>(mallProductVo.getPageNumber(), mallProductVo.getPageSize());
|
||||||
|
|
||||||
|
LambdaQueryWrapper<ModelProduct> mallProductLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
mallProductLambdaQueryWrapper.in(ModelProduct::getModelTypeId,list);
|
||||||
|
|
||||||
|
if (mallProductVo.getOrder() == 1){
|
||||||
|
mallProductLambdaQueryWrapper.orderByDesc(ModelProduct::getModelTypeId);
|
||||||
|
}else {
|
||||||
|
mallProductLambdaQueryWrapper.orderByDesc(ModelProduct::getNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
return postMapper.selectPage(mallProductPage,mallProductLambdaQueryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,30 @@
|
||||||
package com.mcwl.resource.service.impl;
|
package com.mcwl.resource.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.mcwl.common.core.domain.AjaxResult;
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
|
import com.mcwl.resource.domain.MallProductLike;
|
||||||
import com.mcwl.resource.domain.ModelImage;
|
import com.mcwl.resource.domain.ModelImage;
|
||||||
import com.mcwl.resource.domain.ModelImageComment;
|
import com.mcwl.resource.domain.ModelImageComment;
|
||||||
|
import com.mcwl.resource.domain.ModelProduct;
|
||||||
import com.mcwl.resource.domain.dto.ModelImageCommentRes;
|
import com.mcwl.resource.domain.dto.ModelImageCommentRes;
|
||||||
import com.mcwl.resource.domain.dto.ModelImageRes;
|
import com.mcwl.resource.domain.dto.ModelImageRes;
|
||||||
|
import com.mcwl.resource.domain.vo.MallProductVo;
|
||||||
|
import com.mcwl.resource.mapper.MallProductLikeMapper;
|
||||||
import com.mcwl.resource.mapper.ModelImageCommentMapper;
|
import com.mcwl.resource.mapper.ModelImageCommentMapper;
|
||||||
import com.mcwl.resource.mapper.ModelImageMapper;
|
import com.mcwl.resource.mapper.ModelImageMapper;
|
||||||
|
import com.mcwl.resource.service.MallProductLikeService;
|
||||||
|
import com.mcwl.resource.service.MallProductService;
|
||||||
|
import com.mcwl.resource.service.ModelImageCommentService;
|
||||||
import com.mcwl.resource.service.ModelImageService;
|
import com.mcwl.resource.service.ModelImageService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
package com.mcwl.resource.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.mcwl.common.utils.StringUtils;
|
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
|
||||||
import com.mcwl.resource.mapper.ModelVersionMapper;
|
|
||||||
import com.mcwl.resource.service.ModelVersionService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author:ChenYan
|
|
||||||
* @Project:McWl
|
|
||||||
* @Package:com.mcwl.resource.service.impl
|
|
||||||
* @Filename:ModelVersionServiceImpl
|
|
||||||
* @Description TODO
|
|
||||||
* @Date:2025/1/9 16:53
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class ModelVersionServiceImpl extends ServiceImpl< ModelVersionMapper,ModelVersion> implements ModelVersionService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ModelVersionService modelVersionService;
|
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ModelVersionMapper modelVersionMapper;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ModelVersion> selectLogininforList(ModelVersion modelVersion) {
|
|
||||||
|
|
||||||
// 创建一个 LambdaQueryWrapper 实例
|
|
||||||
LambdaQueryWrapper<ModelVersion> queryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
|
|
||||||
// 使用非空检查来添加查询条件
|
|
||||||
if (StringUtils.isNotNull(modelVersion.getIsExclusiveModel())) {
|
|
||||||
queryWrapper.eq(ModelVersion::getIsExclusiveModel, modelVersion.getIsExclusiveModel());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (StringUtils.isNotNull(modelVersion.getVersionName())) {
|
|
||||||
queryWrapper.eq(ModelVersion::getVersionName, modelVersion.getVersionName());
|
|
||||||
}
|
|
||||||
|
|
||||||
return modelVersionMapper.selectList(queryWrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
package com.mcwl.resource.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.mcwl.resource.domain.ModelProduct;
|
|
||||||
import com.mcwl.resource.domain.ToActivity;
|
|
||||||
import com.mcwl.resource.mapper.ToActivityMapper;
|
|
||||||
import com.mcwl.resource.service.ToActivityService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author:ChenYan
|
|
||||||
* @Project:McWl
|
|
||||||
* @Package:com.mcwl.resource.service
|
|
||||||
* @Filename:ToActivityServiceImpl
|
|
||||||
* @Description TODO
|
|
||||||
* @Date:2025/1/9 18:01
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class ToActivityServiceImpl extends ServiceImpl<ToActivityMapper, ToActivity> implements ToActivityService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ToActivityService toActivityService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ToActivityMapper toActivityMapper;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ToActivity> selectToActivityList(ToActivity toActivity) {
|
|
||||||
LambdaQueryWrapper<ToActivity> queryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
queryWrapper.eq(ToActivity::getActivityName, toActivity.getActivityName());
|
|
||||||
return toActivityMapper.selectList(queryWrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -9,5 +9,4 @@
|
||||||
<select id="sumNumber" resultType="java.lang.Long">
|
<select id="sumNumber" resultType="java.lang.Long">
|
||||||
SELECT sum(number)sum FROM model where user_id = #{userId} ORDER BY(user_id);
|
SELECT sum(number)sum FROM model where user_id = #{userId} ORDER BY(user_id);
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue