zhangyuewww 2 年 前
コミット
c8ff4b65ad

+ 2 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/cloud/IArticleManagementService.java

@@ -29,6 +29,8 @@ public interface IArticleManagementService{
 							@HttpParam(name = "coverImage", type = HttpParamType.COMMON, description = "封面") String coverImage,
 							@HttpParam(name = "classification", type = HttpParamType.COMMON, description = "分类") String classification,
 							@HttpParam(name = "articleTemplate", type = HttpParamType.COMMON, description = "文章模板") String articleTemplate,
+							@HttpParam(name = "searchKeywords", type = HttpParamType.COMMON, description = " 搜索关键字") String searchKeywords,
+							@HttpParam(name = "language", type = HttpParamType.COMMON, description = " 语言") String language,
 							@HttpParam(name = "status", type = HttpParamType.COMMON, description = "状态") String status,
 							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
 							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,

+ 56 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/cloud/ICloudClassifyInfoService.java

@@ -0,0 +1,56 @@
+package com.iotechn.unimall.admin.api.cloud;
+
+
+import com.iotechn.unimall.data.domain.CloudClassifyInfo;
+import com.iotechn.unimall.core.annotation.HttpMethod;
+import com.iotechn.unimall.core.annotation.HttpOpenApi;
+import com.iotechn.unimall.core.annotation.HttpParam;
+import com.iotechn.unimall.core.annotation.HttpParamType;
+import com.iotechn.unimall.core.annotation.param.NotNull;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.model.Page;
+import java.util.Date;
+
+/**
+ * 分类Service接口
+ * 
+ * @author jlb
+ * @date 2023-05-29
+ */
+@HttpOpenApi(group = "admin.unimall.cloudClassifyInfo", description = "分类")
+public interface ICloudClassifyInfoService{
+	@HttpMethod(description = "新增",   permissionName = "分类管理")
+	public Boolean add(@NotNull @HttpParam(name = "cloudClassifyInfo", type = HttpParamType.COMMON, description = "分类") CloudClassifyInfo cloudClassifyInfo)throws ServiceException;
+
+	@HttpMethod(description = "列表", permissionName = "分类管理")
+	public Page<CloudClassifyInfo> list(
+								@HttpParam(name = "classifyType", type = HttpParamType.COMMON, description = "类型") String classifyType,
+							@HttpParam(name = "classifyName", type = HttpParamType.COMMON, description = "分类名称") String classifyName,
+							@HttpParam(name = "language", type = HttpParamType.COMMON, description = " 语言") String language,
+							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
+							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
+							@HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "删除标识") Long deleteFlag,
+					@HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
+		@HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)
+		throws ServiceException;
+
+	@HttpMethod(description = "删除",permissionName = "分类管理")
+	public Boolean delete(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")String id)throws ServiceException;
+
+	@HttpMethod(description = "修改",  permissionName = "分类管理")
+	public Boolean update(@NotNull @HttpParam(name = "cloudClassifyInfo", type = HttpParamType.COMMON, description = "分类") CloudClassifyInfo cloudClassifyInfo)throws ServiceException;
+
+	@HttpMethod(description = "查询", permissionName = "分类管理")
+	public CloudClassifyInfo get(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")Long id)throws ServiceException;
+	
+	@HttpMethod(description = "导出excl表",  permissionName = "分类管理")
+	public String export(
+								@HttpParam(name = "classifyType", type = HttpParamType.COMMON, description = "类型") String classifyType,
+							@HttpParam(name = "classifyName", type = HttpParamType.COMMON, description = "分类名称") String classifyName,
+							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
+							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
+							@HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "删除标识") Long deleteFlag,
+				@HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
+	@HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)throws ServiceException;
+	
+}

+ 2 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/cloud/IProductManagementService.java

@@ -29,6 +29,8 @@ public interface IProductManagementService{
 							@HttpParam(name = "coverImage", type = HttpParamType.COMMON, description = "封面") String coverImage,
 							@HttpParam(name = "classification", type = HttpParamType.COMMON, description = "分类") String classification,
 							@HttpParam(name = "productTemplate", type = HttpParamType.COMMON, description = "产品模板") String productTemplate,
+							@HttpParam(name = "searchKeywords", type = HttpParamType.COMMON, description = " 搜索关键字") String searchKeywords,
+							@HttpParam(name = "language", type = HttpParamType.COMMON, description = " 语言") String language,
 							@HttpParam(name = "status", type = HttpParamType.COMMON, description = "状态") String status,
 							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
 							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,

+ 7 - 1
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/cloud/impl/ArticleManagementServiceImpl.java

@@ -38,7 +38,7 @@ public class ArticleManagementServiceImpl implements IArticleManagementService {
 	}
 
 	@Override
-	public Page<ArticleManagement> list(String articleTitle,String articleIntroduction,String coverImage,String classification,String articleTemplate,String status,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
+	public Page<ArticleManagement> list(String articleTitle,String articleIntroduction,String coverImage,String classification,String articleTemplate,String searchKeywords,String language,String status,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
 		Wrapper<ArticleManagement> wrapper = new EntityWrapper<ArticleManagement>();
 														if (!StringUtils.isEmpty(articleTitle)) {
 					wrapper.eq("article_title", articleTitle);
@@ -54,6 +54,12 @@ public class ArticleManagementServiceImpl implements IArticleManagementService {
 				}
 												if (!StringUtils.isEmpty(articleTemplate)) {
 					wrapper.eq("article_template", articleTemplate);
+				}
+												if (!StringUtils.isEmpty(searchKeywords)) {
+					wrapper.like("search_keywords", searchKeywords);
+				}
+				if (!StringUtils.isEmpty(language)) {
+					wrapper.eq("language", language);
 				}
 												if (!StringUtils.isEmpty(status)) {
 					wrapper.eq("status", status);

+ 115 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/cloud/impl/CloudClassifyInfoServiceImpl.java

@@ -0,0 +1,115 @@
+package com.iotechn.unimall.admin.api.cloud.impl;
+
+import java.util.List;
+
+import com.iotechn.unimall.admin.api.cloud.ICloudClassifyInfoService;
+import org.apache.ibatis.session.RowBounds;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.util.ExcelUtil;
+import com.iotechn.unimall.data.mapper.CloudClassifyInfoMapper;
+import com.iotechn.unimall.data.domain.CloudClassifyInfo;
+import com.iotechn.unimall.data.model.Page;
+import java.util.Date;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 分类Service业务层处理
+ * 
+ * @author jlb
+ * @date 2023-05-29
+ */
+@Service
+public class CloudClassifyInfoServiceImpl implements ICloudClassifyInfoService {
+	@Autowired
+	private CloudClassifyInfoMapper cloudClassifyInfoMapper;
+	
+	@Override
+	public Boolean add(CloudClassifyInfo cloudClassifyInfo) throws ServiceException {
+		Date now = new Date();
+		cloudClassifyInfo.setGmtCreate(now);
+		cloudClassifyInfo.setGmtUpdate(now);
+		return cloudClassifyInfoMapper.insert(cloudClassifyInfo)>0;
+	}
+
+	@Override
+	public Page<CloudClassifyInfo> list(String classifyType,String classifyName,String language,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
+		Wrapper<CloudClassifyInfo> wrapper = new EntityWrapper<CloudClassifyInfo>();
+														if (!StringUtils.isEmpty(classifyType)) {
+					wrapper.eq("classify_type", classifyType);
+				}
+												if (!StringUtils.isEmpty(classifyName)) {
+					wrapper.eq("classify_name", classifyName);
+				}
+				if (!StringUtils.isEmpty(language)) {
+					wrapper.eq("language", language);
+				}
+												if (!StringUtils.isEmpty(gmtCreate)) {
+					wrapper.eq("gmt_create", gmtCreate);
+				}
+												if (!StringUtils.isEmpty(gmtUpdate)) {
+					wrapper.eq("gmt_update", gmtUpdate);
+				}
+												if (!StringUtils.isEmpty(deleteFlag)) {
+					wrapper.eq("delete_flag", deleteFlag);
+				}
+							wrapper.eq("delete_flag", 0);
+		List<CloudClassifyInfo> list = cloudClassifyInfoMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+		Integer count = cloudClassifyInfoMapper.selectCount(wrapper);
+		return new Page<CloudClassifyInfo>(list, page, limit, count);
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public Boolean delete(String id) {
+		String[] ids = String.valueOf(id).split(",");
+		for (String tt:ids) {
+			CloudClassifyInfo tmp =  cloudClassifyInfoMapper.selectById(Long.parseLong(tt));
+			if(tmp != null){
+				tmp.setDeleteFlag(1l);
+				cloudClassifyInfoMapper.updateById(tmp);
+			}
+		}
+		return true;
+	}
+
+	@Override
+	public Boolean update(CloudClassifyInfo cloudClassifyInfo) throws ServiceException {
+		Date now = new Date();
+		cloudClassifyInfo.setGmtUpdate(now);
+		return cloudClassifyInfoMapper.updateById(cloudClassifyInfo)>0;
+	}
+
+	@Override
+	public CloudClassifyInfo get(Long id) throws ServiceException {
+		return cloudClassifyInfoMapper.selectById(id);
+	}
+	
+	@Override
+	public String export(String classifyType,String classifyName,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
+		Wrapper<CloudClassifyInfo> wrapper = new EntityWrapper<CloudClassifyInfo>();
+														if (!StringUtils.isEmpty(classifyType)) {
+					wrapper.eq("classify_type", classifyType);
+				}
+												if (!StringUtils.isEmpty(classifyName)) {
+					wrapper.eq("classify_name", classifyName);
+				}
+												if (!StringUtils.isEmpty(gmtCreate)) {
+					wrapper.eq("gmt_create", gmtCreate);
+				}
+												if (!StringUtils.isEmpty(gmtUpdate)) {
+					wrapper.eq("gmt_update", gmtUpdate);
+				}
+												if (!StringUtils.isEmpty(deleteFlag)) {
+					wrapper.eq("delete_flag", deleteFlag);
+				}
+							List<CloudClassifyInfo> list = cloudClassifyInfoMapper.selectList(wrapper);
+		ExcelUtil<CloudClassifyInfo> util = new ExcelUtil<CloudClassifyInfo>(CloudClassifyInfo.class);
+		return util.exportExcel(list, "操作日志");
+	}
+}

+ 7 - 1
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/cloud/impl/ProductManagementServiceImpl.java

@@ -38,7 +38,7 @@ public class ProductManagementServiceImpl implements IProductManagementService {
 	}
 
 	@Override
-	public Page<ProductManagement> list(String productTitle, String productIntroduction, String coverImage, String classification, String productTemplate, String status, Date gmtCreate, Date gmtUpdate, Long deleteFlag, Integer page, Integer limit)throws ServiceException {
+	public Page<ProductManagement> list(String productTitle, String productIntroduction, String coverImage, String classification, String productTemplate,String searchKeywords,String language, String status, Date gmtCreate, Date gmtUpdate, Long deleteFlag, Integer page, Integer limit)throws ServiceException {
 		Wrapper<ProductManagement> wrapper = new EntityWrapper<ProductManagement>();
 														if (!StringUtils.isEmpty(productTitle)) {
 					wrapper.eq("product_title", productTitle);
@@ -54,6 +54,12 @@ public class ProductManagementServiceImpl implements IProductManagementService {
 				}
 												if (!StringUtils.isEmpty(productTemplate)) {
 					wrapper.eq("product_template", productTemplate);
+				}
+												if (!StringUtils.isEmpty(searchKeywords)) {
+					wrapper.like("search_keywords", searchKeywords);
+				}
+				if (!StringUtils.isEmpty(language)) {
+					wrapper.eq("language", language);
 				}
 												if (!StringUtils.isEmpty(status)) {
 					wrapper.eq("status", status);

+ 10 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/ArticleManagement.java

@@ -57,6 +57,16 @@ public class ArticleManagement extends SuperDO{
     @TableField("language")
     private String language;
 
+    /** 内容 */
+    @Excel(name = "内容")
+    @TableField("content")
+    private String content;
+
+    /** 搜索关键字 */
+    @Excel(name = "搜索关键字")
+    @TableField("search_keywords")
+    private String searchKeywords;
+
     /** 状态 */
     @Excel(name = "状态")
     @TableField("status")

+ 72 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/CloudClassifyInfo.java

@@ -0,0 +1,72 @@
+package com.iotechn.unimall.data.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.iotechn.unimall.core.framework.aspectj.lang.annotaion.Excel;
+import com.iotechn.unimall.core.framework.aspectj.lang.annotaion.Excel.ColumnType;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import lombok.Data;
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.enums.FieldFill;
+import com.iotechn.unimall.core.util.StringUtils;
+import java.util.Date;
+
+/**
+ * 分类对象 cloud_classify_info
+ * 
+ * @author jlb
+ * @date 2023-05-29
+ */
+@Data
+@TableName("cloud_classify_info")
+public class CloudClassifyInfo extends SuperDO{
+    private static final long serialVersionUID = 1L;
+
+    /**  */
+    @TableId("id")
+    private Long id;
+
+    /** 类型 */
+    @Excel(name = "类型")
+    @TableField("classify_type")
+    private String classifyType;
+
+    /** 分类名称 */
+    @Excel(name = "分类名称")
+    @TableField("classify_name")
+    private String classifyName;
+
+    /** 语言 */
+    @Excel(name = "语言")
+    @TableField("language")
+    private String language;
+
+    /**  */
+    @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
+    @TableField("gmt_create")
+    private Date gmtCreate;
+
+    /**  */
+    @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
+    @TableField("gmt_update")
+    private Date gmtUpdate;
+
+    /** 删除标识 */
+    @Excel(name = "删除标识")
+    @TableField("delete_flag")
+    private Long deleteFlag;
+
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("classifyType", getClassifyType())
+            .append("classifyName", getClassifyName())
+            .append("gmtCreate", getGmtCreate())
+            .append("gmtUpdate", getGmtUpdate())
+            .append("deleteFlag", getDeleteFlag())
+            .toString();
+    }
+}

+ 15 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/ProductManagement.java

@@ -52,6 +52,21 @@ public class ProductManagement extends SuperDO{
     @TableField("product_template")
     private String productTemplate;
 
+    /** 搜索关键字 */
+    @Excel(name = "搜索关键字")
+    @TableField("search_keywords")
+    private String searchKeywords;
+
+    /** 语言 */
+    @Excel(name = "语言")
+    @TableField("language")
+    private String language;
+
+    /** 内容 */
+    @Excel(name = "内容")
+    @TableField("content")
+    private String content;
+
     /** 状态 */
     @Excel(name = "状态")
     @TableField("status")

+ 13 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/mapper/CloudClassifyInfoMapper.java

@@ -0,0 +1,13 @@
+package com.iotechn.unimall.data.mapper;
+
+import com.iotechn.unimall.data.domain.CloudClassifyInfo;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+/**
+ * 分类Mapper接口
+ * 
+ * @author jlb
+ * @date 2023-05-29
+ */
+public interface CloudClassifyInfoMapper extends BaseMapper<CloudClassifyInfo>{
+
+}

+ 9 - 0
unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/CloudClassifyInfoMapper.xml

@@ -0,0 +1,9 @@
+<?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.iotechn.unimall.data.mapper.CloudClassifyInfoMapper">
+    
+
+
+</mapper>