代码同步
parent
d1566d07c6
commit
0f4b94db80
@ -1,26 +1,75 @@
|
|||||||
# ---> Java
|
|
||||||
# Compiled class file
|
# 查看更多 .gitignore 配置 -> https://help.github.com/articles/ignoring-files/
|
||||||
|
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
*.class
|
*.class
|
||||||
|
target/*
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
/build/
|
||||||
|
|
||||||
|
|
||||||
# Log file
|
|
||||||
*.log
|
|
||||||
|
|
||||||
# BlueJ files
|
### admin-web ###
|
||||||
*.ctxt
|
|
||||||
|
|
||||||
# Mobile Tools for Java (J2ME)
|
# dependencies
|
||||||
.mtj.tmp/
|
**/node_modules
|
||||||
|
|
||||||
|
# roadhog-api-doc ignore
|
||||||
|
/src/utils/request-temp.js
|
||||||
|
_roadhog-api-doc
|
||||||
|
|
||||||
|
# production
|
||||||
|
/dist
|
||||||
|
/.vscode
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-error.log
|
||||||
|
|
||||||
|
/coverage
|
||||||
|
.idea
|
||||||
|
yarn.lock
|
||||||
|
package-lock.json
|
||||||
|
*bak
|
||||||
|
.vscode
|
||||||
|
|
||||||
|
# visual studio code
|
||||||
|
.history
|
||||||
|
*.log
|
||||||
|
|
||||||
# Package Files #
|
functions/mock
|
||||||
*.jar
|
.temp/**
|
||||||
*.war
|
|
||||||
*.nar
|
|
||||||
*.ear
|
|
||||||
*.zip
|
|
||||||
*.tar.gz
|
|
||||||
*.rar
|
|
||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# umi
|
||||||
hs_err_pid*
|
.umi
|
||||||
replay_pid*
|
.umi-production
|
||||||
|
|
||||||
|
# screenshot
|
||||||
|
screenshot
|
||||||
|
.firebase
|
||||||
|
sessionStore
|
||||||
|
**/bootstrap-local.yaml
|
||||||
|
bootstrap-local.yaml
|
||||||
|
@ -1,76 +1,64 @@
|
|||||||
package cn.iocoder.yudao.module.configure.api.uniTemplate.dto;
|
package cn.iocoder.yudao.module.configure.api.uniTemplate.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class UniTemplateDTO {
|
public class UniTemplateDTO {
|
||||||
|
|
||||||
/**
|
@ApiModelProperty(value = "编号")
|
||||||
* 编号
|
|
||||||
*/
|
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
|
||||||
* 模板id
|
@ApiModelProperty(value = "是否显示商品详情")
|
||||||
*/
|
private Boolean showGoodsDetail;
|
||||||
private String templateId;
|
|
||||||
/**
|
@ApiModelProperty(value = "商品详情图标")
|
||||||
* 模板名称
|
private String goodsDetailIconUrl;
|
||||||
*/
|
|
||||||
|
@ApiModelProperty(value = "是否显示ai")
|
||||||
|
private Boolean showAi;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ai图标")
|
||||||
|
private String aiIconUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否显示商城")
|
||||||
|
private Boolean showShop;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商城图标")
|
||||||
|
private String shopIconUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "模板名称")
|
||||||
private String templateName;
|
private String templateName;
|
||||||
/**
|
|
||||||
* 头部背景图
|
@ApiModelProperty(value = "模板类型: 1)标准模板; 2)定制模板")
|
||||||
*/
|
private Integer templateType;
|
||||||
private String bgPhotoUrl;
|
|
||||||
/**
|
@ApiModelProperty(value = "背景图片")
|
||||||
* logo图
|
private String bgUrl;
|
||||||
*/
|
|
||||||
private String logoPhotoUrl;
|
@ApiModelProperty(value = "字体颜色 标准模板时有效")
|
||||||
/**
|
|
||||||
* 是否显示logo
|
|
||||||
*/
|
|
||||||
private Boolean showLogo;
|
|
||||||
/**
|
|
||||||
* 是否显示经销流转信息
|
|
||||||
*/
|
|
||||||
private Boolean showFlow;
|
|
||||||
/**
|
|
||||||
* 多次验证提示文案
|
|
||||||
*/
|
|
||||||
private String verifyHint;
|
|
||||||
/**
|
|
||||||
* 多次验证提示阈值设置
|
|
||||||
*/
|
|
||||||
private Integer scanMostNum;
|
|
||||||
/**
|
|
||||||
* 背景颜色
|
|
||||||
*/
|
|
||||||
private String bgColor;
|
|
||||||
/**
|
|
||||||
* 超过阈值后背景颜色
|
|
||||||
*/
|
|
||||||
private String bgColorThreshold;
|
|
||||||
/**
|
|
||||||
* 字体颜色
|
|
||||||
*/
|
|
||||||
private String fontColor;
|
private String fontColor;
|
||||||
/**
|
|
||||||
* 是否显示扫码记录
|
@ApiModelProperty(value = "是否为默认模板")
|
||||||
*/
|
|
||||||
private Boolean showScanRecord;
|
|
||||||
/**
|
|
||||||
* 是否只显示农事作业
|
|
||||||
*/
|
|
||||||
private Boolean onlyShowJob;
|
|
||||||
/**
|
|
||||||
* 是否为默认模板
|
|
||||||
*/
|
|
||||||
private Boolean defaultTemplate;
|
private Boolean defaultTemplate;
|
||||||
/**
|
|
||||||
* 所属商户id
|
@ApiModelProperty(value = "是否显示扫码弹窗")
|
||||||
*/
|
private Boolean showPop;
|
||||||
private Long belongBusinessId;
|
|
||||||
/**
|
@ApiModelProperty(value = "是否显示扫码记录")
|
||||||
* 所属商户名称
|
private Boolean showScanRecord;
|
||||||
*/
|
|
||||||
private String belongBusinessName;
|
@ApiModelProperty(value = "扫码记录图标")
|
||||||
|
private String scanRecordIconUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "环节模板列表")
|
||||||
|
private List<UniTemplateItemDTO> templateItemList;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,29 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.api.uniTemplate.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UniTemplateItemDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "编号")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图标图片")
|
||||||
|
private String iconUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "x轴百分比(相对图片)")
|
||||||
|
private BigDecimal x;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "y轴百分比(相对图片)")
|
||||||
|
private BigDecimal y;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "宽")
|
||||||
|
private BigDecimal width;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "高")
|
||||||
|
private BigDecimal height;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.enums;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序模板类型
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum UniTemplateTypeEnum implements IntArrayValuable {
|
||||||
|
|
||||||
|
STANDARD(1, "标准模板"),
|
||||||
|
CUSTOMIZE(2, "自定义模板"),
|
||||||
|
;
|
||||||
|
|
||||||
|
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(UniTemplateTypeEnum::getType).toArray();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作类型
|
||||||
|
*/
|
||||||
|
private final Integer type;
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] array() {
|
||||||
|
return ARRAYS;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.materialgroup;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo.MaterialGroupCreateReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo.MaterialGroupPageReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo.MaterialGroupRespVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo.MaterialGroupUpdateReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.convert.materialgroup.MaterialGroupConvert;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.materialgroup.MaterialGroupDO;
|
||||||
|
import cn.iocoder.yudao.module.configure.service.materialgroup.MaterialGroupService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
@Api(tags = "管理后台 - 素材管理分组")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/configure/material-group")
|
||||||
|
@Validated
|
||||||
|
public class MaterialGroupController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MaterialGroupService materialGroupService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@ApiOperation("创建素材管理分组")
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-group:create')")
|
||||||
|
public CommonResult<Long> createMaterialGroup(@Valid @RequestBody MaterialGroupCreateReqVO createReqVO) {
|
||||||
|
return success(materialGroupService.createMaterialGroup(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@ApiOperation("更新素材管理分组")
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-group:update')")
|
||||||
|
public CommonResult<Boolean> updateMaterialGroup(@Valid @RequestBody MaterialGroupUpdateReqVO updateReqVO) {
|
||||||
|
materialGroupService.updateMaterialGroup(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@ApiOperation("删除素材管理分组")
|
||||||
|
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-group:delete')")
|
||||||
|
public CommonResult<Boolean> deleteMaterialGroup(@RequestParam("id") Long id) {
|
||||||
|
materialGroupService.deleteMaterialGroup(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@ApiOperation("获得素材管理分组")
|
||||||
|
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-group:query')")
|
||||||
|
public CommonResult<MaterialGroupRespVO> getMaterialGroup(@RequestParam("id") Long id) {
|
||||||
|
MaterialGroupDO materialGroup = materialGroupService.getMaterialGroup(id);
|
||||||
|
return success(MaterialGroupConvert.INSTANCE.convert(materialGroup));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/list/ids")
|
||||||
|
@ApiOperation("获得素材管理分组列表")
|
||||||
|
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-group:query')")
|
||||||
|
public CommonResult<List<MaterialGroupRespVO>> getMaterialGroupListByIds(@RequestParam("ids") Collection<Long> ids) {
|
||||||
|
List<MaterialGroupDO> list = materialGroupService.getMaterialGroupListByids(ids);
|
||||||
|
return success(MaterialGroupConvert.INSTANCE.convertList(list));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@ApiOperation("获得素材管理分组分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-group:query')")
|
||||||
|
public CommonResult<PageResult<MaterialGroupRespVO>> getMaterialGroupPage(@Valid MaterialGroupPageReqVO pageVO) {
|
||||||
|
PageResult<MaterialGroupDO> pageResult = materialGroupService.getMaterialGroupPage(pageVO);
|
||||||
|
return success(MaterialGroupConvert.INSTANCE.convertPage(pageResult));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
@ApiOperation("获得素材管理分组列表")
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-group:query')")
|
||||||
|
public CommonResult<List<MaterialGroupRespVO>> getMaterialGroupList(@Valid MaterialGroupPageReqVO pageVO) {
|
||||||
|
List<MaterialGroupDO> list = materialGroupService.getMaterialGroupList(pageVO);
|
||||||
|
return success(MaterialGroupConvert.INSTANCE.convertList(list));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 素材管理分组创建 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MaterialGroupCreateReqVO extends MaterialGroupBaseVO {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 素材管理分组分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MaterialGroupPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分组名称")
|
||||||
|
private String groupName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private Date[] createTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 素材管理分组 Response VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MaterialGroupRespVO extends MaterialGroupBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "编号", required = true)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 素材管理分组更新 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MaterialGroupUpdateReqVO extends MaterialGroupBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "编号", required = true)
|
||||||
|
@NotNull(message = "编号不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.materialmanagement;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo.*;
|
||||||
|
import cn.iocoder.yudao.module.configure.convert.materialmanagement.MaterialManagementConvert;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.materialmanagement.MaterialManagementDO;
|
||||||
|
import cn.iocoder.yudao.module.configure.service.materialmanagement.MaterialManagementService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
@Api(tags = "管理后台 - 素材管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/configure/material-management")
|
||||||
|
@Validated
|
||||||
|
public class MaterialManagementController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MaterialManagementService materialManagementService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@ApiOperation("创建素材管理")
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-management:create')")
|
||||||
|
public CommonResult<Boolean> createMaterialManagement(@Valid @RequestBody List<MaterialManagementCreateReqVO> createReqVO) {
|
||||||
|
return success(materialManagementService.createMaterialManagement(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@ApiOperation("更新素材管理")
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-management:update')")
|
||||||
|
public CommonResult<Boolean> updateMaterialManagement(@Valid @RequestBody MaterialManagementUpdateReqVO updateReqVO) {
|
||||||
|
materialManagementService.updateMaterialManagement(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update/batchGroup")
|
||||||
|
@ApiOperation("批量移动素材管理分组")
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-management:update')")
|
||||||
|
public CommonResult<Boolean> updateMaterialManagementGroupBatch(@Valid @RequestBody MaterialManagementGroupUpdate materialManagementGroupUpdate) {
|
||||||
|
materialManagementService.updateMaterialManagementGroupBatch(materialManagementGroupUpdate);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@ApiOperation("删除素材管理")
|
||||||
|
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-management:delete')")
|
||||||
|
public CommonResult<Boolean> deleteMaterialManagement(@RequestParam("id") Long id) {
|
||||||
|
materialManagementService.deleteMaterialManagement(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete/batch")
|
||||||
|
@ApiOperation("批量删除素材管理")
|
||||||
|
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-management:delete')")
|
||||||
|
public CommonResult<Boolean> deleteMaterialManagementBatch(@RequestParam("ids") List<Long> ids) {
|
||||||
|
materialManagementService.deleteMaterialManagementBatch(ids);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@ApiOperation("获得素材管理")
|
||||||
|
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-management:query')")
|
||||||
|
public CommonResult<MaterialManagementRespVO> getMaterialManagement(@RequestParam("id") Long id) {
|
||||||
|
MaterialManagementDO materialManagement = materialManagementService.getMaterialManagement(id);
|
||||||
|
return success(MaterialManagementConvert.INSTANCE.convert(materialManagement));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
@ApiOperation("获得素材管理列表")
|
||||||
|
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-management:query')")
|
||||||
|
public CommonResult<List<MaterialManagementRespVO>> getMaterialManagementList(@RequestParam("ids") Collection<Long> ids) {
|
||||||
|
List<MaterialManagementDO> list = materialManagementService.getMaterialManagementList(ids);
|
||||||
|
return success(MaterialManagementConvert.INSTANCE.convertList(list));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@ApiOperation("获得素材管理分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('configure:material-management:query')")
|
||||||
|
public CommonResult<PageResult<MaterialManagementRespVO>> getMaterialManagementPage(@Valid MaterialManagementPageReqVO pageVO) {
|
||||||
|
PageResult<MaterialManagementDO> pageResult = materialManagementService.getMaterialManagementPage(pageVO);
|
||||||
|
return success(MaterialManagementConvert.INSTANCE.convertPage(pageResult));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 素材管理创建 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MaterialManagementCreateReqVO extends MaterialManagementBaseVO {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class MaterialManagementGroupUpdate {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "编号列表", required = true)
|
||||||
|
@NotNull(message = "编号列表不能为空")
|
||||||
|
private List<Long> ids;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分组id", required = true)
|
||||||
|
@NotNull(message = "分组id不能为空")
|
||||||
|
private Long groupId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 素材管理分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MaterialManagementPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分组id")
|
||||||
|
private Long groupId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "素材名称")
|
||||||
|
private String materialName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "素材地址")
|
||||||
|
private String materialUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private Date[] createTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 素材管理 Response VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MaterialManagementRespVO extends MaterialManagementBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "编号", required = true)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 素材管理更新 Request VO")
|
||||||
|
@Data
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MaterialManagementUpdateReqVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "编号", required = true)
|
||||||
|
@NotNull(message = "编号不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分组id", required = true)
|
||||||
|
private Long groupId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "素材名称", required = true)
|
||||||
|
@Length(max = 64, message = "素材名称不能超过64个字符")
|
||||||
|
private String materialName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "素材地址", required = true)
|
||||||
|
private String materialUrl;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.unitemplate.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.unitemplateitem.vo.UniTemplateItemBaseVO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 小程序模板创建 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class UniTemplateCreateCustomizeReqVO extends UniTemplateCreateReqVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否显示商品详情", required = true)
|
||||||
|
@NotNull(message = "是否显示商品详情不能为空")
|
||||||
|
private Boolean showGoodsDetail;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商品详情图标")
|
||||||
|
@Length(max = 256)
|
||||||
|
private String goodsDetailIconUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否显示ai", required = true)
|
||||||
|
@NotNull(message = "是否显示ai不能为空")
|
||||||
|
private Boolean showAi;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ai图标")
|
||||||
|
@Length(max = 256)
|
||||||
|
private String aiIconUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否显示商城", required = true)
|
||||||
|
@NotNull(message = "是否显示商城不能为空")
|
||||||
|
private Boolean showShop;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商城图标")
|
||||||
|
@Length(max = 256)
|
||||||
|
private String shopIconUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "环节模板列表")
|
||||||
|
@Valid
|
||||||
|
private List<UniTemplateItemBaseVO> templateItemList;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.unitemplate.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.unitemplateitem.vo.UniTemplateItemBaseVO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 小程序模板更新 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class UniTemplateUpdateCustomizeReqVO extends UniTemplateUpdateReqVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否显示商品详情", required = true)
|
||||||
|
@NotNull(message = "是否显示商品详情不能为空")
|
||||||
|
private Boolean showGoodsDetail;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商品详情图标", required = true)
|
||||||
|
@NotBlank(message = "商品详情图标不能为空")
|
||||||
|
@Length(max = 256)
|
||||||
|
private String goodsDetailIconUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否显示ai", required = true)
|
||||||
|
@NotNull(message = "是否显示ai不能为空")
|
||||||
|
private Boolean showAi;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ai图标", required = true)
|
||||||
|
@NotBlank(message = "ai图标不能为空")
|
||||||
|
@Length(max = 256)
|
||||||
|
private String aiIconUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否显示商城", required = true)
|
||||||
|
@NotNull(message = "是否显示商城不能为空")
|
||||||
|
private Boolean showShop;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商城图标", required = true)
|
||||||
|
@NotBlank(message = "商城图标不能为空")
|
||||||
|
@Length(max = 256)
|
||||||
|
private String shopIconUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "环节模板列表")
|
||||||
|
@Valid
|
||||||
|
private List<UniTemplateItemBaseVO> templateItemList;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.controller.admin.unitemplateitem.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 小程序模板环节配置明细 Response VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class UniTemplateItemRespVO extends UniTemplateItemBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "编号", required = true)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.convert.materialgroup;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo.*;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.materialgroup.MaterialGroupDO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 素材管理分组 Convert
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MaterialGroupConvert {
|
||||||
|
|
||||||
|
MaterialGroupConvert INSTANCE = Mappers.getMapper(MaterialGroupConvert.class);
|
||||||
|
|
||||||
|
MaterialGroupDO convert(MaterialGroupCreateReqVO bean);
|
||||||
|
|
||||||
|
MaterialGroupDO convert(MaterialGroupUpdateReqVO bean);
|
||||||
|
|
||||||
|
MaterialGroupRespVO convert(MaterialGroupDO bean);
|
||||||
|
|
||||||
|
List<MaterialGroupRespVO> convertList(List<MaterialGroupDO> list);
|
||||||
|
|
||||||
|
PageResult<MaterialGroupRespVO> convertPage(PageResult<MaterialGroupDO> page);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.convert.materialmanagement;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo.*;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.materialmanagement.MaterialManagementDO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 素材管理 Convert
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MaterialManagementConvert {
|
||||||
|
|
||||||
|
MaterialManagementConvert INSTANCE = Mappers.getMapper(MaterialManagementConvert.class);
|
||||||
|
|
||||||
|
MaterialManagementDO convert(MaterialManagementCreateReqVO bean);
|
||||||
|
|
||||||
|
MaterialManagementDO convert(MaterialManagementUpdateReqVO bean);
|
||||||
|
|
||||||
|
MaterialManagementRespVO convert(MaterialManagementDO bean);
|
||||||
|
|
||||||
|
List<MaterialManagementRespVO> convertList(List<MaterialManagementDO> list);
|
||||||
|
|
||||||
|
PageResult<MaterialManagementRespVO> convertPage(PageResult<MaterialManagementDO> page);
|
||||||
|
|
||||||
|
List<MaterialManagementDO> convertList02(List<MaterialManagementCreateReqVO> list);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.dal.dataobject.materialgroup;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 素材管理分组 DO
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@TableName("configure_material_group")
|
||||||
|
@KeySequence("configure_material_group_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class MaterialGroupDO extends BaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 分组名称
|
||||||
|
*/
|
||||||
|
private String groupName;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.dal.dataobject.materialmanagement;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 素材管理 DO
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@TableName("configure_material_management")
|
||||||
|
@KeySequence("configure_material_management_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class MaterialManagementDO extends BaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 分组id
|
||||||
|
*/
|
||||||
|
private Long groupId;
|
||||||
|
/**
|
||||||
|
* 素材名称
|
||||||
|
*/
|
||||||
|
private String materialName;
|
||||||
|
/**
|
||||||
|
* 素材地址
|
||||||
|
*/
|
||||||
|
private String materialUrl;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.dal.dataobject.unitemplateitem;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序模板环节配置明细 DO
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@TableName("configure_uni_template_item")
|
||||||
|
@KeySequence("configure_uni_template_item_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class UniTemplateItemDO extends BaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 模板id
|
||||||
|
*/
|
||||||
|
private String templateId;
|
||||||
|
/**
|
||||||
|
* 图标图片
|
||||||
|
*/
|
||||||
|
private String iconUrl;
|
||||||
|
/**
|
||||||
|
* x轴百分比(相对图片)
|
||||||
|
*/
|
||||||
|
private BigDecimal x;
|
||||||
|
/**
|
||||||
|
* y轴百分比(相对图片)
|
||||||
|
*/
|
||||||
|
private BigDecimal y;
|
||||||
|
/**
|
||||||
|
* 宽
|
||||||
|
*/
|
||||||
|
private BigDecimal width;
|
||||||
|
/**
|
||||||
|
* 高
|
||||||
|
*/
|
||||||
|
private BigDecimal height;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.dal.mysql.materialgroup;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.materialgroup.MaterialGroupDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 素材管理分组 Mapper
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MaterialGroupMapper extends BaseMapperX<MaterialGroupDO> {
|
||||||
|
|
||||||
|
default PageResult<MaterialGroupDO> selectPage(MaterialGroupPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<MaterialGroupDO>()
|
||||||
|
.likeIfPresent(MaterialGroupDO::getGroupName, reqVO.getGroupName())
|
||||||
|
.betweenIfPresent(MaterialGroupDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.orderByAsc(MaterialGroupDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<MaterialGroupDO> selectList(MaterialGroupPageReqVO reqVO) {
|
||||||
|
return selectList(new LambdaQueryWrapperX<MaterialGroupDO>()
|
||||||
|
.likeIfPresent(MaterialGroupDO::getGroupName, reqVO.getGroupName())
|
||||||
|
.betweenIfPresent(MaterialGroupDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.orderByAsc(MaterialGroupDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.dal.mysql.materialmanagement;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.materialmanagement.MaterialManagementDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 素材管理 Mapper
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MaterialManagementMapper extends BaseMapperX<MaterialManagementDO> {
|
||||||
|
|
||||||
|
default PageResult<MaterialManagementDO> selectPage(MaterialManagementPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<MaterialManagementDO>()
|
||||||
|
.eqIfPresent(MaterialManagementDO::getGroupId, reqVO.getGroupId())
|
||||||
|
.likeIfPresent(MaterialManagementDO::getMaterialName, reqVO.getMaterialName())
|
||||||
|
.eqIfPresent(MaterialManagementDO::getMaterialUrl, reqVO.getMaterialUrl())
|
||||||
|
.betweenIfPresent(MaterialManagementDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.eq(MaterialManagementDO::getDeleted,0)
|
||||||
|
.orderByDesc(MaterialManagementDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.dal.mysql.unitemplateitem;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.unitemplateitem.UniTemplateItemDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序模板环节配置明细 Mapper
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface UniTemplateItemMapper extends BaseMapperX<UniTemplateItemDO> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.service.materialgroup;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.validation.*;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo.*;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.materialgroup.MaterialGroupDO;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 素材管理分组 Service 接口
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
public interface MaterialGroupService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建素材管理分组
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
Long createMaterialGroup(@Valid MaterialGroupCreateReqVO createReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新素材管理分组
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void updateMaterialGroup(@Valid MaterialGroupUpdateReqVO updateReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除素材管理分组
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteMaterialGroup(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得素材管理分组
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 素材管理分组
|
||||||
|
*/
|
||||||
|
MaterialGroupDO getMaterialGroup(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得素材管理分组列表
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
* @return 素材管理分组列表
|
||||||
|
*/
|
||||||
|
List<MaterialGroupDO> getMaterialGroupListByids(Collection<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得素材管理分组分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 素材管理分组分页
|
||||||
|
*/
|
||||||
|
PageResult<MaterialGroupDO> getMaterialGroupPage(MaterialGroupPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得素材管理分组列表
|
||||||
|
*
|
||||||
|
* @param pageReqVO 查询
|
||||||
|
* @return 素材管理分组列表
|
||||||
|
*/
|
||||||
|
List<MaterialGroupDO> getMaterialGroupList(MaterialGroupPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,103 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.service.materialgroup;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo.MaterialGroupCreateReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo.MaterialGroupPageReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialgroup.vo.MaterialGroupUpdateReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.convert.materialgroup.MaterialGroupConvert;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.materialgroup.MaterialGroupDO;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.materialmanagement.MaterialManagementDO;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.mysql.materialgroup.MaterialGroupMapper;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.mysql.materialmanagement.MaterialManagementMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
import static cn.iocoder.yudao.module.configure.enums.ErrorCodeConstants.MATERIAL_GROUP_EXISTS_RELATED;
|
||||||
|
import static cn.iocoder.yudao.module.configure.enums.ErrorCodeConstants.MATERIAL_GROUP_NOT_EXISTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 素材管理分组 Service 实现类
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Validated
|
||||||
|
public class MaterialGroupServiceImpl implements MaterialGroupService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MaterialGroupMapper materialGroupMapper;
|
||||||
|
@Resource
|
||||||
|
private MaterialManagementMapper materialManagementMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long createMaterialGroup(MaterialGroupCreateReqVO createReqVO) {
|
||||||
|
// 插入
|
||||||
|
MaterialGroupDO materialGroup = MaterialGroupConvert.INSTANCE.convert(createReqVO);
|
||||||
|
materialGroupMapper.insert(materialGroup);
|
||||||
|
// 返回
|
||||||
|
return materialGroup.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateMaterialGroup(MaterialGroupUpdateReqVO updateReqVO) {
|
||||||
|
// 校验存在
|
||||||
|
validateMaterialGroupExists(updateReqVO.getId());
|
||||||
|
// 更新
|
||||||
|
MaterialGroupDO updateObj = MaterialGroupConvert.INSTANCE.convert(updateReqVO);
|
||||||
|
materialGroupMapper.updateById(updateObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteMaterialGroup(Long id) {
|
||||||
|
// 校验存在
|
||||||
|
validateMaterialGroupExists(id);
|
||||||
|
// 校验是否存在关联素材
|
||||||
|
if (
|
||||||
|
materialManagementMapper.exists(new LambdaQueryWrapperX<MaterialManagementDO>()
|
||||||
|
.eq(MaterialManagementDO::getGroupId, id)
|
||||||
|
.eq(MaterialManagementDO::getDeleted, 0)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
throw exception(MATERIAL_GROUP_EXISTS_RELATED);
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
materialGroupMapper.update(null, new LambdaUpdateWrapper<MaterialGroupDO>()
|
||||||
|
.set(MaterialGroupDO::getDeleted, 1)
|
||||||
|
.eq(MaterialGroupDO::getId, id)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateMaterialGroupExists(Long id) {
|
||||||
|
if (materialGroupMapper.selectById(id) == null) {
|
||||||
|
throw exception(MATERIAL_GROUP_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MaterialGroupDO getMaterialGroup(Long id) {
|
||||||
|
return materialGroupMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MaterialGroupDO> getMaterialGroupListByids(Collection<Long> ids) {
|
||||||
|
return materialGroupMapper.selectBatchIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<MaterialGroupDO> getMaterialGroupPage(MaterialGroupPageReqVO pageReqVO) {
|
||||||
|
return materialGroupMapper.selectPage(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MaterialGroupDO> getMaterialGroupList(MaterialGroupPageReqVO pageReqVO) {
|
||||||
|
return materialGroupMapper.selectList(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,80 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.service.materialmanagement;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo.MaterialManagementCreateReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo.MaterialManagementGroupUpdate;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo.MaterialManagementPageReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo.MaterialManagementUpdateReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.materialmanagement.MaterialManagementDO;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 素材管理 Service 接口
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
public interface MaterialManagementService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建素材管理
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
Boolean createMaterialManagement(@Valid List<MaterialManagementCreateReqVO> createReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新素材管理
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void updateMaterialManagement(@Valid MaterialManagementUpdateReqVO updateReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量移动素材管理分组
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void updateMaterialManagementGroupBatch(MaterialManagementGroupUpdate materialManagementGroupUpdate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除素材管理
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteMaterialManagement(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除素材管理
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
*/
|
||||||
|
void deleteMaterialManagementBatch(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得素材管理
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 素材管理
|
||||||
|
*/
|
||||||
|
MaterialManagementDO getMaterialManagement(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得素材管理列表
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
* @return 素材管理列表
|
||||||
|
*/
|
||||||
|
List<MaterialManagementDO> getMaterialManagementList(Collection<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得素材管理分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 素材管理分页
|
||||||
|
*/
|
||||||
|
PageResult<MaterialManagementDO> getMaterialManagementPage(MaterialManagementPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,109 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.service.materialmanagement;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo.MaterialManagementCreateReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo.MaterialManagementGroupUpdate;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo.MaterialManagementPageReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.materialmanagement.vo.MaterialManagementUpdateReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.convert.materialmanagement.MaterialManagementConvert;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.materialmanagement.MaterialManagementDO;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.mysql.materialmanagement.MaterialManagementMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
import static cn.iocoder.yudao.module.configure.enums.ErrorCodeConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 素材管理 Service 实现类
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Validated
|
||||||
|
public class MaterialManagementServiceImpl implements MaterialManagementService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MaterialManagementMapper materialManagementMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean createMaterialManagement(List<MaterialManagementCreateReqVO> createReqVO) {
|
||||||
|
// 插入
|
||||||
|
List<MaterialManagementDO> materialManagements = MaterialManagementConvert.INSTANCE.convertList02(createReqVO);
|
||||||
|
materialManagementMapper.insertBatch(materialManagements);
|
||||||
|
// 返回
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateMaterialManagement(MaterialManagementUpdateReqVO updateReqVO) {
|
||||||
|
// 校验存在
|
||||||
|
validateMaterialManagementExists(updateReqVO.getId());
|
||||||
|
// 更新
|
||||||
|
MaterialManagementDO updateObj = MaterialManagementConvert.INSTANCE.convert(updateReqVO);
|
||||||
|
materialManagementMapper.updateById(updateObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateMaterialManagementGroupBatch(MaterialManagementGroupUpdate materialManagementGroupUpdate) {
|
||||||
|
if (materialManagementMapper.selectBatchIds(materialManagementGroupUpdate.getIds()).size() !=
|
||||||
|
materialManagementGroupUpdate.getIds().size()
|
||||||
|
) {
|
||||||
|
throw exception(MATERIAL_GROUP_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
materialManagementMapper.update(null, new LambdaUpdateWrapper<MaterialManagementDO>()
|
||||||
|
.set(MaterialManagementDO::getGroupId, materialManagementGroupUpdate.getGroupId())
|
||||||
|
.in(MaterialManagementDO::getId, materialManagementGroupUpdate.getIds())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteMaterialManagement(Long id) {
|
||||||
|
// 校验存在
|
||||||
|
validateMaterialManagementExists(id);
|
||||||
|
// 删除
|
||||||
|
// materialManagementMapper.deleteById(id);
|
||||||
|
materialManagementMapper.update(null, new LambdaUpdateWrapper<MaterialManagementDO>()
|
||||||
|
.set(MaterialManagementDO::getDeleted, 1)
|
||||||
|
.eq(MaterialManagementDO::getId, id)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteMaterialManagementBatch(List<Long> ids) {
|
||||||
|
if (materialManagementMapper.selectBatchIds(ids).size() != ids.size()) {
|
||||||
|
throw exception(MATERIAL_GROUP_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
materialManagementMapper.update(null, new LambdaUpdateWrapper<MaterialManagementDO>()
|
||||||
|
.set(MaterialManagementDO::getDeleted, 1)
|
||||||
|
.in(MaterialManagementDO::getId, ids)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateMaterialManagementExists(Long id) {
|
||||||
|
if (materialManagementMapper.selectById(id) == null) {
|
||||||
|
throw exception(MATERIAL_MANAGEMENT_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MaterialManagementDO getMaterialManagement(Long id) {
|
||||||
|
return materialManagementMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MaterialManagementDO> getMaterialManagementList(Collection<Long> ids) {
|
||||||
|
return materialManagementMapper.selectBatchIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<MaterialManagementDO> getMaterialManagementPage(MaterialManagementPageReqVO pageReqVO) {
|
||||||
|
return materialManagementMapper.selectPage(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.service.unitemplateitem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序模板环节配置明细 Service 接口
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
public interface UniTemplateItemService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.service.unitemplateitem;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序模板环节配置明细 Service 实现类
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Validated
|
||||||
|
public class UniTemplateItemServiceImpl implements UniTemplateItemService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,98 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.service.unitemplate;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.unitemplate.vo.UniTemplateCreateReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.unitemplate.vo.UniTemplateUpdateReqVO;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.unitemplate.UniTemplateDO;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.mysql.unitemplate.UniTemplateMapper;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.context.annotation.Import;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals;
|
||||||
|
import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException;
|
||||||
|
import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId;
|
||||||
|
import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo;
|
||||||
|
import static cn.iocoder.yudao.module.configure.enums.ErrorCodeConstants.UNI_TEMPLATE_NOT_EXISTS;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link UniTemplateServiceImpl} 的单元测试类
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Import(UniTemplateServiceImpl.class)
|
||||||
|
public class UniTemplateServiceImplTest extends BaseDbUnitTest {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private UniTemplateServiceImpl uniTemplateService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private UniTemplateMapper uniTemplateMapper;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateUniTemplate_success() {
|
||||||
|
// 准备参数
|
||||||
|
UniTemplateCreateReqVO reqVO = randomPojo(UniTemplateCreateReqVO.class);
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Long uniTemplateId = uniTemplateService.createUniTemplate(reqVO);
|
||||||
|
// 断言
|
||||||
|
assertNotNull(uniTemplateId);
|
||||||
|
// 校验记录的属性是否正确
|
||||||
|
UniTemplateDO uniTemplate = uniTemplateMapper.selectById(uniTemplateId);
|
||||||
|
assertPojoEquals(reqVO, uniTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testUpdateUniTemplate_success() {
|
||||||
|
// mock 数据
|
||||||
|
UniTemplateDO dbUniTemplate = randomPojo(UniTemplateDO.class);
|
||||||
|
uniTemplateMapper.insert(dbUniTemplate);// @Sql: 先插入出一条存在的数据
|
||||||
|
// 准备参数
|
||||||
|
UniTemplateUpdateReqVO reqVO = randomPojo(UniTemplateUpdateReqVO.class, o -> {
|
||||||
|
o.setId(dbUniTemplate.getId()); // 设置更新的 ID
|
||||||
|
});
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
uniTemplateService.updateUniTemplate(reqVO);
|
||||||
|
// 校验是否更新正确
|
||||||
|
UniTemplateDO uniTemplate = uniTemplateMapper.selectById(reqVO.getId()); // 获取最新的
|
||||||
|
assertPojoEquals(reqVO, uniTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testUpdateUniTemplate_notExists() {
|
||||||
|
// 准备参数
|
||||||
|
UniTemplateUpdateReqVO reqVO = randomPojo(UniTemplateUpdateReqVO.class);
|
||||||
|
|
||||||
|
// 调用, 并断言异常
|
||||||
|
assertServiceException(() -> uniTemplateService.updateUniTemplate(reqVO), UNI_TEMPLATE_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDeleteUniTemplate_success() {
|
||||||
|
// mock 数据
|
||||||
|
UniTemplateDO dbUniTemplate = randomPojo(UniTemplateDO.class);
|
||||||
|
uniTemplateMapper.insert(dbUniTemplate);// @Sql: 先插入出一条存在的数据
|
||||||
|
// 准备参数
|
||||||
|
Long id = dbUniTemplate.getId();
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
uniTemplateService.deleteUniTemplate(id);
|
||||||
|
// 校验数据不存在了
|
||||||
|
assertNull(uniTemplateMapper.selectById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDeleteUniTemplate_notExists() {
|
||||||
|
// 准备参数
|
||||||
|
Long id = randomLongId();
|
||||||
|
|
||||||
|
// 调用, 并断言异常
|
||||||
|
assertServiceException(() -> uniTemplateService.deleteUniTemplate(id), UNI_TEMPLATE_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,206 @@
|
|||||||
|
package cn.iocoder.yudao.module.configure.service.unitemplateitem;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.configure.controller.admin.unitemplateitem.vo.*;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.dataobject.unitemplateitem.UniTemplateItemDO;
|
||||||
|
import cn.iocoder.yudao.module.configure.dal.mysql.unitemplateitem.UniTemplateItemMapper;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.context.annotation.Import;
|
||||||
|
import java.util.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static cn.hutool.core.util.RandomUtil.*;
|
||||||
|
import static cn.iocoder.yudao.module.configure.enums.ErrorCodeConstants.*;
|
||||||
|
import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.*;
|
||||||
|
import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*;
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.*;
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.*;
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
import static org.mockito.Mockito.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link UniTemplateItemServiceImpl} 的单元测试类
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Import(UniTemplateItemServiceImpl.class)
|
||||||
|
public class UniTemplateItemServiceImplTest extends BaseDbUnitTest {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private UniTemplateItemServiceImpl uniTemplateItemService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private UniTemplateItemMapper uniTemplateItemMapper;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateUniTemplateItem_success() {
|
||||||
|
// 准备参数
|
||||||
|
UniTemplateItemCreateReqVO reqVO = randomPojo(UniTemplateItemCreateReqVO.class);
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
Long uniTemplateItemId = uniTemplateItemService.createUniTemplateItem(reqVO);
|
||||||
|
// 断言
|
||||||
|
assertNotNull(uniTemplateItemId);
|
||||||
|
// 校验记录的属性是否正确
|
||||||
|
UniTemplateItemDO uniTemplateItem = uniTemplateItemMapper.selectById(uniTemplateItemId);
|
||||||
|
assertPojoEquals(reqVO, uniTemplateItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testUpdateUniTemplateItem_success() {
|
||||||
|
// mock 数据
|
||||||
|
UniTemplateItemDO dbUniTemplateItem = randomPojo(UniTemplateItemDO.class);
|
||||||
|
uniTemplateItemMapper.insert(dbUniTemplateItem);// @Sql: 先插入出一条存在的数据
|
||||||
|
// 准备参数
|
||||||
|
UniTemplateItemUpdateReqVO reqVO = randomPojo(UniTemplateItemUpdateReqVO.class, o -> {
|
||||||
|
o.setId(dbUniTemplateItem.getId()); // 设置更新的 ID
|
||||||
|
});
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
uniTemplateItemService.updateUniTemplateItem(reqVO);
|
||||||
|
// 校验是否更新正确
|
||||||
|
UniTemplateItemDO uniTemplateItem = uniTemplateItemMapper.selectById(reqVO.getId()); // 获取最新的
|
||||||
|
assertPojoEquals(reqVO, uniTemplateItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testUpdateUniTemplateItem_notExists() {
|
||||||
|
// 准备参数
|
||||||
|
UniTemplateItemUpdateReqVO reqVO = randomPojo(UniTemplateItemUpdateReqVO.class);
|
||||||
|
|
||||||
|
// 调用, 并断言异常
|
||||||
|
assertServiceException(() -> uniTemplateItemService.updateUniTemplateItem(reqVO), UNI_TEMPLATE_ITEM_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDeleteUniTemplateItem_success() {
|
||||||
|
// mock 数据
|
||||||
|
UniTemplateItemDO dbUniTemplateItem = randomPojo(UniTemplateItemDO.class);
|
||||||
|
uniTemplateItemMapper.insert(dbUniTemplateItem);// @Sql: 先插入出一条存在的数据
|
||||||
|
// 准备参数
|
||||||
|
Long id = dbUniTemplateItem.getId();
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
uniTemplateItemService.deleteUniTemplateItem(id);
|
||||||
|
// 校验数据不存在了
|
||||||
|
assertNull(uniTemplateItemMapper.selectById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDeleteUniTemplateItem_notExists() {
|
||||||
|
// 准备参数
|
||||||
|
Long id = randomLongId();
|
||||||
|
|
||||||
|
// 调用, 并断言异常
|
||||||
|
assertServiceException(() -> uniTemplateItemService.deleteUniTemplateItem(id), UNI_TEMPLATE_ITEM_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
|
||||||
|
public void testGetUniTemplateItemPage() {
|
||||||
|
// mock 数据
|
||||||
|
UniTemplateItemDO dbUniTemplateItem = randomPojo(UniTemplateItemDO.class, o -> { // 等会查询到
|
||||||
|
o.setTemplateId(null);
|
||||||
|
o.setIconUrl(null);
|
||||||
|
o.setPosition(null);
|
||||||
|
o.setWidth(null);
|
||||||
|
o.setHeight(null);
|
||||||
|
o.setBelongBusinessId(null);
|
||||||
|
o.setBelongBusinessName(null);
|
||||||
|
o.setCreateTime(null);
|
||||||
|
});
|
||||||
|
uniTemplateItemMapper.insert(dbUniTemplateItem);
|
||||||
|
// 测试 templateId 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setTemplateId(null)));
|
||||||
|
// 测试 iconUrl 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setIconUrl(null)));
|
||||||
|
// 测试 position 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setPosition(null)));
|
||||||
|
// 测试 width 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setWidth(null)));
|
||||||
|
// 测试 height 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setHeight(null)));
|
||||||
|
// 测试 belongBusinessId 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setBelongBusinessId(null)));
|
||||||
|
// 测试 belongBusinessName 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setBelongBusinessName(null)));
|
||||||
|
// 测试 createTime 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setCreateTime(null)));
|
||||||
|
// 准备参数
|
||||||
|
UniTemplateItemPageReqVO reqVO = new UniTemplateItemPageReqVO();
|
||||||
|
reqVO.setTemplateId(null);
|
||||||
|
reqVO.setIconUrl(null);
|
||||||
|
reqVO.setPosition(null);
|
||||||
|
reqVO.setWidth(null);
|
||||||
|
reqVO.setHeight(null);
|
||||||
|
reqVO.setBelongBusinessId(null);
|
||||||
|
reqVO.setBelongBusinessName(null);
|
||||||
|
reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
PageResult<UniTemplateItemDO> pageResult = uniTemplateItemService.getUniTemplateItemPage(reqVO);
|
||||||
|
// 断言
|
||||||
|
assertEquals(1, pageResult.getTotal());
|
||||||
|
assertEquals(1, pageResult.getList().size());
|
||||||
|
assertPojoEquals(dbUniTemplateItem, pageResult.getList().get(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
|
||||||
|
public void testGetUniTemplateItemList() {
|
||||||
|
// mock 数据
|
||||||
|
UniTemplateItemDO dbUniTemplateItem = randomPojo(UniTemplateItemDO.class, o -> { // 等会查询到
|
||||||
|
o.setTemplateId(null);
|
||||||
|
o.setIconUrl(null);
|
||||||
|
o.setPosition(null);
|
||||||
|
o.setWidth(null);
|
||||||
|
o.setHeight(null);
|
||||||
|
o.setBelongBusinessId(null);
|
||||||
|
o.setBelongBusinessName(null);
|
||||||
|
o.setCreateTime(null);
|
||||||
|
});
|
||||||
|
uniTemplateItemMapper.insert(dbUniTemplateItem);
|
||||||
|
// 测试 templateId 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setTemplateId(null)));
|
||||||
|
// 测试 iconUrl 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setIconUrl(null)));
|
||||||
|
// 测试 position 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setPosition(null)));
|
||||||
|
// 测试 width 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setWidth(null)));
|
||||||
|
// 测试 height 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setHeight(null)));
|
||||||
|
// 测试 belongBusinessId 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setBelongBusinessId(null)));
|
||||||
|
// 测试 belongBusinessName 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setBelongBusinessName(null)));
|
||||||
|
// 测试 createTime 不匹配
|
||||||
|
uniTemplateItemMapper.insert(cloneIgnoreId(dbUniTemplateItem, o -> o.setCreateTime(null)));
|
||||||
|
// 准备参数
|
||||||
|
UniTemplateItemExportReqVO reqVO = new UniTemplateItemExportReqVO();
|
||||||
|
reqVO.setTemplateId(null);
|
||||||
|
reqVO.setIconUrl(null);
|
||||||
|
reqVO.setPosition(null);
|
||||||
|
reqVO.setWidth(null);
|
||||||
|
reqVO.setHeight(null);
|
||||||
|
reqVO.setBelongBusinessId(null);
|
||||||
|
reqVO.setBelongBusinessName(null);
|
||||||
|
reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
|
||||||
|
|
||||||
|
// 调用
|
||||||
|
List<UniTemplateItemDO> list = uniTemplateItemService.getUniTemplateItemList(reqVO);
|
||||||
|
// 断言
|
||||||
|
assertEquals(1, list.size());
|
||||||
|
assertPojoEquals(dbUniTemplateItem, list.get(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package cn.iocoder.yudao.module.product.controller.admin.harvestbatchconfig;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Api(tags = "管理后台 - 采收批次小程序显示配置")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/product/harvest-batch-config")
|
||||||
|
@Validated
|
||||||
|
public class HarvestBatchConfigController {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package cn.iocoder.yudao.module.product.controller.admin.harvestbatchconfig.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 采收批次小程序显示配置 Response VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class HarvestBatchConfigRespVO extends HarvestBatchConfigBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ID", required = true)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package cn.iocoder.yudao.module.product.convert.harvestbatchconfig;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采收批次小程序显示配置 Convert
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface HarvestBatchConfigConvert {
|
||||||
|
|
||||||
|
HarvestBatchConfigConvert INSTANCE = Mappers.getMapper(HarvestBatchConfigConvert.class);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package cn.iocoder.yudao.module.product.dal.dataobject.harvestbatchconfig;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采收批次小程序显示配置 DO
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@TableName("product_harvest_batch_config")
|
||||||
|
@KeySequence("product_harvest_batch_config_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class HarvestBatchConfigDO extends BaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 采收批次ID
|
||||||
|
*/
|
||||||
|
private String harvestBatchId;
|
||||||
|
/**
|
||||||
|
* 语言类型ID
|
||||||
|
*/
|
||||||
|
private Long languageTypeId;
|
||||||
|
/**
|
||||||
|
* 模板ID
|
||||||
|
*/
|
||||||
|
private Long templateId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cn.iocoder.yudao.module.product.dal.mysql.harvestbatchconfig;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.module.product.dal.dataobject.harvestbatchconfig.HarvestBatchConfigDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采收批次小程序显示配置 Mapper
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface HarvestBatchConfigMapper extends BaseMapperX<HarvestBatchConfigDO> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package cn.iocoder.yudao.module.product.service.harvestbatchconfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采收批次小程序显示配置 Service 接口
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
public interface HarvestBatchConfigService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cn.iocoder.yudao.module.product.service.harvestbatchconfig;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采收批次小程序显示配置 Service 实现类
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Validated
|
||||||
|
public class HarvestBatchConfigServiceImpl implements HarvestBatchConfigService {
|
||||||
|
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue