add gatewayMerchant applyid check

master
luoyang 5 years ago
parent 7ed35a4985
commit c869da45f3

@ -83,7 +83,7 @@ public class GatewayMerchantApplyImpl implements GatewayMerchantApply {
ClientRegisterInfo registerBean = JSONObject.toJavaObject(registerInfo, ClientRegisterInfo.class); ClientRegisterInfo registerBean = JSONObject.toJavaObject(registerInfo, ClientRegisterInfo.class);
registerBean.checkParamsInvalid(); registerBean.checkParamsInvalid();
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
JSONObject manager = managerMapper.findAvailableByLoginId(registerBean.getApplyId()); JSONObject manager = managerMapper.findAvailableByLoginIdAndOrgId(registerBean.getApplyId(), org.getString("org_id"));
if (manager == null) { if (manager == null) {
throw new ParamInvalidException("applyId","applyId is invalid"); throw new ParamInvalidException("applyId","applyId is invalid");
} }

@ -1,12 +1,12 @@
package au.com.royalpay.payment.manage.mappers.system; package au.com.royalpay.payment.manage.mappers.system;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import com.yixsoft.support.mybatis.autosql.annotations.AdvanceSelect; import com.yixsoft.support.mybatis.autosql.annotations.AdvanceSelect;
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper; import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql; import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
import com.yixsoft.support.mybatis.autosql.annotations.SqlType; import com.yixsoft.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
@ -28,6 +28,10 @@ public interface ManagerMapper {
@AdvanceSelect(addonWhereClause = "is_valid=1") @AdvanceSelect(addonWhereClause = "is_valid=1")
JSONObject findAvailableByLoginId(@Param("username") String loginId); JSONObject findAvailableByLoginId(@Param("username") String loginId);
@AutoSql(SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid=1")
JSONObject findAvailableByLoginIdAndOrgId(@Param("username") String loginId, @Param("org_id") String orgId);
@AutoSql(SqlType.SELECT) @AutoSql(SqlType.SELECT)
JSONObject findByLoginId(@Param("username") String loginId); JSONObject findByLoginId(@Param("username") String loginId);

Loading…
Cancel
Save