Procházet zdrojové kódy

[招商]adjust

release_toaliyun_real
Burce před 6 roky
rodič
revize
50528096cf
3 změnil soubory, kde provedl 114 přidání a 91 odebrání
  1. +88
    -85
      mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestCustomerController.java
  2. +2
    -3
      mallinkService/src/main/java/com/iformall/service/invest/InvestCustomerService.java
  3. +24
    -3
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestCustomerServiceImpl.java

+ 88
- 85
mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestCustomerController.java Zobrazit soubor

@@ -1,85 +1,88 @@
//package com.iformall.controller.invest;
//
//import java.util.Arrays;
//import java.util.List;
//
//import com.iformall.annotation.SystemControllerLog;
//import com.iformall.common.ResultData;
//import com.iformall.domain.po.InvestCustomerEntity;
//import com.iformall.service.invest.InvestCustomerService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.beans.factory.annotation.Autowired;
//
//
///**
// * 客户管理
// *
// * @author
// * @email
// * @date 2019-09-23 18:40:43
// */
//@Slf4j
//@RestController
//@RequestMapping("invest/customer")
//@Api(tags = "客户管理")
//public class InvestCustomerController {
// @Autowired
// private InvestCustomerService investCustomerService;
//
// /**
// * 客户列表
// */
// @ApiOperation("客户列表")
// @SystemControllerLog(description = "客户列表")
// @PostMapping("/list")
// public ResultData list(@RequestBody InvestCustomerEntity params) {
// List page = investCustomerService.queryPage(params);
// return new ResultData(page);
// }
//
//
// /**
// * 客户详细信息
// */
// @SystemControllerLog(description = "客户详细信息")
// @GetMapping("/info/{id}")
// public ResultData info(@PathVariable("id") Long id) {
// InvestCustomerEntity investCustomer = investCustomerService.getById(id);
// return new ResultData(investCustomer);
// }
//
// /**
// * 保存客户
// */
// @SystemControllerLog(description = "保存客户")
// @PostMapping("/save")
// public ResultData save(@RequestBody InvestCustomerEntity investCustomer) {
// investCustomerService.save(investCustomer);
// return new ResultData();
// }
//
// /**
// * 修改客户信息
// */
// @SystemControllerLog(description = "修改客户信息")
// @PostMapping("/update")
// public ResultData update(@RequestBody InvestCustomerEntity investCustomer) {
// investCustomerService.updateById(investCustomer);
//
// return new ResultData();
// }
//
// /**
// * 删除客户信息
// */
// @SystemControllerLog(description = "删除客户信息")
// @GetMapping("/delete")
// public ResultData delete(@RequestBody Long[] ids) {
// investCustomerService.removeByIds(Arrays.asList(ids));
// return new ResultData();
// }
//
//}
package com.iformall.controller.invest;

import java.util.Arrays;
import java.util.List;

import com.iformall.annotation.SystemControllerLog;
import com.iformall.common.InvestResultData;
import com.iformall.common.ResultData;
import com.iformall.domain.po.InvestCustomerEntity;
import com.iformall.domain.po.InvestTaskEntity;
import com.iformall.domain.vo.invest.InvestPageQuery;
import com.iformall.domain.vo.invest.InvestPageResult;
import com.iformall.service.invest.InvestCustomerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;


/**
* 客户管理
*
* @author
* @email
* @date 2019-09-23 18:40:43
*/
@Slf4j
@RestController
@RequestMapping("invest/customer")
@Api(tags = "客户管理")
public class InvestCustomerController extends InvestBaseController{
@Autowired
private InvestCustomerService investCustomerService;

/**
* 客户列表
*/
@ApiOperation("客户列表")
@SystemControllerLog(description = "客户列表")
@PostMapping("/list")
public InvestResultData<InvestPageResult<InvestCustomerEntity>> list(InvestPageQuery<InvestCustomerEntity> params) {
return execute(params, p -> investCustomerService.queryPage(p));
}


/**
// * 客户详细信息
// */
//@SystemControllerLog(description = "客户详细信息")
//@GetMapping("/info/{id}")
//public ResultData info(@PathVariable("id") Long id) {
// InvestCustomerEntity investCustomer = investCustomerService.getById(id);
// return new ResultData(investCustomer);
//}

///**
// * 保存客户
// */
//@SystemControllerLog(description = "保存客户")
//@PostMapping("/save")
//public ResultData save(@RequestBody InvestCustomerEntity investCustomer) {
// investCustomerService.save(investCustomer);
// return new ResultData();
//}
//
///**
// * 修改客户信息
// */
//@SystemControllerLog(description = "修改客户信息")
//@PostMapping("/update")
//public ResultData update(@RequestBody InvestCustomerEntity investCustomer) {
// investCustomerService.updateById(investCustomer);
//
// return new ResultData();
//}

///**
// * 删除客户信息
// */
//@SystemControllerLog(description = "删除客户信息")
//@GetMapping("/delete")
//public ResultData delete(@RequestBody Long[] ids) {
// investCustomerService.removeByIds(Arrays.asList(ids));
// return new ResultData();
//}

}

