添加汇付支付
This commit is contained in:
parent
de1c3764fb
commit
e9d6ead522
|
|
@ -5,7 +5,13 @@ import cn.hutool.json.JSONUtil;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.common.system.config.RespBody;
|
||||
import com.chaozhanggui.dao.system.dao.TbPlussMerchantBaseInfoMapper;
|
||||
import com.chaozhanggui.dao.system.dao.TbPlussMerchantChannelStatusMapper;
|
||||
import com.chaozhanggui.dao.system.dao.TbPlussMerchantHfInfoMapper;
|
||||
import com.chaozhanggui.dao.system.dao.TbPlussUserAppMapper;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussMerchantBaseInfo;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelStatus;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussMerchantHfInfo;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussUserApp;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -38,6 +44,17 @@ public class OpenNessController {
|
|||
TbPlussMerchantBaseInfoMapper tbPlussMerchantBaseInfoMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
TbPlussUserAppMapper tbPlussUserAppMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
TbPlussMerchantChannelStatusMapper tbPlussMerchantChannelStatusMapper;
|
||||
|
||||
@Autowired
|
||||
TbPlussMerchantHfInfoMapper tbPlussMerchantHfInfoMapper;
|
||||
|
||||
|
||||
@Value("${openness.apiurl}")
|
||||
private String apiurl;
|
||||
|
||||
|
|
@ -154,7 +171,7 @@ public class OpenNessController {
|
|||
|
||||
|
||||
@RequestMapping("queryOrgan")
|
||||
public RespBody queryOrgan(@RequestHeader("userId") String userId,@RequestBody Map<String,Object> map){
|
||||
public RespBody queryOrgan(@RequestHeader("userId") String userId){
|
||||
|
||||
TbPlussMerchantBaseInfo baseInfo= tbPlussMerchantBaseInfoMapper.selectByUserId(userId);
|
||||
if(ObjectUtil.isEmpty(baseInfo)){
|
||||
|
|
@ -166,9 +183,63 @@ public class OpenNessController {
|
|||
|
||||
JSONObject object=new JSONObject();
|
||||
object.put("merchantCode",baseInfo.getMerchantcode());
|
||||
if(ObjectUtil.isNotEmpty(map)&&map.size()>0){
|
||||
for(String key:map.keySet()){
|
||||
object.put(key,map.get(key));
|
||||
object.put("merchantName",baseInfo.getMerchantname());
|
||||
object.put("merchantType",baseInfo.getMerchanttype());
|
||||
object.put("merchantAlias",baseInfo.getAlias());
|
||||
object.put("contactsName",baseInfo.getContactname());
|
||||
object.put("contactsPhone",baseInfo.getContactmobile());
|
||||
object.put("contactsEmail",baseInfo.getEmail());
|
||||
object.put("mccCode",baseInfo.getMcc());
|
||||
object.put("provinceCode",baseInfo.getProvinceCode());
|
||||
object.put("provinceName",baseInfo.getProvince());
|
||||
object.put("cityCode",baseInfo.getCityCode());
|
||||
|
||||
TbPlussUserApp userApp= tbPlussUserAppMapper.selectBySubMerchantCode(baseInfo.getMerchantcode());
|
||||
if(userApp==null){
|
||||
userApp=tbPlussUserAppMapper.selectByLoginName();
|
||||
}
|
||||
|
||||
object.put("inviteCode",userApp.getInvitenum());
|
||||
|
||||
List<TbPlussMerchantChannelStatus> statusList= tbPlussMerchantChannelStatusMapper.getByMerchantCodesAudit(baseInfo.getMerchantcode());
|
||||
if(statusList!=null){
|
||||
for (TbPlussMerchantChannelStatus channelStatus : statusList) {
|
||||
if(ObjectUtil.isNotEmpty(channelStatus.getChannel())&&channelStatus.getChannel()!=null){
|
||||
switch (channelStatus.getChannel()){
|
||||
case 1 :
|
||||
break;
|
||||
case 2 :
|
||||
break;
|
||||
case 3 :
|
||||
break;
|
||||
case 4 :
|
||||
break;
|
||||
case 5 :
|
||||
break;
|
||||
case 6 :
|
||||
break;
|
||||
case 7 :
|
||||
TbPlussMerchantHfInfo hfInfo= tbPlussMerchantHfInfoMapper.selectByMerchantCode(baseInfo.getMerchantcode());
|
||||
if(hfInfo!=null){
|
||||
object.put("channelNo","7");
|
||||
object.put("testApiKey",hfInfo.getTestApiKey());
|
||||
object.put("liveApiKey",hfInfo.getLiveApiKey());
|
||||
object.put("appIdList",hfInfo.getAppIdList());
|
||||
object.put("appId",hfInfo.getAppId());
|
||||
object.put("appName",hfInfo.getAppName());
|
||||
object.put("pucKey",hfInfo.getPucKey());
|
||||
object.put("privKey",hfInfo.getPrivKey());
|
||||
object.put("loginPwd",hfInfo.getLoginPwd());
|
||||
object.put("subAppId","");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
}else {
|
||||
return new RespBody("000000");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,6 @@ sxf:
|
|||
orgId: "02668880"
|
||||
publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjo1+KBcvwDSIo+nMYLeOJ19Ju4ii0xH66ZxFd869EWFWk/EJa3xIA2+4qGf/Ic7m7zi/NHuCnfUtUDmUdP0JfaZiYwn+1Ek7tYAOc1+1GxhzcexSJLyJlR2JLMfEM+rZooW4Ei7q3a8jdTWUNoak/bVPXnLEVLrbIguXABERQ0Ze0X9Fs0y/zkQFg8UjxUN88g2CRfMC6LldHm7UBo+d+WlpOYH7u0OTzoLLiP/04N1cfTgjjtqTBI7qkOGxYs6aBZHG1DJ6WdP+5w+ho91sBTVajsCxAaMoExWQM2ipf/1qGdsWmkZScPflBqg7m0olOD87ymAVP/3Tcbvi34bDfwIDAQAB
|
||||
openness:
|
||||
angenturl: https://p40312246f.goho.co/proxy/agent/registeragent
|
||||
angenturl: https://openpm.sxczgkj.cn/proxy/agent/registeragent
|
||||
customerurl:
|
||||
apiurl: https://openformweb.sxczgkj.cn/opennssService
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.chaozhanggui.dao.system.entity.TbPlussUserApp;
|
|||
import com.chaozhanggui.dao.system.model.ProfitPO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -31,4 +32,10 @@ public interface TbPlussUserAppMapper {
|
|||
int countByInviteNum(String inviteNum);
|
||||
|
||||
List<ProfitPO> selectProfit(@Param("userId") String userId, @Param("orderNumber") String orderNumber, @Param("merchantCode") String merchantCode);
|
||||
|
||||
|
||||
TbPlussUserApp selectBySubMerchantCode(@Param("merchantCode") String merchantCode);
|
||||
|
||||
TbPlussUserApp selectByLoginName();
|
||||
|
||||
}
|
||||
|
|
@ -578,4 +578,25 @@
|
|||
from tb_pluss_user_app
|
||||
where merchantCode=#{merchantCode}
|
||||
</select>
|
||||
|
||||
<select id="selectBySubMerchantCode" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
tb_pluss_user_app
|
||||
WHERE
|
||||
id =(
|
||||
SELECT
|
||||
parentId
|
||||
FROM
|
||||
tb_pluss_user_app
|
||||
WHERE
|
||||
merchantCode = #{merchantCode}
|
||||
and userType='promoter'
|
||||
);
|
||||
</select>
|
||||
|
||||
<select id="selectByLoginName" resultMap="BaseResultMap">
|
||||
select * from tb_pluss_user_app where loginName='admin'
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue