|
|
@@ -17,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import springfox.documentation.annotations.ApiIgnore;
|
|
|
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
@@ -40,7 +41,7 @@ public class ZcrmViewCustomeraddressSelController {
|
|
|
*/
|
|
|
@GetMapping
|
|
|
@ApiOperation(value = "客户地址档案列表")
|
|
|
- public R<IPage<ZcrmViewCustomerAddressSel>> list(
|
|
|
+ public R<List<ZcrmViewCustomerAddressSel>> list(
|
|
|
@ApiIgnore @RequestParam Map<String, Object> params,
|
|
|
Query query,
|
|
|
ZcrmViewCustomerAddressSel zcrmViewCustomerAddressSel) {
|
|
|
@@ -51,7 +52,7 @@ public class ZcrmViewCustomeraddressSelController {
|
|
|
if (userInfo.getData() != null && userInfo.getData().getCustomerId() != null) {
|
|
|
queryWrapper.eq("Customer_ID", userInfo.getData().getCustomerId());
|
|
|
// 2. 执行分页查询
|
|
|
- IPage<ZcrmViewCustomerAddressSel> pages = zcrmViewCustomeraddressSelService.page(Condition.getPage(query), queryWrapper);
|
|
|
+ List<ZcrmViewCustomerAddressSel> pages = zcrmViewCustomeraddressSelService.list(queryWrapper);
|
|
|
// 3. 返回结果
|
|
|
return R.data(pages);
|
|
|
} else {
|
|
|
@@ -78,4 +79,35 @@ public class ZcrmViewCustomeraddressSelController {
|
|
|
return R.data(null);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 客户地址档案列表
|
|
|
+ */
|
|
|
+ @GetMapping
|
|
|
+ @ApiOperation(value = "客户地址档案列表[不验证用户]")
|
|
|
+ public R<List<ZcrmViewCustomerAddressSel>> lists(
|
|
|
+ @ApiIgnore @RequestParam Map<String, Object> params,
|
|
|
+ Query query,
|
|
|
+ ZcrmViewCustomerAddressSel zcrmViewCustomerAddressSel) {
|
|
|
+ // 1. 构建基础查询条件
|
|
|
+ QueryWrapper<ZcrmViewCustomerAddressSel> queryWrapper = Condition.getQueryWrapper(params, ZcrmViewCustomerAddressSel.class);
|
|
|
+ // 2. 执行分页查询
|
|
|
+ List<ZcrmViewCustomerAddressSel> pages = zcrmViewCustomeraddressSelService.list(queryWrapper);
|
|
|
+ // 3. 返回结果
|
|
|
+ return R.data(pages);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单条查询
|
|
|
+ */
|
|
|
+ @GetMapping("/find/{id}")
|
|
|
+ @ApiOperation(value = "查询一条客户地址档案[不验证用户]")
|
|
|
+ public R<ZcrmViewCustomerAddressSel> find(@PathVariable("id") Long id) {
|
|
|
+ ZcrmViewCustomerAddressSel customer = zcrmViewCustomeraddressSelService.selectZcrmViewCustomerAddressSelByCustomerId(id);
|
|
|
+ return R.data(customer);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|