|
|
@@ -103,23 +103,29 @@ public class RestrictProjectServiceImpl extends BaseMybatisDao<RestrictProjectMa
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Object update(Integer id,Integer type,String takeAid) {
|
|
|
+ public Object update(String ids,Integer type,String takeAid) {
|
|
|
+ String[] split = ids.split(",");
|
|
|
Date date = new Date();
|
|
|
- RestrictProject in = new RestrictProject();
|
|
|
- RestrictProject use = restrictProjectMapper.selectByPrimaryKey(id);
|
|
|
- in.setId(id);
|
|
|
- if (type==0){
|
|
|
- in.setReleaseTime(date);
|
|
|
- in.setType(0);
|
|
|
- addUserLog(use,1);
|
|
|
- }else if (type==1){
|
|
|
- in.setLockTime(date);
|
|
|
- in.setAid(takeAid);
|
|
|
- in.setPid(use.getPid());
|
|
|
- in.setUid(use.getUid());
|
|
|
- addUserLog(use,2,takeAid);
|
|
|
+ for (String s : split) {
|
|
|
+ Integer id = Integer.parseInt(s);
|
|
|
+ RestrictProject in = new RestrictProject();
|
|
|
+ RestrictProject use = restrictProjectMapper.selectByPrimaryKey(id);
|
|
|
+ in.setId(id);
|
|
|
+ if (type==0){
|
|
|
+ in.setReleaseTime(date);
|
|
|
+ in.setType(0);
|
|
|
+ addUserLog(use,1);
|
|
|
+ }else if (type==1){
|
|
|
+ in.setLockTime(date);
|
|
|
+ in.setAid(takeAid);
|
|
|
+ in.setPid(use.getPid());
|
|
|
+ in.setUid(use.getUid());
|
|
|
+ addUserLog(use,2,takeAid);
|
|
|
+ }
|
|
|
+ int i = restrictProjectMapper.updateByPrimaryKeySelective(in);
|
|
|
}
|
|
|
- return restrictProjectMapper.updateByPrimaryKeySelective(in);
|
|
|
+
|
|
|
+ return 1;
|
|
|
}
|
|
|
|
|
|
@Override
|