Commit f3ea8aaf by zhiwj

调整表结构

parent 3bc40db9
......@@ -81,6 +81,8 @@ public class DownloadReportDTO implements Serializable {
@NotNull(message = "数据总量不能为空", groups = SaveValid.class)
private Integer dataCount;
private String projectCode;
/**
* 审批结果 0:未审核 1:审核通过 2:审核失败
*/
......@@ -316,4 +318,12 @@ public class DownloadReportDTO implements Serializable {
public void setAuditReason(String auditReason) {
this.auditReason = auditReason;
}
public String getProjectCode() {
return projectCode;
}
public void setProjectCode(String projectCode) {
this.projectCode = projectCode;
}
}
......@@ -37,6 +37,8 @@ public class DownloadReportQO extends PageQO {
private Date auditExpireTime;
private Boolean hasDownloadUrl;
private String projectCode;
public Integer getEnterpriseId() {
return enterpriseId;
}
......@@ -124,4 +126,12 @@ public class DownloadReportQO extends PageQO {
public void setHasDownloadUrl(Boolean hasDownloadUrl) {
this.hasDownloadUrl = hasDownloadUrl;
}
public String getProjectCode() {
return projectCode;
}
public void setProjectCode(String projectCode) {
this.projectCode = projectCode;
}
}
......@@ -47,6 +47,11 @@ public class TabBillingDoubleCallingRecord {
private Date deductionTime;
/**
* 被叫id
*/
private Long calledId;
/**
* 被叫
*/
private String calledName;
......@@ -57,12 +62,17 @@ public class TabBillingDoubleCallingRecord {
private String calledPhone;
/**
*
* 单价
*/
private Double unitFee;
/**
* 在运维后台配置
*/
private String appCode;
/**
*
* 在运维后台配置
*/
private String appName;
......@@ -170,6 +180,14 @@ public class TabBillingDoubleCallingRecord {
this.deductionTime = deductionTime;
}
public Long getCalledId() {
return calledId;
}
public void setCalledId(Long calledId) {
this.calledId = calledId;
}
public String getCalledName() {
return calledName;
}
......@@ -186,6 +204,14 @@ public class TabBillingDoubleCallingRecord {
this.calledPhone = calledPhone;
}
public Double getUnitFee() {
return unitFee;
}
public void setUnitFee(Double unitFee) {
this.unitFee = unitFee;
}
public String getAppCode() {
return appCode;
}
......
......@@ -42,17 +42,22 @@ public class TabBillingRecordingStorageRecord {
private Date deductionTime;
/**
* 被叫id
*/
private Long calledId;
/**
* 被叫
*/
private String calledPhone;
/**
*
* 运维后台配置
*/
private String appCode;
/**
*
* 运维后台配置
*/
private String appName;
......@@ -72,6 +77,11 @@ public class TabBillingRecordingStorageRecord {
private String paySerialNumber;
/**
* 单价
*/
private Double unitFee;
/**
* 录音存储时长 单位:天
*/
private String storageDuration;
......@@ -167,6 +177,14 @@ public class TabBillingRecordingStorageRecord {
this.deductionTime = deductionTime;
}
public Long getCalledId() {
return calledId;
}
public void setCalledId(Long calledId) {
this.calledId = calledId;
}
public String getCalledPhone() {
return calledPhone;
}
......@@ -215,6 +233,14 @@ public class TabBillingRecordingStorageRecord {
this.paySerialNumber = paySerialNumber;
}
public Double getUnitFee() {
return unitFee;
}
public void setUnitFee(Double unitFee) {
this.unitFee = unitFee;
}
public String getStorageDuration() {
return storageDuration;
}
......
......@@ -37,12 +37,12 @@ public class TabBillingVoiceCodeRecord {
private String voiceTime;
/**
* 应用
* 应用 运维后台配置
*/
private String appCode;
/**
* 应用name
* 应用name 运维后台配置
*/
private String appName;
......@@ -67,6 +67,11 @@ public class TabBillingVoiceCodeRecord {
private Integer enterpriseId;
/**
* 单价
*/
private Long unitFee;
/**
* 消费时间
*/
private Date deductionTime;
......@@ -192,6 +197,14 @@ public class TabBillingVoiceCodeRecord {
this.enterpriseId = enterpriseId;
}
public Long getUnitFee() {
return unitFee;
}
public void setUnitFee(Long unitFee) {
this.unitFee = unitFee;
}
public Date getDeductionTime() {
return deductionTime;
}
......
......@@ -116,6 +116,11 @@ public class TabDownloadReport {
*/
private String auditReason;
/**
* 项目名 默认gic
*/
private String projectCode;
public Integer getDownloadReportId() {
return downloadReportId;
}
......@@ -291,4 +296,12 @@ public class TabDownloadReport {
public void setAuditReason(String auditReason) {
this.auditReason = auditReason;
}
public String getProjectCode() {
return projectCode;
}
public void setProjectCode(String projectCode) {
this.projectCode = projectCode;
}
}
\ No newline at end of file
......@@ -53,6 +53,9 @@ public class DownloadReportApiServiceImpl implements DownloadReportApiService {
if (!paramResult.isSuccess()) {
return paramResult;
}
if (StringUtils.isBlank(downloadReportDTO.getProjectCode())) {
downloadReportDTO.setProjectCode("gic");
}
ServiceResponse<UserDTO> serviceResponse = userApiService.getUserInfoById(downloadReportDTO.getApplyUserId());
if (!serviceResponse.isSuccess()) {
return EnterpriseServiceResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
......
......@@ -10,8 +10,10 @@
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
<result column="called_id" jdbcType="BIGINT" property="calledId" />
<result column="called_name" jdbcType="VARCHAR" property="calledName" />
<result column="called_phone" jdbcType="VARCHAR" property="calledPhone" />
<result column="unit_fee" jdbcType="DOUBLE" property="unitFee" />
<result column="app_code" jdbcType="VARCHAR" property="appCode" />
<result column="app_name" jdbcType="VARCHAR" property="appName" />
<result column="voice_time" jdbcType="VARCHAR" property="voiceTime" />
......@@ -25,9 +27,9 @@
</resultMap>
<sql id="Base_Column_List">
double_calling_record_id, pay_serial_number, caller_name, caller_phone, fee, status,
create_time, deduction_time, called_name, called_phone, app_code, app_name, voice_time,
enterprise_id, store_id, store_name, store_group_id, store_group_name, call_time,
remark
create_time, deduction_time, called_id, called_name, called_phone, unit_fee, app_code,
app_name, voice_time, enterprise_id, store_id, store_name, store_group_id, store_group_name,
call_time, remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -43,19 +45,19 @@
insert into tab_billing_double_calling_record (double_calling_record_id, pay_serial_number,
caller_name, caller_phone, fee,
status, create_time, deduction_time,
called_name, called_phone, app_code,
app_name, voice_time, enterprise_id,
store_id, store_name, store_group_id,
store_group_name, call_time, remark
)
called_id, called_name, called_phone,
unit_fee, app_code, app_name,
voice_time, enterprise_id, store_id,
store_name, store_group_id, store_group_name,
call_time, remark)
values (#{doubleCallingRecordId,jdbcType=INTEGER}, #{paySerialNumber,jdbcType=VARCHAR},
#{callerName,jdbcType=VARCHAR}, #{callerPhone,jdbcType=VARCHAR}, #{fee,jdbcType=DOUBLE},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{deductionTime,jdbcType=TIMESTAMP},
#{calledName,jdbcType=VARCHAR}, #{calledPhone,jdbcType=VARCHAR}, #{appCode,jdbcType=VARCHAR},
#{appName,jdbcType=VARCHAR}, #{voiceTime,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER},
#{storeId,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR}, #{storeGroupId,jdbcType=INTEGER},
#{storeGroupName,jdbcType=VARCHAR}, #{callTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}
)
#{calledId,jdbcType=BIGINT}, #{calledName,jdbcType=VARCHAR}, #{calledPhone,jdbcType=VARCHAR},
#{unitFee,jdbcType=DOUBLE}, #{appCode,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR},
#{voiceTime,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER}, #{storeId,jdbcType=INTEGER},
#{storeName,jdbcType=VARCHAR}, #{storeGroupId,jdbcType=INTEGER}, #{storeGroupName,jdbcType=VARCHAR},
#{callTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingDoubleCallingRecord">
insert into tab_billing_double_calling_record
......@@ -84,12 +86,18 @@
<if test="deductionTime != null">
deduction_time,
</if>
<if test="calledId != null">
called_id,
</if>
<if test="calledName != null">
called_name,
</if>
<if test="calledPhone != null">
called_phone,
</if>
<if test="unitFee != null">
unit_fee,
</if>
<if test="appCode != null">
app_code,
</if>
......@@ -146,12 +154,18 @@
<if test="deductionTime != null">
#{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="calledId != null">
#{calledId,jdbcType=BIGINT},
</if>
<if test="calledName != null">
#{calledName,jdbcType=VARCHAR},
</if>
<if test="calledPhone != null">
#{calledPhone,jdbcType=VARCHAR},
</if>
<if test="unitFee != null">
#{unitFee,jdbcType=DOUBLE},
</if>
<if test="appCode != null">
#{appCode,jdbcType=VARCHAR},
</if>
......@@ -208,12 +222,18 @@
<if test="deductionTime != null">
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="calledId != null">
called_id = #{calledId,jdbcType=BIGINT},
</if>
<if test="calledName != null">
called_name = #{calledName,jdbcType=VARCHAR},
</if>
<if test="calledPhone != null">
called_phone = #{calledPhone,jdbcType=VARCHAR},
</if>
<if test="unitFee != null">
unit_fee = #{unitFee,jdbcType=DOUBLE},
</if>
<if test="appCode != null">
app_code = #{appCode,jdbcType=VARCHAR},
</if>
......@@ -256,8 +276,10 @@
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
called_id = #{calledId,jdbcType=BIGINT},
called_name = #{calledName,jdbcType=VARCHAR},
called_phone = #{calledPhone,jdbcType=VARCHAR},
unit_fee = #{unitFee,jdbcType=DOUBLE},
app_code = #{appCode,jdbcType=VARCHAR},
app_name = #{appName,jdbcType=VARCHAR},
voice_time = #{voiceTime,jdbcType=VARCHAR},
......
......@@ -9,12 +9,14 @@
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
<result column="called_id" jdbcType="BIGINT" property="calledId" />
<result column="called_phone" jdbcType="VARCHAR" property="calledPhone" />
<result column="app_code" jdbcType="VARCHAR" property="appCode" />
<result column="app_name" jdbcType="VARCHAR" property="appName" />
<result column="voice_time" jdbcType="VARCHAR" property="voiceTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="pay_serial_number" jdbcType="VARCHAR" property="paySerialNumber" />
<result column="unit_fee" jdbcType="DOUBLE" property="unitFee" />
<result column="storage_duration" jdbcType="VARCHAR" property="storageDuration" />
<result column="member_name" jdbcType="VARCHAR" property="memberName" />
<result column="store_id" jdbcType="INTEGER" property="storeId" />
......@@ -26,9 +28,9 @@
</resultMap>
<sql id="Base_Column_List">
recording_storage_record_id, caller_name, caller_phone, fee, status, create_time,
deduction_time, called_phone, app_code, app_name, voice_time, enterprise_id, pay_serial_number,
storage_duration, member_name, store_id, store_name, store_group_id, store_group_name,
call_time, remark
deduction_time, called_id, called_phone, app_code, app_name, voice_time, enterprise_id,
pay_serial_number, unit_fee, storage_duration, member_name, store_id, store_name,
store_group_id, store_group_name, call_time, remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -43,20 +45,22 @@
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingRecordingStorageRecord">
insert into tab_billing_recording_storage_record (recording_storage_record_id, caller_name,
caller_phone, fee, status,
create_time, deduction_time, called_phone,
app_code, app_name, voice_time,
enterprise_id, pay_serial_number, storage_duration,
member_name, store_id, store_name,
store_group_id, store_group_name, call_time,
remark)
create_time, deduction_time, called_id,
called_phone, app_code, app_name,
voice_time, enterprise_id, pay_serial_number,
unit_fee, storage_duration, member_name,
store_id, store_name, store_group_id,
store_group_name, call_time, remark
)
values (#{recordingStorageRecordId,jdbcType=INTEGER}, #{callerName,jdbcType=VARCHAR},
#{callerPhone,jdbcType=VARCHAR}, #{fee,jdbcType=DOUBLE}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{deductionTime,jdbcType=TIMESTAMP}, #{calledPhone,jdbcType=VARCHAR},
#{appCode,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR}, #{voiceTime,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=INTEGER}, #{paySerialNumber,jdbcType=VARCHAR}, #{storageDuration,jdbcType=VARCHAR},
#{memberName,jdbcType=VARCHAR}, #{storeId,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR},
#{storeGroupId,jdbcType=INTEGER}, #{storeGroupName,jdbcType=VARCHAR}, #{callTime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR})
#{createTime,jdbcType=TIMESTAMP}, #{deductionTime,jdbcType=TIMESTAMP}, #{calledId,jdbcType=BIGINT},
#{calledPhone,jdbcType=VARCHAR}, #{appCode,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR},
#{voiceTime,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER}, #{paySerialNumber,jdbcType=VARCHAR},
#{unitFee,jdbcType=DOUBLE}, #{storageDuration,jdbcType=VARCHAR}, #{memberName,jdbcType=VARCHAR},
#{storeId,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR}, #{storeGroupId,jdbcType=INTEGER},
#{storeGroupName,jdbcType=VARCHAR}, #{callTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingRecordingStorageRecord">
insert into tab_billing_recording_storage_record
......@@ -82,6 +86,9 @@
<if test="deductionTime != null">
deduction_time,
</if>
<if test="calledId != null">
called_id,
</if>
<if test="calledPhone != null">
called_phone,
</if>
......@@ -100,6 +107,9 @@
<if test="paySerialNumber != null">
pay_serial_number,
</if>
<if test="unitFee != null">
unit_fee,
</if>
<if test="storageDuration != null">
storage_duration,
</if>
......@@ -147,6 +157,9 @@
<if test="deductionTime != null">
#{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="calledId != null">
#{calledId,jdbcType=BIGINT},
</if>
<if test="calledPhone != null">
#{calledPhone,jdbcType=VARCHAR},
</if>
......@@ -165,6 +178,9 @@
<if test="paySerialNumber != null">
#{paySerialNumber,jdbcType=VARCHAR},
</if>
<if test="unitFee != null">
#{unitFee,jdbcType=DOUBLE},
</if>
<if test="storageDuration != null">
#{storageDuration,jdbcType=VARCHAR},
</if>
......@@ -212,6 +228,9 @@
<if test="deductionTime != null">
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="calledId != null">
called_id = #{calledId,jdbcType=BIGINT},
</if>
<if test="calledPhone != null">
called_phone = #{calledPhone,jdbcType=VARCHAR},
</if>
......@@ -230,6 +249,9 @@
<if test="paySerialNumber != null">
pay_serial_number = #{paySerialNumber,jdbcType=VARCHAR},
</if>
<if test="unitFee != null">
unit_fee = #{unitFee,jdbcType=DOUBLE},
</if>
<if test="storageDuration != null">
storage_duration = #{storageDuration,jdbcType=VARCHAR},
</if>
......@@ -265,12 +287,14 @@
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
called_id = #{calledId,jdbcType=BIGINT},
called_phone = #{calledPhone,jdbcType=VARCHAR},
app_code = #{appCode,jdbcType=VARCHAR},
app_name = #{appName,jdbcType=VARCHAR},
voice_time = #{voiceTime,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
pay_serial_number = #{paySerialNumber,jdbcType=VARCHAR},
unit_fee = #{unitFee,jdbcType=DOUBLE},
storage_duration = #{storageDuration,jdbcType=VARCHAR},
member_name = #{memberName,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=INTEGER},
......@@ -281,7 +305,6 @@
remark = #{remark,jdbcType=VARCHAR}
where recording_storage_record_id = #{recordingStorageRecordId,jdbcType=INTEGER}
</update>
<select id="listHomeStatistics" parameterType="com.gic.enterprise.qo.HomeStatisticsQO" resultType="com.gic.enterprise.dto.HomeStatisticsDTO">
select
DATE_FORMAT(deduction_time,'%Y-%m-%d') statisticsDate,
......
......@@ -14,6 +14,7 @@
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="unit_fee" jdbcType="BIGINT" property="unitFee" />
<result column="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
<result column="member_name" jdbcType="VARCHAR" property="memberName" />
<result column="store_id" jdbcType="INTEGER" property="storeId" />
......@@ -23,7 +24,7 @@
</resultMap>
<sql id="Base_Column_List">
voice_code_record_id, pay_serial_number, status, send_time, receive_phone, voice_time,
app_code, app_name, fee, create_time, update_time, enterprise_id, deduction_time,
app_code, app_name, fee, create_time, update_time, enterprise_id, unit_fee, deduction_time,
member_name, store_id, store_name, store_group_id, store_group_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -41,16 +42,16 @@
status, send_time, receive_phone,
voice_time, app_code, app_name,
fee, create_time, update_time,
enterprise_id, deduction_time, member_name,
store_id, store_name, store_group_id,
store_group_name)
enterprise_id, unit_fee, deduction_time,
member_name, store_id, store_name,
store_group_id, store_group_name)
values (#{voiceCodeRecordId,jdbcType=INTEGER}, #{paySerialNumber,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{sendTime,jdbcType=TIMESTAMP}, #{receivePhone,jdbcType=VARCHAR},
#{voiceTime,jdbcType=VARCHAR}, #{appCode,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR},
#{fee,jdbcType=DOUBLE}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{enterpriseId,jdbcType=INTEGER}, #{deductionTime,jdbcType=TIMESTAMP}, #{memberName,jdbcType=VARCHAR},
#{storeId,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR}, #{storeGroupId,jdbcType=INTEGER},
#{storeGroupName,jdbcType=VARCHAR})
#{enterpriseId,jdbcType=INTEGER}, #{unitFee,jdbcType=BIGINT}, #{deductionTime,jdbcType=TIMESTAMP},
#{memberName,jdbcType=VARCHAR}, #{storeId,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR},
#{storeGroupId,jdbcType=INTEGER}, #{storeGroupName,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingVoiceCodeRecord">
insert into tab_billing_voice_code_record
......@@ -91,6 +92,9 @@
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="unitFee != null">
unit_fee,
</if>
<if test="deductionTime != null">
deduction_time,
</if>
......@@ -147,6 +151,9 @@
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="unitFee != null">
#{unitFee,jdbcType=BIGINT},
</if>
<if test="deductionTime != null">
#{deductionTime,jdbcType=TIMESTAMP},
</if>
......@@ -203,6 +210,9 @@
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="unitFee != null">
unit_fee = #{unitFee,jdbcType=BIGINT},
</if>
<if test="deductionTime != null">
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
</if>
......@@ -237,6 +247,7 @@
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
unit_fee = #{unitFee,jdbcType=BIGINT},
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
member_name = #{memberName,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=INTEGER},
......
......@@ -24,12 +24,13 @@
<result column="auditor_name" jdbcType="VARCHAR" property="auditorName" />
<result column="auditor_phone" jdbcType="VARCHAR" property="auditorPhone" />
<result column="audit_reason" jdbcType="VARCHAR" property="auditReason" />
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
</resultMap>
<sql id="Base_Column_List">
download_report_id, enterprise_id, report_id, apply_user_id, apply_user_name, report_start_time,
report_end_time, file_name, data_content, data_url, data_type, data_count, audit_result,
audit_expire_time, download_url, status, create_time, update_time, auditor_id, auditor_name,
auditor_phone, audit_reason
auditor_phone, audit_reason, project_code
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -49,7 +50,7 @@
audit_result, audit_expire_time, download_url,
status, create_time, update_time,
auditor_id, auditor_name, auditor_phone,
audit_reason)
audit_reason, project_code)
values (#{downloadReportId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{reportId,jdbcType=VARCHAR},
#{applyUserId,jdbcType=INTEGER}, #{applyUserName,jdbcType=VARCHAR}, #{reportStartTime,jdbcType=TIMESTAMP},
#{reportEndTime,jdbcType=TIMESTAMP}, #{fileName,jdbcType=VARCHAR}, #{dataContent,jdbcType=VARCHAR},
......@@ -57,12 +58,9 @@
#{auditResult,jdbcType=INTEGER}, #{auditExpireTime,jdbcType=TIMESTAMP}, #{downloadUrl,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER}, #{auditorName,jdbcType=VARCHAR}, #{auditorPhone,jdbcType=VARCHAR},
#{auditReason,jdbcType=VARCHAR})
#{auditReason,jdbcType=VARCHAR}, #{projectCode,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabDownloadReport">
<selectKey keyProperty="downloadReportId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_download_report
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="downloadReportId != null">
......@@ -131,6 +129,9 @@
<if test="auditReason != null">
audit_reason,
</if>
<if test="projectCode != null">
project_code,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="downloadReportId != null">
......@@ -199,6 +200,9 @@
<if test="auditReason != null">
#{auditReason,jdbcType=VARCHAR},
</if>
<if test="projectCode != null">
#{projectCode,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabDownloadReport">
......@@ -267,6 +271,9 @@
<if test="auditReason != null">
audit_reason = #{auditReason,jdbcType=VARCHAR},
</if>
<if test="projectCode != null">
project_code = #{projectCode,jdbcType=VARCHAR},
</if>
</set>
where download_report_id = #{downloadReportId,jdbcType=INTEGER}
</update>
......@@ -292,7 +299,8 @@
auditor_id = #{auditorId,jdbcType=INTEGER},
auditor_name = #{auditorName,jdbcType=VARCHAR},
auditor_phone = #{auditorPhone,jdbcType=VARCHAR},
audit_reason = #{auditReason,jdbcType=VARCHAR}
audit_reason = #{auditReason,jdbcType=VARCHAR},
project_code = #{projectCode,jdbcType=VARCHAR}
where download_report_id = #{downloadReportId,jdbcType=INTEGER}
</update>
<select id="getBySelective" resultMap="BaseResultMap">
......@@ -339,6 +347,12 @@
and has_download_url is null
</if>
</if>
<if test="projectCode != null and projectCode != '' ">
and project_code = #{projectCode}
</if>
<if test="projectCode == null or projectCode == '' ">
and project_code = 'gic'
</if>
order by create_time desc
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment