Kaynağa Gözat

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

develop
release_toaliyun_real
gongbiao 6 yıl önce
ebeveyn
işleme
7e7a18a212
11 değiştirilmiş dosya ile 77 ekleme ve 32 silme
  1. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java
  2. +12
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestController.java
  3. +2
    -2
      mallinkSchedule/src/main/java/com/iformall/schedule/InvestSchedule.java
  4. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxPayAccountBill.java
  5. +14
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  6. +1
    -1
      mallinkService/src/main/java/com/iformall/service/invest/InvestBaseService.java
  7. +3
    -0
      mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java
  8. +2
    -2
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBaseServiceImpl.java
  9. +37
    -21
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java
  10. +2
    -2
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestTaskServiceImpl.java
  11. +2
    -2
      mallinkService/src/main/resources/mapper/InvestCustomerMapper.xml

+ 1
- 1
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java Dosyayı Görüntüle

@@ -342,7 +342,7 @@ public class WxRentContractController extends BaseController {
@PostMapping("savePayAccountInfo")
@SystemControllerLog(description = "租赁合同-保存甲方账户")
public ResultData savePayAccountInfo(@RequestBody WxPayAccountBill payAccountBill) {
logger.debug("[" + getIpAddr() + "] WxRentContractController::updateRentContractStatus");
logger.debug("[" + getIpAddr() + "] WxRentContractController::savePayAccountInfo");
if(StringUtils.isBlank(payAccountBill.getBankAccountName())) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "甲方银行账户名未填写");
}


+ 12
- 0
mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestController.java Dosyayı Görüntüle

@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collection;
import java.util.Map;


@Slf4j
@@ -35,4 +36,15 @@ public class InvestController extends InvestBaseController {
return execute(null, p -> bizService.queryUserList());
}


/**
* 查询商铺可出租时间
*/
@ApiOperation("查询商铺可出租时间")
@SystemControllerLog(description = "查询商铺可出租时间")
@GetMapping("/shopRentInfo")
public InvestResultData<Map> shopRentInfo(Long shopId) {
return execute(shopId, p -> bizService.shopRentInfo(p));
}

}

+ 2
- 2
mallinkSchedule/src/main/java/com/iformall/schedule/InvestSchedule.java Dosyayı Görüntüle

@@ -99,7 +99,7 @@ public class InvestSchedule {

private void addTaskMessage(InvestTaskEntity task, List<Long> ownerArray) {
String message = String.format(EnumInvestMessageType.TASK_REMIND.getInfo(), task.getId(), DateUtils.format(task.getLastTime()));
messageService.saveBatchMessage(ownerArray, message, EnumInvestMessageTag.TASK_MONTH, EnumFollowType.TASK, task.getId());
messageService.saveBatchMessage(ownerArray, message, EnumInvestMessageTag.TASK_MONTH, EnumFollowType.TASK, task.getId(),task.getTenantId());
log.info("{}:taskID:{} 为用户{}创建消息提醒", PREFIX, task.getId(), task.getOwner());
}

@@ -155,7 +155,7 @@ public class InvestSchedule {

private void addCustomerMessage(InvestCustomerVo customerVo, Long owner) {
String message = String.format(EnumInvestMessageType.COSTOMER_REMIND.getInfo(), customerVo.getId());
messageService.saveBatchMessage(Arrays.asList(owner), message, EnumInvestMessageTag.CUSTOMER_WEEK, EnumFollowType.DEMAND, customerVo.getId());
messageService.saveBatchMessage(Arrays.asList(owner), message, EnumInvestMessageTag.CUSTOMER_WEEK, EnumFollowType.DEMAND, customerVo.getId(),customerVo.getTenantId());
log.info("{}:customerID:{} 为用户{}创建消息提醒", PREFIX, customerVo.getId(), customerVo.getDemandOwner());
}
}

+ 1
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxPayAccountBill.java Dosyayı Görüntüle

@@ -32,7 +32,7 @@ public class WxPayAccountBill extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value="商户模式-0:普通商户模式1:服务商模式",name="type")
private Integer type;
@io.swagger.annotations.ApiModelProperty(value="是否开启分账(0:未开启分账1:开启分账)",name="type")
private boolean share;
private Boolean share;
@io.swagger.annotations.ApiModelProperty(value="手续费(万分之几,默认60)",name="rate")
private Integer rate;
@io.swagger.annotations.ApiModelProperty(value="实际手续费(万分之几,默认60)",name="realRate")


+ 14
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java Dosyayı Görüntüle

