bug
This commit is contained in:
parent
7293a918a5
commit
b50287eaba
@ -117,6 +117,8 @@ public class CardFuelDieselController extends BaseController {
|
|||||||
@PutMapping
|
@PutMapping
|
||||||
public ResponseObject update(@RequestBody CardFuelDiesel cardFuelDiesel) {
|
public ResponseObject update(@RequestBody CardFuelDiesel cardFuelDiesel) {
|
||||||
cardFuelDiesel.setStatus(cardFuelDiesel.getStatus().equals("true") ? "1" : "2");
|
cardFuelDiesel.setStatus(cardFuelDiesel.getStatus().equals("true") ? "1" : "2");
|
||||||
|
String substring = cardFuelDiesel.getType().substring(0, 3);
|
||||||
|
cardFuelDiesel.setType(substring);
|
||||||
return getSuccessResult(this.cardFuelDieselService.updateById(cardFuelDiesel));
|
return getSuccessResult(this.cardFuelDieselService.updateById(cardFuelDiesel));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ public class CardFuelDieselServiceImpl extends ServiceImpl<CardFuelDieselMapper,
|
|||||||
//构建查询条件
|
//构建查询条件
|
||||||
LambdaQueryWrapper<CardFuelDiesel> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CardFuelDiesel> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
if(ObjectUtils.isNotEmpty(cardFuelDiesel.getOilType())){
|
if(ObjectUtils.isNotEmpty(cardFuelDiesel.getOilType())){
|
||||||
queryWrapper.eq(CardFuelDiesel::getOilType,cardFuelDiesel.getOilType());
|
queryWrapper.like(CardFuelDiesel::getOilType,cardFuelDiesel.getOilType());
|
||||||
}
|
}
|
||||||
if (ObjectUtils.isNotEmpty(cardFuelDiesel.getActiveStatus())){
|
if (ObjectUtils.isNotEmpty(cardFuelDiesel.getActiveStatus())){
|
||||||
queryWrapper.eq(CardFuelDiesel::getActiveStatus,cardFuelDiesel.getActiveStatus());
|
queryWrapper.eq(CardFuelDiesel::getActiveStatus,cardFuelDiesel.getActiveStatus());
|
||||||
|
Loading…
Reference in New Issue
Block a user