修改品类信息(2)

master
Jiang Peng 2024-03-03 21:03:34 +08:00
parent c2c1270241
commit 6b382157d9
5 changed files with 12 additions and 47 deletions

View File

@ -50,8 +50,9 @@ public class CategoryInfoSaveReq extends TreeEntity {
@ApiModelProperty(name = "介绍", value = "介绍")
private String introduction;
private List<Long> attributeIdList;
private List<Long> attributeGroupIdList;
private List<Long> attributeIdList;
private List<Long> brandIdList;
}

View File

@ -94,20 +94,19 @@ public class AttributeInfoController extends BaseController {
*
*/
@RequiresPermissions("product:attribute:edit")
@Log(title = "商品属性",businessType = BusinessType.UPDATE)
@Log(title = "商品属性", businessType = BusinessType.UPDATE)
@PutMapping("/{id}")
@ApiOperation("修改商品属性")
public Result<String> edit(@PathVariable Long id, @RequestBody AttributeInfoEditReq attributeInfoEditReq) {
return toAjax(attributeInfoService.updateById(AttributeInfo.editBuild(id,attributeInfoEditReq)));
}
/**
*
*/
@RequiresPermissions("product:attribute:remove")
@Log(title = "商品属性", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
@DeleteMapping("/{ids}")
@ApiOperation("删除商品属性")
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
public Result<String> remove(@PathVariable List<Long> ids) {

View File

@ -46,10 +46,6 @@ public class AttributeGroupServiceImpl extends ServiceImpl<AttributeGroupMapper,
/**
*
*
* @param attributeGroupQuery
*
* @return
*/
@Override
public TableDataInfo<AttributeGroupPageResp> page (AttributeGroup attributeGroupQuery) {
@ -68,29 +64,25 @@ public class AttributeGroupServiceImpl extends ServiceImpl<AttributeGroupMapper,
}
/**
*
*
*/
@Override
public List<AttributeGroup> list(AttributeGroup attributeGroup) {
public List<AttributeGroup> list (AttributeGroup attributeGroup) {
LambdaQueryWrapper<AttributeGroup> queryWrapper = new LambdaQueryWrapper<>();
if(ObjUtils.notNull(attributeGroup.getName())){
queryWrapper.like(AttributeGroup::getName,attributeGroup.getName());
if (ObjUtils.notNull(attributeGroup.getName())) {
queryWrapper.like(AttributeGroup::getName, attributeGroup.getName());
}
if(ObjUtils.notNull(attributeGroup.getStates())){
queryWrapper.eq(AttributeGroup::getStates,attributeGroup.getStates());
if (ObjUtils.notNull(attributeGroup.getStates())) {
queryWrapper.eq(AttributeGroup::getStates, attributeGroup.getStates());
}
return list(queryWrapper);
}
/**
*
*
* @param attributeGroupSaveModel
*
* @return
*
*/
@Override
@Transactional

View File

@ -31,9 +31,6 @@ public class AttributeInfoServiceImpl extends ServiceImpl<AttributeInfoMapper, A
/**
*
*
* @param attributeInfo
* @return
*/
@Override
public List<AttributeInfo> list(AttributeInfo attributeInfo) {
@ -53,10 +50,6 @@ public class AttributeInfoServiceImpl extends ServiceImpl<AttributeInfoMapper, A
/**
* groupId
*
* @param groupId Id
*
* @return
*/
@Override
public List<AttributeInfo> attributeListByGroupId (Long groupId) {

View File

@ -38,18 +38,9 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
@Autowired
private AttributeInfoService attributeInfoService;
@Autowired
private AsAttributeGroupService asAttributeGroupService;
@Autowired
private BrandInfoService brandInfoService;
/**
*
*
* @param categoryInfo
* @return
*/
@Override
public List<CategoryInfo> list(CategoryInfo categoryInfo) {
@ -75,11 +66,6 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
if (ObjUtils.notNull(categoryInfo.getIntroduction())){
queryWrapper.eq(CategoryInfo::getIntroduction, categoryInfo.getIntroduction());
}
return list(queryWrapper);
}
@ -94,8 +80,6 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
/**
* id
* @param categoryId
* @return
*/
@Override
public List<AttributeGroup> getAttributeGroupList(Long categoryId) {
@ -104,8 +88,6 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
/**
* id
* @param categoryId
* @return
*/
@Override
public List<AttributeInfo> getAttributeInfoList(Long categoryId) {
@ -130,8 +112,6 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
/**
* id
* @param categoryId
* @return
*/
@Override
public List<BrandInfo> getBrandInfoList(Long categoryId) {