zsx 5 months ago
parent 6f1b65c49a
commit 3f932d076a

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="jspmngad7" />
</profile>
</annotationProcessing>
</component>
</project>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/webapp"/>
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="target/m2e-wtp/web-resources"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>

@ -0,0 +1,5 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8

@ -0,0 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.7

@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="spring-schema">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<property name="java-output-path" value="/mybatisplus-spring-mvc/target/classes"/>
<property name="context-root" value="spring-schema"/>
</wb-module>
</project-modules>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>

@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary

@ -0,0 +1,2 @@
disabled=06target
eclipse.preferences.version=1

@ -0,0 +1,289 @@
<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>com.jlwl</groupId>
<artifactId>jspmngad7</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>5.0.0.RELEASE</spring.version>
<junit.version>4.12</junit.version>
<druid.version>1.1.0</druid.version>
<fastjson.version>1.2.8</fastjson.version>
<mybaitsplus.version>2.3</mybaitsplus.version>
<mysql.version>8.0.32</mysql.version>
<log4j.version>1.2.17</log4j.version>
<slf4j.version>1.7.19</slf4j.version>
<aspectjweaver.version>1.8.8</aspectjweaver.version>
<fileupload.version>1.3.1</fileupload.version>
<jstl.version>1.2</jstl.version>
</properties>
<dependencies>
<!-- JUnit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<!-- Spring MVC -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<!-- AOP -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectjweaver.version}</version>
</dependency>
<!-- FileUpload -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${fileupload.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>${jstl.version}</version>
</dependency>
<!-- Mybatis-Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>${mybaitsplus.version}</version>
</dependency>
<!-- Mysql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<scope>4.0</scope>
<version>4.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>6.2.0.jre8</version>
<scope>runtime</scope>
</dependency>
<!-- Druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>${druid.version}</version>
</dependency>
<!-- FastJson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!-- Log -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>4.0.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-core -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>9.0.29</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.8.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet.jsp/jsp-api -->
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<!-- 百度人工智能 -->
<dependency>
<groupId>com.baidu.aip</groupId>
<artifactId>java-sdk</artifactId>
<version>4.4.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.11</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.9</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-jasper -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<version>9.0.27</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<!-- 项目访问名称 -->
<finalName>jspmngad7</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,15 @@
package com.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
*
*/
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface APPLoginUser {
}

@ -0,0 +1,13 @@
package com.annotation;
import java.lang.annotation.*;
/**
* Token
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface IgnoreAuth {
}

@ -0,0 +1,15 @@
package com.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
*
*/
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface LoginUser {
}

@ -0,0 +1,28 @@
package com.config;
import java.util.Date;
import org.apache.ibatis.reflection.MetaObject;
import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
/**
*
*/
public class MyMetaObjectHandler extends MetaObjectHandler {
@Override
public void insertFill(MetaObject metaObject) {
this.setFieldValByName("ctime", new Date(), metaObject);
}
@Override
public boolean openUpdateFill() {
return false;
}
@Override
public void updateFill(MetaObject metaObject) {
// 关闭更新填充、这里不执行
}
}

@ -0,0 +1,242 @@
package com.controller;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.AddressEntity;
import com.entity.view.AddressView;
import com.service.AddressService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
/**
*
*
* @author
* @email
* @date
*/
@RestController
@RequestMapping("/address")
public class AddressController {
@Autowired
private AddressService addressService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,AddressEntity address,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
address.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<AddressEntity> ew = new EntityWrapper<AddressEntity>();
PageUtils page = addressService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, address), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,AddressEntity address,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
address.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<AddressEntity> ew = new EntityWrapper<AddressEntity>();
PageUtils page = addressService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, address), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( AddressEntity address){
EntityWrapper<AddressEntity> ew = new EntityWrapper<AddressEntity>();
ew.allEq(MPUtil.allEQMapPre( address, "address"));
return R.ok().put("data", addressService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(AddressEntity address){
EntityWrapper< AddressEntity> ew = new EntityWrapper< AddressEntity>();
ew.allEq(MPUtil.allEQMapPre( address, "address"));
AddressView addressView = addressService.selectView(ew);
return R.ok("查询地址成功").put("data", addressView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
AddressEntity address = addressService.selectById(id);
return R.ok().put("data", address);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
AddressEntity address = addressService.selectById(id);
return R.ok().put("data", address);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody AddressEntity address, HttpServletRequest request){
address.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(address);
address.setUserid((Long)request.getSession().getAttribute("userId"));
Long userId = (Long)request.getSession().getAttribute("userId");
if(address.getIsdefault().equals("是")) {
addressService.updateForSet("isdefault='否'", new EntityWrapper<AddressEntity>().eq("userid", userId));
}
address.setUserid(userId);
addressService.insert(address);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody AddressEntity address, HttpServletRequest request){
address.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(address);
address.setUserid((Long)request.getSession().getAttribute("userId"));
Long userId = (Long)request.getSession().getAttribute("userId");
if(address.getIsdefault().equals("是")) {
addressService.updateForSet("isdefault='否'", new EntityWrapper<AddressEntity>().eq("userid", userId));
}
address.setUserid(userId);
addressService.insert(address);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody AddressEntity address, HttpServletRequest request){
//ValidatorUtils.validateEntity(address);
if(address.getIsdefault().equals("是")) {
addressService.updateForSet("isdefault='否'", new EntityWrapper<AddressEntity>().eq("userid", request.getSession().getAttribute("userId")));
}
addressService.updateById(address);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/default")
public R defaultAddress(HttpServletRequest request){
Wrapper<AddressEntity> wrapper = new EntityWrapper<AddressEntity>().eq("isdefault", "是").eq("userid", request.getSession().getAttribute("userId"));
AddressEntity address = addressService.selectOne(wrapper);
return R.ok().put("data", address);
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
addressService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<AddressEntity> wrapper = new EntityWrapper<AddressEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
wrapper.eq("userid", (Long)request.getSession().getAttribute("userId"));
}
int count = addressService.selectCount(wrapper);
return R.ok().put("count", count);
}
}

@ -0,0 +1,211 @@
package com.controller;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.annotation.IgnoreAuth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.AuctionxianzhiwupinEntity;
import com.entity.view.AuctionxianzhiwupinView;
import com.service.AuctionxianzhiwupinService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
/**
*
*
* @author
* @email
* @date
*/
@RestController
@RequestMapping("/auctionxianzhiwupin")
public class AuctionxianzhiwupinController {
@Autowired
private AuctionxianzhiwupinService auctionxianzhiwupinService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,AuctionxianzhiwupinEntity auctionxianzhiwupin,
HttpServletRequest request){
EntityWrapper<AuctionxianzhiwupinEntity> ew = new EntityWrapper<AuctionxianzhiwupinEntity>();
PageUtils page = auctionxianzhiwupinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, auctionxianzhiwupin), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,AuctionxianzhiwupinEntity auctionxianzhiwupin,
HttpServletRequest request){
EntityWrapper<AuctionxianzhiwupinEntity> ew = new EntityWrapper<AuctionxianzhiwupinEntity>();
PageUtils page = auctionxianzhiwupinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, auctionxianzhiwupin), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( AuctionxianzhiwupinEntity auctionxianzhiwupin){
EntityWrapper<AuctionxianzhiwupinEntity> ew = new EntityWrapper<AuctionxianzhiwupinEntity>();
ew.allEq(MPUtil.allEQMapPre( auctionxianzhiwupin, "auctionxianzhiwupin"));
return R.ok().put("data", auctionxianzhiwupinService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(AuctionxianzhiwupinEntity auctionxianzhiwupin){
EntityWrapper< AuctionxianzhiwupinEntity> ew = new EntityWrapper< AuctionxianzhiwupinEntity>();
ew.allEq(MPUtil.allEQMapPre( auctionxianzhiwupin, "auctionxianzhiwupin"));
AuctionxianzhiwupinView auctionxianzhiwupinView = auctionxianzhiwupinService.selectView(ew);
return R.ok("查询闲置物品竞拍记录表成功").put("data", auctionxianzhiwupinView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
AuctionxianzhiwupinEntity auctionxianzhiwupin = auctionxianzhiwupinService.selectById(id);
return R.ok().put("data", auctionxianzhiwupin);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
AuctionxianzhiwupinEntity auctionxianzhiwupin = auctionxianzhiwupinService.selectById(id);
return R.ok().put("data", auctionxianzhiwupin);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody AuctionxianzhiwupinEntity auctionxianzhiwupin, HttpServletRequest request){
auctionxianzhiwupin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(auctionxianzhiwupin);
auctionxianzhiwupinService.insert(auctionxianzhiwupin);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody AuctionxianzhiwupinEntity auctionxianzhiwupin, HttpServletRequest request){
auctionxianzhiwupin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(auctionxianzhiwupin);
List<AuctionxianzhiwupinEntity> alist = auctionxianzhiwupinService.selectList(new EntityWrapper<AuctionxianzhiwupinEntity>().eq("refid", auctionxianzhiwupin.getRefid()));
if(alist!=null && alist.size()>0) {
for(AuctionxianzhiwupinEntity a : alist) {
a.setAuctionstatus("出局");
}
auctionxianzhiwupinService.updateBatchById(alist);
}
auctionxianzhiwupinService.insert(auctionxianzhiwupin);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody AuctionxianzhiwupinEntity auctionxianzhiwupin, HttpServletRequest request){
//ValidatorUtils.validateEntity(auctionxianzhiwupin);
auctionxianzhiwupinService.updateById(auctionxianzhiwupin);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
auctionxianzhiwupinService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<AuctionxianzhiwupinEntity> wrapper = new EntityWrapper<AuctionxianzhiwupinEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = auctionxianzhiwupinService.selectCount(wrapper);
return R.ok().put("count", count);
}
}

@ -0,0 +1,216 @@
package com.controller;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.annotation.IgnoreAuth;
import com.baidu.aip.face.AipFace;
import com.service.CommonService;
import com.service.ConfigService;
import com.utils.R;
/**
*
*/
@RestController
public class CommonController{
@Autowired
private CommonService commonService;
private static AipFace client = null;
@Autowired
private ConfigService configService;
/**
* tablecolumn()
* @param table
* @param column
* @return
*/
@RequestMapping("/option/{tableName}/{columnName}")
@IgnoreAuth
public R getOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName,@RequestParam(required = false) String conditionColumn,@RequestParam(required = false) String conditionValue,String level,String parent) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
if(StringUtils.isNotBlank(level)) {
params.put("level", level);
}
if(StringUtils.isNotBlank(parent)) {
params.put("parent", parent);
}
if(StringUtils.isNotBlank(conditionColumn)) {
params.put("conditionColumn", conditionColumn);
}
if(StringUtils.isNotBlank(conditionValue)) {
params.put("conditionValue", conditionValue);
}
List<String> data = commonService.getOption(params);
return R.ok().put("data", data);
}
/**
* tablecolumn
* @param table
* @param column
* @return
*/
@RequestMapping("/follow/{tableName}/{columnName}")
@IgnoreAuth
public R getFollowByOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName, @RequestParam String columnValue) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
params.put("columnValue", columnValue);
Map<String, Object> result = commonService.getFollowByOption(params);
return R.ok().put("data", result);
}
/**
* tablesfsh
* @param table
* @param map
* @return
*/
@RequestMapping("/sh/{tableName}")
public R sh(@PathVariable("tableName") String tableName, @RequestBody Map<String, Object> map) {
map.put("table", tableName);
commonService.sh(map);
return R.ok();
}
/**
*
* @param tableName
* @param columnName
* @param type 1: 2:
* @param map
* @return
*/
@RequestMapping("/remind/{tableName}/{columnName}/{type}")
@IgnoreAuth
public R remindCount(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("table", tableName);
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
int count = commonService.remindCount(map);
return R.ok().put("count", count);
}
/**
*
*/
@RequestMapping("/cal/{tableName}/{columnName}")
@IgnoreAuth
public R cal(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
Map<String, Object> result = commonService.selectCal(params);
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/group/{tableName}/{columnName}")
@IgnoreAuth
public R group(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
List<Map<String, Object>> result = commonService.selectGroup(params);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}")
@IgnoreAuth
public R value(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
List<Map<String, Object>> result = commonService.selectValue(params);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}/{timeStatType}")
public R valueDay(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
params.put("timeStatType", timeStatType);
List<Map<String, Object>> result = commonService.selectTimeStatValue(params);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
}

@ -0,0 +1,111 @@
package com.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.service.ConfigService;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
/**
*
*/
@RequestMapping("config")
@RestController
public class ConfigController{
@Autowired
private ConfigService configService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ConfigEntity config){
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
PageUtils page = configService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), params));
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ConfigEntity config){
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
PageUtils page = configService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), params));
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
ConfigEntity config = configService.selectById(id);
return R.ok().put("data", config);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") String id){
ConfigEntity config = configService.selectById(id);
return R.ok().put("data", config);
}
/**
* name
*/
@RequestMapping("/info")
public R infoByName(@RequestParam String name){
ConfigEntity config = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
return R.ok().put("data", config);
}
/**
*
*/
@PostMapping("/save")
public R save(@RequestBody ConfigEntity config){
// ValidatorUtils.validateEntity(config);
configService.insert(config);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody ConfigEntity config){
// ValidatorUtils.validateEntity(config);
configService.updateById(config);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
configService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}

@ -0,0 +1,217 @@
package com.controller;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.DiscussxianzhiwupinEntity;
import com.entity.view.DiscussxianzhiwupinView;
import com.service.DiscussxianzhiwupinService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
/**
*
*
* @author
* @email
* @date
*/
@RestController
@RequestMapping("/discussxianzhiwupin")
public class DiscussxianzhiwupinController {
@Autowired
private DiscussxianzhiwupinService discussxianzhiwupinService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,DiscussxianzhiwupinEntity discussxianzhiwupin,
HttpServletRequest request){
EntityWrapper<DiscussxianzhiwupinEntity> ew = new EntityWrapper<DiscussxianzhiwupinEntity>();
PageUtils page = discussxianzhiwupinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discussxianzhiwupin), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,DiscussxianzhiwupinEntity discussxianzhiwupin,
HttpServletRequest request){
EntityWrapper<DiscussxianzhiwupinEntity> ew = new EntityWrapper<DiscussxianzhiwupinEntity>();
PageUtils page = discussxianzhiwupinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discussxianzhiwupin), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( DiscussxianzhiwupinEntity discussxianzhiwupin){
EntityWrapper<DiscussxianzhiwupinEntity> ew = new EntityWrapper<DiscussxianzhiwupinEntity>();
ew.allEq(MPUtil.allEQMapPre( discussxianzhiwupin, "discussxianzhiwupin"));
return R.ok().put("data", discussxianzhiwupinService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(DiscussxianzhiwupinEntity discussxianzhiwupin){
EntityWrapper< DiscussxianzhiwupinEntity> ew = new EntityWrapper< DiscussxianzhiwupinEntity>();
ew.allEq(MPUtil.allEQMapPre( discussxianzhiwupin, "discussxianzhiwupin"));
DiscussxianzhiwupinView discussxianzhiwupinView = discussxianzhiwupinService.selectView(ew);
return R.ok("查询闲置物品评论表成功").put("data", discussxianzhiwupinView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
DiscussxianzhiwupinEntity discussxianzhiwupin = discussxianzhiwupinService.selectById(id);
return R.ok().put("data", discussxianzhiwupin);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
DiscussxianzhiwupinEntity discussxianzhiwupin = discussxianzhiwupinService.selectById(id);
return R.ok().put("data", discussxianzhiwupin);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody DiscussxianzhiwupinEntity discussxianzhiwupin, HttpServletRequest request){
discussxianzhiwupin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(discussxianzhiwupin);
discussxianzhiwupinService.insert(discussxianzhiwupin);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody DiscussxianzhiwupinEntity discussxianzhiwupin, HttpServletRequest request){
discussxianzhiwupin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(discussxianzhiwupin);
discussxianzhiwupinService.insert(discussxianzhiwupin);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody DiscussxianzhiwupinEntity discussxianzhiwupin, HttpServletRequest request){
//ValidatorUtils.validateEntity(discussxianzhiwupin);
discussxianzhiwupinService.updateById(discussxianzhiwupin);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
discussxianzhiwupinService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<DiscussxianzhiwupinEntity> wrapper = new EntityWrapper<DiscussxianzhiwupinEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = discussxianzhiwupinService.selectCount(wrapper);
return R.ok().put("count", count);
}
}

@ -0,0 +1,90 @@
package com.controller;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;
/**
*
*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
@Autowired
private ConfigService configService;
/**
*
*/
@RequestMapping("/upload")
@IgnoreAuth
public R upload(@RequestParam("file") MultipartFile file, String type,HttpServletRequest request) throws Exception {
if (file.isEmpty()) {
throw new EIException("上传文件不能为空");
}
String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
String fileName = new Date().getTime()+"."+fileExt;
File dest = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
file.transferTo(dest);
/**
* 使ideaeclipse
* "D:\\ssmpiv99\\src\\main\\webapp\\upload"upload
*
*/
FileUtils.copyFile(dest, new File("D:\\code\\jspmngad7\\src\\main\\webapp\\upload"+"/"+fileName)); /**修改了路径以后请将该行最前面的//注释去掉**/
if(StringUtils.isNotBlank(type) && type.equals("1")) {
ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
if(configEntity==null) {
configEntity = new ConfigEntity();
configEntity.setName("faceFile");
configEntity.setValue(fileName);
} else {
configEntity.setValue(fileName);
}
configService.insertOrUpdate(configEntity);
}
return R.ok().put("file", fileName);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/download")
public void download(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) {
try {
File file = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
if (file.exists()) {
response.reset();
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName+"\"");
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Access-Control-Allow-Credentials", "true");
response.setContentType("application/octet-stream; charset=UTF-8");
IOUtils.write(FileUtils.readFileToByteArray(file), response.getOutputStream());
}
} catch (IOException e) {
e.printStackTrace();
}
}
}

@ -0,0 +1,217 @@
package com.controller;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.NewsEntity;
import com.entity.view.NewsView;
import com.service.NewsService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
/**
*
*
* @author
* @email
* @date
*/
@RestController
@RequestMapping("/news")
public class NewsController {
@Autowired
private NewsService newsService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,NewsEntity news,
HttpServletRequest request){
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,NewsEntity news,
HttpServletRequest request){
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( NewsEntity news){
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
ew.allEq(MPUtil.allEQMapPre( news, "news"));
return R.ok().put("data", newsService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(NewsEntity news){
EntityWrapper< NewsEntity> ew = new EntityWrapper< NewsEntity>();
ew.allEq(MPUtil.allEQMapPre( news, "news"));
NewsView newsView = newsService.selectView(ew);
return R.ok("查询校园资讯成功").put("data", newsView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
NewsEntity news = newsService.selectById(id);
return R.ok().put("data", news);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
NewsEntity news = newsService.selectById(id);
return R.ok().put("data", news);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody NewsEntity news, HttpServletRequest request){
news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(news);
newsService.insert(news);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody NewsEntity news, HttpServletRequest request){
news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(news);
newsService.insert(news);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody NewsEntity news, HttpServletRequest request){
//ValidatorUtils.validateEntity(news);
newsService.updateById(news);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
newsService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<NewsEntity> wrapper = new EntityWrapper<NewsEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = newsService.selectCount(wrapper);
return R.ok().put("count", count);
}
}

@ -0,0 +1,317 @@
package com.controller;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.annotation.IgnoreAuth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.OrdersEntity;
import com.entity.view.OrdersView;
import com.service.OrdersService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
/**
*
*
* @author
* @email
* @date
*/
@RestController
@RequestMapping("/orders")
public class OrdersController {
@Autowired
private OrdersService ordersService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,OrdersEntity orders,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
orders.setUserid((Long)request.getSession().getAttribute("userId"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
orders.setZhanghao((String)request.getSession().getAttribute("username"));
if(orders.getUserid()!=null) {
orders.setUserid(null);
}
}
EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();
PageUtils page = ordersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, orders), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,OrdersEntity orders,
HttpServletRequest request){
EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();
PageUtils page = ordersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, orders), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( OrdersEntity orders){
EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();
ew.allEq(MPUtil.allEQMapPre( orders, "orders"));
return R.ok().put("data", ordersService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(OrdersEntity orders){
EntityWrapper< OrdersEntity> ew = new EntityWrapper< OrdersEntity>();
ew.allEq(MPUtil.allEQMapPre( orders, "orders"));
OrdersView ordersView = ordersService.selectView(ew);
return R.ok("查询订单成功").put("data", ordersView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
OrdersEntity orders = ordersService.selectById(id);
return R.ok().put("data", orders);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
OrdersEntity orders = ordersService.selectById(id);
return R.ok().put("data", orders);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody OrdersEntity orders, HttpServletRequest request){
orders.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(orders);
orders.setUserid((Long)request.getSession().getAttribute("userId"));
ordersService.insert(orders);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody OrdersEntity orders, HttpServletRequest request){
orders.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(orders);
ordersService.insert(orders);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody OrdersEntity orders, HttpServletRequest request){
//ValidatorUtils.validateEntity(orders);
ordersService.updateById(orders);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
ordersService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<OrdersEntity> wrapper = new EntityWrapper<OrdersEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
wrapper.eq("userid", (Long)request.getSession().getAttribute("userId"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}
int count = ordersService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
*
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}")
public R value(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
ew.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}
ew.in("status", new String[]{"已支付","已发货","已完成"});
List<Map<String, Object>> result = ordersService.selectValue(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}/{timeStatType}")
public R valueDay(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
params.put("timeStatType", timeStatType);
EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
ew.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}
ew.in("status", new String[]{"已支付","已发货","已完成"});
List<Map<String, Object>> result = ordersService.selectTimeStatValue(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/group/{columnName}")
public R group(@PathVariable("columnName") String columnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("column", columnName);
EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
ew.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}
ew.in("status", new String[]{"已支付","已发货","已完成"});
List<Map<String, Object>> result = ordersService.selectGroup(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
}

@ -0,0 +1,217 @@
package com.controller;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.ShangpinleixingEntity;
import com.entity.view.ShangpinleixingView;
import com.service.ShangpinleixingService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
/**
*
*
* @author
* @email
* @date
*/
@RestController
@RequestMapping("/shangpinleixing")
public class ShangpinleixingController {
@Autowired
private ShangpinleixingService shangpinleixingService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ShangpinleixingEntity shangpinleixing,
HttpServletRequest request){
EntityWrapper<ShangpinleixingEntity> ew = new EntityWrapper<ShangpinleixingEntity>();
PageUtils page = shangpinleixingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shangpinleixing), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ShangpinleixingEntity shangpinleixing,
HttpServletRequest request){
EntityWrapper<ShangpinleixingEntity> ew = new EntityWrapper<ShangpinleixingEntity>();
PageUtils page = shangpinleixingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shangpinleixing), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( ShangpinleixingEntity shangpinleixing){
EntityWrapper<ShangpinleixingEntity> ew = new EntityWrapper<ShangpinleixingEntity>();
ew.allEq(MPUtil.allEQMapPre( shangpinleixing, "shangpinleixing"));
return R.ok().put("data", shangpinleixingService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(ShangpinleixingEntity shangpinleixing){
EntityWrapper< ShangpinleixingEntity> ew = new EntityWrapper< ShangpinleixingEntity>();
ew.allEq(MPUtil.allEQMapPre( shangpinleixing, "shangpinleixing"));
ShangpinleixingView shangpinleixingView = shangpinleixingService.selectView(ew);
return R.ok("查询商品类型成功").put("data", shangpinleixingView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ShangpinleixingEntity shangpinleixing = shangpinleixingService.selectById(id);
return R.ok().put("data", shangpinleixing);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ShangpinleixingEntity shangpinleixing = shangpinleixingService.selectById(id);
return R.ok().put("data", shangpinleixing);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody ShangpinleixingEntity shangpinleixing, HttpServletRequest request){
shangpinleixing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shangpinleixing);
shangpinleixingService.insert(shangpinleixing);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody ShangpinleixingEntity shangpinleixing, HttpServletRequest request){
shangpinleixing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shangpinleixing);
shangpinleixingService.insert(shangpinleixing);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody ShangpinleixingEntity shangpinleixing, HttpServletRequest request){
//ValidatorUtils.validateEntity(shangpinleixing);
shangpinleixingService.updateById(shangpinleixing);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
shangpinleixingService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<ShangpinleixingEntity> wrapper = new EntityWrapper<ShangpinleixingEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = shangpinleixingService.selectCount(wrapper);
return R.ok().put("count", count);
}
}

@ -0,0 +1,224 @@
package com.controller;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import com.annotation.IgnoreAuth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.StoreupEntity;
import com.entity.view.StoreupView;
import com.service.StoreupService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
/**
*
*
* @author
* @email
* @date
*/
@RestController
@RequestMapping("/storeup")
public class StoreupController {
@Autowired
private StoreupService storeupService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,StoreupEntity storeup,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,StoreupEntity storeup,
HttpServletRequest request){
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( StoreupEntity storeup){
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
ew.allEq(MPUtil.allEQMapPre( storeup, "storeup"));
return R.ok().put("data", storeupService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(StoreupEntity storeup){
EntityWrapper< StoreupEntity> ew = new EntityWrapper< StoreupEntity>();
ew.allEq(MPUtil.allEQMapPre( storeup, "storeup"));
StoreupView storeupView = storeupService.selectView(ew);
return R.ok("查询收藏表成功").put("data", storeupView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
StoreupEntity storeup = storeupService.selectById(id);
return R.ok().put("data", storeup);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
StoreupEntity storeup = storeupService.selectById(id);
return R.ok().put("data", storeup);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody StoreupEntity storeup, HttpServletRequest request){
storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(storeup);
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
storeupService.insert(storeup);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody StoreupEntity storeup, HttpServletRequest request){
storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(storeup);
storeupService.insert(storeup);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody StoreupEntity storeup, HttpServletRequest request){
//ValidatorUtils.validateEntity(storeup);
storeupService.updateById(storeup);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
storeupService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<StoreupEntity> wrapper = new EntityWrapper<StoreupEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
wrapper.eq("userid", (Long)request.getSession().getAttribute("userId"));
}
int count = storeupService.selectCount(wrapper);
return R.ok().put("count", count);
}
}

@ -0,0 +1,167 @@
package com.controller;
import java.util.Arrays;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.UsersEntity;
import com.service.TokenService;
import com.service.UsersService;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
/**
*
*/
@RequestMapping("users")
@RestController
public class UsersController{
@Autowired
private UsersService userService;
@Autowired
private TokenService tokenService;
/**
*
*/
@IgnoreAuth
@PostMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
if(user==null || !user.getPassword().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
return R.ok().put("token", token);
}
/**
*
*/
@IgnoreAuth
@PostMapping(value = "/register")
public R register(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
if(userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {
return R.error("用户已存在");
}
userService.insert(user);
return R.ok();
}
/**
* 退
*/
@GetMapping(value = "logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
if(user==null) {
return R.error("账号不存在");
}
user.setPassword("123456");
userService.update(user,null);
return R.ok("密码已重置为123456");
}
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,UsersEntity user){
EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();
PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/list")
public R list( UsersEntity user){
EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();
ew.allEq(MPUtil.allEQMapPre( user, "user"));
return R.ok().put("data", userService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
UsersEntity user = userService.selectById(id);
return R.ok().put("data", user);
}
/**
* session
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Long id = (Long)request.getSession().getAttribute("userId");
UsersEntity user = userService.selectById(id);
return R.ok().put("data", user);
}
/**
*
*/
@PostMapping("/save")
public R save(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
if(userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {
return R.error("用户已存在");
}
userService.insert(user);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
UsersEntity u = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername()));
if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {
return R.error("用户名已存在。");
}
userService.updateById(user);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
userService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}

@ -0,0 +1,286 @@
package com.controller;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.XianzhiwupinEntity;
import com.entity.view.XianzhiwupinView;
import com.service.XianzhiwupinService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
import com.service.StoreupService;
/**
*
*
* @author
* @email
* @date
*/
@RestController
@RequestMapping("/xianzhiwupin")
public class XianzhiwupinController {
@Autowired
private XianzhiwupinService xianzhiwupinService;
@Autowired
private StoreupService storeupService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,XianzhiwupinEntity xianzhiwupin,
@RequestParam(required = false) Double pricestart,
@RequestParam(required = false) Double priceend,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
xianzhiwupin.setZhanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<XianzhiwupinEntity> ew = new EntityWrapper<XianzhiwupinEntity>();
if(pricestart!=null) ew.ge("price", pricestart);
if(priceend!=null) ew.le("price", priceend);
PageUtils page = xianzhiwupinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xianzhiwupin), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,XianzhiwupinEntity xianzhiwupin,
@RequestParam(required = false) Double pricestart,
@RequestParam(required = false) Double priceend,
HttpServletRequest request){
EntityWrapper<XianzhiwupinEntity> ew = new EntityWrapper<XianzhiwupinEntity>();
if(pricestart!=null) ew.ge("price", pricestart);
if(priceend!=null) ew.le("price", priceend);
PageUtils page = xianzhiwupinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xianzhiwupin), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( XianzhiwupinEntity xianzhiwupin){
EntityWrapper<XianzhiwupinEntity> ew = new EntityWrapper<XianzhiwupinEntity>();
ew.allEq(MPUtil.allEQMapPre( xianzhiwupin, "xianzhiwupin"));
return R.ok().put("data", xianzhiwupinService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(XianzhiwupinEntity xianzhiwupin){
EntityWrapper< XianzhiwupinEntity> ew = new EntityWrapper< XianzhiwupinEntity>();
ew.allEq(MPUtil.allEQMapPre( xianzhiwupin, "xianzhiwupin"));
XianzhiwupinView xianzhiwupinView = xianzhiwupinService.selectView(ew);
return R.ok("查询闲置物品成功").put("data", xianzhiwupinView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
XianzhiwupinEntity xianzhiwupin = xianzhiwupinService.selectById(id);
xianzhiwupin.setClicknum(xianzhiwupin.getClicknum()+1);
xianzhiwupin.setClicktime(new Date());
xianzhiwupinService.updateById(xianzhiwupin);
return R.ok().put("data", xianzhiwupin);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
XianzhiwupinEntity xianzhiwupin = xianzhiwupinService.selectById(id);
xianzhiwupin.setClicknum(xianzhiwupin.getClicknum()+1);
xianzhiwupin.setClicktime(new Date());
xianzhiwupinService.updateById(xianzhiwupin);
return R.ok().put("data", xianzhiwupin);
}
/**
*
*/
@RequestMapping("/thumbsup/{id}")
public R vote(@PathVariable("id") String id,String type){
XianzhiwupinEntity xianzhiwupin = xianzhiwupinService.selectById(id);
if(type.equals("1")) {
xianzhiwupin.setThumbsupnum(xianzhiwupin.getThumbsupnum()+1);
} else {
xianzhiwupin.setCrazilynum(xianzhiwupin.getCrazilynum()+1);
}
xianzhiwupinService.updateById(xianzhiwupin);
return R.ok("投票成功");
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody XianzhiwupinEntity xianzhiwupin, HttpServletRequest request){
xianzhiwupin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(xianzhiwupin);
xianzhiwupinService.insert(xianzhiwupin);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody XianzhiwupinEntity xianzhiwupin, HttpServletRequest request){
xianzhiwupin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(xianzhiwupin);
xianzhiwupinService.insert(xianzhiwupin);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody XianzhiwupinEntity xianzhiwupin, HttpServletRequest request){
//ValidatorUtils.validateEntity(xianzhiwupin);
xianzhiwupinService.updateById(xianzhiwupin);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
xianzhiwupinService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<XianzhiwupinEntity> wrapper = new EntityWrapper<XianzhiwupinEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}
int count = xianzhiwupinService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map<String, Object> params,XianzhiwupinEntity xianzhiwupin, HttpServletRequest request,String pre){
EntityWrapper<XianzhiwupinEntity> ew = new EntityWrapper<XianzhiwupinEntity>();
Map<String, Object> newMap = new HashMap<String, Object>();
Map<String, Object> param = new HashMap<String, Object>();
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, Object> entry = it.next();
String key = entry.getKey();
String newKey = entry.getKey();
if (pre.endsWith(".")) {
newMap.put(pre + newKey, entry.getValue());
} else if (StringUtils.isEmpty(pre)) {
newMap.put(newKey, entry.getValue());
} else {
newMap.put(pre + "." + newKey, entry.getValue());
}
}
params.put("sort", "clicknum");
params.put("order", "desc");
PageUtils page = xianzhiwupinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xianzhiwupin), params), params));
return R.ok().put("data", page);
}
}

@ -0,0 +1,294 @@
package com.controller;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import com.annotation.IgnoreAuth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.YonghuEntity;
import com.entity.view.YonghuView;
import com.service.YonghuService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
/**
*
*
* @author
* @email
* @date
*/
@RestController
@RequestMapping("/yonghu")
public class YonghuController {
@Autowired
private YonghuService yonghuService;
@Autowired
private TokenService tokenService;
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("zhanghao", username));
if(u==null || !u.getMima().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(u.getId(), username,"yonghu", "用户" );
return R.ok().put("token", token);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/register")
public R register(@RequestBody YonghuEntity yonghu){
//ValidatorUtils.validateEntity(yonghu);
YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("zhanghao", yonghu.getZhanghao()));
if(u!=null) {
return R.error("注册用户已存在");
}
Long uId = new Date().getTime();
yonghu.setId(uId);
yonghuService.insert(yonghu);
return R.ok();
}
/**
* 退
*/
@RequestMapping("/logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
* session
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Long id = (Long)request.getSession().getAttribute("userId");
YonghuEntity u = yonghuService.selectById(id);
return R.ok().put("data", u);
}
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("zhanghao", username));
if(u==null) {
return R.error("账号不存在");
}
u.setMima("123456");
yonghuService.updateById(u);
return R.ok("密码已重置为123456");
}
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,YonghuEntity yonghu,
HttpServletRequest request){
EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,YonghuEntity yonghu,
HttpServletRequest request){
EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( YonghuEntity yonghu){
EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu"));
return R.ok().put("data", yonghuService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(YonghuEntity yonghu){
EntityWrapper< YonghuEntity> ew = new EntityWrapper< YonghuEntity>();
ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu"));
YonghuView yonghuView = yonghuService.selectView(ew);
return R.ok("查询用户成功").put("data", yonghuView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
YonghuEntity yonghu = yonghuService.selectById(id);
return R.ok().put("data", yonghu);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
YonghuEntity yonghu = yonghuService.selectById(id);
return R.ok().put("data", yonghu);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yonghu);
YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("zhanghao", yonghu.getZhanghao()));
if(u!=null) {
return R.error("用户已存在");
}
yonghu.setId(new Date().getTime());
yonghuService.insert(yonghu);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yonghu);
YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("zhanghao", yonghu.getZhanghao()));
if(u!=null) {
return R.error("用户已存在");
}
yonghu.setId(new Date().getTime());
yonghuService.insert(yonghu);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
//ValidatorUtils.validateEntity(yonghu);
yonghuService.updateById(yonghu);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
yonghuService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<YonghuEntity> wrapper = new EntityWrapper<YonghuEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = yonghuService.selectCount(wrapper);
return R.ok().put("count", count);
}
}

@ -0,0 +1,35 @@
package com.dao;
import com.entity.AddressEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.AddressVO;
import com.entity.view.AddressView;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public interface AddressDao extends BaseMapper<AddressEntity> {
List<AddressVO> selectListVO(@Param("ew") Wrapper<AddressEntity> wrapper);
AddressVO selectVO(@Param("ew") Wrapper<AddressEntity> wrapper);
List<AddressView> selectListView(@Param("ew") Wrapper<AddressEntity> wrapper);
List<AddressView> selectListView(Pagination page,@Param("ew") Wrapper<AddressEntity> wrapper);
AddressView selectView(@Param("ew") Wrapper<AddressEntity> wrapper);
}

@ -0,0 +1,35 @@
package com.dao;
import com.entity.AuctionxianzhiwupinEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.AuctionxianzhiwupinVO;
import com.entity.view.AuctionxianzhiwupinView;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public interface AuctionxianzhiwupinDao extends BaseMapper<AuctionxianzhiwupinEntity> {
List<AuctionxianzhiwupinVO> selectListVO(@Param("ew") Wrapper<AuctionxianzhiwupinEntity> wrapper);
AuctionxianzhiwupinVO selectVO(@Param("ew") Wrapper<AuctionxianzhiwupinEntity> wrapper);
List<AuctionxianzhiwupinView> selectListView(@Param("ew") Wrapper<AuctionxianzhiwupinEntity> wrapper);
List<AuctionxianzhiwupinView> selectListView(Pagination page,@Param("ew") Wrapper<AuctionxianzhiwupinEntity> wrapper);
AuctionxianzhiwupinView selectView(@Param("ew") Wrapper<AuctionxianzhiwupinEntity> wrapper);
}

@ -0,0 +1,28 @@
package com.dao;
import java.util.List;
import java.util.Map;
/**
*
*/
public interface CommonDao{
List<String> getOption(Map<String, Object> params);
Map<String, Object> getFollowByOption(Map<String, Object> params);
List<String> getFollowByOption2(Map<String, Object> params);
void sh(Map<String, Object> params);
int remindCount(Map<String, Object> params);
Map<String, Object> selectCal(Map<String, Object> params);
List<Map<String, Object>> selectGroup(Map<String, Object> params);
List<Map<String, Object>> selectValue(Map<String, Object> params);
List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params);
}

@ -0,0 +1,12 @@
package com.dao;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.entity.ConfigEntity;
/**
*
*/
public interface ConfigDao extends BaseMapper<ConfigEntity> {
}

@ -0,0 +1,35 @@
package com.dao;
import com.entity.DiscussxianzhiwupinEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.DiscussxianzhiwupinVO;
import com.entity.view.DiscussxianzhiwupinView;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public interface DiscussxianzhiwupinDao extends BaseMapper<DiscussxianzhiwupinEntity> {
List<DiscussxianzhiwupinVO> selectListVO(@Param("ew") Wrapper<DiscussxianzhiwupinEntity> wrapper);
DiscussxianzhiwupinVO selectVO(@Param("ew") Wrapper<DiscussxianzhiwupinEntity> wrapper);
List<DiscussxianzhiwupinView> selectListView(@Param("ew") Wrapper<DiscussxianzhiwupinEntity> wrapper);
List<DiscussxianzhiwupinView> selectListView(Pagination page,@Param("ew") Wrapper<DiscussxianzhiwupinEntity> wrapper);
DiscussxianzhiwupinView selectView(@Param("ew") Wrapper<DiscussxianzhiwupinEntity> wrapper);
}

@ -0,0 +1,35 @@
package com.dao;
import com.entity.NewsEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.NewsVO;
import com.entity.view.NewsView;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public interface NewsDao extends BaseMapper<NewsEntity> {
List<NewsVO> selectListVO(@Param("ew") Wrapper<NewsEntity> wrapper);
NewsVO selectVO(@Param("ew") Wrapper<NewsEntity> wrapper);
List<NewsView> selectListView(@Param("ew") Wrapper<NewsEntity> wrapper);
List<NewsView> selectListView(Pagination page,@Param("ew") Wrapper<NewsEntity> wrapper);
NewsView selectView(@Param("ew") Wrapper<NewsEntity> wrapper);
}

@ -0,0 +1,43 @@
package com.dao;
import com.entity.OrdersEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.OrdersVO;
import com.entity.view.OrdersView;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public interface OrdersDao extends BaseMapper<OrdersEntity> {
List<OrdersVO> selectListVO(@Param("ew") Wrapper<OrdersEntity> wrapper);
OrdersVO selectVO(@Param("ew") Wrapper<OrdersEntity> wrapper);
List<OrdersView> selectListView(@Param("ew") Wrapper<OrdersEntity> wrapper);
List<OrdersView> selectListView(Pagination page,@Param("ew") Wrapper<OrdersEntity> wrapper);
OrdersView selectView(@Param("ew") Wrapper<OrdersEntity> wrapper);
List<Map<String, Object>> selectValue(@Param("params") Map<String, Object> params,@Param("ew") Wrapper<OrdersEntity> wrapper);
List<Map<String, Object>> selectTimeStatValue(@Param("params") Map<String, Object> params,@Param("ew") Wrapper<OrdersEntity> wrapper);
List<Map<String, Object>> selectGroup(@Param("params") Map<String, Object> params,@Param("ew") Wrapper<OrdersEntity> wrapper);
}

@ -0,0 +1,35 @@
package com.dao;
import com.entity.ShangpinleixingEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.ShangpinleixingVO;
import com.entity.view.ShangpinleixingView;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public interface ShangpinleixingDao extends BaseMapper<ShangpinleixingEntity> {
List<ShangpinleixingVO> selectListVO(@Param("ew") Wrapper<ShangpinleixingEntity> wrapper);
ShangpinleixingVO selectVO(@Param("ew") Wrapper<ShangpinleixingEntity> wrapper);
List<ShangpinleixingView> selectListView(@Param("ew") Wrapper<ShangpinleixingEntity> wrapper);
List<ShangpinleixingView> selectListView(Pagination page,@Param("ew") Wrapper<ShangpinleixingEntity> wrapper);
ShangpinleixingView selectView(@Param("ew") Wrapper<ShangpinleixingEntity> wrapper);
}

@ -0,0 +1,35 @@
package com.dao;
import com.entity.StoreupEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.StoreupVO;
import com.entity.view.StoreupView;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public interface StoreupDao extends BaseMapper<StoreupEntity> {
List<StoreupVO> selectListVO(@Param("ew") Wrapper<StoreupEntity> wrapper);
StoreupVO selectVO(@Param("ew") Wrapper<StoreupEntity> wrapper);
List<StoreupView> selectListView(@Param("ew") Wrapper<StoreupEntity> wrapper);
List<StoreupView> selectListView(Pagination page,@Param("ew") Wrapper<StoreupEntity> wrapper);
StoreupView selectView(@Param("ew") Wrapper<StoreupEntity> wrapper);
}

@ -0,0 +1,22 @@
package com.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.entity.TokenEntity;
/**
* token
*/
public interface TokenDao extends BaseMapper<TokenEntity> {
List<TokenEntity> selectListView(@Param("ew") Wrapper<TokenEntity> wrapper);
List<TokenEntity> selectListView(Pagination page,@Param("ew") Wrapper<TokenEntity> wrapper);
}

@ -0,0 +1,22 @@
package com.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.entity.UsersEntity;
/**
*
*/
public interface UsersDao extends BaseMapper<UsersEntity> {
List<UsersEntity> selectListView(@Param("ew") Wrapper<UsersEntity> wrapper);
List<UsersEntity> selectListView(Pagination page,@Param("ew") Wrapper<UsersEntity> wrapper);
}

@ -0,0 +1,35 @@
package com.dao;
import com.entity.XianzhiwupinEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.XianzhiwupinVO;
import com.entity.view.XianzhiwupinView;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public interface XianzhiwupinDao extends BaseMapper<XianzhiwupinEntity> {
List<XianzhiwupinVO> selectListVO(@Param("ew") Wrapper<XianzhiwupinEntity> wrapper);
XianzhiwupinVO selectVO(@Param("ew") Wrapper<XianzhiwupinEntity> wrapper);
List<XianzhiwupinView> selectListView(@Param("ew") Wrapper<XianzhiwupinEntity> wrapper);
List<XianzhiwupinView> selectListView(Pagination page,@Param("ew") Wrapper<XianzhiwupinEntity> wrapper);
XianzhiwupinView selectView(@Param("ew") Wrapper<XianzhiwupinEntity> wrapper);
}

@ -0,0 +1,35 @@
package com.dao;
import com.entity.YonghuEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.YonghuVO;
import com.entity.view.YonghuView;
/**
*
*
* @author
* @email
* @date
*/
public interface YonghuDao extends BaseMapper<YonghuEntity> {
List<YonghuVO> selectListVO(@Param("ew") Wrapper<YonghuEntity> wrapper);
YonghuVO selectVO(@Param("ew") Wrapper<YonghuEntity> wrapper);
List<YonghuView> selectListView(@Param("ew") Wrapper<YonghuEntity> wrapper);
List<YonghuView> selectListView(Pagination page,@Param("ew") Wrapper<YonghuEntity> wrapper);
YonghuView selectView(@Param("ew") Wrapper<YonghuEntity> wrapper);
}

@ -0,0 +1,156 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
/**
*
*
* @author
* @email
* @date
*/
@TableName("address")
public class AddressEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public AddressEntity() {
}
public AddressEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
* id
*/
private Long userid;
/**
*
*/
private String address;
/**
*
*/
private String name;
/**
*
*/
private String phone;
/**
* [/]
*/
private String isdefault;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
*
*/
public void setAddress(String address) {
this.address = address;
}
/**
*
*/
public String getAddress() {
return address;
}
/**
*
*/
public void setName(String name) {
this.name = name;
}
/**
*
*/
public String getName() {
return name;
}
/**
*
*/
public void setPhone(String phone) {
this.phone = phone;
}
/**
*
*/
public String getPhone() {
return phone;
}
/**
* [/]
*/
public void setIsdefault(String isdefault) {
this.isdefault = isdefault;
}
/**
* [/]
*/
public String getIsdefault() {
return isdefault;
}
}

@ -0,0 +1,174 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
@TableName("auctionxianzhiwupin")
public class AuctionxianzhiwupinEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public AuctionxianzhiwupinEntity() {
}
public AuctionxianzhiwupinEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
* id
*/
private Long refid;
/**
* id
*/
private Long userid;
/**
*
*/
private String nickname;
/**
*
*/
private String avatarurl;
/**
*
*/
private Float auctionprice;
/**
*
*/
private String auctionstatus;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
* id
*/
public void setRefid(Long refid) {
this.refid = refid;
}
/**
* id
*/
public Long getRefid() {
return refid;
}
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
*
*/
public void setNickname(String nickname) {
this.nickname = nickname;
}
/**
*
*/
public String getNickname() {
return nickname;
}
/**
*
*/
public void setAvatarurl(String avatarurl) {
this.avatarurl = avatarurl;
}
/**
*
*/
public String getAvatarurl() {
return avatarurl;
}
/**
*
*/
public void setAuctionprice(Float auctionprice) {
this.auctionprice = auctionprice;
}
/**
*
*/
public Float getAuctionprice() {
return auctionprice;
}
/**
*
*/
public void setAuctionstatus(String auctionstatus) {
this.auctionstatus = auctionstatus;
}
/**
*
*/
public String getAuctionstatus() {
return auctionstatus;
}
}

