增加鉴权查询接口
This commit is contained in:
+65
@@ -0,0 +1,65 @@
|
||||
package com.murong.ecp.netpay.mbu.web.opn.action.buiopnbpc1;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.murong.ecp.netpay.mbu.web.common.utils.*;
|
||||
import com.murong.ecp.netpay.mbu.web.opn.dal.dao.OpnStrategyAuthInfMapper;
|
||||
import com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnStrategyAuthInfDO;
|
||||
import com.murong.ecp.netpay.mbu.web.opn.model.OpnStrategyAuthInfListByGatewayAndStrategyReqBO;
|
||||
import com.murong.ecp.netpay.mbu.web.opn.model.OpnStrategyAuthInfListReqBO;
|
||||
import com.yuangou.ecp.biz.transengine.sqlsession.YGPageEntity;
|
||||
import com.yuangou.ecp.bp.core.common.exception.YGException;
|
||||
import com.yuangou.ecp.bp.core.common.message.YGBizMessage;
|
||||
import com.yuangou.ecp.bp.core.common.message.YGBizMessageContext;
|
||||
import com.yuangou.ecp.bp.core.common.message.YGEDB;
|
||||
import com.yuangou.ecp.bp.core.common.yglog4j.Logger;
|
||||
import com.yuangou.ecp.bp.core.common.yglog4j.YGLogger;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 策略信息表-鉴权管理服务
|
||||
* Created by xu_lw on 2019-08-30 17:27:56.
|
||||
*/
|
||||
@Service("opnstrategyauthinflistByGatewayAndStrategy")
|
||||
@Slf4j
|
||||
public class OpnStrategyAuthInfListByGatewayAndStrategyAction extends BaseAction {
|
||||
@Autowired
|
||||
private OpnStrategyAuthInfMapper opnStrategyAuthInfMapper;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param bizCtx 上下文
|
||||
* @param reqBO 请求对象
|
||||
* @return
|
||||
* @throws YGException
|
||||
*/
|
||||
public ResultT execute(YGBizMessageContext bizCtx, OpnStrategyAuthInfListByGatewayAndStrategyReqBO reqBO) throws YGException {
|
||||
YGBizMessage bizMsg = bizCtx.getCurrentMsg();
|
||||
Logger msgLog = YGLogger.getLogger(bizMsg);
|
||||
YGEDB root = bizMsg.getEDBBody();
|
||||
msgLog.info("list, reqBO=" + JSONObject.toJSON(reqBO));
|
||||
|
||||
ValidatorUtil.validateObject(reqBO);
|
||||
|
||||
OpnStrategyAuthInfDO entity = new OpnStrategyAuthInfDO();
|
||||
BeanUtils.copyProperties(reqBO, entity);
|
||||
|
||||
List<OpnStrategyAuthInfDO> list = opnStrategyAuthInfMapper.selectByGatewayAndStrategy(reqBO.getGatewayId(), reqBO.getStrategyId());
|
||||
|
||||
ResultT resultT = new ResultT();
|
||||
if (list == null || list.isEmpty()) {
|
||||
resultT.setMsgCod(CommonMessageCode.REC_NFND);
|
||||
} else {
|
||||
resultT.setMsgCod(CommonMessageCode.SUCC);
|
||||
resultT.setData(list);
|
||||
}
|
||||
|
||||
return resultT;
|
||||
}
|
||||
}
|
||||
+4
@@ -34,4 +34,8 @@ public interface OpnStrategyAuthInfMapper {
|
||||
YGSqlCursor selectCursor(OpnStrategyAuthInfDO entity);
|
||||
|
||||
void selectResultHandler(OpnStrategyAuthInfDO entity, YGResultHandler resultHandler);
|
||||
|
||||
|
||||
List<OpnStrategyAuthInfDO> selectByGatewayAndStrategy(Long gatewayId, Long strategyId);
|
||||
|
||||
}
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.murong.ecp.netpay.mbu.web.opn.model;
|
||||
|
||||
import com.murong.ecp.bp.common.dict.ECPDict;
|
||||
import com.murong.ecp.netpay.mbu.web.common.utils.PageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Created by syxlw on 2018/4/28.
|
||||
*/
|
||||
@Data
|
||||
public class OpnStrategyAuthInfListByGatewayAndStrategyReqBO extends PageRequest {
|
||||
/**
|
||||
* search
|
||||
*/
|
||||
@ECPDict(required = true, message = "gatewayId值不合法")
|
||||
private Long gatewayId;
|
||||
|
||||
@ECPDict(required = true, message = "strategyId值不合法")
|
||||
private Long strategyId;
|
||||
}
|
||||
@@ -126,4 +126,12 @@
|
||||
<if test="isNotNull(remark)">remark=#{remark},</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<select id="selectByGatewayAndStrategy" resultType="com.murong.ecp.netpay.mbu.web.opn.dal.entity.OpnStrategyAuthInfDO">
|
||||
select
|
||||
<include refid="base_column_list"/>
|
||||
from T_OPN_STRATEGY_AUTH_INF where gateway_id = #{gatewayId} and strategy_id = #{strategyId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user