|  |  | 
 |  |  | package zy.cloud.wms.manager.controller; | 
 |  |  |  | 
 |  |  | import com.alibaba.fastjson.JSONArray; | 
 |  |  | import com.alibaba.fastjson.JSONObject; | 
 |  |  | import com.baomidou.mybatisplus.mapper.EntityWrapper; | 
 |  |  | import com.baomidou.mybatisplus.mapper.Wrapper; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/tag/delete/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R delete(@RequestParam String param){ | 
 |  |  |         List<Tag> list = JSONArray.parseArray(param, Tag.class); | 
 |  |  |         if (Cools.isEmpty(list)){ | 
 |  |  |             return R.error(); | 
 |  |  |         } | 
 |  |  |         for (Tag entity : list){ | 
 |  |  |             tagService.delete(new EntityWrapper<>(entity)); | 
 |  |  |     public R delete(@RequestParam(value="ids[]") Long[] ids){ | 
 |  |  |         for (Long id : ids){ | 
 |  |  |             tagService.deleteById(id); | 
 |  |  |         } | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 
 |  |  | 
 |  |  |                     return; | 
 |  |  |                 } | 
 |  |  |                 var ids = checkRows.map(function (d) { | 
 |  |  |                     return d.authorityId; | 
 |  |  |                     return d.id; | 
 |  |  |                 }); | 
 |  |  |                 doDel({ids: ids}); | 
 |  |  |             } | 
 |  |  | 
 |  |  |             }, function (i) { | 
 |  |  |                 layer.close(i); | 
 |  |  |                 var loadIndex = layer.load(2); | 
 |  |  |                 $.get('../../json/ok.json', {id: obj.data ? obj.data.authorityId : obj.ids}, function (res) { | 
 |  |  |                     layer.close(loadIndex); | 
 |  |  |                     if (res.code === 200) { | 
 |  |  |                         layer.msg(res.msg, {icon: 1}); | 
 |  |  |                         insTb.refresh(); | 
 |  |  |                     } else { | 
 |  |  |                         layer.msg(res.msg, {icon: 2}); | 
 |  |  |                 var ids; | 
 |  |  |                 if (obj.data) { | 
 |  |  |                     ids = []; | 
 |  |  |                     ids[0] = obj.data.id; | 
 |  |  |                 } else { | 
 |  |  |                     ids = obj.ids; | 
 |  |  |                 } | 
 |  |  |                 $.ajax({ | 
 |  |  |                     url: baseUrl+"/tag/delete/auth", | 
 |  |  |                     headers: {'token': localStorage.getItem('token')}, | 
 |  |  |                     data: {ids: ids}, | 
 |  |  |                     method: 'POST', | 
 |  |  |                     success: function (res) { | 
 |  |  |                         layer.close(loadIndex); | 
 |  |  |                         if (res.code === 200){ | 
 |  |  |                             layer.msg(res.msg, {icon: 1}); | 
 |  |  |                             insTb.refresh(); | 
 |  |  |                         } else if (res.code === 403){ | 
 |  |  |                             top.location.href = baseUrl+"/"; | 
 |  |  |                         } else { | 
 |  |  |                             layer.msg(res.msg, {icon: 2}); | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                 }, 'json'); | 
 |  |  |                 }) | 
 |  |  |             }); | 
 |  |  |         } | 
 |  |  |  |