@ -0,0 +1,53 @@
package com.entity;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
/**
* :
*/
@TableName("config")
public class ConfigEntity implements Serializable{
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO)
private Long id;
/**
* key
*/
private String name;
/**
* value
*/
private String value;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

@ -0,0 +1,174 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
@TableName("discussxianzhiwupin")
public class DiscussxianzhiwupinEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public DiscussxianzhiwupinEntity() {
}
public DiscussxianzhiwupinEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
* id
*/
private Long refid;
/**
* id
*/
private Long userid;
/**
*
*/
private String avatarurl;
/**
*
*/
private String nickname;
/**
*
*/
private String content;
/**
*
*/
private String reply;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
* id
*/
public void setRefid(Long refid) {
this.refid = refid;
}
/**
* id
*/
public Long getRefid() {
return refid;
}
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
*
*/
public void setAvatarurl(String avatarurl) {
this.avatarurl = avatarurl;
}
/**
*
*/
public String getAvatarurl() {
return avatarurl;
}
/**
*
*/
public void setNickname(String nickname) {
this.nickname = nickname;
}
/**
*
*/
public String getNickname() {
return nickname;
}
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
/**
*
*/
public void setReply(String reply) {
this.reply = reply;
}
/**
*
*/
public String getReply() {
return reply;
}
}

