创客额度相关,分享改bug,
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
package cn.pluss.platform.mapper;
|
||||
|
||||
import cn.pluss.platform.entity.UserAccountFlow;
|
||||
import cn.pluss.platform.entity.UserMakerFlow;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserAccountFlowMapper extends BaseMapper<UserAccountFlow> {
|
||||
public interface UserAccountFlowMapper extends BaseMapper<UserAccountFlow> {
|
||||
|
||||
@Select("SELECT * FROM tb_pluss_user_account_flow WHERE user_id = #{userId} AND biz_code = 'SD' order by id desc limit #{pageSize} offset #{offset} ")
|
||||
List<UserAccountFlow> selectByUserIdType(@Param("userId") Long userId,@Param("pageSize") Integer pageSize,@Param("offset") Integer offset);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ public interface UserInfoMapper extends BaseMapper<UserInfo> {
|
||||
*/
|
||||
UserInfo selectMainUserInfo(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* @description:取主商户和子商户信息
|
||||
* @date: 2021/9/23 15:43
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package cn.pluss.platform.mapper;
|
||||
|
||||
import cn.pluss.platform.entity.UserMakerFlow;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
public interface UserMakerFlowMapper extends BaseMapper<UserMakerFlow> {
|
||||
|
||||
@Select(value = "SELECT id,user_id AS userId ,biz_code AS bizCode ,biz_name AS bizName ,amount,balance,create_time AS createTime ,remark FROM tb_pluss_user_maker_flow WHERE user_id = #{userId} order by id desc limit #{pageSize} offset #{offset} ")
|
||||
List<UserMakerFlow> selectByUserId(@Param("userId") Long userId,@Param("pageSize") Integer pageSize,@Param("offset") Integer offset);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package cn.pluss.platform.mapper;
|
||||
|
||||
import cn.pluss.platform.entity.UserIntegral;
|
||||
import cn.pluss.platform.entity.UserMakerQuota;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
public interface UserMakerQuotaMapper extends BaseMapper<UserMakerQuota> {
|
||||
BigDecimal sumQuota(@Param("userId") Long userId);
|
||||
@Update(value = "update tb_pluss_user_account set amount=amount+#{amount} where userId=#{userId}")
|
||||
Integer updateMakerFreeze(@Param("userId") Integer userId, @Param("amount") BigDecimal amount);
|
||||
|
||||
@Select(value ="SELECT * FROM tb_pluss_user_maker_quota WHERE userId = #{userId}")
|
||||
UserMakerQuota selectByUserId(@Param("userId") Long userId);
|
||||
|
||||
}
|
||||
@@ -34,6 +34,7 @@ public interface UserPromotionMapper extends BaseMapper<UserPromotion> {
|
||||
UserPromotion selectByUserId(@Param("userId") String userId);
|
||||
|
||||
UserPromotion selectByPrimaryKey(Long userId);
|
||||
UserPromotion selectByUserIdMC(Long userId);
|
||||
@Select("select max(current_fee) from tb_pluss_user_promotion where parent_user_id=#{id}")
|
||||
BigDecimal selectMaxFeeByUserId(@Param("id")String id);
|
||||
@Select(" select *\n" +
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?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.pluss.platform.mapper.UserMakerQuotaMapper">
|
||||
|
||||
<select id="sumQuota" resultType="java.math.BigDecimal">
|
||||
SELECT SUM(amount)
|
||||
FROM tb_pluss_user_maker_quota
|
||||
WHERE userId = #{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -37,4 +37,15 @@
|
||||
from tb_pluss_user_promotion
|
||||
where user_id = #{userId}
|
||||
</select>
|
||||
<select id="selectByUserIdMC" resultType="cn.pluss.platform.entity.UserPromotion">
|
||||
select *
|
||||
from tb_pluss_user_promotion
|
||||
<where>
|
||||
user_id = #{userId}
|
||||
AND type_code = 'MC'
|
||||
AND is_extend = '1'
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user