取消规则
This commit is contained in:
		
							parent
							
								
									7578ab49fd
								
							
						
					
					
						commit
						b153ffd2e5
					
				|  | @ -1,7 +1,13 @@ | |||
| package com.ruoyi.system.domain.agent; | ||||
| 
 | ||||
| import com.ruoyi.system.domain.cancelRule.RlCancelRule; | ||||
| import lombok.Data; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| @Data | ||||
| public class RlAgentVO extends RlAgent{ | ||||
| 
 | ||||
|     /** 取消规则列表 */ | ||||
|     private List<RlCancelRule> cancelRuleList; | ||||
| } | ||||
|  |  | |||
|  | @ -40,4 +40,7 @@ public class RlCancelRule extends BaseEntity | |||
|     @Excel(name = "超过多少小时以上") | ||||
|     private Integer afterOutTime; | ||||
| 
 | ||||
|     /** 代理商id */ | ||||
|     private Long agentId; | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -1,6 +1,7 @@ | |||
| package com.ruoyi.system.mapper; | ||||
| 
 | ||||
| import com.ruoyi.system.domain.agent.RlAgent; | ||||
| import com.ruoyi.system.domain.agent.RlAgentVO; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
|  | @ -18,7 +19,7 @@ public interface RlAgentMapper | |||
|      * @param agentId 代理商主键 | ||||
|      * @return 代理商 | ||||
|      */ | ||||
|     public RlAgent selectRlAgentByAgentId(Long agentId); | ||||
|     public RlAgentVO selectRlAgentByAgentId(Long agentId); | ||||
| 
 | ||||
|     /** | ||||
|      * 根据城市id查询代理商 | ||||
|  | @ -26,7 +27,7 @@ public interface RlAgentMapper | |||
|      * @param cityId 城市id | ||||
|      * @return 代理商 | ||||
|      */ | ||||
|     public RlAgent selectRlAgentByCityId(Long cityId); | ||||
|     public RlAgentVO selectRlAgentByCityId(Long cityId); | ||||
| 
 | ||||
|     /** | ||||
|      * 查询代理商列表 | ||||
|  |  | |||
|  | @ -59,4 +59,12 @@ public interface RlCancelRuleMapper | |||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteRlCancelRuleByCancalIds(Long[] cancalIds); | ||||
| 
 | ||||
|     /** | ||||
|      * 根据代理商id查询取消规则列表 | ||||
|      * | ||||
|      * @param agentId 代理商id | ||||
|      * @return 取消规则集合 | ||||
|      */ | ||||
|     List<RlCancelRule> selectRlCancelRuleListByAgentId(Long agentId); | ||||
| } | ||||
|  |  | |||
|  | @ -1,6 +1,7 @@ | |||
| package com.ruoyi.system.service; | ||||
| 
 | ||||
| import com.ruoyi.system.domain.agent.RlAgent; | ||||
| import com.ruoyi.system.domain.agent.RlAgentVO; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
|  | @ -18,7 +19,7 @@ public interface IRlAgentService | |||
|      * @param agentId 代理商主键 | ||||
|      * @return 代理商 | ||||
|      */ | ||||
|     public RlAgent selectRlAgentByAgentId(Long agentId); | ||||
|     public RlAgentVO selectRlAgentByAgentId(Long agentId); | ||||
| 
 | ||||
|     /** | ||||
|      * 根据城市id查询代理商 | ||||
|  | @ -26,7 +27,7 @@ public interface IRlAgentService | |||
|      * @param cityId 城市id | ||||
|      * @return 代理商 | ||||
|      */ | ||||
|     public RlAgent selectRlAgentByCityId(Long cityId); | ||||
|     public RlAgentVO selectRlAgentByCityId(Long cityId); | ||||
| 
 | ||||
|     /** | ||||
|      * 查询代理商列表 | ||||
|  |  | |||
|  | @ -28,6 +28,14 @@ public interface IRlCancelRuleService | |||
|      */ | ||||
|     public List<RlCancelRule> selectRlCancelRuleList(RlCancelRule rlCancelRule); | ||||
| 
 | ||||
|     /** | ||||
|      * 根据代理商id查询取消规则列表 | ||||
|      * | ||||
|      * @param agentId 代理商id | ||||
|      * @return 取消规则集合 | ||||
|      */ | ||||
|     List<RlCancelRule> selectRlCancelRuleListByAgentId(Long agentId); | ||||
| 
 | ||||
