| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.AbstractServiceCmdListener; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.AuthenticationFactory; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | * 保存编码映射处理类 |
| | | */ |
| | | @Java110Cmd(serviceCode = "login.pcUserLogin") |
| | | public class PcUserLoginCmd extends AbstractServiceCmdListener { |
| | | public class PcUserLoginCmd extends Cmd { |
| | | private final static Logger logger = LoggerFactory.getLogger(PcUserLoginCmd.class); |
| | | @Autowired |
| | | private IUserLoginInnerServiceSMO userLoginInnerServiceSMOImpl; |
| | |
| | | |
| | | @Autowired |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | String paramIn = cmdDataFlowContext.getReqData(); |
| | | Assert.isJsonObject(paramIn, "用户注册请求参数有误,不是有效的json格式 " + paramIn); |
| | | Assert.jsonObjectHaveKey(paramIn, "username", "用户登录,未包含username节点,请检查" + paramIn); |
| | |
| | | } |
| | | |
| | | @Override |
| | | protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | ResponseEntity responseEntity = null; |
| | | JSONObject paramInJson = JSONObject.parseObject(cmdDataFlowContext.getReqData()); |
| | |
| | | throw new SMOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "系统内部错误,请联系管理员"); |
| | | } |
| | | } |
| | | |
| | | } |