删除逻辑改为逻辑删除,新增后台相关查询接口。
parent
a4752c5955
commit
7347a9c4e4
|
|
@ -2,16 +2,12 @@ package com.cpxt.web.controller.biz;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpxt.common.constant.HttpStatus;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.cpxt.common.annotation.Log;
|
import com.cpxt.common.annotation.Log;
|
||||||
import com.cpxt.common.core.controller.BaseController;
|
import com.cpxt.common.core.controller.BaseController;
|
||||||
import com.cpxt.common.core.domain.AjaxResult;
|
import com.cpxt.common.core.domain.AjaxResult;
|
||||||
|
|
@ -35,15 +31,31 @@ public class BizCarController extends BaseController
|
||||||
private IBizCarService bizCarService;
|
private IBizCarService bizCarService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询车辆列表
|
* 查询车辆列表(分页)
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('biz:car:list')")
|
@PreAuthorize("@ss.hasPermi('biz:car:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(BizCar bizCar)
|
public TableDataInfo list(BizCar bizCar,
|
||||||
|
@RequestParam(defaultValue = "1") int pageNum,
|
||||||
|
@RequestParam(defaultValue = "10") int pageSize)
|
||||||
{
|
{
|
||||||
startPage();
|
Page<BizCar> recordPage = bizCarService.selectBizCarPage(bizCar,pageNum,pageSize);
|
||||||
List<BizCar> list = bizCarService.selectBizCarList(bizCar);
|
TableDataInfo rspData = new TableDataInfo();
|
||||||
return getDataTable(list);
|
rspData.setCode(HttpStatus.SUCCESS);
|
||||||
|
rspData.setMsg("查询成功");
|
||||||
|
rspData.setRows(recordPage.getRecords());
|
||||||
|
rspData.setTotal(recordPage.getTotal());
|
||||||
|
return rspData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车辆列表(分页)
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biz:car:list')")
|
||||||
|
@GetMapping("/list2")
|
||||||
|
public AjaxResult list2(BizCar bizCar)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(bizCarService.selectBizCarList(bizCar));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,12 @@ package com.cpxt.web.controller.biz;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpxt.common.constant.HttpStatus;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.cpxt.common.annotation.Log;
|
import com.cpxt.common.annotation.Log;
|
||||||
import com.cpxt.common.core.controller.BaseController;
|
import com.cpxt.common.core.controller.BaseController;
|
||||||
import com.cpxt.common.core.domain.AjaxResult;
|
import com.cpxt.common.core.domain.AjaxResult;
|
||||||
|
|
@ -35,15 +31,31 @@ public class BizCarModelController extends BaseController
|
||||||
private IBizCarModelService bizCarModelService;
|
private IBizCarModelService bizCarModelService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询车型列表
|
* 查询车型列表(分页)
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('biz:model:list')")
|
@PreAuthorize("@ss.hasPermi('biz:model:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(BizCarModel bizCarModel)
|
public TableDataInfo list(BizCarModel bizCarModel,
|
||||||
|
@RequestParam(defaultValue = "1") int pageNum,
|
||||||
|
@RequestParam(defaultValue = "10") int pageSize)
|
||||||
{
|
{
|
||||||
startPage();
|
Page<BizCarModel> recordPage = bizCarModelService.selectBizCarModelPage(bizCarModel,pageNum,pageSize);
|
||||||
List<BizCarModel> list = bizCarModelService.selectBizCarModelList(bizCarModel);
|
TableDataInfo rspData = new TableDataInfo();
|
||||||
return getDataTable(list);
|
rspData.setCode(HttpStatus.SUCCESS);
|
||||||
|
rspData.setMsg("查询成功");
|
||||||
|
rspData.setRows(recordPage.getRecords());
|
||||||
|
rspData.setTotal(recordPage.getTotal());
|
||||||
|
return rspData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车型列表(不分页)
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('biz:model:list')")
|
||||||
|
@GetMapping("/list2")
|
||||||
|
public AjaxResult list2(BizCarModel bizCarModel)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(bizCarModelService.selectBizCarModelList(bizCarModel));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,9 @@ mybatis-plus:
|
||||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||||
# 加载全局的配置文件
|
# 加载全局的配置文件
|
||||||
configLocation: classpath:mybatis/mybatis-config.xml
|
configLocation: classpath:mybatis/mybatis-config.xml
|
||||||
|
global-config:
|
||||||
|
db-config:
|
||||||
|
id-type: auto
|
||||||
|
|
||||||
# PageHelper分页插件
|
# PageHelper分页插件
|
||||||
pagehelper:
|
pagehelper:
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,12 @@
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>5.5.7</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -37,6 +37,10 @@ public class SysUser extends BaseEntity
|
||||||
@Excel(name = "用户名称")
|
@Excel(name = "用户名称")
|
||||||
private String nickName;
|
private String nickName;
|
||||||
|
|
||||||
|
/** 用户类型 */
|
||||||
|
@Excel(name = "用户类型")
|
||||||
|
private String userType;
|
||||||
|
|
||||||
/** 用户邮箱 */
|
/** 用户邮箱 */
|
||||||
@Excel(name = "用户邮箱")
|
@Excel(name = "用户邮箱")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
@ -154,6 +158,15 @@ public class SysUser extends BaseEntity
|
||||||
this.userName = userName;
|
this.userName = userName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUserType() {
|
||||||
|
return userType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserType(String userType) {
|
||||||
|
this.userType = userType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Email(message = "邮箱格式不正确")
|
@Email(message = "邮箱格式不正确")
|
||||||
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
|
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
|
||||||
public String getEmail()
|
public String getEmail()
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,8 @@
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" class="mm-btn" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" class="mm-btn" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
|
@ -71,9 +71,8 @@
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
class="mm-btn"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['${moduleName}:${businessName}:add']"
|
v-hasPermi="['${moduleName}:${businessName}:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
|
|
@ -101,11 +100,9 @@
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button style="color: #2d8cf0; border: 1px solid #2d8cf0"
|
||||||
type="warning"
|
class="mm-btn"
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['${moduleName}:${businessName}:export']"
|
v-hasPermi="['${moduleName}:${businessName}:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ package com.cpxt.biz.domain;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import com.cpxt.common.annotation.Excel;
|
import com.cpxt.common.annotation.Excel;
|
||||||
import com.cpxt.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@ public class BizDriver
|
||||||
@Excel(name = "部门ID")
|
@Excel(name = "部门ID")
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
|
/** 部门名称 */
|
||||||
|
@Excel(name = "部门名称")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
/** 用户ID */
|
/** 用户ID */
|
||||||
@Excel(name = "用户ID")
|
@Excel(name = "用户ID")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.cpxt.biz.service;
|
package com.cpxt.biz.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.cpxt.biz.domain.BizCarModel;
|
import com.cpxt.biz.domain.BizCarModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -19,6 +21,15 @@ public interface IBizCarModelService
|
||||||
*/
|
*/
|
||||||
public BizCarModel selectBizCarModelById(Long id);
|
public BizCarModel selectBizCarModelById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车型列表
|
||||||
|
*
|
||||||
|
* @param bizCarModel 车型
|
||||||
|
* @return 车型集合
|
||||||
|
*/
|
||||||
|
public Page<BizCarModel> selectBizCarModelPage(BizCarModel bizCarModel,int pageNum, int pageSize);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询车型列表
|
* 查询车型列表
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.cpxt.biz.service;
|
package com.cpxt.biz.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.cpxt.biz.domain.BizCar;
|
import com.cpxt.biz.domain.BizCar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -58,4 +60,7 @@ public interface IBizCarService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteBizCarById(Long id);
|
public int deleteBizCarById(Long id);
|
||||||
|
|
||||||
|
Page<BizCar> selectBizCarPage(BizCar bizCar,int pageNum,int pageSize);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,11 @@ package com.cpxt.biz.service.impl;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpxt.biz.domain.BizCar;
|
||||||
import com.cpxt.common.utils.DateUtils;
|
import com.cpxt.common.utils.DateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -35,6 +39,30 @@ public class BizCarModelServiceImpl implements IBizCarModelService
|
||||||
return bizCarModelMapper.selectById(id);
|
return bizCarModelMapper.selectById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车型列表
|
||||||
|
*
|
||||||
|
* @param bizCarModel 车型
|
||||||
|
* @return 车型
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Page<BizCarModel> selectBizCarModelPage(BizCarModel bizCarModel, int pageNum, int pageSize)
|
||||||
|
{
|
||||||
|
LambdaQueryWrapper<BizCarModel> queryWrapper = buildQueryWrapper(bizCarModel);
|
||||||
|
return bizCarModelMapper.selectPage(new Page<BizCarModel>(pageNum,pageSize),queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BizCarModel> buildQueryWrapper(BizCarModel bizCarModel) {
|
||||||
|
LambdaQueryWrapper<BizCarModel> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
if (ObjectUtil.isNotEmpty(bizCarModel.getBrand())) {
|
||||||
|
queryWrapper.like(BizCarModel::getBrand, bizCarModel.getBrand());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(bizCarModel.getName())) {
|
||||||
|
queryWrapper.like(BizCarModel::getName, bizCarModel.getName());
|
||||||
|
}
|
||||||
|
return queryWrapper;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询车型列表
|
* 查询车型列表
|
||||||
*
|
*
|
||||||
|
|
@ -44,8 +72,7 @@ public class BizCarModelServiceImpl implements IBizCarModelService
|
||||||
@Override
|
@Override
|
||||||
public List<BizCarModel> selectBizCarModelList(BizCarModel bizCarModel)
|
public List<BizCarModel> selectBizCarModelList(BizCarModel bizCarModel)
|
||||||
{
|
{
|
||||||
LambdaQueryWrapper<BizCarModel> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BizCarModel> queryWrapper = buildQueryWrapper(bizCarModel);
|
||||||
|
|
||||||
return bizCarModelMapper.selectList(queryWrapper);
|
return bizCarModelMapper.selectList(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -82,7 +109,10 @@ public class BizCarModelServiceImpl implements IBizCarModelService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCarModelByIds(Long[] ids)
|
public int deleteBizCarModelByIds(Long[] ids)
|
||||||
{
|
{
|
||||||
return bizCarModelMapper.deleteBatchIds(Arrays.asList(ids));
|
UpdateWrapper<BizCarModel> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.in("id", (Object) ids);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCarModelMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -94,6 +124,9 @@ public class BizCarModelServiceImpl implements IBizCarModelService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCarModelById(Long id)
|
public int deleteBizCarModelById(Long id)
|
||||||
{
|
{
|
||||||
return bizCarModelMapper.deleteById(id);
|
UpdateWrapper<BizCarModel> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("id", id);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCarModelMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,10 @@ package com.cpxt.biz.service.impl;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.cpxt.common.utils.DateUtils;
|
import com.cpxt.common.utils.DateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -35,6 +38,39 @@ public class BizCarServiceImpl implements IBizCarService
|
||||||
return bizCarMapper.selectById(id);
|
return bizCarMapper.selectById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车辆列表(分页)
|
||||||
|
*
|
||||||
|
* @param bizCar 车辆
|
||||||
|
* @return 车辆
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Page<BizCar> selectBizCarPage(BizCar bizCar,int pageNum,int pageSize)
|
||||||
|
{
|
||||||
|
LambdaQueryWrapper<BizCar> queryWrapper = buildQueryWrapper(bizCar);
|
||||||
|
return bizCarMapper.selectPage(new Page<BizCar>(pageNum,pageSize),queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BizCar> buildQueryWrapper(BizCar bizCar) {
|
||||||
|
LambdaQueryWrapper<BizCar> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
if (ObjectUtil.isNotEmpty(bizCar.getModelName())) {
|
||||||
|
queryWrapper.like(BizCar::getModelName, bizCar.getModelName());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(bizCar.getCarType())) {
|
||||||
|
queryWrapper.eq(BizCar::getCarType, bizCar.getCarType());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(bizCar.getCarNo())) {
|
||||||
|
queryWrapper.like(BizCar::getCarNo, bizCar.getCarNo());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(bizCar.getVin())) {
|
||||||
|
queryWrapper.like(BizCar::getVin, bizCar.getVin());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(bizCar.getSerialNo())) {
|
||||||
|
queryWrapper.like(BizCar::getSerialNo, bizCar.getSerialNo());
|
||||||
|
}
|
||||||
|
return queryWrapper;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询车辆列表
|
* 查询车辆列表
|
||||||
*
|
*
|
||||||
|
|
@ -44,8 +80,7 @@ public class BizCarServiceImpl implements IBizCarService
|
||||||
@Override
|
@Override
|
||||||
public List<BizCar> selectBizCarList(BizCar bizCar)
|
public List<BizCar> selectBizCarList(BizCar bizCar)
|
||||||
{
|
{
|
||||||
LambdaQueryWrapper<BizCar> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BizCar> queryWrapper = buildQueryWrapper(bizCar);
|
||||||
|
|
||||||
return bizCarMapper.selectList(queryWrapper);
|
return bizCarMapper.selectList(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -82,7 +117,10 @@ public class BizCarServiceImpl implements IBizCarService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCarByIds(Long[] ids)
|
public int deleteBizCarByIds(Long[] ids)
|
||||||
{
|
{
|
||||||
return bizCarMapper.deleteBatchIds(Arrays.asList(ids));
|
UpdateWrapper<BizCar> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.in("id", (Object) ids);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCarMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -94,6 +132,9 @@ public class BizCarServiceImpl implements IBizCarService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCarById(Long id)
|
public int deleteBizCarById(Long id)
|
||||||
{
|
{
|
||||||
return bizCarMapper.deleteById(id);
|
UpdateWrapper<BizCar> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("id",id);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCarMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.cpxt.biz.domain.BizCustomer;
|
||||||
import com.cpxt.common.utils.DateUtils;
|
import com.cpxt.common.utils.DateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -82,7 +84,10 @@ public class BizCustomerRouteServiceImpl implements IBizCustomerRouteService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCustomerRouteByIds(Long[] ids)
|
public int deleteBizCustomerRouteByIds(Long[] ids)
|
||||||
{
|
{
|
||||||
return bizCustomerRouteMapper.deleteBatchIds(Arrays.asList(ids));
|
UpdateWrapper<BizCustomerRoute> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.in("id", (Object) ids);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCustomerRouteMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -94,6 +99,9 @@ public class BizCustomerRouteServiceImpl implements IBizCustomerRouteService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCustomerRouteById(Long id)
|
public int deleteBizCustomerRouteById(Long id)
|
||||||
{
|
{
|
||||||
return bizCustomerRouteMapper.deleteById(id);
|
UpdateWrapper<BizCustomerRoute> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("id", id);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCustomerRouteMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.cpxt.biz.domain.BizCarModel;
|
||||||
import com.cpxt.common.utils.DateUtils;
|
import com.cpxt.common.utils.DateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -82,7 +84,10 @@ public class BizCustomerServiceImpl implements IBizCustomerService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCustomerByIds(Long[] ids)
|
public int deleteBizCustomerByIds(Long[] ids)
|
||||||
{
|
{
|
||||||
return bizCustomerMapper.deleteBatchIds(Arrays.asList(ids));
|
UpdateWrapper<BizCustomer> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.in("id", (Object) ids);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCustomerMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -94,6 +99,9 @@ public class BizCustomerServiceImpl implements IBizCustomerService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCustomerById(Long id)
|
public int deleteBizCustomerById(Long id)
|
||||||
{
|
{
|
||||||
return bizCustomerMapper.deleteById(id);
|
UpdateWrapper<BizCustomer> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("id",id);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCustomerMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.cpxt.biz.domain.BizCustomerRoute;
|
||||||
import com.cpxt.common.utils.DateUtils;
|
import com.cpxt.common.utils.DateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -81,7 +83,10 @@ public class BizCustomerShopServiceImpl implements IBizCustomerShopService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCustomerShopByIds(Long[] ids)
|
public int deleteBizCustomerShopByIds(Long[] ids)
|
||||||
{
|
{
|
||||||
return bizCustomerShopMapper.deleteBatchIds(Arrays.asList(ids));
|
UpdateWrapper<BizCustomerShop> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.in("id", (Object) ids);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCustomerShopMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -93,6 +98,9 @@ public class BizCustomerShopServiceImpl implements IBizCustomerShopService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCustomerShopById(Long id)
|
public int deleteBizCustomerShopById(Long id)
|
||||||
{
|
{
|
||||||
return bizCustomerShopMapper.deleteById(id);
|
UpdateWrapper<BizCustomerShop> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("id", id);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCustomerShopMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.cpxt.biz.domain.BizCustomerShop;
|
||||||
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 com.cpxt.biz.mapper.BizCustomerUserMapper;
|
import com.cpxt.biz.mapper.BizCustomerUserMapper;
|
||||||
|
|
@ -80,7 +82,10 @@ public class BizCustomerUserServiceImpl implements IBizCustomerUserService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCustomerUserByIds(Long[] ids)
|
public int deleteBizCustomerUserByIds(Long[] ids)
|
||||||
{
|
{
|
||||||
return bizCustomerUserMapper.deleteBatchIds(Arrays.asList(ids));
|
UpdateWrapper<BizCustomerUser> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.in("id", (Object) ids);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCustomerUserMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -92,6 +97,9 @@ public class BizCustomerUserServiceImpl implements IBizCustomerUserService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCustomerUserById(Long id)
|
public int deleteBizCustomerUserById(Long id)
|
||||||
{
|
{
|
||||||
return bizCustomerUserMapper.deleteById(id);
|
UpdateWrapper<BizCustomerUser> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("id", id);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCustomerUserMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.cpxt.biz.domain.BizCustomerUser;
|
||||||
import com.cpxt.common.utils.DateUtils;
|
import com.cpxt.common.utils.DateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -82,7 +84,10 @@ public class BizCustomerWarehouseServiceImpl implements IBizCustomerWarehouseSer
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCustomerWarehouseByIds(Long[] ids)
|
public int deleteBizCustomerWarehouseByIds(Long[] ids)
|
||||||
{
|
{
|
||||||
return bizCustomerWarehouseMapper.deleteBatchIds(Arrays.asList(ids));
|
UpdateWrapper<BizCustomerWarehouse> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.in("id", (Object) ids);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCustomerWarehouseMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -94,6 +99,9 @@ public class BizCustomerWarehouseServiceImpl implements IBizCustomerWarehouseSer
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizCustomerWarehouseById(Long id)
|
public int deleteBizCustomerWarehouseById(Long id)
|
||||||
{
|
{
|
||||||
return bizCustomerWarehouseMapper.deleteById(id);
|
UpdateWrapper<BizCustomerWarehouse> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("id", id);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizCustomerWarehouseMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,17 @@ package com.cpxt.biz.service.impl;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.cpxt.biz.domain.BizCustomerWarehouse;
|
||||||
|
import com.cpxt.common.core.domain.entity.SysDept;
|
||||||
|
import com.cpxt.common.core.domain.entity.SysUser;
|
||||||
import com.cpxt.common.utils.DateUtils;
|
import com.cpxt.common.utils.DateUtils;
|
||||||
|
import com.cpxt.system.mapper.SysDeptMapper;
|
||||||
|
import com.cpxt.system.mapper.SysUserMapper;
|
||||||
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 com.cpxt.biz.mapper.BizDriverMapper;
|
import com.cpxt.biz.mapper.BizDriverMapper;
|
||||||
|
|
@ -23,6 +31,12 @@ public class BizDriverServiceImpl implements IBizDriverService
|
||||||
@Autowired
|
@Autowired
|
||||||
private BizDriverMapper bizDriverMapper;
|
private BizDriverMapper bizDriverMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysUserMapper sysUserMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysDeptMapper sysDeptMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询司机
|
* 查询司机
|
||||||
*
|
*
|
||||||
|
|
@ -44,11 +58,33 @@ public class BizDriverServiceImpl implements IBizDriverService
|
||||||
@Override
|
@Override
|
||||||
public List<BizDriver> selectBizDriverList(BizDriver bizDriver)
|
public List<BizDriver> selectBizDriverList(BizDriver bizDriver)
|
||||||
{
|
{
|
||||||
LambdaQueryWrapper<BizDriver> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BizDriver> queryWrapper = buildQueryWrapper(bizDriver);
|
||||||
|
|
||||||
return bizDriverMapper.selectList(queryWrapper);
|
return bizDriverMapper.selectList(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BizDriver> buildQueryWrapper(BizDriver bizDriver) {
|
||||||
|
LambdaQueryWrapper<BizDriver> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
if (ObjectUtil.isNotEmpty(bizDriver.getDeptId())){
|
||||||
|
queryWrapper.in(BizDriver::getDeptId,sysDeptMapper.selectChildrenDeptById(bizDriver.getDeptId()).stream().map(SysDept::getDeptId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(bizDriver.getName())){
|
||||||
|
queryWrapper.like(BizDriver::getName, bizDriver.getName());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(bizDriver.getIdcard())){
|
||||||
|
queryWrapper.like(BizDriver::getIdcard, bizDriver.getIdcard());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(bizDriver.getGender())){
|
||||||
|
queryWrapper.eq(BizDriver::getGender, bizDriver.getGender());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(bizDriver.getPhone())){
|
||||||
|
queryWrapper.like(BizDriver::getPhone, bizDriver.getPhone());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(bizDriver.getDefaultCarNo())){
|
||||||
|
queryWrapper.like(BizDriver::getDefaultCarNo, bizDriver.getDefaultCarNo());
|
||||||
|
}
|
||||||
|
return queryWrapper;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增司机
|
* 新增司机
|
||||||
*
|
*
|
||||||
|
|
@ -58,9 +94,26 @@ public class BizDriverServiceImpl implements IBizDriverService
|
||||||
@Override
|
@Override
|
||||||
public int insertBizDriver(BizDriver bizDriver)
|
public int insertBizDriver(BizDriver bizDriver)
|
||||||
{
|
{
|
||||||
|
SysUser sysUser = new SysUser();
|
||||||
|
setSysUser(bizDriver,sysUser);
|
||||||
|
sysUserMapper.insertUser(sysUser);
|
||||||
|
|
||||||
|
bizDriver.setDeptName(sysDeptMapper.selectDeptById(bizDriver.getDeptId()).getDeptName());
|
||||||
|
bizDriver.setUserId(sysUser.getUserId());
|
||||||
return bizDriverMapper.insert(bizDriver);
|
return bizDriverMapper.insert(bizDriver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setSysUser(BizDriver bizDriver, SysUser sysUser) {
|
||||||
|
sysUser.setDeptId(bizDriver.getDeptId());
|
||||||
|
sysUser.setUserName(bizDriver.getPhone());
|
||||||
|
sysUser.setNickName(bizDriver.getName());
|
||||||
|
sysUser.setUserType("1"); // 司机
|
||||||
|
sysUser.setPhonenumber(bizDriver.getPhone());
|
||||||
|
sysUser.setSex(bizDriver.getGender());
|
||||||
|
sysUser.setAvatar(bizDriver.getPhoto());
|
||||||
|
sysUser.setPassword(bizDriver.getIdcard().substring(12,18)); // 340123199906222873
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改司机
|
* 修改司机
|
||||||
*
|
*
|
||||||
|
|
@ -82,7 +135,10 @@ public class BizDriverServiceImpl implements IBizDriverService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizDriverByIds(Long[] ids)
|
public int deleteBizDriverByIds(Long[] ids)
|
||||||
{
|
{
|
||||||
return bizDriverMapper.deleteBatchIds(Arrays.asList(ids));
|
UpdateWrapper<BizDriver> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.in("id", (Object) ids);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizDriverMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -94,6 +150,9 @@ public class BizDriverServiceImpl implements IBizDriverService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizDriverById(Long id)
|
public int deleteBizDriverById(Long id)
|
||||||
{
|
{
|
||||||
return bizDriverMapper.deleteById(id);
|
UpdateWrapper<BizDriver> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("id", id);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizDriverMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.cpxt.biz.domain.BizDriver;
|
||||||
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 com.cpxt.biz.mapper.BizOrderMapper;
|
import com.cpxt.biz.mapper.BizOrderMapper;
|
||||||
|
|
@ -81,7 +83,10 @@ public class BizOrderServiceImpl implements IBizOrderService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizOrderByIds(Long[] ids)
|
public int deleteBizOrderByIds(Long[] ids)
|
||||||
{
|
{
|
||||||
return bizOrderMapper.deleteBatchIds(Arrays.asList(ids));
|
UpdateWrapper<BizOrder> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.in("id", (Object) ids);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizOrderMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -93,6 +98,9 @@ public class BizOrderServiceImpl implements IBizOrderService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizOrderById(Long id)
|
public int deleteBizOrderById(Long id)
|
||||||
{
|
{
|
||||||
return bizOrderMapper.deleteById(id);
|
UpdateWrapper<BizOrder> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("id", id);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizOrderMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.cpxt.biz.domain.BizOrder;
|
||||||
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 com.cpxt.biz.mapper.BizOrderSubMapper;
|
import com.cpxt.biz.mapper.BizOrderSubMapper;
|
||||||
|
|
@ -82,7 +84,10 @@ public class BizOrderSubServiceImpl implements IBizOrderSubService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizOrderSubByIds(Long[] ids)
|
public int deleteBizOrderSubByIds(Long[] ids)
|
||||||
{
|
{
|
||||||
return bizOrderSubMapper.deleteBatchIds(Arrays.asList(ids));
|
UpdateWrapper<BizOrderSub> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.in("id", (Object) ids);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizOrderSubMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -94,6 +99,9 @@ public class BizOrderSubServiceImpl implements IBizOrderSubService
|
||||||
@Override
|
@Override
|
||||||
public int deleteBizOrderSubById(Long id)
|
public int deleteBizOrderSubById(Long id)
|
||||||
{
|
{
|
||||||
return bizOrderSubMapper.deleteById(id);
|
UpdateWrapper<BizOrderSub> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("id", id);
|
||||||
|
updateWrapper.set("status","2"); //状态改为删除
|
||||||
|
return bizOrderSubMapper.update(null,updateWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="deptId" column="dept_id" />
|
<result property="deptId" column="dept_id" />
|
||||||
<result property="userName" column="user_name" />
|
<result property="userName" column="user_name" />
|
||||||
<result property="nickName" column="nick_name" />
|
<result property="nickName" column="nick_name" />
|
||||||
|
<result property="userType" column="user_type" />
|
||||||
<result property="email" column="email" />
|
<result property="email" column="email" />
|
||||||
<result property="phonenumber" column="phonenumber" />
|
<result property="phonenumber" column="phonenumber" />
|
||||||
<result property="sex" column="sex" />
|
<result property="sex" column="sex" />
|
||||||
|
|
@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectUserVo">
|
<sql id="selectUserVo">
|
||||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
select u.user_id, u.dept_id, u.user_name, u.nick_name,u.user_type, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||||
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
||||||
from sys_user u
|
from sys_user u
|
||||||
|
|
@ -57,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
select u.user_id, u.dept_id, u.nick_name, u.user_name,user_type, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
where u.del_flag = '0'
|
where u.del_flag = '0'
|
||||||
<if test="userId != null and userId != 0">
|
<if test="userId != null and userId != 0">
|
||||||
|
|
@ -86,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,user_type, u.email, u.phonenumber, u.status, u.create_time
|
||||||
from sys_user u
|
from sys_user u
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
left join sys_user_role ur on u.user_id = ur.user_id
|
left join sys_user_role ur on u.user_id = ur.user_id
|
||||||
|
|
@ -103,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,user_type, u.email, u.phonenumber, u.status, u.create_time
|
||||||
from sys_user u
|
from sys_user u
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
left join sys_user_role ur on u.user_id = ur.user_id
|
left join sys_user_role ur on u.user_id = ur.user_id
|
||||||
|
|
@ -148,6 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||||
<if test="userName != null and userName != ''">user_name,</if>
|
<if test="userName != null and userName != ''">user_name,</if>
|
||||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||||
|
<if test="userType != null and userType != ''">user_type,</if>
|
||||||
<if test="email != null and email != ''">email,</if>
|
<if test="email != null and email != ''">email,</if>
|
||||||
<if test="avatar != null and avatar != ''">avatar,</if>
|
<if test="avatar != null and avatar != ''">avatar,</if>
|
||||||
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
|
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
|
||||||
|
|
@ -162,6 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||||
<if test="userName != null and userName != ''">#{userName},</if>
|
<if test="userName != null and userName != ''">#{userName},</if>
|
||||||
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
||||||
|
<if test="userType != null and userType != ''">#{userType},</if>
|
||||||
<if test="email != null and email != ''">#{email},</if>
|
<if test="email != null and email != ''">#{email},</if>
|
||||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||||
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
||||||
|
|
@ -180,6 +183,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||||
|
<if test="userType != null and userType != ''">user_type = #{userType},</if>
|
||||||
<if test="email != null ">email = #{email},</if>
|
<if test="email != null ">email = #{email},</if>
|
||||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
||||||
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue