政策启用禁用功能开发
This commit is contained in:
@@ -54,4 +54,9 @@ public interface IPolicyInfoService {
|
||||
* 批量删除政策
|
||||
*/
|
||||
int deleteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 更新政策状态(启用/禁用)
|
||||
*/
|
||||
int updateStatus(Long id, String status);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ public class PolicyInfoServiceImpl implements IPolicyInfoService {
|
||||
List<String> policyTags = Arrays.asList(query.getPolicyTag().split(","));
|
||||
query.setPolicyTags(policyTags);
|
||||
}
|
||||
// 仅返回启用状态的政策给前端
|
||||
query.setStatus("0");
|
||||
List<PolicyInfo> list = policyInfoMapper.selectPolicyInfoList(query);
|
||||
PageInfo<PolicyInfo> pageInfo = new PageInfo<>(list);
|
||||
|
||||
@@ -94,4 +96,9 @@ public class PolicyInfoServiceImpl implements IPolicyInfoService {
|
||||
public int deleteByIds(Long[] ids) {
|
||||
return policyInfoMapper.deletePolicyInfoByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateStatus(Long id, String status) {
|
||||
return policyInfoMapper.updateStatus(id, status);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user