客户管理中增加企业用户查询和访客记录查询接口

This commit is contained in:
st 2024-03-02 17:13:10 +08:00
parent 02a6a1df18
commit 526210ecda
3 changed files with 35 additions and 4 deletions

View File

@ -4,7 +4,10 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Maps;
import com.ics.admin.domain.Customer;
import com.ics.admin.domain.IcsCustomerStaff;
import com.ics.admin.service.ICustomerService;
import com.ics.admin.service.IIcsCustomerStaffService;
import com.ics.common.constant.Constants;
import com.ics.common.core.controller.BaseController;
import com.ics.common.core.domain.R;
import com.ics.common.utils.ValidatorUtils;
@ -32,7 +35,8 @@ public class CustomerController extends BaseController {
@Autowired
private ICustomerService customerService;
@Autowired
private IIcsCustomerStaffService icsCustomerStaffService;
/**
@ -178,4 +182,31 @@ public class CustomerController extends BaseController {
return toAjax(customerService.deleteCustomerByIds(ids));
}
}
/**
* 查询访客列表
* @param icsCustomerStaff
* @return
*/
@RequiresPermissions("admin:customer:visit")
@GetMapping("visitList")
public R visitList(IcsCustomerStaff icsCustomerStaff) {
startPage();
icsCustomerStaff.setDataType(Constants.CUSTOMER_VISIT);
return result(icsCustomerStaffService.selectIcsCustomerStaffList(icsCustomerStaff));
}
/**
* 查询企业员工列表
* @param icsCustomerStaff
* @return
*/
@RequiresPermissions("admin:customer:staff")
@GetMapping("staffList")
public R staffList(IcsCustomerStaff icsCustomerStaff) {
startPage();
icsCustomerStaff.setDataType(Constants.CUSTOMER_STAFF);
return result(icsCustomerStaffService.selectIcsCustomerStaffList(icsCustomerStaff));
}
}

View File

@ -84,4 +84,6 @@ public class CustomerStaffController extends BaseController {
}
}

View File

@ -27,7 +27,6 @@ public class VisitorApiController extends BaseController {
@GetMapping("list")
public R list(IcsCustomerStaff icsCustomerStaff) {
startPage();
icsCustomerStaff.setIcsCustomerId(1L);//临时设置,需要从用户信息中获取
icsCustomerStaff.setDataType(Constants.CUSTOMER_VISIT);
return result(icsCustomerStaffService.selectIcsCustomerStaffList(icsCustomerStaff));
}
@ -37,7 +36,6 @@ public class VisitorApiController extends BaseController {
*/
@PostMapping("save")
public R addSave(@RequestBody IcsCustomerStaff icsCustomerStaff) {
icsCustomerStaff.setIcsCustomerId(1L);//临时设置,需要从用户信息中获取
icsCustomerStaff.setCreateTime(new Date());
icsCustomerStaff.setCreateBy(getLoginName());
icsCustomerStaff.setDataType(Constants.CUSTOMER_VISIT);