Commit 47d897b0 by 陶光胜

Merge branch 'developer' of…

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-platform-enterprise into developer
parents 80cdf280 a8f11b30
......@@ -6,9 +6,10 @@ public enum FeeTypeEnum {
SMS_PACKAGE(4, "短信套餐包明细(余额支付)"),
SMS(3, "国内短信消费明细"),
INTERNATIONAL_SMS(8, "海外短信消费明细"),
VOICE_CODE(2, "语音验证码消费明细"),
DOUBLE_CALLING(6, "双向呼叫消费明细"),
RECORDING_STORAGE(5, "录音存储消费明细");
// VOICE_CODE(2, "语音验证码消费明细"),
// DOUBLE_CALLING(6, "双向呼叫消费明细"),
// RECORDING_STORAGE(5, "录音存储消费明细"),
;
private int code;
private String message;
......
......@@ -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;
}
}
......@@ -56,6 +56,17 @@ public interface EnterpriseApiService {
ServiceResponse<Integer> editEnterpriseInfo(EnterpriseDTO enterpriseDTO);
/**
* 修改商户logo
* @Title: modifyEnterpriseLogo

* @Description:

* @author guojuxing
* @param enterpriseId 商户ID
* @param logoUrl
logo的图片地址
* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>


*/
ServiceResponse<String> modifyEnterpriseLogo(Integer enterpriseId, String logoUrl);
/**
* 查询单条数据
* @Title: getEnterpriseById

* @Description:
......
......@@ -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
......@@ -147,6 +147,9 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
} else {
record.setEnterpriseId(getById.getEnterpriseId());
record.setPageId(pageId);
if (record.getStatus().intValue() != 1) {
record.setStatus(getById.getStatus());
}
appletCustomPageService.edit(record);
}
}
......
......@@ -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());
......
......@@ -176,6 +176,19 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
}
@Override
public ServiceResponse<String> modifyEnterpriseLogo(Integer enterpriseId, String logoUrl) {
TabEnterprise tabEnterprise = enterpriseService.getEnterpriseById(enterpriseId);
if (tabEnterprise == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "企业ID错误,查询不到数据");
}
EnterpriseDTO enterpriseDTO = new EnterpriseDTO();
enterpriseDTO.setEnterpriseId(enterpriseId);
enterpriseDTO.setLogo(logoUrl);
enterpriseService.editEnterprise(enterpriseDTO);
return ServiceResponse.success(tabEnterprise.getEnterpriseName());
}
@Override
public ServiceResponse<EnterpriseDTO> getEnterpriseById(Integer enterpriseId) {
TabEnterprise tabEnterprise = enterpriseService.getEnterpriseById(enterpriseId);
if (tabEnterprise == null) {
......
package com.gic.enterprise.utils.chart;
import com.gic.enterprise.constant.billing.FeeTypeEnum;
import com.gic.enterprise.dto.HomeStatisticsDTO;
import com.gic.enterprise.qo.HomeStatisticsQO;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.gic.enterprise.constant.billing.FeeTypeEnum;
import com.gic.enterprise.dto.HomeStatisticsDTO;
import com.gic.enterprise.qo.HomeStatisticsQO;
/**
* 计费中心首页图表
* @ClassName: FeeChartUtils

......@@ -20,11 +20,11 @@ public class FeeChartUtils {
static {
getPageMap.put(FeeTypeEnum.ACCOUNT_BALANCE.getCode(), new BillingAccountBalanceRecord());
getPageMap.put(FeeTypeEnum.DOUBLE_CALLING.getCode(), new BillingDoubleCallingRecord());
getPageMap.put(FeeTypeEnum.RECORDING_STORAGE.getCode(), new BillingRecordingStorageRecord());
// getPageMap.put(FeeTypeEnum.DOUBLE_CALLING.getCode(), new BillingDoubleCallingRecord());
// getPageMap.put(FeeTypeEnum.RECORDING_STORAGE.getCode(), new BillingRecordingStorageRecord());
getPageMap.put(FeeTypeEnum.SMS.getCode(), new BillingSmsRecord());
getPageMap.put(FeeTypeEnum.SMS_PACKAGE.getCode(), new BillingSmsPackageRecord());
getPageMap.put(FeeTypeEnum.VOICE_CODE.getCode(), new BillingVoiceCodeRecord());
// getPageMap.put(FeeTypeEnum.VOICE_CODE.getCode(), new BillingVoiceCodeRecord());
}
/**
......
......@@ -205,6 +205,10 @@
<if test="orderByStr != null and orderByStr != '' ">
${orderByStr}
</if>
<if test="orderByStr == null or orderByStr == ''">
order by status , update_time desc
</if>
</select>
<update id="disableFetch">
......
......@@ -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,7 +58,7 @@
#{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">
......@@ -131,6 +132,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 +203,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 +274,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 +302,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 +350,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
......@@ -256,7 +256,7 @@
t1.applet_content, t1.is_custom
from tab_link t1 left join tab_link_scene t2 on t1.link_id = t2.link_id
and t1.parent_id = #{parentId}
and (t1.enterprise_type = 1 or (t1.enterprise_type = 2 and t2.enterprise_id = #{enterpriseId} ))
and (t1.enterprise_type = 1 or (t1.enterprise_type = 2 and t2.enterprise_id = #{enterpriseId} and t2.status = 1 ))
and t1.status = 1
</select>
<select id="treeByGic" resultMap="BaseResultMap">
......@@ -264,7 +264,7 @@
t1.link_id, t1.create_time, t1.update_time, t1.parent_id, t1.status, t1.type, t1.object_type, t1.name, t1.h5_content,
t1.applet_content, t1.is_custom
from tab_link t1 left join tab_link_scene t2 on t1.link_id = t2.link_id
where (t1.enterprise_type = 1 or (t1.enterprise_type = 2 and t2.enterprise_id = #{enterpriseId} ))
where (t1.enterprise_type = 1 or (t1.enterprise_type = 2 and t2.enterprise_id = #{enterpriseId} and t2.status = 1 ))
and t1.status = 1
<if test="objectType != null ">
<if test="objectType == 1">
......
......@@ -193,6 +193,11 @@ public class EnterpriseController {
return ResultControllerUtils.commonResult(enterpriseApiService.editEnterprise(enterpriseDTO));
}
@RequestMapping("/modify-enterprise-logo")
public RestResponse modifyEnterpriseLogo(Integer enterpriseId, String logoUrl) {
return ResultControllerUtils.commonResult(enterpriseApiService.modifyEnterpriseLogo(enterpriseId, logoUrl));
}
@RequestMapping("/edit-user")
public RestResponse editUser(UserDTO userDTO) {
//自动密码
......
......@@ -63,7 +63,7 @@ public class LoginController {
public RestResponse bind(Integer enterpriseId, String nationCode, String phone, String password)
throws IOException {
return ResultControllerUtils.commonResult(
marketUserApiService.BindGicEnterprise(Long.valueOf(enterpriseId), nationCode, phone, password));
marketUserApiService.BindGicEnterprise(Long.valueOf(enterpriseId), nationCode.replace("+", ""), phone, password));
}
/**
......
package com.gic.operation.web.controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import com.gic.auth.qo.MenuOperationItemListQO;
import com.gic.open.api.dto.ServePropDTO;
......@@ -119,16 +116,26 @@ public class MenuController {
@RequestMapping("/list-menu-tree")
public RestResponse listMenuTree(MenuListQO params) {
LOGGER.info("菜单列表查询参数:{}", JSON.toJSONString(params));
//逐级展开的方式,所以需要传ID,如果不传,默认查询第一层级,即level = 1
// if (params.getMenuId() == null) {
// params.setLevel(1);
// }
long serviceBefore = System.currentTimeMillis();
if (params.getIsGIC() != null && params.getIsGIC() == MenuProjectConstants.APP_PROJECT_CODE) {
//如果是查询app应用类别,必须实时更新最新应用数据
params.setNeedUpdateAppMenu(true);
}
ServiceResponse<List<MenuDTO>> result = menuApiService.listMenuTree(params);
long serviceAfter = System.currentTimeMillis();
LOGGER.info("menuApiService.listMenuTree权限菜单服务调用时间:{}", serviceAfter - serviceBefore);
if (result.isSuccess()) {
if (StringUtils.isBlank(params.getSearch())) {
return RestResponse.success(changeListToTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, result.getResult()));
List<Map<String, Object>> resultInfo = changeListToTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID,
result.getResult());
LOGGER.info("changeListToTree权限菜单数据递归时间:{}", System.currentTimeMillis() - serviceAfter);
return RestResponse.success(resultInfo);
} else {
return ResultControllerUtils.commonResult(result);
return RestResponse.success(addAuthItemSignAndChildrenSignToList(result.getResult()));
}
}
return EnterpriseRestResponse.failure(result);
......@@ -148,7 +155,8 @@ public class MenuController {
params.setMenuType(MenuTypeEnum.PAGE.getCode());
ServiceResponse<List<MenuDTO>> result = menuApiService.listMenuTree(params);
if (result.isSuccess()) {
return RestResponse.success(changePageListToTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, result.getResult()));
return RestResponse
.success(changePageListToTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, result.getResult()));
}
return EnterpriseRestResponse.failure(result);
}
......@@ -294,7 +302,8 @@ public class MenuController {
String menuVersion = dto.getMenuVersion();
String menuVersionName = dto.getMenuVersionName();
if (StringUtils.isNotBlank(menuVersion)) {
String[] menuVersionArr = menuVersion.substring(1, menuVersion.length() - 1).split(SignConstants.UNDERLINE);
String[] menuVersionArr = menuVersion.substring(1, menuVersion.length() - 1)
.split(SignConstants.UNDERLINE);
String[] menuVersionNameArr = menuVersionName.split(SignConstants.SLASH);
for (int i = 0, len = menuVersionArr.length; i < len; i++) {
map.put(menuVersionArr[i], menuVersionNameArr[i]);
......@@ -347,6 +356,58 @@ public class MenuController {
return result;
}
/**
* 是权限项标识/是否有子菜单
* @param list
* @return
*/
public List<Map<String, Object>> addAuthItemSignAndChildrenSignToList(List<MenuDTO> list) {
List<Map<String, Object>> result = new ArrayList<>();
if (list != null) {
List<Integer> parentMenuIdList = new ArrayList<>(list.size());
for (MenuDTO menuDTO : list) {
parentMenuIdList.add(menuDTO.getMenuId());
}
Set<String> authItemMap = new HashSet<>(16);
Set<String> childrenMap = new HashSet<>(16);
ServiceResponse<List<MenuDTO>> listByParentIdListResult = menuApiService
.listByParentMenuIdList(parentMenuIdList);
if (listByParentIdListResult.isSuccess()) {
List<MenuDTO> listByParentIdList = listByParentIdListResult.getResult();
if (CollectionUtils.isNotEmpty(listByParentIdList)) {
for (MenuDTO child : listByParentIdList) {
int menuType = child.getMenuType().intValue();
if (menuType == MenuTypeEnum.ROLE.getCode()) {
authItemMap.add(child.getParentId().toString());
} else if (menuType == MenuTypeEnum.PAGE.getCode()) {
childrenMap.add(child.getParentId().toString());
}
}
}
}
for (int j = 0, length = list.size(); j < length; j++) {
MenuDTO menuDTO = list.get(j);
Map<String, Object> data = new HashMap<>(16);
data.put("menuId", menuDTO.getMenuId());
data.put("menuName", menuDTO.getMenuName());
data.put("menuUrl", menuDTO.getMenuUrl());
data.put("project", menuDTO.getProject());
data.put("sort", menuDTO.getSort());
data.put("menuCode", menuDTO.getMenuCode());
data.put("parentCode", menuDTO.getParentCode());
data.put("parentId", menuDTO.getParentId());
data.put("menuVersionName", menuDTO.getMenuVersionName());
data.put("seq", j + 1);
//是否拥有子集,用于 展开按钮的显示
data.put("children", childrenMap.contains(menuDTO.getMenuId().toString()));
//是否有权限项
data.put("hasAuthItem", authItemMap.contains(menuDTO.getMenuId().toString()));
result.add(data);
}
}
return result;
}
public static List<Map<String, Object>> changePageListToTree(int storeGroupId, List<MenuDTO> list) {
List<Map<String, Object>> result = new ArrayList<>();
if (list != null) {
......
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