小红书代理修改

master
yqy 1 year ago
parent b061a03f98
commit 33a1b87475

@ -39,7 +39,7 @@ public class ProxyController {
@PostMapping("/add")
@Inner(value = false)
@ApiOperation("添加")
@ApiOperation("添加IP")
public Result<?> add(@Validated({AddGroup.class}) @RequestBody ProxyEntity proxyEntity){
proxyService.add(proxyEntity);
return Result.success();
@ -47,7 +47,7 @@ public class ProxyController {
@PostMapping("/update")
@Inner(value = false)
@ApiOperation("修改")
@ApiOperation("修改IP")
public Result<?> update(@Validated({UpdateGroup.class}) @RequestBody ProxyEntity proxyEntity){
proxyService.update(proxyEntity);
return Result.success();
@ -63,7 +63,7 @@ public class ProxyController {
@GetMapping("/ipBindingList")
@Inner(value = false)
@ApiOperation("IP绑定手机号列表")
@ApiOperation("IP绑定手机号-列表")
public PageResult ipBindingList(ProxyDTO proxyDTO, Pageable pageable){
return proxyService.ipBindingList(proxyDTO, pageable);
}
@ -83,11 +83,11 @@ public class ProxyController {
return Result.success();
}
@GetMapping("/replaceAccountIp")
@GetMapping("/addAccountIp")
@Inner(value = false)
@ApiOperation("替换账号绑定IP")
public Result<?> replaceAccountIp(@RequestParam("proxyId") Long proxyId, @RequestParam("phone") String phone){
proxyService.replaceAccountIp(proxyId, phone);
@ApiOperation("添加账号-IP绑定")
public Result<?> addAccountIp(@RequestParam("proxyId") Long proxyId, @RequestParam("phone") String phone){
proxyService.addAccountIp(proxyId, phone);
return Result.success();
}

@ -52,7 +52,7 @@ public interface ProxyService {
/**
* IP
*/
void replaceAccountIp(Long proxyId, String phone);
void addAccountIp(Long proxyId, String phone);
/**
*

@ -180,7 +180,7 @@ public class ProxyServiceImpl implements ProxyService {
Page<ProxyEntity> page = new Page<>(pageable.getPageNumber(), pageable.getPageSize());
LambdaQueryWrapper<ProxyEntity> wrapper = new LambdaQueryWrapper<>();
if (StringUtils.isNotBlank(ip)) wrapper.eq(ProxyEntity::getIp, ip);
if (StringUtils.isNotBlank(ip)) wrapper.like(ProxyEntity::getIp, ip);
List<ProxyAccountEntity> entities;
if (StringUtils.isNotBlank(phone)) {
@ -215,12 +215,9 @@ public class ProxyServiceImpl implements ProxyService {
}
@Override
public void replaceAccountIp(Long proxyId, String phone) {
ProxyAccountEntity proxyAccountEntity = proxyAccountMapper.selectOne(new LambdaQueryWrapper<ProxyAccountEntity>()
.eq(ProxyAccountEntity::getNid, phone));
proxyAccountEntity.setProxyId(proxyId);
proxyAccountMapper.updateById(proxyAccountEntity);
public void addAccountIp(Long proxyId, String phone) {
ProxyAccountEntity proxyAccountEntity = new ProxyAccountEntity(phone, proxyId);
proxyAccountMapper.insert(proxyAccountEntity);
}
@Override

Loading…
Cancel
Save