黑名单应该清空再建
This commit is contained in:
parent
40201906ed
commit
34a726baa0
@ -36,12 +36,14 @@ public class XhpcStationInternetBlacklistController extends BaseController {
|
||||
// @PreAuthorize(hasPermi = "station:internet:add")
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@Valid @RequestBody List<XhpcStationInternetBlacklist> list) {
|
||||
|
||||
String internetUserId = list.get(0).getInternetUserId();
|
||||
iXhpcStationInternetBlacklistService.deleteByOperatorIdEvcs(internetUserId);
|
||||
if (null != list && list.size() > 0) {
|
||||
String internetUserId = list.get(0).getInternetUserId();
|
||||
iXhpcStationInternetBlacklistService.deleteByOperatorIdEvcs(internetUserId);
|
||||
for (XhpcStationInternetBlacklist xhpcStationInternetBlacklist : list) {
|
||||
Map<String, Object> info = xhpcInternetUserService.info(Long.valueOf(xhpcStationInternetBlacklist.getInternetUserId()));
|
||||
if(info !=null || info.get("operatorIdEvcs") !=null){
|
||||
Map<String, Object> info =
|
||||
xhpcInternetUserService.info(Long.valueOf(xhpcStationInternetBlacklist.getInternetUserId()));
|
||||
if (info != null || info.get("operatorIdEvcs") != null) {
|
||||
xhpcStationInternetBlacklist.setOperatorIdEvcs(info.get("operatorIdEvcs").toString());
|
||||
}
|
||||
iXhpcStationInternetBlacklistService.insert(xhpcStationInternetBlacklist);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user