后管充值本金

This commit is contained in:
2023-11-08 11:28:57 +08:00
parent 97303f638b
commit 915edc47ad
8 changed files with 581 additions and 179 deletions

View File

@@ -52,6 +52,16 @@ public class MemberWalletLog {
*/
private String relatedOrderCode;
/**
* 变动前金额
*/
private BigDecimal beforeAmount;
/**
* 变动后金额
*/
private BigDecimal afterAmount;
/**
* 创建人
*/

View File

@@ -5,11 +5,9 @@ import com.jsowell.pile.dto.UniAppQueryMemberBalanceDTO;
import com.jsowell.pile.vo.uniapp.MemberBalanceVO;
import com.jsowell.pile.vo.uniapp.MemberWalletLogVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface MemberWalletLogMapper {
/**
* delete by primary key
@@ -27,6 +25,10 @@ public interface MemberWalletLogMapper {
*/
int insert(MemberWalletLog record);
int insertOrUpdate(MemberWalletLog record);
int insertOrUpdateSelective(MemberWalletLog record);
/**
* insert record to table selective
*
@@ -59,7 +61,11 @@ public interface MemberWalletLogMapper {
*/
int updateByPrimaryKey(MemberWalletLog record);
void batchInsert(@Param("list") List<MemberWalletLog> logList);
int updateBatch(List<MemberWalletLog> list);
int updateBatchSelective(List<MemberWalletLog> list);
int batchInsert(@Param("list") List<MemberWalletLog> list);
/**
* 查询用户账户余额变动信息

View File

@@ -1,19 +0,0 @@
package com.jsowell.pile.service;
import com.jsowell.pile.domain.MemberWalletLog;
public interface IMemberWalletLogService {
int deleteByPrimaryKey(Integer id);
int insert(MemberWalletLog record);
int insertSelective(MemberWalletLog record);
MemberWalletLog selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(MemberWalletLog record);
int updateByPrimaryKey(MemberWalletLog record);
MemberWalletLog getOrderRecord(String orderCode, String type);
}

View File

@@ -0,0 +1,34 @@
package com.jsowell.pile.service;
import com.jsowell.pile.domain.MemberWalletLog;
import java.util.List;
public interface MemberWalletLogService {
int deleteByPrimaryKey(Integer id);
int insert(MemberWalletLog record);
int insertSelective(MemberWalletLog record);
MemberWalletLog selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(MemberWalletLog record);
int updateByPrimaryKey(MemberWalletLog record);
int insertOrUpdate(MemberWalletLog record);
int insertOrUpdateSelective(MemberWalletLog record);
int updateBatch(List<MemberWalletLog> list);
int updateBatchSelective(List<MemberWalletLog> list);
int batchInsert(List<MemberWalletLog> list);
MemberWalletLog getOrderRecord(String orderCode, String type);
}

View File

@@ -212,6 +212,8 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
.amount(updatePrincipalBalance)
.category("1")
.relatedOrderCode(dto.getRelatedOrderCode())
.beforeAmount(oldPrincipalBalance)
.afterAmount(newPrincipalBalance)
.createBy(dto.getMemberId())
.build());
}
@@ -239,6 +241,8 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
.amount(updateGiftBalance)
.category("2")
.relatedOrderCode(dto.getRelatedOrderCode())
.beforeAmount(oldGiftBalance)
.afterAmount(newGiftBalance)
.createBy(dto.getMemberId())
.build());
}

View File

@@ -2,13 +2,14 @@ package com.jsowell.pile.service.impl;
import com.jsowell.pile.domain.MemberWalletLog;
import com.jsowell.pile.mapper.MemberWalletLogMapper;
import com.jsowell.pile.service.IMemberWalletLogService;
import com.jsowell.pile.service.MemberWalletLogService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class MemberWalletLogServiceImpl implements IMemberWalletLogService {
public class MemberWalletLogServiceImpl implements MemberWalletLogService {
@Resource
private MemberWalletLogMapper memberWalletLogMapper;
@@ -48,4 +49,29 @@ public class MemberWalletLogServiceImpl implements IMemberWalletLogService {
return memberWalletLogMapper.getOrderRecord(orderCode, type);
}
@Override
public int insertOrUpdate(MemberWalletLog record) {
return memberWalletLogMapper.insertOrUpdate(record);
}
@Override
public int insertOrUpdateSelective(MemberWalletLog record) {
return memberWalletLogMapper.insertOrUpdateSelective(record);
}
@Override
public int updateBatch(List<MemberWalletLog> list) {
return memberWalletLogMapper.updateBatch(list);
}
@Override
public int updateBatchSelective(List<MemberWalletLog> list) {
return memberWalletLogMapper.updateBatchSelective(list);
}
@Override
public int batchInsert(List<MemberWalletLog> list) {
return memberWalletLogMapper.batchInsert(list);
}
}