Просмотр исходного кода

[集团版][修改]:集团版修改

release_toaliyun_real
Stormeye Wu 6 лет назад
Родитель
Сommit
de5798d21a
9 измененных файлов: 42 добавлений и 40 удалений
  1. +4
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  2. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java
  3. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java
  4. +6
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java
  5. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverServiceImpl.java
  6. +6
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  7. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxRefundOrderServiceImpl.java
  8. +18
    -18
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  9. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java

+ 4
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java Просмотреть файл

@@ -1638,14 +1638,15 @@ public class WxBillAllServiceImpl implements WxBillAllService {
if (StringUtils.isBlank(email)) {
continue;
}
// TODO group
String tenantId = (String) mapList.get(0).get("tenantId");
String subTenantId = (String) mapList.get(0).get("subTenantId");
String receiveDate = (String) mapList.get(0).get("receiveDate");
String manager = (String) mapList.get(0).get("manager");
String managerPhone = (String) mapList.get(0).get("managerPhone");

TenantEntity tenantEntity = new TenantEntity() {{
setTenantId(tenantId);
setSubTenantId(subTenantId);
}};

String billListStr = "";
@@ -1697,8 +1698,8 @@ public class WxBillAllServiceImpl implements WxBillAllService {
if (StringUtils.isBlank(email)) {
continue;
}
// TODO group
String tenantId = (String) mapList.get(0).get("tenantId");
String subTenantId = (String) mapList.get(0).get("subTenantId");
String receiveDate = (String) mapList.get(0).get("receiveDate");
String manager = (String) mapList.get(0).get("manager");
String managerPhone = (String) mapList.get(0).get("managerPhone");
@@ -1706,6 +1707,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {

TenantEntity tenantEntity = new TenantEntity() {{
setTenantId(tenantId);
setSubTenantId(subTenantId);
}};

String billListStr = "";


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java Просмотреть файл

@@ -590,7 +590,7 @@ public class WxOrderServiceImpl implements WxOrderService {
String bodyStr = "刷卡支付, 金额:" + totalFeeStr;

record.setId(orderNumber);
record.setTenantId(user.getTenantId());
record.updateTenantInfo(user);
record.setOrderNumber(orderNumber);
record.setType(EnumOrderType.MICROPAY.getCode());
record.setProductId(user.getId());
@@ -644,7 +644,7 @@ public class WxOrderServiceImpl implements WxOrderService {
String bodyStr = "刷卡支付, 金额:" + payment;

record.setId(orderNumber);
record.setTenantId(user.getTenantId());
record.updateTenantInfo(user);
record.setOrderNumber(orderNumber);
record.setType(EnumOrderType.MICROPAY.getCode());
record.setProductId(user.getId());


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java Просмотреть файл

@@ -1234,7 +1234,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService {
// 修改支付订单状态
WxPayOrder updateOrder = new WxPayOrder();
updateOrder.setId(record.getId());
updateOrder.setTenantId(record.getTenantId());
updateOrder.updateTenantInfo(order);
updateOrder.setOrderId(record.getOrderId());
updateOrder.setUpdateTime(currentDate);
updateOrder.setPayOrderStatus(EnumPayStatus.PAY_STATUS_SUCCESS.getCode());
@@ -1520,7 +1520,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService {
final IdWorker idWorker = IdWorker.get();
WxMerchantSubsidy merchantSubsidy = new WxMerchantSubsidy();
merchantSubsidy.setId(idWorker.nextId());
merchantSubsidy.setTenantId(record.getTenantId());
merchantSubsidy.updateTenantInfo(order);
merchantSubsidy.setOrderId(record.getOrderId());
merchantSubsidy.setOrderType(EnumOrderType.NATIVEPAY.getCode());
WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById(order.getProductId());


+ 6
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java Просмотреть файл

@@ -150,7 +150,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
Date currentDate = new Date();
WxProfitSharingResult result = new WxProfitSharingResult();
result.setId(idworker.nextId());
result.setTenantId(frecord.getTenantId());
result.updateTenantInfo(frecord);
result.setMerchantId(frecord.getMerchantId());
result.setSharingOrderId(frecord.getId());
result.setSharingReceiverId(Long.valueOf(receiver.getString("description")));
@@ -251,7 +251,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ

//准备分账列表
WxProfitSharingReceiver psReceiverQ = new WxProfitSharingReceiver();
psReceiverQ.setTenantId(sharingOrderDto.getTenantId());
psReceiverQ.updateTenantInfo(payAccount);
psReceiverQ.setMerchantId(sharingOrderDto.getMerchantId());
psReceiverQ.setSharingType(EnumProfitSharingType.PROFIT_SHARING_TYPE_WECHAT.getCode());
psReceiverQ.setStatus(EnumProfitSharingReceiverStatus.PROFIT_SHARING_RECEIVER_STATUS_VALID.getCode());
@@ -301,7 +301,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
Date currentDate = new Date();
record = new WxProfitSharingOrder();
record.setId(idworker.nextId());
record.setTenantId(sharingOrderDto.getTenantId());
record.updateTenantInfo(payAccount);
record.setTransactionId(sharingOrderDto.getTransactionId());
record.setOrderId(sharingOrderDto.getOrderId());
record.setPayAmount(sharingOrderDto.getPayAmount());
@@ -335,7 +335,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
WxProfitSharingResult result = new WxProfitSharingResult();

result.setId(idworker.nextId());
result.setTenantId(frecord.getTenantId());
result.updateTenantInfo(payAccount);
result.setMerchantId(frecord.getMerchantId());
result.setSharingOrderId(frecord.getId());
result.setSharingReceiverId(receiver.getId());
@@ -528,7 +528,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ

WxProfitSharingResult wxProfitSharingResult = new WxProfitSharingResult();

wxProfitSharingResult.setTenantId(record.getTenantId());
wxProfitSharingResult.updateTenantInfo(record);
wxProfitSharingResult.setMerchantId(record.getMerchantId());
wxProfitSharingResult.setSharingOrderId(record.getId());
wxProfitSharingResult.setSharingReceiverId(0L); //剩余钱分给特约商户,没有相应的接受者
@@ -579,7 +579,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
//创建分账订单
Date currentDate = new Date();
record.setId(idworker.nextId());
record.setTenantId(sharingOrderDto.getTenantId());
record.updateTenantInfo(payAccount);
record.setTransactionId(sharingOrderDto.getTransactionId());
record.setPayAmount(sharingOrderDto.getPayAmount());
record.setMerchantId(sharingOrderDto.getMerchantId());


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverServiceImpl.java Просмотреть файл

@@ -97,7 +97,7 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv
@Override
public WxProfitSharingReceiver findReceiver(WxMerchant merchant) {
WxProfitSharingReceiver receiver = new WxProfitSharingReceiver();
receiver.setTenantId(merchant.getTenantId());
receiver.updateTenantInfo(merchant);
receiver.setMerchantId(merchant.getId());
receiver.setSharingType(EnumProfitSharingType.PROFIT_SHARING_TYPE_WECHAT.getCode());
receiver.setStatus(EnumProfitSharingReceiverStatus.PROFIT_SHARING_RECEIVER_STATUS_VALID.getCode());


+ 6
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java Просмотреть файл

@@ -227,7 +227,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
Date date = new Date();
bill.setPropertyContractId(record.getId());
bill.setCreatetime(date);
bill.setTenantId(record.getTenantId());
bill.updateTenantInfo(wxPayAccountBill);
bill.setOwe(bill.getReceivePay());
bill.setNeedPay(bill.getNeedPay());
bill.setUpdatetime(date);
@@ -304,7 +304,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
}

WxPropertyContract propertyContract = new WxPropertyContract();
propertyContract.setTenantId(record.getTenantId());
propertyContract.updateTenantInfo(wxRentContract);
propertyContract.setRentContractId(record.getRentContractId());
long count = wxPropertyContractMapper.findList(propertyContract)
.stream().filter(p -> p.getStatus().equals(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()) ||
@@ -517,7 +517,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
wxBillDeposit.setEndtime(instance.getTime());
wxBillDeposit.setStatus(EnumBillRentStatus.WAIT_PAY.getCode());
wxBillDeposit.setExpiredDay(0L);
wxBillDeposit.setTenantId(record.getTenantId());
wxBillDeposit.updateTenantInfo(wxPropertyContract);
wxBillDeposit.setIsDel(0);
wxBillDeposit.setMerchantId(record.getMerchantId());
wxBillDeposit.setShopId(wxPropertyContract.getShopId());
@@ -715,7 +715,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
//截止收租日在当前时间之前
Date date = new Date();
setExpiredDay(wxBillProperty,dayType,receivePeriod);
wxBillProperty.setTenantId(wxPropertyContract.getTenantId());
wxBillProperty.updateTenantInfo(wxPropertyContract);
wxBillProperty.setIsDel(0);
wxBillProperty.setMerchantId(wxPropertyContract.getMerchantId());
wxBillProperty.setUserId(userId);
@@ -920,7 +920,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
Map<String, Object> resultData = new HashMap();
//商铺信息
WxShop wxShop = new WxShop();
wxShop.setTenantId(record.getTenantId());
wxShop.updateTenantInfo(record);
wxShop.setType(record.getRentShopType());
wxShop.setStatus(EnumShopStatus.RENT.getCode());
List<WxShop> rentedList = wxShopMapper.findList(wxShop);
@@ -1003,7 +1003,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
WxRentContract wxRentContract = wxRentContractMapper.selectById(rentContractId);
if (wxRentContract != null) {
WxPropertyContract wxPropertyContract = new WxPropertyContract();
wxPropertyContract.setTenantId(wxRentContract.getTenantId());
wxPropertyContract.updateTenantInfo(wxRentContract);
if (wxRentContract.getRentShopType().equals(EnumRentShopType.SHOP.getCode())) {
wxPropertyContract.setMerchantId(wxRentContract.getMerchantId());
} else {


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxRefundOrderServiceImpl.java Просмотреть файл

@@ -1262,7 +1262,7 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService {

// 查找支付订单
WxPayOrder payOrderQ = new WxPayOrder();
payOrderQ.setTenantId(appInfo.getTenantId());
payOrderQ.updateTenantInfo(wxOrder);
payOrderQ.setCUserId(wxOrder.getCUserId());
payOrderQ.setOrderId(wxOrder.getId());
payOrderQ.setPayOrderStatus(EnumPayStatus.PAY_STATUS_SUCCESS.getCode());
@@ -1289,7 +1289,7 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService {
String out_refund_id = String.valueOf(refundId);

record.setId(refundId);
record.setTenantId(appInfo.getTenantId());
record.updateTenantInfo(payOrder);
record.setCreateTime(currentDate);
record.setUpdateTime(currentDate);
// 微信内部订单号


+ 18
- 18
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -192,7 +192,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {

//商场信息
WxMall wxMall = new WxMall();
wxMall.setTenantId(wxRentContract.getTenantId());
wxMall.setTenantInfo(wxRentContract);
List<WxMall> mallList = wxMallMapper.findList(wxMall);
if (!mallList.isEmpty()) {
result.put("mall", mallList.get(0));
@@ -444,7 +444,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
for (int i = 0; i < size; i++) {
JSONObject rentInfoObject = rentInfoArray.getJSONObject(i);
WxRentContract wxRentContract = new WxRentContract();
wxRentContract.setTenantId(record.getTenantId());
wxRentContract.updateTenantInfo(record);
Long shopId = rentInfoObject.getLong("shopId");
wxRentContract.setShopId(shopId);
int count = wxRentContractMapper.selectRentContractCountByShopId(wxRentContract);
@@ -475,7 +475,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
}
} else {
WxRentContract wxRentContract = new WxRentContract();
wxRentContract.setTenantId(record.getTenantId());
wxRentContract.updateTenantInfo(record);
wxRentContract.setShopId(record.getShopId());
long count = wxRentContractMapper.queryRentContractData(wxRentContract).stream().
filter(rc -> rc.get("status").equals(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode())
@@ -550,13 +550,13 @@ public class WxRentContractServiceImpl implements WxRentContractService {
for (int i = 0; i < size; i++) {
JSONObject rentInfoObject = rentInfoArray.getJSONObject(i);
WxRentContract wxRentContract = new WxRentContract();
wxRentContract.setTenantId(record.getTenantId());
wxRentContract.updateTenantInfo(record);
Long shopId = rentInfoObject.getLong("shopId");
shopList.add(shopId);
}
} else {
WxRentContract wxRentContract = new WxRentContract();
wxRentContract.setTenantId(record.getTenantId());
wxRentContract.updateTenantInfo(record);
wxRentContract.setShopId(record.getShopId());
shopList.add(record.getShopId());
}
@@ -722,7 +722,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
for (int i = 0; i < size; i++) {
JSONObject rentInfoObject = rentInfoArray.getJSONObject(i);
WxRentContract wxRentContractQuery = new WxRentContract();
wxRentContractQuery.setTenantId(record.getTenantId());
wxRentContractQuery.updateTenantInfo(record);
Long shopId = rentInfoObject.getLong("shopId");
String shopNumber = rentInfoObject.getString("shopNumber");
if (shopId == null) {
@@ -756,7 +756,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
}
} else {
WxRentContract wxRentContractQuery = new WxRentContract();
wxRentContractQuery.setTenantId(record.getTenantId());
wxRentContractQuery.updateTenantInfo(record);
wxRentContractQuery.setShopId(record.getShopId());
long count = wxRentContractMapper.queryRentContractData(wxRentContract).stream().
filter(rc -> rc.get("status").equals(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode())
@@ -817,7 +817,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
wxBillDeposit.setStatus(EnumBillRentStatus.WAIT_PAY.getCode());
wxBillDeposit.setExpiredDay(0L);
wxBillDeposit.setReceiveDate(time);
wxBillDeposit.setTenantId(wxMerchant.getTenantId());
wxBillDeposit.updateTenantInfo(wxMerchant);
wxBillDeposit.setIsDel(0);
wxBillDeposit.setMerchantId(wxMerchant.getId());
wxBillDeposit.setUserId(userId);
@@ -864,7 +864,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
JSONObject rentInfoObject = rentInfoArray.getJSONObject(i);
Long shopId = rentInfoObject.getLong("shopId");
record.setShopId(shopId);
record.setTenantId(wxRentContract.getTenantId());
record.updateTenantInfo(wxRentContract);
record.setStatus(EnumRentContractStatus.INVALID.getCode());
wxRentContractMapper.updateInvalidContract(record);
List<WxRentContract> rentContractList = wxRentContractMapper.selectRentContractByShopId(record);
@@ -874,7 +874,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
}
} else {
WxRentContract record = new WxRentContract();
record.setTenantId(wxRentContract.getTenantId());
record.updateTenantInfo(wxRentContract);
record.setRentShopType(wxRentContract.getRentShopType());
record.setStatus(EnumRentContractStatus.INVALID.getCode());
wxRentContractMapper.updateRentInvalidStatus(record);
@@ -899,7 +899,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
String shopId = split[i];
WxShop wxShop = wxShopMapper.selectById(shopId);
WxRentContract wxRentContractQuery = new WxRentContract();
wxRentContractQuery.setTenantId(record.getTenantId());
wxRentContractQuery.updateTenantInfo(record);
String shopNumber = wxShop.getShopNumber();
if (shopId == null) {
return new ResultData(ErrorCode.SHOP_IS_NOT_FOUND.getCode(), "店铺 " + shopNumber + " 已删除");
@@ -1319,7 +1319,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
Date date = new Date();
setExpiredDay(wxBillRent,dayType,receivePeriod);
wxBillRent.setRevenue(0L);
wxBillRent.setTenantId(wxRentContract.getTenantId());
wxBillRent.updateTenantInfo(wxRentContract);
wxBillRent.setIsDel(0);
wxBillRent.setMerchantId(wxRentContract.getMerchantId());
wxBillRent.setUserId(userId);
@@ -1503,7 +1503,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
Map<String, Object> resultData = new HashMap();
//商铺信息
WxShop wxShop = new WxShop();
wxShop.setTenantId(rentContract.getTenantId());
wxShop.updateTenantInfo(rentContract);
wxShop.setType(rentContract.getRentShopType());
wxShop.setStatus(EnumShopStatus.RENT.getCode());
List<WxShop> rentedList = wxShopMapper.findList(wxShop);
@@ -1540,7 +1540,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
//物业合同终止
if (status == 1) {
WxPropertyContract wxPropertyContract = new WxPropertyContract();
wxRentContract.setTenantId(wxRentContract.getTenantId());
wxRentContract.updateTenantInfo(wxRentContract);
wxPropertyContract.setRentContractId(id);
List<Map<String, Object>> contractData = wxPropertyContractMapper.queryPropertyContractData(wxPropertyContract);
if (contractData.size() > 0) {
@@ -1588,7 +1588,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
public Map<String, Object> updateStatus(WxRentContract record) {
Map<String, Object> resultData = new HashMap();
WxRentContract wxRentContract = new WxRentContract();
wxRentContract.setTenantId(record.getTenantId());
wxRentContract.updateTenantInfo(record);
wxRentContract.setRentShopType(record.getRentShopType());

int allCount = wxRentContractMapper.selectCount(new QueryWrapper(wxRentContract));
@@ -1743,7 +1743,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
wxBillRentMapper.updatePreviewStatus(billRent);
WxMerchant wxMerchant = new WxMerchant();
wxMerchant.setId(record.getMerchantId());
wxMerchant.setTenantId(record.getTenantId());
wxMerchant.updateTenantInfo(record);
if(record.getDeposit() > 0) {
//押金
buildDeposit(wxMerchant, null, id);
@@ -1818,7 +1818,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
}
//MALL信息
WxMall wxMall = new WxMall();
wxMall.setTenantId(wxRentContract.getTenantId());
wxMall.setTenantInfo(wxRentContract);
wxMall = wxMallMapper.findList(wxMall).get(0);
result.put("mallName", wxMall.getName());
result.put("province", wxMall.getProvince());
@@ -1945,7 +1945,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
}
//物业合同信息
WxPropertyContract propertyContract = new WxPropertyContract();
propertyContract.setTenantId(wxRentContract.getTenantId());
propertyContract.updateTenantInfo(wxRentContract);
propertyContract.setRentContractId(wxRentContract.getId());
Optional<Map<String, Object>> first = wxPropertyContractMapper.queryPropertyContractData(propertyContract)
.stream().filter(rc -> !rc.get("status").equals(EnumRentContractStatus.CONTRACT_TERMINATE.getCode())


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java Просмотреть файл

@@ -529,7 +529,7 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService {
final IdWorker idWorker = IdWorker.get();
WxScoreHistory history = new WxScoreHistory();
history.setId(idWorker.nextId());
history.setTenantId(order.getTenantId());
history.updateTenantInfo(order);
history.setCUserId(order.getCUserId());
history.setCreateDate(new Date());
history.setScoreType(EnumScoreType.CONSUMPTION.getCode());


Загрузка…
Отмена
Сохранить