| New file |
| | |
| | | package cn.lili.modules.lmk.domain.entity; |
| | | |
| | | import cn.lili.mybatis.BaseEntity; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 定制商品模板 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @TableName("lmk_goods_customize_template") |
| | | public class GoodsCustomizeTemplate extends BaseEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableField("template_name") |
| | | /** 模板名称 */ |
| | | private String templateName; |
| | | |
| | | @TableField("status") |
| | | /** 启用状态 */ |
| | | private String status; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.entity; |
| | | |
| | | import cn.lili.mybatis.BaseEntity; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 模板标题 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @TableName("lmk_template_constomize_title") |
| | | public class TemplateConstomizeTitle extends BaseEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableField("template_id") |
| | | /** 模板id */ |
| | | private String templateId; |
| | | |
| | | @TableField("template_title") |
| | | /** 模板标题 */ |
| | | private String templateTitle; |
| | | |
| | | @TableField("content_type") |
| | | /** 标题类型 */ |
| | | private String contentType; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.entity; |
| | | |
| | | import cn.lili.mybatis.BaseEntity; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 模板图片 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @TableName("lmk_template_imgs") |
| | | public class TemplateImgs extends BaseEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableField("template_id") |
| | | /** 模板id */ |
| | | private String templateId; |
| | | |
| | | @TableField("img_url") |
| | | /** 图片地址 */ |
| | | private String imgUrl; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.entity; |
| | | |
| | | import cn.lili.mybatis.BaseEntity; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 用户选择模板 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @TableName("lmk_user_check_template") |
| | | public class UserCheckTemplate extends BaseEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableField("order_sn") |
| | | /** 订单编号 */ |
| | | private String orderSn; |
| | | |
| | | @TableField("template_id") |
| | | /** 模板id */ |
| | | private String templateId; |
| | | |
| | | @TableField("sub_id") |
| | | /** 子模板id */ |
| | | private String subId; |
| | | |
| | | @TableField("content") |
| | | /** 文本值 */ |
| | | private String content; |
| | | |
| | | @TableField("template_name") |
| | | /** 模板名称 */ |
| | | private String templateName; |
| | | |
| | | @TableField("choose_img_id") |
| | | /** 选择模板图片id */ |
| | | private String chooseImgId; |
| | | |
| | | @TableField("choose_img") |
| | | /** 选择模板图片 */ |
| | | private String chooseImg; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.form; |
| | | |
| | | import cn.lili.group.Update; |
| | | import cn.lili.group.Add; |
| | | import cn.lili.base.AbsForm; |
| | | import cn.lili.modules.lmk.domain.entity.GoodsCustomizeTemplate; |
| | | import org.springframework.beans.BeanUtils; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import org.springframework.lang.NonNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 定制商品模板表单 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "GoodsCustomizeTemplate表单", description = "定制商品模板表单") |
| | | public class GoodsCustomizeTemplateForm extends AbsForm { |
| | | |
| | | @NotBlank(message = "模板名称不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("模板名称") |
| | | private String templateName; |
| | | |
| | | @NotBlank(message = "启用状态不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("启用状态") |
| | | private String status; |
| | | |
| | | public static GoodsCustomizeTemplate getEntityByForm(@NonNull GoodsCustomizeTemplateForm form, GoodsCustomizeTemplate entity) { |
| | | if(entity == null) { |
| | | entity = new GoodsCustomizeTemplate(); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | return entity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.form; |
| | | |
| | | import cn.lili.group.Update; |
| | | import cn.lili.group.Add; |
| | | import cn.lili.base.AbsForm; |
| | | import cn.lili.modules.lmk.domain.entity.TemplateConstomizeTitle; |
| | | import org.springframework.beans.BeanUtils; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import org.springframework.lang.NonNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 模板标题表单 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "TemplateConstomizeTitle表单", description = "模板标题表单") |
| | | public class TemplateConstomizeTitleForm extends AbsForm { |
| | | |
| | | @NotNull(message = "模板id不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("模板id") |
| | | private String templateId; |
| | | |
| | | @NotBlank(message = "模板标题不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("模板标题") |
| | | private String templateTitle; |
| | | |
| | | @NotBlank(message = "标题类型不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("标题类型") |
| | | private String contentType; |
| | | |
| | | public static TemplateConstomizeTitle getEntityByForm(@NonNull TemplateConstomizeTitleForm form, TemplateConstomizeTitle entity) { |
| | | if(entity == null) { |
| | | entity = new TemplateConstomizeTitle(); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | return entity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.form; |
| | | |
| | | import cn.lili.group.Update; |
| | | import cn.lili.group.Add; |
| | | import cn.lili.base.AbsForm; |
| | | import cn.lili.modules.lmk.domain.entity.TemplateImgs; |
| | | import org.springframework.beans.BeanUtils; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import org.springframework.lang.NonNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 模板图片表单 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "TemplateImgs表单", description = "模板图片表单") |
| | | public class TemplateImgsForm extends AbsForm { |
| | | |
| | | @NotNull(message = "模板id不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("模板id") |
| | | private String templateId; |
| | | |
| | | @NotBlank(message = "图片地址不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("图片地址") |
| | | private String imgUrl; |
| | | |
| | | public static TemplateImgs getEntityByForm(@NonNull TemplateImgsForm form, TemplateImgs entity) { |
| | | if(entity == null) { |
| | | entity = new TemplateImgs(); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | return entity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.form; |
| | | |
| | | import cn.lili.group.Update; |
| | | import cn.lili.group.Add; |
| | | import cn.lili.base.AbsForm; |
| | | import cn.lili.modules.lmk.domain.entity.UserCheckTemplate; |
| | | import org.springframework.beans.BeanUtils; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import org.springframework.lang.NonNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 用户选择模板表单 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "UserCheckTemplate表单", description = "用户选择模板表单") |
| | | public class UserCheckTemplateForm extends AbsForm { |
| | | |
| | | @NotBlank(message = "订单编号不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("订单编号") |
| | | private String orderSn; |
| | | |
| | | @NotNull(message = "模板id不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("模板id") |
| | | private String templateId; |
| | | |
| | | @NotNull(message = "子模板id不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("子模板id") |
| | | private String subId; |
| | | |
| | | @NotBlank(message = "文本值不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("文本值") |
| | | private String content; |
| | | |
| | | @NotBlank(message = "模板名称不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("模板名称") |
| | | private String templateName; |
| | | |
| | | @NotNull(message = "选择模板图片id不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("选择模板图片id") |
| | | private String chooseImgId; |
| | | |
| | | @NotBlank(message = "选择模板图片不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("选择模板图片") |
| | | private String chooseImg; |
| | | |
| | | public static UserCheckTemplate getEntityByForm(@NonNull UserCheckTemplateForm form, UserCheckTemplate entity) { |
| | | if(entity == null) { |
| | | entity = new UserCheckTemplate(); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | return entity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.query; |
| | | |
| | | import cn.lili.base.AbsQuery; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 定制商品模板查询 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "GoodsCustomizeTemplate查询参数", description = "定制商品模板查询参数") |
| | | public class GoodsCustomizeTemplateQuery extends AbsQuery { |
| | | } |
| | | |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.query; |
| | | |
| | | import cn.lili.base.AbsQuery; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 模板标题查询 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "TemplateConstomizeTitle查询参数", description = "模板标题查询参数") |
| | | public class TemplateConstomizeTitleQuery extends AbsQuery { |
| | | } |
| | | |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.query; |
| | | |
| | | import cn.lili.base.AbsQuery; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 模板图片查询 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "TemplateImgs查询参数", description = "模板图片查询参数") |
| | | public class TemplateImgsQuery extends AbsQuery { |
| | | } |
| | | |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.query; |
| | | |
| | | import cn.lili.base.AbsQuery; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 用户选择模板查询 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "UserCheckTemplate查询参数", description = "用户选择模板查询参数") |
| | | public class UserCheckTemplateQuery extends AbsQuery { |
| | | } |
| | | |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.vo; |
| | | |
| | | import cn.lili.base.AbsVo; |
| | | import cn.lili.modules.lmk.domain.entity.GoodsCustomizeTemplate; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import org.springframework.beans.BeanUtils; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 定制商品模板展示 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "定制商品模板响应数据", description = "定制商品模板响应数据") |
| | | public class GoodsCustomizeTemplateVO extends AbsVo { |
| | | |
| | | /** 模板名称 */ |
| | | @ApiModelProperty("模板名称") |
| | | private String templateName; |
| | | |
| | | /** 启用状态 */ |
| | | @ApiModelProperty("启用状态") |
| | | private String status; |
| | | |
| | | public static GoodsCustomizeTemplateVO getVoByEntity(@NonNull GoodsCustomizeTemplate entity, GoodsCustomizeTemplateVO vo) { |
| | | if(vo == null) { |
| | | vo = new GoodsCustomizeTemplateVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | return vo; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.vo; |
| | | |
| | | import cn.lili.base.AbsVo; |
| | | import cn.lili.modules.lmk.domain.entity.TemplateConstomizeTitle; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import org.springframework.beans.BeanUtils; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 模板标题展示 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "模板标题响应数据", description = "模板标题响应数据") |
| | | public class TemplateConstomizeTitleVO extends AbsVo { |
| | | |
| | | /** 模板id */ |
| | | @ApiModelProperty("模板id") |
| | | private String templateId; |
| | | |
| | | /** 模板标题 */ |
| | | @ApiModelProperty("模板标题") |
| | | private String templateTitle; |
| | | |
| | | /** 标题类型 */ |
| | | @ApiModelProperty("标题类型") |
| | | private String contentType; |
| | | |
| | | public static TemplateConstomizeTitleVO getVoByEntity(@NonNull TemplateConstomizeTitle entity, TemplateConstomizeTitleVO vo) { |
| | | if(vo == null) { |
| | | vo = new TemplateConstomizeTitleVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | return vo; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.vo; |
| | | |
| | | import cn.lili.base.AbsVo; |
| | | import cn.lili.modules.lmk.domain.entity.TemplateImgs; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import org.springframework.beans.BeanUtils; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 模板图片展示 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "模板图片响应数据", description = "模板图片响应数据") |
| | | public class TemplateImgsVO extends AbsVo { |
| | | |
| | | /** 模板id */ |
| | | @ApiModelProperty("模板id") |
| | | private String templateId; |
| | | |
| | | /** 图片地址 */ |
| | | @ApiModelProperty("图片地址") |
| | | private String imgUrl; |
| | | |
| | | public static TemplateImgsVO getVoByEntity(@NonNull TemplateImgs entity, TemplateImgsVO vo) { |
| | | if(vo == null) { |
| | | vo = new TemplateImgsVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | return vo; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.domain.vo; |
| | | |
| | | import cn.lili.base.AbsVo; |
| | | import cn.lili.modules.lmk.domain.entity.UserCheckTemplate; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import org.springframework.beans.BeanUtils; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 用户选择模板展示 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "用户选择模板响应数据", description = "用户选择模板响应数据") |
| | | public class UserCheckTemplateVO extends AbsVo { |
| | | |
| | | /** 订单编号 */ |
| | | @ApiModelProperty("订单编号") |
| | | private String orderSn; |
| | | |
| | | /** 模板id */ |
| | | @ApiModelProperty("模板id") |
| | | private String templateId; |
| | | |
| | | /** 子模板id */ |
| | | @ApiModelProperty("子模板id") |
| | | private String subId; |
| | | |
| | | /** 文本值 */ |
| | | @ApiModelProperty("文本值") |
| | | private String content; |
| | | |
| | | /** 模板名称 */ |
| | | @ApiModelProperty("模板名称") |
| | | private String templateName; |
| | | |
| | | /** 选择模板图片id */ |
| | | @ApiModelProperty("选择模板图片id") |
| | | private String chooseImgId; |
| | | |
| | | /** 选择模板图片 */ |
| | | @ApiModelProperty("选择模板图片") |
| | | private String chooseImg; |
| | | |
| | | public static UserCheckTemplateVO getVoByEntity(@NonNull UserCheckTemplate entity, UserCheckTemplateVO vo) { |
| | | if(vo == null) { |
| | | vo = new UserCheckTemplateVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | return vo; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.mapper; |
| | | |
| | | import cn.lili.modules.lmk.domain.entity.GoodsCustomizeTemplate; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import cn.lili.modules.lmk.domain.vo.GoodsCustomizeTemplateVO; |
| | | import cn.lili.modules.lmk.domain.form.GoodsCustomizeTemplateForm; |
| | | import cn.lili.modules.lmk.domain.query.GoodsCustomizeTemplateQuery; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 定制商品模板 Mapper 接口 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Mapper |
| | | public interface GoodsCustomizeTemplateMapper extends BaseMapper<GoodsCustomizeTemplate> { |
| | | |
| | | /** |
| | | * id查找定制商品模板 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | GoodsCustomizeTemplateVO getById(String id); |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | IPage getPage(IPage page, @Param("query") GoodsCustomizeTemplateQuery query); |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.mapper; |
| | | |
| | | import cn.lili.modules.lmk.domain.entity.TemplateConstomizeTitle; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import cn.lili.modules.lmk.domain.vo.TemplateConstomizeTitleVO; |
| | | import cn.lili.modules.lmk.domain.form.TemplateConstomizeTitleForm; |
| | | import cn.lili.modules.lmk.domain.query.TemplateConstomizeTitleQuery; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 模板标题 Mapper 接口 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Mapper |
| | | public interface TemplateConstomizeTitleMapper extends BaseMapper<TemplateConstomizeTitle> { |
| | | |
| | | /** |
| | | * id查找模板标题 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | TemplateConstomizeTitleVO getById(String id); |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | IPage getPage(IPage page, @Param("query") TemplateConstomizeTitleQuery query); |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.mapper; |
| | | |
| | | import cn.lili.modules.lmk.domain.entity.TemplateImgs; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import cn.lili.modules.lmk.domain.vo.TemplateImgsVO; |
| | | import cn.lili.modules.lmk.domain.form.TemplateImgsForm; |
| | | import cn.lili.modules.lmk.domain.query.TemplateImgsQuery; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 模板图片 Mapper 接口 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Mapper |
| | | public interface TemplateImgsMapper extends BaseMapper<TemplateImgs> { |
| | | |
| | | /** |
| | | * id查找模板图片 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | TemplateImgsVO getById(String id); |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | IPage getPage(IPage page, @Param("query") TemplateImgsQuery query); |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.mapper; |
| | | |
| | | import cn.lili.modules.lmk.domain.entity.UserCheckTemplate; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import cn.lili.modules.lmk.domain.vo.UserCheckTemplateVO; |
| | | import cn.lili.modules.lmk.domain.form.UserCheckTemplateForm; |
| | | import cn.lili.modules.lmk.domain.query.UserCheckTemplateQuery; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 用户选择模板 Mapper 接口 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Mapper |
| | | public interface UserCheckTemplateMapper extends BaseMapper<UserCheckTemplate> { |
| | | |
| | | /** |
| | | * id查找用户选择模板 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | UserCheckTemplateVO getById(String id); |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | IPage getPage(IPage page, @Param("query") UserCheckTemplateQuery query); |
| | | |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.service; |
| | | |
| | | import cn.lili.modules.lmk.domain.entity.GoodsCustomizeTemplate; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import cn.lili.base.Result; |
| | | import cn.lili.modules.lmk.domain.form.GoodsCustomizeTemplateForm; |
| | | import cn.lili.modules.lmk.domain.query.GoodsCustomizeTemplateQuery; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 定制商品模板 服务类 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | public interface GoodsCustomizeTemplateService extends IService<GoodsCustomizeTemplate> { |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result add(GoodsCustomizeTemplateForm form); |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result update(GoodsCustomizeTemplateForm form); |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | Result remove(List<String> ids); |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result removeById(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result page(GoodsCustomizeTemplateQuery query); |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(String id); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.service; |
| | | |
| | | import cn.lili.modules.lmk.domain.entity.TemplateConstomizeTitle; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import cn.lili.base.Result; |
| | | import cn.lili.modules.lmk.domain.form.TemplateConstomizeTitleForm; |
| | | import cn.lili.modules.lmk.domain.query.TemplateConstomizeTitleQuery; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 模板标题 服务类 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | public interface TemplateConstomizeTitleService extends IService<TemplateConstomizeTitle> { |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result add(TemplateConstomizeTitleForm form); |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result update(TemplateConstomizeTitleForm form); |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | Result remove(List<String> ids); |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result removeById(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result page(TemplateConstomizeTitleQuery query); |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(String id); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.service; |
| | | |
| | | import cn.lili.modules.lmk.domain.entity.TemplateImgs; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import cn.lili.base.Result; |
| | | import cn.lili.modules.lmk.domain.form.TemplateImgsForm; |
| | | import cn.lili.modules.lmk.domain.query.TemplateImgsQuery; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 模板图片 服务类 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | public interface TemplateImgsService extends IService<TemplateImgs> { |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result add(TemplateImgsForm form); |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result update(TemplateImgsForm form); |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | Result remove(List<String> ids); |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result removeById(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result page(TemplateImgsQuery query); |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(String id); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.service; |
| | | |
| | | import cn.lili.modules.lmk.domain.entity.UserCheckTemplate; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import cn.lili.base.Result; |
| | | import cn.lili.modules.lmk.domain.form.UserCheckTemplateForm; |
| | | import cn.lili.modules.lmk.domain.query.UserCheckTemplateQuery; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 用户选择模板 服务类 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | public interface UserCheckTemplateService extends IService<UserCheckTemplate> { |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result add(UserCheckTemplateForm form); |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result update(UserCheckTemplateForm form); |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | Result remove(List<String> ids); |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result removeById(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result page(UserCheckTemplateQuery query); |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(String id); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import cn.lili.modules.lmk.domain.entity.GoodsCustomizeTemplate; |
| | | import cn.lili.modules.lmk.mapper.GoodsCustomizeTemplateMapper; |
| | | import cn.lili.modules.lmk.service.GoodsCustomizeTemplateService; |
| | | import cn.lili.base.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cn.lili.modules.lmk.domain.form.GoodsCustomizeTemplateForm; |
| | | import cn.lili.modules.lmk.domain.vo.GoodsCustomizeTemplateVO; |
| | | import cn.lili.modules.lmk.domain.query.GoodsCustomizeTemplateQuery; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.RequiredArgsConstructor; |
| | | import cn.lili.utils.PageUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.util.Assert; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 定制商品模板 服务实现类 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class GoodsCustomizeTemplateServiceImpl extends ServiceImpl<GoodsCustomizeTemplateMapper, GoodsCustomizeTemplate> implements GoodsCustomizeTemplateService { |
| | | |
| | | private final GoodsCustomizeTemplateMapper goodsCustomizeTemplateMapper; |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result add(GoodsCustomizeTemplateForm form) { |
| | | GoodsCustomizeTemplate entity = GoodsCustomizeTemplateForm.getEntityByForm(form, null); |
| | | baseMapper.insert(entity); |
| | | return Result.ok("添加成功"); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result update(GoodsCustomizeTemplateForm form) { |
| | | GoodsCustomizeTemplate entity = baseMapper.selectById(form.getId()); |
| | | |
| | | // 为空抛IllegalArgumentException,做全局异常处理 |
| | | Assert.notNull(entity, "记录不存在"); |
| | | BeanUtils.copyProperties(form, entity); |
| | | baseMapper.updateById(entity); |
| | | return Result.ok("修改成功"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result remove(List<String> ids) { |
| | | baseMapper.deleteBatchIds(ids); |
| | | return Result.ok("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result removeById(String id) { |
| | | baseMapper.deleteById(id); |
| | | return Result.ok("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(GoodsCustomizeTemplateQuery query) { |
| | | IPage<GoodsCustomizeTemplateVO> page = PageUtil.getPage(query, GoodsCustomizeTemplateVO.class); |
| | | baseMapper.getPage(page, query); |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(String id) { |
| | | GoodsCustomizeTemplateVO vo = baseMapper.getById(id); |
| | | Assert.notNull(vo, "记录不存在"); |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<GoodsCustomizeTemplate> entities = baseMapper.selectList(null); |
| | | List<GoodsCustomizeTemplateVO> vos = entities.stream() |
| | | .map(entity -> GoodsCustomizeTemplateVO.getVoByEntity(entity, null)) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import cn.lili.modules.lmk.domain.entity.TemplateConstomizeTitle; |
| | | import cn.lili.modules.lmk.mapper.TemplateConstomizeTitleMapper; |
| | | import cn.lili.modules.lmk.service.TemplateConstomizeTitleService; |
| | | import cn.lili.base.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cn.lili.modules.lmk.domain.form.TemplateConstomizeTitleForm; |
| | | import cn.lili.modules.lmk.domain.vo.TemplateConstomizeTitleVO; |
| | | import cn.lili.modules.lmk.domain.query.TemplateConstomizeTitleQuery; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.RequiredArgsConstructor; |
| | | import cn.lili.utils.PageUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.util.Assert; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 模板标题 服务实现类 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class TemplateConstomizeTitleServiceImpl extends ServiceImpl<TemplateConstomizeTitleMapper, TemplateConstomizeTitle> implements TemplateConstomizeTitleService { |
| | | |
| | | private final TemplateConstomizeTitleMapper templateConstomizeTitleMapper; |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result add(TemplateConstomizeTitleForm form) { |
| | | TemplateConstomizeTitle entity = TemplateConstomizeTitleForm.getEntityByForm(form, null); |
| | | baseMapper.insert(entity); |
| | | return Result.ok("添加成功"); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result update(TemplateConstomizeTitleForm form) { |
| | | TemplateConstomizeTitle entity = baseMapper.selectById(form.getId()); |
| | | |
| | | // 为空抛IllegalArgumentException,做全局异常处理 |
| | | Assert.notNull(entity, "记录不存在"); |
| | | BeanUtils.copyProperties(form, entity); |
| | | baseMapper.updateById(entity); |
| | | return Result.ok("修改成功"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result remove(List<String> ids) { |
| | | baseMapper.deleteBatchIds(ids); |
| | | return Result.ok("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result removeById(String id) { |
| | | baseMapper.deleteById(id); |
| | | return Result.ok("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(TemplateConstomizeTitleQuery query) { |
| | | IPage<TemplateConstomizeTitleVO> page = PageUtil.getPage(query, TemplateConstomizeTitleVO.class); |
| | | baseMapper.getPage(page, query); |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(String id) { |
| | | TemplateConstomizeTitleVO vo = baseMapper.getById(id); |
| | | Assert.notNull(vo, "记录不存在"); |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<TemplateConstomizeTitle> entities = baseMapper.selectList(null); |
| | | List<TemplateConstomizeTitleVO> vos = entities.stream() |
| | | .map(entity -> TemplateConstomizeTitleVO.getVoByEntity(entity, null)) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import cn.lili.modules.lmk.domain.entity.TemplateImgs; |
| | | import cn.lili.modules.lmk.mapper.TemplateImgsMapper; |
| | | import cn.lili.modules.lmk.service.TemplateImgsService; |
| | | import cn.lili.base.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cn.lili.modules.lmk.domain.form.TemplateImgsForm; |
| | | import cn.lili.modules.lmk.domain.vo.TemplateImgsVO; |
| | | import cn.lili.modules.lmk.domain.query.TemplateImgsQuery; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.RequiredArgsConstructor; |
| | | import cn.lili.utils.PageUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.util.Assert; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 模板图片 服务实现类 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class TemplateImgsServiceImpl extends ServiceImpl<TemplateImgsMapper, TemplateImgs> implements TemplateImgsService { |
| | | |
| | | private final TemplateImgsMapper templateImgsMapper; |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result add(TemplateImgsForm form) { |
| | | TemplateImgs entity = TemplateImgsForm.getEntityByForm(form, null); |
| | | baseMapper.insert(entity); |
| | | return Result.ok("添加成功"); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result update(TemplateImgsForm form) { |
| | | TemplateImgs entity = baseMapper.selectById(form.getId()); |
| | | |
| | | // 为空抛IllegalArgumentException,做全局异常处理 |
| | | Assert.notNull(entity, "记录不存在"); |
| | | BeanUtils.copyProperties(form, entity); |
| | | baseMapper.updateById(entity); |
| | | return Result.ok("修改成功"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result remove(List<String> ids) { |
| | | baseMapper.deleteBatchIds(ids); |
| | | return Result.ok("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result removeById(String id) { |
| | | baseMapper.deleteById(id); |
| | | return Result.ok("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(TemplateImgsQuery query) { |
| | | IPage<TemplateImgsVO> page = PageUtil.getPage(query, TemplateImgsVO.class); |
| | | baseMapper.getPage(page, query); |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(String id) { |
| | | TemplateImgsVO vo = baseMapper.getById(id); |
| | | Assert.notNull(vo, "记录不存在"); |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<TemplateImgs> entities = baseMapper.selectList(null); |
| | | List<TemplateImgsVO> vos = entities.stream() |
| | | .map(entity -> TemplateImgsVO.getVoByEntity(entity, null)) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.lili.modules.lmk.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import cn.lili.modules.lmk.domain.entity.UserCheckTemplate; |
| | | import cn.lili.modules.lmk.mapper.UserCheckTemplateMapper; |
| | | import cn.lili.modules.lmk.service.UserCheckTemplateService; |
| | | import cn.lili.base.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import cn.lili.modules.lmk.domain.form.UserCheckTemplateForm; |
| | | import cn.lili.modules.lmk.domain.vo.UserCheckTemplateVO; |
| | | import cn.lili.modules.lmk.domain.query.UserCheckTemplateQuery; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.RequiredArgsConstructor; |
| | | import cn.lili.utils.PageUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.util.Assert; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 用户选择模板 服务实现类 |
| | | * |
| | | * @author peng |
| | | * @since 2025-10-09 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class UserCheckTemplateServiceImpl extends ServiceImpl<UserCheckTemplateMapper, UserCheckTemplate> implements UserCheckTemplateService { |
| | | |
| | | private final UserCheckTemplateMapper userCheckTemplateMapper; |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result add(UserCheckTemplateForm form) { |
| | | UserCheckTemplate entity = UserCheckTemplateForm.getEntityByForm(form, null); |
| | | baseMapper.insert(entity); |
| | | return Result.ok("添加成功"); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result update(UserCheckTemplateForm form) { |
| | | UserCheckTemplate entity = baseMapper.selectById(form.getId()); |
| | | |
| | | // 为空抛IllegalArgumentException,做全局异常处理 |
| | | Assert.notNull(entity, "记录不存在"); |
| | | BeanUtils.copyProperties(form, entity); |
| | | baseMapper.updateById(entity); |
| | | return Result.ok("修改成功"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result remove(List<String> ids) { |
| | | baseMapper.deleteBatchIds(ids); |
| | | return Result.ok("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result removeById(String id) { |
| | | baseMapper.deleteById(id); |
| | | return Result.ok("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(UserCheckTemplateQuery query) { |
| | | IPage<UserCheckTemplateVO> page = PageUtil.getPage(query, UserCheckTemplateVO.class); |
| | | baseMapper.getPage(page, query); |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(String id) { |
| | | UserCheckTemplateVO vo = baseMapper.getById(id); |
| | | Assert.notNull(vo, "记录不存在"); |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<UserCheckTemplate> entities = baseMapper.selectList(null); |
| | | List<UserCheckTemplateVO> vos = entities.stream() |
| | | .map(entity -> UserCheckTemplateVO.getVoByEntity(entity, null)) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.lili.modules.lmk.mapper.GoodsCustomizeTemplateMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="cn.lili.modules.lmk.domain.vo.GoodsCustomizeTemplateVO"> |
| | | <id column="id" property="id"/> |
| | | <result column="template_name" property="templateName" /> |
| | | <result column="status" property="status" /> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <select id="getById" resultMap="BaseResultMap"> |
| | | SELECT |
| | | LGCT.template_name, |
| | | LGCT.status, |
| | | LGCT.id |
| | | FROM |
| | | lmk_goods_customize_template LGCT |
| | | WHERE |
| | | LGCT.id = #{id} AND LGCT.delete_flag = 0 |
| | | </select> |
| | | |
| | | |
| | | <select id="getPage" resultMap="BaseResultMap"> |
| | | SELECT |
| | | LGCT.template_name, |
| | | LGCT.status, |
| | | LGCT.id |
| | | FROM |
| | | lmk_goods_customize_template LGCT |
| | | WHERE |
| | | LGCT.delete_flag = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.lili.modules.lmk.mapper.TemplateConstomizeTitleMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="cn.lili.modules.lmk.domain.vo.TemplateConstomizeTitleVO"> |
| | | <id column="id" property="id"/> |
| | | <result column="template_id" property="templateId" /> |
| | | <result column="template_title" property="templateTitle" /> |
| | | <result column="content_type" property="contentType" /> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <select id="getById" resultMap="BaseResultMap"> |
| | | SELECT |
| | | LTCT.template_id, |
| | | LTCT.template_title, |
| | | LTCT.content_type, |
| | | LTCT.id |
| | | FROM |
| | | lmk_template_constomize_title LTCT |
| | | WHERE |
| | | LTCT.id = #{id} AND LTCT.delete_flag = 0 |
| | | </select> |
| | | |
| | | |
| | | <select id="getPage" resultMap="BaseResultMap"> |
| | | SELECT |
| | | LTCT.template_id, |
| | | LTCT.template_title, |
| | | LTCT.content_type, |
| | | LTCT.id |
| | | FROM |
| | | lmk_template_constomize_title LTCT |
| | | WHERE |
| | | LTCT.delete_flag = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.lili.modules.lmk.mapper.TemplateImgsMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="cn.lili.modules.lmk.domain.vo.TemplateImgsVO"> |
| | | <id column="id" property="id"/> |
| | | <result column="template_id" property="templateId" /> |
| | | <result column="img_url" property="imgUrl" /> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <select id="getById" resultMap="BaseResultMap"> |
| | | SELECT |
| | | LTI.template_id, |
| | | LTI.img_url, |
| | | LTI.id |
| | | FROM |
| | | lmk_template_imgs LTI |
| | | WHERE |
| | | LTI.id = #{id} AND LTI.delete_flag = 0 |
| | | </select> |
| | | |
| | | |
| | | <select id="getPage" resultMap="BaseResultMap"> |
| | | SELECT |
| | | LTI.template_id, |
| | | LTI.img_url, |
| | | LTI.id |
| | | FROM |
| | | lmk_template_imgs LTI |
| | | WHERE |
| | | LTI.delete_flag = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.lili.modules.lmk.mapper.UserCheckTemplateMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="cn.lili.modules.lmk.domain.vo.UserCheckTemplateVO"> |
| | | <id column="id" property="id"/> |
| | | <result column="order_sn" property="orderSn" /> |
| | | <result column="template_id" property="templateId" /> |
| | | <result column="sub_id" property="subId" /> |
| | | <result column="content" property="content" /> |
| | | <result column="template_name" property="templateName" /> |
| | | <result column="choose_img_id" property="chooseImgId" /> |
| | | <result column="choose_img" property="chooseImg" /> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <select id="getById" resultMap="BaseResultMap"> |
| | | SELECT |
| | | LUCT.order_sn, |
| | | LUCT.template_id, |
| | | LUCT.sub_id, |
| | | LUCT.content, |
| | | LUCT.template_name, |
| | | LUCT.choose_img_id, |
| | | LUCT.choose_img, |
| | | LUCT.id |
| | | FROM |
| | | lmk_user_check_template LUCT |
| | | WHERE |
| | | LUCT.id = #{id} AND LUCT.delete_flag = 0 |
| | | </select> |
| | | |
| | | |
| | | <select id="getPage" resultMap="BaseResultMap"> |
| | | SELECT |
| | | LUCT.order_sn, |
| | | LUCT.template_id, |
| | | LUCT.sub_id, |
| | | LUCT.content, |
| | | LUCT.template_name, |
| | | LUCT.choose_img_id, |
| | | LUCT.choose_img, |
| | | LUCT.id |
| | | FROM |
| | | lmk_user_check_template LUCT |
| | | WHERE |
| | | LUCT.delete_flag = 0 |
| | | </select> |
| | | |
| | | </mapper> |