Commit e495db95 by keith

update code

parent e29adfe4
...@@ -90,7 +90,9 @@ func (c *PublicController) Register() { ...@@ -90,7 +90,9 @@ func (c *PublicController) Register() {
// Read users based on business platform // Read users based on business platform
user = c.UserRepository.GetUserWithUID(sessionRequestDto.UID) user = c.UserRepository.GetUserWithUID(sessionRequestDto.UID)
} else { }
if user == nil {
// Read users using AccountID // Read users using AccountID
user = c.UserRepository.GetUser(sessionRequestDto.AccountID) user = c.UserRepository.GetUser(sessionRequestDto.AccountID)
......
...@@ -28,7 +28,7 @@ func GetWorkOrderCommentRepositoryInstance() *WorkOrderCommentRepository { ...@@ -28,7 +28,7 @@ func GetWorkOrderCommentRepositoryInstance() *WorkOrderCommentRepository {
// GetWorkOrderComments get WorkOrderComments // GetWorkOrderComments get WorkOrderComments
func (r *WorkOrderCommentRepository) GetWorkOrderComments(wid int64) ([]models.WorkOrderCommentDto, error) { func (r *WorkOrderCommentRepository) GetWorkOrderComments(wid int64) ([]models.WorkOrderCommentDto, error) {
var workOrderComments []models.WorkOrderCommentDto var workOrderComments []models.WorkOrderCommentDto
_, err := r.o.Raw("SELECT * FROM (SELECT w.*,w.id AS i_d,u.nickname AS u_nickname,a.nickname AS a_nickname,a.avatar AS a_avatar,u.avatar AS u_avatar FROM work_order_comment w LEFT JOIN (SELECT * FROM admin) a ON w.aid = a.id LEFT JOIN (SELECT * FROM `user`) u ON w.uid = u.id AND w.wid = ? ORDER BY w.id ASC) b WHERE wid = ?", wid, wid).QueryRows(&workOrderComments) _, err := r.o.Raw("SELECT * FROM (SELECT w.*,w.id AS i_d,w.uid AS u_i_d,w.aid AS a_i_d,w.wid AS w_i_d,u.nickname AS u_nickname,a.nickname AS a_nickname,a.avatar AS a_avatar,u.avatar AS u_avatar FROM work_order_comment w LEFT JOIN (SELECT * FROM admin) a ON w.aid = a.id LEFT JOIN (SELECT * FROM `user`) u ON w.uid = u.id AND w.wid = ? ORDER BY w.id ASC) b WHERE wid = ?", wid, wid).QueryRows(&workOrderComments)
if err != nil { if err != nil {
logs.Warn("GetWorkOrderComments get WorkOrderComments-----------", err) logs.Warn("GetWorkOrderComments get WorkOrderComments-----------", err)
} }
......
...@@ -585,12 +585,12 @@ export default { ...@@ -585,12 +585,12 @@ export default {
localMessage = self.$mimcInstance.createLocalMessage( localMessage = self.$mimcInstance.createLocalMessage(
"photo", "photo",
self.account, self.account,
this.result self.result
); );
localMessage["percent"] = 0; localMessage["percent"] = 0;
localMessage.isShowCancel = true; localMessage.isShowCancel = true;
setTimeout(() => { setTimeout(() => {
this.updateMessageHideCancel(localMessage) self.updateMessageHideCancel(localMessage)
}, 10000); }, 10000);
self.messages.push(self.handlerMessage(localMessage)); self.messages.push(self.handlerMessage(localMessage));
var cacheMsg = Object.assign({}, localMessage); var cacheMsg = Object.assign({}, localMessage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment