Przeglądaj źródła

Merge tag 'refs/tags/jenkins-back-end-3099' into release

develop
release_toaliyun_real
gongbiao 6 lat temu
rodzic
commit
7931536f6d
8 zmienionych plików z 41 dodań i 23 usunięć
  1. +2
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestBaseController.java
  2. +3
    -2
      mallinkService/src/main/java/com/iformall/domain/po/invest/InvestRemindEntity.java
  3. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java
  4. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java
  5. +7
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java
  6. +8
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java
  7. +8
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java
  8. +11
    -4
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java

+ 2
- 0
mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestBaseController.java Wyświetl plik

@@ -92,6 +92,8 @@ public class InvestBaseController extends BaseController {
try {
if (StringUtils.isBlank(text)) {
setValue(null);
} else if (StringUtils.equals("undefined", text)) {
InvestHelper.throwException(ErrorCode.SYS_PARAMETER_ERROR, text);
} else {
setValue(InvestHelper.codeOf(clz, text));
}


+ 3
- 2
mallinkService/src/main/java/com/iformall/domain/po/invest/InvestRemindEntity.java Wyświetl plik

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

@@ -49,11 +50,11 @@ public class InvestRemindEntity extends InvestBaseEntity {
/**
* 开始时间
*/
@io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "beginDate" ,example = "2018-10-01 12:18:48")
@io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "beginDate" ,example = "2018-10-01")
private Date beginDate;
/**
* 结束时间
*/
@io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endDate" ,example = "2018-10-01 12:18:48")
@io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endDate" ,example = "2018-10-01")
private Date endDate;
}

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java Wyświetl plik

