增加日志测试

This commit is contained in:
yuanke 2016-08-01 14:30:31 +08:00
parent fa43924330
commit c1bd3b6bf1
2 changed files with 7 additions and 1 deletions

View File

@ -8,6 +8,8 @@ class WechatsController < ActionController::Base
# default text responder when no other match
on :text do |request, content|
#邀请码
logger.debug "!!!!!!!!!!!fankui"
logger.info request
if join_class_request(request)
sendBindClass(request, {invite_code: content})
elsif join_project_request(request)
@ -43,11 +45,15 @@ class WechatsController < ActionController::Base
# When subscribe user scan scene_id in public account
on :scan, with: 'scene_id' do |request, ticket|
logger.debug "!!!!!!!!!!!scene_id"
logger.info request
sendBindClass(request, {ticket: ticket})
end
# When no any on :scan responder can match subscribe user scaned scene_id
on :event, with: 'scan' do |request|
logger.debug "!!!!!!!!!!!scan"
logger.info request
if request[:EventKey].present?
sendBindClass(request, {ticket: request[:Ticket]})
end

View File

@ -135,7 +135,7 @@ class ProjectsService
members << Member.new(:role_ids => ["5"], :user_id => current_user.id)
project.members << members
projectInfo << ProjectInfo.new(:user_id => current_user.id, :project_id => project.id)
project_info << ProjectInfo.new(:user_id => current_user.id, :project_id => project.id)
project.project_infos << project_info
status = 0