| multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/ProductServiceController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| multi-system/src/main/java/com/gkhy/exam/system/controller/MaterialController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| multi-system/src/main/java/com/gkhy/exam/system/domain/ProductService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| multi-system/src/main/java/com/gkhy/exam/system/mapper/ProductServiceMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| multi-system/src/main/java/com/gkhy/exam/system/service/ProductServiceService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| multi-system/src/main/java/com/gkhy/exam/system/service/impl/ProductServiceServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| multi-system/src/main/java/com/gkhy/exam/system/service/impl/StandardizedTemplateServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| multi-system/src/main/resources/mapper/system/ProductServiceMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/ProductServiceController.java
对比新文件 @@ -0,0 +1,60 @@ package com.gkhy.exam.admin.controller.web; import com.gkhy.exam.common.annotation.RepeatSubmit; import com.gkhy.exam.common.api.CommonResult; import com.gkhy.exam.system.domain.ProductService; import com.gkhy.exam.system.service.ProductServiceService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; /** * <p> * 产品服务实现过程 前端控制器 * </p> * * @author hh * @since 2025-12-02 16:59:08 */ @Api(tags = "产品服务实现过程") @RestController @RequestMapping("/system/productService") public class ProductServiceController { @Autowired private ProductServiceService productServiceService; @ApiOperation(value = "产品服务实现过程列表(分页)") @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = false, value = "公司id"), @ApiImplicitParam(paramType = "query", name = "year", dataType = "String", required = false, value = "年份"), }) @GetMapping("/selectProductServiceList") public CommonResult selectProductServiceList(ProductService service){ return CommonResult.success(productServiceService.selectProductServiceList(service)); } @RepeatSubmit @ApiOperation(value = "新增编辑产品服务实现过程") @PostMapping("/saveProductService") public CommonResult saveProductService(@RequestBody @Validated ProductService service){ return productServiceService.saveProductService(service); } @ApiOperation(value = "删除产品服务实现过程") @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "id", dataType = "int", required = true, value = "id"), }) @GetMapping("/delProductService") public CommonResult delProductService(@RequestParam Long id){ return productServiceService.delProductService(id); } } multi-system/src/main/java/com/gkhy/exam/system/controller/MaterialController.java
文件已删除 multi-system/src/main/java/com/gkhy/exam/system/domain/ProductService.java
对比新文件 @@ -0,0 +1,60 @@ package com.gkhy.exam.system.domain; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import java.time.LocalDateTime; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Getter; import lombok.Setter; import javax.validation.constraints.NotNull; /** * <p> * 产品服务实现过程 * </p> * * @author hh * @since 2025-12-02 16:59:08 */ @Getter @Setter @TableName("product_service") @ApiModel(value = "ProductService对象", description = "产品服务实现过程") public class ProductService implements Serializable { private static final long serialVersionUID = 1L; @TableId("id") private Long id; @ApiModelProperty("企业id") @TableField("company_id") @NotNull(message = "companyId不能为空") private Integer companyId; @TableField("file_url") @NotNull(message = "图片不能为空") @ApiModelProperty("文件路径") private String fileUrl; @TableField("del_flag") private Integer delFlag; @TableField("create_by") private String createBy; @TableField("create_time") private LocalDateTime createTime; @TableField("update_by") private String updateBy; @TableField("update_time") private LocalDateTime updateTime; } multi-system/src/main/java/com/gkhy/exam/system/mapper/ProductServiceMapper.java
对比新文件 @@ -0,0 +1,22 @@ package com.gkhy.exam.system.mapper; import com.gkhy.exam.system.domain.ProductService; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; import java.util.List; /** * <p> * 产品服务实现过程 Mapper 接口 * </p> * * @author hh * @since 2025-12-02 16:59:08 */ @Mapper public interface ProductServiceMapper extends BaseMapper<ProductService> { List<ProductService> selectProductServiceList(ProductService productService); } multi-system/src/main/java/com/gkhy/exam/system/service/ProductServiceService.java
对比新文件 @@ -0,0 +1,25 @@ package com.gkhy.exam.system.service; import com.gkhy.exam.common.api.CommonPage; import com.gkhy.exam.common.api.CommonResult; import com.gkhy.exam.system.domain.ProductService; import com.baomidou.mybatisplus.extension.service.IService; /** * <p> * 产品服务实现过程 服务类 * </p> * * @author hh * @since 2025-12-02 16:59:08 */ public interface ProductServiceService extends IService<ProductService> { CommonPage selectProductServiceList(ProductService productService); CommonResult saveProductService(ProductService productService); CommonResult delProductService(Long id); } multi-system/src/main/java/com/gkhy/exam/system/service/impl/ProductServiceServiceImpl.java
对比新文件 @@ -0,0 +1,68 @@ package com.gkhy.exam.system.service.impl; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.gkhy.exam.common.api.CommonPage; import com.gkhy.exam.common.api.CommonResult; import com.gkhy.exam.common.constant.UserConstant; import com.gkhy.exam.common.utils.PageUtils; import com.gkhy.exam.common.utils.SecurityUtils; import com.gkhy.exam.system.domain.InternalKnowledge; import com.gkhy.exam.system.domain.ProductService; import com.gkhy.exam.system.mapper.ProductServiceMapper; import com.gkhy.exam.system.service.ProductServiceService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.time.LocalDateTime; import java.util.List; /** * <p> * 产品服务实现过程 服务实现类 * </p> * * @author hh * @since 2025-12-02 16:59:08 */ @Service public class ProductServiceServiceImpl extends ServiceImpl<ProductServiceMapper, ProductService> implements ProductServiceService { @Autowired private ProductServiceMapper productServiceMapper; @Override public CommonPage selectProductServiceList(ProductService productService) { PageUtils.startPage(); List<ProductService> productServices = productServiceMapper.selectProductServiceList(productService); return CommonPage.restPage(productServices); } @Override public CommonResult saveProductService(ProductService productService) { String[] split = productService.getFileUrl().split(","); if (split.length > 3){ return CommonResult.failed("最多上传3张图片"); } if (productService.getId() == null){ productService.setCreateTime(LocalDateTime.now()); productService.setCreateBy(SecurityUtils.getUsername()); productServiceMapper.insert(productService); }else { productService.setUpdateTime(LocalDateTime.now()); productService.setUpdateBy(SecurityUtils.getUsername()); productServiceMapper.updateById(productService); } return CommonResult.success(); } @Override public CommonResult delProductService(Long id) { productServiceMapper.update(new ProductService(), new LambdaUpdateWrapper<ProductService>().eq(ProductService::getId, id) .set(ProductService::getDelFlag, UserConstant.DISENABLE) .set(ProductService::getUpdateTime, LocalDateTime.now()) .set(ProductService::getUpdateBy, SecurityUtils.getUsername())); return CommonResult.success(); } } multi-system/src/main/java/com/gkhy/exam/system/service/impl/StandardizedTemplateServiceImpl.java
@@ -1,5 +1,6 @@ package com.gkhy.exam.system.service.impl; import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -19,10 +20,8 @@ import org.springframework.stereotype.Service; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.*; import java.util.stream.Collectors; @Service public class StandardizedTemplateServiceImpl extends ServiceImpl<StandardizedTemplateMapper, StandardizedTemplate> implements StandardizedTemplateService { @@ -48,6 +47,9 @@ @Autowired private CustomerService customerService; @Autowired private ProductServiceMapper productServiceMapper; @Override public CommonPage selectStandardizedTemplateList(StandardizedTemplate standardizedTemplate) { boolean admin = SecurityUtils.adminUser(); @@ -214,6 +216,25 @@ map.put("sysFunctionalDistributions", sysFunctionalDistributions); //程序文件 map.put("companyIndustryTemplates", companyIndustryTemplates); //产品和服务实现过程 LambdaQueryWrapper<ProductService> lambdaQueryWrapper = Wrappers.<ProductService>lambdaQuery() .eq(ProductService::getCompanyId, companyId) .eq(ProductService::getDelFlag, 0); List<ProductService> productServices = productServiceMapper.selectList(lambdaQueryWrapper); if (ObjectUtil.isNotEmpty(productServices)){ List<String> fileUrls = productServices.stream().map(ProductService::getFileUrl).collect(Collectors.toList()); List< String> fileUrlsData = fileUrls.stream().map(fileUrl -> { List<String> collect = Arrays.stream(fileUrl.split(",")).collect(Collectors.toList()); return collect; }).flatMap(Collection::stream).collect(Collectors.toList()); // for (String fileUrl : fileUrls) { // List<String> collect = Arrays.stream(fileUrl.split(",")).collect(Collectors.toList()); // } map.put("productServiceDatas", fileUrlsData); }else { map.put("productServiceDatas", new ArrayList<>()); } return CommonResult.success(map); } } multi-system/src/main/resources/mapper/system/ProductServiceMapper.xml
对比新文件 @@ -0,0 +1,13 @@ <?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.gkhy.exam.system.mapper.ProductServiceMapper"> <select id="selectProductServiceList" resultType="com.gkhy.exam.system.domain.ProductService" parameterType="com.gkhy.exam.system.domain.ProductService"> select * from product_service where del_flag = 0 <if test="companyId != null"> and company_id = #{companyId} </if> order by create_time desc </select> </mapper>