@@ -196,6 +196,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService {
if(record.getServiceChargePayUpdate() != null){
Double l = Double.valueOf(record.getServiceChargePayUpdate())*100;
wxBillDaily.setServiceChargePay(l.intValue());
wxBillDaily.setOwe(wxBillDaily.getReceivePay() + wxBillDaily.getServiceChargePay() - wxBillDaily.getPay());
}else{
Long addpay = wxBillDaily.getPay();
wxBillDaily.setPayDate(record.getPayDate());


+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java Wyświetl plik

@@ -192,6 +192,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService
if(record.getServiceChargePayUpdate() != null){
Double l = Double.valueOf(record.getServiceChargePayUpdate())*100;
wxBillOtherDeposit.setServiceChargePay(l.intValue());
wxBillOtherDeposit.setOwe(wxBillOtherDeposit.getReceivePay() + wxBillOtherDeposit.getServiceChargePay() - wxBillOtherDeposit.getPay());
}else{
Long addpay = wxBillOtherDeposit.getPay();
wxBillOtherDeposit.setPayDate(record.getPayDate());


+ 7
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java Wyświetl plik

@@ -154,7 +154,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {
}
Date date = new Date();
if (record.getId() == null) {
logger.info("新增其他账单");
logger.info("新增其他押金账单");
WxBillOther otherQuery = new WxBillOther();
otherQuery.setTenantId(record.getTenantId());
otherQuery.setMerchantId(record.getMerchantId());
@@ -176,10 +176,10 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {
try {
wxBillOtherMapper.insert(record);
} catch (Exception e) {
logger.error("保存其他账单失败,e:" + e.getMessage());
logger.error("保存其他押金账单失败,e:" + e.getMessage());
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage());
}
return new ResultData(Result.SUCCESS, "保存其他账单成功");
return new ResultData(Result.SUCCESS, "保存其他押金账单成功");
} else {
logger.info("更新其他押金账单");
WxBillOther wxBillOther = wxBillOtherMapper.selectById(record.getId());
@@ -192,6 +192,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {
if(record.getServiceChargePayUpdate() != null){
Double l = Double.valueOf(record.getServiceChargePayUpdate())*100;
wxBillOther.setServiceChargePay(l.intValue());
wxBillOther.setOwe(wxBillOther.getReceivePay() + wxBillOther.getServiceChargePay() - wxBillOther.getPay());
}else{
Long addpay = wxBillOther.getPay();
wxBillOther.setPayDate(record.getPayDate());
@@ -220,7 +221,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {
try {
wxBillOtherMapper.updateById(wxBillOther);
} catch (Exception e) {
logger.error("更新其他账单失败,e:" + e.getMessage());
logger.error("更新其他押金账单失败,e:" + e.getMessage());
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage());
}
//日志
@@ -241,10 +242,10 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {
try {
wxBillActionService.save(wxBillAction);
} catch (Exception e) {
logger.error("添加其他账单行为日志,e:" + e.getMessage());
logger.error("添加其他押金账单行为日志,e:" + e.getMessage());
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage());
}
return new ResultData(Result.SUCCESS, "更新其他账单成功");
return new ResultData(Result.SUCCESS, "更新其他押金账单成功");
}
}



+ 8
- 5
mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java Wyświetl plik

@@ -180,6 +180,8 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {
if (record.getServiceChargePayUpdate() != null) {
Double l = Double.valueOf(record.getServiceChargePayUpdate()) * 100;
property.setServiceChargePay(l.intValue());
long latePayPrice = property.getLatePayPrice() == null ? 0 : property.getLatePayPrice();
property.setOwe(property.getReceivePay() + latePayPrice + property.getServiceChargePay() - property.getPay());
} else {
Long addpay = property.getPay();
property.setRevenue(record.getRevenue());
@@ -357,12 +359,13 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {

@Override
public ResultData updateLatePayMoney(WxBillProperty record, MallUserInfo user) {
final IdWorker idWorker = IdWorker.get();
WxBillAction billAction = new WxBillAction();

WxBillProperty property = wxBillPropertyMapper.selectById(record.getId());
if (record.getLatePayMoneyUpdate() != null) {
record.setLatePayPrice(Long.parseLong(record.getLatePayMoneyUpdate()) * 100);

property.setLatePayPrice(Long.parseLong(record.getLatePayMoneyUpdate()) * 100);
property.setOwe(property.getReceivePay() + property.getLatePayPrice() + property.getServiceChargePay() - property.getPay());
final IdWorker idWorker = IdWorker.get();
WxBillAction billAction = new WxBillAction();
billAction.setId(idWorker.nextId());
billAction.setCreatetime(new Date());
billAction.setUserName("系统端");
@@ -372,7 +375,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {
billAction.setUpdatetime(new Date());
wxBillActionMapper.insert(billAction);
}
wxBillPropertyMapper.updateById(record);
wxBillPropertyMapper.updateById(property);
return new ResultData();
}
}

+ 8
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java Wyświetl plik

@@ -182,6 +182,8 @@ public class WxBillRentServiceImpl implements WxBillRentService {
if(record.getServiceChargePayUpdate() != null){
Double l = Double.valueOf(record.getServiceChargePayUpdate())*100;
wxBillRent.setServiceChargePay(l.intValue());
long latePayPrice = wxBillRent.getLatePayPrice() == null ? 0 : wxBillRent.getLatePayPrice();
wxBillRent.setOwe(wxBillRent.getReceivePay() + latePayPrice + wxBillRent.getServiceChargePay() - wxBillRent.getPay());
}else{
Long addpay = wxBillRent.getPay();
wxBillRent.setRevenue(record.getRevenue());
@@ -468,12 +470,12 @@ public class WxBillRentServiceImpl implements WxBillRentService {

@Override
public ResultData updateLatePayMoney(WxBillRent record, MallUserInfo user) {
final IdWorker idWorker = IdWorker.get();
WxBillAction billAction = new WxBillAction();

WxBillRent rent = wxBillRentMapper.selectById(record.getId());
if(record.getLatePayMoneyUpdate() != null) {
record.setLatePayPrice(Long.parseLong(record.getLatePayMoneyUpdate()) * 100);

rent.setLatePayPrice(Long.parseLong(record.getLatePayMoneyUpdate()) * 100);
rent.setOwe(rent.getReceivePay() + rent.getLatePayPrice() + rent.getServiceChargePay() - rent.getPay());
final IdWorker idWorker = IdWorker.get();
WxBillAction billAction = new WxBillAction();
billAction.setId(idWorker.nextId());
billAction.setCreatetime(new Date());
billAction.setUserName("系统端");
@@ -483,7 +485,7 @@ public class WxBillRentServiceImpl implements WxBillRentService {
billAction.setUpdatetime(new Date());
wxBillActionMapper.insert(billAction);
}
wxBillRentMapper.updateById(record);
wxBillRentMapper.updateById(rent);
return new ResultData();
}
}

+ 11
- 4
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java Wyświetl plik

@@ -38,6 +38,7 @@ import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.time.temporal.TemporalAmount;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
@@ -595,8 +596,11 @@ public class InvestBizServiceImpl implements InvestBizService {
}
remindPageQuery.setQueryData(remindQuery);
LambdaQueryWrapper<InvestRemindEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.ge(Objects.nonNull(params.getRemindDate()), InvestRemindEntity::getBeginDate, getDayStart(params.getRemindDate()));
queryWrapper.ge(Objects.nonNull(params.getRemindDate()), InvestRemindEntity::getEndDate, getDayEnd(params.getRemindDate()));
queryWrapper.eq(InvestRemindEntity::getTenantId,InvestUserContext.getUser().getTenantId());
queryWrapper.apply(Objects.nonNull(params.getRemindDate()),
"date_format(begin_date,'%Y-%m-%d') >= {0} AND date_format(end_date,'%Y-%m-%d') <= {1}"
, getDayStart(params.getRemindDate())
, getDayEnd(params.getRemindDate()));
queryWrapper.orderByDesc(InvestRemindEntity::getCreateDate);
InvestPageResult<InvestRemindEntity> recordPage = remindService.queryPage(remindPageQuery, queryWrapper);
if (CollectionUtils.isEmpty(recordPage.getRecords())) {
@@ -633,11 +637,14 @@ public class InvestBizServiceImpl implements InvestBizService {
}

private String getDayEnd(Date date) {
return DateUtils.format(date) + " 23:59:59";
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.DAY_OF_YEAR, 1);
return DateUtils.format(calendar.getTime());
}

private String getDayStart(Date date) {
return DateUtils.format(date) + " 00:00:00";
return DateUtils.format(date);
}

@Override


Ładowanie…
Anuluj
Zapisz