Browse Source

更新河道

master
牧羊人 4 years ago
parent
commit
051af07611
6 changed files with 20 additions and 15 deletions
  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 View File

/** /**
* 河长 * 河长
*/ */
@NotEmpty(message = "河长不能为空")
@Length(min = 2, max = 30, message = "河长长度为2-30个字")
@NotNull(message = "河长不能为空")
private Integer driverManager; private Integer driverManager;


/** /**

+ 13
- 7
src/main/java/com/taauav/admin/service/impl/TauvDriverServiceImpl.java View File

String cityName = cityService.getCityName(item.getDriverArea()); String cityName = cityService.getCityName(item.getDriverArea());
driverListVo.setDriverAreaName(cityName); 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); driverListVoList.add(driverListVo);
}); });
} }
*/ */
@Override @Override
public Response add(TauvDriver driver) { public Response add(TauvDriver driver) {
if (driver == null || driver.getId() == 0) {
return response.failure("实体对象不存在");
}
String name = driver.getName(); String name = driver.getName();
TauvDriver info = getInfoByName(name); TauvDriver info = getInfoByName(name);
if (!StringUtils.isEmpty(info)) { if (!StringUtils.isEmpty(info)) {
String cityName = cityService.getCityName(item.getDriverArea()); String cityName = cityService.getCityName(item.getDriverArea());
driverListVo.setDriverAreaName(cityName); 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); driverListVoList.add(driverListVo);
}); });
} }

src/main/java/com/taauav/front/controller/LsLoginController.java → src/main/java/com/taauav/front/controller/LSLoginController.java View File



import com.taauav.common.bean.Response; import com.taauav.common.bean.Response;
import com.taauav.front.dto.LoginDto; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;


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


@Autowired @Autowired
private ILsLoginService loginService;
private ILSLoginService loginService;


@Autowired @Autowired
private Response response; private Response response;

src/main/java/com/taauav/front/mapper/TauvReportMapper.xml → src/main/java/com/taauav/front/mapper/LSReportMapper.xml View File


src/main/java/com/taauav/front/service/ILsLoginService.java → src/main/java/com/taauav/front/service/ILSLoginService.java View File

* @author dyg * @author dyg
* @since 2020-04-01 * @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 View File

import com.taauav.front.dto.LoginDto; import com.taauav.front.dto.LoginDto;
import com.taauav.admin.entity.LsAdmin; import com.taauav.admin.entity.LsAdmin;
import com.taauav.admin.mapper.LsAdminMapper; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;


* @since 2020-04-01 * @since 2020-04-01
*/ */
@Service @Service
public class LsLoginServiceImpl extends ServiceImpl<LsAdminMapper, LsAdmin> implements ILsLoginService {
public class LSLoginServiceImpl extends ServiceImpl<LsAdminMapper, LsAdmin> implements ILSLoginService {


@Autowired @Autowired
private Response response; private Response response;

Loading…
Cancel
Save