新增功能
This commit is contained in:
@ -0,0 +1,20 @@
|
||||
package com.fuint.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.repository.model.MtGrow;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.SelectKey;
|
||||
|
||||
/**
|
||||
* 积分变化表 Mapper 接口
|
||||
*
|
||||
* Created by FSQ
|
||||
* CopyRight https://www.fuint.cn
|
||||
*/
|
||||
public interface MtGrowMapper extends BaseMapper<MtGrow> {
|
||||
|
||||
@Insert("insert into mt_grow values (#{id},#{userId},#{signTime},#{consecutiveDays},#{createTime},#{updateTime},#{operator},#{status},#{advNum},#{advTotal},#{growTotal})")
|
||||
@SelectKey(statement="select last_insert_id() from dual",before=false,
|
||||
resultType = Integer.class, keyColumn="id",keyProperty = "id")
|
||||
int insertForId(MtGrow signInfo);
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.fuint.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.repository.model.MtRaffle;
|
||||
import com.fuint.repository.model.MtRaffleItem;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员个人信息 Mapper 接口
|
||||
*
|
||||
* Created by FSQ
|
||||
* CopyRight https://www.fuint.cn
|
||||
*/
|
||||
public interface MtRaffleItemMapper extends BaseMapper<MtRaffleItem> {
|
||||
public List<MtRaffleItem> queryListByRaffleId(@Param("raffleId") Integer raffleId);
|
||||
|
||||
|
||||
public List<Integer> queryUserIdByRaffleId(@Param("raffleId") Integer raffleId);
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.fuint.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.repository.model.MtRaffle;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.SelectKey;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员个人信息 Mapper 接口
|
||||
*
|
||||
* Created by FSQ
|
||||
* CopyRight https://www.fuint.cn
|
||||
*/
|
||||
public interface MtRaffleMapper extends BaseMapper<MtRaffle> {
|
||||
@Insert("insert into mt_raffle values (#{id},#{raffleType},#{title},#{brief},#{hot},#{image},#{description},#{click}," +
|
||||
"#{nowCnt},#{allCnt},#{extraPrize},#{extraImage},#{extraType},#{createTime},#{updateTime},#{operator}," +
|
||||
"#{sort},#{status},#{rafflePoint},#{userId},#{userTime},#{forwardPoint})")
|
||||
@SelectKey(statement="select last_insert_id() from dual",before=false,
|
||||
resultType = Integer.class, keyColumn="id",keyProperty = "id")
|
||||
int insertForId(MtRaffle mtRaffle);
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.fuint.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.repository.model.MtRaffleType;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 抽奖类型 Mapper
|
||||
*
|
||||
* Created by FSQ
|
||||
* CopyRight https://www.fuint.cn
|
||||
*/
|
||||
@Mapper
|
||||
public interface MtRaffleTypeMapper extends BaseMapper<MtRaffleType> {
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package com.fuint.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.repository.model.MtTask;
|
||||
|
||||
/**
|
||||
* 任务中心 Mapper 接口
|
||||
*
|
||||
* Created by Codex
|
||||
*/
|
||||
public interface MtTaskMapper extends BaseMapper<MtTask> {
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.fuint.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.repository.model.MtTaskRecord;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 任务记录 Mapper 接口
|
||||
*
|
||||
* Created by Codex
|
||||
*/
|
||||
public interface MtTaskRecordMapper extends BaseMapper<MtTaskRecord> {
|
||||
|
||||
@Update("UPDATE mt_task_record SET COMPLETE_NUM = COMPLETE_NUM + 1, LAST_COMPLETE_TIME = #{now}, UPDATE_TIME = #{now} " +
|
||||
"WHERE ID = #{id} AND COMPLETE_NUM < #{dailyLimit}")
|
||||
int incrCompleteNum(@Param("id") Integer id, @Param("dailyLimit") Integer dailyLimit, @Param("now") Date now);
|
||||
|
||||
@Update("UPDATE mt_task_record SET CLAIM_NUM = CLAIM_NUM + 1, LAST_CLAIM_TIME = #{now}, UPDATE_TIME = #{now} " +
|
||||
"WHERE ID = #{id} AND CLAIM_NUM = #{oldClaimNum} AND CLAIM_NUM < COMPLETE_NUM")
|
||||
int incrClaimNumIfMatch(@Param("id") Integer id, @Param("oldClaimNum") Integer oldClaimNum, @Param("now") Date now);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.fuint.repository.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 会员积分记录表
|
||||
*
|
||||
* Created by FSQ
|
||||
* CopyRight https://www.fuint.cn
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("mt_grow")
|
||||
@ApiModel(value = "MtGrow对象", description = "签到记录表")
|
||||
public class MtGrow implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("用户 ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("签到日期")
|
||||
private Date signTime;
|
||||
|
||||
@ApiModelProperty("连续签到次数")
|
||||
private Integer consecutiveDays;
|
||||
|
||||
@ApiModelProperty("广告次数")
|
||||
private Integer advNum;
|
||||
|
||||
@ApiModelProperty("广告总次数")
|
||||
private Integer advTotal;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("最后操作人")
|
||||
private String operator;
|
||||
|
||||
@ApiModelProperty("状态,A正常;D作废")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("成长积分")
|
||||
private Integer growTotal;
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package com.fuint.repository.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 抽奖表
|
||||
*
|
||||
* Created by FSQ
|
||||
* CopyRight https://www.fuint.cn
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("mt_raffle")
|
||||
@ApiModel(value = "MtRaffle对象", description = "抽奖表")
|
||||
public class MtRaffle implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("抽奖类型")
|
||||
private String raffleType;
|
||||
@ApiModelProperty("标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty("简介")
|
||||
private String brief;
|
||||
|
||||
@ApiModelProperty("热度")
|
||||
private String hot;
|
||||
|
||||
@ApiModelProperty("图片地址")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty("额外奖奖品")
|
||||
private String extraPrize;
|
||||
|
||||
@ApiModelProperty("额外奖图片")
|
||||
private String extraImage;
|
||||
|
||||
@ApiModelProperty("额外奖类型")
|
||||
private String extraType;
|
||||
|
||||
@ApiModelProperty("排队人")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("排队时间")
|
||||
private Date userTime;
|
||||
|
||||
@ApiModelProperty("已抽去数")
|
||||
private Integer nowCnt;
|
||||
|
||||
@ApiModelProperty("总数")
|
||||
private Integer allCnt;
|
||||
|
||||
@ApiModelProperty("抽奖积分")
|
||||
private Integer rafflePoint;
|
||||
|
||||
@ApiModelProperty("描述")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty("点击次数")
|
||||
private Integer click;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("最后操作人")
|
||||
private String operator;
|
||||
|
||||
@ApiModelProperty("转发赠送积分")
|
||||
private Integer forwardPoint;
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package com.fuint.repository.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 抽奖表
|
||||
*
|
||||
* Created by FSQ
|
||||
* CopyRight https://www.fuint.cn
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("mt_raffle_item")
|
||||
@ApiModel(value = "MtRaffleItem对象", description = "抽奖明细表")
|
||||
public class MtRaffleItem implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("抽奖表ID")
|
||||
private Integer raffleId;
|
||||
|
||||
@ApiModelProperty("抽奖项目")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty("抽奖奖品")
|
||||
private String prize;
|
||||
|
||||
@ApiModelProperty("积分价值")
|
||||
private Integer point;
|
||||
|
||||
@ApiModelProperty("中奖用户")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("会员号")
|
||||
private String userNo;
|
||||
|
||||
@ApiModelProperty("称呼")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("图片")
|
||||
private String image;
|
||||
@ApiModelProperty("奖品状态")
|
||||
private Integer win;
|
||||
|
||||
@ApiModelProperty("领取状态")
|
||||
private Integer deal;
|
||||
|
||||
@ApiModelProperty("描述")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("最后操作人")
|
||||
private String operator;
|
||||
|
||||
@ApiModelProperty("转发人")
|
||||
private Integer forwardUserId;
|
||||
|
||||
@ApiModelProperty("奖品类型")
|
||||
private String prizeType;
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.fuint.repository.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 抽奖类型表
|
||||
*
|
||||
* Created by FSQ
|
||||
* CopyRight https://www.fuint.cn
|
||||
*/
|
||||
@Data
|
||||
@TableName("mt_raffle_type")
|
||||
@ApiModel(value = "MtRaffleType对象", description = "MtRaffleType表对象")
|
||||
public class MtRaffleType implements Serializable {
|
||||
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("商户ID")
|
||||
private Integer merchantId;
|
||||
|
||||
@ApiModelProperty("店铺ID")
|
||||
private Integer storeId;
|
||||
|
||||
@ApiModelProperty("类型编码")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("类型名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("操作人")
|
||||
private String operator;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private String status;
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package com.fuint.repository.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 任务中心配置
|
||||
*
|
||||
* Created by Codex
|
||||
*/
|
||||
@Data
|
||||
@TableName("mt_task")
|
||||
@ApiModel(value = "MtTask对象", description = "MtTask表对象")
|
||||
public class MtTask implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("所属商户ID")
|
||||
private Integer merchantId;
|
||||
|
||||
@ApiModelProperty("所属店铺ID")
|
||||
private Integer storeId;
|
||||
|
||||
@ApiModelProperty("任务编码")
|
||||
private String taskCode;
|
||||
|
||||
@ApiModelProperty("任务名称")
|
||||
private String taskName;
|
||||
|
||||
@ApiModelProperty("任务类型")
|
||||
private String taskType;
|
||||
|
||||
@ApiModelProperty("任务描述")
|
||||
private String taskDesc;
|
||||
|
||||
@ApiModelProperty("任务跳转链接")
|
||||
private String jumpUrl;
|
||||
|
||||
@ApiModelProperty("奖励积分")
|
||||
private Integer rewardPoint;
|
||||
|
||||
@ApiModelProperty("每日可领取次数")
|
||||
private Integer dailyLimit;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("最后操作人")
|
||||
private String operator;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("状态,A正常;D删除")
|
||||
private String status;
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package com.fuint.repository.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 任务完成记录
|
||||
*
|
||||
* Created by Codex
|
||||
*/
|
||||
@Data
|
||||
@TableName("mt_task_record")
|
||||
@ApiModel(value = "MtTaskRecord对象", description = "任务完成记录表")
|
||||
public class MtTaskRecord implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("商户ID")
|
||||
private Integer merchantId;
|
||||
|
||||
@ApiModelProperty("店铺ID")
|
||||
private Integer storeId;
|
||||
|
||||
@ApiModelProperty("任务ID")
|
||||
private Integer taskId;
|
||||
|
||||
@ApiModelProperty("会员ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("任务日期(yyyy-MM-dd)")
|
||||
private String taskDate;
|
||||
|
||||
@ApiModelProperty("完成次数")
|
||||
private Integer completeNum;
|
||||
|
||||
@ApiModelProperty("已领取次数")
|
||||
private Integer claimNum;
|
||||
|
||||
@ApiModelProperty("最近完成时间")
|
||||
private Date lastCompleteTime;
|
||||
|
||||
@ApiModelProperty("最近领取时间")
|
||||
private Date lastClaimTime;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("最后操作人")
|
||||
private String operator;
|
||||
|
||||
@ApiModelProperty("状态,A正常;D删除")
|
||||
private String status;
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
<?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.fuint.repository.mapper.MtGrowMapper">
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,11 @@
|
||||
<?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.fuint.repository.mapper.MtRaffleItemMapper">
|
||||
<select id="queryListByRaffleId" resultType="com.fuint.repository.model.MtRaffleItem">
|
||||
select * from mt_raffle_item t where t.raffle_id = #{raffleId} by id asc
|
||||
</select>
|
||||
|
||||
<select id="queryUserIdByRaffleId" resultType="java.lang.Integer">
|
||||
select user_id from mt_raffle_item t where t.raffle_id = #{raffleId} and user_id is not null
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,5 @@
|
||||
<?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.fuint.repository.mapper.MtRaffleMapper">
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user