会员余额明细获取
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
package com.czg.service.account.mapper;
|
||||
|
||||
import com.czg.account.vo.ShopUserFlowVO;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.czg.account.entity.ShopUserFlow;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户余额流水 映射层。
|
||||
@@ -11,4 +15,5 @@ import com.czg.account.entity.ShopUserFlow;
|
||||
*/
|
||||
public interface ShopUserFlowMapper extends BaseMapper<ShopUserFlow> {
|
||||
|
||||
List<ShopUserFlowVO> pageInfo(@Param("shopId") Long shopId, @Param("userId") Integer userId, @Param("bizCode") String bizCode);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,12 @@ package com.czg.service.account.service.impl;
|
||||
|
||||
import com.czg.account.entity.ShopUserFlow;
|
||||
import com.czg.account.service.ShopUserFlowService;
|
||||
import com.czg.account.vo.ShopUserFlowVO;
|
||||
import com.czg.service.account.mapper.ShopUserFlowMapper;
|
||||
import com.czg.utils.PageUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.update.UpdateChain;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
@@ -25,4 +30,10 @@ public class ShopUserFlowServiceImpl extends ServiceImpl<ShopUserFlowMapper, Sho
|
||||
.eq(ShopUserFlow::getId, id)
|
||||
.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<ShopUserFlowVO> pageInfo(Long shopId, Integer userId, String bizCode) {
|
||||
PageHelper.startPage(PageUtil.buildPageHelp());
|
||||
return PageUtil.convert(new PageInfo<>(mapper.pageInfo(shopId, userId, bizCode)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,4 +4,17 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czg.service.account.mapper.ShopUserFlowMapper">
|
||||
|
||||
<select id="pageInfo" resultType="com.czg.account.vo.ShopUserFlowVO">
|
||||
select a.*, c.shop_name as shopName, b.phone, b.nick_name as nickName from tb_shop_user_flow as a
|
||||
join tb_shop_user as b on a.user_id=b.user_id and a.shop_id=b.shop_id
|
||||
join tb_shop_info as c on c.id=a.shop_id
|
||||
where a.shop_id=#{shopId}
|
||||
<if test="bizCode != null and bizCode != ''">
|
||||
and a.biz_code=#{bizCode}
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
and a.user_id=#{userId}
|
||||
</if>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user