Browse Source

feature1.0.0-img:添加创作者收益方法

master
chengkun 4 years ago
parent
commit
019cff21d0
  1. 25
      bnyer-services/bnyer-img/src/main/java/com/bnyer/img/mapper/CreatorProfitMapper.java
  2. 14
      bnyer-services/bnyer-img/src/main/java/com/bnyer/img/service/impl/CreatorProfitServiceImpl.java
  3. 21
      bnyer-services/bnyer-img/src/main/resources/com/bnyer/img/mapper/CreatorProfitMapper.xml

25
bnyer-services/bnyer-img/src/main/java/com/bnyer/img/mapper/CreatorProfitMapper.java

@ -2,7 +2,11 @@ package com.bnyer.img.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bnyer.img.domain.CreatorProfit;
import com.bnyer.img.vo.CreatorIncomeProfitVo;
import com.bnyer.img.vo.CreatorPreProfitVo;
import com.bnyer.img.vo.CreatorTransIntoProfitVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* @author chengkun
@ -10,4 +14,25 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface CreatorProfitMapper extends BaseMapper<CreatorProfit> {
/**
* 小程序艺术家查询昨日即将入账收益
* @param creatorId 艺术家id
* @return -
*/
CreatorPreProfitVo queryFrontPreProfit(@Param("creatorId") Long creatorId);
/**
* 小程序艺术家查询昨日入场收益
* @param creatorId 艺术家id
* @return -
*/
CreatorIncomeProfitVo queryFrontIncomeProfit(@Param("creatorId") Long creatorId);
/**
* 小程序艺术家查询转入钱包收益
* @param creatorId 艺术家id
* @return -
*/
CreatorTransIntoProfitVo queryFrontTransIntoProfit(@Param("creatorId")Long creatorId);
}

14
bnyer-services/bnyer-img/src/main/java/com/bnyer/img/service/impl/CreatorProfitServiceImpl.java

@ -105,22 +105,28 @@ public class CreatorProfitServiceImpl implements CreatorProfitService {
@Override
@Transactional(rollbackFor = Exception.class)
public int handleUpdateConfirmType(Long id, Long creatorId) {
return 0;
LambdaUpdateWrapper<CreatorProfit> wrapper = new LambdaUpdateWrapper<>();
wrapper.eq(CreatorProfit::getCreatorId, creatorId);
wrapper.eq(CreatorProfit::getId, id);
CreatorProfit creatorProfit = new CreatorProfit();
creatorProfit.setConfirmStatus("1");
creatorProfit.setConfirmType("1");
return creatorProfitMapper.update(creatorProfit, wrapper);
}
@Override
public CreatorPreProfitVo queryFrontPreProfit(Long creatorId) {
return null;
return creatorProfitMapper.queryFrontPreProfit(creatorId);
}
@Override
public CreatorIncomeProfitVo queryFrontIncomeProfit(Long creatorId) {
return null;
return creatorProfitMapper.queryFrontIncomeProfit(creatorId);
}
@Override
public CreatorTransIntoProfitVo queryFrontTransIntoProfit(Long creatorId) {
return null;
return creatorProfitMapper.queryFrontTransIntoProfit(creatorId);
}
@Override

21
bnyer-services/bnyer-img/src/main/resources/com/bnyer/img/mapper/CreatorProfitMapper.xml

@ -32,4 +32,25 @@
confirm_status, download_num, view_num, is_show, create_time, income_time, confirm_time,
wallet_time, update_time, sort
</sql>
<select id="queryFrontPreProfit" resultType="com.bnyer.img.vo.CreatorPreProfitVo">
select
id,creator_id,scan_code,img_id,platform,app_type,type,status,download_num,create_time
from img_creator_profit
where is_show = '1' and creator_id = #{creatorId}
</select>
<select id="queryFrontIncomeProfit" resultType="com.bnyer.img.vo.CreatorIncomeProfitVo">
select
from img_creator_profit
where is_show = '1' and creator_id = #{creatorId}
</select>
<select id="queryFrontTransIntoProfit" resultType="com.bnyer.img.vo.CreatorTransIntoProfitVo">
select
from img_creator_profit
where is_show = '1' and creator_id = #{creatorId}
</select>
</mapper>

Loading…
Cancel
Save