Compare commits

..

12 Commits

Author SHA1 Message Date
yang 1e8197f01a build:调整 2025-01-02 16:17:18 +08:00
yang 1b32f289cb 21191 进行的更改 2025-01-02 15:52:13 +08:00
yang 7215fcb48e Merge branch 'refs/heads/feature/my-invitation' into preview
# Conflicts:
#	mcwl-common/src/main/java/com/mcwl/common/domain/response/ResponseEnum.java
#	mcwl-common/src/main/java/com/mcwl/common/domain/response/ServerResponseEntity.java
#	mcwl-common/src/main/java/com/mcwl/common/exception/YamiBizException.java
#	mcwl-common/src/main/java/com/mcwl/common/exception/YamiShopBindException.java
#	mcwl-common/src/main/java/com/mcwl/common/i18n/I18nMessage.java
#	mcwl-common/src/main/java/com/mcwl/common/utils/ImageUtil.java
2025-01-02 15:49:11 +08:00
ChenYan 51055443c5 build:依赖 工具 2025-01-02 14:56:54 +08:00
ChenYan 1a1803b991 build:依赖 工具 2025-01-02 14:52:02 +08:00
ChenYan 1f05411e72 Merge branch 'feature/resource' of https://gitea.qinmian.online/CY/mcwl-ai into preview
# Conflicts:
#	mcwl-admin/src/main/resources/application.yml
2025-01-02 14:21:26 +08:00
ChenYan 76a23fa933 build:依赖 工具 2025-01-02 14:18:31 +08:00
ChenYan 5f5cc9aa7e build:依赖 工具 2025-01-02 11:44:13 +08:00
ChenYan 49e8e7f231 Merge branch 'preview' of https://gitea.qinmian.online/CY/mcwl-ai into feature/resource
# Conflicts:
#	mcwl-admin/pom.xml
2024-12-31 19:07:26 +08:00
ChenYan e35045b1c8 Merge branch 'master' of https://gitea.qinmian.online/CY/mcwl-ai into feature/resource
# Conflicts:
#	mcwl-admin/pom.xml
2024-12-31 16:15:51 +08:00
ChenYan 12b00c70ed Merge branch 'preview' of https://gitea.qinmian.online/CY/mcwl-ai 2024-12-31 16:12:50 +08:00
ChenYan 04f0d884f0 Merge branch 'preview' of https://gitea.qinmian.online/CY/mcwl-ai 2024-12-30 14:49:14 +08:00
12 changed files with 133 additions and 204 deletions

View File

@ -67,6 +67,12 @@
<artifactId>mcwl-myInvitation</artifactId>
<version>3.8.8</version>
</dependency>
<!-- 公共模块-->
<dependency>
<groupId>com.mcwl</groupId>
<artifactId>mcwl-common</artifactId>
<version>3.8.8</version>
</dependency>
<!-- 资源中心模块-->
<dependency>
<groupId>com.mcwl</groupId>

View File

@ -1,16 +1,12 @@
package com.mcwl.web.controller.resource;
import com.mcwl.common.annotation.Anonymous;
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.domain.IdsParam;
import com.mcwl.resource.domain.MallProduct;
import com.mcwl.resource.service.MallProductService;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -22,6 +18,7 @@ import java.util.List;
* @Description
* @Date2024/12/31 10:48
*/
@RestController
@RequestMapping("/MallProduct")
public class MallProductController extends BaseController {
@ -34,6 +31,56 @@ public class MallProductController extends BaseController {
}
/**
*
*/
@GetMapping("/list")
public TableDataInfo list(MallProduct sysJob)
{
startPage();
List<MallProduct> list = mallProductRuleInfoService.selectMallProductList(sysJob);
return getDataTable(list);
}
/**
*
*/
@GetMapping(value = "/{jobId}")
public AjaxResult getInfo(@PathVariable("jobId") Long jobId)
{
return success(mallProductRuleInfoService.selectMallProductById(jobId));
}
/**
*
*/
@PostMapping("/add")
public AjaxResult add(@RequestBody MallProduct mallProduct)
{
mallProduct.setCreateBy(getUsername());
return toAjax(mallProductRuleInfoService.insertMallProduct(mallProduct));
}
/**
*
*/
@PutMapping("/upda")
public AjaxResult edit(@RequestBody MallProduct mallProduct)
{
mallProduct.setUpdateBy(getUsername());
return toAjax(mallProductRuleInfoService.updateMallProduct(mallProduct));
}
/**
*
*/
@PostMapping
public AjaxResult remove(@RequestBody IdsParam ids)
{
mallProductRuleInfoService.deleteMallProductByIds(ids);
return success();
}
}

