Ver código fonte

更新河道

master
牧羊人 4 anos atrás
pai
commit
051af07611
6 arquivos alterados com 20 adições e 15 exclusões
  1. +1
    -2
      src/main/java/com/taauav/admin/entity/TauvDriver.java
  2. +13
    -7
      src/main/java/com/taauav/admin/service/impl/TauvDriverServiceImpl.java
  3. +3
    -3
      src/main/java/com/taauav/front/controller/LSLoginController.java
  4. +0
    -0
      src/main/java/com/taauav/front/mapper/LSReportMapper.xml
  5. +1
    -1
      src/main/java/com/taauav/front/service/ILSLoginService.java
  6. +2
    -2
      src/main/java/com/taauav/front/service/impl/LSLoginServiceImpl.java

+ 1
- 2
src/main/java/com/taauav/admin/entity/TauvDriver.java Ver arquivo

@@ -59,8 +59,7 @@ public class TauvDriver extends Entity {
/**
* 河长
*/
@NotEmpty(message = "河长不能为空")
@Length(min = 2, max = 30, message = "河长长度为2-30个字")
@NotNull(message = "河长不能为空")
private Integer driverManager;

/**

+ 13
- 7
src/main/java/com/taauav/admin/service/impl/TauvDriverServiceImpl.java Ver arquivo

@@ -89,8 +89,12 @@ public class TauvDriverServiceImpl extends BaseServiceImpl<TauvDriverMapper, Tau
String cityName = cityService.getCityName(item.getDriverArea());
driverListVo.setDriverAreaName(cityName);
// 河长名称
LsAdmin lsAdmin = lsAdminMapper.selectById(item.getDriverManager());
driverListVo.setDriverManagerName(lsAdmin.getRealname());
if (item.getDriverManager() != null && item.getDriverManager() > 0) {
LsAdmin lsAdmin = lsAdminMapper.selectById(item.getDriverManager());
if (lsAdmin != null) {
driverListVo.setDriverManagerName(lsAdmin.getRealname());
}
}
driverListVoList.add(driverListVo);
});
}
@@ -135,9 +139,6 @@ public class TauvDriverServiceImpl extends BaseServiceImpl<TauvDriverMapper, Tau
*/
@Override
public Response add(TauvDriver driver) {
if (driver == null || driver.getId() == 0) {
return response.failure("实体对象不存在");
}
String name = driver.getName();
TauvDriver info = getInfoByName(name);
if (!StringUtils.isEmpty(info)) {
@@ -269,8 +270,13 @@ public class TauvDriverServiceImpl extends BaseServiceImpl<TauvDriverMapper, Tau
String cityName = cityService.getCityName(item.getDriverArea());
driverListVo.setDriverAreaName(cityName);
// 河长名称
LsAdmin lsAdmin = lsAdminMapper.selectById(item.getDriverManager());
driverListVo.setDriverManagerName(lsAdmin.getRealname());
// 河长名称
if (item.getDriverManager() != null && item.getDriverManager() > 0) {
LsAdmin lsAdmin = lsAdminMapper.selectById(item.getDriverManager());
if (lsAdmin != null) {
driverListVo.setDriverManagerName(lsAdmin.getRealname());
}
}
driverListVoList.add(driverListVo);
});
}

src/main/java/com/taauav/front/controller/LsLoginController.java → src/main/java/com/taauav/front/controller/LSLoginController.java Ver arquivo

@@ -2,7 +2,7 @@ package com.taauav.front.controller;

import com.taauav.common.bean.Response;
import com.taauav.front.dto.LoginDto;
import com.taauav.front.service.ILsLoginService;
import com.taauav.front.service.ILSLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -11,10 +11,10 @@ import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/front/login")
public class LsLoginController extends FrontBaseController {
public class LSLoginController extends FrontBaseController {

@Autowired
private ILsLoginService loginService;
private ILSLoginService loginService;

@Autowired
private Response response;

src/main/java/com/taauav/front/mapper/TauvReportMapper.xml → src/main/java/com/taauav/front/mapper/LSReportMapper.xml Ver arquivo


src/main/java/com/taauav/front/service/ILsLoginService.java → src/main/java/com/taauav/front/service/ILSLoginService.java Ver arquivo

@@ -11,7 +11,7 @@ import com.taauav.front.dto.LoginDto;
* @author dyg
* @since 2020-04-01
*/
public interface ILsLoginService {
public interface ILSLoginService {

/**
* 系统登录

src/main/java/com/taauav/front/service/impl/LsLoginServiceImpl.java → src/main/java/com/taauav/front/service/impl/LSLoginServiceImpl.java Ver arquivo

@@ -9,7 +9,7 @@ import com.taauav.common.util.StringUtils;
import com.taauav.front.dto.LoginDto;
import com.taauav.admin.entity.LsAdmin;
import com.taauav.admin.mapper.LsAdminMapper;
import com.taauav.front.service.ILsLoginService;
import com.taauav.front.service.ILSLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@@ -25,7 +25,7 @@ import java.util.Map;
* @since 2020-04-01
*/
@Service
public class LsLoginServiceImpl extends ServiceImpl<LsAdminMapper, LsAdmin> implements ILsLoginService {
public class LSLoginServiceImpl extends ServiceImpl<LsAdminMapper, LsAdmin> implements ILSLoginService {

@Autowired
private Response response;

Carregando…
Cancelar
Salvar