@ -0,0 +1,52 @@
package com.entity;
/**
*
*/
public class EIException extends RuntimeException {
private static final long serialVersionUID = 1L;
private String msg;
private int code = 500;
public EIException(String msg) {
super(msg);
this.msg = msg;
}
public EIException(String msg, Throwable e) {
super(msg, e);
this.msg = msg;
}
public EIException(String msg, int code) {
super(msg);
this.msg = msg;
this.code = code;
}
public EIException(String msg, int code, Throwable e) {
super(msg, e);
this.msg = msg;
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}

@ -0,0 +1,138 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
@TableName("news")
public class NewsEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public NewsEntity() {
}
public NewsEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String title;
/**
*
*/
private String introduction;
/**
*
*/
private String picture;
/**
*
*/
private String content;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
*
*/
public void setTitle(String title) {
this.title = title;
}
/**
*
*/
public String getTitle() {
return title;
}
/**
*
*/
public void setIntroduction(String introduction) {
this.introduction = introduction;
}
/**
*
*/
public String getIntroduction() {
return introduction;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
}

@ -0,0 +1,408 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
@TableName("orders")
public class OrdersEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public OrdersEntity() {
}
public OrdersEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String orderid;
/**
*
*/
private String tablename;
/**
* id
*/
private Long userid;
/**
* id
*/
private Long goodid;
/**
*
*/
private String goodname;
/**
*
*/
private String picture;
/**
*
*/
private Integer buynumber;
/**
*
*/
private Float price;
/**
*
*/
private Float discountprice;
/**
*
*/
private Float total;
/**
*
*/
private Float discounttotal;
/**
*
*/
private Integer type;
/**
*
*/
private String status;
/**
*
*/
private String address;
/**
*
*/
private String tel;
/**
*
*/
private String consignee;
/**
*
*/
private String remark;
/**
*
*/
private String logistics;
/**
*
*/
private String zhanghao;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
*
*/
public void setOrderid(String orderid) {
this.orderid = orderid;
}
/**
*
*/
public String getOrderid() {
return orderid;
}
/**
*
*/
public void setTablename(String tablename) {
this.tablename = tablename;
}
/**
*
*/
public String getTablename() {
return tablename;
}
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
* id
*/
public void setGoodid(Long goodid) {
this.goodid = goodid;
}
/**
* id
*/
public Long getGoodid() {
return goodid;
}
/**
*
*/
public void setGoodname(String goodname) {
this.goodname = goodname;
}
/**
*
*/
public String getGoodname() {
return goodname;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
*
*/
public void setBuynumber(Integer buynumber) {
this.buynumber = buynumber;
}
/**
*
*/
public Integer getBuynumber() {
return buynumber;
}
/**
*
*/
public void setPrice(Float price) {
this.price = price;
}
/**
*
*/
public Float getPrice() {
return price;
}
/**
*
*/
public void setDiscountprice(Float discountprice) {
this.discountprice = discountprice;
}
/**
*
*/
public Float getDiscountprice() {
return discountprice;
}
/**
*
*/
public void setTotal(Float total) {
this.total = total;
}
/**
*
*/
public Float getTotal() {
return total;
}
/**
*
*/
public void setDiscounttotal(Float discounttotal) {
this.discounttotal = discounttotal;
}
/**
*
*/
public Float getDiscounttotal() {
return discounttotal;
}
/**
*
*/
public void setType(Integer type) {
this.type = type;
}
/**
*
*/
public Integer getType() {
return type;
}
/**
*
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
*/
public String getStatus() {
return status;
}
/**
*
*/
public void setAddress(String address) {
this.address = address;
}
/**
*
*/
public String getAddress() {
return address;
}
/**
*
*/
public void setTel(String tel) {
this.tel = tel;
}
/**
*
*/
public String getTel() {
return tel;
}
/**
*
*/
public void setConsignee(String consignee) {
this.consignee = consignee;
}
/**
*
*/
public String getConsignee() {
return consignee;
}
/**
*
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
*
*/
public String getRemark() {
return remark;
}
/**
*
*/
public void setLogistics(String logistics) {
this.logistics = logistics;
}
/**
*
*/
public String getLogistics() {
return logistics;
}
/**
*
*/
public void setZhanghao(String zhanghao) {
this.zhanghao = zhanghao;
}
/**
*
*/
public String getZhanghao() {
return zhanghao;
}
}

@ -0,0 +1,84 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
@TableName("shangpinleixing")
public class ShangpinleixingEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public ShangpinleixingEntity() {
}
public ShangpinleixingEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String shangpinleixing;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
*
*/
public void setShangpinleixing(String shangpinleixing) {
this.shangpinleixing = shangpinleixing;
}
/**
*
*/
public String getShangpinleixing() {
return shangpinleixing;
}
}