View File

@ -121,7 +121,6 @@ mybatis-plus:
# 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
# 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
logImpl: org.apache.ibatis.logging.slf4j.Slf4jImpl
# 枚举处理器
default-enum-type-handler: com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler
global-config:
# 是否打印 Logo banner

View File

@ -21,8 +21,8 @@ public class BaseEntity implements Serializable
private static final long serialVersionUID = 1L;
/** 搜索值 */
@JsonIgnore
@TableField(exist = false)
@JsonIgnore
private String searchValue;
/** 创建者 */

View File

@ -1,144 +0,0 @@
///*
// * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
// *
// * https://www.mall4j.com/
// *
// * 未经允许,不可做商业用途!
// *
// * 版权所有,侵权必究!
// */
//package com.mcwl.common.i18n;
//
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.context.i18n.LocaleContextHolder;
//import org.springframework.context.support.MessageSourceAccessor;
//import org.springframework.context.support.ReloadableResourceBundleMessageSource;
//
//import java.io.IOException;
//import java.util.Locale;
//import java.util.Objects;
//
///**
// * 多语言国际化消息工具类
// * @author mcwl
// */
//@Slf4j
//public class I18nMessage {
// private static MessageSourceAccessor accessor;
//
//// private static final String BASE_FOLDE = "i18n";
//
// private static final String BASE_NAME = "i18n/messages";
//
// static{
// ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource = new ReloadableResourceBundleMessageSource();
// reloadableResourceBundleMessageSource.setBasenames(BASE_NAME);
// reloadableResourceBundleMessageSource.setCacheSeconds(5);
// reloadableResourceBundleMessageSource.setDefaultEncoding("UTF-8");
// accessor = new MessageSourceAccessor(reloadableResourceBundleMessageSource);
// }
//
//
//// /**
//// * 获取一条语言配置信息
//// *
//// * @param message 配置信息属性名,eg: api.response.code.user.signUp
//// * @return
//// */
//// public static String getMessage(String message) {
//// Locale locale = LocaleContextHolder.getLocale();
//// return I18nMessage.accessor.getMessage(message,locale);
//// }
//
// /**
// * 获取一条语言配置信息
// *
// * @param message 配置信息属性名,eg: api.response.code.user.signUp
// * @return
// */
// public static String getMessage(String message) {
// Locale locale = LocaleContextHolder.getLocale();
// try {
// return accessor.getMessage(message,locale);
// }catch (Exception e){
// return message;
// }
//
// }
// /**
// * 获取一条语言配置信息(后台管理)
// *
// * @return
// * @throws IOException
// */
// public static Integer getLang() {
// Locale locale = LocaleContextHolder.getLocale();
// return LanguageEnum.valueOf(locale).getLang();
// }
//
// /**
// * 获取一条语言配置信息(小程序、pc)
// *
// * @return
// * @throws IOException
// */
// public static Integer getDbLang() {
// Integer lang = getLang();
// if (Objects.equals(lang, 0)) {
// return LanguageEnum.LANGUAGE_ZH_CN.getLang();
// }
// return lang;
// }
//
//// /**
//// * 获取文件夹下所有的国际化文件名
//// *
//// * @param folderName 文件名
//// * @return
//// * @throws IOException
//// */
//// private static String[] getAllBaseNames(final String folderName) throws IOException {
//// URL url = Thread.currentThread().getContextClassLoader()
//// .getResource(folderName);
//// if (null == url) {
//// throw new RuntimeException("无法获取资源文件路径");
//// }
////
//// List<String> baseNames = new ArrayList<>();
//// if (url.getProtocol().equalsIgnoreCase("file")) {
//// // 文件夹形式,用File获取资源路径
//// File file = new File(url.getFile());
//// if (file.exists() && file.isDirectory()) {
//// baseNames = Files.walk(file.toPath())
//// .filter(path -> path.toFile().isFile())
//// .map(Path::toString)
//// .map(path -> path.substring(path.indexOf(folderName)))
//// .map(I18nMessage::getI18FileName)
//// .distinct()
//// .collect(Collectors.toList());
//// } else {
//// log.error("指定的baseFile不存在或者不是文件夹");
//// }
//// }
//// return baseNames.toArray(new String[0]);
//// }
////
//// /**
//// * 把普通文件名转换成国际化文件名
//// *
//// * @param filename
//// * @return
//// */
//// private static String getI18FileName(String filename) {
//// filename = filename.replace(".properties", "");
////// for (int i = 0; i < 2; i++) {
////// int index = filename.lastIndexOf("_");
////// if (index != -1) {
////// filename = filename.substring(0, index);
////// }
////// }
//// return filename.replace("\\", "/");
//// }
//
//}

