|
|
@ -49,7 +49,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
public class CustomerReceivingAddressController extends JeecgController<CustomerReceivingAddress, ICustomerReceivingAddressService> { |
|
|
|
public class CustomerReceivingAddressController extends JeecgController<CustomerReceivingAddress, ICustomerReceivingAddressService> { |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private ICustomerReceivingAddressService customerReceivingAddressService; |
|
|
|
private ICustomerReceivingAddressService customerReceivingAddressService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 分页列表查询 |
|
|
|
* 分页列表查询 |
|
|
|
* |
|
|
|
* |
|
|
@ -71,7 +71,33 @@ public class CustomerReceivingAddressController extends JeecgController<Customer |
|
|
|
IPage<CustomerReceivingAddress> pageList = customerReceivingAddressService.page(page, queryWrapper); |
|
|
|
IPage<CustomerReceivingAddress> pageList = customerReceivingAddressService.page(page, queryWrapper); |
|
|
|
return Result.OK(pageList); |
|
|
|
return Result.OK(pageList); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 分页列表查询 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param customerReceivingAddress |
|
|
|
|
|
|
|
* @param pageNo |
|
|
|
|
|
|
|
* @param pageSize |
|
|
|
|
|
|
|
* @param req |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@AutoLog(value = "顾客地址表-分页列表查询") |
|
|
|
|
|
|
|
@ApiOperation(value="顾客地址表-分页列表查询", notes="顾客地址表-分页列表查询") |
|
|
|
|
|
|
|
@GetMapping(value = "/list1") |
|
|
|
|
|
|
|
public Result<?> queryPageList1(CustomerReceivingAddress customerReceivingAddress, |
|
|
|
|
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
|
|
|
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
|
|
|
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
|
|
|
QueryWrapper<CustomerReceivingAddress> queryWrapper = QueryGenerator.initQueryWrapper(customerReceivingAddress, req.getParameterMap()); |
|
|
|
|
|
|
|
System.out.println(customerReceivingAddress.getUserId()); |
|
|
|
|
|
|
|
queryWrapper.eq("user_id",customerReceivingAddress.getUserId()); |
|
|
|
|
|
|
|
Page<CustomerReceivingAddress> page = new Page<CustomerReceivingAddress>(pageNo, pageSize); |
|
|
|
|
|
|
|
IPage<CustomerReceivingAddress> pageList = customerReceivingAddressService.page(page, queryWrapper); |
|
|
|
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 添加 |
|
|
|
* 添加 |
|
|
|
* |
|
|
|
* |
|
|
@ -89,7 +115,7 @@ public class CustomerReceivingAddressController extends JeecgController<Customer |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 编辑 |
|
|
|
* 编辑 |
|
|
|
* |
|
|
|
* |
|
|
@ -107,7 +133,7 @@ public class CustomerReceivingAddressController extends JeecgController<Customer |
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 通过id删除 |
|
|
|
* 通过id删除 |
|
|
|
* |
|
|
|
* |
|
|
@ -121,7 +147,7 @@ public class CustomerReceivingAddressController extends JeecgController<Customer |
|
|
|
customerReceivingAddressService.removeById(id); |
|
|
|
customerReceivingAddressService.removeById(id); |
|
|
|
return Result.OK("删除成功!"); |
|
|
|
return Result.OK("删除成功!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 批量删除 |
|
|
|
* 批量删除 |
|
|
|
* |
|
|
|
* |
|
|
@ -135,7 +161,7 @@ public class CustomerReceivingAddressController extends JeecgController<Customer |
|
|
|
this.customerReceivingAddressService.removeByIds(Arrays.asList(ids.split(","))); |
|
|
|
this.customerReceivingAddressService.removeByIds(Arrays.asList(ids.split(","))); |
|
|
|
return Result.OK("批量删除成功!"); |
|
|
|
return Result.OK("批量删除成功!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 通过id查询 |
|
|
|
* 通过id查询 |
|
|
|
* |
|
|
|
* |
|
|
@ -176,4 +202,27 @@ public class CustomerReceivingAddressController extends JeecgController<Customer |
|
|
|
return super.importExcel(request, response, CustomerReceivingAddress.class); |
|
|
|
return super.importExcel(request, response, CustomerReceivingAddress.class); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@AutoLog(value = "排序") |
|
|
|
|
|
|
|
@ApiOperation(value="排序", notes="排序") |
|
|
|
|
|
|
|
@GetMapping(value = "/up") |
|
|
|
|
|
|
|
public Result<?> shang(@RequestParam(name="id",required=true) String id) { |
|
|
|
|
|
|
|
customerReceivingAddressService.up(id); |
|
|
|
|
|
|
|
return Result.ok("升序成功"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@AutoLog(value = "排序") |
|
|
|
|
|
|
|
@ApiOperation(value="排序", notes="排序") |
|
|
|
|
|
|
|
@GetMapping(value = "/down") |
|
|
|
|
|
|
|
public Result<?> xia(@RequestParam(name="id",required=true) String id) { |
|
|
|
|
|
|
|
int a=customerReceivingAddressService.findSort(id); |
|
|
|
|
|
|
|
if(a==0){ |
|
|
|
|
|
|
|
return Result.error("当前已经是最低级别!!!");}else { |
|
|
|
|
|
|
|
customerReceivingAddressService.down(id); |
|
|
|
|
|
|
|
return Result.ok("降序成功"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|