diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentOilStationController.java b/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentOilStationController.java
index 71aa8de2..b3db9988 100644
--- a/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentOilStationController.java
+++ b/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentOilStationController.java
@@ -293,7 +293,7 @@ public class HighTyAgentOilStationController {
param.put("regionName", regionName);
param.put("storeName", storeName);
- if (userModel.getBsCompany() != null && userModel.getSecUser().getAdminFlag().equals(1)) {
+ if (userModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type0.getType())) {
param.put("isAssignOrgId", isAssignOrgId);
param.put("organizationName", organizationName);
param.put("isAssignTyAgent", isAssignTyAgent);
@@ -301,7 +301,16 @@ public class HighTyAgentOilStationController {
param.put("isAssignTySalesman", isAssignTySalesman);
param.put("tySalesmanName", tySalesmanName);
- } else if (userModel.getBsCompany() != null && userModel.getSecUser().getAdminFlag().equals(0)) {
+ } else if (userModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type1.getType()) && userModel.getSecUser().getAdminFlag().equals(1)) {
+ param.put("regionId", userModel.getBsCompany().getRegionId());
+ param.put("isAssignOrgId", isAssignOrgId);
+ param.put("organizationName", organizationName);
+ param.put("isAssignTyAgent", isAssignTyAgent);
+ param.put("tyAgentName", tyAgentName);
+ param.put("isAssignTySalesman", isAssignTySalesman);
+ param.put("tySalesmanName", tySalesmanName);
+
+ } else if (userModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type1.getType()) && userModel.getSecUser().getAdminFlag().equals(0)) {
param.put("organizationId", userModel.getBsOrganization().getId());
param.put("isAssignTyAgent", isAssignTyAgent);
param.put("tyAgentName", tyAgentName);
diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapperExt.java
index d0a1c2a1..eb7fc769 100644
--- a/hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapperExt.java
+++ b/hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapperExt.java
@@ -25,21 +25,29 @@ public interface HighCouponAgentRelMapperExt {
" and a.status in (2,3) and a.coupon_code_id = b.id and a.sales_time >= #{consumeTimeS} and a.sales_time <= #{consumeTimeE}")
AgentSalesModel getAgentSales(@Param("agentId") Long agentId, @Param("consumeTimeS")String consumeTimeS, @Param("consumeTimeE")String consumeTimeE);
- @Select(" select a.* from high_coupon_agent_code a,high_coupon_code b,high_coupon_agent_rel c " +
- " where c.id = a.coupon_agent_id and c.agent_id = #{agentId} and a.status in (2,3) and a.coupon_code_id = b.id " +
+ @Select(" select a.* from high_coupon_agent_code a" +
+ " LEFT JOIN high_coupon_agent_rel c on c.id = a.coupon_agent_id " +
+ " where c.id = a.coupon_agent_id and c.agent_id = #{agentId} and a.status in (2,3) " +
" and a.sales_time >= #{consumeTimeS} and a.sales_time <= #{consumeTimeE} ORDER BY a.sales_time desc")
@Results({
- @Result(column="id", property="id", jdbcType= JdbcType.BIGINT, id=true),
+ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
+ @Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="coupon_agent_id", property="couponAgentId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
- @Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_agent_record_id", property="couponAgentRecordId", jdbcType=JdbcType.BIGINT),
+ @Result(column="convert_user_phone", property="convertUserPhone", jdbcType=JdbcType.VARCHAR),
+ @Result(column="convert_code", property="convertCode", jdbcType=JdbcType.VARCHAR),
+ @Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_code", property="couponCode", jdbcType=JdbcType.VARCHAR),
@Result(column="qr_code", property="qrCode", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
+ @Result(column="assign_coupon_agent_id", property="assignCouponAgentId", jdbcType=JdbcType.BIGINT),
+ @Result(column="assign_agent_id", property="assignAgentId", jdbcType=JdbcType.BIGINT),
+ @Result(column="assign_agent_name", property="assignAgentName", jdbcType=JdbcType.VARCHAR),
@Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
+ @Result(column="sales_time", property="salesTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT),
@Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
diff --git a/hai-service/src/main/java/com/hai/dao/HighTyAgentOilStationMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighTyAgentOilStationMapperExt.java
index e5a6ecfd..85ef6f8d 100644
--- a/hai-service/src/main/java/com/hai/dao/HighTyAgentOilStationMapperExt.java
+++ b/hai-service/src/main/java/com/hai/dao/HighTyAgentOilStationMapperExt.java
@@ -34,6 +34,7 @@ public interface HighTyAgentOilStationMapperExt {
" from high_merchant_store a" +
" LEFT JOIN high_ty_agent_oil_station b on a.id = b.oil_station_id and b.`status` = 1" +
" where a.type = 1 and a.`status` = 1" +
+ " and a.region_id = #{param.regionId} " +
" and a.region_name like concat('%',#{param.regionName},'%') " +
" and a.store_name like concat('%',#{param.storeName},'%') " +
" and b.organization_id is not null " +