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

[招商]adjust

release_toaliyun_real
Burce 6 лет назад
Родитель
Сommit
c0830e12a5
12 измененных файлов: 35 добавлений и 14 удалений
  1. +1
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestDemandController.java
  2. +1
    -0
      mallinkService/src/main/java/com/iformall/common/ErrorCode.java
  3. +8
    -1
      mallinkService/src/main/java/com/iformall/common/GlobalDefultExceptionHandler.java
  4. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/InvestCustomerEntity.java
  5. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/InvestDemandEntity.java
  6. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/InvestFollowRecordEntity.java
  7. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/InvestOperateRecordEntity.java
  8. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/InvestRemindEntity.java
  9. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/InvestTaskEntity.java
  10. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestTaskVo.java
  11. +1
    -1
      mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java
  12. +10
    -10
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java

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

@@ -41,7 +41,6 @@ public class InvestDemandController extends InvestBaseController {
/**
* 分页列表
*/
@RequiresPermissions("investTaskEdit")
@SystemServiceLog
@ApiOperation(value = "分页列表接口")
@GetMapping("/list")
@@ -73,7 +72,7 @@ public class InvestDemandController extends InvestBaseController {
*/
@SystemServiceLog
@PostMapping("/update")
public InvestResultData update(@RequestBody InvestDemandVo investDemand) {
public InvestResultData update(@RequestBody InvestDemandDto investDemand) {
return execute(investDemand, p -> investBizService.updateCustomerAndDemand(p));
}



+ 1
- 0
mallinkService/src/main/java/com/iformall/common/ErrorCode.java Просмотреть файл

@@ -29,6 +29,7 @@ public enum ErrorCode{
SYS_REPEAT_SUBMIT_EXCEPTION(1013, "请勿重复操作"),
REPORT_TYPE_UNKNOWN(1014, "不支持的报表类型"),
SYS_MCH_NOT_FOUND(1015, "微信商户号未找到"),
SYS_AUTH_ERROR(1016, "该用户没有权限访问"),

/**
* 菜单


+ 8
- 1
mallinkService/src/main/java/com/iformall/common/GlobalDefultExceptionHandler.java Просмотреть файл

@@ -3,6 +3,7 @@ package com.iformall.common;

import com.iformall.exception.MallinkException;
import com.iformall.service.MailService;
import org.apache.shiro.authz.AuthorizationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -63,7 +64,9 @@ public class GlobalDefultExceptionHandler {
if(checkExceptionType(e)) {
MallinkException me = (MallinkException)e;
return new ResultData(me.getErrorCode(),me.getMessage());
}else {
} else if(checkAuthException(e)) {
return new ResultData(ErrorCode.SYS_AUTH_ERROR);
} else {
return new ResultData(Result.ERROR, e.getMessage());
}
}
@@ -106,4 +109,8 @@ public class GlobalDefultExceptionHandler {
}
return false;
}

private boolean checkAuthException(Exception e) {
return e instanceof AuthorizationException;
}
}

+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/po/InvestCustomerEntity.java Просмотреть файл

@@ -10,6 +10,7 @@ import com.iformall.enums.EnumCustomerRatingType;
import com.iformall.enums.EnumCustomerType;
import com.iformall.enums.EnumInvestChannel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

@@ -22,6 +23,7 @@ import java.util.Date;
*/
@Data
@TableName("invest_customer")
@EqualsAndHashCode(callSuper = true)
public class InvestCustomerEntity extends InvestBaseEntity {

/**


+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/po/InvestDemandEntity.java Просмотреть файл

@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.iformall.common.LogColumn;
import com.iformall.enums.EnumInvestType;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

@@ -20,6 +21,7 @@ import java.util.Date;
*/
@Data
@TableName("invest_demand")
@EqualsAndHashCode(callSuper = true)
public class InvestDemandEntity extends InvestBaseEntity {

/**


+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/po/InvestFollowRecordEntity.java Просмотреть файл

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableName;

import com.iformall.enums.EnumFollowType;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
* 跟踪记录
@@ -15,6 +16,7 @@ import lombok.Data;
*/
@Data
@TableName("invest_follow_record")
@EqualsAndHashCode(callSuper = true)
public class InvestFollowRecordEntity extends InvestBaseEntity {

/**


+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/po/InvestOperateRecordEntity.java Просмотреть файл

@@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.iformall.enums.EnumTableOperateType;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
* 操作记录
@@ -19,6 +20,7 @@ import lombok.Data;
*/
@Data
@TableName("invest_operate_record")
@EqualsAndHashCode(callSuper = true)
public class InvestOperateRecordEntity extends InvestBaseEntity {

/**


+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/po/InvestRemindEntity.java Просмотреть файл

@@ -6,6 +6,7 @@ import java.util.Date;

import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.EqualsAndHashCode;

/**
* 招商提醒
@@ -16,6 +17,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
*/
@Data
@TableName("invest_remind")
@EqualsAndHashCode(callSuper = true)
public class InvestRemindEntity extends InvestBaseEntity {

/**


+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/po/InvestTaskEntity.java Просмотреть файл

@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.iformall.enums.EnumInvestType;
import com.iformall.enums.EnumTaskStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

@@ -20,6 +21,7 @@ import java.util.Date;
*/
@Data
@TableName("invest_task")
@EqualsAndHashCode(callSuper = true)
public class InvestTaskEntity extends InvestBaseEntity {

/**


+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestTaskVo.java Просмотреть файл

@@ -4,11 +4,13 @@ import com.iformall.domain.po.InvestTaskEntity;
import com.iformall.domain.po.MallUserInfo;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@Data
@Builder
@EqualsAndHashCode(callSuper = true)
public class InvestTaskVo<T> extends InvestTaskEntity {

/**


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

@@ -21,7 +21,7 @@ public interface InvestBizService {

boolean saveCustomerAndDemand(InvestDemandDto customerDemandDto) ;

boolean updateCustomerAndDemand(InvestDemandVo customerDemandVo) ;
boolean updateCustomerAndDemand(InvestDemandDto demandDto) ;

InvestDemandVo findDemandById(Long id) ;



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

@@ -129,10 +129,10 @@ public class InvestBizServiceImpl implements InvestBizService {

@Transactional(rollbackFor = Exception.class)
@Override
public boolean saveCustomerAndDemand(InvestDemandDto customerDemandDto) {
InvestHelper.allNotNull(customerDemandDto, customerDemandDto.getCustomerId());
InvestCustomerEntity customerEntity = customerDemandDto.getCustomer();
InvestCustomerEntity customerEntityDB = customerService.getById(customerDemandDto.getCustomerId());
public boolean saveCustomerAndDemand(InvestDemandDto demandDto) {
InvestHelper.allNotNull(demandDto, demandDto.getCustomerId());
InvestCustomerEntity customerEntity = demandDto.getCustomer();
InvestCustomerEntity customerEntityDB = customerService.getById(demandDto.getCustomerId());
if (Objects.nonNull(customerEntity)) {
if (Objects.isNull(customerEntityDB)) {
customerService.save(customerEntity);
@@ -141,19 +141,19 @@ public class InvestBizServiceImpl implements InvestBizService {
}
}
InvestDemandEntity demandEntity = new InvestDemandEntity();
BeanUtils.copyProperties(customerDemandDto, demandEntity);
BeanUtils.copyProperties(demandDto, demandEntity);
return demandService.save(demandEntity);
}

@Transactional(rollbackFor = Exception.class)
@Override
public boolean updateCustomerAndDemand(InvestDemandVo customerDemandVo) {
InvestHelper.allNotNull(customerDemandVo);
InvestHelper.allNotNull(customerDemandVo.getBrand(), customerDemandVo.getCustomer());
InvestCustomerEntity customerEntity = customerDemandVo.getCustomer();
public boolean updateCustomerAndDemand(InvestDemandDto demandDto) {
InvestHelper.allNotNull(demandDto, demandDto.getCustomerId());
InvestCustomerEntity customerEntity = demandDto.getCustomer();
InvestHelper.allNotNull(customerEntity);
customerService.updateById(customerEntity);
InvestDemandEntity demandEntity = new InvestDemandEntity();
BeanUtils.copyProperties(customerDemandVo, demandEntity);
BeanUtils.copyProperties(demandDto, demandEntity);
return demandService.updateById(demandEntity);
}



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