@ -0,0 +1,210 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
@TableName("storeup")
public class StoreupEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public StoreupEntity() {
}
public StoreupEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
* id
*/
private Long userid;
/**
* id
*/
private Long refid;
/**
*
*/
private String tablename;
/**
*
*/
private String name;
/**
*
*/
private String picture;
/**
* (1:,21:,22:,31:,41:)
*/
private String type;
/**
*
*/
private String inteltype;
/**
*
*/
private String remark;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
* id
*/
public void setRefid(Long refid) {
this.refid = refid;
}
/**
* id
*/
public Long getRefid() {
return refid;
}
/**
*
*/
public void setTablename(String tablename) {
this.tablename = tablename;
}
/**
*
*/
public String getTablename() {
return tablename;
}
/**
*
*/
public void setName(String name) {
this.name = name;
}
/**
*
*/
public String getName() {
return name;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
* (1:,21:,22:,31:,41:)
*/
public void setType(String type) {
this.type = type;
}
/**
* (1:,21:,22:,31:,41:)
*/
public String getType() {
return type;
}
/**
*
*/
public void setInteltype(String inteltype) {
this.inteltype = inteltype;
}
/**
*
*/
public String getInteltype() {
return inteltype;
}
/**
*
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
*
*/
public String getRemark() {
return remark;
}
}

@ -0,0 +1,132 @@
package com.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
/**
* token
*/
@TableName("token")
public class TokenEntity implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO)
private Long id;
/**
* id
*/
private Long userid;
/**
*
*/
private String username;
/**
*
*/
private String tablename;
/**
*
*/
private String role;
/**
* token
*/
private String token;
/**
*
*/
private Date expiratedtime;
/**
*
*/
private Date addtime;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getUserid() {
return userid;
}
public void setUserid(Long userid) {
this.userid = userid;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public String getToken() {
return token;
}
public String getTablename() {
return tablename;
}
public void setTablename(String tablename) {
this.tablename = tablename;
}
public void setToken(String token) {
this.token = token;
}
public Date getExpiratedtime() {
return expiratedtime;
}
public void setExpiratedtime(Date expiratedtime) {
this.expiratedtime = expiratedtime;
}
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public TokenEntity(Long userid, String username, String tablename,String role, String token, Date expiratedtime) {
super();
this.userid = userid;
this.username = username;
this.tablename = tablename;
this.role = role;
this.token = token;
this.expiratedtime = expiratedtime;
}
public TokenEntity() {
}
}

@ -0,0 +1,77 @@
package com.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*/
@TableName("users")
public class UsersEntity implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO)
private Long id;
/**
*
*/
private String username;
/**
*
*/
private String password;
/**
*
*/
private String role;
private Date addtime;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}

@ -0,0 +1,358 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
/**
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
@TableName("xianzhiwupin")
public class XianzhiwupinEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public XianzhiwupinEntity() {
}
public XianzhiwupinEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String shangpinmingcheng;
/**
*
*/
private String tupian;
/**
*
*/
private String shangpinleixing;
/**
*
*/
private String pinpai;
/**
*
*/
private String guige;
/**
*
*/
private String shangpinjieshao;
/**
*
*/
private String zhanghao;
/**
*
*/
private Integer thumbsupnum;
/**
*
*/
private Integer crazilynum;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date clicktime;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date reversetime;
/**
*
*/
private Integer clicknum;
/**
*
*/
private Float price;
/**
*
*/
private Float startprice;
/**
*
*/
private Float stepprice;
/**
*
*/
private Float endprice;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
*
*/
public void setShangpinmingcheng(String shangpinmingcheng) {
this.shangpinmingcheng = shangpinmingcheng;
}
/**
*
*/
public String getShangpinmingcheng() {
return shangpinmingcheng;
}
/**
*
*/
public void setTupian(String tupian) {
this.tupian = tupian;
}
/**
*
*/
public String getTupian() {
return tupian;
}
/**
*
*/
public void setShangpinleixing(String shangpinleixing) {
this.shangpinleixing = shangpinleixing;
}
/**
*
*/
public String getShangpinleixing() {
return shangpinleixing;
}
/**
*
*/
public void setPinpai(String pinpai) {
this.pinpai = pinpai;
}
/**
*
*/
public String getPinpai() {
return pinpai;
}
/**
*
*/
public void setGuige(String guige) {
this.guige = guige;
}
/**
*
*/
public String getGuige() {
return guige;
}
/**
*
*/
public void setShangpinjieshao(String shangpinjieshao) {
this.shangpinjieshao = shangpinjieshao;
}
/**
*
*/
public String getShangpinjieshao() {
return shangpinjieshao;
}
/**
*
*/
public void setZhanghao(String zhanghao) {
this.zhanghao = zhanghao;
}
/**
*
*/
public String getZhanghao() {
return zhanghao;
}
/**
*
*/
public void setThumbsupnum(Integer thumbsupnum) {
this.thumbsupnum = thumbsupnum;
}
/**
*
*/
public Integer getThumbsupnum() {
return thumbsupnum;
}
/**
*
*/
public void setCrazilynum(Integer crazilynum) {
this.crazilynum = crazilynum;
}
/**
*
*/
public Integer getCrazilynum() {
return crazilynum;
}
/**
*
*/
public void setClicktime(Date clicktime) {
this.clicktime = clicktime;
}
/**
*
*/
public Date getClicktime() {
return clicktime;
}
/**
*
*/
public void setReversetime(Date reversetime) {
this.reversetime = reversetime;
}
/**
*
*/
public Date getReversetime() {
return reversetime;
}
/**
*
*/
public void setClicknum(Integer clicknum) {
this.clicknum = clicknum;
}
/**
*
*/
public Integer getClicknum() {
return clicknum;
}
/**
*
*/
public void setPrice(Float price) {
this.price = price;
}
/**
*
*/
public Float getPrice() {
return price;
}
/**
*
*/
public void setStartprice(Float startprice) {
this.startprice = startprice;
}
/**
*
*/
public Float getStartprice() {
return startprice;
}
/**
*
*/
public void setStepprice(Float stepprice) {
this.stepprice = stepprice;
}
/**
*
*/
public Float getStepprice() {
return stepprice;
}
/**
*
*/
public void setEndprice(Float endprice) {
this.endprice = endprice;
}
/**
*
*/
public Float getEndprice() {
return endprice;
}
}

@ -0,0 +1,192 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
/**
*
*
* @author
* @email
* @date
*/
@TableName("yonghu")
public class YonghuEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public YonghuEntity() {
}
public YonghuEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String zhanghao;
/**
*
*/
private String mima;
/**
*
*/
private String xingming;
/**
*
*/
private String xingbie;
/**
*
*/
private String shouji;
/**
*
*/
private String touxiang;
/**
*
*/
private Float money;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
*
*/
public void setZhanghao(String zhanghao) {
this.zhanghao = zhanghao;
}
/**
*
*/
public String getZhanghao() {
return zhanghao;
}
/**
*
*/
public void setMima(String mima) {
this.mima = mima;
}
/**
*
*/
public String getMima() {
return mima;
}
/**
*
*/
public void setXingming(String xingming) {
this.xingming = xingming;
}
/**
*
*/
public String getXingming() {
return xingming;
}
/**
*
*/
public void setXingbie(String xingbie) {
this.xingbie = xingbie;
}
/**
*
*/
public String getXingbie() {
return xingbie;
}
/**
*
*/
public void setShouji(String shouji) {
this.shouji = shouji;
}
/**
*
*/
public String getShouji() {
return shouji;
}
/**
*
*/
public void setTouxiang(String touxiang) {
this.touxiang = touxiang;
}
/**
*
*/
public String getTouxiang() {
return touxiang;
}
/**
*
*/
public void setMoney(Float money) {
this.money = money;
}
/**
*
*/
public Float getMoney() {
return money;
}
}

@ -0,0 +1,107 @@
package com.entity.model;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class AddressModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String address;
/**
*
*/
private String name;
/**
*
*/
private String phone;
/**
* [/]
*/
private String isdefault;
/**
*
*/
public void setAddress(String address) {
this.address = address;
}
/**
*
*/
public String getAddress() {
return address;
}
/**
*
*/
public void setName(String name) {
this.name = name;
}
/**
*
*/
public String getName() {
return name;
}
/**
*
*/
public void setPhone(String phone) {
this.phone = phone;
}
/**
*
*/
public String getPhone() {
return phone;
}
/**
* [/]
*/
public void setIsdefault(String isdefault) {
this.isdefault = isdefault;
}
/**
* [/]
*/
public String getIsdefault() {
return isdefault;
}
}

@ -0,0 +1,129 @@
package com.entity.model;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class AuctionxianzhiwupinModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long userid;
/**
*
*/
private String nickname;
/**
*
*/
private String avatarurl;
/**
*
*/
private Float auctionprice;
/**
*
*/
private String auctionstatus;
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
*
*/
public void setNickname(String nickname) {
this.nickname = nickname;
}
/**
*
*/
public String getNickname() {
return nickname;
}
/**
*
*/
public void setAvatarurl(String avatarurl) {
this.avatarurl = avatarurl;
}
/**
*
*/
public String getAvatarurl() {
return avatarurl;
}
/**
*
*/
public void setAuctionprice(Float auctionprice) {
this.auctionprice = auctionprice;
}
/**
*
*/
public Float getAuctionprice() {
return auctionprice;
}
/**
*
*/
public void setAuctionstatus(String auctionstatus) {
this.auctionstatus = auctionstatus;
}
/**
*
*/
public String getAuctionstatus() {
return auctionstatus;
}
}

@ -0,0 +1,129 @@
package com.entity.model;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class DiscussxianzhiwupinModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long userid;
/**
*
*/
private String avatarurl;
/**
*
*/
private String nickname;
/**
*
*/
private String content;
/**
*
*/
private String reply;
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
*
*/
public void setAvatarurl(String avatarurl) {
this.avatarurl = avatarurl;
}
/**
*
*/
public String getAvatarurl() {
return avatarurl;
}
/**
*
*/
public void setNickname(String nickname) {
this.nickname = nickname;
}
/**
*
*/
public String getNickname() {
return nickname;
}
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
/**
*
*/
public void setReply(String reply) {
this.reply = reply;
}
/**
*
*/
public String getReply() {
return reply;
}
}

@ -0,0 +1,85 @@
package com.entity.model;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class NewsModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String introduction;
/**
*
*/
private String picture;
/**
*
*/
private String content;
/**
*
*/
public void setIntroduction(String introduction) {
this.introduction = introduction;
}
/**
*
*/
public String getIntroduction() {
return introduction;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
}

@ -0,0 +1,415 @@
package com.entity.model;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class OrdersModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String tablename;
/**
* id
*/
private Long userid;
/**
* id
*/
private Long goodid;
/**
*
*/
private String goodname;
/**
*
*/
private String picture;
/**
*
*/
private Integer buynumber;
/**
*
*/
private Float price;
/**
*
*/
private Float discountprice;
/**
*
*/
private Float total;
/**
*
*/
private Float discounttotal;
/**
*
*/
private Integer type;
/**
*
*/
private String status;
/**
*
*/
private String address;
/**
*
*/
private String tel;
/**
*
*/
private String consignee;
/**
*
*/
private String remark;
/**
*
*/
private String logistics;
/**
*
*/
private String zhanghao;
/**
*
*/
public void setTablename(String tablename) {
this.tablename = tablename;
}
/**
*
*/
public String getTablename() {
return tablename;
}
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
* id
*/
public void setGoodid(Long goodid) {
this.goodid = goodid;
}
/**
* id
*/
public Long getGoodid() {
return goodid;
}
/**
*
*/
public void setGoodname(String goodname) {
this.goodname = goodname;
}
/**
*
*/
public String getGoodname() {
return goodname;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
*
*/
public void setBuynumber(Integer buynumber) {
this.buynumber = buynumber;
}
/**
*
*/
public Integer getBuynumber() {
return buynumber;
}
/**
*
*/
public void setPrice(Float price) {
this.price = price;
}
/**
*
*/
public Float getPrice() {
return price;
}
/**
*
*/
public void setDiscountprice(Float discountprice) {
this.discountprice = discountprice;
}
/**
*
*/
public Float getDiscountprice() {
return discountprice;
}
/**
*
*/
public void setTotal(Float total) {
this.total = total;
}
/**
*
*/
public Float getTotal() {
return total;
}
/**
*
*/
public void setDiscounttotal(Float discounttotal) {
this.discounttotal = discounttotal;
}
/**
*
*/
public Float getDiscounttotal() {
return discounttotal;
}
/**
*
*/
public void setType(Integer type) {
this.type = type;
}
/**
*
*/
public Integer getType() {
return type;
}
/**
*
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
*/
public String getStatus() {
return status;
}
/**
*
*/
public void setAddress(String address) {
this.address = address;
}
/**
*
*/
public String getAddress() {
return address;
}
/**
*
*/
public void setTel(String tel) {
this.tel = tel;
}
/**
*
*/
public String getTel() {
return tel;
}
/**
*
*/
public void setConsignee(String consignee) {
this.consignee = consignee;
}
/**
*
*/
public String getConsignee() {
return consignee;
}
/**
*
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
*
*/
public String getRemark() {
return remark;
}
/**
*
*/
public void setLogistics(String logistics) {
this.logistics = logistics;
}
/**
*
*/
public String getLogistics() {
return logistics;
}
/**
*
*/
public void setZhanghao(String zhanghao) {
this.zhanghao = zhanghao;
}
/**
*
*/
public String getZhanghao() {
return zhanghao;
}
}

@ -0,0 +1,19 @@
package com.entity.model;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class ShangpinleixingModel implements Serializable {
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,173 @@
package com.entity.model;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class StoreupModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long refid;
/**
*
*/
private String tablename;
/**
*
*/
private String name;
/**
*
*/
private String picture;
/**
* (1:,21:,22:,31:,41:)
*/
private String type;
/**
*
*/
private String inteltype;
/**
*
*/
private String remark;
/**
* id
*/
public void setRefid(Long refid) {
this.refid = refid;
}
/**
* id
*/
public Long getRefid() {
return refid;
}
/**
*
*/
public void setTablename(String tablename) {
this.tablename = tablename;
}
/**
*
*/
public String getTablename() {
return tablename;
}
/**
*
*/
public void setName(String name) {
this.name = name;
}
/**
*
*/
public String getName() {
return name;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
* (1:,21:,22:,31:,41:)
*/
public void setType(String type) {
this.type = type;
}
/**
* (1:,21:,22:,31:,41:)
*/
public String getType() {
return type;
}
/**
*
*/
public void setInteltype(String inteltype) {
this.inteltype = inteltype;
}
/**
*
*/
public String getInteltype() {
return inteltype;
}
/**
*
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
*
*/
public String getRemark() {
return remark;
}
}

@ -0,0 +1,356 @@
package com.entity.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class XianzhiwupinModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String tupian;
/**
*
*/
private String shangpinleixing;
/**
*
*/
private String pinpai;
/**
*
*/
private String guige;
/**
*
*/
private String shangpinjieshao;
/**
*
*/
private String zhanghao;
/**
*
*/
private Integer thumbsupnum;
/**
*
*/
private Integer crazilynum;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date clicktime;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date reversetime;
/**
*
*/
private Integer clicknum;
/**
*
*/
private Float price;
/**
*
*/
private Float startprice;
/**
*
*/
private Float stepprice;
/**
*
*/
private Float endprice;
/**
*
*/
public void setTupian(String tupian) {
this.tupian = tupian;
}
/**
*
*/
public String getTupian() {
return tupian;
}
/**
*
*/
public void setShangpinleixing(String shangpinleixing) {
this.shangpinleixing = shangpinleixing;
}
/**
*
*/
public String getShangpinleixing() {
return shangpinleixing;
}
/**
*
*/
public void setPinpai(String pinpai) {
this.pinpai = pinpai;
}
/**
*
*/
public String getPinpai() {
return pinpai;
}
/**
*
*/
public void setGuige(String guige) {
this.guige = guige;
}
/**
*
*/
public String getGuige() {
return guige;
}
/**
*
*/
public void setShangpinjieshao(String shangpinjieshao) {
this.shangpinjieshao = shangpinjieshao;
}
/**
*
*/
public String getShangpinjieshao() {
return shangpinjieshao;
}
/**
*
*/
public void setZhanghao(String zhanghao) {
this.zhanghao = zhanghao;
}
/**
*
*/
public String getZhanghao() {
return zhanghao;
}
/**
*
*/
public void setThumbsupnum(Integer thumbsupnum) {
this.thumbsupnum = thumbsupnum;
}
/**
*
*/
public Integer getThumbsupnum() {
return thumbsupnum;
}
/**
*
*/
public void setCrazilynum(Integer crazilynum) {
this.crazilynum = crazilynum;
}
/**
*
*/
public Integer getCrazilynum() {
return crazilynum;
}
/**
*
*/
public void setClicktime(Date clicktime) {
this.clicktime = clicktime;
}
/**
*
*/
public Date getClicktime() {
return clicktime;
}
/**
*
*/
public void setReversetime(Date reversetime) {
this.reversetime = reversetime;
}
/**
*
*/
public Date getReversetime() {
return reversetime;
}
/**
*
*/
public void setClicknum(Integer clicknum) {
this.clicknum = clicknum;
}
/**
*
*/
public Integer getClicknum() {
return clicknum;
}
/**
*
*/
public void setPrice(Float price) {
this.price = price;
}
/**
*
*/
public Float getPrice() {
return price;
}
/**
*
*/
public void setStartprice(Float startprice) {
this.startprice = startprice;
}
/**
*
*/
public Float getStartprice() {
return startprice;
}
/**
*
*/
public void setStepprice(Float stepprice) {
this.stepprice = stepprice;
}
/**
*
*/
public Float getStepprice() {
return stepprice;
}
/**
*
*/
public void setEndprice(Float endprice) {
this.endprice = endprice;
}
/**
*
*/
public Float getEndprice() {
return endprice;
}
}

