新增功能
This commit is contained in:
@ -0,0 +1,17 @@
|
||||
package com.fuint.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.repository.model.MtLookComment;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 看看评论 Mapper
|
||||
*
|
||||
* Created by Codex
|
||||
*/
|
||||
public interface MtLookCommentMapper extends BaseMapper<MtLookComment> {
|
||||
|
||||
Integer incrLikeNum(@Param("id") Integer id);
|
||||
|
||||
Integer decrLikeNum(@Param("id") Integer id);
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package com.fuint.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.repository.model.MtLookLike;
|
||||
|
||||
/**
|
||||
* 看看点赞 Mapper
|
||||
*
|
||||
* Created by Codex
|
||||
*/
|
||||
public interface MtLookLikeMapper extends BaseMapper<MtLookLike> {
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.fuint.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.repository.model.MtLookWork;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 看看作品 Mapper
|
||||
*
|
||||
* Created by Codex
|
||||
*/
|
||||
public interface MtLookWorkMapper extends BaseMapper<MtLookWork> {
|
||||
|
||||
Integer incrLikeNum(@Param("id") Integer id);
|
||||
|
||||
Integer decrLikeNum(@Param("id") Integer id);
|
||||
|
||||
Integer incrCommentNum(@Param("id") Integer id);
|
||||
|
||||
Integer decrCommentNum(@Param("id") Integer id);
|
||||
}
|
||||
@ -43,4 +43,13 @@ public interface MtOrderMapper extends BaseMapper<MtOrder> {
|
||||
|
||||
List<MtOrder> getTobeCommissionOrderList(@Param("dateTime") String dateTime);
|
||||
|
||||
Integer countCompleteTaskOrder(@Param("merchantId") Integer merchantId,
|
||||
@Param("storeId") Integer storeId,
|
||||
@Param("userId") Integer userId,
|
||||
@Param("startTime") Date startTime,
|
||||
@Param("endTime") Date endTime,
|
||||
@Param("pointThreshold") Integer pointThreshold,
|
||||
@Param("balanceThreshold") BigDecimal balanceThreshold,
|
||||
@Param("goodsIdList") List<Integer> goodsIdList);
|
||||
|
||||
}
|
||||
|
||||
@ -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.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 看看作品评论
|
||||
*
|
||||
* Created by Codex
|
||||
*/
|
||||
@Data
|
||||
@TableName("mt_look_comment")
|
||||
@ApiModel(value = "MtLookComment对象", description = "看看作品评论")
|
||||
public class MtLookComment 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 workId;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("评论内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty("评论图片,逗号分隔")
|
||||
private String images;
|
||||
|
||||
@ApiModelProperty("点赞数")
|
||||
private Integer likeNum;
|
||||
|
||||
@ApiModelProperty("最后操作人")
|
||||
private String operator;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("状态(A启用,N禁用,D删除)")
|
||||
private String status;
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
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_look_like")
|
||||
@ApiModel(value = "MtLookLike对象", description = "看看点赞记录")
|
||||
public class MtLookLike 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 userId;
|
||||
|
||||
@ApiModelProperty("对象类型(WORK/COMMENT)")
|
||||
private String targetType;
|
||||
|
||||
@ApiModelProperty("对象ID")
|
||||
private Integer targetId;
|
||||
|
||||
@ApiModelProperty("状态(A已赞,N取消,D删除)")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@ -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_look_work")
|
||||
@ApiModel(value = "MtLookWork对象", description = "看看作品")
|
||||
public class MtLookWork 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 userId;
|
||||
|
||||
@ApiModelProperty("标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty("描述")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty("封面图")
|
||||
private String cover;
|
||||
|
||||
@ApiModelProperty("图片列表,逗号分隔")
|
||||
private String images;
|
||||
|
||||
@ApiModelProperty("点赞数")
|
||||
private Integer likeNum;
|
||||
|
||||
@ApiModelProperty("评论数")
|
||||
private Integer commentNum;
|
||||
|
||||
@ApiModelProperty("最后操作人")
|
||||
private String operator;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("状态(A启用,N禁用,D删除)")
|
||||
private String status;
|
||||
}
|
||||
@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
@ -50,6 +51,21 @@ public class MtTask implements Serializable {
|
||||
@ApiModelProperty("奖励积分")
|
||||
private Integer rewardPoint;
|
||||
|
||||
@ApiModelProperty("奖励余额")
|
||||
private BigDecimal rewardBalance;
|
||||
|
||||
@ApiModelProperty("银币阈值(订单使用银币数量)")
|
||||
private Integer pointThreshold;
|
||||
|
||||
@ApiModelProperty("余额阈值(订单使用余额金额)")
|
||||
private BigDecimal balanceThreshold;
|
||||
|
||||
@ApiModelProperty("指定商品ID,多个逗号分隔,空表示全部商品")
|
||||
private String targetGoodsIds;
|
||||
|
||||
@ApiModelProperty("完成阈值(订单金额/点赞数)")
|
||||
private BigDecimal completeThreshold;
|
||||
|
||||
@ApiModelProperty("每日可领取次数")
|
||||
private Integer dailyLimit;
|
||||
|
||||
|
||||
@ -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.MtLookCommentMapper">
|
||||
<update id="incrLikeNum">
|
||||
update mt_look_comment t set t.LIKE_NUM = IFNULL(t.LIKE_NUM, 0) + 1 where t.ID = #{id}
|
||||
</update>
|
||||
|
||||
<update id="decrLikeNum">
|
||||
update mt_look_comment t set t.LIKE_NUM = if(IFNULL(t.LIKE_NUM, 0) > 0, t.LIKE_NUM - 1, 0) where t.ID = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,19 @@
|
||||
<?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.MtLookWorkMapper">
|
||||
<update id="incrLikeNum">
|
||||
update mt_look_work t set t.LIKE_NUM = IFNULL(t.LIKE_NUM, 0) + 1 where t.ID = #{id}
|
||||
</update>
|
||||
|
||||
<update id="decrLikeNum">
|
||||
update mt_look_work t set t.LIKE_NUM = if(IFNULL(t.LIKE_NUM, 0) > 0, t.LIKE_NUM - 1, 0) where t.ID = #{id}
|
||||
</update>
|
||||
|
||||
<update id="incrCommentNum">
|
||||
update mt_look_work t set t.COMMENT_NUM = IFNULL(t.COMMENT_NUM, 0) + 1 where t.ID = #{id}
|
||||
</update>
|
||||
|
||||
<update id="decrCommentNum">
|
||||
update mt_look_work t set t.COMMENT_NUM = if(IFNULL(t.COMMENT_NUM, 0) > 0, t.COMMENT_NUM - 1, 0) where t.ID = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -71,4 +71,34 @@
|
||||
<select id="getTobeCommissionOrderList" resultType="com.fuint.repository.model.MtOrder">
|
||||
SELECT t.* FROM `mt_order` t WHERE t.PAY_TIME <= #{dateTime} AND t.STATUS = 'I' AND t.PAY_STATUS = 'B' AND t.COMMISSION_STATUS = 'A' ORDER BY t.ID DESC LIMIT 10
|
||||
</select>
|
||||
|
||||
<select id="countCompleteTaskOrder" resultType="java.lang.Integer">
|
||||
SELECT COUNT(DISTINCT o.ID)
|
||||
FROM mt_order o
|
||||
<if test="goodsIdList != null and goodsIdList.size() > 0">
|
||||
INNER JOIN mt_order_goods og ON og.ORDER_ID = o.ID AND og.STATUS = 'A'
|
||||
</if>
|
||||
WHERE o.MERCHANT_ID = #{merchantId}
|
||||
AND o.USER_ID = #{userId}
|
||||
AND o.STATUS = 'I'
|
||||
AND o.PAY_STATUS = 'B'
|
||||
AND o.UPDATE_TIME >= #{startTime}
|
||||
AND o.UPDATE_TIME < #{endTime}
|
||||
<if test="storeId != null and storeId > 0">
|
||||
AND (o.STORE_ID = 0 OR o.STORE_ID = #{storeId})
|
||||
</if>
|
||||
<if test="pointThreshold != null">
|
||||
AND o.USE_POINT >= #{pointThreshold}
|
||||
</if>
|
||||
<if test="balanceThreshold != null">
|
||||
AND o.PAY_TYPE = 'BALANCE'
|
||||
AND o.PAY_AMOUNT >= #{balanceThreshold}
|
||||
</if>
|
||||
<if test="goodsIdList != null and goodsIdList.size() > 0">
|
||||
AND og.GOODS_ID IN
|
||||
<foreach collection="goodsIdList" item="goodsId" open="(" separator="," close=")">
|
||||
#{goodsId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user