Skip to content

Commit

Permalink
change sso to meet a
Browse files Browse the repository at this point in the history
  • Loading branch information
BREWTAN committed Apr 9, 2016
1 parent d66dc42 commit af6a04d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 25 deletions.
2 changes: 1 addition & 1 deletion cruntime/conf/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ modules.dir=file://${user.dir}/modules

felix.auto.start.2 = ${modules.dir}/tfw/redis/onight.tfw.redisimpl-1.0.0.jar \
${modules.dir}/tfw/nio/onight.tfw.otransio-2.0.1.jar \
${modules.dir}/tfw/ssm/onight.tfw.sm-redisimpl-1.0.3.jar \
${modules.dir}/tfw/ssm/onight.tfw.sm-redisimpl-1.0.4.jar \
${modules.dir}/mgame/act/onight.mgame.actmysql-1.0.0.jar \
file:///Users/brew/Documents/KJ/MING/git/mgame/act/actcore/build/libs/onight.mgame.actcore-1.0.1.jar

Expand Down
13 changes: 4 additions & 9 deletions cruntime/conf/init.d/sm.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ sm.jdbc.usr=root
sm.jdbc.pwd=000000


sm.jdbc.sql.select.loginid = SELECT LOGIN_ID,STATUS,PASSWORD,USER_ID FROM TFG_LOGIN_USER WHERE LOGIN_ID=? AND STATUS=1

#sm.jdbc.sql.select.loginid = SELECT LOGIN_ID,STATUS,PASSWORD FROM TFG_LOGIN_USER WHERE LOGIN_ID=? AND STATUS=1



#sm.jdbc.sql.select.user_id = SELECT LOGIN_ID,STATUS,PASSWORD,TRADE_PASSWORD FROM TFG_LOGIN_USER WHERE USER_ID=? AND STATUS=1
sm.jdbc.sql.select.login_id = SELECT LOGIN_ID,MOBILE,STATUS,PASSWORD FROM TFG_LOGIN_USER WHERE LOGIN_ID=? AND STATUS=1
sm.jdbc.sql.select.mobile = SELECT LOGIN_ID,MOBILE,STATUS,PASSWORD FROM TFG_LOGIN_USER WHERE MOBILE=? AND STATUS=1
sm.jdbc.sql.select.user_id = SELECT USER_ID,LOGIN_ID,STATUS,PASSWORD,TRADE_PASSWORD FROM TFG_LOGIN_USER WHERE USER_ID=? AND STATUS=0
sm.jdbc.sql.select.login_id = SELECT USER_ID,LOGIN_ID,MOBILE,STATUS,PASSWORD FROM TFG_LOGIN_USER WHERE LOGIN_ID=? AND STATUS=0
sm.jdbc.sql.select.mobile = SELECT USER_ID,LOGIN_ID,MOBILE,STATUS,PASSWORD FROM TFG_LOGIN_USER WHERE MOBILE=? AND STATUS=0
sm.jdbc.sql.select.email = SELECT USER_ID,LOGIN_ID,MOBILE,STATUS,PASSWORD FROM TFG_LOGIN_USER WHERE EMAIL=? AND STATUS=0
6 changes: 3 additions & 3 deletions cruntime/conf/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
</encoder>
</appender>

<root level="ERROR">
<!-- <appender-ref ref="STDOUT" /> -->
<appender-ref ref="FILE" />
<root level="debug">
<appender-ref ref="STDOUT" />
<!-- <appender-ref ref="FILE" /> -->
</root>

<logger name="org.eclipse.jetty" level="info">
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ object CGWMsgMergeService extends OLog with PBUtils with LService[PWMergeProxy]
forwordpack.getExtHead.appendFrom(proxypack.getExts.getBytes)
forwordpack.getExtHead().getHiddenkvs.putAll(pack.getExtHead.getHiddenkvs);
forwordpack.getExtHead().getIgnorekvs.putAll(pack.getExtHead.getIgnorekvs);

forwordpack.setBody(proxypack.getJsbody.getBytes)
val cb = new CallBack[FramePacket]() {
def onSuccess(v: FramePacket) {
Expand All @@ -157,37 +157,36 @@ object CGWMsgMergeService extends OLog with PBUtils with LService[PWMergeProxy]
val srcnode = jsonmapper.readTree(pbv.getJsbody)
log.debug("srcnode=" + srcnode)
log.debug("dstnode=" + dstnode)
var overrided = false;
var overrided: Int = 0;
proxypack.getClonefieldsList.foreach { key =>
//replace with last packet element
val keys = key.split("->");
if (keys.length == 2) {
// log.debug("replaceKEY:{}", keys);
// log.debug("replaceKEY:{}", keys);
val v = getAndSetvalue(srcnode, getpathkey(keys(0)), "", None)
if (v != MissingNode.getInstance) {
if (getAndSetvalue(dstnode, getpathkey(keys(1)), "", Some(v)) != MissingNode.getInstance) {
// log.debug("overrided:OK.for key:,dstnode=:{}" + dstnode)
overrided = true;

// log.debug("overrided:OK.for key:,dstnode=:{}" + dstnode)
overrided = overrided + 1;
}
}
}
}
if (overrided) {
// log.debug("overrided:OK.for key:,dstnode=:{}" + dstnode)
if (overrided != proxypack.getClonefieldsList.size()) {
log.debug("cannot send to next because props not found");
Future { PBFramePacket.newBuilder() }
} else {
// log.debug("overrided:OK.for key:,dstnode=:{}" + dstnode)
nextPacketbuilder.setJsbody(dstnode.toString());
proxyPacket(v, nextPacketbuilder.build(), nextp)
} else {
proxyPacket(v, xp, nextp)
}
} else {
proxyPacket(v, xp, nextp)

}
}
Future.sequence(nexts).onComplete { results =>
results.map(_.map { result =>
// log.debug("next.merge:OK:" + result)
// log.debug("next.merge:OK:" + result)
pbv.addNextpacks(result)
})
p.success(pbv);
Expand Down

0 comments on commit af6a04d

Please sign in to comment.