提交 9f041e3e authored 作者: huyufan's avatar huyufan

货主资金管理

上级 482d0bb0
......@@ -9,6 +9,7 @@ import com.clx.performance.dao.OwnerTopUpDao;
import com.clx.performance.enums.IdTypeEnum;
import com.clx.performance.enums.OwnerAccountEnum;
import com.clx.performance.model.OwnerCaseOut;
import com.clx.performance.model.OwnerRunningWaterRecord;
import com.clx.performance.model.OwnerTopUp;
import com.clx.performance.param.pc.*;
import com.clx.performance.service.OwnerAccountService;
......@@ -18,6 +19,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
......@@ -75,6 +77,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
@Override
public Long accountCaseOut(OwnerCaseOutParam param) {
//提现记录
OwnerCaseOut entity = new OwnerCaseOut();
entity.setAccountType(param.getAccountType());
entity.setCaseOutNo(idGenerateSnowFlake.nextId(IdTypeEnum.Type.CASE_OUT.getCode()));
......@@ -95,6 +98,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
* @param turnDownContent
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void accountTopUpApprove(Integer id, String turnDownContent) {
OwnerTopUp entity = new OwnerTopUp();
if (StringUtils.isNotBlank(turnDownContent)) {
......@@ -106,6 +110,10 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
entity.setId(id);
entity.setStatus(OwnerAccountEnum.TopUpStatus.APPROVAL_APPROVE.getCode());
ownerTopUpDao.updateEntityByKey(entity);
//需要插入充值流水
OwnerRunningWaterRecord runningWaterRecord = new OwnerRunningWaterRecord();
ownerRunningWaterRecordDao.saveEntity(runningWaterRecord);
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论