mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-23 05:00:25 +08:00
feat:秒杀活动管理员端结构搭建
This commit is contained in:
parent
a270b36d10
commit
a905d5b3f8
@ -0,0 +1,50 @@
|
||||
package com.youlai.mall.sms.pojo.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* sms_seckill_session
|
||||
* @author huawei
|
||||
*/
|
||||
@Data
|
||||
public class SmsSeckillSession implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 场次名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 每日开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 每日结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 启用状态 1-开启 0-关闭
|
||||
*/
|
||||
private Boolean status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date gmtCreate;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date gmtModified;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.youlai.mall.sms.pojo.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* sms_seckill_sku_relation
|
||||
* @author huawei
|
||||
*/
|
||||
@Data
|
||||
public class SmsSeckillSkuRelation implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 活动场次id
|
||||
*/
|
||||
private Long sessionId;
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
private Long skuId;
|
||||
|
||||
/**
|
||||
* 秒杀价格
|
||||
*/
|
||||
private Long seckillPrice;
|
||||
|
||||
/**
|
||||
* 秒杀总量
|
||||
*/
|
||||
private Integer seckillCount;
|
||||
|
||||
/**
|
||||
* 每人限购数量
|
||||
*/
|
||||
private Integer seckillLimit;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer seckillSort;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date gmtCreate;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date gmtModified;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.youlai.mall.sms.controller.admin;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author huawei
|
||||
* @desc 秒杀活动场次管理
|
||||
* @email huawei_code@163.com
|
||||
* @date 2021/3/4
|
||||
*/
|
||||
@Api(tags = "秒杀活动场次管理")
|
||||
@RestController
|
||||
@RequestMapping("/api.admin/v1/seckill")
|
||||
public class SeckillController {
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.youlai.mall.sms.controller.admin;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author huawei
|
||||
* @desc 秒杀活动商品关联管理模块
|
||||
* @email huawei_code@163.com
|
||||
* @date 2021/3/4
|
||||
*/
|
||||
@Api(tags = "秒杀活动商品关联管理模块")
|
||||
@RestController
|
||||
@RequestMapping("/api.admin/v1/seckill/sku/relation")
|
||||
public class SeckillSkuRelationController {
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.youlai.mall.sms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.youlai.mall.sms.pojo.domain.SmsSeckillSession;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author huawei
|
||||
* @email huawei_code@163.com
|
||||
* @date 2021/3/4
|
||||
*/
|
||||
@Mapper
|
||||
public interface SmsSeckillSessionMapper extends BaseMapper<SmsSeckillSession> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.youlai.mall.sms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.youlai.mall.sms.pojo.domain.SmsSeckillSkuRelation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author huawei
|
||||
* @email huawei_code@163.com
|
||||
* @date 2021/3/4
|
||||
*/
|
||||
@Mapper
|
||||
public interface SmsSeckillSkuRelationMapper extends BaseMapper<SmsSeckillSkuRelation> {
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.youlai.mall.sms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.youlai.mall.sms.pojo.domain.SmsSeckillSession;
|
||||
|
||||
/**
|
||||
* @author huawei
|
||||
* @desc 秒杀活动场次业务接口
|
||||
* @email huawei_code@163.com
|
||||
* @date 2021/3/5
|
||||
*/
|
||||
public interface SmsSeckillSessionService extends IService<SmsSeckillSession> {
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.youlai.mall.sms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.youlai.mall.sms.pojo.domain.SmsSeckillSkuRelation;
|
||||
|
||||
/**
|
||||
* @author huawei
|
||||
* @desc 秒杀活动场次商品关联业务接口
|
||||
* @email huawei_code@163.com
|
||||
* @date 2021/3/5
|
||||
*/
|
||||
public interface SmsSeckillSkuRelationService extends IService<SmsSeckillSkuRelation> {
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.youlai.mall.sms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.youlai.mall.sms.mapper.SmsSeckillSessionMapper;
|
||||
import com.youlai.mall.sms.pojo.domain.SmsSeckillSession;
|
||||
import com.youlai.mall.sms.service.SmsSeckillSessionService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author huawei
|
||||
* @desc 秒杀活动场次管理业务实现类
|
||||
* @email huawei_code@163.com
|
||||
* @date 2021/3/5
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class SmsSeckillSessionServiceImpl extends ServiceImpl<SmsSeckillSessionMapper, SmsSeckillSession> implements SmsSeckillSessionService {
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.youlai.mall.sms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.youlai.mall.sms.mapper.SmsSeckillSkuRelationMapper;
|
||||
import com.youlai.mall.sms.pojo.domain.SmsSeckillSkuRelation;
|
||||
import com.youlai.mall.sms.service.SmsSeckillSkuRelationService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author huawei
|
||||
* @desc 秒杀活动场次商品关联业务实现类
|
||||
* @email huawei_code@163.com
|
||||
* @date 2021/3/5
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class SmsSeckillSkuRelationServiceImpl extends ServiceImpl<SmsSeckillSkuRelationMapper, SmsSeckillSkuRelation> implements SmsSeckillSkuRelationService {
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
<?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.SmsSeckillSessionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.youlai.mall.sms.pojo.domain.SmsSeckillSession">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||
<result column="status" jdbcType="BOOLEAN" property="status" />
|
||||
<result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
|
||||
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, start_time, end_time, `status`, gmt_create, gmt_modified
|
||||
</sql>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,20 @@
|
||||
<?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.SmsSeckillSkuRelationMapper">
|
||||
<resultMap id="BaseResultMap" type="com.youlai.mall.sms.pojo.domain.SmsSeckillSkuRelation">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="session_id" jdbcType="BIGINT" property="sessionId" />
|
||||
<result column="sku_id" jdbcType="BIGINT" property="skuId" />
|
||||
<result column="seckill_price" jdbcType="BIGINT" property="seckillPrice" />
|
||||
<result column="seckill_count" jdbcType="INTEGER" property="seckillCount" />
|
||||
<result column="seckill_limit" jdbcType="INTEGER" property="seckillLimit" />
|
||||
<result column="seckill_sort" jdbcType="INTEGER" property="seckillSort" />
|
||||
<result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
|
||||
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, session_id, sku_id, seckill_price, seckill_count, seckill_limit, seckill_sort,
|
||||
gmt_create, gmt_modified
|
||||
</sql>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user