View File

@ -1,43 +0,0 @@
package com.mcwl.framework.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
import com.mcwl.common.constant.Constants;
/**
*
*
* @author mcwl
*/
@Configuration
public class I18nConfig implements WebMvcConfigurer
{
@Bean
public LocaleResolver localeResolver()
{
SessionLocaleResolver slr = new SessionLocaleResolver();
// 默认语言
slr.setDefaultLocale(Constants.DEFAULT_LOCALE);
return slr;
}
@Bean
public LocaleChangeInterceptor localeChangeInterceptor()
{
LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
// 参数名
lci.setParamName("lang");
return lci;
}
@Override
public void addInterceptors(InterceptorRegistry registry)
{
registry.addInterceptor(localeChangeInterceptor());
}
}

View File

@ -35,8 +35,7 @@ public class UserMember extends BaseEntity {
// 会员积分
private Integer points;
// 订阅状态 active活跃、inactive非活跃、pending待支付和expired过期
@EnumValue
// 订阅状态 active活跃连续包月、inactive非活跃不连续包月、pending待支付和expired过期
private MemberMenu subscriptionStatus;
// 支付方式

View File

@ -24,7 +24,6 @@ import java.math.BigDecimal;
public class MallProduct extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@ -54,6 +53,11 @@ public class MallProduct extends BaseEntity {
*
*/
private BigDecimal amount;
/**
* (0 1 2 3)
*/
private String status;
/**
*
*/

View File

@ -3,6 +3,7 @@ package com.mcwl.resource.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mcwl.resource.domain.MallProduct;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* @AuthorChenYan
@ -14,4 +15,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface MallProductMapper extends BaseMapper<MallProduct> {
String selectMallProductById(@Param("mallProductId") Long mallProductId);
}

View File

@ -1,6 +1,7 @@
package com.mcwl.resource.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mcwl.common.domain.IdsParam;
import com.mcwl.resource.domain.MallProduct;
import kotlin.Result;
@ -16,8 +17,16 @@ import java.util.List;
*/
public interface MallProductService extends IService<MallProduct> {
List<MallProduct> selectMallProductList(MallProduct sysJob);
List<MallProduct> selectMallProductRuleInfoList(MallProduct mallProductRuleInfo);
String selectMallProductById(Long mallProductId);
int insertMallProduct(MallProduct mallProduct);
int updateMallProduct(MallProduct mallProduct);
void deleteMallProductByIds(IdsParam ids);
}

View File

@ -2,6 +2,7 @@ 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.domain.IdsParam;
import com.mcwl.resource.domain.MallProduct;
import com.mcwl.resource.mapper.MallProductMapper;
import com.mcwl.resource.service.MallProductService;
@ -28,14 +29,34 @@ public class MallProductServiceImpl extends ServiceImpl<MallProductMapper,MallPr
@Autowired
private MallProductMapper postMapper;
@Override
public List<MallProduct> selectMallProductRuleInfoList(MallProduct mallProduct) {
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());
MallProduct mallProducts = postMapper.selectOne(queryWrapper);
return (List<MallProduct>) mallProducts;
return postMapper.selectList(queryWrapper);
}
@Override
public String selectMallProductById(Long mallProductId) {
return postMapper.selectMallProductById(mallProductId);
}
@Override
public int insertMallProduct(MallProduct mallProduct) {
return postMapper.insert(mallProduct);
}
@Override
public int updateMallProduct(MallProduct mallProduct) {
return postMapper.updateById(mallProduct);
}
@Override
public void deleteMallProductByIds(IdsParam ids) {
postMapper.deleteBatchIds(ids.getIds());
}

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mcwl.resource.mapper.MallProductMapper">
<select id="selectMallProductById" resultType="java.lang.String">
select id,
user_id,
product_id,
product_name,
detail,
model,
amount,
name,
status,
zip_url,
url,
create_by,
create_time,
update_by,
update_time,
remark,
del_flag
from mall_product where product_id =#{mallProductId}
</select>
</mapper>