Browse Source

fix

release_toaliyun_real
winter 1 year ago
parent
commit
057fd51213
5 changed files with 0 additions and 130 deletions
  1. +0
    -14
      mallinkAdmin/src/main/resources/db/migration/V202407018.sql
  2. +0
    -41
      mallinkService/src/main/java/com/iformall/domain/po/WxEnergyMeterUser.java
  3. +0
    -17
      mallinkService/src/main/java/com/iformall/mapper/WxEnergyMeterUserMapper.java
  4. +0
    -10
      mallinkService/src/main/java/com/iformall/service/impl/WxEnergyServiceImpl.java
  5. +0
    -48
      mallinkService/src/main/resources/mapper/WxEnergyMeterUserMapper.xml

+ 0
- 14
mallinkAdmin/src/main/resources/db/migration/V202407018.sql View File

@@ -16,20 +16,6 @@ CREATE TABLE `wx_energy_meter` (
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='能耗表';


CREATE TABLE `wx_energy_meter_user` (
`id` bigint(20) NOT NULL COMMENT '主键ID',
`tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID',
`parent_tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID',
`create_time` timestamp NULL DEFAULT NULL,
`update_time` timestamp NULL DEFAULT NULL,
`user_id` bigint(20) NOT NULL COMMENT '使用者id,商铺id或者楼层id',
`user_type` int(3) NOT NULL COMMENT '使用者类型',
`meter_id` bigint(20) NOT NULL COMMENT '表ID',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='能耗表';

CREATE TABLE `wx_energy_meter_reading` (
`id` bigint(20) NOT NULL COMMENT '主键ID',
`tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID',


+ 0
- 41
mallinkService/src/main/java/com/iformall/domain/po/WxEnergyMeterUser.java View File

@@ -1,41 +0,0 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.domain.po.base.TenantEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Date;

/**
*/
@TableName(value = "wx_energy_meter_user")
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class WxEnergyMeterUser extends TenantEntity {

private static final long serialVersionUID = 7009117540201976664L;

@io.swagger.annotations.ApiModelProperty(value="id",name="id")
private Long id;

@io.swagger.annotations.ApiModelProperty(value="name",name="name")
private String name;
@io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime")
private Date createTime;
@io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime")
private Date updateTime;
@io.swagger.annotations.ApiModelProperty(value = "userId", name = "userId")
private Long userId;
@io.swagger.annotations.ApiModelProperty(value = "EnumEnergyMeterUserType", name = "userType")
private Integer userType;
@io.swagger.annotations.ApiModelProperty(value = "表ID", name = "meterId")
private Long meterId;
}

+ 0
- 17
mallinkService/src/main/java/com/iformall/mapper/WxEnergyMeterUserMapper.java View File

@@ -1,17 +0,0 @@
package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxEnergyMeter;
import com.iformall.domain.po.WxEnergyMeterUser;

import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

/**
*/
public interface WxEnergyMeterUserMapper extends CommonMapper<WxEnergyMeterUser, Long> {

List<WxEnergyMeterUser> findList(WxEnergyMeterUser wxBillRent);
}

+ 0
- 10
mallinkService/src/main/java/com/iformall/service/impl/WxEnergyServiceImpl.java View File

@@ -9,28 +9,22 @@ import com.iformall.common.IdWorker;
import com.iformall.common.Result;
import com.iformall.domain.po.*;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.enums.EnumEnergyMeterUserType;
import com.iformall.enums.EnumEnergyPublicCalcuteRule;
import com.iformall.enums.EnumYesOrNo;
import com.iformall.exception.MallinkException;
import com.iformall.mapper.*;
import com.iformall.service.*;
import com.iformall.utils.Constant;

import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
import cn.afterturn.easypoi.handler.impl.ExcelDataHandlerDefaultImpl;
import cn.afterturn.easypoi.handler.inter.IExcelDataHandler;

import org.apache.shiro.session.UnknownSessionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileOutputStream;
@@ -38,8 +32,6 @@ import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.concurrent.TimeUnit;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@@ -52,8 +44,6 @@ public class WxEnergyServiceImpl implements WxEnergyService {
@Autowired
WxEnergyMeterMapper wxEnergyMeterMapper;
@Autowired
WxEnergyMeterUserMapper wxEnergyMeterUserMapper;
@Autowired
WxEnergyMeterReadingMapper wxEnergyMeterReadingMapper;
@Autowired
WxEnergyFeesTimeMapper wxEnergyFeesTimeMapper;


+ 0
- 48
mallinkService/src/main/resources/mapper/WxEnergyMeterUserMapper.xml View File

@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.iformall.mapper.WxEnergyMeterUserMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxEnergyMeterUser">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="user_id" jdbcType="BIGINT" property="userId"/>
<result column="user_type" jdbcType="INTEGER" property="userType"/>
<result column="meter_id" jdbcType="BIGINT" property="meterId"/>
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`user_id`,`user_type`,`meter_id`
</sql>

<sql id="dynamicWhereConditions">
where 1=1
<if test=" null != id ">and `id` = #{id}</if>
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != userId ">and `user_id` = #{userId}</if>
<if test=" null != userType ">and `user_type` = #{userType}</if>
<if test=" null != meterId ">and `meter_id` = #{meterId}</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>
<if test=" null != sortColumns">order by ${sortColumns}</if>
</sql>

<select id="findList" parameterType="com.iformall.domain.po.WxEnergyMeterUser" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_energy_meter_user
<include refid="dynamicWhereConditions"/>
</select>
</mapper>


Loading…
Cancel
Save