@ -0,0 +1,151 @@
package com.entity.model;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class YonghuModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String mima;
/**
*
*/
private String xingming;
/**
*
*/
private String xingbie;
/**
*
*/
private String shouji;
/**
*
*/
private String touxiang;
/**
*
*/
private Float money;
/**
*
*/
public void setMima(String mima) {
this.mima = mima;
}
/**
*
*/
public String getMima() {
return mima;
}
/**
*
*/
public void setXingming(String xingming) {
this.xingming = xingming;
}
/**
*
*/
public String getXingming() {
return xingming;
}
/**
*
*/
public void setXingbie(String xingbie) {
this.xingbie = xingbie;
}
/**
*
*/
public String getXingbie() {
return xingbie;
}
/**
*
*/
public void setShouji(String shouji) {
this.shouji = shouji;
}
/**
*
*/
public String getShouji() {
return shouji;
}
/**
*
*/
public void setTouxiang(String touxiang) {
this.touxiang = touxiang;
}
/**
*
*/
public String getTouxiang() {
return touxiang;
}
/**
*
*/
public void setMoney(Float money) {
this.money = money;
}
/**
*
*/
public Float getMoney() {
return money;
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.AddressEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date
*/
@TableName("address")
public class AddressView extends AddressEntity implements Serializable {
private static final long serialVersionUID = 1L;
public AddressView(){
}
public AddressView(AddressEntity addressEntity){
try {
BeanUtils.copyProperties(this, addressEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.AuctionxianzhiwupinEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date
*/
@TableName("auctionxianzhiwupin")
public class AuctionxianzhiwupinView extends AuctionxianzhiwupinEntity implements Serializable {
private static final long serialVersionUID = 1L;
public AuctionxianzhiwupinView(){
}
public AuctionxianzhiwupinView(AuctionxianzhiwupinEntity auctionxianzhiwupinEntity){
try {
BeanUtils.copyProperties(this, auctionxianzhiwupinEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.DiscussxianzhiwupinEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date
*/
@TableName("discussxianzhiwupin")
public class DiscussxianzhiwupinView extends DiscussxianzhiwupinEntity implements Serializable {
private static final long serialVersionUID = 1L;
public DiscussxianzhiwupinView(){
}
public DiscussxianzhiwupinView(DiscussxianzhiwupinEntity discussxianzhiwupinEntity){
try {
BeanUtils.copyProperties(this, discussxianzhiwupinEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.NewsEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date
*/
@TableName("news")
public class NewsView extends NewsEntity implements Serializable {
private static final long serialVersionUID = 1L;
public NewsView(){
}
public NewsView(NewsEntity newsEntity){
try {
BeanUtils.copyProperties(this, newsEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.OrdersEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date
*/
@TableName("orders")
public class OrdersView extends OrdersEntity implements Serializable {
private static final long serialVersionUID = 1L;
public OrdersView(){
}
public OrdersView(OrdersEntity ordersEntity){
try {
BeanUtils.copyProperties(this, ordersEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.ShangpinleixingEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date
*/
@TableName("shangpinleixing")
public class ShangpinleixingView extends ShangpinleixingEntity implements Serializable {
private static final long serialVersionUID = 1L;
public ShangpinleixingView(){
}
public ShangpinleixingView(ShangpinleixingEntity shangpinleixingEntity){
try {
BeanUtils.copyProperties(this, shangpinleixingEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.StoreupEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date
*/
@TableName("storeup")
public class StoreupView extends StoreupEntity implements Serializable {
private static final long serialVersionUID = 1L;
public StoreupView(){
}
public StoreupView(StoreupEntity storeupEntity){
try {
BeanUtils.copyProperties(this, storeupEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.XianzhiwupinEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date
*/
@TableName("xianzhiwupin")
public class XianzhiwupinView extends XianzhiwupinEntity implements Serializable {
private static final long serialVersionUID = 1L;
public XianzhiwupinView(){
}
public XianzhiwupinView(XianzhiwupinEntity xianzhiwupinEntity){
try {
BeanUtils.copyProperties(this, xianzhiwupinEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.YonghuEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date
*/
@TableName("yonghu")
public class YonghuView extends YonghuEntity implements Serializable {
private static final long serialVersionUID = 1L;
public YonghuView(){
}
public YonghuView(YonghuEntity yonghuEntity){
try {
BeanUtils.copyProperties(this, yonghuEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,106 @@
package com.entity.vo;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class AddressVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String address;
/**
*
*/
private String name;
/**
*
*/
private String phone;
/**
* [/]
*/
private String isdefault;
/**
*
*/
public void setAddress(String address) {
this.address = address;
}
/**
*
*/
public String getAddress() {
return address;
}
/**
*
*/
public void setName(String name) {
this.name = name;
}
/**
*
*/
public String getName() {
return name;
}
/**
*
*/
public void setPhone(String phone) {
this.phone = phone;
}
/**
*
*/
public String getPhone() {
return phone;
}
/**
* [/]
*/
public void setIsdefault(String isdefault) {
this.isdefault = isdefault;
}
/**
* [/]
*/
public String getIsdefault() {
return isdefault;
}
}

@ -0,0 +1,128 @@
package com.entity.vo;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class AuctionxianzhiwupinVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long userid;
/**
*
*/
private String nickname;
/**
*
*/
private String avatarurl;
/**
*
*/
private Float auctionprice;
/**
*
*/
private String auctionstatus;
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
*
*/
public void setNickname(String nickname) {
this.nickname = nickname;
}
/**
*
*/
public String getNickname() {
return nickname;
}
/**
*
*/
public void setAvatarurl(String avatarurl) {
this.avatarurl = avatarurl;
}
/**
*
*/
public String getAvatarurl() {
return avatarurl;
}
/**
*
*/
public void setAuctionprice(Float auctionprice) {
this.auctionprice = auctionprice;
}
/**
*
*/
public Float getAuctionprice() {
return auctionprice;
}
/**
*
*/
public void setAuctionstatus(String auctionstatus) {
this.auctionstatus = auctionstatus;
}
/**
*
*/
public String getAuctionstatus() {
return auctionstatus;
}
}

@ -0,0 +1,128 @@
package com.entity.vo;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class DiscussxianzhiwupinVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long userid;
/**
*
*/
private String avatarurl;
/**
*
*/
private String nickname;
/**
*
*/
private String content;
/**
*
*/
private String reply;
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
*
*/
public void setAvatarurl(String avatarurl) {
this.avatarurl = avatarurl;
}
/**
*
*/
public String getAvatarurl() {
return avatarurl;
}
/**
*
*/
public void setNickname(String nickname) {
this.nickname = nickname;
}
/**
*
*/
public String getNickname() {
return nickname;
}
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
/**
*
*/
public void setReply(String reply) {
this.reply = reply;
}
/**
*
*/
public String getReply() {
return reply;
}
}

@ -0,0 +1,84 @@
package com.entity.vo;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class NewsVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String introduction;
/**
*
*/
private String picture;
/**
*
*/
private String content;
/**
*
*/
public void setIntroduction(String introduction) {
this.introduction = introduction;
}
/**
*
*/
public String getIntroduction() {
return introduction;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
}

@ -0,0 +1,414 @@
package com.entity.vo;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class OrdersVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String tablename;
/**
* id
*/
private Long userid;
/**
* id
*/
private Long goodid;
/**
*
*/
private String goodname;
/**
*
*/
private String picture;
/**
*
*/
private Integer buynumber;
/**
*
*/
private Float price;
/**
*
*/
private Float discountprice;
/**
*
*/
private Float total;
/**
*
*/
private Float discounttotal;
/**
*
*/
private Integer type;
/**
*
*/
private String status;
/**
*
*/
private String address;
/**
*
*/
private String tel;
/**
*
*/
private String consignee;
/**
*
*/
private String remark;
/**
*
*/
private String logistics;
/**
*
*/
private String zhanghao;
/**
*
*/
public void setTablename(String tablename) {
this.tablename = tablename;
}
/**
*
*/
public String getTablename() {
return tablename;
}
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
* id
*/
public void setGoodid(Long goodid) {
this.goodid = goodid;
}
/**
* id
*/
public Long getGoodid() {
return goodid;
}
/**
*
*/
public void setGoodname(String goodname) {
this.goodname = goodname;
}
/**
*
*/
public String getGoodname() {
return goodname;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
*
*/
public void setBuynumber(Integer buynumber) {
this.buynumber = buynumber;
}
/**
*
*/
public Integer getBuynumber() {
return buynumber;
}
/**
*
*/
public void setPrice(Float price) {
this.price = price;
}
/**
*
*/
public Float getPrice() {
return price;
}
/**
*
*/
public void setDiscountprice(Float discountprice) {
this.discountprice = discountprice;
}
/**
*
*/
public Float getDiscountprice() {
return discountprice;
}
/**
*
*/
public void setTotal(Float total) {
this.total = total;
}
/**
*
*/
public Float getTotal() {
return total;
}
/**
*
*/
public void setDiscounttotal(Float discounttotal) {
this.discounttotal = discounttotal;
}
/**
*
*/
public Float getDiscounttotal() {
return discounttotal;
}
/**
*
*/
public void setType(Integer type) {
this.type = type;
}
/**
*
*/
public Integer getType() {
return type;
}
/**
*
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
*/
public String getStatus() {
return status;
}
/**
*
*/
public void setAddress(String address) {
this.address = address;
}
/**
*
*/
public String getAddress() {
return address;
}
/**
*
*/
public void setTel(String tel) {
this.tel = tel;
}
/**
*
*/
public String getTel() {
return tel;
}
/**
*
*/
public void setConsignee(String consignee) {
this.consignee = consignee;
}
/**
*
*/
public String getConsignee() {
return consignee;
}
/**
*
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
*
*/
public String getRemark() {
return remark;
}
/**
*
*/
public void setLogistics(String logistics) {
this.logistics = logistics;
}
/**
*
*/
public String getLogistics() {
return logistics;
}
/**
*
*/
public void setZhanghao(String zhanghao) {
this.zhanghao = zhanghao;
}
/**
*
*/
public String getZhanghao() {
return zhanghao;
}
}

@ -0,0 +1,18 @@
package com.entity.vo;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class ShangpinleixingVO implements Serializable {
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,172 @@
package com.entity.vo;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class StoreupVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long refid;
/**
*
*/
private String tablename;
/**
*
*/
private String name;
/**
*
*/
private String picture;
/**
* (1:,21:,22:,31:,41:)
*/
private String type;
/**
*
*/
private String inteltype;
/**
*
*/
private String remark;
/**
* id
*/
public void setRefid(Long refid) {
this.refid = refid;
}
/**
* id
*/
public Long getRefid() {
return refid;
}
/**
*
*/
public void setTablename(String tablename) {
this.tablename = tablename;
}
/**
*
*/
public String getTablename() {
return tablename;
}
/**
*
*/
public void setName(String name) {
this.name = name;
}
/**
*
*/
public String getName() {
return name;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
* (1:,21:,22:,31:,41:)
*/
public void setType(String type) {
this.type = type;
}
/**
* (1:,21:,22:,31:,41:)
*/
public String getType() {
return type;
}
/**
*
*/
public void setInteltype(String inteltype) {
this.inteltype = inteltype;
}
/**
*
*/
public String getInteltype() {
return inteltype;
}
/**
*
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
*
*/
public String getRemark() {
return remark;
}
}

@ -0,0 +1,356 @@
package com.entity.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class XianzhiwupinVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String tupian;
/**
*
*/
private String shangpinleixing;
/**
*
*/
private String pinpai;
/**
*
*/
private String guige;
/**
*
*/
private String shangpinjieshao;
/**
*
*/
private String zhanghao;
/**
*
*/
private Integer thumbsupnum;
/**
*
*/
private Integer crazilynum;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date clicktime;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date reversetime;
/**
*
*/
private Integer clicknum;
/**
*
*/
private Float price;
/**
*
*/
private Float startprice;
/**
*
*/
private Float stepprice;
/**
*
*/
private Float endprice;
/**
*
*/
public void setTupian(String tupian) {
this.tupian = tupian;
}
/**
*
*/
public String getTupian() {
return tupian;
}
/**
*
*/
public void setShangpinleixing(String shangpinleixing) {
this.shangpinleixing = shangpinleixing;
}
/**
*
*/
public String getShangpinleixing() {
return shangpinleixing;
}
/**
*
*/
public void setPinpai(String pinpai) {
this.pinpai = pinpai;
}
/**
*
*/
public String getPinpai() {
return pinpai;
}
/**
*
*/
public void setGuige(String guige) {
this.guige = guige;
}
/**
*
*/
public String getGuige() {
return guige;
}
/**
*
*/
public void setShangpinjieshao(String shangpinjieshao) {
this.shangpinjieshao = shangpinjieshao;
}
/**
*
*/
public String getShangpinjieshao() {
return shangpinjieshao;
}
/**
*
*/
public void setZhanghao(String zhanghao) {
this.zhanghao = zhanghao;
}
/**
*
*/
public String getZhanghao() {
return zhanghao;
}
/**
*
*/
public void setThumbsupnum(Integer thumbsupnum) {
this.thumbsupnum = thumbsupnum;
}
/**
*
*/
public Integer getThumbsupnum() {
return thumbsupnum;
}
/**
*
*/
public void setCrazilynum(Integer crazilynum) {
this.crazilynum = crazilynum;
}
/**
*
*/
public Integer getCrazilynum() {
return crazilynum;
}
/**
*
*/
public void setClicktime(Date clicktime) {
this.clicktime = clicktime;
}
/**
*
*/
public Date getClicktime() {
return clicktime;
}
/**
*
*/
public void setReversetime(Date reversetime) {
this.reversetime = reversetime;
}
/**
*
*/
public Date getReversetime() {
return reversetime;
}
/**
*
*/
public void setClicknum(Integer clicknum) {
this.clicknum = clicknum;
}
/**
*
*/
public Integer getClicknum() {
return clicknum;
}
/**
*
*/
public void setPrice(Float price) {
this.price = price;
}
/**
*
*/
public Float getPrice() {
return price;
}
/**
*
*/
public void setStartprice(Float startprice) {
this.startprice = startprice;
}
/**
*
*/
public Float getStartprice() {
return startprice;
}
/**
*
*/
public void setStepprice(Float stepprice) {
this.stepprice = stepprice;
}
/**
*
*/
public Float getStepprice() {
return stepprice;
}
/**
*
*/
public void setEndprice(Float endprice) {
this.endprice = endprice;
}
/**
*
*/
public Float getEndprice() {
return endprice;
}
}

@ -0,0 +1,150 @@
package com.entity.vo;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-03-08 18:08:45
*/
public class YonghuVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String mima;
/**
*
*/
private String xingming;
/**
*
*/
private String xingbie;
/**
*
*/
private String shouji;
/**
*
*/
private String touxiang;
/**
*
*/
private Float money;
/**
*
*/
public void setMima(String mima) {
this.mima = mima;
}
/**
*
*/
public String getMima() {
return mima;
}
/**
*
*/
public void setXingming(String xingming) {
this.xingming = xingming;
}
/**
*
*/
public String getXingming() {
return xingming;
}
/**
*
*/
public void setXingbie(String xingbie) {
this.xingbie = xingbie;
}
/**
*
*/
public String getXingbie() {
return xingbie;
}
/**
*
*/
public void setShouji(String shouji) {
this.shouji = shouji;
}
/**
*
*/
public String getShouji() {
return shouji;
}
/**
*
*/
public void setTouxiang(String touxiang) {
this.touxiang = touxiang;
}
/**
*
*/
public String getTouxiang() {
return touxiang;
}
/**
*
*/
public void setMoney(Float money) {
this.money = money;
}
/**
*
*/
public Float getMoney() {
return money;
}
}

@ -0,0 +1,31 @@
package com.enums;
import java.io.Serializable;
import com.baomidou.mybatisplus.enums.IEnum;
/**
* IEnum spring-mybatis.xml typeEnumsPackage
*/
public enum TypeEnum implements IEnum {
DISABLED(0, "禁用"),
NORMAL(1, "正常");
private final int value;
private final String desc;
TypeEnum(final int value, final String desc) {
this.value = value;
this.desc = desc;
}
@Override
public Serializable getValue() {
return this.value;
}
// Jackson 注解为 JsonValue 返回中文 json 描述
public String getDesc() {
return this.desc;
}
}

@ -0,0 +1,85 @@
package com.interceptor;
import java.io.PrintWriter;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
import com.annotation.IgnoreAuth;
import com.entity.TokenEntity;
import com.service.TokenService;
import com.utils.R;
/**
* (Token)
*/
@Component
public class AuthorizationInterceptor implements HandlerInterceptor {
public static final String LOGIN_TOKEN_KEY = "Token";
@Autowired
private TokenService tokenService;
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//支持跨域请求
response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
response.setHeader("Access-Control-Max-Age", "3600");
response.setHeader("Access-Control-Allow-Credentials", "true");
response.setHeader("Access-Control-Allow-Headers", "x-requested-with,request-source,Token, Origin,imgType, Content-Type, cache-control,postman-token,Cookie, Accept,authorization");
response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
IgnoreAuth annotation;
if (handler instanceof HandlerMethod) {
annotation = ((HandlerMethod) handler).getMethodAnnotation(IgnoreAuth.class);
} else {
return true;
}
//从header中获取token
String token = request.getHeader(LOGIN_TOKEN_KEY);
/**
*
*/
if(annotation!=null) {
return true;
}
TokenEntity tokenEntity = null;
if(StringUtils.isNotBlank(token)) {
tokenEntity = tokenService.getTokenEntity(token);
}
if(tokenEntity != null) {
request.getSession().setAttribute("userId", tokenEntity.getUserid());
request.getSession().setAttribute("role", tokenEntity.getRole());
request.getSession().setAttribute("tableName", tokenEntity.getTablename());
request.getSession().setAttribute("username", tokenEntity.getUsername());
return true;
}
PrintWriter writer = null;
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json; charset=utf-8");
try {
writer = response.getWriter();
writer.print(JSONObject.toJSONString(R.error(401, "请先登录")));
} finally {
if(writer != null){
writer.close();
}
}
// throw new EIException("请先登录", 401);
return false;
}
}

@ -0,0 +1,31 @@
package com.model.enums;
import java.io.Serializable;
import com.baomidou.mybatisplus.enums.IEnum;
/**
* IEnum spring-mybatis.xml typeEnumsPackage
*/
public enum TypeEnum implements IEnum {
DISABLED(0, "禁用"),
NORMAL(1, "正常");
private final int value;
private final String desc;
TypeEnum(final int value, final String desc) {
this.value = value;
this.desc = desc;
}
@Override
public Serializable getValue() {
return this.value;
}
// Jackson 注解为 JsonValue 返回中文 json 描述
public String getDesc() {
return this.desc;
}
}

@ -0,0 +1,37 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.AddressEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.AddressVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.AddressView;
/**
*
*
* @author
* @email
* @date
*/
public interface AddressService extends IService<AddressEntity> {
PageUtils queryPage(Map<String, Object> params);
List<AddressVO> selectListVO(Wrapper<AddressEntity> wrapper);
AddressVO selectVO(@Param("ew") Wrapper<AddressEntity> wrapper);
List<AddressView> selectListView(Wrapper<AddressEntity> wrapper);
AddressView selectView(@Param("ew") Wrapper<AddressEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<AddressEntity> wrapper);
}

@ -0,0 +1,37 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.AuctionxianzhiwupinEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.AuctionxianzhiwupinVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.AuctionxianzhiwupinView;
/**
*
*
* @author
* @email
* @date
*/
public interface AuctionxianzhiwupinService extends IService<AuctionxianzhiwupinEntity> {
PageUtils queryPage(Map<String, Object> params);
List<AuctionxianzhiwupinVO> selectListVO(Wrapper<AuctionxianzhiwupinEntity> wrapper);
AuctionxianzhiwupinVO selectVO(@Param("ew") Wrapper<AuctionxianzhiwupinEntity> wrapper);
List<AuctionxianzhiwupinView> selectListView(Wrapper<AuctionxianzhiwupinEntity> wrapper);
AuctionxianzhiwupinView selectView(@Param("ew") Wrapper<AuctionxianzhiwupinEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<AuctionxianzhiwupinEntity> wrapper);
}

@ -0,0 +1,22 @@
package com.service;
import java.util.List;
import java.util.Map;
public interface CommonService {
List<String> getOption(Map<String, Object> params);
Map<String, Object> getFollowByOption(Map<String, Object> params);
void sh(Map<String, Object> params);
int remindCount(Map<String, Object> params);
Map<String, Object> selectCal(Map<String, Object> params);
List<Map<String, Object>> selectGroup(Map<String, Object> params);
List<Map<String, Object>> selectValue(Map<String, Object> params);
List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params);
}

@ -0,0 +1,17 @@
package com.service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.entity.ConfigEntity;
import com.utils.PageUtils;
/**
*
*/
public interface ConfigService extends IService<ConfigEntity> {
PageUtils queryPage(Map<String, Object> params,Wrapper<ConfigEntity> wrapper);
}

@ -0,0 +1,37 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.DiscussxianzhiwupinEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.DiscussxianzhiwupinVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.DiscussxianzhiwupinView;
/**
*
*
* @author
* @email
* @date
*/
public interface DiscussxianzhiwupinService extends IService<DiscussxianzhiwupinEntity> {
PageUtils queryPage(Map<String, Object> params);
List<DiscussxianzhiwupinVO> selectListVO(Wrapper<DiscussxianzhiwupinEntity> wrapper);
DiscussxianzhiwupinVO selectVO(@Param("ew") Wrapper<DiscussxianzhiwupinEntity> wrapper);
List<DiscussxianzhiwupinView> selectListView(Wrapper<DiscussxianzhiwupinEntity> wrapper);
DiscussxianzhiwupinView selectView(@Param("ew") Wrapper<DiscussxianzhiwupinEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<DiscussxianzhiwupinEntity> wrapper);
}

@ -0,0 +1,37 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.NewsEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.NewsVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.NewsView;
/**
*
*
* @author
* @email
* @date
*/
public interface NewsService extends IService<NewsEntity> {
PageUtils queryPage(Map<String, Object> params);
List<NewsVO> selectListVO(Wrapper<NewsEntity> wrapper);
NewsVO selectVO(@Param("ew") Wrapper<NewsEntity> wrapper);
List<NewsView> selectListView(Wrapper<NewsEntity> wrapper);
NewsView selectView(@Param("ew") Wrapper<NewsEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<NewsEntity> wrapper);
}

@ -0,0 +1,45 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.OrdersEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.OrdersVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.OrdersView;
/**
*
*
* @author
* @email
* @date
*/
public interface OrdersService extends IService<OrdersEntity> {
PageUtils queryPage(Map<String, Object> params);
List<OrdersVO> selectListVO(Wrapper<OrdersEntity> wrapper);
OrdersVO selectVO(@Param("ew") Wrapper<OrdersEntity> wrapper);
List<OrdersView> selectListView(Wrapper<OrdersEntity> wrapper);
OrdersView selectView(@Param("ew") Wrapper<OrdersEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<OrdersEntity> wrapper);
List<Map<String, Object>> selectValue(Map<String, Object> params,Wrapper<OrdersEntity> wrapper);
List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params,Wrapper<OrdersEntity> wrapper);
List<Map<String, Object>> selectGroup(Map<String, Object> params,Wrapper<OrdersEntity> wrapper);
}

@ -0,0 +1,37 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.ShangpinleixingEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.ShangpinleixingVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.ShangpinleixingView;
/**
*
*
* @author
* @email
* @date
*/
public interface ShangpinleixingService extends IService<ShangpinleixingEntity> {
PageUtils queryPage(Map<String, Object> params);
List<ShangpinleixingVO> selectListVO(Wrapper<ShangpinleixingEntity> wrapper);
ShangpinleixingVO selectVO(@Param("ew") Wrapper<ShangpinleixingEntity> wrapper);
List<ShangpinleixingView> selectListView(Wrapper<ShangpinleixingEntity> wrapper);
ShangpinleixingView selectView(@Param("ew") Wrapper<ShangpinleixingEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<ShangpinleixingEntity> wrapper);
}

@ -0,0 +1,37 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.StoreupEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.StoreupVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.StoreupView;
/**
*
*
* @author
* @email
* @date
*/
public interface StoreupService extends IService<StoreupEntity> {
PageUtils queryPage(Map<String, Object> params);
List<StoreupVO> selectListVO(Wrapper<StoreupEntity> wrapper);
StoreupVO selectVO(@Param("ew") Wrapper<StoreupEntity> wrapper);
List<StoreupView> selectListView(Wrapper<StoreupEntity> wrapper);
StoreupView selectView(@Param("ew") Wrapper<StoreupEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<StoreupEntity> wrapper);
}

@ -0,0 +1,26 @@
package com.service;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.entity.TokenEntity;
import com.utils.PageUtils;
/**
* token
*/
public interface TokenService extends IService<TokenEntity> {
PageUtils queryPage(Map<String, Object> params);
List<TokenEntity> selectListView(Wrapper<TokenEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<TokenEntity> wrapper);
String generateToken(Long userid,String username,String tableName, String role);
TokenEntity getTokenEntity(String token);
}

@ -0,0 +1,23 @@
package com.service;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.entity.UsersEntity;
import com.utils.PageUtils;
/**
*
*/
public interface UsersService extends IService<UsersEntity> {
PageUtils queryPage(Map<String, Object> params);
List<UsersEntity> selectListView(Wrapper<UsersEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<UsersEntity> wrapper);
}

@ -0,0 +1,37 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.XianzhiwupinEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.XianzhiwupinVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.XianzhiwupinView;
/**
*
*
* @author
* @email
* @date
*/
public interface XianzhiwupinService extends IService<XianzhiwupinEntity> {
PageUtils queryPage(Map<String, Object> params);
List<XianzhiwupinVO> selectListVO(Wrapper<XianzhiwupinEntity> wrapper);
XianzhiwupinVO selectVO(@Param("ew") Wrapper<XianzhiwupinEntity> wrapper);
List<XianzhiwupinView> selectListView(Wrapper<XianzhiwupinEntity> wrapper);
XianzhiwupinView selectView(@Param("ew") Wrapper<XianzhiwupinEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<XianzhiwupinEntity> wrapper);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save