15 files modified
1 files added
| New file |
| | |
| | | <component name="InspectionProjectProfileManager"> |
| | | <profile version="1.0"> |
| | | <option name="myName" value="Project Default" /> |
| | | <inspection_tool class="AliAccessStaticViaInstance" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AliArrayNamingShouldHaveBracket" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AliControlFlowStatementWithoutBraces" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AliDeprecation" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AliEqualsAvoidNull" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AliLongLiteralsEndingWithLowercaseL" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AliMissingOverrideAnnotation" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AliWrapperTypeEquality" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAbstractClassShouldStartWithAbstractNaming" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAbstractMethodOrInterfaceMethodMustUseJavadoc" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidApacheBeanUtilsCopy" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidCallStaticSimpleDateFormat" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidCommentBehindStatement" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidComplexCondition" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidConcurrentCompetitionRandom" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidDoubleOrFloatEqualCompare" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidManuallyCreateThread" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidMissUseOfMathRandom" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidNegationOperator" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidNewDateGetTime" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidPatternCompileInMethod" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidReturnInFinally" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidStartWithDollarAndUnderLineNaming" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaAvoidUseTimer" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaBigDecimalAvoidDoubleConstructor" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaBooleanPropertyShouldNotStartWithIs" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaClassCastExceptionWithSubListToArrayList" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaClassCastExceptionWithToArray" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaClassMustHaveAuthor" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaClassNamingShouldBeCamel" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaCollectionInitShouldAssignCapacity" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaCommentsMustBeJavadocFormat" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaConcurrentExceptionWithModifyOriginSubList" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaConstantFieldShouldBeUpperCase" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaCountDownShouldInFinally" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaDontModifyInForeachCircle" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaEnumConstantsMustHaveComment" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaExceptionClassShouldEndWithException" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaIbatisMethodQueryForList" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaLockShouldWithTryFinally" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaLowerCamelCaseVariableNaming" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaMethodReturnWrapperType" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaMethodTooLong" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaPackageNaming" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaPojoMustOverrideToString" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaPojoMustUsePrimitiveField" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaPojoNoDefaultValue" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaRemoveCommentedCode" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaServiceOrDaoClassShouldEndWithImpl" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaSneakyThrowsWithoutExceptionType" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaStringConcat" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaSwitchExpression" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaSwitchStatement" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaTestClassShouldEndWithTestNaming" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaThreadLocalShouldRemove" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaThreadPoolCreation" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaThreadShouldSetName" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaTransactionMustHaveRollback" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaUndefineMagicConstant" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaUnsupportedExceptionWithModifyAsList" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaUseQuietReferenceNotation" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="AlibabaUseRightCaseForDateFormat" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | <inspection_tool class="MapOrSetKeyShouldOverrideHashCodeEquals" enabled="true" level="WARNING" enabled_by_default="true" /> |
| | | </profile> |
| | | </component> |
| | |
| | | package com.nq.controller; |
| | | |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.nq.common.ServerResponse; |
| | | |
| | | import com.nq.dao.SiteBannerMapper; |
| | | import com.nq.dao.UserMapper; |
| | | import com.nq.pojo.SiteBanner; |
| | | import com.nq.pojo.SiteSpread; |
| | | import com.nq.pojo.User; |
| | | import com.nq.service.ISiteSpreadService; |
| | | import com.nq.service.IUserService; |
| | | |
| | |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | |
| | | @Controller |
| | |
| | | IUserService iUserService; |
| | | |
| | | @Autowired |
| | | UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | ISiteSpreadService iSiteSpreadService; |
| | | |
| | | @Autowired |
| | | SiteBannerMapper siteBannerMapper; |
| | | |
| | | //注册 |
| | | @RequestMapping(value = {"reg.do"}, method = {RequestMethod.POST}) |
| | | @ResponseBody |
| | | public ServerResponse reg(@RequestParam("agentCode") String agentCode, @RequestParam("phone") String phone, @RequestParam(value = "yzmCode", defaultValue = "") String yzmCode, @RequestParam("userPwd") String userPwd, HttpServletRequest httpServletRequest) { |
| | | return this.iUserService.reg(yzmCode, agentCode, phone, userPwd, httpServletRequest); |
| | | } |
| | | public ServerResponse reg( @RequestParam("phone") String phone, @RequestParam("userPwd") String userPwd, HttpServletRequest httpServletRequest) { |
| | | return this.iUserService.reg(phone, userPwd, httpServletRequest); |
| | | } |
| | | |
| | | //修改头像 |
| | | @RequestMapping(value = {"updatePhoto.do"}, method = {RequestMethod.POST}) |
| | | @ResponseBody |
| | | public ServerResponse updatePhoto(@RequestParam("userId") String userId, @RequestParam("photoUrl") String photoUrl,HttpServletRequest httpServletRequest) { |
| | | User user = userMapper.selectById(userId); |
| | | if(ObjectUtil.isEmpty(user)){ |
| | | return ServerResponse.createByErrorMsg("用户不存在!"); |
| | | } |
| | | user.setPhotoUrl(photoUrl); |
| | | userMapper.updateById(user); |
| | | return ServerResponse.createBySuccess(); |
| | | } |
| | | |
| | | //登录 |
| | | @RequestMapping(value = {"login.do"}, method = {RequestMethod.POST}) |
| | |
| | | return ServerResponse.createBySuccess("获取成功", siteSpread); |
| | | } |
| | | |
| | | @RequestMapping({"getSiteBanner.do"}) |
| | | @ResponseBody |
| | | public ServerResponse getSiteBanner() { |
| | | List<SiteBanner> siteBanners = this.siteBannerMapper.listByAdmin(); |
| | | return ServerResponse.createBySuccess(siteBanners); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | package com.nq.controller.backend; |
| | | |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.github.pagehelper.PageInfo; |
| | | |
| | | import com.google.common.collect.Maps; |
| | |
| | | |
| | | import com.nq.utils.PropertiesUtil; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.time.LocalDate; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | |
| | | @ResponseBody |
| | | public ServerResponse upload(HttpSession session, @RequestParam(value = "upload_file", required = false) MultipartFile file, HttpServletRequest request) { |
| | | |
| | | String path = request.getSession().getServletContext().getRealPath("upload"); |
| | | |
| | | ServerResponse serverResponse = this.iFileUploadService.upload(file, path); |
| | | |
| | | if (serverResponse.isSuccess()) { |
| | | |
| | | String targetFileName = serverResponse.getData().toString(); |
| | | |
| | | String url = PropertiesUtil.getProperty("ftp.server.http.prefix") + targetFileName; |
| | | |
| | | |
| | | Map fileMap = Maps.newHashMap(); |
| | | |
| | | fileMap.put("uri", targetFileName); |
| | | |
| | | fileMap.put("url", url); |
| | | |
| | | |
| | | return ServerResponse.createBySuccess(fileMap); |
| | | |
| | | // 兼容c端组件上传原理 |
| | | String fileType = file.getOriginalFilename(); |
| | | if (StrUtil.isEmpty(fileType) || fileType.contains("blob")) { |
| | | fileType = "blob.png"; |
| | | } |
| | | |
| | | return serverResponse; |
| | | String fileName = file.getOriginalFilename(); |
| | | String fileExtentionName = fileName.substring(fileName.lastIndexOf(".") + 1); |
| | | |
| | | // 生成唯一的文件名 |
| | | String id = UUID.randomUUID().toString(); |
| | | String path = LocalDate.now() + "/" + id + "." + fileExtentionName; |
| | | |
| | | // 确保目标文件夹存在 |
| | | File targetDir = new File(PropertiesUtil.getProperty("loca.images.dir") + "/" + LocalDate.now()); |
| | | if (!targetDir.exists()) { |
| | | targetDir.mkdirs(); |
| | | } |
| | | |
| | | // 构建本地文件路径 |
| | | File localFile = new File(targetDir, id + "." + fileExtentionName); |
| | | |
| | | // 打印上传路径 |
| | | log.info("LocalFileUploadService uploadFile localFilePath: {}", localFile.getAbsolutePath()); |
| | | |
| | | try { |
| | | // 将文件保存到本地 |
| | | file.transferTo(localFile); |
| | | |
| | | } catch (IOException e) { |
| | | log.error("LocalFileUploadService uploadFile IOException", e.getMessage(), e); |
| | | } |
| | | String url = PropertiesUtil.getProperty("ftp.server.http.prefix") + path; |
| | | // 返回相对路径 |
| | | return ServerResponse.createBySuccess(url); |
| | | |
| | | } |
| | | |
| | |
| | | @RequestParam(value = "password")String password, |
| | | @RequestParam(value = "startTime")String startTime, |
| | | @RequestParam(value = "endTime")String endTime, |
| | | @RequestParam(value = "discount") String discount) { |
| | | return stockDzService.addByAdmin(stockCode,stockNum,password,startTime,endTime,discount); |
| | | @RequestParam(value = "discount") String discount, |
| | | @RequestParam(value = "discount") Integer residualShare) { |
| | | return stockDzService.addByAdmin(stockCode,stockNum,password,startTime,endTime,discount,residualShare); |
| | | } |
| | | /** |
| | | * 删除大宗 |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | private BigDecimal discount; |
| | | private Integer residualShare; |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| | |
| | | */ |
| | | private Integer type; |
| | | |
| | | private Integer residualShare; |
| | | |
| | | /** |
| | | * 是否上市 |
| | | */ |
| | |
| | | |
| | | private BigDecimal djzj; |
| | | |
| | | private String photoUrl; |
| | | |
| | | public User(Integer id, Integer agentId, String agentName, String phone, String userPwd, String withPwd, String nickName, String realName, String idCard, Integer accountType, BigDecimal userAmt, BigDecimal enableAmt, BigDecimal enaleWithdrawAmt, BigDecimal hkAmt, BigDecimal sumChargeAmt, BigDecimal sumBuyAmt, String recomPhone, Integer isLock, Integer isLogin, Date regTime, String regIp, String regAddress, String img1Key, String img2Key, String img3Key, Integer isActive, String authMsg, BigDecimal userIndexAmt, BigDecimal enableIndexAmt, BigDecimal userFutAmt, BigDecimal enableFutAmt, String withdrawalPwd, BigDecimal tradingAmount, Integer isAuthorize, BigDecimal sgzj, BigDecimal djzj) { |
| | | this.id = id; |
| | | this.agentId = agentId; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | public interface IUserService { |
| | | ServerResponse reg(String paramString1, String paramString2, String paramString3, String paramString4, HttpServletRequest paramHttpServletRequest); |
| | | ServerResponse reg(String paramString3, String paramString4, HttpServletRequest paramHttpServletRequest); |
| | | |
| | | ServerResponse login(String paramString1, String paramString2, HttpServletRequest paramHttpServletRequest); |
| | | |
| | |
| | | |
| | | ServerResponse getDzList(); |
| | | |
| | | ServerResponse addByAdmin(String stockCode, String stockNum, String password, String startTime, String endTime, String discount); |
| | | ServerResponse addByAdmin(String stockCode, String stockNum, String password, String startTime, String endTime, String discount,Integer residualShare); |
| | | |
| | | ServerResponse getDzListByAdmin(String keywords); |
| | | |
| | |
| | | stockDzVo.setStockNum(stockDz.getStockNum()); |
| | | stockDzVo.setStartTime(stockDz.getStartTime()); |
| | | stockDzVo.setEndTime(stockDz.getEndTime()); |
| | | stockDzVo.setDiscount(stockDz.getDiscount()); |
| | | stockDzVo.setResidualShare(stockDz.getResidualShare()); |
| | | stockDzVos.add(stockDzVo); |
| | | } |
| | | return ServerResponse.createBySuccess(stockDzVos); |
| | | } |
| | | |
| | | @Override |
| | | public ServerResponse addByAdmin(String stockCode, String stockNum, String password, String startTime, String endTime, String discount) { |
| | | public ServerResponse addByAdmin(String stockCode, String stockNum, String password, String startTime, String endTime, String discount,Integer residualShare) { |
| | | if (stockCode == null || stockCode.equals("")||stockNum == null || stockNum.equals("")||password == null || discount == null|| discount.equals("")|| |
| | | password.equals("")|| startTime == null || startTime.equals("")||endTime == null || endTime.equals("")){ |
| | | return ServerResponse.createByErrorMsg("参数不能为空"); |
| | |
| | | stockDz.setStartTime(DateTimeUtil.strToDate(startTime)); |
| | | stockDz.setEndTime(DateTimeUtil.strToDate(endTime)); |
| | | stockDz.setDiscount(new BigDecimal(discount)); |
| | | stockDz.setResidualShare(residualShare); |
| | | int res = stockDzMapper.insert(stockDz); |
| | | if (res > 0) { |
| | | return ServerResponse.createBySuccessMsg("添加成功"); |
| | |
| | | } |
| | | String s = DateTimeUtil.dateToStr(new Date()); |
| | | //subscribe_time大于当前时间 |
| | | queryWrapper.ge("subscribe_time", DateTimeUtil.dateToStr1(new Date())).orderByAsc("subscribe_time"); |
| | | queryWrapper.le("subscribe_time", DateTimeUtil.dateToStr1(new Date())).orderByAsc("subscribe_time"); |
| | | queryWrapper.ge("subscription_time", DateTimeUtil.dateToStr1(new Date())).orderByAsc("subscribe_time"); |
| | | List<StockSubscribe> stockSubscribeList = this.stockSubscribeMapper.selectList(queryWrapper); |
| | | |
| | | // List<StockAdminListVO> stockAdminListVOS = Lists.newArrayList(); |
| | |
| | | @Autowired |
| | | IUserRechargeService userRechargeService; |
| | | |
| | | public ServerResponse reg(String yzmCode, String agentCode, String phone, String userPwd, HttpServletRequest request) { |
| | | if (StringUtils.isBlank(agentCode) || StringUtils.isBlank(phone) || |
| | | StringUtils.isBlank(userPwd) || StringUtils.isBlank(yzmCode)) |
| | | public ServerResponse reg(String phone, String userPwd, HttpServletRequest request) { |
| | | if (StringUtils.isBlank(phone) || |
| | | StringUtils.isBlank(userPwd)) |
| | | { |
| | | return ServerResponse.createByErrorMsg("注册失败, 参数不能为空"); |
| | | } |
| | |
| | | String keys = "AliyunSmsCode:" + phone; |
| | | String redis_yzm = RedisShardedPoolUtils.get(keys); |
| | | |
| | | log.info("redis_yzm = {},yzmCode = {}", redis_yzm, yzmCode); |
| | | // if (!yzmCode.equals(redis_yzm) && !"6666".equals(yzmCode)) { |
| | | // return ServerResponse.createByErrorMsg("注册失败, 验证码错误"); |
| | | // } |
| | | |
| | | |
| | | AgentUser agentUser = this.iAgentUserService.findByCode(agentCode); |
| | | if (agentUser == null) { |
| | | return ServerResponse.createByErrorMsg("注册失败, 代理不存在"); |
| | | } |
| | | if (agentUser.getIsLock().intValue() == 1) { |
| | | return ServerResponse.createByErrorMsg("注册失败, 代理已被锁定"); |
| | | } |
| | | |
| | | |
| | | User dbuser = this.userMapper.findByPhone(phone); |
| | | if (dbuser != null) { |
| | | return ServerResponse.createByErrorMsg("注册失败, 手机号已注册"); |
| | |
| | | |
| | | |
| | | User user = new User(); |
| | | user.setAgentId(agentUser.getId()); |
| | | user.setAgentName(agentUser.getAgentName()); |
| | | user.setPhone(phone); |
| | | user.setUserPwd(SymmetricCryptoUtil.encryptPassword(userPwd)); |
| | | |
| | | |
| | | user.setAccountType(Integer.valueOf(0)); |
| | | user.setIsLock(Integer.valueOf(1)); |
| | | user.setIsLock(Integer.valueOf(0)); |
| | | user.setIsActive(Integer.valueOf(0)); |
| | | |
| | | user.setRegTime(new Date()); |
| | |
| | | |
| | | if (insertCount > 0) { |
| | | //用户注册成功重新代理机构码重新生成 |
| | | String newAgentCode = generateUniqueAgentCode(); |
| | | agentUser.setAgentCode(newAgentCode); |
| | | iAgentUserService.updateAgentCode(agentUser); |
| | | log.info("用户注册成功 手机 {} , ip = {} 地址 = {}", new Object[] { phone, uip, uadd }); |
| | | return ServerResponse.createBySuccessMsg("注册成功.请登录"); |
| | | } |
| | |
| | | userInfoVO.setEnableIndexAmt(user.getEnableIndexAmt()); |
| | | userInfoVO.setEnaleWithdrawAmt(user.getEnaleWithdrawAmt()); |
| | | userInfoVO.setHkAmt(user.getHkAmt()); |
| | | |
| | | userInfoVO.setPhotoUrl(user.getPhotoUrl()); |
| | | BigDecimal historyProfitLoss = new BigDecimal(0); |
| | | BigDecimal buyAmtAutual = new BigDecimal(0); |
| | | List<UserPosition> userPositionscc = this.userPositionMapper.findMyPositionByCodeAndSpell(user.getId(), "", "", 0); |
| | |
| | | |
| | | private Date endTime; |
| | | |
| | | private BigDecimal discount; |
| | | |
| | | private Integer residualShare; |
| | | |
| | | } |
| | |
| | | |
| | | private BigDecimal historyProfitLoss; |
| | | |
| | | private String photoUrl; |
| | | |
| | | public void setAgentId(Integer agentId) { |
| | | this.agentId = agentId; |
| | | } |
| | |
| | | # 数据源配置 |
| | | # 开发环境配置 |
| | | server: |
| | | # 服务器的HTTP端口,默认为8090 |
| | | port: 8091 |
| | | tomcat: |
| | | # tomcat的URI编码 |
| | | uri-encoding: UTF-8 |
| | | # 连接数满后的排队数,默认为100 |
| | | accept-count: 1000 |
| | | threads: |
| | | # tomcat最大线程数,默认为200 |
| | | max: 800 |
| | | # Tomcat启动初始化的线程数,默认值10 |
| | | min-spare: 100 |
| | | |
| | | spring: |
| | | profiles: |
| | | active: druid |
| | | # 文件上传 |
| | | servlet: |
| | | multipart: |
| | | max-file-size: 10MB |
| | | max-request-size: 20MB |
| | | # 服务模块 |
| | | devtools: |
| | | restart: |
| | | enabled: true |
| | | task: |
| | | scheduling: |
| | | pool: |
| | | size: 8 |
| | | # redis 配置 |
| | | redis: |
| | | host: localhost |
| | | port: 6379 |
| | | database: 0 |
| | | password: |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | min-idle: 100 |
| | | max-idle: 300 |
| | | max-active: 300 |
| | | max-wait: -1ms |
| | | # 数据源配置 |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://127.0.0.1:3306/mix?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: mix |
| | | password: PsRwRm5nGbtS22Xp |
| | | druid: |
| | | initialSize: 5 |
| | | minIdle: 10 |
| | | maxActive: 20 |
| | | maxWait: 60000 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | minEvictableIdleTimeMillis: 300000 |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | | allow: |
| | | url-pattern: /druid/* |
| | | login-username: Greysparrow |
| | | login-password: 123456 |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: false |
| | | |
| | | # 日志配置 |
| | | logging: |
| | |
| | | |
| | | # token配置 |
| | | token: |
| | | # 令牌自定义标识 |
| | | header: Authorization |
| | | # 令牌密钥 |
| | | secret: abcdefghijklmnopqrstuvwxyz |
| | | # 令牌有效期(默认30分钟) |
| | | expireTime: 30 |
| | | |
| | | # MyBatis配置 |
| | | mybatis: |
| | | # 搜索指定包别名 |
| | | typeAliasesPackage: com.nq.pojo |
| | | # 配置mapper的扫描,找到所有的mapper.xml映射文件 |
| | | mapperLocations: classpath*:mapper/*Mapper.xml |
| | | # 加载全局的配置文件 |
| | | configLocation: classpath:mybatis/mybatis-config.xml |
| | | |
| | | # PageHelper分页插件 |
| | |
| | | helperDialect: mysql |
| | | supportMethodsArguments: true |
| | | params: count=countSql |
| | | |
| | | wallet: |
| | | isHotWallet: false |
| | | |
| | | # Swagger配置 |
| | | swagger: |
| | | # 是否开启swagger |
| | | enabled: true |
| | | # 请求前缀 |
| | | pathMapping: /dev-api |
| | | |
| | | # 防止XSS攻击 |
| | | xss: |
| | | # 过滤开关 |
| | | enabled: true |
| | | # 排除链接(多个用逗号分隔) |
| | | excludes: /system/notice |
| | | # 匹配链接 |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | spring: |
| | | profiles: |
| | | active: druid |
| | | # 文件上传 |
| | | servlet: |
| | | multipart: |
| | | # 单个文件大小 |
| | | max-file-size: 10MB |
| | | # 设置总上传的文件大小 |
| | | max-request-size: 20MB |
| | | # 服务模块 |
| | | devtools: |
| | | restart: |
| | | # 热部署开关 |
| | | enabled: true |
| | | task: |
| | | scheduling: |
| | | pool: |
| | | size: 8 #配置Scheduled定时任务为多线程执行 |
| | | # redis 配置 |
| | | redis: |
| | | # 地址 |
| | | host: localhost |
| | | # 端口,默认为6379 |
| | | port: 6379 |
| | | # 数据库索引 |
| | | database: 0 |
| | | # 密码 |
| | | password: |
| | | # 连接超时时间 |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # 连接池中的最小空闲连接 |
| | | min-idle: 100 |
| | | # 连接池中的最大空闲连接 |
| | | max-idle: 300 |
| | | # 连接池的最大数据库连接数 |
| | | max-active: 300 |
| | | # #连接池最大阻塞等待时间(使用负值表示没有限制) |
| | | max-wait: -1ms |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://127.0.0.1:3306/mix?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: mix |
| | | password: PsRwRm5nGbtS22Xp |
| | | # url: jdbc:mysql://127.0.0.1:3306/stock_hongta?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: root |
| | | # password: 123456 |
| | | druid: |
| | | # 初始连接数 |
| | | initialSize: 5 |
| | | # 最小连接池数量 |
| | | minIdle: 10 |
| | | # 最大连接池数量 |
| | | maxActive: 20 |
| | | # 配置获取连接等待超时的时间 |
| | | maxWait: 60000 |
| | | # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # 配置一个连接在池中最小生存的时间,单位是毫秒 |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # 配置一个连接在池中最大生存的时间,单位是毫秒 |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # 配置检测连接是否有效 |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | | # 设置白名单,不填则允许所有访问 |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # 控制台管理用户名和密码 |
| | | login-username: Greysparrow |
| | | login-password: 123456 |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | # 慢SQL记录 |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: false |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | |
| | | </select> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | * |
| | | from user |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </select> |