Commit a95181e2 authored by 技术部-任文超's avatar 技术部-任文超

驼峰命名

parent 0cd1f18c
...@@ -33,6 +33,7 @@ public interface Constants { ...@@ -33,6 +33,7 @@ public interface Constants {
String TOKEN_MASTER = "*"; String TOKEN_MASTER = "*";
String PASSWORDD_HEADER = "Basic "; String PASSWORDD_HEADER = "Basic ";
int AUTHORIZE_HEADER_SIZE = 2; int AUTHORIZE_HEADER_SIZE = 2;
String PAGE_NEXT_KEY_XYQB = "xyqb";
/** /**
* 登录账号/手机号参数名 * 登录账号/手机号参数名
*/ */
......
...@@ -25,7 +25,7 @@ public class CaptchaConfig { ...@@ -25,7 +25,7 @@ public class CaptchaConfig {
@Bean @Bean
public CaptchaEngine initCaptchaEngine() { public CaptchaEngine initCaptchaEngine() {
return new CustomJCaptchaEngine(); return new CustomCaptchaEngine();
} }
@Bean @Bean
...@@ -39,7 +39,7 @@ public class CaptchaConfig { ...@@ -39,7 +39,7 @@ public class CaptchaConfig {
@Bean(name = "customCaptchaService") @Bean(name = "customCaptchaService")
@Autowired @Autowired
public AbstractManageableImageCaptchaService initCaptchaService(CaptchaStore captchaStore, CaptchaEngine captchaEngine) { public AbstractManageableImageCaptchaService initCaptchaService(CaptchaStore captchaStore, CaptchaEngine captchaEngine) {
return new CustomJCaptchaService(captchaStore, captchaEngine); return new CustomCaptchaService(captchaStore, captchaEngine);
} }
} }
...@@ -23,7 +23,7 @@ import java.awt.*; ...@@ -23,7 +23,7 @@ import java.awt.*;
import java.awt.image.ImageFilter; import java.awt.image.ImageFilter;
/** /**
* 类名称:CustomJCaptchaEngine * 类名称:CustomCaptchaEngine
* 类描述: * 类描述:
* *
* @author 李宁 * @author 李宁
...@@ -33,7 +33,7 @@ import java.awt.image.ImageFilter; ...@@ -33,7 +33,7 @@ import java.awt.image.ImageFilter;
* 修改时间:15/11/17 12:04 * 修改时间:15/11/17 12:04
* 修改备注: * 修改备注:
*/ */
public class CustomJCaptchaEngine extends ListImageCaptchaEngine { public class CustomCaptchaEngine extends ListImageCaptchaEngine {
private static final int MIN_WORD_LEN = 4; private static final int MIN_WORD_LEN = 4;
private static final int MAX_WORD_LEN = 4; private static final int MAX_WORD_LEN = 4;
......
...@@ -12,7 +12,7 @@ import org.slf4j.LoggerFactory; ...@@ -12,7 +12,7 @@ import org.slf4j.LoggerFactory;
import java.util.Locale; import java.util.Locale;
/** /**
* 类名称:CustomJCaptchaService * 类名称:CustomCaptchaService
* 类描述:自定义的验证马实现服务 * 类描述:自定义的验证马实现服务
* *
* @author 李宁 * @author 李宁
...@@ -22,9 +22,9 @@ import java.util.Locale; ...@@ -22,9 +22,9 @@ import java.util.Locale;
* 修改时间:15/11/17 19:41 * 修改时间:15/11/17 19:41
* 修改备注: * 修改备注:
*/ */
public class CustomJCaptchaService extends AbstractManageableImageCaptchaService { public class CustomCaptchaService extends AbstractManageableImageCaptchaService {
private static final Logger LOGGER = LoggerFactory.getLogger(CustomJCaptchaService.class); private static final Logger LOGGER = LoggerFactory.getLogger(CustomCaptchaService.class);
/* /*
* 验证码管理策略: * 验证码管理策略:
...@@ -35,12 +35,12 @@ public class CustomJCaptchaService extends AbstractManageableImageCaptchaService ...@@ -35,12 +35,12 @@ public class CustomJCaptchaService extends AbstractManageableImageCaptchaService
private static final Integer MAX_CAPTCHA_STORE_SIZE = 70000; // 最大容量, 默认值是10w private static final Integer MAX_CAPTCHA_STORE_SIZE = 70000; // 最大容量, 默认值是10w
private static final Integer CAPTCHA_STORE_LOAD_BEFORE_GARBAGE_COLLECTION = 52500; // 配额, 超过此配额时执行一次垃圾清除, 默认值是:75000 private static final Integer CAPTCHA_STORE_LOAD_BEFORE_GARBAGE_COLLECTION = 52500; // 配额, 超过此配额时执行一次垃圾清除, 默认值是:75000
public CustomJCaptchaService(CaptchaStore captchaStore, CaptchaEngine captchaEngine) { public CustomCaptchaService(CaptchaStore captchaStore, CaptchaEngine captchaEngine) {
this(captchaStore, captchaEngine, MIN_GUARANTED_STORAGE_DELAY_IN_SECONDS, MAX_CAPTCHA_STORE_SIZE, CAPTCHA_STORE_LOAD_BEFORE_GARBAGE_COLLECTION); this(captchaStore, captchaEngine, MIN_GUARANTED_STORAGE_DELAY_IN_SECONDS, MAX_CAPTCHA_STORE_SIZE, CAPTCHA_STORE_LOAD_BEFORE_GARBAGE_COLLECTION);
} }
protected CustomJCaptchaService(CaptchaStore captchaStore, CaptchaEngine captchaEngine, int minGuarantedStorageDelayInSeconds, int maxCaptchaStoreSize, int captchaStoreLoadBeforeGarbageCollection) { protected CustomCaptchaService(CaptchaStore captchaStore, CaptchaEngine captchaEngine, int minGuarantedStorageDelayInSeconds, int maxCaptchaStoreSize, int captchaStoreLoadBeforeGarbageCollection) {
super(captchaStore, captchaEngine, minGuarantedStorageDelayInSeconds, maxCaptchaStoreSize, captchaStoreLoadBeforeGarbageCollection); super(captchaStore, captchaEngine, minGuarantedStorageDelayInSeconds, maxCaptchaStoreSize, captchaStoreLoadBeforeGarbageCollection);
} }
...@@ -92,6 +92,7 @@ public class CustomJCaptchaService extends AbstractManageableImageCaptchaService ...@@ -92,6 +92,7 @@ public class CustomJCaptchaService extends AbstractManageableImageCaptchaService
* @return * @return
* @throws CaptchaServiceException * @throws CaptchaServiceException
*/ */
@Override
public Object getChallengeForID(String ID, Locale locale) throws CaptchaServiceException { public Object getChallengeForID(String ID, Locale locale) throws CaptchaServiceException {
Captcha captcha = this.generateAndStoreCaptcha(locale, ID); Captcha captcha = this.generateAndStoreCaptcha(locale, ID);
Object challenge = this.getChallengeClone(captcha); Object challenge = this.getChallengeClone(captcha);
......
...@@ -19,7 +19,7 @@ import javax.annotation.Resource; ...@@ -19,7 +19,7 @@ import javax.annotation.Resource;
*/ */
@Primary @Primary
@Configuration @Configuration
public class LoanVestMQConfig { public class LoanVestMqConfig {
@Value("${loanvest.rabbitmq.queue}") @Value("${loanvest.rabbitmq.queue}")
private String queueName; private String queueName;
@Value("${loanvest.rabbitmq.exchange}") @Value("${loanvest.rabbitmq.exchange}")
......
package cn.quantgroup.xyqb.controller.external.platform; package cn.quantgroup.xyqb.controller.external.platform;
import cn.quantgroup.xyqb.Constants;
import cn.quantgroup.xyqb.controller.IBaseController; import cn.quantgroup.xyqb.controller.IBaseController;
import cn.quantgroup.xyqb.entity.Merchant; import cn.quantgroup.xyqb.entity.Merchant;
import cn.quantgroup.xyqb.entity.MerchantConfig; import cn.quantgroup.xyqb.entity.MerchantConfig;
...@@ -21,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -21,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@RestController @RestController
@RequestMapping("/platform/api") @RequestMapping("/platform/api")
public class PlatformAPIController implements IBaseController { public class PlatformApiController implements IBaseController {
@Autowired @Autowired
private IPageService pageService; private IPageService pageService;
...@@ -52,7 +53,7 @@ public class PlatformAPIController implements IBaseController { ...@@ -52,7 +53,7 @@ public class PlatformAPIController implements IBaseController {
Tuple<String, Boolean> nextPageTuple = pageService.nextPage(user, target, currentPage); Tuple<String, Boolean> nextPageTuple = pageService.nextPage(user, target, currentPage);
Boolean isFinal = nextPageTuple.getValue(); Boolean isFinal = nextPageTuple.getValue();
String nextPage = nextPageTuple.getKey(); String nextPage = nextPageTuple.getKey();
if ("xyqb".equals(key)) { if (Constants.PAGE_NEXT_KEY_XYQB.equals(key)) {
MerchantConfig merchantConfig = merchantService.findConfigByMerchantIdAndConfigName(4L, "returnUrl"); MerchantConfig merchantConfig = merchantService.findConfigByMerchantIdAndConfigName(4L, "returnUrl");
return JsonResult.buildSuccessResult("", ImmutableMap.of("type", "external", "transition", merchantConfig.getConfigValue())); return JsonResult.buildSuccessResult("", ImmutableMap.of("type", "external", "transition", merchantConfig.getConfigValue()));
} }
......
...@@ -862,18 +862,18 @@ public class InnerController implements IBaseController { ...@@ -862,18 +862,18 @@ public class InnerController implements IBaseController {
} }
} }
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(contacts)) { if (org.apache.commons.collections.CollectionUtils.isNotEmpty(contacts)) {
List<XContactInfo> userContacts = contacts2ContactRets(contacts); List<ContactInfo> userContacts = contacts2ContactRets(contacts);
bean.setContractResults(userContacts); bean.setContractResults(userContacts);
} }
} }
return bean; return bean;
} }
public static XContactInfo contact2ContactRet(Contact c) { public static ContactInfo contact2ContactRet(Contact c) {
if (c == null) { if (c == null) {
return null; return null;
} }
XContactInfo ret = new XContactInfo(); ContactInfo ret = new ContactInfo();
ret.setId(c.getId()); ret.setId(c.getId());
ret.setUserId(c.getUserId()); ret.setUserId(c.getUserId());
ret.setName(c.getName()); ret.setName(c.getName());
...@@ -882,11 +882,11 @@ public class InnerController implements IBaseController { ...@@ -882,11 +882,11 @@ public class InnerController implements IBaseController {
return ret; return ret;
} }
public static List<XContactInfo> contacts2ContactRets(List<Contact> cs) { public static List<ContactInfo> contacts2ContactRets(List<Contact> cs) {
if (org.apache.commons.collections.CollectionUtils.isEmpty(cs)) { if (org.apache.commons.collections.CollectionUtils.isEmpty(cs)) {
return Collections.emptyList(); return Collections.emptyList();
} }
List<XContactInfo> contactRets = new ArrayList<>(); List<ContactInfo> contactRets = new ArrayList<>();
for (Contact c : cs) { for (Contact c : cs) {
contactRets.add(contact2ContactRet(c)); contactRets.add(contact2ContactRet(c));
} }
......
...@@ -13,7 +13,7 @@ import org.springframework.stereotype.Component; ...@@ -13,7 +13,7 @@ import org.springframework.stereotype.Component;
* @author ag * @author ag
*/ */
@Component @Component
public class MQRegisteredEventListener implements ApplicationListener<RegisterEvent> { public class MqRegisteredEventListener implements ApplicationListener<RegisterEvent> {
@Override @Override
public void onApplicationEvent(RegisterEvent event) { public void onApplicationEvent(RegisterEvent event) {
......
...@@ -8,7 +8,7 @@ import java.io.Serializable; ...@@ -8,7 +8,7 @@ import java.io.Serializable;
* Created by xuran on 2017/8/1. * Created by xuran on 2017/8/1.
*/ */
@Data @Data
public class XContactInfo implements Serializable { public class ContactInfo implements Serializable {
private static final long serialVersionUID = -1L; private static final long serialVersionUID = -1L;
private Long id; private Long id;
private Long userId; private Long userId;
......
...@@ -24,5 +24,5 @@ public class UserAssociation implements Serializable { ...@@ -24,5 +24,5 @@ public class UserAssociation implements Serializable {
private String district; private String district;
private String address; private String address;
private String qq; private String qq;
private List<XContactInfo> contractResults; private List<ContactInfo> contractResults;
} }
...@@ -17,9 +17,9 @@ import javax.annotation.Resource; ...@@ -17,9 +17,9 @@ import javax.annotation.Resource;
* Created by xuran on 2017/6/21. * Created by xuran on 2017/6/21.
* 用户统计信息 * 用户统计信息
*/ */
@Service("loanVestMQService") @Service("loanVestMqService")
public class LoanVestMQServiceImpl implements IVestService { public class LoanVestMqServiceImpl implements IVestService {
private static final Logger LOGGER = LoggerFactory.getLogger(LoanVestMQServiceImpl.class); private static final Logger LOGGER = LoggerFactory.getLogger(LoanVestMqServiceImpl.class);
@Resource @Resource
@Qualifier("rabbitTemplate") @Qualifier("rabbitTemplate")
......
...@@ -24,7 +24,7 @@ public class MqUtils { ...@@ -24,7 +24,7 @@ public class MqUtils {
*/ */
public static void sendLoanVest(UserStatistics vest) { public static void sendLoanVest(UserStatistics vest) {
try { try {
IVestService mqService = ApplicationContextHolder.getBean("loanVestMQService"); IVestService mqService = ApplicationContextHolder.getBean("loanVestMqService");
mqService.send(vest); mqService.send(vest);
} catch (Exception e) { } catch (Exception e) {
log.error("[MQUtils][MQUtils_exception]发送用户统计信息,vest={},error={}", log.error("[MQUtils][MQUtils_exception]发送用户统计信息,vest={},error={}",
......
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