Przeglądaj źródła

[招商]adjust

release_toaliyun_real
Burce 6 lat temu
rodzic
commit
96df4626f4
5 zmienionych plików z 28 dodań i 9 usunięć
  1. +2
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestController.java
  2. +10
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestOperateRecordController.java
  3. +1
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumInvestUserType.java
  4. +2
    -0
      mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java
  5. +13
    -5
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java

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

@@ -8,12 +8,12 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;


import java.util.Collection; import java.util.Collection;
import java.util.List;




@Slf4j @Slf4j
@@ -30,7 +30,7 @@ public class InvestController extends InvestBaseController {
*/ */
@ApiOperation("招商人员列表") @ApiOperation("招商人员列表")
@SystemControllerLog(description = "招商人员列表") @SystemControllerLog(description = "招商人员列表")
@PostMapping("/users")
@GetMapping("/users")
public InvestResultData<Collection<MallUserInfo>> userList() { public InvestResultData<Collection<MallUserInfo>> userList() {
return execute(null, p -> bizService.queryUserList()); return execute(null, p -> bizService.queryUserList());
} }


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

@@ -16,7 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;


import java.util.Arrays; import java.util.Arrays;
import java.util.Collection;




/** /**
@@ -47,11 +47,19 @@ public class InvestOperateRecordController extends InvestBaseController {
} }




/**
* 信息
*/
@GetMapping("/listById")
public InvestResultData<InvestPageResult<InvestOperateRecordVo>> listById(InvestOperateRecordQuery params) {
return execute(params, p -> bizService.findOperateListById(p));
}

/** /**
* 信息 * 信息
*/ */
@GetMapping("/info") @GetMapping("/info")
public InvestResultData info(InvestOperateRecordQuery params) {
public InvestResultData<Collection<InvestOperateRecordVo>> info(InvestOperateRecordQuery params) {
return execute(params, p -> bizService.findOperateById(p)); return execute(params, p -> bizService.findOperateById(p));
} }




+ 1
- 0
mallinkService/src/main/java/com/iformall/enums/EnumInvestUserType.java Wyświetl plik

@@ -4,6 +4,7 @@ package com.iformall.enums;
public enum EnumInvestUserType { public enum EnumInvestUserType {
MANAGER(0, "招商管理人员"), MANAGER(0, "招商管理人员"),
USER(1, "招商人员"), USER(1, "招商人员"),
ALL(10, "招商权限"),
; ;


public static EnumInvestUserType getEnum(Integer code) { public static EnumInvestUserType getEnum(Integer code) {


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java Wyświetl plik

@@ -48,6 +48,8 @@ public interface InvestBizService {


Collection<InvestOperateRecordVo> findOperateById(InvestOperateRecordQuery params) ; Collection<InvestOperateRecordVo> findOperateById(InvestOperateRecordQuery params) ;


InvestPageResult<InvestOperateRecordVo> findOperateListById(InvestOperateRecordQuery params) ;

InvestFollowRecordVo findFollowRecordById(Long id) ; InvestFollowRecordVo findFollowRecordById(Long id) ;


} }

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

@@ -376,13 +376,14 @@ public class InvestBizServiceImpl implements InvestBizService {


@Override @Override
public List<MallUserInfo> queryUserList() { public List<MallUserInfo> queryUserList() {
return queryUserList(EnumInvestUserType.USER);
return queryUserList(EnumInvestUserType.ALL);
} }


public List<MallUserInfo> queryUserList(EnumInvestUserType userType) { public List<MallUserInfo> queryUserList(EnumInvestUserType userType) {
LambdaQueryWrapper<MallUserInfo> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<MallUserInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(MallUserInfo::getStatus, 1);
if (Objects.nonNull(userType)) { if (Objects.nonNull(userType)) {
queryWrapper.eq(MallUserInfo::getInvestRule, userType.getCode());
queryWrapper.in(MallUserInfo::getInvestRule, EnumInvestUserType.MANAGER.getCode(), EnumInvestUserType.USER.getCode());
} }
return userInfoService.selectList(queryWrapper); return userInfoService.selectList(queryWrapper);
} }
@@ -462,9 +463,16 @@ public class InvestBizServiceImpl implements InvestBizService {


@Override @Override
public Collection<InvestOperateRecordVo> findOperateById(InvestOperateRecordQuery params) { public Collection<InvestOperateRecordVo> findOperateById(InvestOperateRecordQuery params) {
params.setPageSize(Integer.MAX_VALUE);
return findOperateListById(params).getRecords();
}

@Override
public InvestPageResult<InvestOperateRecordVo> findOperateListById(InvestOperateRecordQuery params) {
InvestHelper.notNull(params, params.getRecordType(), params.getTid()); InvestHelper.notNull(params, params.getRecordType(), params.getTid());
InvestPageResult<InvestOperateRecordVo> investPage = new InvestPageResult<>();
LambdaQueryWrapper<InvestOperateRecordEntity> recordQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<InvestOperateRecordEntity> recordQueryWrapper = new LambdaQueryWrapper<>();
InvestDemandEntity demandEntity = null;
InvestDemandEntity demandEntity;
List<InvestOperateRecordEntity> demandRecord = new ArrayList<>(); List<InvestOperateRecordEntity> demandRecord = new ArrayList<>();
if (Objects.equals(params.getRecordType(), EnumFollowType.DEMAND)) { if (Objects.equals(params.getRecordType(), EnumFollowType.DEMAND)) {
InvestCustomerEntity customerEntity = customerService.getByIdNotNull(params.getTid()); InvestCustomerEntity customerEntity = customerService.getByIdNotNull(params.getTid());
@@ -483,7 +491,7 @@ public class InvestBizServiceImpl implements InvestBizService {
List<InvestOperateRecordEntity> recordPage = operateRecordService.list(recordQueryWrapper); List<InvestOperateRecordEntity> recordPage = operateRecordService.list(recordQueryWrapper);
recordPage.addAll(demandRecord); recordPage.addAll(demandRecord);
if (CollectionUtils.isEmpty(recordPage)) { if (CollectionUtils.isEmpty(recordPage)) {
return resultList;
return investPage;
} }
List<InvestOperateRecordEntity> mixRecordPage = recordPage.parallelStream().sorted((o1, o2) -> { List<InvestOperateRecordEntity> mixRecordPage = recordPage.parallelStream().sorted((o1, o2) -> {
if (Objects.equals(o1.getCreateDate(), o2.getCreateDate())) { if (Objects.equals(o1.getCreateDate(), o2.getCreateDate())) {
@@ -500,7 +508,7 @@ public class InvestBizServiceImpl implements InvestBizService {
List<TableTriple> record = JSONArray.parseArray(recordEntity.getContent(), TableTriple.class); List<TableTriple> record = JSONArray.parseArray(recordEntity.getContent(), TableTriple.class);
resultList.addAll(getRecordList(recordEntity, record, usersMap.get(recordEntity.getOperator()))); resultList.addAll(getRecordList(recordEntity, record, usersMap.get(recordEntity.getOperator())));
} }
return resultList;
return investPage;
} }


private List<InvestOperateRecordVo> getRecordList(InvestOperateRecordEntity recordEntity, Collection<TableTriple> contentList, MallUserInfo userInfo) { private List<InvestOperateRecordVo> getRecordList(InvestOperateRecordEntity recordEntity, Collection<TableTriple> contentList, MallUserInfo userInfo) {


Ładowanie…
Anuluj
Zapisz