+ 2
- 3
mallinkService/src/main/java/com/iformall/service/invest/InvestCustomerService.java Zobrazit soubor

@@ -3,8 +3,7 @@ package com.iformall.service.invest;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.iformall.domain.po.InvestCustomerEntity; import com.iformall.domain.po.InvestCustomerEntity;
import com.iformall.domain.vo.invest.InvestPageQuery; import com.iformall.domain.vo.invest.InvestPageQuery;

import java.util.List;
import com.iformall.domain.vo.invest.InvestPageResult;


/** /**
* 客户列表 * 客户列表
@@ -15,6 +14,6 @@ import java.util.List;
*/ */
public interface InvestCustomerService extends IService<InvestCustomerEntity>,InvestBaseService<InvestCustomerEntity> { public interface InvestCustomerService extends IService<InvestCustomerEntity>,InvestBaseService<InvestCustomerEntity> {


List queryPage(InvestPageQuery<InvestCustomerEntity> params);
InvestPageResult<InvestCustomerEntity> queryPage(InvestPageQuery<InvestCustomerEntity> params);
} }



+ 24
- 3
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestCustomerServiceImpl.java Zobrazit soubor

@@ -1,18 +1,26 @@
package com.iformall.service.invest.impl; package com.iformall.service.invest.impl;


import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.iformall.common.ErrorCode; import com.iformall.common.ErrorCode;
import com.iformall.common.TableLog; import com.iformall.common.TableLog;
import com.iformall.domain.po.InvestCustomerEntity; import com.iformall.domain.po.InvestCustomerEntity;
import com.iformall.domain.po.InvestTaskEntity;
import com.iformall.domain.vo.invest.InvestPageQuery; import com.iformall.domain.vo.invest.InvestPageQuery;
import com.iformall.domain.vo.invest.InvestPageResult;
import com.iformall.domain.vo.invest.InvestTaskVo;
import com.iformall.mapper.InvestCustomerDao; import com.iformall.mapper.InvestCustomerDao;
import com.iformall.service.WxBrandService; import com.iformall.service.WxBrandService;
import com.iformall.service.WxBusinessService; import com.iformall.service.WxBusinessService;
import com.iformall.service.invest.InvestCustomerService; import com.iformall.service.invest.InvestCustomerService;
import com.iformall.service.invest.InvestHelper;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;


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


import static com.iformall.service.invest.InvestHelper.isTrue; import static com.iformall.service.invest.InvestHelper.isTrue;
@@ -26,8 +34,21 @@ public class InvestCustomerServiceImpl extends InvestBaseServiceImpl<InvestCusto
private WxBusinessService businessService ; private WxBusinessService businessService ;


@Override @Override
public List queryPage(InvestPageQuery<InvestCustomerEntity> params) {
return this.list();
public InvestPageResult<InvestCustomerEntity> queryPage(InvestPageQuery<InvestCustomerEntity> params) {
InvestHelper.allNotNull(params);
Page<InvestCustomerEntity> queryPage = buildQueryPage(params);
//1、任务信息
InvestCustomerEntity queryData = params.getQueryData();
LambdaQueryWrapper<InvestCustomerEntity> queryWrapper = new LambdaQueryWrapper<>(queryData);
IPage<InvestCustomerEntity> taskPage = this.page(queryPage, queryWrapper);


InvestPageResult<InvestCustomerEntity> investPage = new InvestPageResult<>();
if (CollectionUtils.isEmpty(taskPage.getRecords())) {
return investPage;
}
BeanUtils.copyProperties(taskPage, investPage);
return investPage;
} }


@Override @Override


Načítá se…
Zrušit
Uložit