add qrcode log

master
wangning 7 years ago
parent 2f1abf902a
commit c221156029

@ -4,7 +4,7 @@ import org.springframework.data.mongodb.core.mapping.Document;
import java.util.Date; import java.util.Date;
@Document(collection = "client_config_log") // here is solution @Document(collection = "client_config_log")
public class ClientConfigLog { public class ClientConfigLog {
private long id; private long id;

@ -164,7 +164,7 @@ public interface ClientManager {
JSONObject getQRCode(JSONObject manager, String clientMoniker, QRCodeConfig config); JSONObject getQRCode(JSONObject manager, String clientMoniker, QRCodeConfig config);
String getQrCodeBoard(JSONObject client, QRCodeConfig config); String getQrCodeBoard(JSONObject client, QRCodeConfig config,JSONObject account);
void writeAggregateQrCodeBoard(JSONObject manager, String clientMoniker, QRCodeConfig config, OutputStream ous); void writeAggregateQrCodeBoard(JSONObject manager, String clientMoniker, QRCodeConfig config, OutputStream ous);

@ -120,6 +120,7 @@ import org.springframework.cache.annotation.Cacheable;
import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware; import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.context.MessageSource; import org.springframework.context.MessageSource;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -252,6 +253,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private ClientsOperationLogMapper clientsOperationLogMapper; private ClientsOperationLogMapper clientsOperationLogMapper;
@Resource @Resource
private ClientInfoCacheSupport clientInfoCacheSupport; private ClientInfoCacheSupport clientInfoCacheSupport;
@Resource
private MongoTemplate mongoTemplate;
private static final String SOURCE_AGREE_FILE = "source_agree_file"; private static final String SOURCE_AGREE_FILE = "source_agree_file";
private static final String CLIENT_BANK_FILE = "client_bank_file"; private static final String CLIENT_BANK_FILE = "client_bank_file";
@ -1519,9 +1522,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
@Override @Override
public String getQrCodeBoard(JSONObject client, QRCodeConfig config) { public String getQrCodeBoard(JSONObject client, QRCodeConfig config,JSONObject account) {
// JSONObject org = orgMapper.findOne(client.getIntValue("org_id")); // JSONObject org = orgMapper.findOne(client.getIntValue("org_id"));
return merchantInfoProvider.getQrCodeBoard(client, config); return merchantInfoProvider.getQrCodeBoard(client, config,account);
} }
@Override @Override
@ -1545,7 +1548,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
qrboardConfig.put("brandw", "600"); qrboardConfig.put("brandw", "600");
qrboardConfig.put("brandh", "200"); qrboardConfig.put("brandh", "200");
String type = qrboardConfig.getString("type"); String type = qrboardConfig.getString("type");
QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, config); QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, config,mongoTemplate,manager);
board.drawBoardImage(ous); board.drawBoardImage(ous);
} catch (Exception e) { } catch (Exception e) {
throw new ServerErrorException("QR board config not set for current organize", e); throw new ServerErrorException("QR board config not set for current organize", e);
@ -1565,7 +1568,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject qrboardConfig = JSON.parseObject(qrBoardConfigString); JSONObject qrboardConfig = JSON.parseObject(qrBoardConfigString);
String type = qrboardConfig.getString("type"); String type = qrboardConfig.getString("type");
QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, config); QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, config,mongoTemplate,manager);
board.drawBoardImage(ous); board.drawBoardImage(ous);
} catch (Exception e) { } catch (Exception e) {
throw new ServerErrorException("QR board config not set for current organize", e); throw new ServerErrorException("QR board config not set for current organize", e);

Loading…
Cancel
Save