营养科普
This commit is contained in:
parent
71da77299b
commit
31172af16e
|
|
@ -68,9 +68,9 @@ public class HealthPopularScienceController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "获取营养科普详细信息")
|
||||
//@RequiresPermissions("nutrition:science:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(healthPopularScienceService.selectHealthPopularScienceById(id));
|
||||
@GetMapping(value = "/{articleId}")
|
||||
public AjaxResult getInfo(@PathVariable("articleId") Long articleId) {
|
||||
return success(healthPopularScienceService.selectHealthPopularScienceById(articleId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -112,8 +112,8 @@ public class HealthPopularScienceController extends BaseController {
|
|||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("nutrition:science:remove")
|
||||
@SysLog(title = "营养科普", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除营养科普")
|
||||
@PostMapping("/del/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(healthPopularScienceService.deleteHealthPopularScienceByIds(ids));
|
||||
@PostMapping("/del/{articleIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] articleIds) {
|
||||
return toAjax(healthPopularScienceService.deleteHealthPopularScienceByIds(articleIds));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ public interface HealthPopularScienceMapper {
|
|||
/**
|
||||
* 查询营养科普
|
||||
*
|
||||
* @param id 营养科普主键
|
||||
* @param articleId 营养科普主键
|
||||
* @return 营养科普
|
||||
*/
|
||||
public HealthPopularScience selectHealthPopularScienceById(Long id);
|
||||
public HealthPopularScience selectHealthPopularScienceById(Long articleId);
|
||||
|
||||
/**
|
||||
* 查询营养科普列表
|
||||
|
|
@ -45,16 +45,16 @@ public interface HealthPopularScienceMapper {
|
|||
/**
|
||||
* 删除营养科普
|
||||
*
|
||||
* @param id 营养科普主键
|
||||
* @param articleId 营养科普主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthPopularScienceById(Long id);
|
||||
public int deleteHealthPopularScienceById(Long articleId);
|
||||
|
||||
/**
|
||||
* 批量删除营养科普
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @param articleIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthPopularScienceByIds(Long[] ids);
|
||||
public int deleteHealthPopularScienceByIds(Long[] articleIds);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ public interface IHealthPopularScienceService {
|
|||
/**
|
||||
* 查询营养科普
|
||||
*
|
||||
* @param id 营养科普主键
|
||||
* @param articleId 营养科普主键
|
||||
* @return 营养科普
|
||||
*/
|
||||
public HealthPopularScience selectHealthPopularScienceById(Long id);
|
||||
public HealthPopularScience selectHealthPopularScienceById(Long articleId);
|
||||
|
||||
/**
|
||||
* 查询营养科普列表
|
||||
|
|
@ -45,16 +45,16 @@ public interface IHealthPopularScienceService {
|
|||
/**
|
||||
* 批量删除营养科普
|
||||
*
|
||||
* @param ids 需要删除的营养科普主键集合
|
||||
* @param articleIds 需要删除的营养科普主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthPopularScienceByIds(Long[] ids);
|
||||
public int deleteHealthPopularScienceByIds(Long[] articleIds);
|
||||
|
||||
/**
|
||||
* 删除营养科普信息
|
||||
*
|
||||
* @param id 营养科普主键
|
||||
* @param articleId 营养科普主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthPopularScienceById(Long id);
|
||||
public int deleteHealthPopularScienceById(Long articleId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,12 +33,12 @@ public class HealthPopularScienceServiceImpl implements IHealthPopularScienceSer
|
|||
/**
|
||||
* 查询营养科普
|
||||
*
|
||||
* @param id 营养科普主键
|
||||
* @param articleId 营养科普主键
|
||||
* @return 营养科普
|
||||
*/
|
||||
@Override
|
||||
public HealthPopularScience selectHealthPopularScienceById(Long id) {
|
||||
return healthPopularScienceMapper.selectHealthPopularScienceById(id);
|
||||
public HealthPopularScience selectHealthPopularScienceById(Long articleId) {
|
||||
return healthPopularScienceMapper.selectHealthPopularScienceById(articleId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -106,22 +106,26 @@ public class HealthPopularScienceServiceImpl implements IHealthPopularScienceSer
|
|||
/**
|
||||
* 批量删除营养科普
|
||||
*
|
||||
* @param ids 需要删除的营养科普主键
|
||||
* @param articleIds 需要删除的营养科普主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHealthPopularScienceByIds(Long[] ids) {
|
||||
return healthPopularScienceMapper.deleteHealthPopularScienceByIds(ids);
|
||||
public int deleteHealthPopularScienceByIds(Long[] articleIds) {
|
||||
for (Long articleId : articleIds) {
|
||||
healthArticleChronicMapper.deleteHealthArticleChronicByArticleId(articleId);
|
||||
}
|
||||
return healthPopularScienceMapper.deleteHealthPopularScienceByIds(articleIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除营养科普信息
|
||||
*
|
||||
* @param id 营养科普主键
|
||||
* @param articleId 营养科普主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHealthPopularScienceById(Long id) {
|
||||
return healthPopularScienceMapper.deleteHealthPopularScienceById(id);
|
||||
public int deleteHealthPopularScienceById(Long articleId) {
|
||||
healthArticleChronicMapper.deleteHealthArticleChronicByArticleId(articleId);
|
||||
return healthPopularScienceMapper.deleteHealthPopularScienceById(articleId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue