初始化提交
This commit is contained in:
parent
6df2b8f5c9
commit
14c63402c1
|
|
@ -0,0 +1,4 @@
|
||||||
|
target
|
||||||
|
.idea
|
||||||
|
memberSystem.iml
|
||||||
|
nb-configuration.xml
|
||||||
|
|
@ -0,0 +1,249 @@
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>memberSystem</groupId>
|
||||||
|
<artifactId>memberSystem</artifactId>
|
||||||
|
<packaging>war</packaging>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<name>memberSystem</name>
|
||||||
|
<url>http://mvnrepository.com</url>
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sourceforge.jexcelapi</groupId>
|
||||||
|
<artifactId>jxl</artifactId>
|
||||||
|
<version>2.6.12</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.poi</groupId>
|
||||||
|
<artifactId>poi</artifactId>
|
||||||
|
<version>3.15</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-core</artifactId>
|
||||||
|
<version>4.1.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.jackson</groupId>
|
||||||
|
<artifactId>jackson-mapper-asl</artifactId>
|
||||||
|
<version>1.9.13</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-context</artifactId>
|
||||||
|
<version>4.1.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-orm</artifactId>
|
||||||
|
<version>4.1.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.aspectj</groupId>
|
||||||
|
<artifactId>aspectjweaver</artifactId>
|
||||||
|
<version>1.8.5</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-webmvc</artifactId>
|
||||||
|
<version>4.1.6.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-core</artifactId>
|
||||||
|
<version>4.3.11.Final</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>c3p0</groupId>
|
||||||
|
<artifactId>c3p0</artifactId>
|
||||||
|
<version>0.9.1.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
<version>4.3.5</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
<version>2.5.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
|
<version>1.7.13</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.security</groupId>
|
||||||
|
<artifactId>spring-security-core</artifactId>
|
||||||
|
<version>3.2.5.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.security</groupId>
|
||||||
|
<artifactId>spring-security-taglibs</artifactId>
|
||||||
|
<version>3.2.5.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.security</groupId>
|
||||||
|
<artifactId>spring-security-config</artifactId>
|
||||||
|
<version>3.2.5.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>jstl</groupId>
|
||||||
|
<artifactId>jstl</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
<version>1.2.28</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- junit -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.12</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- spring-test -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-test</artifactId>
|
||||||
|
<version>4.1.6.RELEASE</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- commons-codec -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-codec</groupId>
|
||||||
|
<artifactId>commons-codec</artifactId>
|
||||||
|
<version>1.10</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- commons-lang3 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
<version>3.5</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- commons-io -->
|
||||||
|
<!-- <dependency>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
</dependency> -->
|
||||||
|
<!-- commons-fileupload -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-fileupload</groupId>
|
||||||
|
<artifactId>commons-fileupload</artifactId>
|
||||||
|
<version>1.3.2</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- mysql-connector-java -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>5.1.39</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mybatis</groupId>
|
||||||
|
<artifactId>mybatis</artifactId>
|
||||||
|
<version>3.4.4</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mybatis</groupId>
|
||||||
|
<artifactId>mybatis-spring</artifactId>
|
||||||
|
<version>1.3.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
<type>jar</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.csource</groupId>
|
||||||
|
<artifactId>fastdfs-client-java</artifactId>
|
||||||
|
<version>1.25</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/fastdfs-client-java-1.25.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<finalName>memberSystem</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<configuration>
|
||||||
|
<webResources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/webapp</directory>
|
||||||
|
</resource>
|
||||||
|
</webResources>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.5.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.7</source>
|
||||||
|
<target>1.7</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.19.1</version>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/java</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.hbm.xml</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.xml</include>
|
||||||
|
<include>**/*.properties</include>
|
||||||
|
<include>**/*.conf</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>
|
||||||
|
UTF-8
|
||||||
|
</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,321 @@
|
||||||
|
package com.ifish.action;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.ifish.entity.*;
|
||||||
|
import com.ifish.enums.BooleanEnum;
|
||||||
|
import com.ifish.enums.MenuTypeEnum;
|
||||||
|
import com.ifish.hibernate.Pagination;
|
||||||
|
import com.ifish.search.SearchFilter;
|
||||||
|
import com.ifish.service.AdminService;
|
||||||
|
import com.ifish.util.IfishUtil;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: AdminAction
|
||||||
|
* @Description: 管理员页面
|
||||||
|
* @author ggw
|
||||||
|
*/
|
||||||
|
@Controller("adminAction")
|
||||||
|
@RequestMapping("/admin")
|
||||||
|
public class AdminAction {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AdminService adminService;
|
||||||
|
|
||||||
|
private static Logger log = LoggerFactory.getLogger(AdminAction.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主页
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/home.do")
|
||||||
|
public ModelAndView index() {
|
||||||
|
return new ModelAndView("roleAdmin/home");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ****************************************系统用户*****************************************************
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 系统用户列表页面
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/sysUserList.do")
|
||||||
|
public ModelAndView sysUserList(ModelMap map) {
|
||||||
|
try {
|
||||||
|
//鱼缸厂
|
||||||
|
Map<String, String> venderMap = new HashMap<String, String>();
|
||||||
|
List<VenderList> venderList = adminService.getVenderList();
|
||||||
|
for (VenderList vender : venderList) {
|
||||||
|
venderMap.put(vender.getBrandCode(), vender.getBrandName());
|
||||||
|
}
|
||||||
|
//电子厂
|
||||||
|
Map<String, String> factoryMap = new HashMap<String, String>();
|
||||||
|
List<FactoryList> factoryList = adminService.getFactoryList();
|
||||||
|
for (FactoryList factory : factoryList) {
|
||||||
|
factoryMap.put(factory.getFactoryCode(), factory.getFactoryName());
|
||||||
|
}
|
||||||
|
//map
|
||||||
|
map.put("factoryMap", factoryMap);
|
||||||
|
map.put("venderMap", venderMap);
|
||||||
|
//json
|
||||||
|
map.put("factoryJson", JSONObject.toJSON(factoryMap));
|
||||||
|
map.put("venderJson", JSONObject.toJSON(venderMap));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("sysUserList,error msg:{}", e.toString());
|
||||||
|
}
|
||||||
|
return new ModelAndView("roleAdmin/sysUserList", map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统用户列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/sysUserListInf.do")
|
||||||
|
@ResponseBody
|
||||||
|
public Object sysUserListInf(SearchFilter searchFilter) {
|
||||||
|
try {
|
||||||
|
Pagination<SecurityUser> page = this.adminService.getSysUserListByPage(searchFilter);
|
||||||
|
return IfishUtil.returnPageData(page, searchFilter.getsEcho());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("get securityUser page information:error message:{}", e.toString());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改系统用户信息
|
||||||
|
*
|
||||||
|
* @param securityUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/updateSysUser.do")
|
||||||
|
@ResponseBody
|
||||||
|
public Object updateSysUser(SecurityUser securityUser) {
|
||||||
|
try {
|
||||||
|
return this.adminService.updateSysUser(securityUser);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("updateSysUser,error message:{}", e.toString());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置密码
|
||||||
|
*
|
||||||
|
* @param securityUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/resetSysUserPwd.do")
|
||||||
|
@ResponseBody
|
||||||
|
public Object resetSysUserPwd(SecurityUser securityUser) {
|
||||||
|
try {
|
||||||
|
return this.adminService.resetSysUserPwd(securityUser);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("reset securityUser password:userId:{},error message:{}", securityUser.getUserId(), e.toString());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除系统用户
|
||||||
|
*
|
||||||
|
* @param securityUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/delSysUser.do")
|
||||||
|
@ResponseBody
|
||||||
|
public Object delSysUser(SecurityUser securityUser) {
|
||||||
|
try {
|
||||||
|
return this.adminService.delSysUser(securityUser);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("delete securityUser:userId:{},error message:{}", securityUser.getUserId(), e.toString());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户启用开关
|
||||||
|
*
|
||||||
|
* @param securityUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/sysUserOnOff.do")
|
||||||
|
@ResponseBody
|
||||||
|
public Object sysUserOnOff(SecurityUser securityUser) {
|
||||||
|
try {
|
||||||
|
return this.adminService.updateOnOff(securityUser.getUserId().toString(), SecurityUser.class);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("onoff securityUser:userId:{},error message:{}", securityUser.getUserId(), e.toString());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建系统用户
|
||||||
|
*
|
||||||
|
* @param securityUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping("/createSysUser.do")
|
||||||
|
public Object createSysUser(SecurityUser securityUser) {
|
||||||
|
try {
|
||||||
|
return this.adminService.createSysUser(securityUser);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("add securityUser:userName:{},error message:{}", securityUser.getUsername(), e.toString());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ****************************************菜单管理*****************************************************
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 菜单管理页面
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/menuManage.do")
|
||||||
|
public ModelAndView menuManage() {
|
||||||
|
return new ModelAndView("roleAdmin/menuManage");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单信息
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/menuManageInf.do")
|
||||||
|
@ResponseBody
|
||||||
|
public Object menuManageInf(String menuType) {
|
||||||
|
//角色
|
||||||
|
Map<Object, Object> menuMap = new HashMap<Object, Object>();
|
||||||
|
Map<Object, Object> roleMap = new HashMap<Object, Object>();
|
||||||
|
List<Role> roleList = adminService.getRoles();
|
||||||
|
for (int i = 0; i < roleList.size(); i++) {
|
||||||
|
Role role = roleList.get(i);
|
||||||
|
Map<Object, Object> folderMap = new HashMap<Object, Object>();
|
||||||
|
folderMap.put("name", role.getRoleName());
|
||||||
|
folderMap.put("type", MenuTypeEnum.folder.getKey());
|
||||||
|
//角色下拉框
|
||||||
|
roleMap.put(role.getRoleCode(), role.getRoleName());
|
||||||
|
//子集菜单
|
||||||
|
List<Menu> menuList = new ArrayList<Menu>();
|
||||||
|
menuList.addAll(role.getMenuList());
|
||||||
|
if (menuList.size() > 0) {
|
||||||
|
//递归
|
||||||
|
Map<Object, Object> childrenMap = new HashMap<Object, Object>();
|
||||||
|
childrenMap.put("children", menusJson(menuList, menuType));
|
||||||
|
folderMap.put("additionalParameters", childrenMap);
|
||||||
|
}
|
||||||
|
menuMap.put(i, folderMap);
|
||||||
|
}
|
||||||
|
//父级菜单
|
||||||
|
List<Menu> menuList = this.adminService.getParentMenus();
|
||||||
|
//父级菜单下拉框
|
||||||
|
Map<Object, Object> parentMenu = new HashMap<Object, Object>();
|
||||||
|
for (Menu menu : menuList) {
|
||||||
|
parentMenu.put(menu.getMenuId(), menu.getMenuName() + "[" + menu.getLevelName() + "]");
|
||||||
|
}
|
||||||
|
//返回数据
|
||||||
|
Map<Object, Object> dataMap = new HashMap<Object, Object>();
|
||||||
|
dataMap.put("parentMenu", parentMenu);
|
||||||
|
dataMap.put("roleMap", roleMap);
|
||||||
|
dataMap.put("menu", menuMap);
|
||||||
|
return JSONObject.toJSON(dataMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增或修改菜单
|
||||||
|
*
|
||||||
|
* @param menu
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/saveOrupdateMenu.do")
|
||||||
|
@ResponseBody
|
||||||
|
public Object saveOrupdateMenu(Menu menu, String roleCode) {
|
||||||
|
try {
|
||||||
|
return this.adminService.saveOrUpdateMenu(menu, roleCode);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("saveOrupdateMenu:error message:{}", e.toString());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除菜单
|
||||||
|
*
|
||||||
|
* @param menuId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/deleteMenu.do")
|
||||||
|
@ResponseBody
|
||||||
|
public Object deleteMenu(Integer menuId) {
|
||||||
|
try {
|
||||||
|
this.adminService.deleteMenu(menuId);
|
||||||
|
return true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("deleteMenu:error message:{}", e.toString());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归菜单信息
|
||||||
|
*
|
||||||
|
* @param menuList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Map<Object, Object> menusJson(List<Menu> menuList, String menuType) {
|
||||||
|
Map<Object, Object> menuMap = new HashMap<Object, Object>();
|
||||||
|
for (int i = 0; i < menuList.size(); i++) {
|
||||||
|
Menu menu = menuList.get(i);
|
||||||
|
Map<Object, Object> folderMap = new HashMap<Object, Object>();
|
||||||
|
String status = menu.getMenuStatus();
|
||||||
|
Integer order = menu.getMenuOrder();
|
||||||
|
folderMap.put("menuId", menu.getMenuId());
|
||||||
|
folderMap.put("parentMenuId", menu.getParentMenuId());
|
||||||
|
folderMap.put("menuName", menu.getMenuName());
|
||||||
|
if (status.equals(BooleanEnum.YES.getKey())) {
|
||||||
|
folderMap.put("name", "<span class='blue'>" + menu.getMenuName() + "</span>[" + menu.getLevelName() + "]");
|
||||||
|
} else {
|
||||||
|
folderMap.put("name", "<span class='red'>" + menu.getMenuName() + "</span>[" + menu.getLevelName() + "]");
|
||||||
|
}
|
||||||
|
folderMap.put("menuLink", menu.getMenuLink());
|
||||||
|
folderMap.put("menuOrder", order);
|
||||||
|
folderMap.put("menuStatus", status);
|
||||||
|
folderMap.put("levelName", menu.getLevelName());
|
||||||
|
folderMap.put("menuIcon", menu.getMenuIcon());
|
||||||
|
folderMap.put("menuDesc", menu.getMenuDesc());
|
||||||
|
//子集菜单
|
||||||
|
List<Menu> childrenList = new ArrayList<Menu>();
|
||||||
|
childrenList.addAll(menu.getChildrenMenu());
|
||||||
|
if (childrenList.size() > 0) {
|
||||||
|
folderMap.put("type", menuType);
|
||||||
|
//递归
|
||||||
|
Map<Object, Object> childrenMap = new HashMap<Object, Object>();
|
||||||
|
childrenMap.put("children", menusJson(childrenList, MenuTypeEnum.item.getKey()));
|
||||||
|
folderMap.put("additionalParameters", childrenMap);
|
||||||
|
} else {
|
||||||
|
folderMap.put("type", menuType);
|
||||||
|
}
|
||||||
|
menuMap.put(i, folderMap);
|
||||||
|
}
|
||||||
|
return menuMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,170 @@
|
||||||
|
package com.ifish.action;
|
||||||
|
|
||||||
|
import com.ifish.entity.Menu;
|
||||||
|
import com.ifish.entity.Role;
|
||||||
|
import com.ifish.entity.SecurityUser;
|
||||||
|
import com.ifish.enums.RoleEnum;
|
||||||
|
import com.ifish.enums.SysUserEnum;
|
||||||
|
import com.ifish.menu.IfishMenu;
|
||||||
|
import com.ifish.service.AdminService;
|
||||||
|
import com.ifish.service.PublicService;
|
||||||
|
import com.ifish.ueditor.ActionEnter;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: PublicAction
|
||||||
|
* @Description: 公共页面
|
||||||
|
* @author ggw
|
||||||
|
*/
|
||||||
|
@Controller("publicAction")
|
||||||
|
@RequestMapping("/public")
|
||||||
|
public class PublicAction {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PublicService publicService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AdminService adminService;
|
||||||
|
|
||||||
|
private static Logger log = LoggerFactory.getLogger(PublicAction.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登陆页面
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/login.do")
|
||||||
|
public ModelAndView login(String status) {
|
||||||
|
return new ModelAndView("roleAll/login", "status", status);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文本编辑器配置
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
@RequestMapping("/config.do")
|
||||||
|
public void config(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
try {
|
||||||
|
request.setCharacterEncoding("utf-8");
|
||||||
|
response.setHeader("Content-Type", "text/html");
|
||||||
|
response.setContentType("application/json");
|
||||||
|
String rootPath = request.getSession().getServletContext().getRealPath("/");
|
||||||
|
String exec = new ActionEnter(request, rootPath).exec();
|
||||||
|
PrintWriter writer = response.getWriter();
|
||||||
|
writer.write(exec);
|
||||||
|
writer.flush();
|
||||||
|
writer.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主页
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/index.do")
|
||||||
|
public ModelAndView index() {
|
||||||
|
String role = null;
|
||||||
|
String userName = null;
|
||||||
|
try {
|
||||||
|
//登录用户
|
||||||
|
UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||||
|
userName = userDetails.getUsername();
|
||||||
|
//根据登录用户角色类型跳转
|
||||||
|
Collection<? extends GrantedAuthority> authorities = SecurityContextHolder.getContext().getAuthentication().getAuthorities();
|
||||||
|
for (GrantedAuthority grantedAuthority : authorities) {
|
||||||
|
role = grantedAuthority.getAuthority();
|
||||||
|
}
|
||||||
|
//菜单初始化
|
||||||
|
if (role != null && userName != null) {
|
||||||
|
Role curRole = this.adminService.get(role);
|
||||||
|
List<Menu> menuList = new ArrayList<Menu>();
|
||||||
|
menuList.addAll(curRole.getMenuList());
|
||||||
|
//默认选择菜单
|
||||||
|
IfishMenu.initChioceMenu(userName, null);
|
||||||
|
//用户菜单
|
||||||
|
if (userName != null) {
|
||||||
|
IfishMenu.initMenu(userName, menuList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//重定向
|
||||||
|
String redirect = "";
|
||||||
|
if (role.equals(RoleEnum.admin.getKey())) {
|
||||||
|
redirect = "page/admin/home.do";
|
||||||
|
} else if (role.equals(RoleEnum.user.getKey())) {
|
||||||
|
redirect = "page/user/home.do";
|
||||||
|
}
|
||||||
|
return new ModelAndView("redirect:/" + redirect);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
log.error("index page:role:{},error message:{}", role, e.toString());
|
||||||
|
}
|
||||||
|
return new ModelAndView("redirect:login.do");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改密码页面
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/changePwd.do")
|
||||||
|
public ModelAndView changePwd(String status) {
|
||||||
|
return new ModelAndView("roleAll/changePwd", "status", status);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改密码
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/savePwd.do")
|
||||||
|
public ModelAndView savePwd(String username, String oldPassword, String newPassword) {
|
||||||
|
try {
|
||||||
|
SecurityUser securityUser = publicService.updateSecurityPwd(username, oldPassword, newPassword);
|
||||||
|
if (securityUser != null) {
|
||||||
|
return new ModelAndView("redirect:/page/public/changePwd.do", "status", SysUserEnum.success100.getKey());
|
||||||
|
}
|
||||||
|
return new ModelAndView("redirect:/page/public/changePwd.do", "status", SysUserEnum.warn105.getKey());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("update password:userName:{},error message:{}", username, e.toString());
|
||||||
|
}
|
||||||
|
return new ModelAndView("redirect:/page/public/changePwd.do", "status", SysUserEnum.failed101.getKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户注册
|
||||||
|
*
|
||||||
|
* @param securityUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/signup.do")
|
||||||
|
public ModelAndView signup(SecurityUser securityUser) {
|
||||||
|
try {
|
||||||
|
String code = publicService.createSysUser(securityUser);
|
||||||
|
return new ModelAndView("redirect:/page/public/login.do", "status", code);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("securityUser register:userName:{},error message:{}", securityUser.getUsername(), e.toString());
|
||||||
|
}
|
||||||
|
return new ModelAndView("redirect:/page/public/login.do", "status", SysUserEnum.failed101.getKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.ifish.action;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: UserAction
|
||||||
|
* @Description: 普通用户
|
||||||
|
* @author ggw
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Controller("userAction")
|
||||||
|
@RequestMapping("/user")
|
||||||
|
public class UserAction {
|
||||||
|
|
||||||
|
//private static Logger log = LoggerFactory.getLogger(UserAction.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主页
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/home.do")
|
||||||
|
public ModelAndView index() {
|
||||||
|
return new ModelAndView("roleUser/home");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,195 @@
|
||||||
|
package com.ifish.action;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: yan.y
|
||||||
|
* @Description:
|
||||||
|
* @Date: Created in 22:19 2018/7/2
|
||||||
|
* @Modified by:
|
||||||
|
*/
|
||||||
|
//@Controller("VipAction")
|
||||||
|
//@RequestMapping("/vip")
|
||||||
|
public class VipAction {
|
||||||
|
|
||||||
|
/** ====================================会员信息============================================ **/
|
||||||
|
@RequestMapping("/list")
|
||||||
|
public ModelAndView vipList(){
|
||||||
|
|
||||||
|
return new ModelAndView("vip/vipList");
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/getVip")
|
||||||
|
public ModelAndView getVip(){
|
||||||
|
|
||||||
|
return new ModelAndView("vip/vipDetail");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/add")
|
||||||
|
public boolean vipAdd(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/update")
|
||||||
|
public boolean vipUpdate(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/delete")
|
||||||
|
public boolean vipDelete(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/export")
|
||||||
|
public void vipExport(){
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/sendSmS")
|
||||||
|
public boolean vipSendSMS(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** ====================================单位评价信息============================================ **/
|
||||||
|
|
||||||
|
@RequestMapping("/companyEvaluateList")
|
||||||
|
public ModelAndView companyEvaluate(){
|
||||||
|
|
||||||
|
return new ModelAndView("vip/companyEvaluateList");
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/getCompanyEvaluate")
|
||||||
|
public ModelAndView getCompanyEvaluate(){
|
||||||
|
|
||||||
|
return new ModelAndView("vip/companyEvaluateDetail");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/companyEvaluateAdd")
|
||||||
|
public boolean companyEvaluateAdd(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/companyEvaluateUpdate")
|
||||||
|
public boolean companyEvaluateUpdate(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/companyEvaluateDelete")
|
||||||
|
public boolean companyEvaluateDelete(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** ====================================个人评价信息============================================ **/
|
||||||
|
|
||||||
|
@RequestMapping("/personalEvaluateList")
|
||||||
|
public ModelAndView personalEvaluate(){
|
||||||
|
|
||||||
|
return new ModelAndView("vip/personalEvaluateList");
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/getPersonalEvaluate")
|
||||||
|
public ModelAndView getPersonalEvaluate(){
|
||||||
|
|
||||||
|
return new ModelAndView("vip/personalEvaluateDetail");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/personalEvaluateAdd")
|
||||||
|
public boolean personalEvaluateAdd(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/companyEvaluateUpdate")
|
||||||
|
public boolean personalEvaluateUpdate(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/companyEvaluateDelete")
|
||||||
|
public boolean personalEvaluateDelete(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** ====================================会员类别============================================ **/
|
||||||
|
@RequestMapping("/vipTypeList")
|
||||||
|
public ModelAndView vipTypeList(){
|
||||||
|
|
||||||
|
return new ModelAndView("vip/vipTypeList");
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/getVipType")
|
||||||
|
public ModelAndView getVipType(){
|
||||||
|
|
||||||
|
return new ModelAndView("vip/vipTypeDetail");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/vipTypeAdd")
|
||||||
|
public boolean vipTypeAdd(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/vipTypeUpdate")
|
||||||
|
public boolean vipTypeUpdate(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/vipTypeDelete")
|
||||||
|
public boolean vipTypeDelete(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ====================================推荐人============================================ **/
|
||||||
|
@RequestMapping("/referrerList")
|
||||||
|
public ModelAndView referrerList(){
|
||||||
|
|
||||||
|
return new ModelAndView("vip/referrerList");
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/getReferrer")
|
||||||
|
public ModelAndView getReferrer(){
|
||||||
|
|
||||||
|
return new ModelAndView("vip/referrerDetail");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/referrerAdd")
|
||||||
|
public boolean referrerAdd(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/referrerUpdate")
|
||||||
|
public boolean referrerUpdate(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/referrerDelete")
|
||||||
|
public boolean referrerDelete(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.hibernate.Criteria;
|
||||||
|
import org.hibernate.criterion.Criterion;
|
||||||
|
import org.hibernate.criterion.Order;
|
||||||
|
|
||||||
|
import com.ifish.hibernate.Pagination;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: BaseDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface BaseDao<T, ID extends Serializable> {
|
||||||
|
|
||||||
|
public T get(ID id);
|
||||||
|
|
||||||
|
public T save(T t);
|
||||||
|
|
||||||
|
public T update(T t);
|
||||||
|
|
||||||
|
public void delete(T t);
|
||||||
|
|
||||||
|
public List<T> findByProperty(Criterion... criterions);
|
||||||
|
|
||||||
|
public List<T> findByProperty(Order order,Criterion... criterions);
|
||||||
|
|
||||||
|
public T findUniqueByProperty(Criterion... criterions);
|
||||||
|
|
||||||
|
public int countByProperty(Criterion... criterion);
|
||||||
|
|
||||||
|
public Pagination<T> findByCriteria(Integer firstResult,Integer pageSize,List<Order> orders,Criterion... criterion);
|
||||||
|
|
||||||
|
public Pagination<T> findByJoinCriteria(Integer firstResult,Integer pageSize,List<Order> orders,Map<String,List<Criterion>> joinMap,Criterion[] criterion);
|
||||||
|
|
||||||
|
public Pagination<T> findByJoinCriteria(Integer firstResult,Integer pageSize,List<Order> orders,Map<String,List<Criterion>> joinMap,Map<String,Order> orderMap,Criterion[] criterion);
|
||||||
|
|
||||||
|
public Criteria createCriteria(List<Order> orders,Criterion... criterions);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.Comment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: CommentDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface CommentDao extends BaseDao<Comment, Integer>{
|
||||||
|
|
||||||
|
public Integer getPinglunNum(Integer ueditorId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.CouponRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优惠券兑换记录
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface CouponRecordDao extends BaseDao<CouponRecord, Integer> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询兑换券的兑换数量
|
||||||
|
* @param couponId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int getCouponRecordCountByCouponId(Integer couponId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户的兑换数量
|
||||||
|
* @param couponId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int getCouponRecordCountByUser(Integer userId,Integer couponId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.DeviceCamera;
|
||||||
|
import com.ifish.entity.id.DeviceCameraId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: DeviceCameraDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface DeviceCameraDao extends BaseDao<DeviceCamera, DeviceCameraId>{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ifish.entity.Device;
|
||||||
|
import com.ifish.entity.UpgradeNotes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: DeviceDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface DeviceDao extends BaseDao<Device, Integer>{
|
||||||
|
|
||||||
|
public int OnUpgrade(UpgradeNotes upgradeNotes);
|
||||||
|
|
||||||
|
//分组统计获取数据
|
||||||
|
public List<?> getReportDataByGroup(String sql,Class<?> claz);
|
||||||
|
|
||||||
|
//获取数量
|
||||||
|
public int getNumber(String sql);
|
||||||
|
|
||||||
|
//执行SQL
|
||||||
|
public int executeSql(String sql);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.DeviceUser;
|
||||||
|
import com.ifish.entity.id.PriId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: DeviceUserDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface DeviceUserDao extends BaseDao<DeviceUser, PriId>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.ifish.entity.FactoryList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: FactoryListDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface FactoryListDao extends BaseDao<FactoryList, String>{
|
||||||
|
|
||||||
|
//获取鱼缸厂下所有属电子厂
|
||||||
|
public Map<String,String> getFactoryByVenderCode(String venderCode);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.GoldControl;
|
||||||
|
import com.ifish.entity.GoldControlId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金币控制信息
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface GoldControlDao extends BaseDao<GoldControl, GoldControlId> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.GoldExpendRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金币消耗记录
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface GoldExpendRecordDao extends BaseDao<GoldExpendRecord, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.GoldGetRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取金币记录
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface GoldGetRecordDao extends BaseDao<GoldGetRecord, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.GoldTask;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金币获取规则
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface GoldRuleDao extends BaseDao<GoldTask, String> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.GradeControl;
|
||||||
|
import com.ifish.entity.GradeControlId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 等级经验控制
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface GradeControlDao extends BaseDao<GradeControl, GradeControlId> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.Grade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: GradeDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface GradeDao extends BaseDao<Grade, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.GradeRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: GradeRecordDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface GradeRecordDao extends BaseDao<GradeRecord, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.GradeTask;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: GradeRuleDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface GradeRuleDao extends BaseDao<GradeTask, String>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.HardwareType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: HardwareTypeDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface HardwareTypeDao extends BaseDao<HardwareType, String>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.IfishDoctor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: IfishDoctorDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface IfishDoctorDao extends BaseDao<IfishDoctor, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.IfishGoods;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品管理dao
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface IfishGoodsDao extends BaseDao<IfishGoods, Integer> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.IfishShop;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺管理dao
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface IfishShopDao extends BaseDao<IfishShop, Integer> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.Information;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: InformationDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface InformationDao extends BaseDao<Information, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.InformationStats;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 资讯数据统计
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface InformationStatsDao extends BaseDao<InformationStats, Integer> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.LiveBanner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: LiveBannerDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface LiveBannerDao extends BaseDao<LiveBanner, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.LiveRoom;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: LiveRoomDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface LiveRoomDao extends BaseDao<LiveRoom, Integer>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新直播推荐信息
|
||||||
|
* @param roomId
|
||||||
|
* @param isTuijian
|
||||||
|
* @param tuijianNum
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int updateIsTuijian(Integer roomId,String isTuijian,Integer tuijianNum);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.LoginRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: LoginRecordDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface LoginRecordDao extends BaseDao<LoginRecord, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.Menu;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: MenuDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface MenuDao extends BaseDao<Menu, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.NeteaseUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: NeteaseUserDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface NeteaseUserDao extends BaseDao<NeteaseUser, String>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.OperateRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: OperateRecordDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface OperateRecordDao extends BaseDao<OperateRecord, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.PayBill;
|
||||||
|
import com.ifish.entity.id.PayBillId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: PayBillDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface PayBillDao extends BaseDao<PayBill, PayBillId>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.PayeeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: PayeeInfoDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface PayeeInfoDao extends BaseDao<PayeeInfo, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.PushList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: PushListDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface PushListDao extends BaseDao<PushList, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.QuestionsFeedback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: QuestionsFeedbackDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface QuestionsFeedbackDao extends BaseDao<QuestionsFeedback, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.Role;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: RoleDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface RoleDao extends BaseDao<Role, String>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.SecurityUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: SecurityUserDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface SecurityUserDao extends BaseDao<SecurityUser, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ifish.entity.ShopsInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: ShopsInfoDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface ShopsInfoDao extends BaseDao<ShopsInfo, Integer>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 随机取得用户ID
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Integer> getShopsUserIdByRand(Integer userId);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.ShopsUserInfo;
|
||||||
|
import com.ifish.entity.id.ShopsUserInfoId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商家会员信息dao
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface ShopsUserInfoDao extends BaseDao<ShopsUserInfo, ShopsUserInfoId>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.TmpPushRemind;
|
||||||
|
import com.ifish.entity.id.PriId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: TmpPushRemindDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface TmpPushRemindDao extends BaseDao<TmpPushRemind, PriId>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.Ueditor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: UeditorDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface UeditorDao extends BaseDao<Ueditor, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.UpgradeNotes;
|
||||||
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: UpgradeNotesDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface UpgradeNotesDao extends BaseDao<UpgradeNotes, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.UserAsset;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户资产(金币,经验值等信息)
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface UserAssetDao extends BaseDao<UserAsset, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ifish.entity.User;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: UserDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface UserDao extends BaseDao<User, Integer>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新备注
|
||||||
|
* @param user
|
||||||
|
*/
|
||||||
|
public void updateRemarks(User user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户ID
|
||||||
|
* @param pushType
|
||||||
|
* @param firstResult
|
||||||
|
* @param maxResults
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Integer> getUserIds(String pushType,Integer firstResult, int maxResults);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.VenderList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: VenderListDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface VenderListDao extends BaseDao<VenderList, String>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.ifish.dao;
|
||||||
|
|
||||||
|
import com.ifish.entity.Version;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: VersionDao
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface VersionDao extends BaseDao<Version, Integer>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import com.ifish.dao.BaseDao;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.entity.CameraActive;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: CameraActiveDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("cameraActiveDao")
|
||||||
|
public class CameraActiveDaoImpl extends HibernateBaseDao<CameraActive, String> implements BaseDao<CameraActive, String> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<CameraActive> getEntityClass() {
|
||||||
|
return CameraActive.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import com.ifish.dao.BaseDao;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.entity.Camera;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: CameraDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("cameraDao")
|
||||||
|
public class CameraDaoImpl extends HibernateBaseDao<Camera, String> implements BaseDao<Camera, String> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<Camera> getEntityClass() {
|
||||||
|
return Camera.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import com.ifish.dao.BaseDao;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.entity.CameraUser;
|
||||||
|
import com.ifish.entity.id.CameraUserId;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: CameraUserDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("cameraUserDao")
|
||||||
|
public class CameraUserDaoImpl extends HibernateBaseDao<CameraUser, CameraUserId> implements BaseDao<CameraUser, CameraUserId> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<CameraUser> getEntityClass() {
|
||||||
|
return CameraUser.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import com.ifish.dao.CommentDao;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.entity.Comment;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: CommentDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository()
|
||||||
|
public class CommentDaoImpl extends HibernateBaseDao<Comment, Integer> implements CommentDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<Comment> getEntityClass() {
|
||||||
|
return Comment.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getPinglunNum(Integer ueditorId) {
|
||||||
|
//查询评论数据
|
||||||
|
String sql = "SELECT count(*) FROM tbl_comment where ueditor_id=?";
|
||||||
|
return ((Number)getSession().createSQLQuery(sql).setInteger(0, ueditorId).uniqueResult()).intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import com.ifish.dao.BaseDao;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.entity.Coupon;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优惠券
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class CouponDaoImpl extends HibernateBaseDao<Coupon, Integer> implements BaseDao<Coupon, Integer> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<Coupon> getEntityClass() {
|
||||||
|
return Coupon.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import java.math.BigInteger;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.CouponRecordDao;
|
||||||
|
import com.ifish.entity.CouponRecord;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优惠价兑换记录
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class CouponRecordDaoImpl extends HibernateBaseDao<CouponRecord, Integer> implements CouponRecordDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<CouponRecord> getEntityClass() {
|
||||||
|
return CouponRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCouponRecordCountByCouponId(Integer couponId) {
|
||||||
|
String sql = "select count(*) from tbl_coupon_record where coupon_id=?";
|
||||||
|
return ((BigInteger)getSession().createSQLQuery(sql).setInteger(0, couponId).uniqueResult()).intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCouponRecordCountByUser(Integer userId, Integer couponId) {
|
||||||
|
String sql = "select count(*) from tbl_coupon_record where user_id=? and coupon_id=?";
|
||||||
|
return ((BigInteger)getSession().createSQLQuery(sql).setInteger(0, userId).setInteger(1, couponId).uniqueResult()).intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.DeviceCameraDao;
|
||||||
|
import com.ifish.entity.DeviceCamera;
|
||||||
|
import com.ifish.entity.id.DeviceCameraId;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: DeviceCameraDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("deviceCameraDao")
|
||||||
|
public class DeviceCameraDaoImpl extends HibernateBaseDao<DeviceCamera, DeviceCameraId> implements DeviceCameraDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<DeviceCamera> getEntityClass() {
|
||||||
|
return DeviceCamera.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.hibernate.transform.Transformers;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.DeviceDao;
|
||||||
|
import com.ifish.entity.Device;
|
||||||
|
import com.ifish.entity.UpgradeNotes;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: DeviceDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("deviceDao")
|
||||||
|
public class DeviceDaoImpl extends HibernateBaseDao<Device, Integer> implements DeviceDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<Device> getEntityClass() {
|
||||||
|
return Device.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int OnUpgrade(UpgradeNotes upgradeNotes) {
|
||||||
|
Integer upgradeVersion = upgradeNotes.getUpgradeVersion();
|
||||||
|
Integer sdkVersion = upgradeNotes.getSdkVersion();
|
||||||
|
sdkVersion = sdkVersion==null?-1:sdkVersion;
|
||||||
|
String factoryCode = upgradeNotes.getFactoryList().getFactoryCode();
|
||||||
|
String brandCode = upgradeNotes.getVenderList().getBrandCode();
|
||||||
|
String hardwareType = upgradeNotes.getHardwareType().getHardwareType();
|
||||||
|
String sql = "update tbl_device SET is_upgrade=1,upgrade_version=? where IF(? != '', factory_code=?, true) and IF(? != '', brand_code=?, true) and IF(? != '', hardware_type=?, true) and IF(? != -1, sdk_version=?, true)";
|
||||||
|
int number = this.getSession().createSQLQuery(sql)
|
||||||
|
.setInteger(0, upgradeVersion)
|
||||||
|
.setString(1, factoryCode)
|
||||||
|
.setString(2, factoryCode)
|
||||||
|
.setString(3, brandCode)
|
||||||
|
.setString(4, brandCode)
|
||||||
|
.setString(5, hardwareType)
|
||||||
|
.setString(6, hardwareType)
|
||||||
|
.setInteger(7, sdkVersion)
|
||||||
|
.setInteger(8, sdkVersion)
|
||||||
|
.executeUpdate();
|
||||||
|
return number;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<?> getReportDataByGroup(String sql,Class<?> claz) {
|
||||||
|
return this.getSession().createSQLQuery(sql).setResultTransformer(Transformers.aliasToBean(claz)).list();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getNumber(String sql) {
|
||||||
|
return ((BigInteger) this.getSession().createSQLQuery(sql).uniqueResult()).intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int executeSql(String sql) {
|
||||||
|
return this.getSession().createSQLQuery(sql).executeUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.DeviceUserDao;
|
||||||
|
import com.ifish.entity.DeviceUser;
|
||||||
|
import com.ifish.entity.id.PriId;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: DeviceUserDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("deviceUserDao")
|
||||||
|
public class DeviceUserDaoImpl extends HibernateBaseDao<DeviceUser, PriId> implements DeviceUserDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<DeviceUser> getEntityClass() {
|
||||||
|
return DeviceUser.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.hibernate.transform.Transformers;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.FactoryListDao;
|
||||||
|
import com.ifish.entity.FactoryList;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: FactoryListDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("factoryListDao")
|
||||||
|
public class FactoryListDaoImpl extends HibernateBaseDao<FactoryList, String> implements FactoryListDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<FactoryList> getEntityClass() {
|
||||||
|
return FactoryList.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public Map<String, String> getFactoryByVenderCode(String venderCode) {
|
||||||
|
List<Map<String,String>> list = getSession().createSQLQuery("select factory_code,factory_name from tbl_factory_list where factory_code in (select factory_code from tbl_factory_vender where brand_code=?)")
|
||||||
|
.setParameter(0, venderCode)
|
||||||
|
.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP)
|
||||||
|
.list();
|
||||||
|
Map<String, String> returnMap = new HashMap<String, String>();
|
||||||
|
for (Map<String, String> map : list) {
|
||||||
|
returnMap.put(map.get("factory_code"), map.get("factory_name"));
|
||||||
|
}
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.GoldControlDao;
|
||||||
|
import com.ifish.entity.GoldControl;
|
||||||
|
import com.ifish.entity.GoldControlId;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金币控制信息
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class GoldControlDaoImpl extends HibernateBaseDao<GoldControl, GoldControlId> implements GoldControlDao{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<GoldControl> getEntityClass() {
|
||||||
|
return GoldControl.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.GoldExpendRecordDao;
|
||||||
|
import com.ifish.entity.GoldExpendRecord;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金币消耗记录
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class GoldExpendRecordDaoImpl extends HibernateBaseDao<GoldExpendRecord, Integer> implements GoldExpendRecordDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<GoldExpendRecord> getEntityClass() {
|
||||||
|
return GoldExpendRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.GoldGetRecordDao;
|
||||||
|
import com.ifish.entity.GoldGetRecord;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金币获取记录
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class GoldGetRecordDaoImpl extends HibernateBaseDao<GoldGetRecord, Integer> implements GoldGetRecordDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<GoldGetRecord> getEntityClass() {
|
||||||
|
return GoldGetRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.GoldRuleDao;
|
||||||
|
import com.ifish.entity.GoldTask;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金币获取规则
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class GoldRuleImpl extends HibernateBaseDao<GoldTask, String> implements GoldRuleDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<GoldTask> getEntityClass() {
|
||||||
|
return GoldTask.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.GradeControlDao;
|
||||||
|
import com.ifish.entity.GradeControl;
|
||||||
|
import com.ifish.entity.GradeControlId;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 等级信息控制
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class GradeControlDaoImpl extends HibernateBaseDao<GradeControl, GradeControlId> implements GradeControlDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<GradeControl> getEntityClass() {
|
||||||
|
return GradeControl.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.GradeDao;
|
||||||
|
import com.ifish.entity.Grade;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: GradeDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public class GradeDaoImpl extends HibernateBaseDao<Grade, Integer> implements GradeDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<Grade> getEntityClass() {
|
||||||
|
return Grade.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.GradeRecordDao;
|
||||||
|
import com.ifish.entity.GradeRecord;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: GradeRecordDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public class GradeRecordDaoImpl extends HibernateBaseDao<GradeRecord, Integer> implements GradeRecordDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<GradeRecord> getEntityClass() {
|
||||||
|
return GradeRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.GradeRuleDao;
|
||||||
|
import com.ifish.entity.GradeTask;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: GradeRuleImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public class GradeRuleImpl extends HibernateBaseDao<GradeTask, String> implements GradeRuleDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<GradeTask> getEntityClass() {
|
||||||
|
return GradeTask.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.HardwareTypeDao;
|
||||||
|
import com.ifish.entity.HardwareType;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: HardwareTypeDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("hardwareTypeDao")
|
||||||
|
public class HardwareTypeDaoImpl extends HibernateBaseDao<HardwareType, String> implements HardwareTypeDao {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<HardwareType> getEntityClass() {
|
||||||
|
return HardwareType.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.IfishDoctorDao;
|
||||||
|
import com.ifish.entity.IfishDoctor;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: IfishDoctorDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public class IfishDoctorDaoImpl extends HibernateBaseDao<IfishDoctor, Integer> implements IfishDoctorDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<IfishDoctor> getEntityClass() {
|
||||||
|
return IfishDoctor.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.IfishGoodsDao;
|
||||||
|
import com.ifish.entity.IfishGoods;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品管理dao
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class IfishGoodsDaoImpl extends HibernateBaseDao<IfishGoods,Integer> implements IfishGoodsDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<IfishGoods> getEntityClass() {
|
||||||
|
return IfishGoods.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.IfishShopDao;
|
||||||
|
import com.ifish.entity.IfishShop;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺管理dao
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class IfishShopDaoImpl extends HibernateBaseDao<IfishShop,Integer> implements IfishShopDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<IfishShop> getEntityClass() {
|
||||||
|
return IfishShop.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.InformationDao;
|
||||||
|
import com.ifish.entity.Information;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: InformationDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("informationDao")
|
||||||
|
public class InformationDaoImpl extends HibernateBaseDao<Information, Integer> implements InformationDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<Information> getEntityClass() {
|
||||||
|
return Information.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.InformationStatsDao;
|
||||||
|
import com.ifish.entity.InformationStats;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 资讯数据统计
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class InformationStatsDaoImpl extends HibernateBaseDao<InformationStats, Integer> implements InformationStatsDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<InformationStats> getEntityClass() {
|
||||||
|
return InformationStats.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.LiveBannerDao;
|
||||||
|
import com.ifish.entity.LiveBanner;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: LiveBannerDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class LiveBannerDaoImpl extends HibernateBaseDao<LiveBanner, Integer> implements LiveBannerDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<LiveBanner> getEntityClass() {
|
||||||
|
return LiveBanner.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.LiveRoomDao;
|
||||||
|
import com.ifish.entity.LiveRoom;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: LiveRoomDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class LiveRoomDaoImpl extends HibernateBaseDao<LiveRoom, Integer> implements LiveRoomDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<LiveRoom> getEntityClass() {
|
||||||
|
return LiveRoom.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateIsTuijian(Integer roomId, String isTuijian, Integer tuijianNum) {
|
||||||
|
String sql = "update tbl_live_room set is_tuijian=?,tuijian_num=? where room_id=?";
|
||||||
|
return getSession().createSQLQuery(sql).setString(0, isTuijian).setInteger(1, tuijianNum).setInteger(2, roomId).executeUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.LoginRecordDao;
|
||||||
|
import com.ifish.entity.LoginRecord;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: LoginRecordDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("loginRecordDao")
|
||||||
|
public class LoginRecordDaoImpl extends HibernateBaseDao<LoginRecord, Integer> implements LoginRecordDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<LoginRecord> getEntityClass() {
|
||||||
|
return LoginRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.MenuDao;
|
||||||
|
import com.ifish.entity.Menu;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: CameraDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public class MenuDaoImpl extends HibernateBaseDao<Menu, Integer> implements MenuDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<Menu> getEntityClass() {
|
||||||
|
return Menu.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.NeteaseUserDao;
|
||||||
|
import com.ifish.entity.NeteaseUser;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: NeteaseUserDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("neteaseUserDao")
|
||||||
|
public class NeteaseUserDaoImpl extends HibernateBaseDao<NeteaseUser, String> implements NeteaseUserDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<NeteaseUser> getEntityClass() {
|
||||||
|
return NeteaseUser.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.OperateRecordDao;
|
||||||
|
import com.ifish.entity.OperateRecord;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: OperateRecordDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("operateRecordDao")
|
||||||
|
public class OperateRecordDaoImpl extends HibernateBaseDao<OperateRecord, Integer> implements OperateRecordDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<OperateRecord> getEntityClass() {
|
||||||
|
return OperateRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.PayBillDao;
|
||||||
|
import com.ifish.entity.PayBill;
|
||||||
|
import com.ifish.entity.id.PayBillId;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: PayBillDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("payBillDao")
|
||||||
|
public class PayBillDaoImpl extends HibernateBaseDao<PayBill, PayBillId> implements PayBillDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<PayBill> getEntityClass() {
|
||||||
|
return PayBill.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.PayeeInfoDao;
|
||||||
|
import com.ifish.entity.PayeeInfo;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: PayeeInfoDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("payeeInfoDao")
|
||||||
|
public class PayeeInfoDaoImpl extends HibernateBaseDao<PayeeInfo, Integer> implements PayeeInfoDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<PayeeInfo> getEntityClass() {
|
||||||
|
return PayeeInfo.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.PushListDao;
|
||||||
|
import com.ifish.entity.PushList;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: PushListDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("pushListDao")
|
||||||
|
public class PushListDaoImpl extends HibernateBaseDao<PushList, Integer> implements PushListDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<PushList> getEntityClass() {
|
||||||
|
return PushList.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.QuestionsFeedbackDao;
|
||||||
|
import com.ifish.entity.QuestionsFeedback;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: QuestionsFeedbackDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("questionsFeedbackDao")
|
||||||
|
public class QuestionsFeedbackDaoImpl extends HibernateBaseDao<QuestionsFeedback, Integer> implements QuestionsFeedbackDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<QuestionsFeedback> getEntityClass() {
|
||||||
|
return QuestionsFeedback.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.RoleDao;
|
||||||
|
import com.ifish.entity.Role;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: RoleDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public class RoleDaoImpl extends HibernateBaseDao<Role, String> implements RoleDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<Role> getEntityClass() {
|
||||||
|
return Role.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.SecurityUserDao;
|
||||||
|
import com.ifish.entity.SecurityUser;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: SecurityUserDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository("securityUserDao")
|
||||||
|
public class SecurityUserDaoImpl extends HibernateBaseDao<SecurityUser, Integer> implements SecurityUserDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<SecurityUser> getEntityClass() {
|
||||||
|
return SecurityUser.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.ShopsInfoDao;
|
||||||
|
import com.ifish.entity.ShopsInfo;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: ShopsInfoDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("shopsInfoDao")
|
||||||
|
public class ShopsInfoDaoImpl extends HibernateBaseDao<ShopsInfo, Integer> implements ShopsInfoDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<ShopsInfo> getEntityClass() {
|
||||||
|
return ShopsInfo.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<Integer> getShopsUserIdByRand(Integer userId) {
|
||||||
|
String sql = "SELECT user_id FROM tbl_shops_info WHERE status='1' AND user_id!=? AND app_show='1' ORDER BY RAND() LIMIT 10";
|
||||||
|
List<Integer> list = this.getSession().createSQLQuery(sql).setParameter(0, userId).list();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.ShopsUserInfoDao;
|
||||||
|
import com.ifish.entity.ShopsUserInfo;
|
||||||
|
import com.ifish.entity.id.ShopsUserInfoId;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商家会员信息
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class ShopsUserInfoDaoImpl extends HibernateBaseDao<ShopsUserInfo, ShopsUserInfoId> implements ShopsUserInfoDao{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<ShopsUserInfo> getEntityClass() {
|
||||||
|
return ShopsUserInfo.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.TmpPushRemindDao;
|
||||||
|
import com.ifish.entity.TmpPushRemind;
|
||||||
|
import com.ifish.entity.id.PriId;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: TmpPushRemindImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("tmpPushRemindDao")
|
||||||
|
public class TmpPushRemindDaoImpl extends HibernateBaseDao<TmpPushRemind, PriId> implements TmpPushRemindDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<TmpPushRemind> getEntityClass() {
|
||||||
|
return TmpPushRemind.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.UeditorDao;
|
||||||
|
import com.ifish.entity.Ueditor;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: UeditorDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public class UeditorDaoImpl extends HibernateBaseDao<Ueditor, Integer> implements UeditorDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<Ueditor> getEntityClass() {
|
||||||
|
return Ueditor.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.UpgradeNotesDao;
|
||||||
|
import com.ifish.entity.UpgradeNotes;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: UpgradeNotesDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("upgradeNotesDao")
|
||||||
|
public class UpgradeNotesDaoImpl extends HibernateBaseDao<UpgradeNotes, Integer> implements UpgradeNotesDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<UpgradeNotes> getEntityClass() {
|
||||||
|
return UpgradeNotes.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.UserAssetDao;
|
||||||
|
import com.ifish.entity.UserAsset;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public class UserAssetDaoImpl extends HibernateBaseDao<UserAsset, Integer> implements UserAssetDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<UserAsset> getEntityClass() {
|
||||||
|
return UserAsset.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.UserDao;
|
||||||
|
import com.ifish.entity.User;
|
||||||
|
import com.ifish.enums.BooleanEnum;
|
||||||
|
import com.ifish.enums.PhoneTypeEnum;
|
||||||
|
import com.ifish.enums.PushTypeEnum;
|
||||||
|
import com.ifish.enums.UserTypeEnum;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: UserDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("userDao")
|
||||||
|
public class UserDaoImpl extends HibernateBaseDao<User, Integer> implements UserDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<User> getEntityClass() {
|
||||||
|
return User.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateRemarks(User user) {
|
||||||
|
if(user.getUserId()!=null){
|
||||||
|
User tmp = this.get(user.getUserId());
|
||||||
|
if(tmp!=null){
|
||||||
|
tmp.setUpdateTime(new Date());
|
||||||
|
tmp.setRemarks(user.getRemarks());
|
||||||
|
this.getSession().update(tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@Override
|
||||||
|
public List<Integer> getUserIds(String pushType,Integer firstResult, int maxResults) {
|
||||||
|
//商家用户
|
||||||
|
if(PushTypeEnum.all_shops_push.getKey().equals(pushType)){
|
||||||
|
String sql = "select user_id from tbl_user where user_type=? and is_register_netease=? limit ?,?";
|
||||||
|
List<Integer> list = this.getSession().createSQLQuery(sql).setString(0, UserTypeEnum.userType1.getKey()).setString(1, BooleanEnum.YES.getKey()).setInteger(2, firstResult).setInteger(3,maxResults).list();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
//安卓用户
|
||||||
|
else if(PushTypeEnum.all_android_push.getKey().equals(pushType)){
|
||||||
|
String sql = "select user_id from tbl_user where login_type=? and is_register_netease=? limit ?,?";
|
||||||
|
List<Integer> list = this.getSession().createSQLQuery(sql).setString(0, PhoneTypeEnum.android.getKey()).setString(1, BooleanEnum.YES.getKey()).setInteger(2, firstResult).setInteger(3,maxResults).list();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
//IOS用户
|
||||||
|
else if(PushTypeEnum.all_ios_push.getKey().equals(pushType)){
|
||||||
|
String sql = "select user_id from tbl_user where login_type=? and is_register_netease=? limit ?,?";
|
||||||
|
List<Integer> list = this.getSession().createSQLQuery(sql).setString(0, PhoneTypeEnum.ios.getKey()).setString(1, BooleanEnum.YES.getKey()).setInteger(2, firstResult).setInteger(3,maxResults).list();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
//所有用户
|
||||||
|
else if(PushTypeEnum.all_push.getKey().equals(pushType)){
|
||||||
|
String sql = "select user_id from tbl_user where is_register_netease=? limit ?,?";
|
||||||
|
List<Integer> list = this.getSession().createSQLQuery(sql).setString(0, BooleanEnum.YES.getKey()).setInteger(1, firstResult).setInteger(2,maxResults).list();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
return new ArrayList<Integer>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.VenderListDao;
|
||||||
|
import com.ifish.entity.VenderList;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: VenderDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("venderListDao")
|
||||||
|
public class VenderListDaoImpl extends HibernateBaseDao<VenderList, String> implements VenderListDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<VenderList> getEntityClass() {
|
||||||
|
return VenderList.class;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ifish.daoImpl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ifish.dao.VersionDao;
|
||||||
|
import com.ifish.entity.Version;
|
||||||
|
import com.ifish.hibernate.HibernateBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: VersionDaoImpl
|
||||||
|
* @Description: TODO
|
||||||
|
* @author ggw
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository("versionDao")
|
||||||
|
public class VersionDaoImpl extends HibernateBaseDao<Version, Integer> implements VersionDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<Version> getEntityClass() {
|
||||||
|
return Version.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.ifish.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigInteger;
|
||||||
|
|
||||||
|
public class AuthorizeData implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 5263306261655399009L;
|
||||||
|
//授权日期
|
||||||
|
private String authorizeDate;
|
||||||
|
//设备数量
|
||||||
|
private BigInteger deviceNumber;
|
||||||
|
//占比
|
||||||
|
private String devicePrec;
|
||||||
|
|
||||||
|
public BigInteger getDeviceNumber() {
|
||||||
|
return deviceNumber;
|
||||||
|
}
|
||||||
|
public void setDeviceNumber(BigInteger deviceNumber) {
|
||||||
|
this.deviceNumber = deviceNumber;
|
||||||
|
}
|
||||||
|
public String getDevicePrec() {
|
||||||
|
return devicePrec;
|
||||||
|
}
|
||||||
|
public void setDevicePrec(String devicePrec) {
|
||||||
|
this.devicePrec = devicePrec;
|
||||||
|
}
|
||||||
|
public String getAuthorizeDate() {
|
||||||
|
return authorizeDate;
|
||||||
|
}
|
||||||
|
public void setAuthorizeDate(String authorizeDate) {
|
||||||
|
this.authorizeDate = authorizeDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.ifish.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigInteger;
|
||||||
|
|
||||||
|
public class FactoryData implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 5263306261655399009L;
|
||||||
|
//电子厂型号
|
||||||
|
private String factoryCode;
|
||||||
|
//电子厂名称
|
||||||
|
private String factoryName;
|
||||||
|
//设备数量
|
||||||
|
private BigInteger deviceNumber;
|
||||||
|
//占比
|
||||||
|
private String devicePrec;
|
||||||
|
|
||||||
|
public String getFactoryCode() {
|
||||||
|
return factoryCode;
|
||||||
|
}
|
||||||
|
public void setFactoryCode(String factoryCode) {
|
||||||
|
this.factoryCode = factoryCode;
|
||||||
|
}
|
||||||
|
public String getFactoryName() {
|
||||||
|
return factoryName;
|
||||||
|
}
|
||||||
|
public void setFactoryName(String factoryName) {
|
||||||
|
this.factoryName = factoryName;
|
||||||
|
}
|
||||||
|
public BigInteger getDeviceNumber() {
|
||||||
|
return deviceNumber;
|
||||||
|
}
|
||||||
|
public void setDeviceNumber(BigInteger deviceNumber) {
|
||||||
|
this.deviceNumber = deviceNumber;
|
||||||
|
}
|
||||||
|
public String getDevicePrec() {
|
||||||
|
return devicePrec;
|
||||||
|
}
|
||||||
|
public void setDevicePrec(String devicePrec) {
|
||||||
|
this.devicePrec = devicePrec;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.ifish.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class FactoryRecordData implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 5263306261655399009L;
|
||||||
|
//电子厂型号
|
||||||
|
private String factoryCode;
|
||||||
|
//电子厂名称
|
||||||
|
private String factoryName;
|
||||||
|
//设备数量
|
||||||
|
private Object deviceNumber;
|
||||||
|
//占比
|
||||||
|
private String devicePrec;
|
||||||
|
|
||||||
|
public String getFactoryCode() {
|
||||||
|
return factoryCode;
|
||||||
|
}
|
||||||
|
public void setFactoryCode(String factoryCode) {
|
||||||
|
this.factoryCode = factoryCode;
|
||||||
|
}
|
||||||
|
public String getFactoryName() {
|
||||||
|
return factoryName;
|
||||||
|
}
|
||||||
|
public void setFactoryName(String factoryName) {
|
||||||
|
this.factoryName = factoryName;
|
||||||
|
}
|
||||||
|
public Object getDeviceNumber() {
|
||||||
|
return deviceNumber;
|
||||||
|
}
|
||||||
|
public void setDeviceNumber(Object deviceNumber) {
|
||||||
|
this.deviceNumber = deviceNumber;
|
||||||
|
}
|
||||||
|
public String getDevicePrec() {
|
||||||
|
return devicePrec;
|
||||||
|
}
|
||||||
|
public void setDevicePrec(String devicePrec) {
|
||||||
|
this.devicePrec = devicePrec;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.ifish.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigInteger;
|
||||||
|
|
||||||
|
public class HardwareTypeData implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 5263306261655399009L;
|
||||||
|
//硬件类型编号
|
||||||
|
private String hardwareType;
|
||||||
|
//硬件类型名称
|
||||||
|
private String hardwareName;
|
||||||
|
//设备数量
|
||||||
|
private BigInteger deviceNumber;
|
||||||
|
//占比
|
||||||
|
private String devicePrec;
|
||||||
|
|
||||||
|
public BigInteger getDeviceNumber() {
|
||||||
|
return deviceNumber;
|
||||||
|
}
|
||||||
|
public void setDeviceNumber(BigInteger deviceNumber) {
|
||||||
|
this.deviceNumber = deviceNumber;
|
||||||
|
}
|
||||||
|
public String getDevicePrec() {
|
||||||
|
return devicePrec;
|
||||||
|
}
|
||||||
|
public void setDevicePrec(String devicePrec) {
|
||||||
|
this.devicePrec = devicePrec;
|
||||||
|
}
|
||||||
|
public String getHardwareType() {
|
||||||
|
return hardwareType;
|
||||||
|
}
|
||||||
|
public void setHardwareType(String hardwareType) {
|
||||||
|
this.hardwareType = hardwareType;
|
||||||
|
}
|
||||||
|
public String getHardwareName() {
|
||||||
|
return hardwareName;
|
||||||
|
}
|
||||||
|
public void setHardwareName(String hardwareName) {
|
||||||
|
this.hardwareName = hardwareName;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.ifish.domain;
|
||||||
|
|
||||||
|
import com.ifish.enums.SysUserEnum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* json结果
|
||||||
|
* @author Administrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class JsonResult {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否隐藏弹出框
|
||||||
|
*/
|
||||||
|
private boolean isHide;
|
||||||
|
/**
|
||||||
|
* 结果
|
||||||
|
*/
|
||||||
|
private String result;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信息
|
||||||
|
*/
|
||||||
|
private String msg;
|
||||||
|
|
||||||
|
public JsonResult() {}
|
||||||
|
|
||||||
|
public JsonResult(boolean isHide, String result, String msg) {
|
||||||
|
this.isHide = isHide;
|
||||||
|
this.result = result;
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JsonResult(SysUserEnum senum,boolean isHide) {
|
||||||
|
this.result = senum.getKey();
|
||||||
|
this.msg = senum.getValue();
|
||||||
|
this.isHide = isHide;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResult() {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
public void setResult(String result) {
|
||||||
|
this.result = result;
|
||||||
|
}
|
||||||
|
public String getMsg() {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
public void setMsg(String msg) {
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
public boolean getIsHide() {
|
||||||
|
return isHide;
|
||||||
|
}
|
||||||
|
public void setIsHide(boolean isHide) {
|
||||||
|
this.isHide = isHide;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.ifish.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class RecordData implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 5263306261655399009L;
|
||||||
|
//日期
|
||||||
|
private String date;
|
||||||
|
//设备数量
|
||||||
|
private Object deviceNumber;
|
||||||
|
//占比
|
||||||
|
private String devicePrec;
|
||||||
|
|
||||||
|
public String getDate() {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
public void setDate(String date) {
|
||||||
|
this.date = date;
|
||||||
|
}
|
||||||
|
public Object getDeviceNumber() {
|
||||||
|
return deviceNumber;
|
||||||
|
}
|
||||||
|
public void setDeviceNumber(Object deviceNumber) {
|
||||||
|
this.deviceNumber = deviceNumber;
|
||||||
|
}
|
||||||
|
public String getDevicePrec() {
|
||||||
|
return devicePrec;
|
||||||
|
}
|
||||||
|
public void setDevicePrec(String devicePrec) {
|
||||||
|
this.devicePrec = devicePrec;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.ifish.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigInteger;
|
||||||
|
|
||||||
|
public class VenderData implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 5263306261655399009L;
|
||||||
|
//鱼缸厂编号
|
||||||
|
private String brandCode;
|
||||||
|
//鱼缸厂名称
|
||||||
|
private String brandName;
|
||||||
|
//设备数量
|
||||||
|
private BigInteger deviceNumber;
|
||||||
|
//占比
|
||||||
|
private String devicePrec;
|
||||||
|
|
||||||
|
public String getBrandCode() {
|
||||||
|
return brandCode;
|
||||||
|
}
|
||||||
|
public void setBrandCode(String brandCode) {
|
||||||
|
this.brandCode = brandCode;
|
||||||
|
}
|
||||||
|
public String getBrandName() {
|
||||||
|
return brandName;
|
||||||
|
}
|
||||||
|
public void setBrandName(String brandName) {
|
||||||
|
this.brandName = brandName;
|
||||||
|
}
|
||||||
|
public BigInteger getDeviceNumber() {
|
||||||
|
return deviceNumber;
|
||||||
|
}
|
||||||
|
public void setDeviceNumber(BigInteger deviceNumber) {
|
||||||
|
this.deviceNumber = deviceNumber;
|
||||||
|
}
|
||||||
|
public String getDevicePrec() {
|
||||||
|
return devicePrec;
|
||||||
|
}
|
||||||
|
public void setDevicePrec(String devicePrec) {
|
||||||
|
this.devicePrec = devicePrec;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue