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