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

[招商]操作记录分页

release_toaliyun_real
Burce 6 лет назад
Родитель
Сommit
1180438d34
28 измененных файлов: 194 добавлений и 114 удалений
  1. +0
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestBaseController.java
  2. +11
    -7
      mallinkAdmin/src/main/java/com/iformall/log/TableOperateAspect.java
  3. +2
    -1
      mallinkSchedule/src/main/java/com/iformall/schedule/InvestSchedule.java
  4. +1
    -1
      mallinkService/src/main/java/com/iformall/mapper/InvestCustomerMapper.java
  5. +1
    -1
      mallinkService/src/main/java/com/iformall/mapper/InvestDemandMapper.java
  6. +1
    -1
      mallinkService/src/main/java/com/iformall/mapper/InvestFollowRecordMapper.java
  7. +1
    -1
      mallinkService/src/main/java/com/iformall/mapper/InvestMessageMapper.java
  8. +0
    -17
      mallinkService/src/main/java/com/iformall/mapper/InvestOperateRecordDao.java
  9. +22
    -0
      mallinkService/src/main/java/com/iformall/mapper/InvestOperateRecordMapper.java
  10. +1
    -1
      mallinkService/src/main/java/com/iformall/mapper/InvestRemindMapper.java
  11. +1
    -1
      mallinkService/src/main/java/com/iformall/mapper/InvestTaskMapper.java
  12. +5
    -0
      mallinkService/src/main/java/com/iformall/service/invest/InvestOperateRecordService.java
  13. +19
    -34
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java
  14. +3
    -3
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestCustomerServiceImpl.java
  15. +2
    -7
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestDemandServiceImpl.java
  16. +2
    -3
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestFollowRecordServiceImpl.java
  17. +2
    -2
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestMessageServiceImpl.java
  18. +35
    -2
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestOperateRecordServiceImpl.java
  19. +2
    -3
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestRemindServiceImpl.java
  20. +2
    -2
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestTaskServiceImpl.java
  21. +2
    -2
      mallinkService/src/main/resources/mapper/InvestCustomerMapper.xml
  22. +1
    -1
      mallinkService/src/main/resources/mapper/InvestDemandMapper.xml
  23. +1
    -1
      mallinkService/src/main/resources/mapper/InvestFollowRecordMapper.xml
  24. +1
    -1
      mallinkService/src/main/resources/mapper/InvestMessageMapper.xml
  25. +0
    -19
      mallinkService/src/main/resources/mapper/InvestOperateRecordDao.xml
  26. +74
    -0
      mallinkService/src/main/resources/mapper/InvestOperateRecordMapper.xml
  27. +1
    -1
      mallinkService/src/main/resources/mapper/InvestRemindMapper.xml
  28. +1
    -1
      mallinkService/src/main/resources/mapper/InvestTaskMapper.xml

+ 0
- 1
mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestBaseController.java Просмотреть файл

@@ -30,7 +30,6 @@ public class InvestBaseController extends BaseController {
registerEnumEditor(dataBinder, EnumCustomerRatingType.class, "customerRatingType") ;
registerEnumEditor(dataBinder, EnumTaskStatus.class, "taskStatus") ;
registerEnumEditor(dataBinder, EnumFollowType.class, "type") ;
registerEnumEditor(dataBinder, EnumRemindDateType.class, "dateType") ;
}

public <R, T> InvestResultData<R> execute(T params, Function<T, R> function) {


+ 11
- 7
mallinkAdmin/src/main/java/com/iformall/log/TableOperateAspect.java Просмотреть файл

@@ -100,16 +100,20 @@ public class TableOperateAspect {
Map<String, Object> afterMap = getFeildMap(arg);
List content = getContent(beforeMap, afterMap);
log.debug("operate content: {}", JSON.toJSONString(content));
InvestOperateRecordEntity recordEntity = new InvestOperateRecordEntity();
if (CollectionUtils.isEmpty(content)) {
return;
}
recordEntity.setContent(JSON.toJSONString(content));
recordEntity.setOperateType(operateType);
recordEntity.setTbl(getTbl(signature));
recordEntity.setTid(tid);
operateRecordService.save(recordEntity);
log.debug("saveRecord: {}", JSON.toJSONString(recordEntity));
List<InvestOperateRecordEntity> toSaveRecord = new ArrayList<>() ;
for (Object o : content) {
InvestOperateRecordEntity recordEntity = new InvestOperateRecordEntity();
recordEntity.setContent(JSON.toJSONString(o));
recordEntity.setOperateType(operateType);
recordEntity.setTbl(getTbl(signature));
recordEntity.setTid(tid);
toSaveRecord.add(recordEntity) ;
}
operateRecordService.saveBatch(toSaveRecord);
log.debug("saveRecord: {}", JSON.toJSONString(content));
}

private String getTbl(MethodSignature signature) {


+ 2
- 1
mallinkSchedule/src/main/java/com/iformall/schedule/InvestSchedule.java Просмотреть файл

@@ -92,7 +92,8 @@ public class InvestSchedule {
//查询跟踪列表
List<InvestFollowRecordEntity> follows = followRecordService.listByTime(EnumFollowType.DEMAND, start.getTime());

List<InvestCustomerVo> demands = customerService.listByIds(InvestHelper.getIds(follows, InvestFollowRecordEntity::getFollowId), Arrays.asList(EnumCustomerType.INTENTIONAL, EnumCustomerType.POTENTIAL));
List<InvestCustomerVo> demands = customerService.listByIds(InvestHelper.getIds(follows, InvestFollowRecordEntity::getFollowId),
Arrays.asList(EnumCustomerType.INTENTIONAL.getCode(), EnumCustomerType.POTENTIAL.getCode()));

/**
* 已经已经提醒过的用户


mallinkService/src/main/java/com/iformall/mapper/InvestCustomerDao.java → mallinkService/src/main/java/com/iformall/mapper/InvestCustomerMapper.java Просмотреть файл

@@ -18,7 +18,7 @@ import java.util.List;
* @date 2019-09-23 18:40:43
*/
@Mapper
public interface InvestCustomerDao extends BaseMapper<InvestCustomerEntity> {
public interface InvestCustomerMapper extends BaseMapper<InvestCustomerEntity> {

List<InvestCustomerVo> listByIds(Collection<? extends Serializable> ids, List<EnumCustomerType> type) ;
}

mallinkService/src/main/java/com/iformall/mapper/InvestDemandDao.java → mallinkService/src/main/java/com/iformall/mapper/InvestDemandMapper.java Просмотреть файл

@@ -12,6 +12,6 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2019-09-23 18:40:42
*/
@Mapper
public interface InvestDemandDao extends BaseMapper<InvestDemandEntity> {
public interface InvestDemandMapper extends BaseMapper<InvestDemandEntity> {
}

mallinkService/src/main/java/com/iformall/mapper/InvestFollowRecordDao.java → mallinkService/src/main/java/com/iformall/mapper/InvestFollowRecordMapper.java Просмотреть файл

@@ -12,6 +12,6 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2019-09-23 18:40:43
*/
@Mapper
public interface InvestFollowRecordDao extends BaseMapper<InvestFollowRecordEntity> {
public interface InvestFollowRecordMapper extends BaseMapper<InvestFollowRecordEntity> {
}

mallinkService/src/main/java/com/iformall/mapper/InvestMessageDao.java → mallinkService/src/main/java/com/iformall/mapper/InvestMessageMapper.java Просмотреть файл

@@ -12,6 +12,6 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2019-09-23 18:40:43
*/
@Mapper
public interface InvestMessageDao extends BaseMapper<InvestMessageEntity> {
public interface InvestMessageMapper extends BaseMapper<InvestMessageEntity> {
}

+ 0
- 17
mallinkService/src/main/java/com/iformall/mapper/InvestOperateRecordDao.java Просмотреть файл

@@ -1,17 +0,0 @@
package com.iformall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.iformall.domain.po.invest.InvestOperateRecordEntity;
import org.apache.ibatis.annotations.Mapper;

/**
* 操作记录
*
* @author
* @email
* @date 2019-09-23 18:40:43
*/
@Mapper
public interface InvestOperateRecordDao extends BaseMapper<InvestOperateRecordEntity> {
}

+ 22
- 0
mallinkService/src/main/java/com/iformall/mapper/InvestOperateRecordMapper.java Просмотреть файл

@@ -0,0 +1,22 @@
package com.iformall.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.iformall.domain.po.invest.InvestOperateRecordEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* 操作记录
*
* @author
* @email
* @date 2019-09-23 18:40:43
*/
@Mapper
public interface InvestOperateRecordMapper extends BaseMapper<InvestOperateRecordEntity> {

long selectCustomerPageCount(Long tid) ;
List<InvestOperateRecordEntity> selectCustomerPageByTid(Long tid, Integer limitStart, Integer limitSize);
}

mallinkService/src/main/java/com/iformall/mapper/InvestRemindDao.java → mallinkService/src/main/java/com/iformall/mapper/InvestRemindMapper.java Просмотреть файл

@@ -12,6 +12,6 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2019-09-23 18:40:43
*/
@Mapper
public interface InvestRemindDao extends BaseMapper<InvestRemindEntity> {
public interface InvestRemindMapper extends BaseMapper<InvestRemindEntity> {
}

mallinkService/src/main/java/com/iformall/mapper/InvestTaskDao.java → mallinkService/src/main/java/com/iformall/mapper/InvestTaskMapper.java Просмотреть файл

@@ -12,6 +12,6 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2019-09-23 18:40:43
*/
@Mapper
public interface InvestTaskDao extends BaseMapper<InvestTaskEntity> {
public interface InvestTaskMapper extends BaseMapper<InvestTaskEntity> {
}

+ 5
- 0
mallinkService/src/main/java/com/iformall/service/invest/InvestOperateRecordService.java Просмотреть файл

@@ -2,9 +2,12 @@ package com.iformall.service.invest;

import com.baomidou.mybatisplus.extension.service.IService;
import com.iformall.domain.po.invest.InvestOperateRecordEntity;
import com.iformall.domain.vo.invest.InvestOperateRecordQuery;
import com.iformall.domain.vo.invest.InvestPageQuery;
import com.iformall.domain.vo.invest.InvestPageResult;

import java.util.List;

/**
* 操作记录
*
@@ -15,5 +18,7 @@ import com.iformall.domain.vo.invest.InvestPageResult;
public interface InvestOperateRecordService extends IService<InvestOperateRecordEntity>,InvestBaseService<InvestOperateRecordEntity> {

InvestPageResult<InvestOperateRecordEntity> queryPage(InvestPageQuery<InvestOperateRecordEntity> params);

InvestPageResult<InvestOperateRecordEntity> selectPageByTid(InvestOperateRecordQuery recordQuery);
}


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

@@ -306,7 +306,7 @@ 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.le(Objects.nonNull(params.getRemindDate()), InvestRemindEntity::getEndDate, getDayEnd(params.getRemindDate()));
queryWrapper.ge(Objects.nonNull(params.getRemindDate()), InvestRemindEntity::getEndDate, getDayEnd(params.getRemindDate()));
queryWrapper.orderByDesc(InvestRemindEntity::getCreateDate);
InvestPageResult<InvestRemindEntity> recordPage = remindService.queryPage(remindPageQuery, queryWrapper);
if (CollectionUtils.isEmpty(recordPage.getRecords())) {
@@ -522,43 +522,28 @@ public class InvestBizServiceImpl implements InvestBizService {
public InvestPageResult<InvestOperateRecordVo> findOperateListById(InvestOperateRecordQuery params) {
InvestHelper.notNull(params, params.getRecordType(), params.getTid());
InvestPageResult<InvestOperateRecordVo> investPage = new InvestPageResult<>();
LambdaQueryWrapper<InvestOperateRecordEntity> recordQueryWrapper = new LambdaQueryWrapper<>();
InvestDemandEntity demandEntity;
List<InvestOperateRecordEntity> demandRecord = new ArrayList<>();
if (Objects.equals(params.getRecordType(), EnumFollowType.DEMAND)) {
InvestCustomerEntity customerEntity = customerService.getByIdNotNull(params.getTid());
demandEntity = demandService.getOne(new LambdaQueryWrapper<InvestDemandEntity>().eq(InvestDemandEntity::getCustomerId, customerEntity.getId()));
buildQueryWrapper(recordQueryWrapper, InvestOperateRecordEntity.TLB_CUSTOMER, customerEntity.getId());
if (Objects.nonNull(demandEntity)) {
LambdaQueryWrapper<InvestOperateRecordEntity> demandQueryWrapper = new LambdaQueryWrapper<>();
buildQueryWrapper(demandQueryWrapper, InvestOperateRecordEntity.TLB_DEMAND, demandEntity.getId());
demandRecord.addAll(operateRecordService.list(demandQueryWrapper));
}
} else if (Objects.equals(params.getRecordType(), EnumFollowType.TASK)) {
buildQueryWrapper(recordQueryWrapper, InvestOperateRecordEntity.TLB_TASK, params.getTid());
}

Collection<InvestOperateRecordVo> resultList = new ArrayList<>();
List<InvestOperateRecordEntity> recordPage = operateRecordService.list(recordQueryWrapper);
recordPage.addAll(demandRecord);
if (CollectionUtils.isEmpty(recordPage)) {
InvestPageResult<InvestOperateRecordEntity> entityPageList = operateRecordService.selectPageByTid(params);
if (entityPageList.getSize() == 0) {
return investPage;
}
List<InvestOperateRecordEntity> mixRecordPage = recordPage.parallelStream().sorted((o1, o2) -> {
if (Objects.equals(o1.getCreateDate(), o2.getCreateDate())) {
return 0;
} else if (o1.getCreateDate().after(o2.getCreateDate())) {
return 1;
} else {
return -1;
}
}).collect(Collectors.toList());

Map<Long, MallUserInfo> usersMap = getMap(userInfoService.getByIds(getIds(mixRecordPage, InvestOperateRecordEntity::getOperator)), MallUserInfo::getId);
for (InvestOperateRecordEntity recordEntity : mixRecordPage) {
List<TableTriple> record = JSONArray.parseArray(recordEntity.getContent(), TableTriple.class);
resultList.addAll(getRecordList(recordEntity, record, usersMap.get(recordEntity.getOperator())));
Collection<InvestOperateRecordEntity> recordList = entityPageList.getRecords();
Map<Long, MallUserInfo> usersMap = getMap(userInfoService.getByIds(getIds(recordList, InvestOperateRecordEntity::getOperator)), MallUserInfo::getId);

List<InvestOperateRecordVo> resultList = new ArrayList<>();
for (InvestOperateRecordEntity recordEntity : recordList) {
InvestOperateRecordVo itemVo = new InvestOperateRecordVo();
BeanUtils.copyProperties(recordEntity, itemVo);
MallUserInfo userInfo = usersMap.get(recordEntity.getOperator());
if (Objects.nonNull(userInfo)) {
itemVo.setOperatorName(userInfo.getName());
}
TableTriple content = JSON.parseObject(recordEntity.getContent(), TableTriple.class);
itemVo.setRecord(content);
resultList.add(itemVo);
}
BeanUtils.copyProperties(entityPageList, investPage);
investPage.setRecords(resultList);
return investPage;
}



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

@@ -6,7 +6,7 @@ import com.iformall.common.TableLog;
import com.iformall.domain.po.invest.InvestCustomerEntity;
import com.iformall.domain.vo.invest.InvestCustomerVo;
import com.iformall.enums.EnumCustomerType;
import com.iformall.mapper.InvestCustomerDao;
import com.iformall.mapper.InvestCustomerMapper;
import com.iformall.service.WxBrandService;
import com.iformall.service.WxBusinessService;
import com.iformall.service.invest.InvestCustomerService;
@@ -21,7 +21,7 @@ import java.util.Objects;
import static com.iformall.service.invest.InvestHelper.isTrue;

@Service
public class InvestCustomerServiceImpl extends InvestBaseServiceImpl<InvestCustomerDao, InvestCustomerEntity> implements InvestCustomerService {
public class InvestCustomerServiceImpl extends InvestBaseServiceImpl<InvestCustomerMapper, InvestCustomerEntity> implements InvestCustomerService {

@Autowired
private WxBrandService brandService;
@@ -77,6 +77,6 @@ public class InvestCustomerServiceImpl extends InvestBaseServiceImpl<InvestCusto

@Override
public List<InvestCustomerVo> listByIds(Collection<? extends Serializable> idList, List<EnumCustomerType> type) {
return getBaseMapper().listByIds(idList, type);
return super.baseMapper.listByIds(idList,type);
}
}

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

@@ -4,11 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.iformall.common.TableLog;
import com.iformall.domain.po.invest.InvestDemandEntity;
import com.iformall.enums.EnumCustomerType;
import com.iformall.enums.EnumFollowType;
import com.iformall.enums.EnumInvestMessageTag;
import com.iformall.enums.EnumInvestMessageType;
import com.iformall.mapper.InvestDemandDao;
import com.iformall.mapper.InvestDemandMapper;
import com.iformall.service.MallUserInfoService;
import com.iformall.service.WxShopService;
import com.iformall.service.invest.InvestCustomerService;
@@ -16,12 +12,11 @@ import com.iformall.service.invest.InvestDemandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.*;


@Service
public class InvestDemandServiceImpl extends InvestBaseServiceImpl<InvestDemandDao, InvestDemandEntity> implements InvestDemandService {
public class InvestDemandServiceImpl extends InvestBaseServiceImpl<InvestDemandMapper, InvestDemandEntity> implements InvestDemandService {

@Autowired
private WxShopService shopService;


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

@@ -4,12 +4,11 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.iformall.common.ErrorCode;
import com.iformall.domain.po.invest.InvestFollowRecordEntity;
import com.iformall.domain.po.invest.InvestTaskEntity;
import com.iformall.domain.vo.invest.InvestPageQuery;
import com.iformall.domain.vo.invest.InvestPageResult;
import com.iformall.domain.vo.invest.InvestUserContext;
import com.iformall.enums.EnumFollowType;
import com.iformall.mapper.InvestFollowRecordDao;
import com.iformall.mapper.InvestFollowRecordMapper;
import com.iformall.service.invest.InvestDemandService;
import com.iformall.service.invest.InvestFollowRecordService;
import com.iformall.service.invest.InvestHelper;
@@ -22,7 +21,7 @@ import java.util.List;
import java.util.Objects;

@Service
public class InvestFollowRecordServiceImpl extends InvestBaseServiceImpl<InvestFollowRecordDao, InvestFollowRecordEntity> implements InvestFollowRecordService {
public class InvestFollowRecordServiceImpl extends InvestBaseServiceImpl<InvestFollowRecordMapper, InvestFollowRecordEntity> implements InvestFollowRecordService {

@Autowired
private InvestDemandService demandService ;


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

@@ -7,7 +7,7 @@ import com.iformall.domain.po.invest.InvestMessageEntity;
import com.iformall.domain.vo.invest.InvestUserContext;
import com.iformall.enums.EnumFollowType;
import com.iformall.enums.EnumInvestMessageTag;
import com.iformall.mapper.InvestMessageDao;
import com.iformall.mapper.InvestMessageMapper;
import com.iformall.service.invest.InvestHelper;
import com.iformall.service.invest.InvestMessageService;
import org.springframework.stereotype.Service;
@@ -16,7 +16,7 @@ import java.util.List;


@Service
public class InvestMessageServiceImpl extends InvestBaseServiceImpl<InvestMessageDao, InvestMessageEntity> implements InvestMessageService {
public class InvestMessageServiceImpl extends InvestBaseServiceImpl<InvestMessageMapper, InvestMessageEntity> implements InvestMessageService {

@Override
public boolean save(InvestMessageEntity entity) {


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

@@ -2,15 +2,23 @@ package com.iformall.service.invest.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.iformall.domain.po.invest.InvestOperateRecordEntity;
import com.iformall.domain.vo.invest.InvestOperateRecordQuery;
import com.iformall.domain.vo.invest.InvestPageQuery;
import com.iformall.domain.vo.invest.InvestPageResult;
import com.iformall.domain.vo.invest.InvestUserContext;
import com.iformall.mapper.InvestOperateRecordDao;
import com.iformall.enums.EnumFollowType;
import com.iformall.mapper.InvestOperateRecordMapper;
import com.iformall.service.invest.InvestHelper;
import com.iformall.service.invest.InvestOperateRecordService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Objects;


@Service
public class InvestOperateRecordServiceImpl extends InvestBaseServiceImpl<InvestOperateRecordDao, InvestOperateRecordEntity> implements InvestOperateRecordService {
public class InvestOperateRecordServiceImpl extends InvestBaseServiceImpl<InvestOperateRecordMapper, InvestOperateRecordEntity> implements InvestOperateRecordService {

@Override
public boolean save(InvestOperateRecordEntity entity) {
@@ -44,4 +52,29 @@ public class InvestOperateRecordServiceImpl extends InvestBaseServiceImpl<Invest
return false;
}

@Override
public InvestPageResult<InvestOperateRecordEntity> selectPageByTid(InvestOperateRecordQuery recordQuery) {
if (Objects.equals(recordQuery.getRecordType(), EnumFollowType.DEMAND)) {
InvestPageResult<InvestOperateRecordEntity> pageResult = new InvestPageResult<>();
long count = super.baseMapper.selectCustomerPageCount(recordQuery.getTid());
if (count == 0) {
return pageResult;
}
pageResult.setTotal(count);
pageResult.setSize(recordQuery.getPageSize());
pageResult.setCurrent(recordQuery.getPageNum());
Integer limitStart = (recordQuery.getPageNum() - 1) * recordQuery.getPageSize();
Integer limitSize = recordQuery.getPageSize();
List data = super.baseMapper.selectCustomerPageByTid(recordQuery.getTid(), limitStart, limitSize);
pageResult.setRecords(data);
return pageResult;
} else {
InvestOperateRecordEntity params = new InvestOperateRecordEntity();
params.setTid(recordQuery.getTid());
params.setTbl(InvestOperateRecordEntity.TLB_TASK);
InvestPageQuery<InvestOperateRecordEntity> pageQuery = new InvestPageQuery<>(params);
BeanUtils.copyProperties(recordQuery, pageQuery);
return this.queryPage(pageQuery);
}
}
}

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

@@ -2,10 +2,9 @@ package com.iformall.service.invest.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper;
import com.iformall.domain.po.invest.InvestRemindEntity;
import com.iformall.domain.vo.invest.InvestUserContext;
import com.iformall.mapper.InvestRemindDao;
import com.iformall.mapper.InvestRemindMapper;
import com.iformall.service.invest.InvestRemindService;
import org.springframework.stereotype.Service;

@@ -13,7 +12,7 @@ import java.util.Objects;


@Service
public class InvestRemindServiceImpl extends InvestBaseServiceImpl<InvestRemindDao, InvestRemindEntity> implements InvestRemindService {
public class InvestRemindServiceImpl extends InvestBaseServiceImpl<InvestRemindMapper, InvestRemindEntity> implements InvestRemindService {

@Override
public boolean save(InvestRemindEntity entity) {


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

@@ -9,7 +9,7 @@ import com.iformall.enums.EnumFollowType;
import com.iformall.enums.EnumInvestMessageTag;
import com.iformall.enums.EnumInvestMessageType;
import com.iformall.enums.EnumTaskStatus;
import com.iformall.mapper.InvestTaskDao;
import com.iformall.mapper.InvestTaskMapper;
import com.iformall.service.MallUserInfoService;
import com.iformall.service.WxShopService;
import com.iformall.service.invest.InvestTaskService;
@@ -21,7 +21,7 @@ import java.util.*;


@Service
public class InvestTaskServiceImpl extends InvestBaseServiceImpl<InvestTaskDao, InvestTaskEntity> implements InvestTaskService {
public class InvestTaskServiceImpl extends InvestBaseServiceImpl<InvestTaskMapper, InvestTaskEntity> implements InvestTaskService {

@Autowired
private WxShopService shopService;


mallinkService/src/main/resources/mapper/InvestCustomerDao.xml → mallinkService/src/main/resources/mapper/InvestCustomerMapper.xml Просмотреть файл

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.iformall.mapper.InvestCustomerDao">
<mapper namespace="com.iformall.mapper.InvestCustomerMapper">

<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.iformall.domain.po.invest.InvestCustomerEntity" id="investCustomerMap">
@@ -18,7 +18,7 @@
<result property="updateDate" column="update_date"/>
</resultMap>

<select id="listByIds" parameterType="long" resultType="com.iformall.domain.vo.invest.InvestCustomerVo">
<select id="listByIds" resultType="com.iformall.domain.vo.invest.InvestCustomerVo">
select c.*,d.`id` as demandId,d.`owner` as demandOwner
from `invest_follow_record` f
LEFT JOIN `invest_demand` d ON d.id = f.`follow_id`

mallinkService/src/main/resources/mapper/InvestDemandDao.xml → mallinkService/src/main/resources/mapper/InvestDemandMapper.xml Просмотреть файл

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.iformall.mapper.InvestDemandDao">
<mapper namespace="com.iformall.mapper.InvestDemandMapper">

<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.iformall.domain.po.invest.InvestDemandEntity" id="investDemandMap">

mallinkService/src/main/resources/mapper/InvestFollowRecordDao.xml → mallinkService/src/main/resources/mapper/InvestFollowRecordMapper.xml Просмотреть файл

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.iformall.mapper.InvestFollowRecordDao">
<mapper namespace="com.iformall.mapper.InvestFollowRecordMapper">

<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.iformall.domain.po.invest.InvestFollowRecordEntity" id="investFollowRecordMap">

mallinkService/src/main/resources/mapper/InvestMessageDao.xml → mallinkService/src/main/resources/mapper/InvestMessageMapper.xml Просмотреть файл

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.iformall.mapper.InvestMessageDao">
<mapper namespace="com.iformall.mapper.InvestMessageMapper">

<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.iformall.domain.po.invest.InvestMessageEntity" id="investMessageMap">

+ 0
- 19
mallinkService/src/main/resources/mapper/InvestOperateRecordDao.xml Просмотреть файл

@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.iformall.mapper.InvestOperateRecordDao">

<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.iformall.domain.po.invest.InvestOperateRecordEntity" id="investOperateRecordMap">
<result property="id" column="id"/>
<result property="tenantId" column="tenant_id"/>
<result property="tbl" column="tbl"/>
<result property="tid" column="tid"/>
<result property="operator" column="operator"/>
<result property="operateType" column="operate_type"/>
<result property="content" column="content"/>
<result property="createDate" column="create_date"/>
</resultMap>


</mapper>

+ 74
- 0
mallinkService/src/main/resources/mapper/InvestOperateRecordMapper.xml Просмотреть файл

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.iformall.mapper.InvestOperateRecordMapper">

<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.iformall.domain.po.invest.InvestOperateRecordEntity" id="investOperateRecordMap">
<result property="id" column="id"/>
<result property="tenantId" column="tenant_id"/>
<result property="tbl" column="tbl"/>
<result property="tid" column="tid"/>
<result property="operator" column="operator"/>
<result property="operateType" column="operate_type"/>
<result property="content" column="content"/>
<result property="createDate" column="create_date"/>
</resultMap>

<select id="selectCustomerPageCount" resultType="long">
SELECT count(*)
FROM (SELECT o.`id`,
o.`tbl`,
d.`customer_id` AS tid,
o.`operator`,
o.`operate_type`,
o.`content`,
o.`tenant_id`,
o.`create_date`
FROM `invest_operate_record` o
LEFT JOIN `invest_demand` d ON d.`id` = o.`tid`
WHERE tbl = 'invest_demand'
UNION ALL
SELECT `id`,
`tbl`,
`tid`,
`operator`,
`operate_type`,
`content`,
`tenant_id`,
`create_date`
FROM `invest_operate_record` o
WHERE o.tbl = 'invest_customer') t
WHERE t.`tid` = #{tid}
</select>

<select id="selectCustomerPageByTid" resultMap="investOperateRecordMap">
SELECT t.*
FROM (SELECT o.`id`,
o.`tbl`,
d.`customer_id` AS tid,
o.`operator`,
o.`operate_type`,
o.`content`,
o.`tenant_id`,
o.`create_date`
FROM `invest_operate_record` o
LEFT JOIN `invest_demand` d ON d.`id` = o.`tid`
WHERE tbl = 'invest_demand'
UNION ALL
SELECT `id`,
`tbl`,
`tid`,
`operator`,
`operate_type`,
`content`,
`tenant_id`,
`create_date`
FROM `invest_operate_record` o
WHERE o.tbl = 'invest_customer') t
WHERE t.`tid` = #{tid}
ORDER BY t.`create_date` DESC
LIMIT #{limitStart},#{limitSize}
</select>

</mapper>

mallinkService/src/main/resources/mapper/InvestRemindDao.xml → mallinkService/src/main/resources/mapper/InvestRemindMapper.xml Просмотреть файл

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.iformall.mapper.InvestRemindDao">
<mapper namespace="com.iformall.mapper.InvestRemindMapper">

<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.iformall.domain.po.invest.InvestRemindEntity" id="investRemindMap">

mallinkService/src/main/resources/mapper/InvestTaskDao.xml → mallinkService/src/main/resources/mapper/InvestTaskMapper.xml Просмотреть файл

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.iformall.mapper.InvestTaskDao">
<mapper namespace="com.iformall.mapper.InvestTaskMapper">

<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.iformall.domain.po.invest.InvestTaskEntity" id="investTaskMap">

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