master
wangning 7 years ago
parent 9981c2b36f
commit 1b462fd599

@ -324,12 +324,11 @@ alter table act_app_list add column `msg_interval` smallint(3) DEFAULT NULL;
alter table sys_clients add column `manual_settle` tinyint(1) DEFAULT 0;
create table log_acts_clients(
create table log_clients_operation(
id varchar(50) not null,
client_id int(11) not null,
act_id varchar(50) not null,
act_name varchar(100) NOT NULL COMMENT '活动名称',
account_id varchar(50) not null comment '操作人者 账户ID',
create_time datetime not null,
operation TINYINT(3) default 0 comment '0:noop,1:参加活动2退出活动',
operation varchar(50) DEFAULT NULL,
PRIMARY key(`id`)
);

@ -4,7 +4,7 @@ import au.com.royalpay.payment.manage.activities.monsettledelay.core.ActMonDelay
import au.com.royalpay.payment.manage.mappers.act.ActAppMapper;
import au.com.royalpay.payment.manage.mappers.act.ActMonDelaySettleMapper;
import au.com.royalpay.payment.manage.mappers.act.ActMonDelaySettleRedPackMapper;
import au.com.royalpay.payment.manage.mappers.log.ActsClientsLogMapper;
import au.com.royalpay.payment.manage.mappers.log.ClientsOperationLogMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.tools.device.DeviceSupport;
@ -44,7 +44,7 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
@Resource
private ActAppMapper actAppMapper;
@Resource
private ActsClientsLogMapper actsClientsLogMapper;
private ClientsOperationLogMapper clientsOperationLogMapper;
@Resource
private ClientManager clientManager;
@ -135,7 +135,7 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
device.put("expire_time", act.getDate("expire_date"));
actMonDelaySettleMapper.save(device);
clientManager.changeManualSettle(client_id,true);
saveActClientLog(act.getString("act_id"),act.getString("act_name"), client_id,1);
saveActClientLog(device.getString("account_id"),client_id,"参加活动打开手动清算");
}
@ -159,18 +159,17 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
actMonDelaySettleMapper.update(clientLog);
JSONObject act = actAppMapper.getActDetail("1");
clientManager.changeManualSettle(client_id,false);
saveActClientLog(act.getString("act_id"),act.getString("act_name"), client_id,2);
saveActClientLog(device.getString("account_id"), client_id,"退出活动关闭手动清算");
}
private void saveActClientLog(String act_id,String act_name, int client_id,int operation) {
private void saveActClientLog(String account_id, int client_id,String operation) {
JSONObject actClientLog = new JSONObject();
actClientLog.put("act_id",act_id);
actClientLog.put("client_id",client_id);
actClientLog.put("act_name",act_name);
actClientLog.put("account_id",account_id);
actClientLog.put("operation",operation);
actClientLog.put("create_time",new Date());
actsClientsLogMapper.save(actClientLog);
clientsOperationLogMapper.save(actClientLog);
}
}

@ -9,8 +9,8 @@ import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
/**
* Created by yixian on 2017-04-18.
*/
@AutoMapper(tablename = "log_acts_clients",pkName = "id")
public interface ActsClientsLogMapper {
@AutoMapper(tablename = "log_clients_operation",pkName = "id")
public interface ClientsOperationLogMapper {
@AutoSql(type = SqlType.INSERT)
void save(JSONObject review);
}
Loading…
Cancel
Save