This commit is contained in:
邱贞招 2024-10-29 15:40:19 +08:00
parent 3ba6219aef
commit 7657bfd6aa
20 changed files with 235 additions and 212 deletions

View File

@ -7,6 +7,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.dividendDetail.RlDividendDetail; import com.ruoyi.system.domain.dividendDetail.RlDividendDetail;
import com.ruoyi.system.domain.dividendDetail.RlDividendDetailQuery;
import com.ruoyi.system.domain.dividendDetail.RlDividendDetailVO; import com.ruoyi.system.domain.dividendDetail.RlDividendDetailVO;
import com.ruoyi.system.service.IRlDividendDetailService; import com.ruoyi.system.service.IRlDividendDetailService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -35,7 +36,7 @@ public class RlDividendDetailController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:detail:list')") @PreAuthorize("@ss.hasPermi('system:detail:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(RlDividendDetail rlDividendDetail) public TableDataInfo list(RlDividendDetailQuery rlDividendDetail)
{ {
startPage(); startPage();
List<RlDividendDetailVO> list = rlDividendDetailService.selectRlDividendDetailList(rlDividendDetail); List<RlDividendDetailVO> list = rlDividendDetailService.selectRlDividendDetailList(rlDividendDetail);
@ -48,7 +49,7 @@ public class RlDividendDetailController extends BaseController
@PreAuthorize("@ss.hasPermi('system:detail:export')") @PreAuthorize("@ss.hasPermi('system:detail:export')")
@Log(title = "分账明细", businessType = BusinessType.EXPORT) @Log(title = "分账明细", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, RlDividendDetail rlDividendDetail) public void export(HttpServletResponse response, RlDividendDetailQuery rlDividendDetail)
{ {
List<RlDividendDetailVO> list = rlDividendDetailService.selectRlDividendDetailList(rlDividendDetail); List<RlDividendDetailVO> list = rlDividendDetailService.selectRlDividendDetailList(rlDividendDetail);
ExcelUtil<RlDividendDetailVO> util = new ExcelUtil<RlDividendDetailVO>(RlDividendDetailVO.class); ExcelUtil<RlDividendDetailVO> util = new ExcelUtil<RlDividendDetailVO>(RlDividendDetailVO.class);

View File

@ -10,4 +10,7 @@ public class RlDeliveryOrderQuery extends RlDeliveryOrder{
/** 关键字: 手机号或订单号 */ /** 关键字: 手机号或订单号 */
private String keywords; private String keywords;
/** 代理商名称 */
private String agentName;
} }

View File

@ -1,7 +0,0 @@
package com.ruoyi.system.domain.dividendDetail;
import lombok.Data;
@Data
public class DividendDetailQuery extends RlDividendDetail{
}

View File

@ -0,0 +1,11 @@
package com.ruoyi.system.domain.dividendDetail;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
@Data
public class RlDividendDetailQuery extends RlDividendDetail{
/** 代理商名称 */
private String agentName;
}

View File

@ -47,7 +47,7 @@ public class IndexAdminVo {
private BigDecimal todayIncome; private BigDecimal todayIncome;
/** 今日订单数 */ /** 今日订单数 */
private BigDecimal todayOrderNum; private Integer todayOrderNum;
/** 较昨日营收 */ /** 较昨日营收 */
private BigDecimal comparedYesterdayIncome; private BigDecimal comparedYesterdayIncome;

View File

@ -1,6 +1,7 @@
package com.ruoyi.system.mapper; package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.dividendDetail.RlDividendDetail; import com.ruoyi.system.domain.dividendDetail.RlDividendDetail;
import com.ruoyi.system.domain.dividendDetail.RlDividendDetailQuery;
import com.ruoyi.system.domain.dividendDetail.RlDividendDetailVO; import com.ruoyi.system.domain.dividendDetail.RlDividendDetailVO;
import java.util.List; import java.util.List;
@ -27,7 +28,7 @@ public interface RlDividendDetailMapper
* @param rlDividendDetail 分账明细 * @param rlDividendDetail 分账明细
* @return 分账明细集合 * @return 分账明细集合
*/ */
public List<RlDividendDetailVO> selectRlDividendDetailList(RlDividendDetail rlDividendDetail); public List<RlDividendDetailVO> selectRlDividendDetailList(RlDividendDetailQuery rlDividendDetail);
/** /**
* 新增分账明细 * 新增分账明细

View File

@ -1,6 +1,7 @@
package com.ruoyi.system.service; package com.ruoyi.system.service;
import com.ruoyi.system.domain.dividendDetail.RlDividendDetail; import com.ruoyi.system.domain.dividendDetail.RlDividendDetail;
import com.ruoyi.system.domain.dividendDetail.RlDividendDetailQuery;
import com.ruoyi.system.domain.dividendDetail.RlDividendDetailVO; import com.ruoyi.system.domain.dividendDetail.RlDividendDetailVO;
import com.ruoyi.system.domain.order.RlOrder; import com.ruoyi.system.domain.order.RlOrder;
@ -29,7 +30,7 @@ public interface IRlDividendDetailService
* @param rlDividendDetail 分账明细 * @param rlDividendDetail 分账明细
* @return 分账明细集合 * @return 分账明细集合
*/ */
public List<RlDividendDetailVO> selectRlDividendDetailList(RlDividendDetail rlDividendDetail); public List<RlDividendDetailVO> selectRlDividendDetailList(RlDividendDetailQuery rlDividendDetail);
/** /**
* 根据订单号查询分账明细列表 * 根据订单号查询分账明细列表

View File

@ -4,7 +4,6 @@ import cn.hutool.core.util.ObjectUtil;
import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.system.domain.agent.RlAgent; import com.ruoyi.system.domain.agent.RlAgent;
import com.ruoyi.system.domain.agent.RlAgentVO; import com.ruoyi.system.domain.agent.RlAgentVO;
import com.ruoyi.system.domain.area.RlOperatingArea;
import com.ruoyi.system.domain.area.RlOperatingAreaVO; import com.ruoyi.system.domain.area.RlOperatingAreaVO;
import com.ruoyi.system.domain.cancelRule.RlCancelRule; import com.ruoyi.system.domain.cancelRule.RlCancelRule;
import com.ruoyi.system.mapper.RlAgentMapper; import com.ruoyi.system.mapper.RlAgentMapper;

View File

@ -8,6 +8,7 @@ import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.agent.RlAgentVO; import com.ruoyi.system.domain.agent.RlAgentVO;
import com.ruoyi.system.domain.dividendDetail.RlDividendDetail; import com.ruoyi.system.domain.dividendDetail.RlDividendDetail;
import com.ruoyi.system.domain.dividendDetail.RlDividendDetailQuery;
import com.ruoyi.system.domain.dividendDetail.RlDividendDetailVO; import com.ruoyi.system.domain.dividendDetail.RlDividendDetailVO;
import com.ruoyi.system.domain.order.RlOrder; import com.ruoyi.system.domain.order.RlOrder;
import com.ruoyi.system.domain.userExt.RlUserExt; import com.ruoyi.system.domain.userExt.RlUserExt;
@ -68,7 +69,7 @@ public class RlDividendDetailServiceImpl implements IRlDividendDetailService
*/ */
@Override @Override
@DataScope(agentAlias = "a",userAlias = "u") @DataScope(agentAlias = "a",userAlias = "u")
public List<RlDividendDetailVO> selectRlDividendDetailList(RlDividendDetail rlDividendDetail) public List<RlDividendDetailVO> selectRlDividendDetailList(RlDividendDetailQuery rlDividendDetail)
{ {
return rlDividendDetailMapper.selectRlDividendDetailList(rlDividendDetail); return rlDividendDetailMapper.selectRlDividendDetailList(rlDividendDetail);
} }

View File

@ -203,9 +203,7 @@ public class RlOrderServiceImpl implements IRlOrderService
List<RlOrderOper> rlOrderOpers = rlOrderOperService.selectRlOrderOperList(orderOper); List<RlOrderOper> rlOrderOpers = rlOrderOperService.selectRlOrderOperList(orderOper);
order.setOrderOpers(rlOrderOpers); order.setOrderOpers(rlOrderOpers);
/** 收益明细*/ /** 收益明细*/
RlDividendDetail rlDividendDetail = new RlDividendDetail(); List<RlDividendDetailVO> rlDividendDetails = rlDividendDetailService.selectRlDividendDetailListByOrderNo(orderNo);
rlDividendDetail.setOrderNo(orderNo);
List<RlDividendDetailVO> rlDividendDetails = rlDividendDetailService.selectRlDividendDetailList(rlDividendDetail);
order.setRlDividendDetails(rlDividendDetails); order.setRlDividendDetails(rlDividendDetails);
RlDeliveryOrder deliveryOrder = deliveryOrderService.selectRlDeliveryOrderByOrderNo(orderNo); RlDeliveryOrder deliveryOrder = deliveryOrderService.selectRlDeliveryOrderByOrderNo(orderNo);
@ -741,9 +739,7 @@ public class RlOrderServiceImpl implements IRlOrderService
} }
private void refundDividendHandle(RlOrderVO rlOrderVO, BigDecimal refundPercentage) { private void refundDividendHandle(RlOrderVO rlOrderVO, BigDecimal refundPercentage) {
RlDividendDetail rlDividendDetail = new RlDividendDetail(); List<RlDividendDetailVO> dividendDetails = rlDividendDetailService.selectRlDividendDetailListByOrderNo(rlOrderVO.getOrderNo());
rlDividendDetail.setOrderNo(rlOrderVO.getOrderNo());
List<RlDividendDetailVO> dividendDetails = rlDividendDetailService.selectRlDividendDetailList(rlDividendDetail);
for(RlDividendDetail detail:dividendDetails){ for(RlDividendDetail detail:dividendDetails){
/** 4.1 余额不足判断 */ /** 4.1 余额不足判断 */
RlUserExt rlUserExt = userExtService.selectRlUserExtByUserId(detail.getPartnerId()); RlUserExt rlUserExt = userExtService.selectRlUserExtByUserId(detail.getPartnerId());
@ -916,6 +912,10 @@ public class RlOrderServiceImpl implements IRlOrderService
private IndexAdminVo getIndexAdminVoByAgentId(String startTime, String endTime, DateTimeFormatter formatter, Long agentId,Long merchantId) { private IndexAdminVo getIndexAdminVoByAgentId(String startTime, String endTime, DateTimeFormatter formatter, Long agentId,Long merchantId) {
// 校验输入时间格式并判断时间区间是否超过15天 // 校验输入时间格式并判断时间区间是否超过15天
if (StrUtil.isNotBlank(startTime) && StrUtil.isNotBlank(endTime)) { if (StrUtil.isNotBlank(startTime) && StrUtil.isNotBlank(endTime)) {
// 获取今日订单数量和收入
startTime = DateUtils.getYYYY_MM_DD(DateUtils.getNowDate()) + " " + Constants.DATE_FORMAT_START_PEREND;
endTime = DateUtils.getYYYY_MM_DD(DateUtils.getNowDate()) + " " + Constants.DATE_FORMAT_END_PEREND;
}
// 使用LocalDate统一日期处理 // 使用LocalDate统一日期处理
LocalDate startDate = LocalDate.parse(startTime, formatter); LocalDate startDate = LocalDate.parse(startTime, formatter);
LocalDate endDate = LocalDate.parse(endTime, formatter); LocalDate endDate = LocalDate.parse(endTime, formatter);
@ -945,10 +945,31 @@ public class RlOrderServiceImpl implements IRlOrderService
} }
// 设置收入数据 // 设置收入数据
indexAdminVo.setIncomeVoList(incomeVos); indexAdminVo.setIncomeVoList(incomeVos);
indexAdminVo.setTodayOrderNum(new BigDecimal(10)); // 获取今日订单数量和收入
indexAdminVo.setTodayIncome(new BigDecimal(100)); String todayStart = DateUtils.getYYYY_MM_DD(DateUtils.getNowDate()) + " " + Constants.DATE_FORMAT_START_PEREND;
indexAdminVo.setComparedYesterdayIncome(new BigDecimal(5)); String todayEnd = DateUtils.getYYYY_MM_DD(DateUtils.getNowDate()) + " " + Constants.DATE_FORMAT_END_PEREND;
indexAdminVo.setComparedYesterdayOrderNum(new BigDecimal(5));
// 查询今日的订单数和营收
Integer todayOrderNum = orderMapper.getOrderNum(todayStart, todayEnd, agentId, merchantId);
BigDecimal todayIncome = orderMapper.getOrderFee(todayStart, todayEnd, agentId, merchantId);
// 设置今日的订单数和营收
indexAdminVo.setTodayOrderNum(todayOrderNum);
indexAdminVo.setTodayIncome(todayIncome);
String yesterdayStart = DateUtils.getYYYY_MM_DD(DateUtils.addDays(DateUtils.getNowDate(), -1)) + " " + Constants.DATE_FORMAT_START_PEREND;
String yesterdayEnd = DateUtils.getYYYY_MM_DD(DateUtils.addDays(DateUtils.getNowDate(), -1)) + " " + Constants.DATE_FORMAT_END_PEREND;
// 查询昨日的订单数和营收
Integer yesterdayOrderNum = orderMapper.getOrderNum(yesterdayStart, yesterdayEnd, agentId, merchantId);
BigDecimal yesterdayIncome = orderMapper.getOrderFee(yesterdayStart, yesterdayEnd, agentId, merchantId);
// 计算较昨日的营收和订单数
BigDecimal comparedYesterdayIncome = todayIncome.subtract(yesterdayIncome);
BigDecimal comparedYesterdayOrderNum = new BigDecimal(todayOrderNum - yesterdayOrderNum);
// 设置较昨日的营收和订单数
indexAdminVo.setComparedYesterdayIncome(comparedYesterdayIncome);
indexAdminVo.setComparedYesterdayOrderNum(comparedYesterdayOrderNum);
// 设置车辆统计数据 // 设置车辆统计数据
IndexAdminVo.DeviceVO deviceVO = new IndexAdminVo.DeviceVO(); IndexAdminVo.DeviceVO deviceVO = new IndexAdminVo.DeviceVO();
@ -959,8 +980,6 @@ public class RlOrderServiceImpl implements IRlOrderService
indexAdminVo.setDeviceVO(deviceVO); indexAdminVo.setDeviceVO(deviceVO);
return indexAdminVo; return indexAdminVo;
} }
throw new ServiceException("开始时间和结束时间不能为空");
}
private BigDecimal deposit(Long modelId, PriceVO priceVO) { private BigDecimal deposit(Long modelId, PriceVO priceVO) {
RlModelVO rlModelVO = modelService.selectEModelByModelId(modelId); RlModelVO rlModelVO = modelService.selectEModelByModelId(modelId);

View File

@ -716,7 +716,7 @@ public class RlUserServiceImpl implements IRlUserService{
@Override @Override
public int resetUserPwd(String userName, String password) { public int resetUserPwd(String userName, String password) {
return 0; return rlUserMapper.resetUserPwd(userName, password);
} }
@Override @Override

View File

@ -15,10 +15,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRlAccessoryList" parameterType="RlAccessory" resultMap="RlAccessoryResult"> <select id="selectRlAccessoryList" parameterType="RlAccessory" resultMap="RlAccessoryResult">
<include refid="selectRlAccessoryVo"/> <include refid="selectRlAccessoryVo"/>
<where> where 1=1
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="status != null "> and status = #{status}</if> <if test="status != null "> and status = #{status}</if>
</where>
${params.dataScope} ${params.dataScope}
GROUP BY GROUP BY
a.accessory_id a.accessory_id

View File

@ -15,7 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRlAgentList" parameterType="RlAgent" resultMap="RlAgentResult"> <select id="selectRlAgentList" parameterType="RlAgent" resultMap="RlAgentResult">
<include refid="selectRlAgentVo"/> <include refid="selectRlAgentVo"/>
<where> where 1=1
<if test="name != null and name != ''"> and a.name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''"> and a.name like concat('%', #{name}, '%')</if>
<if test="servicePhone != null and servicePhone != ''"> and a.service_phone = #{servicePhone}</if> <if test="servicePhone != null and servicePhone != ''"> and a.service_phone = #{servicePhone}</if>
<if test="dispatchFee != null "> and a.dispatch_fee = #{dispatchFee}</if> <if test="dispatchFee != null "> and a.dispatch_fee = #{dispatchFee}</if>
@ -24,7 +24,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="contact != null and contact != ''"> and a.contact = #{contact}</if> <if test="contact != null and contact != ''"> and a.contact = #{contact}</if>
<if test="phone != null and phone != ''"> and a.phone = #{phone}</if> <if test="phone != null and phone != ''"> and a.phone = #{phone}</if>
<if test="userid != null "> and a.userid = #{userid}</if> <if test="userid != null "> and a.userid = #{userid}</if>
</where>
${params.dataScope} ${params.dataScope}
order by a.agent_id desc order by a.agent_id desc
</select> </select>

View File

@ -14,8 +14,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRlChangeBalanceList" parameterType="RlChangeBalance" resultMap="RlChangeBalanceResult"> <select id="selectRlChangeBalanceList" parameterType="RlChangeBalance" resultMap="RlChangeBalanceResult">
<include refid="selectRlChangeBalanceVo"/> <include refid="selectRlChangeBalanceVo"/>
<where> where 1=1
<if test="orderNo != null and orderNo != ''"> and cb.order_no = #{orderNo}</if> <if test="orderNo != null and orderNo != ''"> and cb.order_no like concat('%', #{orderNo}, '%')</if>
<if test="outTradeNo != null and outTradeNo != ''"> and cb.out_trade_no = #{outTradeNo}</if> <if test="outTradeNo != null and outTradeNo != ''"> and cb.out_trade_no = #{outTradeNo}</if>
<if test="type != null and type != ''"> and cb.type = #{type}</if> <if test="type != null and type != ''"> and cb.type = #{type}</if>
<if test="busType != null and busType != ''"> and cb.bus_type = #{busType}</if> <if test="busType != null and busType != ''"> and cb.bus_type = #{busType}</if>
@ -24,10 +24,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="amount != null "> and cb.amount = #{amount}</if> <if test="amount != null "> and cb.amount = #{amount}</if>
<if test="ownerName != null and ownerName != ''"> and cb.owner_name like concat('%', #{ownerName}, '%')</if> <if test="ownerName != null and ownerName != ''"> and cb.owner_name like concat('%', #{ownerName}, '%')</if>
<if test="ownerId != null "> and cb.owner_id = #{ownerId}</if> <if test="ownerId != null "> and cb.owner_id = #{ownerId}</if>
<if test="ownerPhone != null and ownerPhone != ''"> and cb.owner_phone = #{ownerPhone}</if> <if test="ownerPhone != null and ownerPhone != ''"> and cb.owner_phone like concat('%', #{ownerPhone}, '%')</if>
<if test="ownerType != null and ownerType != ''"> and cb.owner_type = #{ownerType}</if> <if test="ownerType != null and ownerType != ''"> and cb.owner_type = #{ownerType}</if>
<if test="reason != null and reason != ''"> and cb.reason = #{reason}</if> <if test="reason != null and reason != ''"> and cb.reason = #{reason}</if>
</where>
${params.dataScope} ${params.dataScope}
order by create_time desc order by create_time desc
</select> </select>

View File

@ -19,13 +19,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRlDeliveryOrderList" parameterType="RlDeliveryOrderVO" resultMap="RlDeliveryOrderResult"> <select id="selectRlDeliveryOrderList" parameterType="RlDeliveryOrderVO" resultMap="RlDeliveryOrderResult">
<include refid="selectRlDeliveryOrderVo"/> <include refid="selectRlDeliveryOrderVo"/>
<where> where 1=1
<if test="orderNo != null and orderNo != ''"> and do.order_no = #{orderNo}</if> <if test="orderNo != null and orderNo != ''"> and do.order_no like concat('%', #{orderNo}, '%')</if>
<if test="agentId != null "> and do.agent_id = #{agentId}</if> <if test="agentId != null "> and do.agent_id = #{agentId}</if>
<if test="agentName != null "> and a.name like concat('%', #{agentName}, '%')</if>
<if test="deliverymanId != null and deliverymanId != ''"> and do.deliveryman_id = #{deliverymanId}</if> <if test="deliverymanId != null and deliverymanId != ''"> and do.deliveryman_id = #{deliverymanId}</if>
<if test="deliverymanType != null and deliverymanType != ''"> and do.deliveryman_type = #{deliverymanType}</if> <if test="deliverymanType != null and deliverymanType != ''"> and do.deliveryman_type = #{deliverymanType}</if>
<if test="deliveryman != null and deliveryman != ''"> and do.deliveryman = #{deliveryman}</if> <if test="deliveryman != null and deliveryman != ''"> and do.deliveryman like concat('%', #{deliveryman}, '%')</if>
<if test="deliverymanPhone != null and deliverymanPhone != ''"> and do.deliveryman_phone = #{deliverymanPhone}</if> <if test="deliverymanPhone != null and deliverymanPhone != ''"> and do.deliveryman_phone like concat('%', #{deliverymanPhone}, '%')</if>
<if test="status != null and status != ''"> and do.status = #{status}</if> <if test="status != null and status != ''"> and do.status = #{status}</if>
<if test="statusList != null and statusList !=''"> <if test="statusList != null and statusList !=''">
AND do.status IN AND do.status IN
@ -36,7 +37,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="keywords != null and keywords != ''"> <if test="keywords != null and keywords != ''">
AND (o.phone LIKE CONCAT('%', #{keywords}, '%') OR o.order_no LIKE CONCAT('%', #{keywords}, '%')) AND (o.phone LIKE CONCAT('%', #{keywords}, '%') OR o.order_no LIKE CONCAT('%', #{keywords}, '%'))
</if> </if>
</where>
${params.dataScope} ${params.dataScope}
order by do.delivery_id desc order by do.delivery_id desc
</select> </select>

View File

@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deliveryId != null "> and delivery_id = #{deliveryId}</if> <if test="deliveryId != null "> and delivery_id = #{deliveryId}</if>
<if test="type != null and type != ''"> and type = #{type}</if> <if test="type != null and type != ''"> and type = #{type}</if>
<if test="operUserid != null "> and oper_userid = #{operUserid}</if> <if test="operUserid != null "> and oper_userid = #{operUserid}</if>
<if test="operPhone != null and operPhone != ''"> and oper_phone = #{operPhone}</if> <if test="operPhone != null and operPhone != ''"> and oper_phone like concat('%', #{operPhone}, '%')</if>
<if test="operName != null and operName != ''"> and oper_name like concat('%', #{operName}, '%')</if> <if test="operName != null and operName != ''"> and oper_name like concat('%', #{operName}, '%')</if>
<if test="operTime != null "> and oper_time = #{operTime}</if> <if test="operTime != null "> and oper_time = #{operTime}</if>
</where> </where>

View File

@ -13,19 +13,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join rl_user u on u.user_id = dd.partner_id left join rl_user u on u.user_id = dd.partner_id
</sql> </sql>
<select id="selectRlDividendDetailList" parameterType="RlDividendDetail" resultMap="RlDividendDetailResult"> <select id="selectRlDividendDetailList" parameterType="RlDividendDetailQuery" resultMap="RlDividendDetailResult">
<include refid="selectRlDividendDetailVo"/> <include refid="selectRlDividendDetailVo"/>
<where> where 1=1
<if test="agentId != null "> and dd.agent_id = #{agentId}</if> <if test="agentId != null "> and dd.agent_id = #{agentId}</if>
<if test="agentName != null "> and a.name like concat('%', #{agentName}, '%')</if>
<if test="partnerId != null "> and dd.partner_id = #{partnerId}</if> <if test="partnerId != null "> and dd.partner_id = #{partnerId}</if>
<if test="partnerName != null "> and dd.partner_name = #{partnerName}</if> <if test="partnerName != null "> and dd.partner_name like concat('%', #{partnerName}, '%')</if>
<if test="partnerPhone != null "> and dd.partner_phone = #{partnerPhone}</if> <if test="partnerPhone != null "> and dd.partner_phone like concat('%', #{partnerPhone}, '%')</if>
<if test="partnerType != null "> and dd.partner_type = #{partnerType}</if> <if test="partnerType != null "> and dd.partner_type = #{partnerType}</if>
<if test="orderNo != null and orderNo != ''"> and dd.order_no = #{orderNo}</if> <if test="orderNo != null and orderNo != ''"> and dd.order_no like concat('%', #{orderNo}, '%')</if>
<if test="totalAmount != null "> and dd.total_amount = #{totalAmount}</if> <if test="totalAmount != null "> and dd.total_amount = #{totalAmount}</if>
<if test="dividendAmount != null "> and dd.dividend_amount = #{dividendAmount}</if> <if test="dividendAmount != null "> and dd.dividend_amount = #{dividendAmount}</if>
<if test="dividendProportion != null "> and dd.dividend_proportion = #{dividendProportion}</if> <if test="dividendProportion != null "> and dd.dividend_proportion = #{dividendProportion}</if>
</where>
${params.dataScope} ${params.dataScope}
order by dd.create_time desc order by dd.create_time desc
</select> </select>

View File

@ -14,7 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRlOperatingAreaList" parameterType="RlOperatingArea" resultMap="RlOperatingAreaResult"> <select id="selectRlOperatingAreaList" parameterType="RlOperatingArea" resultMap="RlOperatingAreaResult">
<include refid="selectRlOperatingAreaVo"/> <include refid="selectRlOperatingAreaVo"/>
<where> where 1=1
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if> <if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
<if test="boundary != null and boundary != ''"> and boundary = #{boundary}</if> <if test="boundary != null and boundary != ''"> and boundary = #{boundary}</if>
<if test="boundaryStr != null and boundaryStr != ''"> and boundary_str = #{boundaryStr}</if> <if test="boundaryStr != null and boundaryStr != ''"> and boundary_str = #{boundaryStr}</if>
@ -27,7 +27,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="agreement != null and agreement != ''"> and agreement = #{agreement}</if> <if test="agreement != null and agreement != ''"> and agreement = #{agreement}</if>
<if test="areaTimeStart != null and areaTimeStart != ''"> and area_time_start = #{areaTimeStart}</if> <if test="areaTimeStart != null and areaTimeStart != ''"> and area_time_start = #{areaTimeStart}</if>
<if test="areaTimeEnd != null and areaTimeEnd != ''"> and area_time_end = #{areaTimeEnd}</if> <if test="areaTimeEnd != null and areaTimeEnd != ''"> and area_time_end = #{areaTimeEnd}</if>
</where>
${params.dataScope} ${params.dataScope}
order by oa.create_time desc order by oa.create_time desc
</select> </select>

View File

@ -119,7 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRlOrderList" parameterType="RlOrderQuery" resultMap="RlOrderResult"> <select id="selectRlOrderList" parameterType="RlOrderQuery" resultMap="RlOrderResult">
<include refid="selectRlOrderDetail"/> <include refid="selectRlOrderDetail"/>
<where> where 1=1
<if test="orderNo != null and orderNo != ''"> and o.order_no like concat('%', #{orderNo}, '%')</if> <if test="orderNo != null and orderNo != ''"> and o.order_no like concat('%', #{orderNo}, '%')</if>
<if test="outTradeNo != null and outTradeNo != ''"> and o.out_trade_no like concat('%', #{outTradeNo}, '%')</if> <if test="outTradeNo != null and outTradeNo != ''"> and o.out_trade_no like concat('%', #{outTradeNo}, '%')</if>
<if test="userId != null"> and o.user_id = #{userId}</if> <if test="userId != null"> and o.user_id = #{userId}</if>
@ -179,7 +179,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item} #{item}
</foreach> </foreach>
</if> </if>
</where>
${params.dataScope} ${params.dataScope}
order by o.create_time desc order by o.create_time desc
</select> </select>

View File

@ -14,20 +14,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRlWithdrawList" parameterType="RlWithdraw" resultMap="RlWithdrawResult"> <select id="selectRlWithdrawList" parameterType="RlWithdraw" resultMap="RlWithdrawResult">
<include refid="selectRlWithdrawVo"/> <include refid="selectRlWithdrawVo"/>
<where> where 1=1
<if test="withdrawNo != null and withdrawNo != ''"> and w.withdraw_no = #{withdrawNo}</if> <if test="withdrawNo != null and withdrawNo != ''"> and w.withdraw_no like concat('%', #{withdrawNo}, '%')</if>
<if test="amount != null "> and w.amount = #{amount}</if> <if test="amount != null "> and w.amount = #{amount}</if>
<if test="status != null and status != ''"> and w.status = #{status}</if> <if test="status != null and status != ''"> and w.status = #{status}</if>
<if test="rejectReason != null and rejectReason != ''"> and w.reject_reason = #{rejectReason}</if> <if test="rejectReason != null and rejectReason != ''"> and w.reject_reason like concat('%', #{rejectReason}, '%')</if>
<if test="ownerName != null and ownerName != ''"> and w.owner_name like concat('%', #{ownerName}, '%')</if> <if test="ownerName != null and ownerName != ''"> and w.owner_name like concat('%', #{ownerName}, '%')</if>
<if test="ownerId != null "> and w.owner_id = #{ownerId}</if> <if test="ownerId != null "> and w.owner_id = #{ownerId}</if>
<if test="ownerPhone != null and ownerPhone != ''"> and w.owner_phone = #{ownerPhone}</if> <if test="ownerPhone != null and ownerPhone != ''"> and w.owner_phone like concat('%', #{ownerPhone}, '%')</if>
<if test="handlingCharge != null "> and w.handling_charge = #{handlingCharge}</if> <if test="handlingCharge != null "> and w.handling_charge = #{handlingCharge}</if>
<if test="cost != null "> and w.cost = #{cost}</if> <if test="cost != null "> and w.cost = #{cost}</if>
<if test="withdrawChannelId != null "> and w.withdraw_channel_id = #{withdrawChannelId}</if> <if test="withdrawChannelId != null "> and w.withdraw_channel_id = #{withdrawChannelId}</if>
<if test="handlingChargeType != null "> and w.handling_charge_type = #{handlingChargeType}</if> <if test="handlingChargeType != null "> and w.handling_charge_type = #{handlingChargeType}</if>
<if test="withdrawHandlingCharge != null "> and w.withdraw_handling_charge = #{withdrawHandlingCharge}</if> <if test="withdrawHandlingCharge != null "> and w.withdraw_handling_charge = #{withdrawHandlingCharge}</if>
</where>
${params.dataScope} ${params.dataScope}
order by create_time order by create_time
</select> </select>