|
@@ -14,6 +14,8 @@ import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
|
+import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -58,13 +60,16 @@ public class DubboUnifiedSettlementProgrammeServiceImpl implements DubboUnifiedS
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public R<String> delete(Long id) {
|
|
|
|
- unifiedSettlementProgrammeService.deleteObj(id);
|
|
|
|
|
|
+ public R<String> delete(String ids,Long userId) {
|
|
|
|
+ //unifiedSettlementProgrammeService.deleteObj(ids);
|
|
|
|
+
|
|
|
|
+ List<Long> idsList = Arrays.stream(ids.split(",")).map(x -> Long.parseLong(x)).collect(Collectors.toList());
|
|
|
|
+ unifiedSettlementProgrammeService.deleteByIds(idsList,userId);
|
|
return new R<>("删除成功!");
|
|
return new R<>("删除成功!");
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public R<String> enabled(Long id) {
|
|
|
|
|
|
+ public R<String> enabled(Long id,Long userId) {
|
|
|
|
|
|
UnifiedSettlementProgramme entity = unifiedSettlementProgrammeService.findById(id);
|
|
UnifiedSettlementProgramme entity = unifiedSettlementProgrammeService.findById(id);
|
|
if (null == entity) {
|
|
if (null == entity) {
|
|
@@ -74,14 +79,16 @@ public class DubboUnifiedSettlementProgrammeServiceImpl implements DubboUnifiedS
|
|
entity = new UnifiedSettlementProgramme();
|
|
entity = new UnifiedSettlementProgramme();
|
|
entity.setId(id);
|
|
entity.setId(id);
|
|
entity.setEnabled(enabled == 0 ? 1 : 0);
|
|
entity.setEnabled(enabled == 0 ? 1 : 0);
|
|
|
|
+ entity.setUpdateUserId(userId);
|
|
|
|
+ entity.setUpdateTime(new Date());
|
|
unifiedSettlementProgrammeService.updateByPrimaryKeySelective(entity);
|
|
unifiedSettlementProgrammeService.updateByPrimaryKeySelective(entity);
|
|
String massage = entity.getEnabled() == 1 ? "启用成功!" : "停用成功!";
|
|
String massage = entity.getEnabled() == 1 ? "启用成功!" : "停用成功!";
|
|
return new R<>(massage);
|
|
return new R<>(massage);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public R<String> setDefault(Long id) {
|
|
|
|
- return unifiedSettlementProgrammeService.setDefault(id);
|
|
|
|
|
|
+ public R<String> setDefault(Long id,Long userId) {
|
|
|
|
+ return unifiedSettlementProgrammeService.setDefault(id,userId);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|