@@ -1289,6 +1289,20 @@ public class WxBillAllServiceImpl implements WxBillAllService {
daily.setExpiredDay(expiredDayAndStatus.getExpiredDay());
daily.setStatus(expiredDayAndStatus.getStatus());
daily.setBuildWay(EnumBillDailyBuildWay.IMPORT.getCode());
JSONArray priceDetals = new JSONArray();
JSONObject priceDetal = new JSONObject();
priceDetal.put("key", "price");
priceDetal.put("value", 0);
priceDetals.add(priceDetal);
priceDetal = new JSONObject();
priceDetal.put("key", "way");
priceDetal.put("value", 0);
priceDetals.add(priceDetal);
priceDetal = new JSONObject();
priceDetal.put("key", "unit");
priceDetal.put("value", 0);
priceDetals.add(priceDetal);
daily.setPriceDetail(JSONArray.toJSONString(priceDetals));
wxBillDailyMapper.insert(daily);
if (pay > 0) {
addActionImport(daily.getId(), bill.getPayWay(), bill.getPayDate(), user, bill.getPayStr());


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/invest/InvestBaseService.java Dosyayı Görüntüle

@@ -33,7 +33,7 @@ public interface InvestBaseService<T> {
* @param tid
* @return
*/
default boolean saveBatchMessage(List<Long> ownerArray, String message, EnumInvestMessageTag tag, EnumFollowType type, Long tid) {
default boolean saveBatchMessage(List<Long> ownerArray, String message, EnumInvestMessageTag tag, EnumFollowType type, Long tid,String tenantId) {
return false;
}
}


+ 3
- 0
mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java Dosyayı Görüntüle

@@ -11,6 +11,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.Collection;
import java.util.List;
import java.util.Map;

public interface InvestBizService {

@@ -38,6 +39,8 @@ public interface InvestBizService {
*/
Collection<MallUserInfo> queryUserList() ;

Map<String,Object> shopRentInfo(Long shopId) ;

boolean saveCustomerAndDemand(InvestDemandDto customerDemandDto) ;

boolean updateCustomerAndDemand(InvestDemandDto customerDto) ;


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBaseServiceImpl.java Dosyayı Görüntüle

@@ -104,7 +104,7 @@ public class InvestBaseServiceImpl<M extends BaseMapper<T>, T> extends ServiceIm
}

@Override
public boolean saveBatchMessage(List<Long> ownerArray, String message, EnumInvestMessageTag tag, EnumFollowType type, Long tid) {
public boolean saveBatchMessage(List<Long> ownerArray, String message, EnumInvestMessageTag tag, EnumFollowType type, Long tid,String tenantId) {
if (CollectionUtils.isEmpty(ownerArray)) {
return false;
}
@@ -124,7 +124,7 @@ public class InvestBaseServiceImpl<M extends BaseMapper<T>, T> extends ServiceIm
messageEntity.setOwner(aLong);
messageEntity.setTid(tid);
messageEntity.setType(type);
messageEntity.setTenantId(InvestUserContext.getUser().getTenantId());
messageEntity.setTenantId(tenantId);
messageEntity.setMessage(message);
messageEntity.setTag(tag);
messageEntityList.add(messageEntity);


+ 37
- 21
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java Dosyayı Görüntüle

@@ -705,6 +705,20 @@ public class InvestBizServiceImpl implements InvestBizService {
return queryUserList(EnumInvestUserType.ALL);
}

@Override
public Map<String, Object> shopRentInfo(Long shopId) {
WxShop shop = shopService.getById(shopId);
InvestHelper.notNull(shop, "shop 不存在");
//3、商品合同信息
Map<Long, WxRentContract> shopContractMap = rentContractService.selectRentContractByShopIds(Arrays.asList(shop.getId()), StringUtils.join(shop.getId()), InvestUserContext.getUser().getTenantId());
WxRentContract contract = shopContractMap.get(shop.getId());
InvestHelper.notNull(contract,"合同信息不存在");
Map<String, Object> map = new HashMap<>();
map.put("startdate", contract.getRentalStartDate());
map.put("enddate", contract.getRentalEndDate());
return map;
}

public List<MallUserInfo> queryUserList(EnumInvestUserType userType) {
LambdaQueryWrapper<MallUserInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(MallUserInfo::getStatus, 1);
@@ -758,7 +772,8 @@ public class InvestBizServiceImpl implements InvestBizService {
Long owner = demandEntity.getOwner();
if (Objects.nonNull(owner) && !Objects.equals(owner, 0L)) {
List<Long> ownerArray = Collections.singletonList(owner);
demandService.saveBatchMessage(ownerArray, EnumInvestMessageType.CUSTOMER_CREATE.getInfo(), EnumInvestMessageTag.CUSTOMER_CREATE, EnumFollowType.DEMAND, customerEntity.getId());
demandService.saveBatchMessage(ownerArray, EnumInvestMessageType.CUSTOMER_CREATE.getInfo(),
EnumInvestMessageTag.CUSTOMER_CREATE, EnumFollowType.DEMAND, customerEntity.getId(),customerEntity.getTenantId());
}
}

@@ -948,28 +963,29 @@ public class InvestBizServiceImpl implements InvestBizService {
}

private void syncTargetStatus(InvestTaskEntity investTaskEntity) {
if (!Objects.equals(investTaskEntity.getTargetType(), EnumInvestType.RENT)) {
return;
}
WxShop shop = shopService.getById(investTaskEntity.getTargetId());
Map<Long, WxRentContract> shopContractMap = getWxRentContractMap(shop);
WxRentContract contract = shopContractMap.get(shop.getId());
if (Objects.nonNull(contract)) {
InvestHelper.addContractId(investTaskEntity.getContent(), contract.getId(), null);
} else {
WxRentContract contractQuery = new WxRentContract();
contractQuery.setTenantId(InvestUserContext.getUser().getTenantId());
contractQuery.setShopId(investTaskEntity.getTargetId());
contractQuery.setStatus(EnumRentContractStatus.INTENTION.getCode());
//获取意向合同
int count = rentContractService.selectContractCountByShopId(contractQuery);
if (count > 0) {
investTaskEntity.setStatus(EnumTaskStatus.INTENTION);
}
}
//if (!Objects.equals(investTaskEntity.getTargetType(), EnumInvestType.RENT)) {
// return;
//}

if (StringUtils.isNotBlank(investTaskEntity.getOwner()) && Objects.equals(EnumTaskStatus.CREATED, investTaskEntity.getStatus())) {
if (StringUtils.isNotBlank(investTaskEntity.getOwner())) {
investTaskEntity.setStatus(EnumTaskStatus.NEGOTIATING);
} else {
WxShop shop = shopService.getById(investTaskEntity.getTargetId());
Map<Long, WxRentContract> shopContractMap = getWxRentContractMap(shop);
WxRentContract contract = shopContractMap.get(shop.getId());
if (Objects.nonNull(contract)) {
InvestHelper.addContractId(investTaskEntity.getContent(), contract.getId(), null);
} else {
WxRentContract contractQuery = new WxRentContract();
contractQuery.setTenantId(InvestUserContext.getUser().getTenantId());
contractQuery.setShopId(investTaskEntity.getTargetId());
contractQuery.setStatus(EnumRentContractStatus.INTENTION.getCode());
//获取意向合同
int count = rentContractService.selectContractCountByShopId(contractQuery);
if (count > 0) {
investTaskEntity.setStatus(EnumTaskStatus.INTENTION);
}
}
}
}



+ 2
- 2
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestTaskServiceImpl.java Dosyayı Görüntüle

@@ -3,7 +3,6 @@ package com.iformall.service.invest.impl;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.iformall.common.TableLog;
import com.iformall.domain.po.invest.InvestTaskEntity;
import com.iformall.enums.EnumFollowType;
import com.iformall.enums.EnumInvestMessageTag;
@@ -56,7 +55,8 @@ public class InvestTaskServiceImpl extends InvestBaseServiceImpl<InvestTaskMappe
String owner = entity.getOwner();
if (StringUtils.isNotBlank(owner)) {
List<Long> ownerArray = JSONArray.parseArray(owner, Long.class);
this.saveBatchMessage(ownerArray, EnumInvestMessageType.TASK_CREATE.getInfo(), EnumInvestMessageTag.TASK_CREATE, EnumFollowType.TASK, entity.getId());
this.saveBatchMessage(ownerArray, EnumInvestMessageType.TASK_CREATE.getInfo(),
EnumInvestMessageTag.TASK_CREATE, EnumFollowType.TASK, entity.getId(),entity.getTenantId());
}
}



+ 2
- 2
mallinkService/src/main/resources/mapper/InvestCustomerMapper.xml Dosyayı Görüntüle

@@ -25,13 +25,13 @@
LEFT JOIN `invest_demand` d ON d.id = f.`follow_id`
LEFT JOIN invest_customer c ON d.`customer_id` = c.id
where 1=1
<if test=" null != type ">
<if test=" null != type and type.size()>0">
AND c.type in
<foreach collection="type" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>
<if test=" null != ids ">
<if test=" null != ids and ids.size()>0">
AND d.id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}


Yükleniyor…
İptal
Kaydet