初始化
This commit is contained in:
@ -160,13 +160,6 @@
|
|||||||
<version>2.0.1.Final</version>
|
<version>2.0.1.Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dromara</groupId>
|
|
||||||
<artifactId>ruoyi-system</artifactId>
|
|
||||||
<version>2.1.2</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@ -1,12 +1,15 @@
|
|||||||
package org.dromara.payment.channel.mapper;
|
package org.dromara.payment.channel.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.dromara.payment.channel.domain.BusChannelProduct;
|
import org.dromara.payment.channel.domain.BusChannelProduct;
|
||||||
import org.dromara.payment.channel.domain.bo.BusChannelProductBo;
|
import org.dromara.payment.channel.domain.bo.BusChannelProductBo;
|
||||||
import org.dromara.payment.channel.domain.vo.BusChannelProductVo;
|
import org.dromara.payment.channel.domain.vo.BusChannelProductVo;
|
||||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
import org.dromara.payment.merchant.domain.vo.BusMerchantProductVo;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -30,6 +33,14 @@ public interface BusChannelProductMapper extends BaseMapperPlus<BusChannelProduc
|
|||||||
|
|
||||||
List<BusChannelProductVo> selectAgentProInfos(Map map);
|
List<BusChannelProductVo> selectAgentProInfos(Map map);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查代理商产品页
|
||||||
|
* @param page
|
||||||
|
* @param wrapper
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<BusMerchantProductVo> selectProducts(@Param("page") IPage page, @Param(Constants.WRAPPER) Wrapper wrapper);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @Param
|
* @Param
|
||||||
|
|||||||
@ -22,6 +22,8 @@ import org.dromara.payment.channel.domain.vo.BusChannelProductVo;
|
|||||||
import org.dromara.payment.channel.mapper.BusChannelProductMapper;
|
import org.dromara.payment.channel.mapper.BusChannelProductMapper;
|
||||||
import org.dromara.payment.merchant.domain.BusMerchant;
|
import org.dromara.payment.merchant.domain.BusMerchant;
|
||||||
import org.dromara.payment.merchant.mapper.BusMerchantMapper;
|
import org.dromara.payment.merchant.mapper.BusMerchantMapper;
|
||||||
|
import org.dromara.payment.operator.domain.BusOperatorProduct;
|
||||||
|
import org.dromara.payment.operator.mapper.BusOperatorProductMapper;
|
||||||
import org.dromara.payment.sys.domain.SysSyd;
|
import org.dromara.payment.sys.domain.SysSyd;
|
||||||
import org.dromara.payment.sys.mapper.SysSydMapper;
|
import org.dromara.payment.sys.mapper.SysSydMapper;
|
||||||
import org.dromara.payment.thirdPlatform.base.domain.SysThirdPlatform;
|
import org.dromara.payment.thirdPlatform.base.domain.SysThirdPlatform;
|
||||||
@ -54,6 +56,8 @@ public class BusMerchantProductServiceImpl extends BaseService implements IBusMe
|
|||||||
|
|
||||||
private final BusChannelProductMapper busChannelProductMapper;
|
private final BusChannelProductMapper busChannelProductMapper;
|
||||||
|
|
||||||
|
private final BusOperatorProductMapper busOperatorProductMapper;
|
||||||
|
|
||||||
private final BusMerchantMapper busMerchantMapper;
|
private final BusMerchantMapper busMerchantMapper;
|
||||||
|
|
||||||
private final IXyjService xyjService;
|
private final IXyjService xyjService;
|
||||||
@ -83,24 +87,44 @@ public class BusMerchantProductServiceImpl extends BaseService implements IBusMe
|
|||||||
if(bo.getMerId() == null){
|
if(bo.getMerId() == null){
|
||||||
this.invalidationParamsException("企业ID不能为空");
|
this.invalidationParamsException("企业ID不能为空");
|
||||||
}
|
}
|
||||||
|
BusMerchant busMerchant = busMerchantMapper.selectById(bo.getMerId());
|
||||||
|
//代理商编号
|
||||||
|
String agentNo = busMerchant.getAgentNo();
|
||||||
|
//运营商编号
|
||||||
|
String operatorNo = busMerchant.getOperatorNo();
|
||||||
QueryWrapper<BusMerchantProduct> lqw = Wrappers.query();
|
QueryWrapper<BusMerchantProduct> lqw = Wrappers.query();
|
||||||
lqw.eq("t1.bus_type",bo.getBusType());
|
lqw.eq("t1.bus_type",bo.getBusType());
|
||||||
lqw.eq("t.mer_id",bo.getMerId());
|
|
||||||
lqw.eq("t3.pro_status",1);
|
|
||||||
lqw.eq("t1.pro_status",1);
|
lqw.eq("t1.pro_status",1);
|
||||||
if(!LoginHelper.isSuperAdmin()){
|
Page<BusMerchantProductVo> result = new Page<>();
|
||||||
lqw.eq("t1.channel_id",LoginHelper.getBusId());
|
//判断代理商编号是否都不为空
|
||||||
}
|
if(StringUtils.isNotBlank(agentNo)){
|
||||||
|
lqw.eq("t1.channel_no",agentNo);
|
||||||
|
lqw.eq("t1.op_no",operatorNo);
|
||||||
|
//查代理商的产品
|
||||||
Page<BusMerchantProductVo> result = baseMapper.selBusMerProByTypeList(pageQuery.build(), lqw);
|
result = busChannelProductMapper.selectProducts(pageQuery.build(), lqw);
|
||||||
result.getRecords().forEach(item->{
|
result.getRecords().forEach(item->{
|
||||||
item.setUnId(IdUtil.getSnowflakeNextId()+"");
|
item.setUnId(IdUtil.getSnowflakeNextId()+"");
|
||||||
});
|
});
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
|
//判断运营商是否为空
|
||||||
|
}else if(StringUtils.isNotBlank(operatorNo)){
|
||||||
|
lqw.eq("t1.op_no",operatorNo);
|
||||||
|
//查运营商的产品
|
||||||
|
result = busOperatorProductMapper.selectProducts(pageQuery.build(), lqw);
|
||||||
|
result.getRecords().forEach(item->{
|
||||||
|
item.setUnId(IdUtil.getSnowflakeNextId()+"");
|
||||||
|
});
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
return new TableDataInfo<>(null,0);
|
||||||
|
|
||||||
|
|
||||||
|
// if(!LoginHelper.isSuperAdmin()){
|
||||||
|
// lqw.eq("t1.channel_id",LoginHelper.getBusId());
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Page<BusMerchantProductVo> result = baseMapper.selBusMerProByTypeList(pageQuery.build(), lqw);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -82,9 +82,6 @@ public class BusMerchantServiceImpl extends BaseService implements IBusMerchantS
|
|||||||
public TableDataInfo<BusMerchantVo> queryPageList(BusMerchantBo bo, PageQuery pageQuery) {
|
public TableDataInfo<BusMerchantVo> queryPageList(BusMerchantBo bo, PageQuery pageQuery) {
|
||||||
QueryWrapper<BusMerchant> lqw = Wrappers.query();
|
QueryWrapper<BusMerchant> lqw = Wrappers.query();
|
||||||
if (!LoginHelper.isSuperAdmin()){
|
if (!LoginHelper.isSuperAdmin()){
|
||||||
lqw.between(bo.getStartTime() != null,"t.create_time",bo.getStartTime(),bo.getEndTime());
|
|
||||||
lqw.like(StringUtils.isNotEmpty(bo.getName()),"t.name",bo.getName());
|
|
||||||
lqw.like(StringUtils.isNotEmpty(bo.getNo()),"t.no",bo.getNo());
|
|
||||||
lqw.like(StringUtils.isNotEmpty(bo.getScaleName()),"s.name",bo.getScaleName());
|
lqw.like(StringUtils.isNotEmpty(bo.getScaleName()),"s.name",bo.getScaleName());
|
||||||
if(bo.getIsProduct() != null && bo.getIsProduct() == 1){
|
if(bo.getIsProduct() != null && bo.getIsProduct() == 1){
|
||||||
lqw.eq("t.create_unit_id",LoginHelper.getBusId());
|
lqw.eq("t.create_unit_id",LoginHelper.getBusId());
|
||||||
@ -94,6 +91,9 @@ public class BusMerchantServiceImpl extends BaseService implements IBusMerchantS
|
|||||||
lqw.inSql("t.id","select distinct mer_id from bus_merchant_product tt where tt.syd_id ="+LoginHelper.getBusId());
|
lqw.inSql("t.id","select distinct mer_id from bus_merchant_product tt where tt.syd_id ="+LoginHelper.getBusId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lqw.between(bo.getStartTime() != null,"t.create_time",bo.getStartTime(),bo.getEndTime());
|
||||||
|
lqw.like(StringUtils.isNotEmpty(bo.getName()),"t.name",bo.getName());
|
||||||
|
lqw.like(StringUtils.isNotEmpty(bo.getNo()),"t.no",bo.getNo());
|
||||||
|
|
||||||
lqw.orderByDesc("t.create_time");
|
lqw.orderByDesc("t.create_time");
|
||||||
Page<BusMerchantVo> result = baseMapper.selectMerchantList(pageQuery.build(), lqw);
|
Page<BusMerchantVo> result = baseMapper.selectMerchantList(pageQuery.build(), lqw);
|
||||||
|
|||||||
@ -1,11 +1,14 @@
|
|||||||
package org.dromara.payment.operator.mapper;
|
package org.dromara.payment.operator.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.dromara.payment.channel.domain.BusChannelProduct;
|
import org.dromara.payment.channel.domain.BusChannelProduct;
|
||||||
|
import org.dromara.payment.merchant.domain.BusMerchantProduct;
|
||||||
|
import org.dromara.payment.merchant.domain.vo.BusMerchantProductVo;
|
||||||
import org.dromara.payment.merchant.domain.vo.BusMerchantVo;
|
import org.dromara.payment.merchant.domain.vo.BusMerchantVo;
|
||||||
import org.dromara.payment.operator.domain.BusOperatorProduct;
|
import org.dromara.payment.operator.domain.BusOperatorProduct;
|
||||||
import org.dromara.payment.operator.domain.bo.AllocOperatorProductBo;
|
import org.dromara.payment.operator.domain.bo.AllocOperatorProductBo;
|
||||||
@ -57,4 +60,6 @@ public interface BusOperatorProductMapper extends BaseMapperPlus<BusOperatorProd
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Page<BusOperatorProductVo> setingOpratorProductList(@Param("page") IPage page, @Param(Constants.WRAPPER) Wrapper wrapper,@Param("opId") Long opId);
|
Page<BusOperatorProductVo> setingOpratorProductList(@Param("page") IPage page, @Param(Constants.WRAPPER) Wrapper wrapper,@Param("opId") Long opId);
|
||||||
|
|
||||||
|
Page<BusMerchantProductVo> selectProducts(Page<Object> build, QueryWrapper<BusMerchantProduct> lqw);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,13 +3,10 @@ package org.dromara.payment.worker.service.impl;
|
|||||||
import com.tencentcloudapi.common.profile.ClientProfile;
|
import com.tencentcloudapi.common.profile.ClientProfile;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
import org.dromara.common.core.constant.MpContants;
|
|
||||||
import org.dromara.common.core.exception.base.BaseException;
|
import org.dromara.common.core.exception.base.BaseException;
|
||||||
import org.dromara.common.core.service.BaseService;
|
import org.dromara.common.core.service.BaseService;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.json.utils.JsonUtils;
|
import org.dromara.common.json.utils.JsonUtils;
|
||||||
import org.dromara.common.redis.utils.RedisUtils;
|
|
||||||
import org.dromara.payment.worker.domain.SysUnitDomain;
|
|
||||||
import org.dromara.payment.worker.domain.ThirdConf;
|
import org.dromara.payment.worker.domain.ThirdConf;
|
||||||
import org.dromara.payment.worker.service.IIdCardAndOtherService;
|
import org.dromara.payment.worker.service.IIdCardAndOtherService;
|
||||||
import org.dromara.system.api.RemoteConfigService;
|
import org.dromara.system.api.RemoteConfigService;
|
||||||
|
|||||||
@ -1,10 +1,38 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.dromara.payment.channel.mapper.BusChannelProductMapper">
|
<mapper namespace="org.dromara.payment.channel.mapper.BusChannelProductMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<!--查询代理商的产品信息 -->
|
||||||
|
<select id="selectProducts" resultType="org.dromara.payment.merchant.domain.vo.BusMerchantProductVo">
|
||||||
|
SELECT
|
||||||
|
t2.id,
|
||||||
|
t3.id pro_id,
|
||||||
|
t3.NO pro_no,
|
||||||
|
t4.NO syd_no,
|
||||||
|
t4.gsmc service_name,
|
||||||
|
t1.bus_type,
|
||||||
|
t1.service_charge cost_service_charge,
|
||||||
|
t2.service_charge,
|
||||||
|
t1.charge_mode,
|
||||||
|
t1.settlement_style,
|
||||||
|
t1.max_month,
|
||||||
|
t1.invoice_type,
|
||||||
|
t1.invoice_items,
|
||||||
|
t2.pro_status,
|
||||||
|
t4.id syd_id,
|
||||||
|
t4.NO syd_no
|
||||||
|
FROM
|
||||||
|
bus_channel_product t1
|
||||||
|
|
||||||
|
LEFT JOIN bus_merchant_product t2 ON t2.pro_id = t1.pro_id AND t2.channel_id = t1.channel_id
|
||||||
|
LEFT JOIN sys_syd_product t3 ON t3.id = t1.pro_id
|
||||||
|
LEFT JOIN sys_syd t4 ON t4.id = t1.syd_id
|
||||||
|
|
||||||
|
${ew.getCustomSqlSegment}
|
||||||
|
</select>
|
||||||
|
|
||||||
<!--查询代理商的产品信息 -->
|
<!--查询代理商的产品信息 -->
|
||||||
<select id="selectAgentProInfos" parameterType="map" resultType="org.dromara.payment.channel.domain.vo.BusChannelProductVo">
|
<select id="selectAgentProInfos" parameterType="map" resultType="org.dromara.payment.channel.domain.vo.BusChannelProductVo">
|
||||||
|
|||||||
@ -1,9 +1,39 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.dromara.payment.operator.mapper.BusOperatorProductMapper">
|
<mapper namespace="org.dromara.payment.operator.mapper.BusOperatorProductMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<!--查询代理商的产品信息 -->
|
||||||
|
<select id="selectProducts" resultType="org.dromara.payment.merchant.domain.vo.BusMerchantProductVo">
|
||||||
|
SELECT
|
||||||
|
t2.id,
|
||||||
|
t3.id pro_id,
|
||||||
|
t3.NO pro_no,
|
||||||
|
t4.NO syd_no,
|
||||||
|
t4.gsmc service_name,
|
||||||
|
t1.bus_type,
|
||||||
|
t1.service_charge cost_service_charge,
|
||||||
|
t2.service_charge,
|
||||||
|
t1.charge_mode,
|
||||||
|
t1.settlement_style,
|
||||||
|
t1.max_month,
|
||||||
|
t1.invoice_type,
|
||||||
|
t1.invoice_items,
|
||||||
|
t2.pro_status,
|
||||||
|
t4.id syd_id,
|
||||||
|
t4.NO syd_no
|
||||||
|
FROM
|
||||||
|
bus_operator_product t1
|
||||||
|
|
||||||
|
LEFT JOIN bus_merchant_product t2 ON t2.pro_id = t1.pro_id AND t2.channel_id = t1.channel_id
|
||||||
|
LEFT JOIN sys_syd_product t3 ON t3.id = t1.pro_id
|
||||||
|
LEFT JOIN sys_syd t4 ON t4.id = t1.syd_id
|
||||||
|
|
||||||
|
${ew.getCustomSqlSegment}
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="allocOperatorProduct">
|
<insert id="allocOperatorProduct">
|
||||||
INSERT INTO `bus_operator_product` (
|
INSERT INTO `bus_operator_product` (
|
||||||
`syd_id`,
|
`syd_id`,
|
||||||
@ -84,11 +114,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<!-- <update id="updateChannelProCostCharge" parameterType="map">-->
|
<!-- <update id="updateChannelProCostCharge" parameterType="map">-->
|
||||||
<!-- <foreach collection="proList" item="item" index="index" separator="," >-->
|
<!-- <foreach collection="proList" item="item" index="index" separator="," >-->
|
||||||
<!-- update bus_channel_product set cost_service_charge = #{item.cost_service_charge} where op_id =#{item.op_id} and pro_id= #{item.pro_id} and up_is_op = 1-->
|
<!-- update bus_channel_product set cost_service_charge = #{item.cost_service_charge} where op_id =#{item.op_id} and pro_id= #{item.pro_id} and up_is_op = 1-->
|
||||||
<!-- </foreach>-->
|
<!-- </foreach>-->
|
||||||
<!-- </update>-->
|
<!-- </update>-->
|
||||||
|
|
||||||
<update id="updateChannelProCostCharge" parameterType="map">
|
<update id="updateChannelProCostCharge" parameterType="map">
|
||||||
UPDATE bus_channel_product
|
UPDATE bus_channel_product
|
||||||
|
|||||||
Reference in New Issue
Block a user