mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-22 12:48:59 +08:00
feat: 添加优惠券适用商品/商品类型基础代码
This commit is contained in:
parent
883bde7488
commit
51413b9908
@ -0,0 +1,20 @@
|
||||
package com.youlai.mall.sms.mapper;
|
||||
|
||||
import com.youlai.mall.sms.pojo.entity.SmsCouponSpuCategory;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 优惠券商品分类关联持久层
|
||||
*
|
||||
* @author haoxr
|
||||
* @date 2022/6/30
|
||||
*/
|
||||
@Mapper
|
||||
public interface SmsCouponSpuCategoryMapper extends BaseMapper<SmsCouponSpuCategory> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.youlai.mall.sms.mapper;
|
||||
|
||||
import com.youlai.mall.sms.pojo.entity.SmsCouponSpu;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 优惠券商品关联持久层
|
||||
*
|
||||
* @author haoxr
|
||||
* @date 2022/6/30
|
||||
*/
|
||||
@Mapper
|
||||
public interface SmsCouponSpuMapper extends BaseMapper<SmsCouponSpu> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,40 @@
|
||||
package com.youlai.mall.sms.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName sms_coupon_spu
|
||||
*/
|
||||
@TableName(value ="sms_coupon_spu")
|
||||
@Data
|
||||
public class SmsCouponSpu implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 优惠券ID
|
||||
*/
|
||||
private Long couponId;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private Long spuId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String spuName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.youlai.mall.sms.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@TableName(value ="sms_coupon_spu_category")
|
||||
@Data
|
||||
public class SmsCouponSpuCategory implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 优惠券ID
|
||||
*/
|
||||
private Long couponId;
|
||||
|
||||
/**
|
||||
* 商品分类ID
|
||||
*/
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 商品分类名称
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.youlai.mall.sms.service;
|
||||
|
||||
import com.youlai.mall.sms.pojo.entity.SmsCouponSpuCategory;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface SmsCouponSpuCategoryService extends IService<SmsCouponSpuCategory> {
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.youlai.mall.sms.service;
|
||||
|
||||
import com.youlai.mall.sms.pojo.entity.SmsCouponSpu;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface SmsCouponSpuService extends IService<SmsCouponSpu> {
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.youlai.mall.sms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.youlai.mall.sms.pojo.entity.SmsCouponSpuCategory;
|
||||
import com.youlai.mall.sms.service.SmsCouponSpuCategoryService;
|
||||
import com.youlai.mall.sms.mapper.SmsCouponSpuCategoryMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class SmsCouponSpuCategoryServiceImpl extends ServiceImpl<SmsCouponSpuCategoryMapper, SmsCouponSpuCategory>
|
||||
implements SmsCouponSpuCategoryService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.youlai.mall.sms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.youlai.mall.sms.pojo.entity.SmsCouponSpu;
|
||||
import com.youlai.mall.sms.service.SmsCouponSpuService;
|
||||
import com.youlai.mall.sms.mapper.SmsCouponSpuMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class SmsCouponSpuServiceImpl extends ServiceImpl<SmsCouponSpuMapper, SmsCouponSpu>
|
||||
implements SmsCouponSpuService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.youlai.mall.sms.mapper.SmsCouponSpuCategoryMapper">
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.youlai.mall.sms.mapper.SmsCouponSpuMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.youlai.mall.sms.pojo.entity.SmsCouponSpu">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="couponId" column="coupon_id" jdbcType="BIGINT"/>
|
||||
<result property="spuId" column="spu_id" jdbcType="BIGINT"/>
|
||||
<result property="spuName" column="spu_name" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,coupon_id,spu_id,
|
||||
spu_name
|
||||
</sql>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user