|     /** | ||||
|      * 新增取消规则 | ||||
|      * | ||||
|  |  | |||
|  | @ -1,8 +1,11 @@ | |||
| package com.ruoyi.system.service.impl; | ||||
| 
 | ||||
| import com.ruoyi.system.domain.agent.RlAgent; | ||||
| import com.ruoyi.system.domain.agent.RlAgentVO; | ||||
| import com.ruoyi.system.domain.cancelRule.RlCancelRule; | ||||
| import com.ruoyi.system.mapper.RlAgentMapper; | ||||
| import com.ruoyi.system.service.IRlAgentService; | ||||
| import com.ruoyi.system.service.IRlCancelRuleService; | ||||
| import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| import javax.annotation.Resource; | ||||
|  | @ -20,6 +23,9 @@ public class RlAgentServiceImpl implements IRlAgentService | |||
|     @Resource | ||||
|     private RlAgentMapper rlAgentMapper; | ||||
| 
 | ||||
|     @Resource | ||||
|     private IRlCancelRuleService cancelRuleService; | ||||
| 
 | ||||
|     /** | ||||
|      * 查询代理商 | ||||
|      * | ||||
|  | @ -27,9 +33,12 @@ public class RlAgentServiceImpl implements IRlAgentService | |||
|      * @return 代理商 | ||||
|      */ | ||||
|     @Override | ||||
|     public RlAgent selectRlAgentByAgentId(Long agentId) | ||||
|     public RlAgentVO selectRlAgentByAgentId(Long agentId) | ||||
|     { | ||||
|         return rlAgentMapper.selectRlAgentByAgentId(agentId); | ||||
|         RlAgentVO rlAgentVO = rlAgentMapper.selectRlAgentByAgentId(agentId); | ||||
|         List<RlCancelRule> rlCancelRules = cancelRuleService.selectRlCancelRuleListByAgentId(rlAgentVO.getAgentId()); | ||||
|         rlAgentVO.setCancelRuleList(rlCancelRules); | ||||
|         return rlAgentVO; | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -40,9 +49,12 @@ public class RlAgentServiceImpl implements IRlAgentService | |||
|      * @return 代理商 | ||||
|      */ | ||||
|     @Override | ||||
|     public RlAgent selectRlAgentByCityId(Long cityId) | ||||
|     public RlAgentVO selectRlAgentByCityId(Long cityId) | ||||
|     { | ||||
|         return rlAgentMapper.selectRlAgentByCityId(cityId); | ||||
|         RlAgentVO rlAgentVO = rlAgentMapper.selectRlAgentByCityId(cityId); | ||||
|         List<RlCancelRule> rlCancelRules = cancelRuleService.selectRlCancelRuleListByAgentId(rlAgentVO.getAgentId()); | ||||
|         rlAgentVO.setCancelRuleList(rlCancelRules); | ||||
|         return rlAgentVO; | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -44,6 +44,18 @@ public class RlCancelRuleServiceImpl implements IRlCancelRuleService | |||
|         return rlCancelRuleMapper.selectRlCancelRuleList(rlCancelRule); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * 根据代理商id查询取消规则列表 | ||||
|      * | ||||
|      * @param agentId 代理商id | ||||
|      * @return 取消规则集合 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<RlCancelRule> selectRlCancelRuleListByAgentId(Long agentId) | ||||
|     { | ||||
|         return rlCancelRuleMapper.selectRlCancelRuleListByAgentId(agentId); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * 新增取消规则 | ||||
|      * | ||||
|  |  | |||
|  | @ -4,19 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||
| <mapper namespace="com.ruoyi.system.mapper.RlAgentMapper"> | ||||
| 
 | ||||
|     <resultMap type="RlAgent" id="RlAgentResult"> | ||||
|         <result property="agentId"    column="agent_id"    /> | ||||
|         <result property="name"    column="name"    /> | ||||
|         <result property="servicePhone"    column="service_phone"    /> | ||||
|         <result property="dispatchFee"    column="dispatch_fee"    /> | ||||
|         <result property="deliveryFee"    column="delivery_fee"    /> | ||||
|         <result property="cityId"    column="city_id"    /> | ||||
|         <result property="contact"    column="contact"    /> | ||||
|         <result property="phone"    column="phone"    /> | ||||
|         <result property="sysUserid"    column="sys_userid"    /> | ||||
|         <result property="payChannel" column="pay_channel" /> | ||||
|         <result property="isFreeCar" column="is_free_car" /> | ||||
|     </resultMap> | ||||
|     <resultMap type="RlAgentVO" id="RlAgentResult" autoMapping="true" /> | ||||
| 
 | ||||
|     <sql id="selectRlAgentVo"> | ||||
|         select agent_id, name, service_phone, dispatch_fee, delivery_fee, city_id, contact, phone, sys_userid, pay_channel, is_free_car from rl_agent | ||||
|  |  | |||
|  | @ -21,6 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
|         </where> | ||||
|     </select> | ||||
| 
 | ||||
|     <select id="selectRlCancelRuleListByAgentId" parameterType="RlCancelRule" resultMap="RlCancelRuleResult"> | ||||
|         <include refid="selectRlCancelRuleVo"/> | ||||
|         where agent_id = #{agentId} | ||||
|     </select> | ||||
| 
 | ||||
|     <select id="selectRlCancelRuleByCancalId" parameterType="Long" resultMap="RlCancelRuleResult"> | ||||
|         <include refid="selectRlCancelRuleVo"/> | ||||
|         where cancal_id = #{cancalId} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user