Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
caoyizhong 3 years ago
parent
commit
213e3f2114
  1. 2
      xhm-wjnft/src/main/java/com/xhm/wjnft/domain/WjCollection.java
  2. 16
      xhm-wjnft/src/main/java/com/xhm/wjnft/service/impl/WjOrderServiceImpl.java
  3. 2
      xhm-wjnft/src/main/java/com/xhm/wjnft/service/impl/WjPayInfoServiceImpl.java

2
xhm-wjnft/src/main/java/com/xhm/wjnft/domain/WjCollection.java

@ -31,7 +31,7 @@ public class WjCollection extends BaseEntity
/** 价格 */
@Excel(name = "价格")
private Long price;
private Double price;
/** 作品故事文本 */
@Excel(name = "作品故事文本")

16
xhm-wjnft/src/main/java/com/xhm/wjnft/service/impl/WjOrderServiceImpl.java

@ -401,7 +401,7 @@ public class WjOrderServiceImpl implements IWjOrderService {
WjCollection wjCollectionData = new WjCollection();
wjCollectionData.setId(CollectionId);
//判断剩余数量修改状态
Integer num = wjCollection.getNumberRemaining() - wjInformations.size();
Integer num = wjCollection.getNumberRemaining() - 1;
if (num <= wjCollection.getIssueNumber() * 0.2) {
wjCollectionData.setState(5);
}
@ -414,21 +414,21 @@ public class WjOrderServiceImpl implements IWjOrderService {
wjOrder1.setCompletionTime(new Date());
wjOrderMapper.updateWjOrder(wjOrder1);
//发放成功,修改收益
Long Income = wjCollection.getPrice() * wjInformations.size();
Double Income = wjOrder.getActualAmountPaid();
WjArtist wjArtist = wjArtistMapper.selectWjArtistById(wjCollection.getArtistId());
WjArtist wjArtistData = new WjArtist();
wjArtistData.setId(wjCollection.getArtistId());
Long ratio = (long) wjArtist.getProportion();
Long plateau = (Income * ratio);
Long artist = Income * 100 - plateau;
Integer ratio = wjArtist.getProportion();
Double plateau = (Income * ratio);
Double artist = Income * 100 - plateau;
WjIncomeStatement wjIncomeStatementData = new WjIncomeStatement();
String tagId = UUID.randomUUID().toString().replace("-", "");
wjIncomeStatementData.setId(tagId);
wjIncomeStatementData.setArtistId(wjCollection.getArtistId());
wjIncomeStatementData.setOrderId(wjOrder.getId());
wjIncomeStatementData.setEarningsAmount((double) wjCollection.getPrice() / 100);
wjIncomeStatementData.setMerchantsEarnings((double) artist / 100);
wjIncomeStatementData.setEarnings((double) plateau / 100);
wjIncomeStatementData.setEarningsAmount( wjOrder.getActualAmountPaid() / 100);
wjIncomeStatementData.setMerchantsEarnings(artist / 10000);
wjIncomeStatementData.setEarnings(plateau / 10000);
incomeStatementMapper.insertWjIncomeStatement(wjIncomeStatementData);
}

2
xhm-wjnft/src/main/java/com/xhm/wjnft/service/impl/WjPayInfoServiceImpl.java

@ -236,7 +236,7 @@ public class WjPayInfoServiceImpl implements IWjPayInfoService
wjOrder.setPaymentTime(date);
wjOrder.setTransactionNo(transactionId);
if (total_fee !=null){
wjOrder.setActualAmountPaid(Double.parseDouble(total_fee));}
wjOrder.setActualAmountPaid(Double.parseDouble(total_fee)/100);}
orderMapper.updateWjOrderByorderNumber(wjOrder);
//更新支付详细表
WjOrder orderVo = orderMapper.selectWjOrderByOrderNumber(orderNumber);

Loading…
Cancel
Save