feat: 类型排序增加系列批次号条件
This commit is contained in:
parent
b47600b88b
commit
68995b9f43
|
|
@ -105,10 +105,11 @@ public class ProductTypeController extends ControllerBase{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取类型列表用于排序
|
* 获取类型列表用于排序
|
||||||
|
* @param seriesNumber 系列批次号
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getTypeListForSort")
|
@GetMapping("/getTypeListForSort")
|
||||||
public ApiResult<List<ProductTypeSearchVO>> getTypeListForSort(){
|
public ApiResult<List<ProductTypeSearchVO>> getTypeListForSort(@Valid @RequestParam @NotNull String seriesNumber){
|
||||||
return ApiResult.success(productTypeService.getListForSort());
|
return ApiResult.success(productTypeService.getListForSort(seriesNumber));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -33,5 +33,5 @@ public interface ProductTypeMapper extends BaseMapper<ProductType> {
|
||||||
|
|
||||||
List<ProductTypeSimpleVO> getSimpleListByLanguage(String batchNumber, String language);
|
List<ProductTypeSimpleVO> getSimpleListByLanguage(String batchNumber, String language);
|
||||||
|
|
||||||
List<ProductTypeSearchVO> getListForSort();
|
List<ProductTypeSearchVO> getListForSort(String seriesNumber);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public interface IProductTypeService extends IService<ProductType> {
|
||||||
|
|
||||||
void deleteByParent(String name);
|
void deleteByParent(String name);
|
||||||
|
|
||||||
List<ProductTypeSearchVO> getListForSort();
|
List<ProductTypeSearchVO> getListForSort(String seriesNumber);
|
||||||
|
|
||||||
void saveSort(SortSaveRequest request);
|
void saveSort(SortSaveRequest request);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -266,8 +266,8 @@ public class ProductTypeServiceImpl extends ServiceImpl<ProductTypeMapper, Produ
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProductTypeSearchVO> getListForSort() {
|
public List<ProductTypeSearchVO> getListForSort(String seriesNumber) {
|
||||||
return baseMapper.getListForSort();
|
return baseMapper.getListForSort(seriesNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@
|
||||||
select *
|
select *
|
||||||
,(SELECT `name` FROM product_series WHERE batch_number=series_number AND state!=2 ORDER BY state DESC LIMIT 1) as 'seriesName'
|
,(SELECT `name` FROM product_series WHERE batch_number=series_number AND state!=2 ORDER BY state DESC LIMIT 1) as 'seriesName'
|
||||||
from product_type
|
from product_type
|
||||||
where enable=1 and state=1
|
where enable=1 and state=1 and series_number=#{seriesNumber}
|
||||||
order by seriesName, sort
|
order by seriesName, sort
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue