src/main/java/cc/mrbird/febs/mall/controller/member/ApiMallMemberController.java | ●●●●● patch | view | raw | blame | history | |
src/main/java/cc/mrbird/febs/mall/dto/ApiMoneyFlowDto.java | ●●●●● patch | view | raw | blame | history | |
src/main/java/cc/mrbird/febs/mall/dto/MoneyFlowDto.java | ●●●●● patch | view | raw | blame | history | |
src/main/java/cc/mrbird/febs/mall/mapper/MallMoneyFlowMapper.java | ●●●●● patch | view | raw | blame | history | |
src/main/java/cc/mrbird/febs/mall/service/IApiMallMemberService.java | ●●●●● patch | view | raw | blame | history | |
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java | ●●●●● patch | view | raw | blame | history | |
src/main/java/cc/mrbird/febs/mall/vo/ApiMoneyFlowVo.java | ●●●●● patch | view | raw | blame | history | |
src/main/resources/mapper/modules/MallMoneyFlowMapper.xml | ●●●●● patch | view | raw | blame | history |
src/main/java/cc/mrbird/febs/mall/controller/member/ApiMallMemberController.java
@@ -89,6 +89,15 @@ return memberService.teamList(teamListDto); } @ApiOperation(value = "积分明细,余额明细,佣金明细,会员经验明细") @ApiResponses({ @ApiResponse(code = 200, message = "success", response = ApiMoneyFlowVo.class) }) @PostMapping(value = "/flowList") public FebsResponse flowList(@RequestBody ApiMoneyFlowDto dto) { return memberService.flowList(dto); } @ApiOperation(value = "资金流水列表") @ApiResponses({ src/main/java/cc/mrbird/febs/mall/dto/ApiMoneyFlowDto.java
New file @@ -0,0 +1,22 @@ package cc.mrbird.febs.mall.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel(value = "ApiMoneyFlowDto", description = "参数接收类") public class ApiMoneyFlowDto { @ApiModelProperty(value = "一页多少个", example = "10") private Integer pageSize; @ApiModelProperty(value = "页码", example = "1") private Integer pageNum; @ApiModelProperty(value = "流水类型 1-余额明细 2-会员经验明细 3-积分明细 4-佣金明细") private Integer flowType; @ApiModelProperty(hidden = true) private Long memberId; } src/main/java/cc/mrbird/febs/mall/dto/MoneyFlowDto.java
@@ -25,7 +25,7 @@ @ApiModelProperty(value = "类型 1-全部 2-支出 3-收入") private Integer inOrOut; @ApiModelProperty(value = "流水类型 1-余额 2-赠送积分 3-积分 4-佣金") @ApiModelProperty(value = "流水类型 1-余额 2-会员经验 3-折扣积分 4-佣金") private Integer flowType; @ApiModelProperty(hidden = true) src/main/java/cc/mrbird/febs/mall/mapper/MallMoneyFlowMapper.java
@@ -1,14 +1,12 @@ package cc.mrbird.febs.mall.mapper; import cc.mrbird.febs.mall.dto.ApiMoneyFlowDto; import cc.mrbird.febs.mall.dto.MoneyChargeListDto; import cc.mrbird.febs.mall.dto.MoneyFlowDto; import cc.mrbird.febs.mall.dto.MoneyFlowListDto; import cc.mrbird.febs.mall.entity.MallMember; import cc.mrbird.febs.mall.entity.MallMoneyFlow; import cc.mrbird.febs.mall.vo.AdminMallMoneyFlowVo; import cc.mrbird.febs.mall.vo.AdminMoneyChargeListVo; import cc.mrbird.febs.mall.vo.AdminMoneyFlowListVo; import cc.mrbird.febs.mall.vo.MoneyFlowVo; import cc.mrbird.febs.mall.vo.*; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -43,4 +41,6 @@ BigDecimal selectAmountByFlowtypeAndType(@Param("memberId")Long memberId,@Param("flowType")Integer flowType, @Param("type")Integer type, @Param("status")Integer status, @Param("dateDay") Date DateTime,@Param("dateMonth") Date dateMonth); IPage<ApiMoneyFlowVo> selectFlowInPage(IPage<ApiMoneyFlowVo> page, @Param("record")ApiMoneyFlowDto dto); } src/main/java/cc/mrbird/febs/mall/service/IApiMallMemberService.java
@@ -115,4 +115,6 @@ FebsResponse authList(); FebsResponse authDel(ApiDoctorAuthDeleteDto dto); FebsResponse flowList(ApiMoneyFlowDto dto); } src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java
@@ -1501,6 +1501,15 @@ return new FebsResponse().success().message("操作成功"); } @Override public FebsResponse flowList(ApiMoneyFlowDto dto) { Long id = LoginUserUtil.getLoginUser().getId(); IPage<ApiMoneyFlowVo> page = new Page<>(dto.getPageNum(), dto.getPageSize()); dto.setMemberId(id); IPage<ApiMoneyFlowVo> pages = mallMoneyFlowMapper.selectFlowInPage(page, dto); return new FebsResponse().success().data(pages); } public static void main(String[] args) { Long userld = 16425L; String shopAccount = "爱和美医疗"; src/main/java/cc/mrbird/febs/mall/vo/ApiMoneyFlowVo.java
New file @@ -0,0 +1,28 @@ package cc.mrbird.febs.mall.vo; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; import java.util.Date; @Data @ApiModel(value = "ApiMoneyFlowVo", description = "信息返回类") public class ApiMoneyFlowVo { @ApiModelProperty(value = "金额,有正负") private BigDecimal amount; @ApiModelProperty(value = "提现状态 1-提现中2-成功 3-拒绝") private Integer status; @ApiModelProperty(value = "时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createdTime; @ApiModelProperty(value = "描述") private String remark; } src/main/resources/mapper/modules/MallMoneyFlowMapper.xml
@@ -166,4 +166,22 @@ </if> </where> </select> <select id="selectFlowInPage" resultType="cc.mrbird.febs.mall.vo.ApiMoneyFlowVo"> select a.amount amount, a.status status, a.CREATED_TIME createdTime, a.remark remark from mall_money_flow a <where> and a.member_id = #{record.memberId} <if test="record.flowType!=null and record.flowType!=''"> and a.flow_type = #{record.flowType} </if> </where> order by a.CREATED_TIME desc </select> </mapper>