Commit 7fa8137a authored by HuangBingGui's avatar HuangBingGui
Browse files

no commit message

parent 6c859da2
...@@ -11,6 +11,7 @@ import com.jeespring.modules.sys.service.SystemService; ...@@ -11,6 +11,7 @@ import com.jeespring.modules.sys.service.SystemService;
import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQQueue;
import org.apache.catalina.connector.Connector; import org.apache.catalina.connector.Connector;
import org.apache.coyote.http11.Http11NioProtocol; import org.apache.coyote.http11.Http11NioProtocol;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
...@@ -36,49 +37,59 @@ import java.io.IOException; ...@@ -36,49 +37,59 @@ import java.io.IOException;
* springboot的启动类 * springboot的启动类
* * * @author 黄炳桂 516821420@qq.com * * * @author 黄炳桂 516821420@qq.com
* Created on 2017/1/8 16:20 * Created on 2017/1/8 16:20
*
* @EnableAutoConfiguration(exclude = {
* org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration.class,
* org.activiti.spring.boot.SecurityAutoConfiguration.class,
* })
* 使用lazyInit缩短Spring Boot启动时间//, lazyInit = true
*/ */
@EnableCaching @EnableCaching
@SpringBootApplication @SpringBootApplication
@ServletComponentScan(value = {"com.jeespring","com.company"}) @ServletComponentScan(basePackages = {"com.jeespring", "com.company","cn.xxx"})
@ComponentScan(value = {"com.jeespring","com.company"})//,lazyInit = true @ComponentScan(basePackages = {"com.jeespring", "com.company","cn.xxx"})
@MapperScan(basePackages={"com.jeespring.modules.**.dao","com.company.project.modules.*.dao","cn.xxx.xxx.modules.*.dao"})
@EnableScheduling @EnableScheduling
@ComponentScan @ComponentScan
@EnableAutoConfiguration @EnableAutoConfiguration
@Configuration @Configuration
//@EnableAutoConfiguration(exclude = {
// org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration.class,
// org.activiti.spring.boot.SecurityAutoConfiguration.class,
//})
public class JeeSpringDriver { public class JeeSpringDriver {
@Value("${http.port}") @Value("${http.port}")
private Integer port; private Integer port;
public static void main(String[] args) { public static void main(String[] args) {
//Spring boot run //Spring boot run
new SpringApplicationBuilder(JeeSpringDriver.class).web(true).run(args); new SpringApplicationBuilder(JeeSpringDriver.class).web(true).run(args);
SystemService.printKeyLoadMessage(); SystemService.printKeyLoadMessage();
//IM WebSocker //IM WebSocker
WebSockertFilter w=new WebSockertFilter(); WebSockertFilter w = new WebSockertFilter();
w.startWebsocketChatServer(); w.startWebsocketChatServer();
printGods(); printGods();
printAnimalsGods();
printLadyGods();
printPoetries();
} }
@Bean @Bean
public EmbeddedServletContainerFactory servletContainer() { public EmbeddedServletContainerFactory servletContainer() {
TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory(); TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory();
tomcat.addAdditionalTomcatConnectors(createStandardConnector()); // 添加http // 添加http
tomcat.addAdditionalTomcatConnectors(createStandardConnector());
return tomcat; return tomcat;
} }
// 配置http /**
* 配置http
* @return Connector
*/
private Connector createStandardConnector() { private Connector createStandardConnector() {
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol"); Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
connector.setPort(port); connector.setPort(port);
return connector; return connector;
} }
public static void printGods(){ private static void printGods() {
System.out.println( System.out.println(
"--------------- 佛祖保佑 神兽护体 女神助攻 流量冲天 ---------------\n" + "--------------- 佛祖保佑 神兽护体 女神助攻 流量冲天 ---------------\n" +
" _ooOoo_ \n" + " _ooOoo_ \n" +
...@@ -102,6 +113,9 @@ public class JeeSpringDriver { ...@@ -102,6 +113,9 @@ public class JeeSpringDriver {
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n" +
" 佛祖保佑 永不宕机 永无BUG 流量冲天 \n" + " 佛祖保佑 永不宕机 永无BUG 流量冲天 \n" +
""); "");
}
private static void printAnimalsGods(){
System.out.println( System.out.println(
"\n" + "\n" +
"        ┏┓ ┏┓+ + \n" + "        ┏┓ ┏┓+ + \n" +
...@@ -146,6 +160,9 @@ public class JeeSpringDriver { ...@@ -146,6 +160,9 @@ public class JeeSpringDriver {
" ┃ ┫ ┫ ┃ ┫ ┫ \n" + " ┃ ┫ ┫ ┃ ┫ ┫ \n" +
" ┗━┻━┛ ┗━┻━┛ \n" + " ┗━┻━┛ ┗━┻━┛ \n" +
""); "");
}
private static void printLadyGods(){
System.out.println( System.out.println(
"\n" + "\n" +
" .::::. \n" + " .::::. \n" +
...@@ -167,6 +184,9 @@ public class JeeSpringDriver { ...@@ -167,6 +184,9 @@ public class JeeSpringDriver {
" ```` ':. ':::::::::' ::::.. \n" + " ```` ':. ':::::::::' ::::.. \n" +
" '.:::::' ':'````.. \n" + " '.:::::' ':'````.. \n" +
""); "");
}
private static void printPoetries() {
System.out.println( System.out.println(
"\n" + "\n" +
" 唐伯虎:\n" + " 唐伯虎:\n" +
......
...@@ -10,7 +10,7 @@ import com.company.project.modules.ylttrip.entity.TfTicket; ...@@ -10,7 +10,7 @@ import com.company.project.modules.ylttrip.entity.TfTicket;
/** /**
* 订单DAO接口 * 订单DAO接口
* @author JeeSpring * @author JeeSpring
* @version 2018-10-12 * @version 2018-10-15
*/ */
@Mapper @Mapper
public interface TfTicketDao extends InterfaceBaseDao<TfTicket> { public interface TfTicketDao extends InterfaceBaseDao<TfTicket> {
......
...@@ -17,7 +17,7 @@ import com.jeespring.modules.sys.utils.DictUtils; ...@@ -17,7 +17,7 @@ import com.jeespring.modules.sys.utils.DictUtils;
/** /**
* 订单Entity * 订单Entity
* @author JeeSpring * @author JeeSpring
* @version 2018-10-12 * @version 2018-10-15
*/ */
public class TfTicket extends AbstractBaseEntity<TfTicket> { public class TfTicket extends AbstractBaseEntity<TfTicket> {
......
...@@ -42,7 +42,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -42,7 +42,7 @@ import org.springframework.web.bind.annotation.*;
/** /**
* 订单Controller * 订单Controller
* @author JeeSpring * @author JeeSpring
* @version 2018-10-12 * @version 2018-10-15
*/ */
@RestController @RestController
@RequestMapping(value = "/rest/ylttrip/tfTicket") @RequestMapping(value = "/rest/ylttrip/tfTicket")
......
...@@ -10,7 +10,7 @@ import com.company.project.modules.ylttrip.entity.TfTicket; ...@@ -10,7 +10,7 @@ import com.company.project.modules.ylttrip.entity.TfTicket;
/** /**
* I订单Service * I订单Service
* @author JeeSpring * @author JeeSpring
* @version 2018-10-12 * @version 2018-10-15
*/ */
public interface ITfTicketService extends InterfaceBaseService<TfTicket> { public interface ITfTicketService extends InterfaceBaseService<TfTicket> {
} }
\ No newline at end of file
...@@ -32,14 +32,12 @@ import com.jeespring.common.utils.StringUtils; ...@@ -32,14 +32,12 @@ import com.jeespring.common.utils.StringUtils;
import com.jeespring.common.utils.excel.ExportExcel; import com.jeespring.common.utils.excel.ExportExcel;
import com.jeespring.common.utils.excel.ImportExcel; import com.jeespring.common.utils.excel.ImportExcel;
import com.company.project.modules.ylttrip.entity.TfTicket; import com.company.project.modules.ylttrip.entity.TfTicket;
import com.company.project.modules.ylttrip.service.TfTicketService;
import com.company.project.modules.ylttrip.service.ITfTicketService; import com.company.project.modules.ylttrip.service.ITfTicketService;
import com.alibaba.dubbo.config.annotation.Reference;
/** /**
* 订单Controller * 订单Controller
* @author JeeSpring * @author JeeSpring
* @version 2018-10-12 * @version 2018-10-15
*/ */
@Controller @Controller
@RequestMapping(value = "${adminPath}/ylttrip/tfTicket") @RequestMapping(value = "${adminPath}/ylttrip/tfTicket")
...@@ -95,18 +93,21 @@ public class TfTicketController extends AbstractBaseController { ...@@ -95,18 +93,21 @@ public class TfTicketController extends AbstractBaseController {
//x轴数据 //x轴数据
xAxisData.add( tfTicketItem.getTotalDate()); xAxisData.add( tfTicketItem.getTotalDate());
countList.add(Double.valueOf(tfTicketItem.getTotalCount())); countList.add(Double.valueOf(tfTicketItem.getTotalCount()));
if(tfTicketItem.getSumGoodsNum()!=null) if(tfTicketItem.getSumGoodsNum()!=null) {
sumGoodsNumList.add(Double.valueOf(tfTicketItem.getSumGoodsNum())); sumGoodsNumList.add(Double.valueOf(tfTicketItem.getSumGoodsNum()));
else } else {
tfTicketItem.setSumGoodsNum(0D); tfTicketItem.setSumGoodsNum(0D);
if(tfTicketItem.getSumPrice()!=null) }
if(tfTicketItem.getSumPrice()!=null) {
sumPriceList.add(Double.valueOf(tfTicketItem.getSumPrice())); sumPriceList.add(Double.valueOf(tfTicketItem.getSumPrice()));
else } else {
tfTicketItem.setSumPrice(0D); tfTicketItem.setSumPrice(0D);
if(tfTicketItem.getSumSalePrice()!=null) }
if(tfTicketItem.getSumSalePrice()!=null) {
sumSalePriceList.add(Double.valueOf(tfTicketItem.getSumSalePrice())); sumSalePriceList.add(Double.valueOf(tfTicketItem.getSumSalePrice()));
else } else {
tfTicketItem.setSumSalePrice(0D); tfTicketItem.setSumSalePrice(0D);
}
} }
yAxisData.put("数量", countList); yAxisData.put("数量", countList);
yAxisData.put("商品数量", sumGoodsNumList); yAxisData.put("商品数量", sumGoodsNumList);
...@@ -197,8 +198,9 @@ public class TfTicketController extends AbstractBaseController { ...@@ -197,8 +198,9 @@ public class TfTicketController extends AbstractBaseController {
public String form(TfTicket tfTicket, Model model, HttpServletRequest request, HttpServletResponse response) { public String form(TfTicket tfTicket, Model model, HttpServletRequest request, HttpServletResponse response) {
model.addAttribute("action", request.getParameter("action")); model.addAttribute("action", request.getParameter("action"));
model.addAttribute("tfTicket", tfTicket); model.addAttribute("tfTicket", tfTicket);
if(request.getParameter("ViewFormType")!=null && request.getParameter("ViewFormType").equals("FormTwo")) if(request.getParameter("ViewFormType")!=null && "FormTwo".equals(request.getParameter("ViewFormType"))) {
return "modules/ylttrip/tfTicketFormTwo"; return "modules/ylttrip/tfTicketFormTwo";
}
return "modules/ylttrip/tfTicketForm"; return "modules/ylttrip/tfTicketForm";
} }
...@@ -244,7 +246,7 @@ public class TfTicketController extends AbstractBaseController { ...@@ -244,7 +246,7 @@ public class TfTicketController extends AbstractBaseController {
@RequiresPermissions("ylttrip:tfTicket:del") @RequiresPermissions("ylttrip:tfTicket:del")
@RequestMapping(value = "deleteAll") @RequestMapping(value = "deleteAll")
public String deleteAll(String ids, RedirectAttributes redirectAttributes) { public String deleteAll(String ids, RedirectAttributes redirectAttributes) {
String idArray[] =ids.split(","); String[] idArray = ids.split(",");
for(String id : idArray){ for(String id : idArray){
tfTicketService.delete(tfTicketService.get(id)); tfTicketService.delete(tfTicketService.get(id));
} }
...@@ -258,7 +260,7 @@ public class TfTicketController extends AbstractBaseController { ...@@ -258,7 +260,7 @@ public class TfTicketController extends AbstractBaseController {
@RequiresPermissions(value={"ylttrip:tfTicket:del","ylttrip:tfTicket:delByLogic"},logical=Logical.OR) @RequiresPermissions(value={"ylttrip:tfTicket:del","ylttrip:tfTicket:delByLogic"},logical=Logical.OR)
@RequestMapping(value = "deleteAllByLogic") @RequestMapping(value = "deleteAllByLogic")
public String deleteAllByLogic(String ids, RedirectAttributes redirectAttributes) { public String deleteAllByLogic(String ids, RedirectAttributes redirectAttributes) {
String idArray[] =ids.split(","); String[] idArray = ids.split(",");
for(String id : idArray){ for(String id : idArray){
tfTicketService.deleteByLogic(tfTicketService.get(id)); tfTicketService.deleteByLogic(tfTicketService.get(id));
} }
......
...@@ -90,8 +90,9 @@ public class Global { ...@@ -90,8 +90,9 @@ public class Global {
if (value == null) { if (value == null) {
try { try {
value = resolver.getProperty(key); value = resolver.getProperty(key);
if (StringUtils.isBlank(value)) if (StringUtils.isBlank(value)) {
throw new RuntimeException("value null"); throw new RuntimeException("value null");
}
map.put(key, value); map.put(key, value);
} catch (Exception e) { } catch (Exception e) {
value = loader.getProperty(key); value = loader.getProperty(key);
...@@ -171,8 +172,9 @@ public class Global { ...@@ -171,8 +172,9 @@ public class Global {
} }
public static String getJdbcType() { public static String getJdbcType() {
if (map.containsKey("spring.datasource.url")) if (map.containsKey("spring.datasource.url")) {
return map.get("spring.datasource.url"); return map.get("spring.datasource.url");
}
try { try {
String url = resolver.getProperty("spring.datasource.url"); String url = resolver.getProperty("spring.datasource.url");
String type = getDbType(url); String type = getDbType(url);
......
...@@ -225,7 +225,7 @@ public class ShiroConfig { ...@@ -225,7 +225,7 @@ public class ShiroConfig {
) { ) {
DefaultWebSecurityManager defaultWebSecurityManager = new DefaultWebSecurityManager(); DefaultWebSecurityManager defaultWebSecurityManager = new DefaultWebSecurityManager();
defaultWebSecurityManager.setSessionManager(sessionManager); defaultWebSecurityManager.setSessionManager(sessionManager);
if(redisRun.equals("true") && "true".equals(shiroRedis)){ if("true".equals(redisRun) && "true".equals(shiroRedis)){
try{ try{
// 加入缓存管理器 // 加入缓存管理器
defaultWebSecurityManager.setCacheManager(redisCacheManager(redisHostName,reidsPassword,redisPort,expireTimeShiro)); defaultWebSecurityManager.setCacheManager(redisCacheManager(redisHostName,reidsPassword,redisPort,expireTimeShiro));
......
...@@ -66,8 +66,9 @@ public class OnlineSessionFilter //extends AccessControlFilter ...@@ -66,8 +66,9 @@ public class OnlineSessionFilter //extends AccessControlFilter
{ {
onlineSession.setUserId(user.getId()); onlineSession.setUserId(user.getId());
onlineSession.setLoginName(user.getLoginName()); onlineSession.setLoginName(user.getLoginName());
if(user.getOffice()!=null) if(user.getOffice()!=null) {
onlineSession.setDeptName(user.getOffice().getName()); onlineSession.setDeptName(user.getOffice().getName());
}
onlineSession.markAttributeChanged(); onlineSession.markAttributeChanged();
UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent"));
// 获取客户端操作系统 // 获取客户端操作系统
......
...@@ -14,7 +14,8 @@ public class MailAuthenticator extends Authenticator{ ...@@ -14,7 +14,8 @@ public class MailAuthenticator extends Authenticator{
this.userName = username; this.userName = username;
this.password = password; this.password = password;
} }
protected PasswordAuthentication getPasswordAuthentication(){ @Override
protected PasswordAuthentication getPasswordAuthentication(){
return new PasswordAuthentication(userName, password); return new PasswordAuthentication(userName, password);
} }
} }
...@@ -40,7 +40,9 @@ public abstract class AbstractBaseEntity<T> extends AbstractEntity<T> { ...@@ -40,7 +40,9 @@ public abstract class AbstractBaseEntity<T> extends AbstractEntity<T> {
protected String totalType; protected String totalType;
public void setExtendMap(String item,Object object) { public void setExtendMap(String item,Object object) {
if(extendMap==null) extendMap = new HashMap<String, Object>(); if(extendMap==null) {
extendMap = new HashMap<String, Object>();
}
extendMap.put(item,object); extendMap.put(item,object);
} }
...@@ -49,7 +51,9 @@ public abstract class AbstractBaseEntity<T> extends AbstractEntity<T> { ...@@ -49,7 +51,9 @@ public abstract class AbstractBaseEntity<T> extends AbstractEntity<T> {
} }
public JSONObject setExtendObject(String item,Object object){ public JSONObject setExtendObject(String item,Object object){
if(jsonObject==null) jsonObject= JSON.parseObject(JSON.toJSONString(this)); if(jsonObject==null) {
jsonObject = JSON.parseObject(JSON.toJSONString(this));
}
jsonObject.put(item,object); jsonObject.put(item,object);
return jsonObject; return jsonObject;
} }
...@@ -144,7 +148,9 @@ public abstract class AbstractBaseEntity<T> extends AbstractEntity<T> { ...@@ -144,7 +148,9 @@ public abstract class AbstractBaseEntity<T> extends AbstractEntity<T> {
@JSONField(serialize=false) @JSONField(serialize=false)
@Length(min=1, max=1) @Length(min=1, max=1)
public String getDelFlag() { public String getDelFlag() {
if(delFlag==null) delFlag="0"; if(delFlag==null) {
delFlag = "0";
}
return delFlag; return delFlag;
} }
......
/** /**
* Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a> All rights reserved.
*/ */
package com.jeespring.common.persistence; package com.jeespring.common.persistence;
...@@ -10,7 +10,7 @@ import com.jeespring.modules.act.entity.Act; ...@@ -10,7 +10,7 @@ import com.jeespring.modules.act.entity.Act;
/** /**
* Activiti Entity类 * Activiti Entity类
* @author ThinkGem * @author JeeSpring
* @version 2013-05-28 * @version 2013-05-28
*/ */
public abstract class ActEntity<T> extends AbstractBaseEntity<T> implements Serializable { public abstract class ActEntity<T> extends AbstractBaseEntity<T> implements Serializable {
......
...@@ -74,8 +74,8 @@ public interface InterfaceBaseService<T> { ...@@ -74,8 +74,8 @@ public interface InterfaceBaseService<T> {
* @param entity * @param entity
* @return * @return
* @see public int delete(T entity) * @see public int delete(T entity)
* @Deprecated
*/ */
@Deprecated
void delete(T entity); void delete(T entity);
/** /**
...@@ -83,8 +83,8 @@ public interface InterfaceBaseService<T> { ...@@ -83,8 +83,8 @@ public interface InterfaceBaseService<T> {
* @param entity * @param entity
* @see public int delete(T entity) * @see public int delete(T entity)
* @return * @return
* @Deprecated
*/ */
@Deprecated
void deleteByLogic(T entity); void deleteByLogic(T entity);
......
...@@ -14,6 +14,7 @@ import com.jeespring.common.persistence.dialect.Dialect; ...@@ -14,6 +14,7 @@ import com.jeespring.common.persistence.dialect.Dialect;
*/ */
public class H2Dialect implements Dialect { public class H2Dialect implements Dialect {
@Override
public boolean supportsLimit() { public boolean supportsLimit() {
return true; return true;
} }
......
...@@ -21,6 +21,7 @@ public class MySQLDialect implements Dialect { ...@@ -21,6 +21,7 @@ public class MySQLDialect implements Dialect {
Integer.toString(limit)); Integer.toString(limit));
} }
@Override
public boolean supportsLimit() { public boolean supportsLimit() {
return true; return true;
} }
......
...@@ -13,6 +13,7 @@ import com.jeespring.common.persistence.dialect.Dialect; ...@@ -13,6 +13,7 @@ import com.jeespring.common.persistence.dialect.Dialect;
*/ */
public class PostgreSQLDialect implements Dialect { public class PostgreSQLDialect implements Dialect {
@Override
public boolean supportsLimit() { public boolean supportsLimit() {
return true; return true;
} }
......
...@@ -14,6 +14,7 @@ import com.jeespring.common.persistence.dialect.Dialect; ...@@ -14,6 +14,7 @@ import com.jeespring.common.persistence.dialect.Dialect;
*/ */
public class SQLServerDialect implements Dialect { public class SQLServerDialect implements Dialect {
@Override
public boolean supportsLimit() { public boolean supportsLimit() {
return true; return true;
} }
...@@ -24,6 +25,7 @@ public class SQLServerDialect implements Dialect { ...@@ -24,6 +25,7 @@ public class SQLServerDialect implements Dialect {
return selectIndex + (selectDistinctIndex == selectIndex ? 15 : 6); return selectIndex + (selectDistinctIndex == selectIndex ? 15 : 6);
} }
@Override
public String getLimitString(String sql, int offset, int limit) { public String getLimitString(String sql, int offset, int limit) {
return getLimit(sql, offset, limit); return getLimit(sql, offset, limit);
} }
......
...@@ -15,6 +15,7 @@ import com.jeespring.common.persistence.dialect.Dialect; ...@@ -15,6 +15,7 @@ import com.jeespring.common.persistence.dialect.Dialect;
*/ */
public class SybaseDialect implements Dialect { public class SybaseDialect implements Dialect {
@Override
public boolean supportsLimit() { public boolean supportsLimit() {
return false; return false;
} }
......
...@@ -24,7 +24,7 @@ import redis.clients.jedis.exceptions.JedisException; ...@@ -24,7 +24,7 @@ import redis.clients.jedis.exceptions.JedisException;
/** /**
* Jedis Cache 工具类 * Jedis Cache 工具类
* *
* @author ThinkGem * @author JeeSpring
* @version 2014-6-29 * @version 2014-6-29
*/ */
public class JedisUtils { public class JedisUtils {
......
...@@ -87,10 +87,11 @@ public class RedisRestController { ...@@ -87,10 +87,11 @@ public class RedisRestController {
@RequestMapping(value ="/exists",method ={RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value ="/exists",method ={RequestMethod.POST,RequestMethod.GET})
@ApiOperation(value="Redis exists接口(Content-Type为text/html)", notes="Redis exists接口(Content-Type为text/html)") @ApiOperation(value="Redis exists接口(Content-Type为text/html)", notes="Redis exists接口(Content-Type为text/html)")
public Result exists(@RequestParam(required=false) String key) { public Result exists(@RequestParam(required=false) String key) {
if(redisUtils.exists(key)) if(redisUtils.exists(key)) {
return ResultFactory.getSuccessResult("存在!"); return ResultFactory.getSuccessResult("存在!");
else } else {
return ResultFactory.getErrorResult("不存在!"); return ResultFactory.getErrorResult("不存在!");
}
} }
/** /**
...@@ -105,8 +106,9 @@ public class RedisRestController { ...@@ -105,8 +106,9 @@ public class RedisRestController {
if(redisUtils.exists(key)){ if(redisUtils.exists(key)){
Result result = ResultFactory.getSuccessResult(); Result result = ResultFactory.getSuccessResult();
Object obj=redisUtils.get(key); Object obj=redisUtils.get(key);
if(obj!=null) if(obj!=null) {
result.setResultObject(obj.toString()); result.setResultObject(obj.toString());
}
return result; return result;
}else{ }else{
return ResultFactory.getErrorResult("不存在!"); return ResultFactory.getErrorResult("不存在!");
......
Supports Markdown
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