Python 官方文档:入门教程 => 点击学习
一、项目简述 功能包括: 用户管理,系统管理,客户管理,客户服务,客户关怀, 销售机会,统计管理等等。 二、项目运行 环境配置: jdk1.8 + Tomcat8.5 + Mysql
功能包括: 用户管理,系统管理,客户管理,客户服务,客户关怀, 销售机会,统计管理等等。
环境配置: jdk1.8 + Tomcat8.5 + Mysql + Eclispe (IntelliJ idea,Eclispe,MyEclispe,Sts 都支持)
项目技术: jsP +spring + springMVC + mybatis + html+ CSS + javascript + Jquery + ajax + layui+ Maven等等。
@RestController
@RequestMapping("/employee")
@CrossOrigin
@Slf4j
public class EmployeeController {
@Autowired
private EmployeeService employeeService;
@Autowired
private DepartmentService departmentService;
@Autowired
private JobService jobService;
@Autowired
private EduLevelMapper eduLevelMapper;
@Autowired
private EmployeeMapper employeeMapper;
@GetMapping("/search")
public Result search(@RequestParam(name = "name", required = false,defaultValue = "") String name,
@RequestParam(name = "current", required = false, defaultValue = "1") Integer current,
@RequestParam(name = "size", required = false, defaultValue = "10") Integer size) {
return employeeService.list(current, size, name);
}
@GetMapping("/list")
public Result list(@RequestParam(name = "current", required = false, defaultValue = "1") Integer current,
@RequestParam(name = "size", required = false, defaultValue = "10") Integer size) {
return employeeService.list(current, size, null);
}
@GetMapping("/getUserById")
public EmployeeDTO getUserAllInfoById(@RequestParam(name = "id") Integer id) {
return employeeService.getUserById(id);
}
@GetMapping("/getEmployeeById")
public Employee getUserById(@RequestParam(name = "id") Integer id) {
return employeeMapper.selectById(id);
}
@PostMapping("/add")
public Map<String, Object> addUser(@RequestBody Employee employee) {
log.info(employee.toString());
return employeeService.add(employee);
}
@PostMapping("/update")
public Map<String, Object> updateUser(@RequestBody Employee employee) {
log.info(employee.toString());
return employeeService.update(employee);
}
@GetMapping("/delete")
public Result deleteEmployeeById(@RequestParam(name = "id") Integer id) {
return employeeService.deleteEmployeeById(id);
}
@GetMapping("/dismiss")
public Map<String, Object> dismissEmployeeById(@RequestParam(name = "id") Integer id) {
return employeeService.dismissEmployeeById(id);
}
@GetMapping("/otherInfo")
public Result getAllOtherInfo() {
Map<String, Object> info = new HashMap<>();
info.put("departments", departmentService.selectAll());
info.put("jobs", jobService.selectAll());
info.put("eduLevels", eduLevelMapper.selectList(null));
return Result.success(info);
}
@GetMapping("/map")
public Result getMap() {
return employeeService.getMap();
}
}
@RestController
@CrossOrigin
@RequestMapping("/personnel")
public class PersonnelController {
@Autowired
private PersonnelService personnelService;
@GetMapping("/list")
public Result list(@RequestParam(name = "current", required = false, defaultValue = "1") Integer current,
@RequestParam(name = "size", required = false, defaultValue = "10") Integer size) {
return personnelService.list(current, size);
}
}
@Component
@ServerEndpoint("/websocket/login")
@Slf4j
public class WEBSocketServer {
// static Log log = LogFactory.get(WebSocketServer.class);
private static int onlineCount = 0;
private static CopyOnWriteArraySet<WebSocketServer> webSocketSet = new CopyOnWriteArraySet<>();
private Session session;
@OnOpen
public void onOpen(Session session) {
this.session = session;
webSocketSet.add(this);
addOnlineCount();
log.info("新增一个websocket连接,现在连接数" + getOnlineCount());
}
@OnClose
public void onClose() {
webSocketSet.remove(this);
subOnlineCount();
log.info("断开websocket一个连接,现在连接数:" + getOnlineCount());
}
@OnMessage
public void onMessage(String message, Session session) {
log.info("websocket 收到消息了: " + message);
try {
sendInfo("hello, too!!!", "text");
} catch (IOException e) {
e.printStackTrace();
}
}
@OnError
public void onError(Session session, Throwable throwable) {
log.error("发送错误, ");
throwable.printStackTrace();
}
public void sendMessage(String message) throws IOException {
if (session != null) {
this.session.getBasicRemote().sendText(message);
} else {
log.info("session为空");
}
}
public static void sendInfo(Object message, String type) throws IOException {
log.info("推送消息到窗口,推送内容:" + message);
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("type", type);
resultMap.put("message", message);
JSONObject jsonObject = JSONUtil.parseObj(resultMap);
for (WebSocketServer item : webSocketSet) {
try {
//这里可以设定只推送给这个sid的,为null则全部推送
item.sendMessage(jsonObject.toString());
} catch (IOException e) {
continue;
}
}
}
public static synchronized int getOnlineCount() {
return onlineCount;
}
public static synchronized void addOnlineCount() {
WebSocketServer.onlineCount++;
}
public static synchronized void subOnlineCount() {
WebSocketServer.onlineCount--;
}
}
以上就是Java 实战项目之CRM客户管理系统的实现流程的详细内容,更多关于Java CRM客户管理系统的资料请关注编程网其它相关文章!
--结束END--
本文标题: Java 实战项目之CRM客户管理系统的实现流程
本文链接: https://www.lsjlt.com/news/157361.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0