Commit 2c8377c7 authored by licc's avatar licc

返佣接口定义

parent c71ecf49
package cn.wisenergy.mapper;
import cn.wisenergy.model.app.OrderInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author 86187
*/
public interface OrderMapper extends BaseMapper<OrderInfo> {
/**
* 根据返佣状态获取 订单列表
*
* @param rebateStatus 0 未返佣 1 返佣
* @return 订单列表
*/
List<OrderInfo> getByRebateStatus(@Param("rebateStatus") Integer rebateStatus);
}
<?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.wisenergy.mapper.OrderMapper">
<resultMap id="OrderMap" type="cn.wisenergy.model.app.OrderInfo">
<id column="id" property="id"/>
<result column="buyer_id" property="buyerId"/>
<result column="item_id" property="itemId"/>
<result column="pay_type" property="payType"/>
<result column="youzan_update_time" property="youzanUpdateTime"/>
<result column="tid" property="tid"/>
<result column="created" property="created"/>
<result column="team_type" property="teamType"/>
<result column="pay_time" property="payTime"/>
<result column="pay_type_str" property="payTypeStr"/>
<result column="close_type" property="closeType"/>
<result column="refund_state" property="refundState"/>
<result column="success_time" property="successTime"/>
<result column="payment" property="payment"/>
<result column="rebate_status" property="rebateStatus"/>
<result column="month_order_status" property="monthOrderStatus"/>
<result column="monthly_task_status" property="monthlyTaskStatus"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="table">
order_info
</sql>
<sql id="cols_all">
id,
<include refid="cols_exclude_id"/>
</sql>
<sql id="cols_exclude_id">
buyer_id,item_id,pay_type,youzan_update_time,tid,created,team_type,pay_time,pay_type_str,close_type,refund_state,
success_time,payment,rebate_status,month_order_status,monthly_task_status,create_time,update_time
</sql>
<sql id="vals">
#{buyerId},#{itemId},#{payType},#{youzanUpdateTime}, #{tid},#{created},#{teamType},#{payTime},#{payTypeStr},
#{closeType},#{refundState},#{successTime},#{payment},
#{rebateStatus},#{monthOrderStatus},#{monthlyTaskStatus},now(),now()
</sql>
<sql id="updateCondition">
<if test="buyerId != null">buyer_id = #{buyerId},</if>
<if test="itemId != null">item_id =#{itemId},</if>
<if test="payType != null">pay_type =#{payType},</if>
<if test="youzanUpdateTime != null">youzan_update_time =#{youzanUpdateTime},</if>
<if test="tid != null">tid =#{tid},</if>
<if test="created != null">created =#{created},</if>
<if test="teamType != null">team_type =#{teamType},</if>
<if test="payTime != null">pay_time =#{payTime},</if>
<if test="payTypeStr != null">pay_type_str =#{payTypeStr},</if>
<if test="closeType != null">close_type =#{closeType},</if>
<if test="refundState != null">refund_state =#{refundState},</if>
<if test="successTime != null">success_time =#{successTime},</if>
<if test="payment != null">payment =#{payment},</if>
<if test="rebateStatus != null">rebate_status =#{rebateStatus},</if>
<if test="monthOrderStatus != null">month_order_status =#{monthOrderStatus},</if>
<if test="monthlyTaskStatus != null">monthly_task_status =#{monthlyTaskStatus},</if>
update_time =now()
</sql>
<sql id="criteria">
<if test="id != null">id = #{id}</if>
<if test="buyerId != null">and buyer_id = #{buyerId}</if>
<if test="itemId != null">and item_id =#{itemId}</if>
<if test="payType != null">and pay_type =#{payType}</if>
<if test="youzanUpdateTime != null">youzan_update_time =#{youzanUpdateTime}</if>
<if test="tid != null">and tid =#{tid}</if>
<if test="created != null">and created =#{created}</if>
<if test="teamType != null">and team_type =#{teamType}</if>
<if test="payTime != null">and pay_time =#{payTime}</if>
<if test="payTypeStr != null">and pay_type_str =#{payTypeStr}</if>
<if test="closeType != null">and close_type =#{closeType}</if>
<if test="refundState != null">and refund_state =#{refundState}</if>
<if test="successTime != null">and success_time =#{successTime}</if>
<if test="payment != null">and payment =#{payment}</if>
<if test="rebateStatus != null">and rebate_status =#{rebateStatus}</if>
<if test="monthOrderStatus != null">and month_order_status =#{monthOrderStatus}</if>
<if test="monthlyTaskStatus != null">and monthly_task_status =#{monthlyTaskStatus}</if>
<if test="createTime != null">and create_time &gt;= #{createTime}</if>
<if test="updateTime != null">and #{updateTime} &gt;= update_time</if>
</sql>
<select id="getByRebateStatus" resultType="cn.wisenergy.model.app.OrderInfo">
SELECT
<include refid="cols_all"/>
from
<include refid="table"/>
<where>
rebateStatus=#{rebateStatus}
</where>
</select>
</mapper>
\ No newline at end of file
......@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -32,25 +33,25 @@ public class AccountInfo implements Serializable {
* 可提现金额
*/
@ApiModelProperty(name = "extractMoney", value = "可提现金额")
private String extractMoney;
private BigDecimal extractMoney;
/**
* 本月业绩
*/
@ApiModelProperty(name = "performanceMonth", value = "本月业绩")
private String performanceMonth;
private BigDecimal performanceMonth;
/**
* 冻结金额
*/
@ApiModelProperty(name = "frozenMoney", value = "冻结金额")
private Integer frozenMoney;
private BigDecimal frozenMoney;
/**
* 累计业绩
*/
@ApiModelProperty(name = "performanceTotal", value = "累计业绩")
private Integer performanceTotal;
private BigDecimal performanceTotal;
/**
* 创建时间
*/
......
......@@ -7,6 +7,12 @@ import cn.wisenergy.model.app.AccountInfo;
/**
* @author 86187
*/
public interface AccountSerivce {
public interface AccountService {
R<AccountInfo> getById(Integer userId);
/**
* 返佣统计
* @return
*/
R<Boolean> rebateCount();
}
package cn.wisenergy.service.app;
/**
*@ Description: 订单接口定义
*@ Author : 86187
*@ Date : 2021/2/22 17:04
* @author 86187
*/
public interface OrderService {
}
......@@ -3,7 +3,7 @@ package cn.wisenergy.service.app.impl;
import cn.wisenergy.common.utils.R;
import cn.wisenergy.mapper.AccountMapper;
import cn.wisenergy.model.app.AccountInfo;
import cn.wisenergy.service.app.AccountSerivce;
import cn.wisenergy.service.app.AccountService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
......@@ -12,13 +12,22 @@ import org.springframework.stereotype.Service;
/**
* @author 86187
*/
@Slf4j
@Service
public class AccountSerivceImpl extends ServiceImpl<AccountMapper,AccountInfo>implements AccountSerivce {
public class AccountServiceImpl extends ServiceImpl<AccountMapper,AccountInfo>implements AccountService {
@Override
public R<AccountInfo> getById(Integer userId) {
return null;
}
@Override
public R<AccountInfo> rebateCount() {
log.info("shop-mall[]AccountServiceImpl[]rebateCount");
return null;
}
}
package cn.wisenergy.service.app.impl;
import cn.wisenergy.mapper.OrderMapper;
import cn.wisenergy.model.app.OrderInfo;
import cn.wisenergy.service.app.OrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @author 86187
* @ Description: 订单接口业务实现
* @ Author : 86187
* @ Date : 2021/2/22 17:06
*/
public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderInfo> implements OrderService {
}
package cn.wisenergy.web.admin.controller.app;
import cn.wisenergy.service.app.AccountSerivce;
import cn.wisenergy.service.app.AccountService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -15,6 +15,6 @@ import org.springframework.web.bind.annotation.*;
@Slf4j
public class AccountController {
@Autowired
private AccountSerivce accountSerivce;
private AccountService accountSerivce;
}
......@@ -5,7 +5,7 @@ import cn.wisenergy.common.constant.CommonConstants;
import cn.wisenergy.common.enums.RespCodeEnum;
import cn.wisenergy.common.utils.exception.Result;
import cn.wisenergy.model.app.AccountInfo;
import cn.wisenergy.service.app.AccountSerivce;
import cn.wisenergy.service.app.AccountService;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.aspectj.lang.ProceedingJoinPoint;
......@@ -26,7 +26,7 @@ import java.util.Map;
@Component
public class DataAuthAspect {
@Autowired
AccountSerivce sysUserService;
AccountService sysUserService;
@Pointcut("@annotation(cn.wisenergy.common.annotation.DataAuth)")
public void dataPointCut() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment