Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	src/db/modify.sql
master
eason 6 years ago
commit 413f38b1af

@ -616,3 +616,47 @@ alter table sys_clients add column hfindustry varchar(10) DEFAULT NULL COMMENT '
alter table financial_bd_prize_rate_config add column `kpi_range` smallint(6) NOT NULL; alter table financial_bd_prize_rate_config add column `kpi_range` smallint(6) NOT NULL;
alter table financial_bd_config add column `kpi_amount` decimal(15,2) DEFAULT NULL; alter table financial_bd_config add column `kpi_amount` decimal(15,2) DEFAULT NULL;
alter table financial_bd_prize_log add column `kpi_amount` decimal(15,2) DEFAULT NULL; alter table financial_bd_prize_log add column `kpi_amount` decimal(15,2) DEFAULT NULL;
CREATE TABLE sys_permission_partner_modules (
id int(11) NOT NULL AUTO_INCREMENT,
module_name varchar(50) NOT NULL COMMENT '模块名称',
js_module varchar(50) DEFAULT NULL COMMENT 'js module name',
js_path varchar(255) DEFAULT NULL COMMENT 'js module path',
remark varchar(50) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;
CREATE TABLE sys_permission_partner_modules_clients (
id bigint(20) NOT NULL,
client_id int(11) NOT NULL COMMENT '客户编号',
client_moniker varchar(20) NOT NULL COMMENT '客户简写识别码',
module_id int(11) NOT NULL COMMENT '模块id',
is_valid tinyint(1) DEFAULT '1' COMMENT '1:启用,0:不启用',
PRIMARY KEY (id),
UNIQUE KEY unique_client_id_module_id (client_id,module_id),
KEY index_client_id (client_id),
KEY index_client_moniker (client_moniker)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE sys_permission_partner_functions (
func_id varchar(80) NOT NULL,
module_id int(11) DEFAULT NULL COMMENT '模块id',
role int(11) NOT NULL DEFAULT '0' COMMENT '有权限角色(mask)',
class_name varchar(30) NOT NULL COMMENT '类名',
method_name varchar(50) NOT NULL COMMENT '方法名',
uri varchar(200) NOT NULL COMMENT '请求地址',
req_methods varchar(50) NOT NULL,
module varchar(30) DEFAULT NULL COMMENT '所属模块',
name varchar(50) DEFAULT NULL COMMENT '别名(用于前端按钮指定权限)',
remark varchar(50) DEFAULT NULL COMMENT '备注',
is_valid tinyint(1) DEFAULT '1' COMMENT '是否有效',
PRIMARY KEY (func_id),
UNIQUE KEY uk_func_name (name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `act_charity` (
`client_id` int(11) DEFAULT NULL,
`client_moniker` varchar(20) NOT NULL COMMENT '客户简写识别码',
`active_time` date DEFAULT NULL,
PRIMARY KEY (`client_moniker`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

@ -13,20 +13,20 @@ GROUP BY act_charity.client_id order by sum_ordernum desc
<select id="getChairtyWeekstartAnalysis" resultType="com.alibaba.fastjson.JSONObject"> <select id="getChairtyWeekstartAnalysis" resultType="com.alibaba.fastjson.JSONObject">
select DATE_FORMAT(pmt_transactions.transaction_time,'%Y-%m-%d') as weekstart from act_charity select DATE_FORMAT(pmt_transactions.transaction_time,'%Y-%m-%d') as weekstart from act_charity
inner JOIN pmt_transactions on act_charity.client_id = pmt_transactions.client_id inner JOIN pmt_transactions on act_charity.client_id = pmt_transactions.client_id
where dayofweek(pmt_transactions.transaction_time)=2 and pmt_transactions.transaction_time&gt;=#{begin} and pmt_transactions.transaction_time&lt;=#{end} where dayofweek(pmt_transactions.transaction_time)=2 and pmt_transactions.transaction_time&gt;=#{begin} and pmt_transactions.transaction_time&lt;=#{end} and pmt_transactions.transaction_time>=act_charity.active_time
and pmt_transactions.refund_id is null and pmt_transactions.channel != 'Settlement' and pmt_transactions.refund_id is null and pmt_transactions.channel != 'Settlement'
group by weekstart order by weekstart asc; group by weekstart order by weekstart asc;
</select> </select>
<select id="getChairtyWeekAnalysis" resultType="com.alibaba.fastjson.JSONObject"> <select id="getChairtyWeekAnalysis" resultType="com.alibaba.fastjson.JSONObject">
select count(pmt_transactions.org_id) as count_ordernum,ifnull(sum(pmt_transactions.transaction_amount),0) as sum_ordernum from act_charity left JOIN pmt_transactions ON act_charity.client_id = pmt_transactions.client_id select count(pmt_transactions.org_id) as count_ordernum,ifnull(sum(pmt_transactions.transaction_amount),0) as sum_ordernum from act_charity left JOIN pmt_transactions ON act_charity.client_id = pmt_transactions.client_id
and pmt_transactions.transaction_type='Credit' and pmt_transactions.transaction_time&gt;=#{begin} and pmt_transactions.transaction_time&lt;=#{end} and pmt_transactions.transaction_type='Credit' and pmt_transactions.transaction_time&gt;=#{begin} and pmt_transactions.transaction_time&lt;=#{end} and pmt_transactions.transaction_time>=act_charity.active_time
and pmt_transactions.refund_id is null and pmt_transactions.channel != 'Settlement' and pmt_transactions.refund_id is null and pmt_transactions.channel != 'Settlement'
</select> </select>
<select id="getChairtyWeekRaking" resultType="com.alibaba.fastjson.JSONObject"> <select id="getChairtyWeekRaking" resultType="com.alibaba.fastjson.JSONObject">
select act_charity.client_moniker,((count(pmt_transactions.org_id)) * 0.01) as chair_ordernum,ifnull(sum(pmt_transactions.transaction_amount),0) as sum_ordernum from act_charity left JOIN pmt_transactions ON act_charity.client_id = pmt_transactions.client_id select act_charity.client_moniker,((count(pmt_transactions.org_id)) * 0.01) as chair_ordernum,ifnull(sum(pmt_transactions.transaction_amount),0) as sum_ordernum from act_charity left JOIN pmt_transactions ON act_charity.client_id = pmt_transactions.client_id
and pmt_transactions.transaction_type='Credit' and pmt_transactions.transaction_time&gt;=#{begin} and pmt_transactions.transaction_time&lt;=#{end} and pmt_transactions.transaction_type='Credit' and pmt_transactions.transaction_time&gt;=#{begin} and pmt_transactions.transaction_time&lt;=#{end} and pmt_transactions.transaction_time>=act_charity.active_time
GROUP BY act_charity.client_moniker order by sum_ordernum desc GROUP BY act_charity.client_moniker order by sum_ordernum desc
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save