mirror of
https://gitee.com/yubaolee/BestQA.git
synced 2025-12-06 09:48:57 +08:00
modify README.md
This commit is contained in:
@@ -68,43 +68,4 @@
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$scope.showNewPostDialog = function () {
|
||||
$scope.errorMsg = '';
|
||||
$scope.newPost = {
|
||||
title: '',
|
||||
content: '',
|
||||
tag: ''
|
||||
};
|
||||
$("#float-box-newPost").modal("show");
|
||||
}
|
||||
|
||||
$scope.submitPost = function () {
|
||||
if (isStringEmpty($scope.newPost.title)) {
|
||||
$scope.errorMsg = '请输入标题。';
|
||||
return false;
|
||||
}
|
||||
if (isStringEmpty($scope.newPost.content)) {
|
||||
$scope.errorMsg = '请输入内容。';
|
||||
return false;
|
||||
}
|
||||
|
||||
$http({
|
||||
method: 'POST',
|
||||
url: '/Question/Create',
|
||||
data: $scope.newPost
|
||||
})
|
||||
.success(function (result, status, headers, config) {
|
||||
if (result.success) {
|
||||
showAutoCloseAlert();
|
||||
$("#float-box-newPost").modal("hide");
|
||||
} else {
|
||||
$scope.errorMsg = result.errorMsg;
|
||||
}
|
||||
})
|
||||
.error(function (result, status, headers, config) {
|
||||
$scope.errorMsg = result.errorMsg;
|
||||
});
|
||||
}
|
||||
}]);
|
||||
@@ -29,7 +29,7 @@
|
||||
post.editing = false;
|
||||
}
|
||||
$scope.saveChanges = function(post) {
|
||||
blockUi.start('Updating...');
|
||||
blockUi.start('Saving...');
|
||||
|
||||
if (post.Id == '')
|
||||
$scope.create(post);
|
||||
|
||||
14
README.md
14
README.md
@@ -7,13 +7,15 @@
|
||||

|
||||

|
||||

|
||||
|
||||
####系统工程结构:
|
||||
|
||||
- Server
|
||||
######Server
|
||||
1. BestQA.MessageQueue: 系统消息队列中心
|
||||
2. BestQA.CommandSubscribe: 为系统命令的订阅处理程序
|
||||
3. BestQA.EventSubscribe: 为领域事件订阅处理程序
|
||||
- Other
|
||||
|
||||
######Other
|
||||
1. BestQA.Commands: 包含所有的命令(即CQRS框架中的Command)及命令处理CommandHandler
|
||||
2. BestQA.Domain: 核心领域层(内部包括领域事件的定义)
|
||||
3. BestQA.EventHandler: 领域事件处理
|
||||
@@ -28,18 +30,20 @@
|
||||
####启动顺序:
|
||||
|
||||
- 创建数据库:BestQA,并使用InitTables.sql进行初始化;
|
||||
- 依次运行:
|
||||
|
||||
######依次运行:
|
||||
1. BestQA.MessageQueue.exe
|
||||
2. BestQA.CommandSubscribe.exe
|
||||
3. BestQA.EventSubscribe.exe
|
||||
4. BestQA.Web(注意修改连接字符串)
|
||||
|
||||
- 单元测试:
|
||||
1. 只支行BestQA.UnitTest即可,无需任何其它程序
|
||||
######单元测试:
|
||||
1. 只运行行BestQA.UnitTest即可,无需任何其它程序
|
||||
|
||||
####典型的业务处理流程:
|
||||
|
||||
发布一个新问题:
|
||||
|
||||
- 用户通过WEB发送CreateNewQuestionCmd
|
||||
- BestQA.MessageQueue收到命令
|
||||
- BestQA.CommandSubscribe收到通知,调用BestQA.Commands中的CommandHandler处理,最终通过调用BestQA.Domain处理,然后发送QuestionCreatedEvent
|
||||
|
||||
Reference in New Issue
Block a user