提交代码

dev-discount
胡锐 2 years ago
parent e6fd6f7749
commit d0d22b69ee
  1. 13
      hai-bweb/src/main/java/com/bweb/controller/HighTyAgentOilStationController.java
  2. 16
      hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapperExt.java
  3. 1
      hai-service/src/main/java/com/hai/dao/HighTyAgentOilStationMapperExt.java

@ -293,7 +293,7 @@ public class HighTyAgentOilStationController {
param.put("regionName", regionName); param.put("regionName", regionName);
param.put("storeName", storeName); 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("isAssignOrgId", isAssignOrgId);
param.put("organizationName", organizationName); param.put("organizationName", organizationName);
param.put("isAssignTyAgent", isAssignTyAgent); param.put("isAssignTyAgent", isAssignTyAgent);
@ -301,7 +301,16 @@ public class HighTyAgentOilStationController {
param.put("isAssignTySalesman", isAssignTySalesman); param.put("isAssignTySalesman", isAssignTySalesman);
param.put("tySalesmanName", tySalesmanName); 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("organizationId", userModel.getBsOrganization().getId());
param.put("isAssignTyAgent", isAssignTyAgent); param.put("isAssignTyAgent", isAssignTyAgent);
param.put("tyAgentName", tyAgentName); param.put("tyAgentName", tyAgentName);

@ -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}") " 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); 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 " + @Select(" select a.* from high_coupon_agent_code a" +
" 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 " + " 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") " and a.sales_time >= #{consumeTimeS} and a.sales_time <= #{consumeTimeE} ORDER BY a.sales_time desc")
@Results({ @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_agent_id", property="couponAgentId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT), @Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_id", property="agentId", 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="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="coupon_code", property="couponCode", jdbcType=JdbcType.VARCHAR),
@Result(column="qr_code", property="qrCode", jdbcType=JdbcType.VARCHAR), @Result(column="qr_code", property="qrCode", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @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="remark", property="remark", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @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_id", property="operatorId", jdbcType=JdbcType.BIGINT),
@Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),

@ -34,6 +34,7 @@ public interface HighTyAgentOilStationMapperExt {
" from high_merchant_store a" + " from high_merchant_store a" +
" LEFT JOIN high_ty_agent_oil_station b on a.id = b.oil_station_id and b.`status` = 1" + " 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" + " where a.type = 1 and a.`status` = 1" +
" <if test='param.regionId != null'> and a.region_id = #{param.regionId} </if>" +
" <if test='param.regionName != null'> and a.region_name like concat('%',#{param.regionName},'%') </if>" + " <if test='param.regionName != null'> and a.region_name like concat('%',#{param.regionName},'%') </if>" +
" <if test='param.storeName != null'> and a.store_name like concat('%',#{param.storeName},'%') </if>" + " <if test='param.storeName != null'> and a.store_name like concat('%',#{param.storeName},'%') </if>" +
" <if test='param.isAssignOrgId != null and param.isAssignOrgId == true'> and b.organization_id is not null </if>" + " <if test='param.isAssignOrgId != null and param.isAssignOrgId == true'> and b.organization_id is not null </if>" +

Loading…
Cancel
Save