Commit 708fbbb2 by zhiwj

调整sql 修改bug

parent f0ebc64d
......@@ -10,7 +10,7 @@ public enum DownloadReportDataTypeEnum {
COMPLETE_DATA(1, "完整数据"),
DESENSITIZATION_DATA(2, "脱敏数据"),
QR_CODE(3, "完整数据"),
QR_CODE(3, "二维码"),
;
private Integer code;
private String msg;
......
......@@ -77,6 +77,8 @@ public class VoiceCodeRecordDTO implements Serializable {
@NotNull(message = "商户id不能为空", groups = SaveValid.class)
private Integer enterpriseId;
private Date deductionTime;
private String operatorName;
public Integer getVoiceCodeRecordId() {
......@@ -182,4 +184,12 @@ public class VoiceCodeRecordDTO implements Serializable {
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
public Date getDeductionTime() {
return deductionTime;
}
public void setDeductionTime(Date deductionTime) {
this.deductionTime = deductionTime;
}
}
......@@ -66,6 +66,11 @@ public class TabBillingVoiceCodeRecord {
*/
private Integer enterpriseId;
/**
* 消费时间
*/
private Date deductionTime;
public Integer getVoiceCodeRecordId() {
return voiceCodeRecordId;
}
......@@ -161,4 +166,12 @@ public class TabBillingVoiceCodeRecord {
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Date getDeductionTime() {
return deductionTime;
}
public void setDeductionTime(Date deductionTime) {
this.deductionTime = deductionTime;
}
}
\ No newline at end of file
......@@ -106,7 +106,7 @@ public class AppletServiceConfigServiceImpl implements AppletServiceConfigServic
@Override
public TabAppletServiceConfig getAppletService(Integer appletServiceId) {
return null;
return this.tabAppletServiceConfigMapper.selectByPrimaryKey(appletServiceId);
}
private void getPage(AppletServiceConfigQO appletServiceConfigQO) {
......
......@@ -65,6 +65,16 @@ public class DownloadReportApiServiceImpl implements DownloadReportApiService {
} else {
downloadReportDTO.setAuditResult(DataSecurityAuditEnum.PASS.getCode());
}
// 重新定义文件名
if (downloadReportDTO.getReportStartTime() != null && downloadReportDTO.getReportEndTime() != null) {
String fileName = downloadReportDTO.getFileName() +
"-" +
DateUtil.dateToStr(downloadReportDTO.getReportStartTime(), DateUtil.FORMAT_DATE_10) +
"至" +
DateUtil.dateToStr(downloadReportDTO.getReportEndTime(), DateUtil.FORMAT_DATE_10);
downloadReportDTO.setFileName(fileName);
}
Integer downloadReportId = downloadReportService.save(downloadReportDTO);
return EnterpriseServiceResponse.success(downloadReportId);
}
......
......@@ -17,6 +17,8 @@ import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
/**
*
* @Description:
......@@ -86,6 +88,7 @@ public class VoiceCodeRecordApiServiceImpl implements VoiceCodeRecordApiService
}
}
billingAccountService.deductAccountByDatabase(voiceCodeRecordDTO.getFee(), voiceCodeRecordDTO.getEnterpriseId());
voiceCodeRecordDTO.setDeductionTime(new Date());
billingVoiceCodeRecordService.save(voiceCodeRecordDTO);
return ServiceResponse.success();
}
......
......@@ -149,10 +149,10 @@
<include refid="Base_Column_List" />
from tab_applet_service_config
where enterprise_id = #{enterpriseId}
and status = 1
<if test="type != null ">
and type = #{type}
</if>
and status = 1
<if test="search != null and search != '' ">
and name like concat('%', #{search}, '%')
</if>
......
......@@ -14,10 +14,11 @@
<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="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
</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
app_code, app_name, fee, create_time, update_time, enterprise_id, deduction_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -34,12 +35,12 @@
status, send_time, receive_phone,
voice_time, app_code, app_name,
fee, create_time, update_time,
enterprise_id)
enterprise_id, deduction_time)
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})
#{enterpriseId,jdbcType=INTEGER}, #{deductionTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingVoiceCodeRecord">
insert into tab_billing_voice_code_record
......@@ -80,6 +81,9 @@
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="deductionTime != null">
deduction_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="voiceCodeRecordId != null">
......@@ -118,6 +122,9 @@
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="deductionTime != null">
#{deductionTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingVoiceCodeRecord">
......@@ -156,6 +163,9 @@
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="deductionTime != null">
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
</if>
</set>
where voice_code_record_id = #{voiceCodeRecordId,jdbcType=INTEGER}
</update>
......@@ -171,7 +181,8 @@
fee = #{fee,jdbcType=DOUBLE},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER}
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
deduction_time = #{deductionTime,jdbcType=TIMESTAMP}
where voice_code_record_id = #{voiceCodeRecordId,jdbcType=INTEGER}
</update>
......
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