diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/image/CereInteractionDiagramController.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/image/CereInteractionDiagramController.java new file mode 100644 index 0000000..76a5d7f --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/image/CereInteractionDiagramController.java @@ -0,0 +1,134 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.admin.controller.image; + +import com.shop.cereshop.admin.annotation.NoRepeatSubmit; +import com.shop.cereshop.admin.annotation.NoRepeatWebLog; +import com.shop.cereshop.admin.service.image.CereInteractionDiagramService; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.image.CereInteractionDiagram; +import com.shop.cereshop.commons.exception.CoBusinessException; +import com.shop.cereshop.commons.result.Result; +import com.shop.cereshop.commons.utils.GsonUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + + +/** + *

+ * 前端控制器 + * 商品图片信息表 + *

+ * + * @author + * @date 2024-04-04 + */ +@Slf4j +@RestController +@RequestMapping("/cereInteractionDiagram") +@Api(value = "CereInteractionDiagram", tags = "商品图片信息表") +public class CereInteractionDiagramController { + + @Autowired + private CereInteractionDiagramService cereInteractionDiagramService; + +// /** +// * 物流方案修改查询 +// * @param param +// * @return +// */ +// @PostMapping(value = "getById") +// @ApiOperation(value = "联动图查询") +// public Result getById(@RequestBody CereInteractionDiagram param) throws CoBusinessException { +// CereInteractionDiagram storehouse=cereInteractionDiagramService.getById(param.getInteractionDiagramId()); +// return new Result(storehouse); +// } +// +// /** +// * 联动图管理查询 +// * @return +// */ +// @PostMapping(value = "getAll") +// @ApiOperation(value = "联动图管理查询") +// public Result> getAll(@RequestBody InteractionDiagramParam param, HttpServletRequest request) throws CoBusinessException{ +// param.setBusinessId(Long.parseLong(ContextUtil.getProject())); +// return new Result(cereInteractionDiagramService.getAll(param)); +// } +// +// /** +// * 联动图管理查询 +// * @return +// */ +// @PostMapping(value = "getList") +// @ApiOperation(value = "联动图管理查询") +// public Result> getList(@RequestBody InteractionDiagramParam param, HttpServletRequest request) throws CoBusinessException{ +// param.setBusinessId(Long.parseLong(ContextUtil.getProject())); +// return new Result(cereInteractionDiagramService.selectAllByParam(param)); +// } +// +// +// +// /** +// * 新增联动图 +// * @param param +// * @return +// */ +// @PostMapping(value = "save") +// @NoRepeatSubmit +// @ApiOperation(value = "新增联动图") +// @NoRepeatWebLog +// public Result save(@RequestBody @Validated CereInteractionDiagram param, HttpServletRequest request) throws CoBusinessException{ +// //获取当前登录账户 +// CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); +// param.setBusinessId(Long.parseLong(ContextUtil.getProject())); +// cereInteractionDiagramService.insert(param); +// return new Result(user.getUsername(),"新增联动图", GsonUtil.objectToGson(param)); +// } +// +// /** +// * 更新联动图 +// * @param param +// * @return +// */ +// @PostMapping(value = "update") +// @NoRepeatSubmit +// @ApiOperation(value = "更新联动图") +// @NoRepeatWebLog +// public Result update(@RequestBody CereInteractionDiagram param, HttpServletRequest request) throws CoBusinessException{ +// //获取当前登录账户 +// CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); +// param.setBusinessId(Long.parseLong(ContextUtil.getProject())); +// cereInteractionDiagramService.update(param); +// return new Result(user.getUsername(),"更新联动图", GsonUtil.objectToGson(param)); +// } +// +// /** +// * 删除联动图 +// * @param param +// * @return +// */ +// @PostMapping(value = "delete") +// @NoRepeatSubmit +// @ApiOperation(value = "删除联动图") +// @NoRepeatWebLog +// public Result delete(@RequestBody CereInteractionDiagram param, HttpServletRequest request) throws CoBusinessException,Exception{ +// //获取当前登录账户 +// CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); +// cereInteractionDiagramService.deleteById(param.getInteractionDiagramId()); +// return new Result(user.getUsername(),"删除联动图", GsonUtil.objectToGson(param)); +// } +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/image/CereInteractionDiagramDAO.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/image/CereInteractionDiagramDAO.java new file mode 100644 index 0000000..b7549bc --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/image/CereInteractionDiagramDAO.java @@ -0,0 +1,16 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.admin.dao.image; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.shop.cereshop.commons.domain.image.CereInteractionDiagram; + +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface CereInteractionDiagramDAO extends BaseMapper { + +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/image/InteractionDiagramParam.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/image/InteractionDiagramParam.java new file mode 100644 index 0000000..f2396d0 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/image/InteractionDiagramParam.java @@ -0,0 +1,37 @@ +package com.shop.cereshop.admin.param.image; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.shop.cereshop.commons.domain.common.PageParam; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotNull; + +@Data +@ApiModel(value = "InteractionDiagramParam", description = "互动图参数") +public class InteractionDiagramParam extends PageParam { + + /** + * 商家Id + */ + @ApiModelProperty(value = "商家Id") + @TableField("business_id") + private Long businessId; + + /** + * 联动图Id + */ + @ApiModelProperty(value = "联动图Id") + @NotNull(message = "联动图Id不能为空") + private Long interactionDiagramId; + + + /** + * 联动图名字 + */ + @ApiModelProperty(value = "联动图名字") + @Length(max = 1000, message = "联动图名字长度不能超过1000") + private String interactionDiagramName; +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/image/CereInteractionDiagramService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/image/CereInteractionDiagramService.java new file mode 100644 index 0000000..f89a825 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/image/CereInteractionDiagramService.java @@ -0,0 +1,66 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.admin.service.image; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.shop.cereshop.admin.param.image.InteractionDiagramParam; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.image.CereInteractionDiagram; +import com.shop.cereshop.commons.exception.CoBusinessException; + +import java.util.List; + +/** + *

+ * 业务接口 + * 商品图片信息表 + *

+ * + * @author + * @date 2024-04-04 + */ +public interface CereInteractionDiagramService extends IService { + /** + * 查询详情 + * @return + */ + CereInteractionDiagram getById(Long interactionDiagramId); + + /** + * 查询列表 + * @param param + * @return + */ + Page getAll(InteractionDiagramParam param); + + List selectAllByParam(InteractionDiagramParam param); + + /** + * 更新仓库 + * @param cereInteractionDiagram + * @return + * @throws CoBusinessException + */ + int update(CereInteractionDiagram cereInteractionDiagram) throws CoBusinessException; + + /** + * 插入仓库 + * @param cereInteractionDiagram + * @return + * @throws CoBusinessException + */ + int insert(CereInteractionDiagram cereInteractionDiagram) throws CoBusinessException; + + /** + * 删除仓库 + * @param interactionDiagramId + * @return + * @throws CoBusinessException + */ + int deleteById(Long interactionDiagramId) throws CoBusinessException; + + List selectAll(); +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/image/impl/CereInteractionDiagramServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/image/impl/CereInteractionDiagramServiceImpl.java new file mode 100644 index 0000000..71b2ad9 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/image/impl/CereInteractionDiagramServiceImpl.java @@ -0,0 +1,89 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.admin.service.image.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.shop.cereshop.admin.dao.image.CereInteractionDiagramDAO; +import com.shop.cereshop.admin.param.image.InteractionDiagramParam; +import com.shop.cereshop.admin.service.image.CereInteractionDiagramService; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.image.CereInteractionDiagram; +import com.shop.cereshop.commons.exception.CoBusinessException; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; +import java.util.Objects; + +/** + *

+ * 业务实现类 + * 商品图片信息表 + *

+ * + * @author + * @date 2024-04-04 + */ +@Slf4j +@Service +public class CereInteractionDiagramServiceImpl extends ServiceImpl implements CereInteractionDiagramService { + + @Override + public CereInteractionDiagram getById(Long interactionDiagramId) { + return baseMapper.selectById(interactionDiagramId); + } + + @Override + public Page getAll(InteractionDiagramParam param) { + PageHelper.startPage(param.getPage(),param.getPageSize()); + List list= baseMapper.selectList(buildQuery(param)); + PageInfo pageInfo=new PageInfo<>(list); + return new Page<>(pageInfo.getList(), pageInfo.getTotal()); + } + + @Override + public List selectAllByParam(InteractionDiagramParam param) { + return baseMapper.selectList(buildQuery(param)); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public int update(CereInteractionDiagram cereInteractionDiagram) throws CoBusinessException { + return baseMapper.updateById(cereInteractionDiagram); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public int insert(CereInteractionDiagram cereInteractionDiagram) throws CoBusinessException { + return baseMapper.insert(cereInteractionDiagram); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public int deleteById(Long interactionDiagramId) throws CoBusinessException { + return baseMapper.deleteById(interactionDiagramId); + } + + @Override + public List selectAll() { + return baseMapper.selectList(Wrappers.lambdaQuery()); + } + + private LambdaQueryWrapper buildQuery(InteractionDiagramParam bo){ + LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(); + queryWrapper.eq(Objects.nonNull(bo.getInteractionDiagramId()), CereInteractionDiagram::getInteractionDiagramId, bo.getInteractionDiagramId()); + queryWrapper.like(StringUtils.isNotEmpty(bo.getInteractionDiagramName()), CereInteractionDiagram::getInteractionDiagramName, bo.getInteractionDiagramName()); + return queryWrapper; + } +} diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/image/CereInteractionDiagramDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/image/CereInteractionDiagramDAO.xml new file mode 100644 index 0000000..f93fdd6 --- /dev/null +++ b/cereshop-admin/src/main/resources/mybatis/mapper/image/CereInteractionDiagramDAO.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + interaction_diagram_id, interaction_diagram_name, interaction_diagram_image, image_width, image_height, point_data, business_id, terminal + + + diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/controller/image/CereInteractionDiagramController.java b/cereshop-app/src/main/java/com/shop/cereshop/app/controller/image/CereInteractionDiagramController.java new file mode 100644 index 0000000..0124afe --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/controller/image/CereInteractionDiagramController.java @@ -0,0 +1,134 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.app.controller.image; + +import com.shop.cereshop.app.annotation.NoRepeatSubmit; +import com.shop.cereshop.app.annotation.NoRepeatWebLog; +import com.shop.cereshop.app.param.image.InteractionDiagramParam; +import com.shop.cereshop.app.service.image.CereInteractionDiagramService; +import com.shop.cereshop.app.utils.ContextUtil; +import com.shop.cereshop.commons.constant.CoReturnFormat; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.image.CereInteractionDiagram; +import com.shop.cereshop.commons.exception.CoBusinessException; +import com.shop.cereshop.commons.result.Result; +import com.shop.cereshop.commons.utils.GsonUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + + +/** + *

+ * 前端控制器 + * 商品图片信息表 + *

+ * + * @author + * @date 2024-04-04 + */ +@Slf4j +@RestController +@RequestMapping("/cereInteractionDiagram") +@Api(value = "CereInteractionDiagram", tags = "商品图片信息表") +public class CereInteractionDiagramController { + + @Autowired + private CereInteractionDiagramService cereInteractionDiagramService; + + /** + * 物流方案修改查询 + * @param param + * @return + */ + @GetMapping(value = "getById") + @ApiOperation(value = "联动图查询") + public Result getById(CereInteractionDiagram param) throws CoBusinessException { + CereInteractionDiagram storehouse=cereInteractionDiagramService.getById(param.getInteractionDiagramId()); + return new Result(storehouse, CoReturnFormat.SUCCESS); + } + + /** + * 联动图管理查询 + * @return + */ + @GetMapping(value = "getAll") + @ApiOperation(value = "联动图管理查询") + public Result> getAll(InteractionDiagramParam param, HttpServletRequest request) throws CoBusinessException{ + param.setBusinessId(Long.parseLong(ContextUtil.getProject())); + return new Result(cereInteractionDiagramService.getAll(param), CoReturnFormat.SUCCESS); + } + + /** + * 联动图管理查询 + * @return + */ + @GetMapping(value = "getList") + @ApiOperation(value = "联动图管理查询") + public Result> getList(InteractionDiagramParam param, HttpServletRequest request) throws CoBusinessException{ + param.setBusinessId(Long.parseLong(ContextUtil.getProject())); + return new Result(cereInteractionDiagramService.selectAllByParam(param), CoReturnFormat.SUCCESS); + } + + + + /** + * 新增联动图 + * @param param + * @return + */ + @PostMapping(value = "save") + @NoRepeatSubmit + @ApiOperation(value = "新增联动图") + @NoRepeatWebLog + public Result save(@RequestBody @Validated CereInteractionDiagram param, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setBusinessId(Long.parseLong(ContextUtil.getProject())); + cereInteractionDiagramService.insert(param); + return new Result(CoReturnFormat.SUCCESS, user.getUsername(),"新增联动图", GsonUtil.objectToGson(param)); + } + + /** + * 更新联动图 + * @param param + * @return + */ + @PostMapping(value = "update") + @NoRepeatSubmit + @ApiOperation(value = "更新联动图") + @NoRepeatWebLog + public Result update(@RequestBody CereInteractionDiagram param, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setBusinessId(Long.parseLong(ContextUtil.getProject())); + cereInteractionDiagramService.update(param); + return new Result(CoReturnFormat.SUCCESS, user.getUsername(),"更新联动图", GsonUtil.objectToGson(param), CoReturnFormat.SUCCESS); + } + + /** + * 删除联动图 + * @param param + * @return + */ + @PostMapping(value = "delete") + @NoRepeatSubmit + @ApiOperation(value = "删除联动图") + @NoRepeatWebLog + public Result delete(@RequestBody CereInteractionDiagram param, HttpServletRequest request) throws CoBusinessException,Exception{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cereInteractionDiagramService.deleteById(param.getInteractionDiagramId()); + return new Result(CoReturnFormat.SUCCESS, user.getUsername(),"删除联动图", GsonUtil.objectToGson(param), CoReturnFormat.SUCCESS); + } +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/image/CereInteractionDiagramDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/image/CereInteractionDiagramDAO.java new file mode 100644 index 0000000..3016e5c --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/image/CereInteractionDiagramDAO.java @@ -0,0 +1,16 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.app.dao.image; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.shop.cereshop.commons.domain.image.CereInteractionDiagram; + +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface CereInteractionDiagramDAO extends BaseMapper { + +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/param/image/InteractionDiagramParam.java b/cereshop-app/src/main/java/com/shop/cereshop/app/param/image/InteractionDiagramParam.java new file mode 100644 index 0000000..4f45f93 --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/param/image/InteractionDiagramParam.java @@ -0,0 +1,38 @@ +package com.shop.cereshop.app.param.image; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.shop.cereshop.commons.domain.common.PageParam; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotNull; + +@Data +@ApiModel(value = "InteractionDiagramParam", description = "互动图参数") +public class InteractionDiagramParam extends PageParam { + + /** + * 商家Id + */ + @ApiModelProperty(value = "商家Id") + @TableField("business_id") + private Long businessId; + + + /** + * 联动图Id + */ + @ApiModelProperty(value = "联动图Id") + @NotNull(message = "联动图Id不能为空") + private Long interactionDiagramId; + + + /** + * 联动图名字 + */ + @ApiModelProperty(value = "联动图名字") + @Length(max = 1000, message = "联动图名字长度不能超过1000") + private String interactionDiagramName; +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/image/CereInteractionDiagramService.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/image/CereInteractionDiagramService.java new file mode 100644 index 0000000..09648fb --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/image/CereInteractionDiagramService.java @@ -0,0 +1,68 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.app.service.image; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.shop.cereshop.app.param.image.InteractionDiagramParam; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.image.CereInteractionDiagram; +import com.shop.cereshop.commons.domain.storehouse.CereShopStorehouse; +import com.shop.cereshop.commons.exception.CoBusinessException; + +import java.util.List; + +/** + *

+ * 业务接口 + * 商品图片信息表 + *

+ * + * @author + * @date 2024-04-04 + */ +public interface CereInteractionDiagramService extends IService { + /** + * 查询详情 + * @return + */ + CereInteractionDiagram getById(Long interactionDiagramId); + + /** + * 查询列表 + * @param param + * @return + */ + Page getAll(InteractionDiagramParam param); + + List selectAllByParam(InteractionDiagramParam param); + + /** + * 更新仓库 + * @param cereInteractionDiagram + * @return + * @throws CoBusinessException + */ + int update(CereInteractionDiagram cereInteractionDiagram) throws CoBusinessException; + + /** + * 插入仓库 + * @param cereInteractionDiagram + * @return + * @throws CoBusinessException + */ + int insert(CereInteractionDiagram cereInteractionDiagram) throws CoBusinessException; + + /** + * 删除仓库 + * @param interactionDiagramId + * @return + * @throws CoBusinessException + */ + int deleteById(Long interactionDiagramId) throws CoBusinessException; + + List selectAll(); +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/image/impl/CereInteractionDiagramServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/image/impl/CereInteractionDiagramServiceImpl.java new file mode 100644 index 0000000..02286ee --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/image/impl/CereInteractionDiagramServiceImpl.java @@ -0,0 +1,94 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.app.service.image.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.shop.cereshop.app.dao.image.CereInteractionDiagramDAO; +import com.shop.cereshop.app.param.image.InteractionDiagramParam; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.image.CereInteractionDiagram; +import com.shop.cereshop.app.service.image.CereInteractionDiagramService; + +import com.shop.cereshop.commons.domain.storehouse.CereShopStorehouse; +import com.shop.cereshop.commons.exception.CoBusinessException; +import lombok.extern.slf4j.Slf4j; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + *

+ * 业务实现类 + * 商品图片信息表 + *

+ * + * @author + * @date 2024-04-04 + */ +@Slf4j +@Service +public class CereInteractionDiagramServiceImpl extends ServiceImpl implements CereInteractionDiagramService { + + @Override + public CereInteractionDiagram getById(Long interactionDiagramId) { + return baseMapper.selectById(interactionDiagramId); + } + + @Override + public Page getAll(InteractionDiagramParam param) { + PageHelper.startPage(param.getPage(),param.getPageSize()); + List list= baseMapper.selectList(buildQuery(param)); + PageInfo pageInfo=new PageInfo<>(list); + return new Page<>(pageInfo.getList(), pageInfo.getTotal()); + } + + @Override + public List selectAllByParam(InteractionDiagramParam param) { + return baseMapper.selectList(buildQuery(param)); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public int update(CereInteractionDiagram cereInteractionDiagram) throws CoBusinessException { + return baseMapper.updateById(cereInteractionDiagram); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public int insert(CereInteractionDiagram cereInteractionDiagram) throws CoBusinessException { + return baseMapper.insert(cereInteractionDiagram); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public int deleteById(Long interactionDiagramId) throws CoBusinessException { + return baseMapper.deleteById(interactionDiagramId); + } + + @Override + public List selectAll() { + return baseMapper.selectList(Wrappers.lambdaQuery()); + } + + private LambdaQueryWrapper buildQuery(InteractionDiagramParam bo){ + LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(); + queryWrapper.eq(Objects.nonNull(bo.getInteractionDiagramId()), CereInteractionDiagram::getInteractionDiagramId, bo.getInteractionDiagramId()); + queryWrapper.like(StringUtils.isNotEmpty(bo.getInteractionDiagramName()), CereInteractionDiagram::getInteractionDiagramName, bo.getInteractionDiagramName()); + return queryWrapper; + } +} diff --git a/cereshop-app/src/main/resources/application-security.yml b/cereshop-app/src/main/resources/application-security.yml index ba23a70..75a0aca 100644 --- a/cereshop-app/src/main/resources/application-security.yml +++ b/cereshop-app/src/main/resources/application-security.yml @@ -59,3 +59,6 @@ security: - /product/getBroadCastList - /coupon/getChannelActivityCoupon - /cerePlatformLangInfo/** + - /cereInteractionDiagram/getById + - /cereInteractionDiagram/getAll + - /cereInteractionDiagram/getList diff --git a/cereshop-app/src/main/resources/mybatis/mapper/image/CereInteractionDiagramDAO.xml b/cereshop-app/src/main/resources/mybatis/mapper/image/CereInteractionDiagramDAO.xml new file mode 100644 index 0000000..4157c70 --- /dev/null +++ b/cereshop-app/src/main/resources/mybatis/mapper/image/CereInteractionDiagramDAO.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + interaction_diagram_id, interaction_diagram_name, interaction_diagram_image, image_width, image_height, point_data, business_id, terminal + + + diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CanvasController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CanvasController.java index 3b84c5c..77e68f5 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CanvasController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CanvasController.java @@ -11,10 +11,12 @@ import com.shop.cereshop.business.page.price.ShopPriceDetail; import com.shop.cereshop.business.page.product.CanvasBusinessProductParam; import com.shop.cereshop.business.page.product.MemberProduct; import com.shop.cereshop.business.param.canvas.CanvasCouponParam; +import com.shop.cereshop.business.param.image.InteractionDiagramParam; import com.shop.cereshop.business.param.product.ProductGetGroupParam; import com.shop.cereshop.business.param.renovation.RenovationParam; import com.shop.cereshop.business.service.activity.CerePlatformActivityService; import com.shop.cereshop.business.service.canvas.CerePlatformCanvasService; +import com.shop.cereshop.business.service.image.CereInteractionDiagramService; import com.shop.cereshop.business.service.price.CerePriceProductService; import com.shop.cereshop.business.service.price.CereShopPriceService; import com.shop.cereshop.business.service.product.CereProductClassifyService; @@ -26,6 +28,7 @@ import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.canvas.CerePlatformCanvas; import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.image.CereInteractionDiagram; import com.shop.cereshop.commons.domain.product.Classify; import com.shop.cereshop.commons.domain.shop.CereShopGroup; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -58,6 +61,9 @@ public class CanvasController { private CereShopProductService cereShopProductService; @Autowired + private CereInteractionDiagramService cereInteractionDiagramService; + + @Autowired private CereProductClassifyService cereProductClassifyService; @Autowired @@ -86,7 +92,7 @@ public class CanvasController { * @return */ @GetMapping("getProducts") - @ApiOperation(value = "商家编辑查询") + @ApiOperation(value = "商品查询") public Result> getProducts(CanvasProductParam param) throws CoBusinessException{ param.setProject(ContextUtil.getProject()); param.setBusinessId(ContextUtil.getBusinessId()); @@ -95,6 +101,22 @@ public class CanvasController { } /** + * 画布选择互动图查询 + * @param param + * @return + */ + @GetMapping("getInteractionDiagrams") + @ApiOperation(value = "互动图查询") + public Result> getInteractionDiagrams(InteractionDiagramParam param) throws CoBusinessException{ +// param.setProject(ContextUtil.getProject()); + param.setBusinessId(ContextUtil.getBusinessId()); + Page page=cereInteractionDiagramService.getAll(param); + return new Result(page); + } + + + + /** * 画布选择定价捆绑活动数据 * @param param * @return diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/image/CereInteractionDiagramController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/image/CereInteractionDiagramController.java new file mode 100644 index 0000000..e362052 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/image/CereInteractionDiagramController.java @@ -0,0 +1,134 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.business.controller.image; + +import com.shop.cereshop.business.annotation.NoRepeatSubmit; +import com.shop.cereshop.business.annotation.NoRepeatWebLog; +import com.shop.cereshop.business.param.image.InteractionDiagramParam; +import com.shop.cereshop.business.service.image.CereInteractionDiagramService; +import com.shop.cereshop.business.utils.ContextUtil; +import com.shop.cereshop.commons.constant.CoReturnFormat; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.image.CereInteractionDiagram; +import com.shop.cereshop.commons.exception.CoBusinessException; +import com.shop.cereshop.commons.result.Result; +import com.shop.cereshop.commons.utils.GsonUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + + +/** + *

+ * 前端控制器 + * 商品图片信息表 + *

+ * + * @author + * @date 2024-04-04 + */ +@Slf4j +@RestController +@RequestMapping("/cereInteractionDiagram") +@Api(value = "CereInteractionDiagram", tags = "商品图片信息表") +public class CereInteractionDiagramController { + + @Autowired + private CereInteractionDiagramService cereInteractionDiagramService; + + /** + * 物流方案修改查询 + * @param param + * @return + */ + @GetMapping(value = "getById") + @ApiOperation(value = "联动图查询") + public Result getById(CereInteractionDiagram param) throws CoBusinessException { + CereInteractionDiagram storehouse=cereInteractionDiagramService.getById(param.getInteractionDiagramId()); + return new Result(storehouse, CoReturnFormat.SUCCESS); + } + + /** + * 联动图管理查询 + * @return + */ + @GetMapping(value = "getAll") + @ApiOperation(value = "联动图管理查询") + public Result> getAll(InteractionDiagramParam param) throws CoBusinessException{ + param.setBusinessId(ContextUtil.getBusinessId()); + return new Result(cereInteractionDiagramService.getAll(param), CoReturnFormat.SUCCESS); + } + + /** + * 联动图管理查询 + * @return + */ + @GetMapping(value = "getList") + @ApiOperation(value = "联动图管理查询") + public Result> getList(InteractionDiagramParam param, HttpServletRequest request) throws CoBusinessException{ + param.setBusinessId(ContextUtil.getBusinessId()); + return new Result(cereInteractionDiagramService.selectAllByParam(param), CoReturnFormat.SUCCESS); + } + + + + /** + * 新增联动图 + * @param param + * @return + */ + @PostMapping(value = "save") + @NoRepeatSubmit + @ApiOperation(value = "新增联动图") + @NoRepeatWebLog + public Result save(@RequestBody @Validated CereInteractionDiagram param, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setBusinessId(ContextUtil.getBusinessId()); + cereInteractionDiagramService.insert(param); + return new Result(CoReturnFormat.SUCCESS, user.getUsername(),"新增联动图", GsonUtil.objectToGson(param)); + } + + /** + * 更新联动图 + * @param param + * @return + */ + @PostMapping(value = "update") + @NoRepeatSubmit + @ApiOperation(value = "更新联动图") + @NoRepeatWebLog + public Result update(@RequestBody CereInteractionDiagram param, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setBusinessId(ContextUtil.getBusinessId()); + cereInteractionDiagramService.update(param); + return new Result(CoReturnFormat.SUCCESS, user.getUsername(),"更新联动图", GsonUtil.objectToGson(param)); + } + + /** + * 删除联动图 + * @param param + * @return + */ + @PostMapping(value = "delete") + @NoRepeatSubmit + @ApiOperation(value = "删除联动图") + @NoRepeatWebLog + public Result delete(@RequestBody CereInteractionDiagram param, HttpServletRequest request) throws CoBusinessException,Exception{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cereInteractionDiagramService.deleteById(param.getInteractionDiagramId()); + return new Result(CoReturnFormat.SUCCESS, user.getUsername(),"删除联动图", GsonUtil.objectToGson(param)); + } +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/image/CereInteractionDiagramDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/image/CereInteractionDiagramDAO.java new file mode 100644 index 0000000..21b7142 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/image/CereInteractionDiagramDAO.java @@ -0,0 +1,16 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.business.dao.image; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.shop.cereshop.commons.domain.image.CereInteractionDiagram; + +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface CereInteractionDiagramDAO extends BaseMapper { + +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/image/InteractionDiagramParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/image/InteractionDiagramParam.java new file mode 100644 index 0000000..ec0b65d --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/image/InteractionDiagramParam.java @@ -0,0 +1,37 @@ +package com.shop.cereshop.business.param.image; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.shop.cereshop.commons.domain.common.PageParam; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotNull; + +@Data +@ApiModel(value = "InteractionDiagramParam", description = "互动图参数") +public class InteractionDiagramParam extends PageParam { + + /** + * 商家Id + */ + @ApiModelProperty(value = "商家Id") + @TableField("business_id") + private Long businessId; + + /** + * 联动图Id + */ + @ApiModelProperty(value = "联动图Id") + @NotNull(message = "联动图Id不能为空") + private Long interactionDiagramId; + + + /** + * 联动图名字 + */ + @ApiModelProperty(value = "联动图名字") + @Length(max = 1000, message = "联动图名字长度不能超过1000") + private String interactionDiagramName; +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/image/CereInteractionDiagramService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/image/CereInteractionDiagramService.java new file mode 100644 index 0000000..13e6d79 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/image/CereInteractionDiagramService.java @@ -0,0 +1,66 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.business.service.image; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.shop.cereshop.business.param.image.InteractionDiagramParam; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.image.CereInteractionDiagram; +import com.shop.cereshop.commons.exception.CoBusinessException; + +import java.util.List; + +/** + *

+ * 业务接口 + * 商品图片信息表 + *

+ * + * @author + * @date 2024-04-04 + */ +public interface CereInteractionDiagramService extends IService { + /** + * 查询详情 + * @return + */ + CereInteractionDiagram getById(Long interactionDiagramId); + + /** + * 查询列表 + * @param param + * @return + */ + Page getAll(InteractionDiagramParam param); + + List selectAllByParam(InteractionDiagramParam param); + + /** + * 更新仓库 + * @param cereInteractionDiagram + * @return + * @throws CoBusinessException + */ + int update(CereInteractionDiagram cereInteractionDiagram) throws CoBusinessException; + + /** + * 插入仓库 + * @param cereInteractionDiagram + * @return + * @throws CoBusinessException + */ + int insert(CereInteractionDiagram cereInteractionDiagram) throws CoBusinessException; + + /** + * 删除仓库 + * @param interactionDiagramId + * @return + * @throws CoBusinessException + */ + int deleteById(Long interactionDiagramId) throws CoBusinessException; + + List selectAll(); +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/image/impl/CereInteractionDiagramServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/image/impl/CereInteractionDiagramServiceImpl.java new file mode 100644 index 0000000..c6eb77f --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/image/impl/CereInteractionDiagramServiceImpl.java @@ -0,0 +1,89 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.business.service.image.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.shop.cereshop.business.dao.image.CereInteractionDiagramDAO; +import com.shop.cereshop.business.param.image.InteractionDiagramParam; +import com.shop.cereshop.business.service.image.CereInteractionDiagramService; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.image.CereInteractionDiagram; +import com.shop.cereshop.commons.exception.CoBusinessException; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; +import java.util.Objects; + +/** + *

+ * 业务实现类 + * 商品图片信息表 + *

+ * + * @author + * @date 2024-04-04 + */ +@Slf4j +@Service +public class CereInteractionDiagramServiceImpl extends ServiceImpl implements CereInteractionDiagramService { + + @Override + public CereInteractionDiagram getById(Long interactionDiagramId) { + return baseMapper.selectById(interactionDiagramId); + } + + @Override + public Page getAll(InteractionDiagramParam param) { + PageHelper.startPage(param.getPage(),param.getPageSize()); + List list= baseMapper.selectList(buildQuery(param)); + PageInfo pageInfo=new PageInfo<>(list); + return new Page<>(pageInfo.getList(), pageInfo.getTotal()); + } + + @Override + public List selectAllByParam(InteractionDiagramParam param) { + return baseMapper.selectList(buildQuery(param)); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public int update(CereInteractionDiagram cereInteractionDiagram) throws CoBusinessException { + return baseMapper.updateById(cereInteractionDiagram); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public int insert(CereInteractionDiagram cereInteractionDiagram) throws CoBusinessException { + return baseMapper.insert(cereInteractionDiagram); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public int deleteById(Long interactionDiagramId) throws CoBusinessException { + return baseMapper.deleteById(interactionDiagramId); + } + + @Override + public List selectAll() { + return baseMapper.selectList(Wrappers.lambdaQuery()); + } + + private LambdaQueryWrapper buildQuery(InteractionDiagramParam bo){ + LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(); + queryWrapper.eq(Objects.nonNull(bo.getInteractionDiagramId()), CereInteractionDiagram::getInteractionDiagramId, bo.getInteractionDiagramId()); + queryWrapper.like(StringUtils.isNotEmpty(bo.getInteractionDiagramName()), CereInteractionDiagram::getInteractionDiagramName, bo.getInteractionDiagramName()); + return queryWrapper; + } +} diff --git a/cereshop-business/src/main/resources/mybatis/mapper/image/CereInteractionDiagramDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/image/CereInteractionDiagramDAO.xml new file mode 100644 index 0000000..f0fb44d --- /dev/null +++ b/cereshop-business/src/main/resources/mybatis/mapper/image/CereInteractionDiagramDAO.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + interaction_diagram_id, interaction_diagram_name, interaction_diagram_image, image_width, image_height, point_data, business_id, terminal + + + diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/image/CereInteractionDiagram.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/image/CereInteractionDiagram.java new file mode 100644 index 0000000..948ef6c --- /dev/null +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/image/CereInteractionDiagram.java @@ -0,0 +1,118 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.commons.domain.image; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableField; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import org.hibernate.validator.constraints.Length; +import org.hibernate.validator.constraints.Range; +import java.time.LocalDateTime; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; + +import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE; + +/** + *

+ * 实体类 + * 商品图片信息表 + *

+ * + * @since 2024-04-04 + */ +@Data +@NoArgsConstructor +@ToString(callSuper = true) +@TableName("cere_interaction_diagram") +@ApiModel(value = "CereInteractionDiagram", description = "商品图片信息表") +@AllArgsConstructor +public class CereInteractionDiagram { + + private static final long serialVersionUID = 1L; + + /** + * 联动图Id + */ + @ApiModelProperty(value = "联动图Id") + @NotNull(message = "联动图Id不能为空") + @TableId(type = IdType.AUTO) + private Long interactionDiagramId; + + + /** + * 联动图名字 + */ + @ApiModelProperty(value = "联动图名字") + @Length(max = 1000, message = "联动图名字长度不能超过1000") + @TableField(value = "interaction_diagram_name", condition = LIKE) + private String interactionDiagramName; + + + /** + * 联动图背景图 + */ + @ApiModelProperty(value = "联动图背景图") + @Length(max = 1000, message = "联动图背景图长度不能超过1000") + @TableField(value = "interaction_diagram_image", condition = LIKE) + private String interactionDiagramImage; + + + /** + * 图片宽度 + */ + @ApiModelProperty(value = "图片宽度") + @TableField("image_width") + private Integer imageWidth; + + + /** + * 图片高度 + */ + @ApiModelProperty(value = "图片高度") + @TableField("image_height") + private Integer imageHeight; + + + /** + * 联动图数据 + */ + @ApiModelProperty(value = "联动图数据") + @Length(max = 6000, message = "联动图数据长度不能超过6000") + @TableField(value = "point_data", condition = LIKE) + private String pointData; + + + /** + * 商家Id + */ + @ApiModelProperty(value = "商家Id") + @TableField("business_id") + private Long businessId; + + + /** + * 终端 1-小程序 2-H5 3-APP 4-PC + */ + @ApiModelProperty(value = "终端 1-小程序 2-H5 3-APP 4-PC") + @NotNull(message = "终端 1-小程序 2-H5 3-APP 4-PC不能为空") + @TableField("terminal") + private Boolean terminal; + + + + +} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/image/CereInteractionDiagramDetail.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/image/CereInteractionDiagramDetail.java new file mode 100644 index 0000000..71ea9b5 --- /dev/null +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/image/CereInteractionDiagramDetail.java @@ -0,0 +1,62 @@ +/* +* Copyright (C) 2017-2021 +* All rights reserved, Designed By 深圳中科鑫智科技有限公司 +* Copyright authorization contact 18814114118 +*/ +package com.shop.cereshop.commons.domain.image; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; + +import javax.validation.constraints.NotNull; + +/** + *

+ * 实体类 + * 商品图片信息表 + *

+ * + * @since 2024-04-04 + */ +@Data +@NoArgsConstructor +@ToString(callSuper = true) +@ApiModel(value = "CereInteractionDiagramDetail", description = "商品图片信息详情表") +@AllArgsConstructor +public class CereInteractionDiagramDetail { + + private static final long serialVersionUID = 1L; + + /** + * 数据类型 + */ + @ApiModelProperty(value = "数据类型") + @NotNull(message = "数据类型") + private String type; + + + /** + * 具体数据 + */ + @ApiModelProperty(value = "具体数据") + private String data; + + + + /** + * X轴的位置 + */ + @ApiModelProperty(value = "X轴的位置") + private Integer pointX; + + + /** + * Y轴的位置 + */ + @ApiModelProperty(value = "Y轴的位置") + private Integer pointY; +}