|
|
@@ -11,10 +11,7 @@ import com.iformall.common.ResultData; |
|
|
import com.iformall.domain.po.*; |
|
|
import com.iformall.domain.po.*; |
|
|
import com.iformall.enums.*; |
|
|
import com.iformall.enums.*; |
|
|
import com.iformall.exception.MallinkException; |
|
|
import com.iformall.exception.MallinkException; |
|
|
import com.iformall.mapper.WxBillActionMapper; |
|
|
|
|
|
import com.iformall.mapper.WxBillDepositMapper; |
|
|
|
|
|
import com.iformall.mapper.WxBillRentMapper; |
|
|
|
|
|
import com.iformall.mapper.WxRentContractMapper; |
|
|
|
|
|
|
|
|
import com.iformall.mapper.*; |
|
|
import com.iformall.service.ExcelService; |
|
|
import com.iformall.service.ExcelService; |
|
|
import com.iformall.service.WxBillActionService; |
|
|
import com.iformall.service.WxBillActionService; |
|
|
import com.iformall.service.WxBillRentService; |
|
|
import com.iformall.service.WxBillRentService; |
|
|
@@ -63,6 +60,9 @@ public class WxBillRentServiceImpl implements WxBillRentService { |
|
|
@Autowired |
|
|
@Autowired |
|
|
WxRentContractMapper wxRentContractMapper; |
|
|
WxRentContractMapper wxRentContractMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
WxMerchantTradeDailyMapper wxMerchantTradeDailyMapper; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageInfo<WxBillRent> listAsPage(WxBillRent record, Integer pageIndex, Integer pageSize) { |
|
|
public PageInfo<WxBillRent> listAsPage(WxBillRent record, Integer pageIndex, Integer pageSize) { |
|
|
PageHelper.startPage(pageIndex, pageSize); |
|
|
PageHelper.startPage(pageIndex, pageSize); |
|
|
@@ -249,6 +249,13 @@ public class WxBillRentServiceImpl implements WxBillRentService { |
|
|
Map<String, Object> result = new HashMap<>(3); |
|
|
Map<String, Object> result = new HashMap<>(3); |
|
|
result.put("rent", rent); |
|
|
result.put("rent", rent); |
|
|
result.put("deposit", deposit); |
|
|
result.put("deposit", deposit); |
|
|
|
|
|
|
|
|
|
|
|
//解单金额 |
|
|
|
|
|
WxBillRent billRent = wxBillRentMapper.selectByPrimaryKey(id); |
|
|
|
|
|
WxMerchantTradeDaily merchantTradeDaily = new WxMerchantTradeDaily(); |
|
|
|
|
|
merchantTradeDaily.setMerchantId(billRent.getMerchantId()); |
|
|
|
|
|
String money = wxMerchantTradeDailyMapper.findSumMoney(merchantTradeDaily); |
|
|
|
|
|
result.put("solutionBillMoney", StringUtils.isBlank(money)?0:money); |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -313,9 +320,8 @@ public class WxBillRentServiceImpl implements WxBillRentService { |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = {Exception.class}) |
|
|
|
|
|
@Override |
|
|
@Override |
|
|
|
|
|
@Transactional(rollbackFor = {Exception.class}) |
|
|
public ResultData updateRevenue(WxBillRent record, MallUserInfo user) { |
|
|
public ResultData updateRevenue(WxBillRent record, MallUserInfo user) { |
|
|
WxBillRent wxBillRent = wxBillRentMapper.selectByPrimaryKey(record.getId()); |
|
|
WxBillRent wxBillRent = wxBillRentMapper.selectByPrimaryKey(record.getId()); |
|
|
WxRentContract wxRentContract = wxRentContractMapper.selectByPrimaryKey(wxBillRent.getRentContractId()); |
|
|
WxRentContract wxRentContract = wxRentContractMapper.selectByPrimaryKey(wxBillRent.getRentContractId()); |
|
|
@@ -361,12 +367,15 @@ public class WxBillRentServiceImpl implements WxBillRentService { |
|
|
wxBillRent.setRevenue(record.getRevenue()); |
|
|
wxBillRent.setRevenue(record.getRevenue()); |
|
|
//wxBillRent.setReceivePay(oldPrice.equals(newPrice) ? oldPrice : newPrice); |
|
|
//wxBillRent.setReceivePay(oldPrice.equals(newPrice) ? oldPrice : newPrice); |
|
|
wxBillRent.setUpdatetime(new Date()); |
|
|
wxBillRent.setUpdatetime(new Date()); |
|
|
try { |
|
|
|
|
|
wxBillRentMapper.updateByPrimaryKeySelective(wxBillRent); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
logger.error("修改营业额失败,e:" + e.getMessage()); |
|
|
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "修改营业额失败"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//如果在跳点区间中,修改扣点率 |
|
|
|
|
|
wxBillRentMapper.updateByPrimaryKeySelective(wxBillRent); |
|
|
|
|
|
if(StringUtils.isNotBlank(wxRentContract.getBusDiscountRatio())){ |
|
|
|
|
|
wxRentContract.setPayRatio(ratio); |
|
|
|
|
|
wxRentContract.setUpdatetime(new Date()); |
|
|
|
|
|
wxRentContractMapper.updateByPrimaryKeySelective(wxRentContract); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!oldPrice.equals(newPrice)) { |
|
|
if (!oldPrice.equals(newPrice)) { |
|
|
//日志 |
|
|
//日志 |
|
|
WxBillAction wxBillAction = new WxBillAction(); |
|
|
WxBillAction wxBillAction = new WxBillAction(); |
|
|
|