提交 617316a5 authored 作者: liuhaiquan's avatar liuhaiquan

Merge remote-tracking branch 'origin/v5.5_settlement_20231011' into v5.5_settlement_20231011

......@@ -13,7 +13,10 @@ public enum IdTypeEnum {
@AllArgsConstructor
public enum Type {
TOP_UP(1L, "充值"),
CASE_OUT(2L, "提现")
CASE_OUT(2L, "提现"),
CASE_OUT_FROZEN(3L, "提现冻结"),
CASE_OUT_SUCCESS(4L, "提现成功"),
TOP_UP_SUCCESS(5L, "充值成功"),
;
private final Long code;
private final String msg;
......
......@@ -7,6 +7,8 @@ import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import java.math.BigDecimal;
@ApiModel(description = "提现审批")
@Getter
@Setter
......@@ -26,4 +28,7 @@ public class OwnerCaseOutApproveParam {
@ApiModelProperty(value = "付款凭证", example = "a.png")
private String paymentProof;
@ApiModelProperty(value = "平台付款金额", example = "11.21")
private BigDecimal platformPayBalance;
}
......@@ -17,6 +17,9 @@ import lombok.ToString;
@ToString
public class PagePlatformPrepaidFreightAccountParam extends PageParam {
@ApiModelProperty(value="货主编码",example = "20145787812312312")
private Long ownerUserNo;
@ApiModelProperty(value="订单编号",example = "201457878")
private String orderNo;
......
package com.clx.performance.param.pc;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
/**
* @Author huyufan
* @create 2023-09-19 13:33
*/
@Getter
@Setter
@NoArgsConstructor
@ToString
public class PlatformAccountTopUpParam{
@ApiModelProperty(value="货主编码",example = "20145787812312312")
private Long ownerUserNo;
@ApiModelProperty(value="id",example = "1")
private Integer id;
@ApiModelProperty(value="账户类型",example = "1:保证金 2:预付运费")
private Integer accountType;
@ApiModelProperty(value="审批拒绝原因")
private String turnDownContent;
}
package com.clx.performance.vo.pc;
import com.msl.common.convertor.type.MoneyOutConvert;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Getter
......@@ -14,96 +14,94 @@ import java.math.BigDecimal;
@NoArgsConstructor
public class OwnerAccountRunningWaterRecordVO {
/**
* id
*/
@ApiModelProperty("id")
private Integer id;
@ApiModelProperty("流水号")
private Long runningWaterNo;
/**
* 货主编码
*/
@ApiModelProperty("货主编码")
private Long ownerUserNo;
/**
* 货主名称
*/
@ApiModelProperty("货主名称")
private String ownerName;
/**
* 联系电话
*/
@ApiModelProperty("联系电话")
private String mobile;
/**
* 账户类型
*/
@ApiModelProperty("账户类型")
private Integer accountType;
/**
* 关联数据主键ID
*/
@ApiModelProperty("关联数据主键ID")
private Integer relationId;
/**
* 流水类型
*/
@ApiModelProperty("流水类型")
private Integer runningWaterType;
/**
* 订单ID
*/
@ApiModelProperty("订单ID")
private Integer orderId;
/**
* 订单编号
*/
@ApiModelProperty("订单编号")
private String orderNo;
@ApiModelProperty("货单编号")
private String orderGoodsNo;
@ApiModelProperty("货单状态")
private Integer orderGoodsStatus;
@ApiModelProperty("提取吨数")
private BigDecimal extractWeight;
@ApiModelProperty("剩余拉运吨数")
private BigDecimal residueTransportWeight;
@ApiModelProperty("已拉运吨数")
private BigDecimal alreadyTransportWeight;
@ApiModelProperty("发货地址ID")
private Integer sendAddressId;
@ApiModelProperty(value = "发货地址全称")
private String sendAddressAll;
@ApiModelProperty("发货地址简称")
private String sendAddressShorter;
@ApiModelProperty("发货地址经度")
private BigDecimal sendLongitude;
@ApiModelProperty("发货地址纬度")
private BigDecimal sendLatitude;
@ApiModelProperty("收货地址ID")
private Integer receiveAddressId;
@ApiModelProperty(value = "收货地址全称")
private String reveiveAddressAll;
@ApiModelProperty("收货地址简称")
private String receiveAddressShorter;
@ApiModelProperty("收货地址经度")
private BigDecimal receiveLongitude;
@ApiModelProperty("收货地址纬度")
private BigDecimal receiveLatitude;
@ApiModelProperty("货物ID")
private Integer goodsId;
@ApiModelProperty("货物名称")
private String goodsName;
@ApiModelProperty("挂单方式 1公开派单 2定向派单")
private Integer pendingOrderWay;
@ApiModelProperty("定向运单失效时间")
private String directionalExpireTime;
@ApiModelProperty("最晚到达货源地时间/运单的最晚装货时间")
private String lastArriveSendTime;
@ApiModelProperty("挂单时间")
private String pendingOrderTime;
@ApiModelProperty("提取方式 1提取全部 2提取部分")
private Integer extractWay;
@ApiModelProperty("需要车辆/辆")
private Integer needTruckNum;
@ApiModelProperty("高级物流经理id")
private Integer seniorLogisticsManagerId;
@ApiModelProperty("高级物流经理姓名")
private String seniorLogisticsManagerName;
@ApiModelProperty("挂单运费")
@MoneyOutConvert
private BigDecimal pendingOrderFreight;
@ApiModelProperty("创建人用户编号")
private Long userNo;
@ApiModelProperty("创建人姓名")
private String userName;
@ApiModelProperty("创建时间")
private String createTime;
/**
* 运单ID
*/
@ApiModelProperty("运单ID")
private Integer orderChildId;
/**
* 运单编号
*/
@ApiModelProperty("运单编号")
private String orderChildNo;
/**
* 变动金额
*/
@ApiModelProperty("变动金额")
private BigDecimal alterationBalance;
/**
* 冻结金额
*/
@ApiModelProperty("冻结金额")
private BigDecimal frozenBalance;
/**
* 可用余额
*/
@ApiModelProperty("可用余额")
private BigDecimal usableBalance;
/**
* 账户余额
*/
@ApiModelProperty("账户余额")
private BigDecimal accountBalance;
/**
* 操作人
*/
@ApiModelProperty("操作人")
private String createBy;
/**
* 操作时间
*/
@ApiModelProperty("操作时间")
private LocalDateTime createTime;
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ import lombok.NoArgsConstructor;
import lombok.Setter;
import org.apache.poi.hpsf.Decimal;
import java.math.BigDecimal;
import java.time.LocalDateTime;
......@@ -41,19 +42,19 @@ public class OwnerAccountVO {
*/
@ApiModelProperty(value = "账户余额")
@MoneyOutConvert
private Decimal accountBalance;
private BigDecimal accountBalance;
/**
* 可用余额
*/
@ApiModelProperty(value = "可用余额")
@MoneyOutConvert
private Decimal usableBalance;
private BigDecimal usableBalance;
/**
* 冻结金额
*/
@ApiModelProperty(value = "冻结金额")
@MoneyOutConvert
private Decimal frozenBalance;
private BigDecimal frozenBalance;
/**
* 创建人
*/
......
......@@ -19,6 +19,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotBlank;
@Slf4j
@RestController
......@@ -61,9 +63,9 @@ public class CarrierAccountController {
@ApiOperation(value = "充值审批", notes = "<br>By:胡宇帆")
@GetMapping("/accountTopUpApprove")
public void accountTopUpApprove(@RequestParam Integer id, @RequestParam String turnDownContent) {
ownerAccountService.accountTopUpApprove(id,turnDownContent);
@PostMapping("/accountTopUpApprove")
public void accountTopUpApprove(@RequestBody PlatformAccountTopUpParam param) {
ownerAccountService.accountTopUpApprove(param);
}
@ApiOperation(value = "提现审批", notes = "<br>By:胡宇帆")
......
......@@ -20,6 +20,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotNull;
import java.util.List;
@Slf4j
......@@ -27,7 +28,7 @@ import java.util.List;
@RequestMapping("/pc/owner")
@Validated
@AllArgsConstructor
@Api(tags = "PC-资金管理")
@Api(tags = "PC-货主资金管理")
public class OwnerAccountController {
private final OwnerAccountService ownerAccountService;
......@@ -41,8 +42,8 @@ public class OwnerAccountController {
@ApiOperation(value = "账户信息", notes = "<br>By:胡宇帆")
@GetMapping("/accountInfo")
@UnitCovert(param = false)
public Result<List<OwnerAccountVO>> accountInfo(@RequestParam String ownerNo) {
List<OwnerAccountVO> accountVOList = ownerAccountService.accountInfo(ownerNo);
public Result<List<OwnerAccountVO>> accountInfo(@RequestParam Long ownerUserNo) {
List<OwnerAccountVO> accountVOList = ownerAccountService.accountInfo(ownerUserNo);
return Result.ok(accountVOList);
}
......@@ -79,6 +80,14 @@ public class OwnerAccountController {
return Result.ok(id);
}
@ApiOperation(value = "货主付款确认", notes = "<br>By:胡宇帆")
@PostMapping("/accountBalanceConfirm")
@UnitCovert(param = false)
public void accountBalanceConfirm(@RequestParam @NotNull(message = "编号不能为空") Integer id) {
ownerAccountService.accountBalanceConfirm(id);
}
@ApiOperation(value = "货主账户流水列表", notes = "<br>By:胡宇帆")
@PostMapping("/ownerAccountRunningWaterPageList")
@UnitCovert(param = false)
......
......@@ -12,5 +12,7 @@ import java.util.List;
public interface OwnerAccountDao extends BaseDao<OwnerAccountMapper, OwnerAccount, Integer> {
IPage<OwnerAccountVO> pageList(PageOwnerAccountListParam param);
List<OwnerAccountVO> accountInfo(String ownerNo);
List<OwnerAccountVO> accountInfo(Long ownerUserNo);
OwnerAccount getAccountByOwnerUserNoAndAccountType(Long ownerUserNo,Integer accountType);
}
......@@ -28,10 +28,15 @@ public class OwnerAccountDaoImpl extends BaseDaoImpl<OwnerAccountMapper, OwnerAc
}
@Override
public List<OwnerAccountVO> accountInfo(String ownerNo) {
List<OwnerAccount> list = baseMapper.selectList(lQrWrapper().eq(OwnerAccount::getOwnerUserNo, ownerNo));
public List<OwnerAccountVO> accountInfo(Long ownerUserNo) {
List<OwnerAccount> list = baseMapper.selectList(lQrWrapper().eq(OwnerAccount::getOwnerUserNo, ownerUserNo));
return ownerAccountStruct.convertList(list);
}
@Override
public OwnerAccount getAccountByOwnerUserNoAndAccountType(Long ownerUserNo, Integer accountType) {
return baseMapper.selectOne(lQrWrapper().eq(OwnerAccount::getAccountType, accountType).eq(OwnerAccount::getOwnerUserNo, ownerUserNo));
}
}
......@@ -7,11 +7,10 @@ import com.baomidou.mybatisplus.annotation.TableName;
import com.msl.common.config.KeyColumn;
import com.msl.common.model.HasKey;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.poi.hpsf.Decimal;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
......@@ -34,7 +33,7 @@ public class OwnerAccount implements HasKey<Integer> {
* 货主编码
*/
@TableField("owner_user_no")
private String ownerUserNo;
private Long ownerUserNo;
/**
* 货主名称
*/
......@@ -54,17 +53,17 @@ public class OwnerAccount implements HasKey<Integer> {
* 账户余额
*/
@TableField("account_balance")
private Decimal accountBalance;
private BigDecimal accountBalance;
/**
* 可用余额
*/
@TableField("usable_balance")
private Decimal usableBalance;
private BigDecimal usableBalance;
/**
* 冻结金额
*/
@TableField("frozen_balance")
private Decimal frozenBalance;
private BigDecimal frozenBalance;
/**
* 创建人
*/
......
......@@ -86,6 +86,12 @@ public class OwnerCaseOut implements HasKey<Integer> {
*/
@TableField("platform_payment_bank_number")
private String platformPaymentBankNumber;
/**
* 平台付款金额
*/
@TableField("platform_pay_balance")
private BigDecimal platformPayBalance;
/**
* 付款人
*/
......
......@@ -12,6 +12,7 @@ import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.poi.hpsf.Decimal;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
......@@ -29,11 +30,17 @@ public class OwnerRunningWaterRecord implements HasKey<Integer> {
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 流水号
*/
@TableField("running_water_no")
private Long runningWaterNo;
/**
* 货主编码
*/
@TableField("owner_no")
private String ownerNo;
@TableField("owner_user_no")
private Long ownerUserNo;
/**
* 货主名称
*/
......@@ -43,12 +50,18 @@ public class OwnerRunningWaterRecord implements HasKey<Integer> {
* 联系电话
*/
@TableField("mobile")
private Integer mobile;
private String mobile;
/**
* 账户类型
*/
@TableField("account_type")
private Integer accountType;
/**
* 关联数据编号
*/
@TableField("relation_id")
private Long relationId;
/**
* 流水类型
*/
......@@ -78,22 +91,22 @@ public class OwnerRunningWaterRecord implements HasKey<Integer> {
* 变动金额
*/
@TableField("alteration_balance")
private Double alterationBalance;
private BigDecimal alterationBalance;
/**
* 冻结金额
*/
@TableField("frozen_balance")
private Decimal frozenBalance;
private BigDecimal frozenBalance;
/**
* 可用余额
*/
@TableField("usable_balance")
private Decimal usableBalance;
private BigDecimal usableBalance;
/**
* 账户余额
*/
@TableField("account_balance")
private Decimal accountBalance;
private BigDecimal accountBalance;
/**
* 操作人
*/
......
......@@ -14,7 +14,7 @@ public interface OwnerAccountService {
IPage<OwnerAccountRunningWaterRecordVO> prepaidFreightAccountPageList(PagePlatformPrepaidFreightAccountParam param);
List<OwnerAccountVO> accountInfo(String ownerNo);
List<OwnerAccountVO> accountInfo(Long ownerUserNo);
Long accountTopUp(OwnerTopUpParam param);
......@@ -22,14 +22,18 @@ public interface OwnerAccountService {
/**
* 充值审批
* @param id
* @param turnDownContent
*/
void accountTopUpApprove(Integer id, String turnDownContent);
void accountTopUpApprove(PlatformAccountTopUpParam param);
/**
* 提现审批
* @param param
*/
void accountCaseOutApprove(OwnerCaseOutApproveParam param);
/**
* 货主付款确认
* @param id
*/
void accountBalanceConfirm(Integer id);
}
......@@ -8,6 +8,8 @@ import com.clx.performance.dao.OwnerRunningWaterRecordDao;
import com.clx.performance.dao.OwnerTopUpDao;
import com.clx.performance.enums.IdTypeEnum;
import com.clx.performance.enums.OwnerAccountEnum;
import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.model.OwnerAccount;
import com.clx.performance.model.OwnerCaseOut;
import com.clx.performance.model.OwnerRunningWaterRecord;
import com.clx.performance.model.OwnerTopUp;
......@@ -15,12 +17,15 @@ import com.clx.performance.param.pc.*;
import com.clx.performance.service.OwnerAccountService;
import com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.performance.vo.pc.OwnerAccountVO;
import com.msl.common.base.Optional;
import com.msl.common.exception.ServiceSystemException;
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.math.BigDecimal;
import java.util.List;
@Slf4j
......@@ -54,8 +59,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
}
@Override
public List<OwnerAccountVO> accountInfo(String ownerNo) {
return ownerAccountDao.accountInfo(ownerNo);
public List<OwnerAccountVO> accountInfo(Long ownerUserNo) {
return ownerAccountDao.accountInfo(ownerUserNo);
}
@Override
......@@ -76,6 +81,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
}
@Override
@Transactional(rollbackFor = Exception.class)
public Long accountCaseOut(OwnerCaseOutParam param) {
//提现记录
OwnerCaseOut entity = new OwnerCaseOut();
......@@ -88,32 +94,74 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
entity.setCaseOutBankNumber(param.getCaseOutBankNumber());
ownerCaseOutDao.saveEntity(entity);
//插入冻结流水
OwnerRunningWaterRecord runningWaterRecord = new OwnerRunningWaterRecord();
BigDecimal caseOutBalance = param.getCaseOutBalance();
runningWaterRecord.setOwnerName("测试");
runningWaterRecord.setMobile("11111111111");
runningWaterRecord.setCreateBy("操作人测试");
runningWaterRecord.setRelationId(entity.getCaseOutNo());
runningWaterRecord.setAccountBalance(caseOutBalance);
runningWaterRecord.setOwnerUserNo(param.getOwnerUserNo());
runningWaterRecord.setAccountType(param.getAccountType());
runningWaterRecord.setRunningWaterType(OwnerAccountEnum.RunningWaterStatus.FROZEN.getCode());
runningWaterRecord.setRunningWaterNo(idGenerateSnowFlake.nextId(IdTypeEnum.Type.CASE_OUT_FROZEN.getCode()));
ownerRunningWaterRecordDao.saveEntity(runningWaterRecord);
//冻结账户可用金额
OwnerAccount account = ownerAccountDao.getAccountByOwnerUserNoAndAccountType(param.getOwnerUserNo(), param.getAccountType());
OwnerAccount update = new OwnerAccount();
update.setUsableBalance(account.getUsableBalance().subtract(caseOutBalance));
update.setFrozenBalance(account.getFrozenBalance().add(caseOutBalance));
update.setId(account.getId());
ownerAccountDao.updateEntityByKey(update);
return entity.getCaseOutNo();
}
/**
* 充值审批
*
* @param id
* @param turnDownContent
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void accountTopUpApprove(Integer id, String turnDownContent) {
public void accountTopUpApprove(PlatformAccountTopUpParam param) {
Optional<OwnerTopUp> optional = ownerTopUpDao.getEntityByKey(param.getId());
if (!optional.isPresent()) {
throw new ServiceSystemException(PerformanceResultEnum.HTTP_ERROR, "当前ID未查询到有效记录");
}
OwnerTopUp ownerTopUp = optional.get();
OwnerTopUp entity = new OwnerTopUp();
if (StringUtils.isNotBlank(turnDownContent)) {
entity.setId(id);
entity.setApprovalTurnDown(turnDownContent);
if (StringUtils.isNotBlank(param.getTurnDownContent())) {
entity.setId(param.getId());
entity.setApprovalTurnDown(param.getTurnDownContent());
entity.setStatus(OwnerAccountEnum.TopUpStatus.APPROVAL_REJECTION.getCode());
ownerTopUpDao.updateEntityByKey(entity);
} else {
entity.setId(id);
entity.setId(param.getId());
entity.setStatus(OwnerAccountEnum.TopUpStatus.APPROVAL_APPROVE.getCode());
ownerTopUpDao.updateEntityByKey(entity);
//需要插入充值流水
OwnerRunningWaterRecord runningWaterRecord = new OwnerRunningWaterRecord();
BigDecimal topUpBalance = ownerTopUp.getTopUpBalance();
runningWaterRecord.setOwnerName("测试");
runningWaterRecord.setMobile("11111111111");
runningWaterRecord.setCreateBy("操作人测试");
runningWaterRecord.setRelationId(ownerTopUp.getTopUpNo());
runningWaterRecord.setAccountBalance(topUpBalance);
runningWaterRecord.setOwnerUserNo(param.getOwnerUserNo());
runningWaterRecord.setAccountType(param.getAccountType());
runningWaterRecord.setRunningWaterType(OwnerAccountEnum.RunningWaterStatus.TOP_UP.getCode());
runningWaterRecord.setRunningWaterNo(idGenerateSnowFlake.nextId(IdTypeEnum.Type.TOP_UP_SUCCESS.getCode()));
ownerRunningWaterRecordDao.saveEntity(runningWaterRecord);
//给对应账户增加金额
OwnerAccount account = ownerAccountDao.getAccountByOwnerUserNoAndAccountType(param.getOwnerUserNo(), param.getAccountType());
OwnerAccount update = new OwnerAccount();
update.setAccountBalance(account.getAccountBalance().add(topUpBalance));
update.setUsableBalance(account.getUsableBalance().add(topUpBalance));
update.setId(account.getId());
ownerAccountDao.updateEntityByKey(update);
}
}
......@@ -128,6 +176,45 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
entity.setPaymentProof(param.getPaymentProof());
entity.setPlatformPaymentBank(entity.getPlatformPaymentBank());
entity.setPlatformPaymentBankNumber(param.getPlatformPaymentBankNumber());
entity.setPlatformPayBalance(param.getPlatformPayBalance());
entity.setStatus(OwnerAccountEnum.CaseOutStatus.TO_BE_CONFIRMED.getCode());
ownerCaseOutDao.updateEntityByKey(entity);
}
@Override
public void accountBalanceConfirm(Integer id) {
Optional<OwnerCaseOut> optional = ownerCaseOutDao.getEntityByKey(id);
if (!optional.isPresent()) {
throw new ServiceSystemException(PerformanceResultEnum.HTTP_ERROR, "当前ID未查询到有效记录");
}
OwnerCaseOut ownerCaseOut = optional.get();
BigDecimal caseOutBalance = ownerCaseOut.getCaseOutBalance();
BigDecimal platformPayBalance = ownerCaseOut.getPlatformPayBalance();
if (platformPayBalance.compareTo(caseOutBalance) != 0) {
throw new ServiceSystemException(PerformanceResultEnum.HTTP_ERROR, "货主提现金额和平台支付金额不一致");
}
//插入提现成功流水
OwnerRunningWaterRecord runningWaterRecord = new OwnerRunningWaterRecord();
runningWaterRecord.setOwnerName("测试");
runningWaterRecord.setMobile("11111111111");
runningWaterRecord.setCreateBy("操作人");
runningWaterRecord.setRelationId(ownerCaseOut.getCaseOutNo());
runningWaterRecord.setAccountBalance(caseOutBalance);
runningWaterRecord.setOwnerUserNo(ownerCaseOut.getOwnerUserNo());
runningWaterRecord.setAccountType(ownerCaseOut.getAccountType());
runningWaterRecord.setRunningWaterType(OwnerAccountEnum.RunningWaterStatus.CASE_OUT_SUCCESS.getCode());
runningWaterRecord.setRunningWaterNo(idGenerateSnowFlake.nextId(IdTypeEnum.Type.CASE_OUT_SUCCESS.getCode()));
ownerRunningWaterRecordDao.saveEntity(runningWaterRecord);
//给对应账户减少金额
OwnerAccount account = ownerAccountDao.getAccountByOwnerUserNoAndAccountType(ownerCaseOut.getOwnerUserNo(), ownerCaseOut.getAccountType());
OwnerAccount update = new OwnerAccount();
update.setAccountBalance(account.getAccountBalance().subtract(caseOutBalance));
update.setUsableBalance(account.getUsableBalance().subtract(caseOutBalance));
update.setFrozenBalance(account.getFrozenBalance().subtract(caseOutBalance));
update.setId(account.getId());
ownerAccountDao.updateEntityByKey(update);
}
}
......@@ -23,7 +23,7 @@ public class OwnerAccountSqlProvider {
WHERE("a.mobile = #{param.mobile}");
}
if (ObjectUtil.isNotNull(param.getAccountType())) {
WHERE("a.accountType = #{param.accountType}");
WHERE("a.account_type = #{param.accountType}");
}
ORDER_BY("a.create_time desc");
}}.toString();
......
......@@ -13,11 +13,12 @@ public class OwnerRunningWaterRecordSqlProvider {
public String marginAccountPageList(@Param("param") PagePlatformMarginAccountParam param) {
String sql = new SQL() {{
SELECT("a.id, a.owner_code," +
SELECT("a.id, a.owner_user_no," +
" a.owner_name, a.mobile, a.account_type, a.running_water_type,a.order_id,a.order_no,a.order_child_id,a.order_child_no,a.alteration_balance," +
" a.account_balance,a.usable_balance, a.frozen_balance,a.create_by,a.create_time");
FROM("owner_running_water_record a");
WHERE("a.account_type =" + OwnerAccountEnum.AccountTypeStatus.MARGIN_ACCOUNT.getCode());
WHERE("a.owner_user_no = #{param.ownerUserNo}");
if (StringUtils.isNotBlank(param.getBeginTime()) && StringUtils.isNotBlank(param.getEndTime())) {
WHERE("a.create_time >= #{param.beginTime} and a.create_time <= #{param.endTime}");
......@@ -40,6 +41,7 @@ public class OwnerRunningWaterRecordSqlProvider {
" a.account_balance,a.usable_balance, a.frozen_balance,a.create_by,a.create_time");
FROM("owner_running_water_record a");
WHERE("a.account_type =" + OwnerAccountEnum.AccountTypeStatus.PREPAID_FREIGHT_ACCOUNT.getCode());
WHERE("a.owner_user_no = #{param.ownerUserNo}");
if (StringUtils.isNotBlank(param.getBeginTime()) && StringUtils.isNotBlank(param.getEndTime())) {
WHERE("a.create_time >= #{param.beginTime} and a.create_time <= #{param.endTime}");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论