Merge branch 'api_score_meger'
76 files deleted
433 files modified
476 files added
| | |
| | | .idea/sqlDataSources.xml |
| | | .idea/dynamic.xml |
| | | .idea/uiDesigner.xml |
| | | */resources/generated-sources/* |
| | | # Gradle: |
| | | .idea/gradle.xml |
| | | .idea/ |
| | |
| | | .project |
| | | .classpath |
| | | .settings |
| | | .metadata |
| | | .metadata |
| | | .gitignore |
| | |
| | | </properties> |
| | | </profile> |
| | | <profile> |
| | | <id>mdprd</id> |
| | | <properties> |
| | | <env>mdprd</env> |
| | | </properties> |
| | | </profile> |
| | | <profile> |
| | | <id>xcx</id> |
| | | <properties> |
| | | <env>xcx</env> |
| | |
| | | <id>lhx</id> |
| | | <properties> |
| | | <env>lhx</env> |
| | | </properties> |
| | | </profile> |
| | | <profile> |
| | | <id>xcshop</id> |
| | | <properties> |
| | | <env>xcshop</env> |
| | | </properties> |
| | | </profile> |
| | | </profiles> |
| | |
| | | <artifactId>alibaba-dingtalk-service-sdk</artifactId> |
| | | <version>1.0.1</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <!-- swagger2 start --> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger2</artifactId> |
| | | <version>2.9.2</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.swagger</groupId> |
| | | <artifactId>swagger-annotations</artifactId> |
| | | <version>1.5.23</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.swagger</groupId> |
| | | <artifactId>swagger-models</artifactId> |
| | | <version>1.5.23</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger-ui</artifactId> |
| | | <version>2.9.2</version> |
| | | </dependency> |
| | | <!-- swagger2 end --> |
| | | |
| | | <!-- https://mvnrepository.com/artifact/org.mapstruct/mapstruct --> |
| | | <dependency> |
| | | <groupId>org.mapstruct</groupId> |
| | | <artifactId>mapstruct</artifactId> |
| | | <version>1.3.0.Final</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.baomidou</groupId> |
| | | <artifactId>mybatis-plus-boot-starter</artifactId> |
| | | <version>3.2.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>5.3.1</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.guava</groupId> |
| | | <artifactId>guava</artifactId> |
| | | <version>26.0-jre</version> |
| | | </dependency> |
| | | </dependencies> |
| | | <build> |
| | | <resources> |
| | | <resource> |
| | |
| | | |
| | | <exclude>config/dev/*</exclude> |
| | | <exclude>config/prd/*</exclude> |
| | | <exclude>config/mdprd/*</exclude> |
| | | <exclude>config/test/*</exclude> |
| | | <exclude>config/xcx/*</exclude> |
| | | <exclude>config/xcshop/*</exclude> |
| | | |
| | | <!-- |
| | | |
| | | <exclude>config/config.json</exclude> |
| | | <exclude>config/application.properties</exclude> |
| | | <exclude>config/system.properties</exclude> |
| | | --> |
| | | |
| | | <!-- --> |
| | | <exclude>config/config.json</exclude> |
| | | <exclude>config/application.properties</exclude> |
| | | <exclude>config/system.properties</exclude> |
| | | |
| | | <exclude>**/*.woff</exclude> |
| | | <exclude>**/*.woff2</exclude> |
| | |
| | | <include>**/*.woff2</include> |
| | | <include>**/*.ttf</include> |
| | | <include>**/*.xls</include> |
| | | <include>**/*.xml</include> |
| | | </includes> |
| | | </resource> |
| | | <resource> |
| | |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-compiler-plugin</artifactId> |
| | | <version>3.5.1</version> |
| | | <configuration> |
| | | <source>1.8</source> |
| | | <target>1.8</target> |
| | | <annotationProcessorPaths> |
| | | <path> |
| | | <groupId>org.mapstruct</groupId> |
| | | <artifactId>mapstruct-processor</artifactId> |
| | | <version>1.3.0.Final</version> |
| | | </path> |
| | | <path> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | <version>1.18.12</version> |
| | | </path> |
| | | </annotationProcessorPaths> |
| | | </configuration> |
| | | </plugin> |
| | | |
| | | <!-- 热部署插件 --> |
| | |
| | | </repository> |
| | | |
| | | |
| | | <repository> |
| | | <id>repository.jboss.org-public</id> |
| | | <name>JBoss.org Maven repository</name> |
| | | <url>https://repository.jboss.org/nexus/content/groups/public</url> |
| | | </repository> |
| | | |
| | | |
| | | |
| | | </repositories> |
| | |
| | | package com.matrix; |
| | | |
| | | |
| | | import java.io.FileWriter; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | |
| | | public class TestClass { |
| | | public static void main(String[] args) throws IOException { |
| | |
| | | // printer.printRecord(cells); |
| | | // } |
| | | // printer.flush(); |
| | | // printer.close(); |
| | | // printer.close(); |
| | | long t2 = System.currentTimeMillis(); |
| | | System.out.println("CSV: " + (t2 - t1)); |
| | | } |
| | |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | import org.springframework.scheduling.annotation.EnableAsync; |
| | | |
| | | /** |
| | | * spring boot入口 |
| | |
| | | * @author jiangyouyao |
| | | */ |
| | | @SpringBootApplication |
| | | |
| | | @ComponentScan(basePackages = {"com.matrix.**"}) |
| | | |
| | | @EnableAsync |
| | | public class ZqErpApplication { |
| | | |
| | | public static void main(String[] args) { |
New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: MessageManager.java |
| | | * packageName: com.matrix.component.asyncmessage |
| | | * date: 2021-10-18 14:01 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix.component.asyncmessage; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.core.Ordered; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentLinkedQueue; |
| | | import java.util.concurrent.locks.ReentrantLock; |
| | | import java.util.regex.Pattern; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: AsyncMessageManager |
| | | * @packageName: com.matrix.component.asyncmessage |
| | | * @description: 异步消息管理者 |
| | | * @data: 2021-10-18 14:01 |
| | | **/ |
| | | @Component |
| | | @Order(Ordered.HIGHEST_PRECEDENCE) |
| | | public class AsyncMessageManager implements ApplicationRunner { |
| | | |
| | | @Autowired |
| | | private List<MessageHandler> obs; |
| | | |
| | | private Map<String, List<MessageHandler>> routes; |
| | | |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | if (CollectionUtil.isNotEmpty(obs)) { |
| | | routes = obs.stream().collect(Collectors.groupingBy(MessageHandler::getRouteKey)); |
| | | LogUtil.info("异步消息绑定成功,检测到{} 个消费者,共计{}组", obs.size(), routes.size()); |
| | | } else { |
| | | LogUtil.info("未检测到异步消息处理类"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * map 参数的字符串表示,方便快速拼装消息参数 |
| | | * @param routeKey |
| | | * @param mapStr |
| | | */ |
| | | public void sendMsg(String routeKey, String mapStr,Object... args){ |
| | | |
| | | if(StringUtils.isBlank(mapStr)){ |
| | | throw new IllegalArgumentException("mapStr格式错误:例如:\\\"orderId=123,price=88\\\",mapStr="+mapStr); |
| | | } |
| | | mapStr=String.format(mapStr,args); |
| | | |
| | | Map<String, Object> param =new HashMap<>(); |
| | | String[] paramStr = mapStr.split(","); |
| | | Arrays.asList(paramStr).forEach(item->{ |
| | | String[] keyValueArr = item.split("="); |
| | | param.put(keyValueArr[0],keyValueArr[1]); |
| | | }); |
| | | sendMsg(routeKey,param); |
| | | } |
| | | |
| | | /** |
| | | * 根据route 发送消息到对应的消费者 |
| | | * 这个方法本质上还是同步执行,没有完成效率上的异步解耦,这里做观察者模式主要是为了扩展业务,减少对第三方消息组件的依赖 |
| | | * 而不是解决性能问题,如果后续需要解决性能问题,在加一个消息队列,然后启动线程从队列中进行消息的消费。 |
| | | * @param routeKey |
| | | * @param param |
| | | */ |
| | | public void sendMsg(String routeKey, Map<String, Object> param) { |
| | | |
| | | if(StringUtils.isBlank(routeKey)){ |
| | | LogUtil.warn("发送异步消息失败:routeKey为空"); |
| | | return; |
| | | } |
| | | |
| | | //匹配观察者 |
| | | List<MessageHandler> lisener = new ArrayList<>(); |
| | | for (Map.Entry<String, List<MessageHandler>> routesEntry : routes.entrySet()) { |
| | | if (Pattern.matches(routesEntry.getKey(), routeKey)) { |
| | | lisener.addAll(routesEntry.getValue()); |
| | | } |
| | | } |
| | | |
| | | //通知观察者 |
| | | if (CollectionUtil.isNotEmpty(lisener)) { |
| | | LogUtil.info("发送异步消息,routeKey={},匹配观察者{}个",routeKey,lisener.size()); |
| | | for (MessageHandler messageHandler : lisener) { |
| | | try{ |
| | | messageHandler.handle(param); |
| | | }catch (Throwable t){ |
| | | LogUtil.error("{},处理类执行异常:routeKey={},message={}", messageHandler.getName(),routeKey,t.getMessage()); |
| | | } |
| | | } |
| | | }else{ |
| | | LogUtil.warn("未匹配到routeKey={},的消费者",routeKey); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: MessageHandler.java |
| | | * packageName: com.matrix.component.asyncmessage |
| | | * date: 2021-10-18 13:59 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix.component.asyncmessage; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: MessageHandler |
| | | * @packageName: com.matrix.component.asyncmessage |
| | | * @description: 异步消息处理接口 |
| | | * @data: 2021-10-18 13:59 |
| | | **/ |
| | | public interface MessageHandler { |
| | | |
| | | /** |
| | | * 处理类的名字 |
| | | * @return |
| | | */ |
| | | String getName(); |
| | | |
| | | /** |
| | | * 返回任务的路由key,当有对应key的事件发生时,消息管理器会触发handle方法。 |
| | | * key 支持正则表达式 |
| | | * @return |
| | | */ |
| | | String getRouteKey(); |
| | | |
| | | /** |
| | | * 实际任务处理方法 |
| | | * @param param |
| | | */ |
| | | void handle(Map<String,Object> param); |
| | | |
| | | } |
New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: TestMessageHander.java |
| | | * packageName: com.matrix.component.asyncmessage |
| | | * date: 2021-10-18 16:05 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix.component.asyncmessage; |
| | | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: TestMessageHander |
| | | * @packageName: com.matrix.component.asyncmessage |
| | | * @description: 测试观察者 |
| | | * @data: 2021-10-18 16:05 |
| | | **/ |
| | | @Component |
| | | public class TestMessageHander implements MessageHandler{ |
| | | |
| | | @Override |
| | | public String getName() { |
| | | return "测试观察者"; |
| | | } |
| | | |
| | | @Override |
| | | public String getRouteKey() { |
| | | return "testkey"; |
| | | } |
| | | |
| | | @Override |
| | | public void handle(Map<String, Object> param) { |
| | | try { |
| | | Thread.sleep(1000*5); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | LogUtil.debug(param.toString()); |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: TestMessageHander.java |
| | | * packageName: com.matrix.component.asyncmessage |
| | | * date: 2021-10-18 16:05 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix.component.asyncmessage; |
| | | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: TestMessageHander |
| | | * @packageName: com.matrix.component.asyncmessage |
| | | * @description: 测试观察者 |
| | | * @data: 2021-10-18 16:05 |
| | | **/ |
| | | @Component |
| | | public class TestMessageHander2 implements MessageHandler{ |
| | | |
| | | @Override |
| | | public String getName() { |
| | | return "测试观察者"; |
| | | } |
| | | |
| | | @Override |
| | | public String getRouteKey() { |
| | | return "55y"; |
| | | } |
| | | |
| | | @Override |
| | | public void handle(Map<String, Object> param) { |
| | | try { |
| | | Thread.sleep(1000*5); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | LogUtil.debug(param.toString()); |
| | | } |
| | | } |
| | |
| | | package com.matrix.core.rabbitmq; |
| | | package com.matrix.component.rabbitmq; |
| | | |
| | | import com.matrix.core.exception.GlobleExceptionResolver; |
| | | import com.matrix.core.tools.LogUtil; |
| | |
| | | /** |
| | | * 处理类在spring中的bean名称 |
| | | */ |
| | | private com.matrix.core.rabbitmq.DeliverCallbackAdapter handerAdapter; |
| | | private DeliverCallbackAdapter handerAdapter; |
| | | |
| | | /** |
| | | * 自动确认 默认为true |
| | |
| | | this.queue = queue; |
| | | this.routingKey = routingKey; |
| | | if(hander!=null){ |
| | | this.handerAdapter = new com.matrix.core.rabbitmq.DeliverCallbackAdapter(hander,routingKey); |
| | | this.handerAdapter = new DeliverCallbackAdapter(hander,routingKey); |
| | | } |
| | | |
| | | } |
| | |
| | | this.queue = queue; |
| | | this.routingKey = routingKey; |
| | | if(hander!=null){ |
| | | this.handerAdapter = new com.matrix.core.rabbitmq.DeliverCallbackAdapter(hander,routingKey); |
| | | this.handerAdapter = new DeliverCallbackAdapter(hander,routingKey); |
| | | } |
| | | this.autoAck=autoAck; |
| | | |
| | |
| | | return handerAdapter; |
| | | } |
| | | |
| | | public void setHander(com.matrix.core.rabbitmq.DeliverCallbackAdapter hander) { |
| | | public void setHander(DeliverCallbackAdapter hander) { |
| | | this.handerAdapter = hander; |
| | | } |
| | | } |
| | |
| | | if (task != null) { |
| | | // 消息内容 |
| | | if (StringUtils.isNotBlank(content)) { |
| | | LogUtil.info("本次发送消息task.getExchange()="+task.getExchange()+";routingKey="+routingKey+";content="+content); |
| | | channel.basicPublish(task.getExchange(), routingKey, false, null, content.getBytes()); |
| | | } else { |
| | | LogUtil.info("本次发送空消息"); |
| | |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.CommandLineRunner; |
| | | import org.springframework.stereotype.Component; |
| | | import redis.clients.jedis.Jedis; |
| | | import redis.clients.jedis.JedisPool; |
| | | import redis.clients.jedis.JedisPoolConfig; |
| | |
| | | * @date 2019年2月25日 |
| | | */ |
| | | |
| | | @Component |
| | | public class RedisClient implements CommandLineRunner { |
| | | |
| | | /** |
| | |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.hive.plugin.message.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | /** |
| | |
| | | * @email 935090232@qq.com |
| | | * @date 2018年1月19日 |
| | | */ |
| | | @Component |
| | | public class RedisUserLoginUtils { |
| | | |
| | | @Autowired |
| | |
| | | * @date:2018年1月19日下午3:17:14 |
| | | */ |
| | | public void loginOut() { |
| | | String toke = getUserToken(); |
| | | redisClient.removeObject(toke); |
| | | String token = getUserToken(); |
| | | redisClient.removeObject(token); |
| | | } |
| | | |
| | | |
| | | |
| | | public void updateUserInfo(Object obj) { |
| | | String token = getUserToken(); |
| | | redisClient.saveValue(token, obj); |
| | | LogUtil.debug("更新redis用户"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.component.tools; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import org.apache.http.client.ResponseHandler; |
| | | import org.apache.http.client.methods.HttpPost; |
| | | import org.apache.http.entity.StringEntity; |
| | | import org.apache.http.impl.client.BasicResponseHandler; |
| | | import org.apache.http.impl.client.CloseableHttpClient; |
| | | import org.apache.http.impl.client.HttpClients; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * POST 请求工具 |
| | | */ |
| | | public class HttpClientUtil { |
| | | |
| | | public static JSONObject sendPostWithJson(String url, String json) { |
| | | |
| | | CloseableHttpClient httpClient = HttpClients.createDefault(); |
| | | ResponseHandler<String> responseHandler = new BasicResponseHandler(); |
| | | try { |
| | | //第一步:创建HttpClient对象 |
| | | httpClient = HttpClients.createDefault(); |
| | | |
| | | //第二步:创建httpPost对象 |
| | | HttpPost httpPost = new HttpPost(url); |
| | | |
| | | //第三步:给httpPost设置JSON格式的参数 |
| | | StringEntity requestEntity = new StringEntity(json, "utf-8"); |
| | | requestEntity.setContentEncoding("UTF-8"); |
| | | httpPost.setHeader("Content-type", "application/json"); |
| | | httpPost.setEntity(requestEntity); |
| | | //第四步:发送HttpPost请求,获取返回值 |
| | | String returnValue = httpClient.execute(httpPost, responseHandler); //调接口获取返回值时,必须用此方法 |
| | | return JSON.parseObject(returnValue); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | try { |
| | | httpClient.close(); |
| | | } catch (IOException e) { |
| | | LogUtil.error("http请求发送失败", e); |
| | | throw new GlobleException(e.getMessage()); |
| | | } |
| | | } |
| | | //第五步:处理返回值 |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import java.awt.*; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.io.*; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.MalformedURLException; |
| | | import java.net.URL; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.regex.Matcher; |
| | |
| | | System.out.println("系统字体数:" + fontCount); |
| | | } |
| | | |
| | | |
| | | public static void downloadPicture(String imgUrl,String savePath) { |
| | | URL url = null; |
| | | int imageNumber = 0; |
| | | try { |
| | | |
| | | InputStream inputStream = null; |
| | | HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(imgUrl).openConnection(); |
| | | httpURLConnection.setRequestMethod("GET"); |
| | | httpURLConnection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"); |
| | | httpURLConnection.setRequestProperty("Accept-Encoding", "gzip"); |
| | | httpURLConnection.setRequestProperty("Referer","no-referrer"); |
| | | httpURLConnection.setRequestProperty("Content-Type","application/x-www-form-urlencoded"); |
| | | httpURLConnection.setConnectTimeout(15000); |
| | | httpURLConnection.setReadTimeout(20000); |
| | | inputStream = httpURLConnection.getInputStream(); |
| | | |
| | | |
| | | |
| | | FileOutputStream fileOutputStream = new FileOutputStream(new File(savePath)); |
| | | ByteArrayOutputStream output = new ByteArrayOutputStream(); |
| | | byte[] buffer = new byte[1024]; |
| | | int length; |
| | | while ((length = inputStream.read(buffer)) > 0) { |
| | | output.write(buffer, 0, length); |
| | | } |
| | | byte[] context=output.toByteArray(); |
| | | fileOutputStream.write(output.toByteArray()); |
| | | inputStream.close(); |
| | | fileOutputStream.close(); |
| | | } catch (MalformedURLException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.component.tools; |
| | | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.shopXcx.api.WeChatApiTools; |
| | | import net.sf.json.JSONObject; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 小程序消息模板 |
| | |
| | | public static int sendWxTemplateMsg(List<String> valueList, String openId, |
| | | String page, String tempId, String formId) { |
| | | |
| | | if (StringUtils.isBlank(openId)) { |
| | | return 0; |
| | | } |
| | | |
| | | String access_token = ""; |
| | | try { |
| | | access_token = WeChatApiTools.getAccessToken(); |
| | | } catch (IOException e1) { |
| | | LogUtil.error("获取accesstoken失败", e1.getMessage()); |
| | | } |
| | | // 发送模板URL |
| | | String url = WxApiConstants.XCX_TEMPLATEMSG_SEN.replace("ACCESS_TOKEN", access_token); |
| | | WxTemplate temp = new WxTemplate(); |
| | | // 跳转地址 |
| | | if (StringUtils.isNotBlank(page)) { |
| | | temp.setPage(page); |
| | | } |
| | | temp.setTouser(openId); |
| | | // 消息模版ID |
| | | temp.setTemplateId(tempId); |
| | | |
| | | Map<String, Object> tempLateMsgMap = new HashMap<String, Object>(); |
| | | // 设置模板消息的值 |
| | | for (int i = 0; i < valueList.size(); i++) { |
| | | TemplateData keyword = new TemplateData(); |
| | | keyword.setValue(valueList.get(i)); |
| | | tempLateMsgMap.put(TEMP_KEYWORD + (i + 1), keyword); |
| | | } |
| | | temp.setData(tempLateMsgMap); |
| | | String jsonString = JSONObject.fromObject(temp).toString(); |
| | | |
| | | LogUtil.info("组装模板消息={}", jsonString); |
| | | HttpRequest reqObj = new HttpRequest(); |
| | | HttpResponse result = null; |
| | | try { |
| | | result = reqObj.sendHttpsPost(url, null, jsonString); |
| | | } catch (IOException e) { |
| | | LogUtil.error("发送模板通知出错了", e); |
| | | } |
| | | JSONObject json = JSONObject.fromObject(result.getDataString()); |
| | | LogUtil.info("发送模板消息结果={}", json); |
| | | int res = 0; |
| | | if (json == null) { |
| | | return res; |
| | | } else { |
| | | res = json.getInt(ERRCODE); |
| | | if (res == Integer.parseInt(SEND_ERROR_40001)) { |
| | | String new_access_token = ""; |
| | | try { |
| | | new_access_token = WeChatApiTools.getAccessToken(); |
| | | } catch (IOException e1) { |
| | | LogUtil.error("获取new_access_token失败", e1.getMessage()); |
| | | } |
| | | url = WxApiConstants.XCX_TEMPLATEMSG_SEN.replace("ACCESS_TOKEN", new_access_token); |
| | | try { |
| | | result = reqObj.sendHttpsPost(url, null, jsonString); |
| | | } catch (IOException e) { |
| | | LogUtil.error("发送new_access_token模板通知出错了", e); |
| | | } |
| | | json = JSONObject.fromObject(result.getDataString()); |
| | | if (json == null) { |
| | | return res; |
| | | } else { |
| | | res = json.getInt(ERRCODE); |
| | | if (res != 0) { |
| | | // 添加发送失败 信息 |
| | | LogUtil.info("发送new_access_token模板消息错误错误 errcode:{} errmsg:{}" + "," + json.getInt("errcode") |
| | | + "," + json.getString("errmsg")); |
| | | } else { |
| | | return 1; |
| | | } |
| | | } |
| | | } else if (res != 0) { |
| | | // 添加发送失败 信息 |
| | | LogUtil.info("发送模板消息错误错误 errcode:{} errmsg:{}" + "," + json.getInt("errcode") + "," |
| | | + json.getString("errmsg")); |
| | | } else { |
| | | return 1; |
| | | } |
| | | } |
| | | LogUtil.info("模板消息发送结果:" + res); |
| | | return 0; |
| | | } |
| | | |
| | |
| | | * @param temp {temp} |
| | | */ |
| | | public static void sendSubscribeMsg(WxSubscribeDto temp) { |
| | | String access_token = ""; |
| | | try { |
| | | access_token = WeChatApiTools.getAccessToken(); |
| | | } catch (IOException e1) { |
| | | LogUtil.error("获取accesstoken失败", e1.getMessage()); |
| | | } |
| | | // 发送模板URL |
| | | String url = WxApiConstants.XCX_TEMPLATEMSG_SEN.replace("ACCESS_TOKEN", access_token); |
| | | String jsonString = JSONObject.fromObject(temp).toString(); |
| | | LogUtil.info("组装模板消息={}", jsonString); |
| | | HttpRequest reqObj = new HttpRequest(); |
| | | HttpResponse result = null; |
| | | try { |
| | | result = reqObj.sendHttpsPost(url, null, jsonString); |
| | | } catch (IOException e) { |
| | | LogUtil.error("发送模板通知出错了", e); |
| | | } |
| | | JSONObject json = JSONObject.fromObject(result.getDataString()); |
| | | LogUtil.info("发送模板消息结果={}", json); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | import java.util.Map; |
| | | |
| | | public class WxacodeUtil { |
| | | /** |
| | | * 小程序秘钥 |
| | | */ |
| | | private static final String XCX_SECRET = "xcx_secret"; |
| | | /** |
| | | * 小程序appid |
| | | */ |
| | | private static final String XCX_APPID = "xcx_appid"; |
| | | |
| | | |
| | | |
| | | /** |
| | | * token获取地址 |
| | | */ |
| | |
| | | */ |
| | | private static final String GET_WXACODE ="https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token="; |
| | | |
| | | public static String getWxacode(String scene,String page,String fileName) throws Exception { |
| | | public static String getWxacode(String scene,String page,String fileName,String appid,String secret) throws Exception { |
| | | LogUtil.debug("scene={},page={},fileName={}",scene,page,fileName); |
| | | //获取token |
| | | String appid = PropertiesUtil.getString(XCX_APPID); |
| | | String secret = PropertiesUtil.getString(XCX_SECRET); |
| | | String result1 = get(TOKEN_URL.replace("APPID", appid).replace("SECRET", secret)); |
| | | String access_token = JSONObject.parseObject(result1).getString("access_token"); |
| | | if(StringUtils.isNotBlank(access_token)) { |
| | |
| | | HttpResponse response; |
| | | response = httpClient.execute(httpPost); |
| | | InputStream inputStream = response.getEntity().getContent(); |
| | | /*Object inputObj= response.getEntity().getContent(); |
| | | if(inputObj instanceof InputStream){ |
| | | String strError = streamToString(inputStream,"GBK"); |
| | | LogUtil.info("-------------二维码生成------"+strError); |
| | | return "error:" + strError; |
| | | }*/ |
| | | |
| | | // 图片保存目录路径 |
| | | String baseSavePath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH); |
| | |
| | | if(!targetFile.exists()){ |
| | | targetFile.mkdirs(); |
| | | } |
| | | |
| | | /*String inputstreamtofile = inputstreamtofile(inputStream, targetFile); |
| | | if(null != inputstreamtofile){ |
| | | return inputstreamtofile; |
| | | }*/ |
| | | |
| | | // 创建图片文件夹 |
| | | baseSavePath += "wxacode" + File.separatorChar; |
| | |
| | | String qrcodePath = baseSavePath + fileName + ".png"; |
| | | FileOutputStream out = new FileOutputStream(qrcodePath); |
| | | LogUtil.debug("qrcodePath:{}",qrcodePath); |
| | | //本地调试创建(不用删) |
| | | /*String filePath = "e:/test.png"; |
| | | File file = new File(filePath); |
| | | if (!file.exists()) { |
| | | file.mkdir(); |
| | | } |
| | | FileOutputStream outs = new FileOutputStream(file);*/ |
| | | |
| | | byte[] buffer = new byte[1024]; |
| | | int bytesRead = 0; |
| | | while((bytesRead = inputStream.read(buffer, 0, 1024)) != -1) { |
| | | out.write(buffer, 0, bytesRead); |
| | | //outs.write(buffer, 0, bytesRead); |
| | | |
| | | } |
| | | out.flush(); |
| | | out.close(); |
| | | //outs.flush(); |
| | | //outs.close(); |
| | | |
| | | return qrcodePath; |
| | | } else { |
New file |
| | |
| | | package com.matrix.component.websoket; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 扫码登录接收参数 |
| | | */ |
| | | @Data |
| | | public class ScanQrCodeLoginDto { |
| | | |
| | | /** |
| | | * 登录操作 1.登录 |
| | | */ |
| | | public static final Integer LOGIN_OPERATION_LOGIN=1; |
| | | |
| | | /** |
| | | * 登录操作 2取消登录 |
| | | */ |
| | | public static final Integer LOGIN_OPERATION_CANCEL=2; |
| | | /** |
| | | * 指令类型 1,已扫码 |
| | | */ |
| | | public static final Integer MSG_TYPE_SCAN=1; |
| | | /** |
| | | * 指令类型 2登录确认 |
| | | */ |
| | | public static final Integer MSG_TYPE_LOGIN=2; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 网页客户端id,浏览器生成 |
| | | */ |
| | | String webClientId; |
| | | |
| | | /** |
| | | * 二维码登录key |
| | | */ |
| | | String loginQrCodeKey; |
| | | |
| | | /** |
| | | * app登录用户ID |
| | | */ |
| | | Long appUserId; |
| | | |
| | | /** |
| | | * 登录操作 1.登录,2取消登录 |
| | | */ |
| | | Integer loginOperation; |
| | | |
| | | /** |
| | | * 指令类型 1,已扫码,2登录确认, |
| | | */ |
| | | Integer msgType; |
| | | |
| | | |
| | | } |
| | |
| | | private static final List<WebSoketMessageObserver> observerList=new ArrayList<>(); |
| | | |
| | | |
| | | |
| | | public WebSocketPushHandler(){ |
| | | LogUtil.info("WebSocketPushHandler初始化"); |
| | | //注册观察者 |
| | | addObserver(new WebSoketMessageRabbitObserver()); |
| | | //addObserver(new WebSoketMessageRabbitObserver()); |
| | | addObserver(new WebSoketScanQrCodeLoginObserver()); |
| | | } |
| | | /** |
| | | * 用户进入系统监听 |
New file |
| | |
| | | package com.matrix.component.websoket; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.web.socket.CloseStatus; |
| | | import org.springframework.web.socket.TextMessage; |
| | | import org.springframework.web.socket.WebSocketSession; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 扫码登录soket处理类 |
| | | * @author jyy |
| | | */ |
| | | public class WebSoketScanQrCodeLoginObserver implements WebSoketMessageObserver { |
| | | |
| | | |
| | | private static Map<String,Long> scanCash=new HashMap<>(); |
| | | |
| | | |
| | | @Override |
| | | public void userConnection(WebSocketSession session) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void handleTextMessage(WebSocketSession session, TextMessage message) { |
| | | |
| | | |
| | | ScanQrCodeLoginDto commonMessage = (ScanQrCodeLoginDto) JSONObject.toBean(JSONObject.fromObject(message.getPayload()), ScanQrCodeLoginDto.class); |
| | | |
| | | if(ScanQrCodeLoginDto.MSG_TYPE_LOGIN.equals(commonMessage.getMsgType())){ |
| | | //todo 添加安全校验代码 |
| | | scanCash.put(SecureUtil.md5(commonMessage.getLoginQrCodeKey()),commonMessage.getAppUserId()); |
| | | JSONObject jsonObject=new JSONObject(); |
| | | jsonObject.put("loginOperation",commonMessage.getLoginOperation()); |
| | | jsonObject.put("msgType",commonMessage.getMsgType()); |
| | | WebSocketPushHandler.sendMessageToUser(commonMessage.getWebClientId(), new TextMessage(jsonObject.toString())); |
| | | }else if(ScanQrCodeLoginDto.MSG_TYPE_SCAN.equals(commonMessage.getMsgType())){ |
| | | JSONObject jsonObject=new JSONObject(); |
| | | jsonObject.put("msgType",commonMessage.getMsgType()); |
| | | WebSocketPushHandler.sendMessageToUser(commonMessage.getWebClientId(), new TextMessage(jsonObject.toString())); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void afterConnectionClosed(WebSocketSession session, CloseStatus status) { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取扫码的用户id |
| | | * @param webClientId |
| | | * @return |
| | | */ |
| | | public static Long getScanCashValue(String webClientId){ |
| | | return scanCash.remove(SecureUtil.md5(webClientId)); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | import com.matrix.component.wechat.externalInterface.service.RefundService; |
| | | import com.matrix.component.wechat.externalInterface.service.ScanPayQueryService; |
| | | import org.apache.log4j.Logger; |
| | | import org.springframework.beans.BeanUtils; |
| | | |
| | | /** |
| | | * User: rizenguo Date: 2014/12/1 Time: 17:05 |
| | |
| | | log.info("------------------request createPrapareOrder taking :" + totalTimeCost + "ms"+"--response="+payServiceResponseString); |
| | | |
| | | // 将从API返回的XML数据映射到Java对象 |
| | | JsApiPayResData jsApiPayResData = (JsApiPayResData) Util.getObjectFromXML(payServiceResponseString, |
| | | Object data = Util.getObjectFromXML(payServiceResponseString, |
| | | JsApiPayResData.class); |
| | | |
| | | JsApiPayResData jsApiPayResData=new JsApiPayResData(); |
| | | BeanUtils.copyProperties(data,jsApiPayResData); |
| | | return jsApiPayResData; |
| | | } |
| | | |
| | |
| | | package com.matrix.component.wechat.externalInterface.common; |
| | | |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.thoughtworks.xstream.XStream; |
| | | import com.thoughtworks.xstream.io.xml.DomDriver; |
| | | import com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder; |
| | |
| | | } |
| | | |
| | | Logger log=Logger.getLogger(HttpRequest.class); |
| | | |
| | | |
| | | //表示请求器是否已经做了初始化工作 |
| | | private boolean hasInit = false; |
| | | |
| | |
| | | |
| | | //HTTP请求器 |
| | | private CloseableHttpClient httpClient; |
| | | //证书地址 |
| | | private String certLocalPath; |
| | | //商户号 |
| | | private String mchId; |
| | | |
| | | public HttpsRequest2() throws UnrecoverableKeyException, KeyManagementException, NoSuchAlgorithmException, KeyStoreException, IOException { |
| | | init(); |
| | | |
| | | } |
| | | |
| | | private void init() throws IOException, KeyStoreException, UnrecoverableKeyException, NoSuchAlgorithmException, KeyManagementException { |
| | | |
| | | KeyStore keyStore = KeyStore.getInstance("PKCS12"); |
| | | FileInputStream instream = new FileInputStream(new File(WechatConfigure.certLocalPath));//加载本地的证书进行https加密传输 |
| | | KeyStore keyStore = KeyStore.getInstance("PKCS12"); |
| | | FileInputStream instream = new FileInputStream(new File(certLocalPath));//加载本地的证书进行https加密传输 |
| | | try { |
| | | keyStore.load(instream,WechatConfigure.certPassword.toCharArray());//设置证书密码 |
| | | keyStore.load(instream, mchId.toCharArray());//设置证书密码 |
| | | } catch (CertificateException e) { |
| | | e.printStackTrace(); |
| | | } catch (NoSuchAlgorithmException e) { |
| | |
| | | } |
| | | // Trust own CA and all self-signed certs |
| | | SSLContext sslcontext = SSLContexts.custom() |
| | | .loadKeyMaterial(keyStore, WechatConfigure.certPassword.toCharArray()) |
| | | .loadKeyMaterial(keyStore, mchId.toCharArray()) |
| | | .build(); |
| | | // Allow TLSv1 protocol only |
| | | SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory( |
| | |
| | | null, |
| | | SSLConnectionSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER); |
| | | |
| | | |
| | | httpClient = HttpClients.custom() |
| | | |
| | | httpClient = HttpClients.custom() |
| | | .setSSLSocketFactory(sslsf) |
| | | .build(); |
| | | // httpClient = HttpClients.custom().build(); |
| | | // httpClient = HttpClients.custom().build(); |
| | | //根据默认超时限制初始化requestConfig |
| | | requestConfig = RequestConfig.custom().setSocketTimeout(socketTimeout).setConnectTimeout(connectTimeout).build(); |
| | | hasInit = true; |
| | |
| | | httpPost.setConfig(requestConfig); |
| | | |
| | | log.info("executing request" + httpPost.getRequestLine()); |
| | | |
| | | |
| | | try { |
| | | HttpResponse response = httpClient.execute(httpPost); |
| | | |
| | | HttpEntity entity = response.getEntity(); |
| | | |
| | | result = EntityUtils.toString(entity, "UTF-8"); |
| | | |
| | | |
| | | log.info("POST back date:" + httpPost.getRequestLine()); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } catch (ConnectionPoolTimeoutException e) { |
| | | // log.e("http get throw ConnectionPoolTimeoutException(wait time out)"); |
| | |
| | | // log.e("http get throw SocketTimeoutException"); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | e.printStackTrace(); |
| | | // log.e("http get throw Exception"); |
| | | |
| | | } finally { |
| | |
| | | * @param socketTimeout 连接时长,默认10秒 |
| | | */ |
| | | public void setSocketTimeout(int socketTimeout) { |
| | | this.socketTimeout = socketTimeout; |
| | | this.socketTimeout = socketTimeout; |
| | | resetRequestConfig(); |
| | | } |
| | | |
| | |
| | | * @param connectTimeout 传输时长,默认30秒 |
| | | */ |
| | | public void setConnectTimeout(int connectTimeout) { |
| | | this.connectTimeout = connectTimeout; |
| | | this.connectTimeout = connectTimeout; |
| | | resetRequestConfig(); |
| | | } |
| | | |
| | |
| | | * @param requestConfig 设置HttpsRequest的请求器配置 |
| | | */ |
| | | public void setRequestConfig(RequestConfig requestConfig) { |
| | | this.requestConfig = requestConfig; |
| | | this.requestConfig = requestConfig; |
| | | } |
| | | |
| | | |
| | | public String getMchId() { |
| | | return mchId; |
| | | } |
| | | |
| | | public void setMchId(String mchId) { |
| | | this.mchId = mchId; |
| | | } |
| | | |
| | | public String getCertLocalPath() { |
| | | return certLocalPath; |
| | | } |
| | | |
| | | public void setCertLocalPath(String certLocalPath) { |
| | | this.certLocalPath = certLocalPath; |
| | | } |
| | | } |
| | |
| | | * @return 签名 |
| | | * @throws IllegalAccessException |
| | | */ |
| | | public static String getSign(Object o) throws IllegalAccessException { |
| | | public static String getSign(Object o,String paySecret) throws IllegalAccessException { |
| | | ArrayList<String> list = new ArrayList<String>(); |
| | | Class<? extends Object> cls = o.getClass(); |
| | | Field[] fields = cls.getDeclaredFields(); |
| | |
| | | sb.append(arrayToSort[i]); |
| | | } |
| | | String result = sb.toString(); |
| | | result += "key=" + WechatConfigure.key; |
| | | result += "key=" +paySecret; |
| | | Util.log("Sign Before MD5:" + result); |
| | | result = MD5.MD5Encode(result).toUpperCase(); |
| | | Util.log("Sign Result:" + result); |
| | | return result; |
| | | } |
| | | |
| | | public static String getSign(Map<String, Object> map) { |
| | | public static String getSign(Map<String, Object> map,String paySecret) { |
| | | ArrayList<String> list = new ArrayList<String>(); |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | if (entry.getValue() != "") { |
| | |
| | | sb.append(arrayToSort[i]); |
| | | } |
| | | String result = sb.toString(); |
| | | result += "key=" + WechatConfigure.key; |
| | | result += "key=" + paySecret; |
| | | Util.log("Sign Before MD5:" + result); |
| | | result = MD5.MD5Encode(result).toUpperCase(); |
| | | Util.log("Sign Result:" + result); |
| | |
| | | * @throws IOException |
| | | * @throws SAXException |
| | | */ |
| | | public static String getSignFromResponseString(String responseString) |
| | | public static String getSignFromResponseString(String responseString,String paySecret) |
| | | throws IOException, SAXException, ParserConfigurationException { |
| | | Map<String, Object> map = XMLParser.getMapFromXML(responseString); |
| | | // 清掉返回数据对象里面的Sign数据(不能把这个数据也加进去进行签名),然后用签名算法进行签名 |
| | | map.put("sign", ""); |
| | | // 将API返回的数据根据用签名算法进行计算新的签名,用来跟API返回的签名进行比较 |
| | | return Signature.getSign(map); |
| | | return Signature.getSign(map,paySecret); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @throws IOException |
| | | * @throws SAXException |
| | | */ |
| | | public static boolean checkIsSignValidFromResponseString(String responseString) |
| | | public static boolean checkIsSignValidFromResponseString(String responseString,String paySecret) |
| | | throws ParserConfigurationException, IOException, SAXException { |
| | | |
| | | Map<String, Object> map = XMLParser.getMapFromXML(responseString); |
| | |
| | | // 清掉返回数据对象里面的Sign数据(不能把这个数据也加进去进行签名),然后用签名算法进行签名 |
| | | map.put("sign", ""); |
| | | // 将API返回的数据根据用签名算法进行计算新的签名,用来跟API返回的签名进行比较 |
| | | String signForAPIResponse = Signature.getSign(map); |
| | | String signForAPIResponse = Signature.getSign(map,paySecret); |
| | | |
| | | if (!signForAPIResponse.equals(signFromAPIResponse)) { |
| | | // 签名验不过,表示这个API返回的数据有可能已经被篡改了 |
| | |
| | | return true; |
| | | } |
| | | |
| | | public static void main(String[] args) throws ParserConfigurationException, IOException, SAXException { |
| | | System.out.println(checkIsSignValidFromResponseString("<xml><appid><![CDATA[wx13515a9204ea669d]]></appid><attach><![CDATA[35f7170585ad4f09b5109cc985b1eec0]]></attach><bank_type><![CDATA[CFT]]></bank_type><cash_fee><![CDATA[1]]></cash_fee><fee_type><![CDATA[CNY]]></fee_type><is_subscribe><![CDATA[N]]></is_subscribe><mch_id><![CDATA[1486409192]]></mch_id><nonce_str><![CDATA[elqhnr10vzaq0wgalf9njjyqwyd7gyr7]]></nonce_str><openid><![CDATA[o8x8E5lqmD9c5rdsjTQ9KWN4-H40]]></openid><out_trade_no><![CDATA[2018090610284198419]]></out_trade_no><result_code><![CDATA[SUCCESS]]></result_code><return_code><![CDATA[SUCCESS]]></return_code><sign><![CDATA[DD04172CDAA60F834163AF3F5B63BE3F]]></sign><time_end><![CDATA[20180906102853]]></time_end><total_fee>1</total_fee><trade_type><![CDATA[JSAPI]]></trade_type><transaction_id><![CDATA[4200000169201809067369627940]]></transaction_id></xml>")); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * |
| | |
| | | public static Object getObjectFromXML(String xml, Class<?> tClass) { |
| | | //将从API返回的XML数据映射到Java对象 |
| | | XStream xStreamForResponseData = new XStream(); |
| | | XStream.setupDefaultSecurity(xStreamForResponseData); |
| | | xStreamForResponseData.allowTypes(new Class[]{tClass}); |
| | | xStreamForResponseData.alias("xml", tClass); |
| | | xStreamForResponseData.ignoreUnknownElements();//暂时忽略掉一些新增的字段 |
| | | return xStreamForResponseData.fromXML(xml); |
| | |
| | | // 这个就是自己要保管好的私有Key了(切记只能放在自己的后台代码里,不能放在任何可能被看到源代码的客户端程序中) |
| | | // 每次自己Post数据给API的时候都要用这个key来对所有字段进行签名,生成的签名会放在Sign这个字段,API收到Post数据的时候也会用同样的签名算法对Post过来的数据进行签名和验证 |
| | | // 收到API的返回的时候也要用这个key来对返回的数据算下签名,跟API的Sign数据进行比较,如果值不一致,有可能数据被第三方给篡改 |
| | | public static final String PAY_NOTIFY_URL="https://xcxhive2.jyymatrix.cc/wxCommon/wxpayCallback"; |
| | | |
| | | // 交易类型 |
| | | public static final String TRADE_TYPE_JSAPI = "JSAPI"; |
| | | public static final String TRADE_TYPE_NATIVE = "NATIVE"; |
| | |
| | | public static final String SIGN_MD5 = "MD5"; |
| | | //域名 |
| | | |
| | | |
| | | // 微信支付秘钥 |
| | | public static String key = "3hbNHPOSXx85rC0QEqvGgIHu1wduT4Qc"; |
| | | |
| | | // 微信分配的公众号ID(开通公众号之后可以获取到) |
| | | public static String appID = "wx3836ab3c1490ff29"; |
| | | |
| | | |
| | | |
| | | // 微信支付分配的商户号ID(开通公众号的微信支付功能之后可以获取到) |
| | | public static String mchID = "1573208361"; |
| | | |
| | | |
| | | public static String web_appID = "1486409192"; |
| | | |
| | | // 受理模式下给子商户分配的子商户号 |
| | | public static String subMchID = ""; |
| | | |
| | | // HTTPS证书的本地路径 |
| | | public static String certLocalPath = "/home/cert/apiclient_cert.p12"; |
| | | |
| | | // HTTPS证书密码,默认密码等于商户号MCHID |
| | | public static String certPassword = "1573208361"; |
| | | |
| | | |
| | | // 是否使用异步线程的方式来上报API测速,默认为异步模式 |
| | | public static boolean useThreadToDoReport = true; |
| | |
| | | private String signType = ""; |
| | | private String paySign = ""; |
| | | |
| | | public BrandWCPayRequestData(String prepay_id){ |
| | | public BrandWCPayRequestData(String prepay_id, String appID, String paySecret){ |
| | | //默认必须设置 |
| | | setAppId(WechatConfigure.appID); |
| | | setAppId(appID); |
| | | //随机字符串,不长于32 位 |
| | | setNonceStr(RandomStringGenerator.getRandomStringByLength(32)); |
| | | setTimeStamp(Long.toString(System.currentTimeMillis() / 1000L)); |
| | | setPrepay_id("prepay_id="+prepay_id); |
| | | //根据API给的签名规则进行签名 【 必须要放在本方法的最后】 |
| | | setSignType(WechatConfigure.SIGN_MD5); |
| | | String sign = Signature.getSign(toMap()); |
| | | String sign = Signature.getSign(toMap(),paySecret); |
| | | setPaySign(sign);//把签名数据设置到Sign这个属性中 |
| | | } |
| | | |
| | |
| | | |
| | | import com.matrix.component.wechat.externalInterface.common.RandomStringGenerator; |
| | | import com.matrix.component.wechat.externalInterface.common.Signature; |
| | | import com.matrix.component.wechat.externalInterface.common.WechatConfigure; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.HashMap; |
| | |
| | | /** |
| | | * 商户号 |
| | | */ |
| | | private String mch_id = ""; |
| | | private String mchid = ""; |
| | | |
| | | private String mch_appid = ""; |
| | | |
| | | /** |
| | | * 商户企业付款单号 |
| | | */ |
| | | private String partner_trade_no = ""; |
| | | |
| | | /** |
| | | * 随机字符串 |
| | | */ |
| | | private String nonce_str = ""; |
| | | |
| | | |
| | | private String check_name = ""; |
| | | |
| | | |
| | | /** |
| | | * 签名 |
| | | */ |
| | | private String sign = ""; |
| | | /** |
| | | * 收款方银行卡号 |
| | | */ |
| | | private String enc_bank_no = ""; |
| | | /** |
| | | * 收款方用户名 |
| | | */ |
| | | private String enc_true_name = ""; |
| | | /** |
| | | * 收款方开户行 |
| | | */ |
| | | private String bank_code = ""; |
| | | |
| | | /** |
| | | * 付款金额 RMB(分) |
| | | */ |
| | |
| | | * 备注 |
| | | */ |
| | | private String desc = ""; |
| | | |
| | | private String openid = ""; |
| | | |
| | | |
| | | public JsApiPayComReqData() { |
| | |
| | | * @param desc 描述 |
| | | * @param outTradeNo 商户企业付款单号 |
| | | * @param totalFee 付款金额 |
| | | * @param bankNo 银行卡号 |
| | | * @param bankTrueName 收款号姓名 |
| | | * @param bankCode 收款号开户行 |
| | | */ |
| | | public JsApiPayComReqData(String desc, String outTradeNo, int totalFee, String bankNo, String bankTrueName, String bankCode) { |
| | | public JsApiPayComReqData(String mchID,String mch_appid,String paySecret ,String desc, String outTradeNo, int totalFee, |
| | | String openid, String check_name, String bankCode) { |
| | | setMch_appid(mch_appid); |
| | | //默认必须设置 |
| | | setMch_id(WechatConfigure.mchID); |
| | | setMchid(mchID); |
| | | setDesc(desc); |
| | | setPartner_trade_no(outTradeNo); |
| | | setAmount(totalFee); |
| | | setOpenid(openid); |
| | | setCheck_name(check_name); |
| | | //随机字符串,不长于32 位 |
| | | setNonce_str(RandomStringGenerator.getRandomStringByLength(32)); |
| | | //根据API给的签名规则进行签名 【 必须要放在本方法的最后】 |
| | | String sign = Signature.getSign(toMap()); |
| | | String sign = Signature.getSign(toMap(),paySecret); |
| | | setSign(sign);//把签名数据设置到Sign这个属性中 |
| | | // setEnc_bank_no(); |
| | | // setEnc_true_name(); |
| | | // setBank_code(); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | public String getMch_id() { |
| | | return mch_id; |
| | | public String getMch_appid() { |
| | | return mch_appid; |
| | | } |
| | | |
| | | public void setMch_id(String mch_id) { |
| | | this.mch_id = mch_id; |
| | | public void setMch_appid(String mch_appid) { |
| | | this.mch_appid = mch_appid; |
| | | } |
| | | |
| | | public String getEnc_bank_no() { |
| | | return enc_bank_no; |
| | | public String getCheck_name() { |
| | | return check_name; |
| | | } |
| | | |
| | | public void setEnc_bank_no(String enc_bank_no) { |
| | | this.enc_bank_no = enc_bank_no; |
| | | public void setCheck_name(String check_name) { |
| | | this.check_name = check_name; |
| | | } |
| | | |
| | | public String getEnc_true_name() { |
| | | return enc_true_name; |
| | | public String getMchid() { |
| | | return mchid; |
| | | } |
| | | |
| | | public void setEnc_true_name(String enc_true_name) { |
| | | this.enc_true_name = enc_true_name; |
| | | } |
| | | |
| | | public String getBank_code() { |
| | | return bank_code; |
| | | } |
| | | |
| | | public void setBank_code(String bank_code) { |
| | | this.bank_code = bank_code; |
| | | public void setMchid(String mchid) { |
| | | this.mchid = mchid; |
| | | } |
| | | |
| | | public String getNonce_str() { |
| | |
| | | this.partner_trade_no = partner_trade_no; |
| | | } |
| | | |
| | | public String getOpenid() { |
| | | return openid; |
| | | } |
| | | |
| | | public void setOpenid(String openid) { |
| | | this.openid = openid; |
| | | } |
| | | |
| | | public int getAmount() { |
| | | return amount; |
| | | } |
| | |
| | | /** |
| | | * 接收微信支付异步通知回调地址 |
| | | */ |
| | | private String notify_url = WechatConfigure.PAY_NOTIFY_URL; |
| | | private String trade_type = WechatConfigure.TRADE_TYPE_JSAPI; |
| | | private String notify_url ; |
| | | private String openid = ""; |
| | | private String limit_pay = ""; |
| | | private String spbill_create_ip = ""; |
| | |
| | | public JsApiPayReqData() { |
| | | } |
| | | |
| | | /** |
| | | /**appID 收款应用id |
| | | * mchID 商户号 |
| | | * @param authCode 这个是扫码终端设备从用户手机上扫取到的支付授权号,这个号是跟用户用来支付的银行卡绑定的,有效期是1分钟 |
| | | * @param body 要支付的商品的描述信息,用户会在支付成功页面里看到这个信息 |
| | | * @param attach 支付订单里面可以填的附加数据,API会将提交的这个附加数据原样返回 |
| | |
| | | * @param timeExpire 订单失效时间,格式同上 |
| | | * @param goodsTag 商品标记,微信平台配置的商品标记,用于优惠券或者满减使用 |
| | | */ |
| | | public JsApiPayReqData(String body,String outTradeNo,int totalFee,String spBillCreateIP,String openid,String attach){ |
| | | public JsApiPayReqData(String appID, String mchID,String paySecret,String notify_url, String body,String outTradeNo,int totalFee,String spBillCreateIP,String openid,String attach){ |
| | | //默认必须设置 |
| | | setAppid(WechatConfigure.appID); |
| | | setMch_id(WechatConfigure.mchID); |
| | | setAppid(appID); |
| | | setMch_id(mchID); |
| | | setNotify_url(notify_url); |
| | | setBody(body); |
| | | setOut_trade_no(outTradeNo); |
| | | setTotal_fee(totalFee); |
| | |
| | | setNonce_str(RandomStringGenerator.getRandomStringByLength(32)); |
| | | setOpenid(openid); |
| | | //根据API给的签名规则进行签名 【 必须要放在本方法的最后】 |
| | | String sign = Signature.getSign(toMap()); |
| | | String sign = Signature.getSign(toMap(),paySecret); |
| | | setSign(sign);//把签名数据设置到Sign这个属性中 |
| | | |
| | | } |
| | | |
| | | public JsApiPayReqData(String body,String outTradeNo,int totalFee,String spBillCreateIP,String attach){ |
| | | public JsApiPayReqData(String appID, String mchID,String paySecret,String notify_url,String body,String outTradeNo,int totalFee,String spBillCreateIP,String attach){ |
| | | //默认必须设置 |
| | | setAppid(WechatConfigure.web_appID); |
| | | setMch_id(WechatConfigure.mchID); |
| | | setAppid(appID); |
| | | setMch_id(mchID); |
| | | setBody(body); |
| | | setNotify_url(notify_url); |
| | | setOut_trade_no(outTradeNo); |
| | | setTotal_fee(totalFee); |
| | | setSpbill_create_ip(spBillCreateIP); |
| | |
| | | //随机字符串,不长于32 位 |
| | | setNonce_str(RandomStringGenerator.getRandomStringByLength(32)); |
| | | //根据API给的签名规则进行签名 【 必须要放在本方法的最后】 |
| | | String sign = Signature.getSign(toMap()); |
| | | String sign = Signature.getSign(toMap(),paySecret); |
| | | setSign(sign);//把签名数据设置到Sign这个属性中 |
| | | } |
| | | |
| | |
| | | //-------------------------------------------------------------------- |
| | | |
| | | //微信分配的公众号ID(开通公众号之后可以获取到) |
| | | setAppid(WechatConfigure.appID); |
| | | //setAppid(WechatConfigure.appID); |
| | | |
| | | //微信支付分配的商户号ID(开通公众号的微信支付功能之后可以获取到) |
| | | setMch_id(WechatConfigure.mchID); |
| | | // setMch_id(WechatConfigure.mchID); |
| | | |
| | | //transaction_id是微信系统为每一笔支付交易分配的订单号,通过这个订单号可以标识这笔交易,它由支付订单API支付成功时返回的数据里面获取到。 |
| | | setTransaction_id(transactionID); |
| | |
| | | setNonce_str(RandomStringGenerator.getRandomStringByLength(32)); |
| | | |
| | | //根据API给的签名规则进行签名 |
| | | String sign = Signature.getSign(toMap()); |
| | | //String sign = Signature.getSign(toMap()); |
| | | setSign(sign);//把签名数据设置到Sign这个属性中 |
| | | |
| | | |
| | |
| | | * @param opUserID 操作员帐号, 默认为商户号 |
| | | * @param refundFeeType 货币类型,符合ISO 4217标准的三位字母代码,默认为CNY(人民币) |
| | | */ |
| | | public RefundReqData(String outTradeNo,String outRefundNo,int totalFee,int refundFee,String opUserID){ |
| | | public RefundReqData(String mchID,String appID,String paySecret ,String outTradeNo,String outRefundNo,int totalFee,int refundFee,String opUserID){ |
| | | |
| | | //微信分配的公众号ID(开通公众号之后可以获取到) |
| | | setAppid(WechatConfigure.appID); |
| | | setAppid(appID); |
| | | |
| | | //微信支付分配的商户号ID(开通公众号的微信支付功能之后可以获取到) |
| | | setMch_id(WechatConfigure.mchID); |
| | | setMch_id(mchID); |
| | | |
| | | //transaction_id是微信系统为每一笔支付交易分配的订单号,通过这个订单号可以标识这笔交易,它由支付订单API支付成功时返回的数据里面获取到。 |
| | | //setTransaction_id(transactionID); |
| | |
| | | setNonce_str(RandomStringGenerator.getRandomStringByLength(32)); |
| | | |
| | | //根据API给的签名规则进行签名 |
| | | String sign = Signature.getSign(toMap()); |
| | | String sign = Signature.getSign(toMap(),paySecret); |
| | | setSign(sign);//把签名数据设置到Sign这个属性中 |
| | | |
| | | } |
| | |
| | | public void setServiceRequest(IServiceRequest request){ |
| | | serviceRequest = request; |
| | | } |
| | | |
| | | public IServiceRequest getServiceRequest() { |
| | | return serviceRequest; |
| | | } |
| | | } |
| | |
| | | package com.matrix.component.wechat.externalInterface.weixinUtil; |
| | | |
| | | import com.matrix.component.wechat.externalInterface.common.HttpsRequest2; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | |
| | | import com.matrix.component.wechat.externalInterface.service.JsApiPayComService; |
| | | import com.matrix.component.wechat.externalInterface.service.RefundService; |
| | | import com.matrix.component.wechat.externalInterface.service.ScanPayQueryService; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil; |
| | | import org.apache.log4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private WxShopOrderUtil wxShopOrderUtil; |
| | | |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 支付"175.9.82.254" |
| | |
| | | * @return 预支付订单返回的结果对象(该结果对象已封装),在H5页面使用该对象信息 |
| | | * @throws Exception |
| | | */ |
| | | public BrandWCPayRequestData createOrder(String desc,String outTradeNo, int price, String openId,String attach) throws Exception { |
| | | public BrandWCPayRequestData createOrder(String desc, String outTradeNo, int price, String openId, String attach) throws Exception { |
| | | Long companyId=HostInterceptor.getCompanyId(); |
| | | BusParameterSettings notifyUrl = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_NOTIFYURL, companyId); |
| | | return buildBrandWCPayRequestData(desc, outTradeNo, price, openId, attach, notifyUrl); |
| | | } |
| | | |
| | | /** |
| | | * 创建充值订单 |
| | | */ |
| | | public BrandWCPayRequestData createRechargeOrder(String desc, String outTradeNo, int price, String openId, String attach) throws Exception { |
| | | Long companyId=HostInterceptor.getCompanyId(); |
| | | BusParameterSettings notifyUrl = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_RECHARGE_NOTIFYURL, companyId); |
| | | return buildBrandWCPayRequestData(desc, outTradeNo, price, openId, attach, notifyUrl); |
| | | } |
| | | |
| | | |
| | | |
| | | private BrandWCPayRequestData buildBrandWCPayRequestData(String desc, String outTradeNo, int price, String openId, String attach, BusParameterSettings notifyUrl) throws Exception { |
| | | // 创建微信支付预付接口 |
| | | JsApiPayBusiness jsApiPayBusiness = new JsApiPayBusiness(); |
| | | String idAddr = getIpAddr(WebUtil.getRequest()); |
| | | JsApiPayReqData jsApiPayReqData = new JsApiPayReqData(desc, outTradeNo, price, idAddr, openId, attach); |
| | | |
| | | Long companyId=HostInterceptor.getCompanyId(); |
| | | |
| | | BusParameterSettings mchID = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_MCHID, companyId); |
| | | BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, companyId); |
| | | |
| | | |
| | | BusParameterSettings appId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId); |
| | | |
| | | JsApiPayReqData jsApiPayReqData = new JsApiPayReqData(appId.getParamValue(),mchID.getParamValue(), |
| | | paySecret.getParamValue(), |
| | | notifyUrl.getParamValue(), |
| | | desc, outTradeNo, price, idAddr, openId, attach); |
| | | |
| | | // 创建预付订单并返回请求结果 |
| | | JsApiPayResData result = jsApiPayBusiness.createPrapareOrder(jsApiPayReqData); |
| | | // 把预付订单的信息存放在request域中 |
| | |
| | | LogUtil.info("#---签名信息:return_msg = {}" , result.getReturn_msg()); |
| | | if (result.getReturn_code().equals("SUCCESS")) { |
| | | // 请求成功, 构建BrandWCPayRequest发起支付需要的参数 |
| | | BrandWCPayRequestData payData = new BrandWCPayRequestData(result.getPrepay_id()); |
| | | BrandWCPayRequestData payData = new BrandWCPayRequestData(result.getPrepay_id(),appId.getParamValue(),paySecret.getParamValue()); |
| | | WebUtil.getRequest().setAttribute("payData", payData); |
| | | return payData; |
| | | }else{ |
| | | LogUtil.error("创建微信支付订单失败msg={}",result.getReturn_msg()); |
| | | throw new GlobleException("创建微信支付订单失败,请检查程序配置"); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /**@Description 支付后,向微信发送请求、查询订单,看订单是否真的支付成功了 |
| | | @date 2017年6月27日 |
| | | @atuhor jiangyouyao |
| | |
| | | * @param desc 描述 |
| | | * @param outTradeNo 提现申请编号 |
| | | * @param totalFee 提现金额(分) |
| | | * @param spBillCreateIP 调用接口的IP |
| | | * @param openid |
| | | * @return |
| | | */ |
| | | public JsApiPayComResData comPay(String desc, String outTradeNo,int totalFee, String openid){ |
| | | public JsApiPayComResData comPay(String desc, String outTradeNo,int totalFee, String openid,Long companyId){ |
| | | JsApiPayComResData result=null; |
| | | //boolean flag=false; |
| | | try { |
| | | JsApiPayBusiness jsApiPayBusiness = new JsApiPayBusiness(); |
| | | // TODO 企业付款 |
| | | JsApiPayComReqData jsApiPayComReqData=new JsApiPayComReqData("","",0,"","",""); |
| | | |
| | | BusParameterSettings mchID = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_MCHID, companyId); |
| | | BusParameterSettings appId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId); |
| | | BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, companyId); |
| | | |
| | | BusParameterSettings certLocalPath = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_CERTLOCAL_PATH, companyId); |
| | | |
| | | JsApiPayComReqData jsApiPayComReqData=new JsApiPayComReqData(mchID.getParamValue(), |
| | | appId.getParamValue(), |
| | | paySecret.getParamValue(), |
| | | desc,outTradeNo,totalFee,openid,"NO_CHECK",""); |
| | | JsApiPayComService jsApiPayComService=new JsApiPayComService(); |
| | | |
| | | HttpsRequest2 request2= (HttpsRequest2) jsApiPayComService.getServiceRequest(); |
| | | request2.setCertLocalPath(certLocalPath.getParamValue()); |
| | | request2.setMchId(mchID.getParamValue()); |
| | | |
| | | |
| | | result = jsApiPayBusiness.payComOrder(jsApiPayComService, jsApiPayComReqData); |
| | | |
| | | LogUtil.info("#提现,企业付款到个人---result:{}",result); |
| | | if (result.getResult_code().equals("SUCCESS")) { |
| | | return result; |
| | |
| | | int refundFee, String opUserID){ |
| | | LogUtil.info("#---outTradeNo:{}#---outRefundNo:{}#---totalFee:{}#---refundFee:{}", |
| | | outTradeNo,outRefundNo,totalFee,refundFee); |
| | | BusParameterSettings mchID = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_MCHID, HostInterceptor.getCompanyId()); |
| | | if(opUserID==null){ |
| | | opUserID=WechatConfigure.mchID; |
| | | opUserID=mchID.getParamValue(); |
| | | } |
| | | RefundResData result=null; |
| | | boolean flag=false; |
| | | try { |
| | | JsApiPayBusiness jsApiPayBusiness = new JsApiPayBusiness(); |
| | | RefundReqData refundReqData=new RefundReqData(outTradeNo, outRefundNo, totalFee, refundFee,opUserID); |
| | | Long companyId=HostInterceptor.getCompanyId(); |
| | | BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, companyId); |
| | | BusParameterSettings appId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId); |
| | | BusParameterSettings certLocalPath = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_CERTLOCAL_PATH, companyId); |
| | | |
| | | RefundReqData refundReqData=new RefundReqData(mchID.getParamValue(),appId.getParamValue(),paySecret.getParamValue(), outTradeNo, outRefundNo, totalFee, refundFee,opUserID); |
| | | RefundService refundService=new RefundService(); |
| | | HttpsRequest2 request2= (HttpsRequest2) refundService.getServiceRequest(); |
| | | request2.setCertLocalPath(certLocalPath.getParamValue()); |
| | | request2.setMchId(mchID.getParamValue()); |
| | | |
| | | result = jsApiPayBusiness.refundComOrder(refundService, refundReqData); |
| | | LogUtil.info("#退款,企业付款到个人---result:{}",result); |
| | | //如果返回余额不足时 |
| | |
| | | * @return |
| | | */ |
| | | public String getIpAddr(HttpServletRequest request) { |
| | | String ip = request.getHeader("x-forwarded-for"); |
| | | /* if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("Proxy-Client-IP"); |
| | | } |
| | | if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("WL-Proxy-Client-IP"); |
| | | String ip = request.getHeader("x-forwarded-for"); |
| | | /* if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("Proxy-Client-IP"); |
| | | } |
| | | if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("WL-Proxy-Client-IP"); |
| | | } */ |
| | | if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getRemoteAddr(); |
New file |
| | |
| | | package com.matrix.config; |
| | | |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.cors.CorsConfiguration; |
| | | import org.springframework.web.cors.UrlBasedCorsConfigurationSource; |
| | | import org.springframework.web.filter.CorsFilter; |
| | | |
| | | /** |
| | | * @author JIANGYOUYAO |
| | | * @date 2021/5/29 0029 |
| | | */ |
| | | @Configuration |
| | | public class CrossOriginConfig { |
| | | |
| | | private CorsConfiguration buildConfig() { |
| | | CorsConfiguration corsConfiguration = new CorsConfiguration(); |
| | | corsConfiguration.addAllowedOrigin("*"); |
| | | corsConfiguration.addAllowedHeader("*"); |
| | | corsConfiguration.addAllowedMethod("*"); |
| | | corsConfiguration.setAllowCredentials(true); |
| | | return corsConfiguration; |
| | | } |
| | | |
| | | @Bean |
| | | public CorsFilter corsFilter() { |
| | | UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); |
| | | source.registerCorsConfiguration("/**", buildConfig()); |
| | | return new CorsFilter(source); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | import com.matrix.core.interceptor.WbeCommonInterceptor; |
| | | import com.matrix.system.common.interceptor.ApiUserLoginInterceptor; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.common.interceptor.SuAuthorityInterceptor; |
| | | import com.matrix.system.common.interceptor.UserLoginInterceptor; |
| | |
| | | * @description 容器添加组件 |
| | | * @date 2019-06-14 15:50 |
| | | */ |
| | | @Configuration |
| | | @Configuration() |
| | | @PropertySource("classpath:config/system.properties") |
| | | public class MvcCoreConfig implements WebMvcConfigurer { |
| | | |
| | |
| | | @Autowired |
| | | private WbeCommonInterceptor wbeCommonInterceptor; |
| | | |
| | | @Autowired |
| | | private ApiUserLoginInterceptor apiUserLoginInterceptor; |
| | | |
| | | |
| | | /** |
| | | * 添加拦截器 |
| | |
| | | */ |
| | | @Override |
| | | public void addInterceptors(InterceptorRegistry registry) { |
| | | // 手机端拦截 |
| | | registry.addInterceptor(apiUserLoginInterceptor) |
| | | .addPathPatterns("/api/**") |
| | | .excludePathPatterns("/api/common/**"); |
| | | |
| | | // 公共拦截 |
| | | registry.addInterceptor(wbeCommonInterceptor) |
| | | .addPathPatterns("/**") |
| | | .excludePathPatterns("/css/**") |
| | | .excludePathPatterns("/js/**") |
| | | .excludePathPatterns("/images/**") |
| | | .excludePathPatterns("/plugin/**"); |
| | | .excludePathPatterns("/plugin/**") |
| | | .excludePathPatterns("/swagger**/**") |
| | | .excludePathPatterns("/webjars/**"); |
| | | |
| | | // 用户认证拦截 |
| | | registry.addInterceptor(userLoginInterceptor).addPathPatterns("/**").excludePathPatterns("/common/**").excludePathPatterns("/resource/**"); |
| | | // url权限拦截 |
| | | registry.addInterceptor(suAuthorityInterceptor).addPathPatterns("/**/su/**"); |
| | | registry.addInterceptor(userLoginInterceptor) |
| | | .addPathPatterns("/admin/**"); |
| | | |
| | | |
| | | //小程序公司与域名对应关系拦截 |
| | | registry.addInterceptor(hostInterceptor).addPathPatterns("/**/wxapi/**"); |
| | | registry.addInterceptor(hostInterceptor).addPathPatterns("/**/wxapi/**") |
| | | .addPathPatterns("/api/common/wxLogin/**") |
| | | .addPathPatterns("/api/common/bindUser") |
| | | .addPathPatterns("/api/user/xcxloginOut/**") |
| | | .excludePathPatterns("/wxCommon/wxapi/wxpayCallback") |
| | | .excludePathPatterns("/wxCommon/wxapi/rechargeCallBack"); |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.matrix.config; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-02-22 |
| | | **/ |
| | | @Configuration |
| | | @MapperScan("com.matrix.system.*.dao") |
| | | public class MybatisPlusConfig { |
| | | |
| | | @Bean |
| | | public PaginationInterceptor paginationInterceptor(){ |
| | | return new PaginationInterceptor(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | /* |
| | | package com.matrix.config; |
| | | |
| | | |
| | | import com.matrix.component.rabbitmq.MqTask; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplateFactory; |
| | | import com.matrix.system.shopXcx.mqTask.*; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.system.shopXcx.mqTask.OrderOutSotoreTask; |
| | | import com.matrix.system.shopXcx.mqTask.SalesOrderRefundTask; |
| | | import com.matrix.system.shopXcx.mqTask.SalesOrderTask; |
| | | import com.matrix.system.shopXcx.mqTask.TemplateMsgTask; |
| | | import com.matrix.system.wechart.templateMsg.Task.UniformMsgSentTask; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Configuration |
| | | */ |
| | | /** |
| | | * 小型应用弃用rabbitmq,直接通过观察者模式对消息进行同步消费 参考 AsyncMessageManager |
| | | *//* |
| | | |
| | | //@Configuration |
| | | public class RabbitMqConfig { |
| | | |
| | | @Value("${rabbitmq.host}") |
| | |
| | | |
| | | public static final String MQ_EXCHANGE_A = "hive_exchange_A"; |
| | | |
| | | @Bean |
| | | VipCreateTask VipCreateTask() { |
| | | return new VipCreateTask(); |
| | | } |
| | | //订阅模式 |
| | | public static final String MQ_EXCHANGE_TOPIC = "hive_exchange_fanout"; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Bean |
| | | OrderTask OrderrCreateTask() { |
| | | return new OrderTask(); |
| | | SalesOrderTask SalesOrderTask() { |
| | | return new SalesOrderTask(); |
| | | } |
| | | @Bean |
| | | SalesOrderRefundTask SalesOrderRefundTask() { |
| | | return new SalesOrderRefundTask(); |
| | | } |
| | | |
| | | @Bean |
| | | TemplateMsgTask TemplateMsgTask(){ |
| | | return new TemplateMsgTask(); |
| | | } |
| | | |
| | | @Bean |
| | | UniformMsgSentTask UniformMsgSentTask(){ |
| | | return new UniformMsgSentTask(); |
| | | } |
| | | |
| | | @Bean |
| | |
| | | |
| | | @Bean |
| | | public RabiitMqTemplate rabiitMqTemplate() throws IOException { |
| | | |
| | | LogUtil.info("rabbitmq: {}, {}, {}, {}", host, port, username, password); |
| | | RabiitMqTemplate rabiitMqTemplate = RabiitMqTemplateFactory.buildTemplate(host, port, username, password); |
| | | |
| | | //声明一个交换机 |
| | | rabiitMqTemplate.exchangeDeclare(MQ_EXCHANGE_A+evn, "direct"); |
| | | rabiitMqTemplate.exchangeDeclare(MQ_EXCHANGE_A+"cf", "direct"); |
| | | rabiitMqTemplate.exchangeDeclare(MQ_EXCHANGE_TOPIC +evn, "topic"); |
| | | |
| | | List<MqTask> taskList = new ArrayList<>(); |
| | | |
| | | //注册RabbitMq任务 |
| | | taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.CREATE_VIP + evn, MQTaskRouting.CREATE_VIP + evn, VipCreateTask())); |
| | | taskList.add(new MqTask(MQ_EXCHANGE_A + "cf", MQTaskRouting.CREATE_VIP + evn, MQTaskRouting.CREATE_VIP + evn, null)); |
| | | taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.CREATE_ORDER + evn,MQTaskRouting.CREATE_ORDER + evn,OrderrCreateTask())); |
| | | taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.SEND_TEMPLATE_MSG + evn,MQTaskRouting.SEND_TEMPLATE_MSG + evn, TemplateMsgTask())); |
| | | taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.ORDER_OUT_SOTORE + evn,MQTaskRouting.ORDER_OUT_SOTORE + evn, OrderOutSotoreTask())); |
| | | |
| | | |
| | | |
| | | rabiitMqTemplate.binding(taskList); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | */ |
New file |
| | |
| | | package com.matrix.config; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import springfox.documentation.builders.ApiInfoBuilder; |
| | | import springfox.documentation.builders.ParameterBuilder; |
| | | import springfox.documentation.builders.PathSelectors; |
| | | import springfox.documentation.builders.RequestHandlerSelectors; |
| | | import springfox.documentation.schema.ModelRef; |
| | | import springfox.documentation.service.ApiInfo; |
| | | import springfox.documentation.service.Parameter; |
| | | import springfox.documentation.spi.DocumentationType; |
| | | import springfox.documentation.spring.web.plugins.Docket; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author wzy |
| | | * @Date 2020/5/11 |
| | | * @email wangdoubleone@gmail.com |
| | | * @Version V1.0 |
| | | **/ |
| | | @Configuration |
| | | @EnableSwagger2 |
| | | public class SwaggerConfig { |
| | | |
| | | |
| | | @Value("${swagger.enable}") |
| | | private boolean swaggerEnable; |
| | | |
| | | @Bean |
| | | public Docket createRestApi(){ |
| | | // 添加请求参数,我们这里把token作为请求头部参数传入后端 |
| | | ParameterBuilder parameterBuilder = new ParameterBuilder(); |
| | | List<Parameter> parameters = new ArrayList<Parameter>(); |
| | | parameterBuilder.name("Authorization").description("令牌").modelRef(new ModelRef("string")).parameterType("header") |
| | | .required(false).build(); |
| | | parameters.add(parameterBuilder.build()); |
| | | return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).enable(swaggerEnable).select().apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) |
| | | .paths(PathSelectors.ant("/api/**")).build().globalOperationParameters(parameters).groupName("HIVE"); |
| | | // .ignoredParameterTypes(MemberEntity.class); |
| | | } |
| | | |
| | | private ApiInfo apiInfo(){ |
| | | return new ApiInfoBuilder() |
| | | .title("Hive") |
| | | .description("This is a restful api document of Hive.") |
| | | .version("1.0") |
| | | .build(); |
| | | } |
| | | |
| | | @Bean |
| | | public Docket wxRestApi(){ |
| | | // 添加请求参数,我们这里把token作为请求头部参数传入后端 |
| | | ParameterBuilder parameterBuilder = new ParameterBuilder(); |
| | | List<Parameter> parameters = new ArrayList<Parameter>(); |
| | | parameterBuilder.name("token").description("令牌").modelRef(new ModelRef("string")).parameterType("header") |
| | | .required(true).build(); |
| | | parameters.add(parameterBuilder.build()); |
| | | |
| | | ParameterBuilder parameterBuilder2 = new ParameterBuilder(); |
| | | parameterBuilder2.name("companyCode").description("公司编码tangqiaqia.jyymatrix.cc").modelRef(new ModelRef("string")).parameterType("header") |
| | | .required(true).build(); |
| | | parameters.add(parameterBuilder2.build()); |
| | | |
| | | return new Docket(DocumentationType.SWAGGER_2).apiInfo(wxApiInfo()).enable(swaggerEnable).select().apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) |
| | | .paths(PathSelectors.ant("/wxapi/**")).build().globalOperationParameters(parameters).groupName("小程序接口"); |
| | | // .ignoredParameterTypes(MemberEntity.class); |
| | | } |
| | | |
| | | private ApiInfo wxApiInfo(){ |
| | | return new ApiInfoBuilder() |
| | | .title("Hive Wx") |
| | | .description("This is a restful api document of Hive Wx.") |
| | | .version("1.0") |
| | | .build(); |
| | | } |
| | | |
| | | |
| | | @Bean |
| | | public Docket ERPApi(){ |
| | | // 添加请求参数,我们这里把token作为请求头部参数传入后端 |
| | | ParameterBuilder parameterBuilder = new ParameterBuilder(); |
| | | List<Parameter> parameters = new ArrayList<Parameter>(); |
| | | parameterBuilder.name("token").description("令牌").modelRef(new ModelRef("string")).parameterType("header") |
| | | .required(true).build(); |
| | | parameters.add(parameterBuilder.build()); |
| | | |
| | | |
| | | return new Docket(DocumentationType.SWAGGER_2).apiInfo(ERPApiInfo()).enable(swaggerEnable).select().apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) |
| | | .paths(PathSelectors.ant("/admin/**")).build().globalOperationParameters(parameters).groupName("ERP接口"); |
| | | } |
| | | |
| | | private ApiInfo ERPApiInfo(){ |
| | | return new ApiInfoBuilder() |
| | | .title("Hive ERP") |
| | | .description("This is a restful api document of Hive ERP.") |
| | | .version("1.0") |
| | | .build(); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.config; |
| | | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | @EnableScheduling |
| | | @ConditionalOnProperty(name = "scheduling.enabled", havingValue= "true") |
| | | public class TaskScheduleConfig { |
| | | |
| | | public TaskScheduleConfig(){ |
| | | LogUtil.debug("**********定时任务启动**********"); |
| | | } |
| | | } |
| | |
| | | LogUtil.info("注册WebSocket处理类"); |
| | | registry.addHandler(createWebSocketPushHandler(), "/webSocketServer") |
| | | .addInterceptors(createHhandshakeInterceptor()).setAllowedOrigins("*"); |
| | | |
| | | registry.addHandler(createWebSocketPushHandler(), "/sockjs/webSocketServer") |
| | | .addInterceptors(createHhandshakeInterceptor()).withSockJS(); |
| | | |
New file |
| | |
| | | package com.matrix.core.exception; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import org.springframework.validation.FieldError; |
| | | import org.springframework.web.bind.MethodArgumentNotValidException; |
| | | import org.springframework.web.bind.annotation.ExceptionHandler; |
| | | import org.springframework.web.bind.annotation.RestControllerAdvice; |
| | | |
| | | import javax.validation.ValidationException; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-05-08 15:40 |
| | | **/ |
| | | @RestControllerAdvice |
| | | public class GlobalExceptionHandler { |
| | | |
| | | /** |
| | | * 方法参数校验 |
| | | * |
| | | * @param e |
| | | * @return |
| | | */ |
| | | @ExceptionHandler(value = {MethodArgumentNotValidException.class}) |
| | | public AjaxResult handleException(MethodArgumentNotValidException e) { |
| | | FieldError fieldError = e.getBindingResult().getFieldError(); |
| | | if (fieldError != null) { |
| | | return AjaxResult.buildFailInstance(fieldError.getDefaultMessage()); |
| | | } else { |
| | | return AjaxResult.buildFailInstance("参数校验失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | return message; |
| | | } |
| | | |
| | | public static RuntimeException instance(String msg) { |
| | | return new GlobleException(msg); |
| | | } |
| | | |
| | | public String getErrorCode() { |
| | | return errorCode; |
| | | } |
| | |
| | | import com.matrix.system.common.bean.ProjException; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.ProjExceptionDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.servlet.HandlerExceptionResolver; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | |
| | | |
| | | private static final String TRUE = "true"; |
| | | |
| | | |
| | | /** |
| | | * 忽略一些特定的异常 |
| | | */ |
| | |
| | | import com.matrix.core.tools.InternationaUtil; |
| | | import com.matrix.core.tools.MdcUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.hive.plugin.message.StringUtil; |
| | | import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.HashMap; |
| | |
| | | * info会被国际化工具先处理,找不到国际化资源则显示原始信息 |
| | | **/ |
| | | private String info; |
| | | |
| | | /** |
| | | * 单个对象返回参数 |
| | | */ |
| | | private Object data; |
| | | |
| | | private Map<Object, Object> mapInfo = new HashMap<>(); |
| | | |
| | | private List<?> rows; |
| | | /** |
| | | * 总记录数 |
| | |
| | | |
| | | private String requestId; |
| | | |
| | | public static AjaxResult buildSuccessInstance(Object data) { |
| | | AjaxResult result= new AjaxResult(STATUS_SUCCESS,""); |
| | | result.data=data; |
| | | return result; |
| | | } |
| | | |
| | | |
| | | public static AjaxResult buildSuccessInstance(Object data, String info) { |
| | | AjaxResult result= new AjaxResult(STATUS_SUCCESS,info); |
| | | result.data=data; |
| | | return result; |
| | | } |
| | | |
| | | |
| | | public static AjaxResult buildSuccessInstance(String info) { |
| | |
| | | public static AjaxResult buildSuccessInstance(List<?> rows, Integer total) { |
| | | return new AjaxResult(STATUS_SUCCESS, rows, total); |
| | | } |
| | | |
| | | public static AjaxResult buildSuccessInstance(List<?> rows, long total) { |
| | | return new AjaxResult(STATUS_SUCCESS, rows, Integer.parseInt(total+"")); |
| | | } |
| | | |
| | | |
| | | public static AjaxResult buildSuccessInstance(List<?> rows) { |
| | | return new AjaxResult(STATUS_SUCCESS, rows); |
| | |
| | | * 设置简单信息,这是一个便捷的方法 |
| | | * |
| | | * @param status |
| | | * @param page |
| | | * @param info |
| | | */ |
| | | public AjaxResult(String status, List<?> rows) { |
| | | this.status = status; |
| | |
| | | } |
| | | this.requestId= MdcUtil.getMdc(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | this.requestId = requestId; |
| | | } |
| | | |
| | | public Object getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setData(Object data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | /** |
| | | * 在map对象中放置信息 |
| | | * |
New file |
| | |
| | | package com.matrix.core.pojo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "BaseQueryDto", description = "通用分页查询参数接收类") |
| | | public class BasePageQueryDto { |
| | | |
| | | |
| | | @NotNull(message = "pageNum参数不能为空") |
| | | @ApiModelProperty(value = "第几页", example = "1") |
| | | private Integer pageNum; |
| | | |
| | | @NotNull(message = "pageSize参数不能为空") |
| | | @ApiModelProperty(value ="数量", example = "10") |
| | | private Integer pageSize; |
| | | |
| | | @ApiModelProperty(value ="排序方式", example = "desc") |
| | | private String order; |
| | | |
| | | @ApiModelProperty(value ="排序字段", example = "create_time") |
| | | private String sort; |
| | | |
| | | @ApiModelProperty(value ="关键字") |
| | | private String keywords; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "开始时间") |
| | | private Date beginTime; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "结束时间") |
| | | private Date endTime; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.core.pojo; |
| | | |
| | | /** |
| | | * @author 姜友瑶 E-mail:<935090232@qq.com> |
| | | * @date 2021年1月15日 |
| | | * @description 分页信息类 |
| | | */ |
| | | public class PaginationDto { |
| | | |
| | | /** |
| | | * 起点 |
| | | */ |
| | | private Integer offset = 0; |
| | | /** |
| | | * 查询条数 |
| | | */ |
| | | private Integer limit =15; |
| | | |
| | | /** |
| | | * 排序方式 |
| | | */ |
| | | private String order; |
| | | /** |
| | | * 排序字段 |
| | | */ |
| | | private String sort; |
| | | |
| | | public Integer getOffset() { |
| | | return offset; |
| | | } |
| | | |
| | | public void setOffset(Integer offset) { |
| | | this.offset = offset; |
| | | } |
| | | |
| | | public Integer getLimit() { |
| | | return limit; |
| | | } |
| | | |
| | | public void setLimit(Integer limit) { |
| | | this.limit = limit; |
| | | } |
| | | |
| | | public String getOrder() { |
| | | return order; |
| | | } |
| | | |
| | | public void setOrder(String order) { |
| | | this.order = order; |
| | | } |
| | | |
| | | public String getSort() { |
| | | return propertyToColumn(sort); |
| | | } |
| | | |
| | | public void setSort(String sort) { |
| | | this.sort = sort; |
| | | } |
| | | |
| | | public String propertyToColumn(String property) { |
| | | if(property==null){ |
| | | return null; |
| | | } |
| | | StringBuffer columnName = new StringBuffer(property); |
| | | for (int i = 0; i < columnName.length(); i++) { |
| | | if (columnName.charAt(i) >= 'A' && columnName.charAt(i) <= 'Z') { |
| | | String upcase = "_" + (columnName.charAt(i) + "").toLowerCase(); |
| | | columnName.replace(i, i + 1, upcase); |
| | | } |
| | | } |
| | | return columnName.toString(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * @date 2016年6月24日 |
| | | * @description 分页信息类 |
| | | */ |
| | | public class PaginationVO extends EntityDTO{ |
| | | public class PaginationVO { |
| | | |
| | | /** |
| | | * 起点 |
New file |
| | |
| | | package com.matrix.core.pojo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 通用的验证返回参数 |
| | | */ |
| | | @Data |
| | | public class VerificationResult { |
| | | |
| | | private boolean judgeResult; |
| | | |
| | | private String msg; |
| | | |
| | | private Object info; |
| | | |
| | | private VerificationResult(){ |
| | | |
| | | } |
| | | |
| | | public static VerificationResult buildVerificationResult(boolean judgeResult){ |
| | | VerificationResult obj=new VerificationResult(); |
| | | obj.judgeResult =judgeResult; |
| | | return obj ; |
| | | } |
| | | |
| | | |
| | | public static VerificationResult buildVerificationResult(boolean judgeResult,String msg){ |
| | | VerificationResult obj=new VerificationResult(); |
| | | obj.judgeResult =judgeResult; |
| | | obj.msg=msg; |
| | | return obj ; |
| | | } |
| | | |
| | | |
| | | public static VerificationResult buildVerificationResult(boolean judgeResult,Object info){ |
| | | VerificationResult obj=new VerificationResult(); |
| | | obj.judgeResult =judgeResult; |
| | | obj.info=info; |
| | | return obj ; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | |
| | | |
| | | /** |
| | | * 日期格式化,转换工具类 |
| | | * |
| | | * |
| | | * @author Ron |
| | | * @createTime 2014.08.30 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 返回年份 |
| | | * |
| | | * |
| | | * @param date |
| | | * 日期 |
| | | * @return 返回年份 |
| | |
| | | } |
| | | /** |
| | | * 返回月份 |
| | | * |
| | | * |
| | | * @param date |
| | | * 日期 |
| | | * @return 返回月份 |
| | |
| | | c.setTime(date); |
| | | return c.get(Calendar.MONTH) + 1; |
| | | } catch (Exception e) { |
| | | |
| | | |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | /** |
| | | * 日期转字符串 |
| | | * |
| | | * |
| | | * @param date |
| | | * @param format |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 字符串转日期 |
| | | * |
| | | * |
| | | * @param dateStr |
| | | * @param format |
| | | * @return |
| | |
| | | try { |
| | | return fmt.parse(dateStr); |
| | | } catch (ParseException e) { |
| | | |
| | | |
| | | } |
| | | return null; |
| | | } |
| | |
| | | |
| | | /** |
| | | * 判断给定的日期是一周中的第几天,注意:按照中国的习惯,周日是第七天 |
| | | * |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 指定时间的下一天 |
| | | * |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | |
| | | cal.add(Calendar.DATE, 1); |
| | | return cal.getTime(); |
| | | } catch (Exception e) { |
| | | |
| | | |
| | | } |
| | | |
| | | return null; |
| | |
| | | |
| | | /** |
| | | * 指定时间的前一天 |
| | | * |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | |
| | | cal.add(Calendar.DATE, -1); |
| | | return cal.getTime(); |
| | | } catch (Exception e) { |
| | | |
| | | |
| | | } |
| | | |
| | | return null; |
| | |
| | | |
| | | /** |
| | | * 指定时间的下N天 |
| | | * |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | |
| | | cal.add(Calendar.DATE, nDay); |
| | | return cal.getTime(); |
| | | } catch (Exception e) { |
| | | |
| | | |
| | | } |
| | | |
| | | return null; |
| | |
| | | |
| | | /** |
| | | * 指定时间的前N天 |
| | | * |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | |
| | | cal.add(Calendar.DATE, -nDay); |
| | | return cal.getTime(); |
| | | } catch (Exception e) { |
| | | |
| | | |
| | | } |
| | | |
| | | return null; |
| | |
| | | |
| | | /** |
| | | * 获取一天的起始时间 |
| | | * |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | |
| | | try { |
| | | return fmt.parse(dateStr); |
| | | } catch (ParseException e) { |
| | | |
| | | |
| | | } |
| | | |
| | | return date; |
| | |
| | | |
| | | /** |
| | | * 获取一天的结束时间 |
| | | * |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | |
| | | try { |
| | | return fmt.parse(dateStr); |
| | | } catch (ParseException e) { |
| | | |
| | | |
| | | } |
| | | |
| | | return date; |
| | |
| | | |
| | | /** |
| | | * currentDat是否在referenceDate日期之前 |
| | | * |
| | | * |
| | | * @param referenceDate |
| | | * @param currentDat |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * currentDat是否在referenceDate日期之后 |
| | | * |
| | | * |
| | | * @param referenceDate |
| | | * @param currentDat |
| | | * @return |
| | |
| | | } |
| | | /** |
| | | * 判断currentDate是否在startDate和endDate之间,不包括startDate和endDate |
| | | * |
| | | * |
| | | * @param startDate |
| | | * @param endDate |
| | | * @param currentDate |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取startDate到endDate之间的星期day(中文星期)不包括startDate和endDate |
| | | * |
| | | * |
| | | * @param startDate |
| | | * @param endDate |
| | | * @param day |
| | |
| | | return listDate; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * date转换成Timestamp |
| | | * |
| | | * |
| | | * @param date |
| | | * @param format |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 获取早中晚 |
| | | * |
| | | * |
| | | * @param time |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 获取早中晚的开始时间 |
| | | * |
| | | * |
| | | * @param date |
| | | * @param time |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 获取早中晚的结束时间 |
| | | * |
| | | * |
| | | * @param date |
| | | * @param time |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 得到几天前的时间 |
| | | * |
| | | * |
| | | * @param d |
| | | * @param day |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 得到几天后的时间 |
| | | * |
| | | * |
| | | * @param d |
| | | * @param day |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 将日期类型格式化成字符串 |
| | | * |
| | | * |
| | | * @param date |
| | | * @return 格式化后日期字符串 |
| | | * @throws ParseException |
| | |
| | | |
| | | /** |
| | | * 获取时间戳 |
| | | * |
| | | * |
| | | * @return |
| | | */ |
| | | public static String getTimeMark() { |
| | |
| | | } |
| | | return um; |
| | | } |
| | | |
| | | /** |
| | | * 根据单位计算目标日期 |
| | | * |
| | | * @param num 距离 |
| | | * @param unit 日期单位 Y/M/D |
| | | * @return |
| | | */ |
| | | public static Date calDate(Integer num, String unit) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | Date targetDate = null; |
| | | switch (unit) { |
| | | case "Y": |
| | | calendar.add(Calendar.YEAR, num); |
| | | targetDate = calendar.getTime(); |
| | | break; |
| | | case "M": |
| | | calendar.add(Calendar.MONTH, num); |
| | | targetDate = calendar.getTime(); |
| | | break; |
| | | case "D": |
| | | calendar.add(Calendar.DAY_OF_MONTH, num); |
| | | targetDate = calendar.getTime(); |
| | | break; |
| | | default: |
| | | targetDate = stringToDate("2099-12-31", DATE_FORMAT_DD); |
| | | |
| | | } |
| | | |
| | | return targetDate; |
| | | } |
| | | |
| | | public static String getAgeForBirthDay(Date birthDay) { |
| | | Calendar cal = Calendar.getInstance(); |
| | | if (birthDay == null) { |
| | | return "-"; |
| | | } |
| | | // 出生日期晚于当前时间,无法计算 |
| | | if (cal.before(birthDay)) { |
| | | return "-"; |
| | | } |
| | | // 当前年份 |
| | | int yearNow = cal.get(Calendar.YEAR); |
| | | // 当前月份 |
| | | int monthNow = cal.get(Calendar.MONTH); |
| | | // 当前日期 |
| | | int dayOfMonthNow = cal.get(Calendar.DAY_OF_MONTH); |
| | | cal.setTime(birthDay); |
| | | int yearBirth = cal.get(Calendar.YEAR); |
| | | int monthBirth = cal.get(Calendar.MONTH); |
| | | int dayOfMonthBirth = cal.get(Calendar.DAY_OF_MONTH); |
| | | // 计算整岁数 |
| | | Integer age = yearNow - yearBirth; |
| | | if (monthNow <= monthBirth) { |
| | | if (monthNow == monthBirth) { |
| | | if (dayOfMonthNow < dayOfMonthBirth) { |
| | | // 当前日期在生日之前,年龄减一 |
| | | age--; |
| | | } |
| | | } else { |
| | | age--; |
| | | } |
| | | } |
| | | |
| | | return age.toString(); |
| | | } |
| | | } |
| | |
| | | response = httpclient.execute(httppost); |
| | | if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { |
| | | String result = EntityUtils.toString(response.getEntity(), "utf-8"); |
| | | LogUtil.debug("发送钉钉结果"+result); |
| | | } |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | |
| | | private static final String TR_KEY = "Tr"; |
| | | |
| | | public static void setRequestId() { |
| | | MDC.clear(); |
| | | MDC.remove(TR_KEY); |
| | | MDC.put(TR_KEY, "TR = " + StringUtils.getRandomString(16) + ""); |
| | | } |
| | | |
| | | public static void clearRequestId() { |
| | | MDC.clear(); |
| | | MDC.remove(TR_KEY); |
| | | } |
| | | |
| | | public static String getMdc() { |
| | |
| | | package com.matrix.core.tools; |
| | | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aliyuncs.CommonRequest; |
| | |
| | | import com.aliyuncs.IAcsClient; |
| | | import com.aliyuncs.exceptions.ClientException; |
| | | import com.aliyuncs.http.MethodType; |
| | | import com.google.gson.JsonObject; |
| | | import com.matrix.config.properties.AliSmsProperties; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.system.hive.bean.SysSmsTemplate; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | CommonRequest request = commonRequest(SysSmsTemplate.SMS_ACTION_SEND); |
| | | request.putQueryParameter("PhoneNumbers", phoneNum); |
| | | request.putQueryParameter("TemplateCode", templateCode); |
| | | String jsonStr = JSONObject.toJSONString(values); |
| | | request.putQueryParameter("TemplateParam", jsonStr); |
| | | request.putQueryParameter("TemplateParam", JSONUtil.parse(values).toString()); |
| | | |
| | | CommonResponse response = null; |
| | | try { |
| | |
| | | package com.matrix.core.tools; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | import java.util.UUID; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | import com.matrix.core.exception.GlobleException; |
| | | import net.sourceforge.pinyin4j.PinyinHelper; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; |
| | |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType; |
| | | import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.util.AntPathMatcher; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.*; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | /** |
| | | * 字符串操作类,转换数据类型,切割字符串,对象比较等操作 |
| | |
| | | private static final int SAVA_CHAR_LENGTH = 4; |
| | | |
| | | private static final String EMPTY = ""; |
| | | |
| | | |
| | | /** |
| | | * 查找指定字符串是否匹配指定字符串列表中的任意一个字符串 |
| | | * |
| | | * @param str 指定字符串 |
| | | * @param strs 需要检查的字符串数组 |
| | | * @return 是否匹配 |
| | | */ |
| | | public static boolean matches(String str, List<String> strs) |
| | | { |
| | | if (isBlank(str) || CollectionUtils.isEmpty(strs)) |
| | | { |
| | | return false; |
| | | } |
| | | for (String pattern : strs) |
| | | { |
| | | if (isMatch(pattern, str)) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 判断url是否与规则配置: |
| | | * ? 表示单个字符; |
| | | * * 表示一层路径内的任意字符串,不可跨层级; |
| | | * ** 表示任意层路径; |
| | | * |
| | | * @param pattern 匹配规则 |
| | | * @param url 需要匹配的url |
| | | * @return |
| | | */ |
| | | public static boolean isMatch(String pattern, String url) |
| | | { |
| | | AntPathMatcher matcher = new AntPathMatcher(); |
| | | return matcher.match(pattern, url); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 将字符串中的某些值用指定字符代替 |
| | |
| | | return sb.toString(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 用逗号分开的存的id是否包含对应的id 如比较 123,123,124 中是否包含12这个主键 比对的方法是 字符串中是否包含"^12$" |
| | | * "^12,.*" 或者 ".+,12$" 或者 ".+,12,$" 或者 ".+,12,.+" 字符串 |
| | |
| | | throw new IllegalArgumentException(">>>>>>>>>>> xxl-glue, loadNewInstance error, instance is null"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据字符串获取几个java实例 |
| | | * @param codeSource |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public Object loadInstance(String codeSource) throws Exception{ |
| | | if (codeSource!=null && codeSource.trim().length()>0) { |
| | | Class<?> clazz = groovyClassLoader.parseClass(codeSource); |
| | | if (clazz != null) { |
| | | Object instance = clazz.newInstance(); |
| | | if (instance!=null) { |
| | | this.injectService(instance); |
| | | return instance; |
| | | } |
| | | } |
| | | } |
| | | throw new IllegalArgumentException(">>>>>>>>>>> xxl-glue, loadNewInstance error, instance is null"); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.core.tools.rr; |
| | | |
| | | import com.alibaba.druid.pool.DruidDataSource; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import org.apache.commons.io.FileUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.jdbc.core.JdbcOperations; |
| | | import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public class GroovyDome implements GroovyRunable { |
| | | |
| | | @Override |
| | | @Autowired |
| | | DruidDataSource datasource; |
| | | public AjaxResult run() { |
| | | return new AjaxResult(); |
| | | String tables="back_no, back_test, chy_clean_vip_price, code_relation_ks, crm_order_operator_config, customer_test, dept_batch_no, detail, ds_order_record, erp_adjust_price, erp_adjust_price_detail, erp_approva_apply, erp_approval_record, erp_approver_configuration, erp_business_with_product, erp_business_with_store, erp_conservation_detail, erp_conservation_record, erp_cus_update_record, erp_custom_bf0624, erp_customer, erp_customer_copy1, erp_customer0618, erp_data_dictionary, erp_distribution_detail, erp_distribution_info, erp_ent_business_scope, erp_ent_certificate_info, erp_ent_contact_user, erp_ent_first_practice, erp_ent_first_practice_reocrd, erp_ent_prohibit, erp_enterprise_bank, erp_enterprise_info, erp_export_record, erp_field_update_record, erp_file_upload, erp_function_browse, erp_function_collection, erp_inventory_detail, erp_inventory_enter_detail, erp_inventory_enter_info, erp_inventory_plan_info, erp_message_receive, erp_message_send, erp_order_no_record, erp_order_record, erp_outbound_review, erp_overflow_loss_detail, erp_overflow_loss_info, erp_param_configure, erp_picking_detail, erp_picking_info, erp_print_record, erp_pro_certificate, erp_pro_first_practice, erp_pro_first_practice_reocrd, erp_product_img_detail, erp_product_info, erp_product_other_info, erp_product_prohibit, erp_product_quality_attr, erp_product_revise_price, erp_product_sale_attr, erp_product_stock, erp_purchase_back_detail, erp_purchase_backgoods, erp_purchase_backgoods_copy, erp_purchase_order_detail, erp_purchase_order_info, erp_purchase_plan_detail, erp_purchase_plan_info, erp_purchase_receivegoods, erp_purchase_receivegoods_detail, erp_purchase_rejection, erp_purchase_rejection_detail, erp_quality_review_detail, erp_quality_review_record, erp_recharge_record, erp_region, erp_resource_auth_role, erp_resources_auth, erp_resources_auth_value, erp_resources_group, erp_revise_price_detail, erp_revise_price_info, erp_settings, erp_stock_flow_detail, erp_store_info, erp_table_test_price, erp_value_card_flow, erp_vip_integral_flow, erp_vip_integral_record, erp_vip_integral_rule, erp_vip_type, erp_wait_conservation_record, erp_warehouse_area, erp_warehouses, erp_wave_detail, erp_wave_info, his_item_pay_detail, inventory_allocation, inventory_change_record, item, jiagetiaozheng, lingshoujia, menzhen_0927, pandian, pandianxiugai, pos_aaa, pos_activity, pos_activity_gift_info, pos_activity_gifts, pos_activity_integral, pos_activity_package, pos_activity_product, pos_activity_recharge, pos_activity_with_store, pos_approva_apply, pos_approval_record, pos_bill_template_detail, pos_bill_template_store_default, pos_bucket_record, pos_bucket_record_detail, pos_bucket_stock, pos_business_data, pos_business_data_detail, pos_cashier_handover, pos_conservation_detail, pos_conservation_record, pos_destory_loss_mode, pos_enter_invalid_detail, pos_integral_convert_money, pos_inventory_detail, pos_inventory_enter_detail, pos_inventory_enter_info, pos_inventory_plan_info, pos_item_pay_detail, pos_loss_destory, pos_no_qd_damaged_detail, pos_no_qd_damaged_info, pos_no_qd_move_record, pos_order_stock_detail, pos_overflow_loss_detail, pos_overflow_loss_info, pos_package_product, pos_prescription_record, pos_product_destroy, pos_product_info, pos_product_info_copy1, pos_product_sale_detail, pos_product_stock, pos_product_stock_temp, pos_product_update_record, pos_purchase_back_detail, pos_purchase_back_goods, pos_purchase_plan_detail, pos_purchase_plan_info, pos_purchase_rejection, pos_purchase_rejection_detail, pos_quality_review_detail, pos_quality_review_record, pos_receive_detail, pos_receive_goods, pos_refund_order, pos_refund_order_detail, pos_refund_stock_detail, pos_retail_order, pos_retail_order_detail, pos_retail_package_pro, pos_scatter_stock, pos_scattered_record, pos_scattered_stock, pos_special_product_detail, pos_special_product_info, pos_special_tube_record, pos_stock_flow_detail, pos_temperature_humidity, pos_transfer_slip, pos_transfer_slip_detail, pos_transfer_slip_out_stock, pos_wait_conservation, pos_wholesale_goods, pos_wholesale_plan_detail, pos_wholesale_plan_info, product_info, productCode, qrtz_calendars, qrtz_job_details, qrtz_locks, qrtz_paused_trigger_grps, qrtz_scheduler_state, receive_temp, retail_team, Sheet1, stock_init, stock_price, stock_test, sys_api_access_record, sys_app, sys_button, sys_company, sys_department, sys_fn_btn_rel, sys_function, sys_log, sys_role, sys_role_pwoer_fn, sys_role_pwoer_fn_audit, sys_user_login_record, sys_users, tementiaojia, test_jinheyuan, xlyb, xxl_job_group, xxl_job_info, xxl_job_lock, xxl_job_log, xxl_job_logglue, xxl_job_registry, xxl_job_user"; |
| | | String tableArry[] = StringUtils.stringToArray(tables,","); |
| | | for(String table : tableArry) { |
| | | |
| | | System.out.println("开始处理====》" + table); |
| | | } |
| | | AjaxResult r= AjaxResult.buildSuccessInstance("成功"); |
| | | return r; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String tables="back_no, back_test, chy_clean_vip_price, code_relation_ks, crm_order_operator_config, customer_test, dept_batch_no, detail, ds_order_record, erp_adjust_price, erp_adjust_price_detail, erp_approva_apply, erp_approval_record, erp_approver_configuration, erp_business_with_product, erp_business_with_store, erp_conservation_detail, erp_conservation_record, erp_cus_update_record, erp_custom_bf0624, erp_customer, erp_customer_copy1, erp_customer0618, erp_data_dictionary, erp_distribution_detail, erp_distribution_info, erp_ent_business_scope, erp_ent_certificate_info, erp_ent_contact_user, erp_ent_first_practice, erp_ent_first_practice_reocrd, erp_ent_prohibit, erp_enterprise_bank, erp_enterprise_info, erp_export_record, erp_field_update_record, erp_file_upload, erp_function_browse, erp_function_collection, erp_inventory_detail, erp_inventory_enter_detail, erp_inventory_enter_info, erp_inventory_plan_info, erp_message_receive, erp_message_send, erp_order_no_record, erp_order_record, erp_outbound_review, erp_overflow_loss_detail, erp_overflow_loss_info, erp_param_configure, erp_picking_detail, erp_picking_info, erp_print_record, erp_pro_certificate, erp_pro_first_practice, erp_pro_first_practice_reocrd, erp_product_img_detail, erp_product_info, erp_product_other_info, erp_product_prohibit, erp_product_quality_attr, erp_product_revise_price, erp_product_sale_attr, erp_product_stock, erp_purchase_back_detail, erp_purchase_backgoods, erp_purchase_backgoods_copy, erp_purchase_order_detail, erp_purchase_order_info, erp_purchase_plan_detail, erp_purchase_plan_info, erp_purchase_receivegoods, erp_purchase_receivegoods_detail, erp_purchase_rejection, erp_purchase_rejection_detail, erp_quality_review_detail, erp_quality_review_record, erp_recharge_record, erp_region, erp_resource_auth_role, erp_resources_auth, erp_resources_auth_value, erp_resources_group, erp_revise_price_detail, erp_revise_price_info, erp_settings, erp_stock_flow_detail, erp_store_info, erp_table_test_price, erp_value_card_flow, erp_vip_integral_flow, erp_vip_integral_record, erp_vip_integral_rule, erp_vip_type, erp_wait_conservation_record, erp_warehouse_area, erp_warehouses, erp_wave_detail, erp_wave_info, his_item_pay_detail, inventory_allocation, inventory_change_record, item, jiagetiaozheng, lingshoujia, menzhen_0927, pandian, pandianxiugai, pos_aaa, pos_activity, pos_activity_gift_info, pos_activity_gifts, pos_activity_integral, pos_activity_package, pos_activity_product, pos_activity_recharge, pos_activity_with_store, pos_approva_apply, pos_approval_record, pos_bill_template_detail, pos_bill_template_store_default, pos_bucket_record, pos_bucket_record_detail, pos_bucket_stock, pos_business_data, pos_business_data_detail, pos_cashier_handover, pos_conservation_detail, pos_conservation_record, pos_destory_loss_mode, pos_enter_invalid_detail, pos_integral_convert_money, pos_inventory_detail, pos_inventory_enter_detail, pos_inventory_enter_info, pos_inventory_plan_info, pos_item_pay_detail, pos_loss_destory, pos_no_qd_damaged_detail, pos_no_qd_damaged_info, pos_no_qd_move_record, pos_order_stock_detail, pos_overflow_loss_detail, pos_overflow_loss_info, pos_package_product, pos_prescription_record, pos_product_destroy, pos_product_info, pos_product_info_copy1, pos_product_sale_detail, pos_product_stock, pos_product_stock_temp, pos_product_update_record, pos_purchase_back_detail, pos_purchase_back_goods, pos_purchase_plan_detail, pos_purchase_plan_info, pos_purchase_rejection, pos_purchase_rejection_detail, pos_quality_review_detail, pos_quality_review_record, pos_receive_detail, pos_receive_goods, pos_refund_order, pos_refund_order_detail, pos_refund_stock_detail, pos_retail_order, pos_retail_order_detail, pos_retail_package_pro, pos_scatter_stock, pos_scattered_record, pos_scattered_stock, pos_special_product_detail, pos_special_product_info, pos_special_tube_record, pos_stock_flow_detail, pos_temperature_humidity, pos_transfer_slip, pos_transfer_slip_detail, pos_transfer_slip_out_stock, pos_wait_conservation, pos_wholesale_goods, pos_wholesale_plan_detail, pos_wholesale_plan_info, product_info, productCode, qrtz_calendars, qrtz_job_details, qrtz_locks, qrtz_paused_trigger_grps, qrtz_scheduler_state, receive_temp, retail_team, Sheet1, stock_init, stock_price, stock_test, sys_api_access_record, sys_app, sys_button, sys_company, sys_department, sys_fn_btn_rel, sys_function, sys_log, sys_role, sys_role_pwoer_fn, sys_role_pwoer_fn_audit, sys_user_login_record, sys_users, tementiaojia, test_jinheyuan, xlyb, xxl_job_group, xxl_job_info, xxl_job_lock, xxl_job_log, xxl_job_logglue, xxl_job_registry, xxl_job_user"; |
| | | String tableArry[] = StringUtils.stringToArray(tables,","); |
| | | for(String table : tableArry) { |
| | | |
| | | System.out.println("开始处理====》" + table); |
| | | } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.action; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.activity.dao.ActivitySignAwardSetDao; |
| | | import com.matrix.system.activity.dto.*; |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import com.matrix.system.activity.service.ActivitySignAwardSetService; |
| | | import com.matrix.system.activity.vo.*; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.shopXcx.bean.ShopActivities; |
| | | import com.matrix.system.shopXcx.dao.ShopActivitiesDao; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @description 奖品设置表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "admin/activitySignAwardSet") |
| | | public class ActivitySignAwardSetAction { |
| | | |
| | | @Autowired |
| | | private ActivitySignAwardSetService activitySignAwardSetService; |
| | | @Autowired |
| | | private ShopActivitiesDao shopActivitiesDao; |
| | | @Autowired |
| | | private ActivitySignAwardSetDao activitySignAwardSetDao; |
| | | |
| | | /** |
| | | * 马上创建转盘抽奖 |
| | | */ |
| | | @PostMapping(value = "/createLuckyDrawSet") |
| | | public @ResponseBody |
| | | AjaxResult createLuckyDrawSet() { |
| | | //获取当前登录人员信息 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | //签到活动的唯一性 |
| | | List<ShopActivities> shopActivitiesDone = shopActivitiesDao.selectOneByCompanyIdAndActType(companyId,ShopActivities.ACTIVITIES_TYPE_LUCKYDRAW); |
| | | if(CollUtil.isNotEmpty(shopActivitiesDone)){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "转盘抽奖已经创建,请去活动管理菜单查看"); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, ""); |
| | | } |
| | | |
| | | /** |
| | | * 新增转盘抽奖 |
| | | */ |
| | | @PostMapping(value = "/addLuckyDrawSet") |
| | | public @ResponseBody |
| | | AjaxResult addLuckyDrawSet(@RequestBody AddLuckyDrawSetDto addLuckyDrawSetDto) { |
| | | //获取当前登录人员信息 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | //转盘抽奖活动的唯一性 |
| | | List<ShopActivities> shopActivitiesDone = shopActivitiesDao.selectOneByCompanyIdAndActType(companyId,ShopActivities.ACTIVITIES_TYPE_LUCKYDRAW); |
| | | if(CollUtil.isNotEmpty(shopActivitiesDone)){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "转盘抽奖只能创建一次"); |
| | | } |
| | | |
| | | //新增活动主表信息 |
| | | ShopActivities shopActivities = new ShopActivities(); |
| | | shopActivities.setActName(addLuckyDrawSetDto.getActName()); |
| | | shopActivities.setActCode(addLuckyDrawSetDto.getActCode()); |
| | | shopActivities.setIsStart(ShopActivities.ACTIVITIES_STATUS_CLOSE); |
| | | shopActivities.setActType(ShopActivities.ACTIVITIES_TYPE_LUCKYDRAW); |
| | | shopActivities.setActStatus(ShopActivities.ACTSTATUS_STATUS_RELEASE); |
| | | shopActivities.setActBeginTime(addLuckyDrawSetDto.getBeginTime()); |
| | | shopActivities.setActEndTime(addLuckyDrawSetDto.getEndTime()); |
| | | shopActivities.setCompanyId(companyId); |
| | | shopActivities.setCreateBy(user.getSuName()); |
| | | shopActivities.setUpdateBy(user.getSuName()); |
| | | //将基本信息转换成JSON字符串存储到活动主表的act_content字段 |
| | | LuckyDrawBasicJsonDto luckyDrawBasicJsonDto = addLuckyDrawSetDto.getLuckyDrawBasicJsonDto(); |
| | | String json= JSON.toJSONString(luckyDrawBasicJsonDto); |
| | | shopActivities.setActContent(json); |
| | | int insert = shopActivitiesDao.insert(shopActivities); |
| | | if(insert > 0){ |
| | | //新增活动奖品信息 |
| | | List<ActivitySignAwardSet> activitySignAwardSets = addLuckyDrawSetDto.getLuckyDrawAwardSets(); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSets)) { |
| | | for(ActivitySignAwardSet activitySignAwardSet : activitySignAwardSets) { |
| | | activitySignAwardSet.setCreateBy(user.getSuName()); |
| | | activitySignAwardSet.setCreateTime(new Date()); |
| | | activitySignAwardSet.setUpdateTime(new Date()); |
| | | activitySignAwardSet.setUpdateBy(user.getSuName()); |
| | | activitySignAwardSet.setCompanyId(companyId); |
| | | activitySignAwardSet.setActivityId(shopActivities.getId()); |
| | | activitySignAwardSet.setAwardState(ActivitySignAwardSet.AWARDSTATE_WORK); |
| | | activitySignAwardSetDao.insert(activitySignAwardSet); |
| | | } |
| | | //生成中奖顺序 |
| | | |
| | | Long actId = shopActivities.getId(); |
| | | List<ActivitySignAwardSet> activitySignAwardSetList = activitySignAwardSetDao |
| | | .selectActivitySignAwardSetByActIDAndCompanyIdAndAwardType(actId, companyId, ActivitySignAwardSet.AWARDSTATE_WORK,ActivitySignAwardSet.AWARDRULE_CUMULATIVEDAY); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSetList)){ |
| | | String awrdList = getAwrdList(activitySignAwardSets).toString(); |
| | | ShopActivities shopActivitiesAward = shopActivitiesDao.selectById(actId); |
| | | String actContent = shopActivitiesAward.getActContent(); |
| | | LuckyDrawAwardCodeListVo luckyDrawAwardCodeListVo = JSON.parseObject(actContent, LuckyDrawAwardCodeListVo.class); |
| | | luckyDrawAwardCodeListVo.setAwardLine(awrdList); |
| | | luckyDrawAwardCodeListVo.setAwrdLineIndex(0); |
| | | String awardJson= JSON.toJSONString(luckyDrawAwardCodeListVo); |
| | | shopActivitiesAward.setActContent(awardJson); |
| | | shopActivitiesDao.updateByModel(shopActivitiesAward); |
| | | } |
| | | } |
| | | }else{ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "保存失败"); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功"); |
| | | } |
| | | |
| | | //所有奖品ID后的集合 |
| | | public List getAwrdList(List<ActivitySignAwardSet> activitySignAwardSets){ |
| | | //插入所有奖品ID后的集合 |
| | | LinkedList awardIdFinalList = new LinkedList<>(); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSets)){ |
| | | //总数 |
| | | int maxCount = 0; |
| | | HashMap<Long, ActivitySignAwardSet> integerStringHashMap = new HashMap<>(); |
| | | for(ActivitySignAwardSet activitySignAwardSet : activitySignAwardSets){ |
| | | //总共派发数量 |
| | | int awardInventoryCnt = activitySignAwardSet.getAwardInventoryCnt(); |
| | | integerStringHashMap.put(activitySignAwardSet.getId(),activitySignAwardSet); |
| | | maxCount = maxCount + awardInventoryCnt; |
| | | } |
| | | HashMap<Long, ActivitySignAwardSet> sortHashMap = sortHashMap(integerStringHashMap,2); |
| | | HashMap<Long, ActivitySignAwardSet> sortHashMapAec = sortHashMap(integerStringHashMap,1); |
| | | //获取奖品最多的ID |
| | | Long maxAwardIds = sortHashMap.keySet().stream().findFirst().get(); |
| | | Long minAwardIds = sortHashMapAec.keySet().stream().findFirst().get(); |
| | | //获取最大长度的奖品集合 |
| | | List awardIdList = new LinkedList<Long>(); |
| | | for(int i = 0; i< maxCount ; i++){ |
| | | awardIdList.add(maxAwardIds); |
| | | } |
| | | |
| | | Iterator<Map.Entry<Long, ActivitySignAwardSet>> entries = sortHashMap.entrySet().iterator(); |
| | | //插入奖品 |
| | | while (entries.hasNext()) { |
| | | Map.Entry<Long, ActivitySignAwardSet> entry = entries.next(); |
| | | ActivitySignAwardSet activitySignAwardSetDone = entry.getValue(); |
| | | int awardInventoryCnt = activitySignAwardSetDone.getAwardInventoryCnt(); |
| | | Long awardIdNew = entry.getKey(); |
| | | if(awardIdNew != maxAwardIds){ |
| | | //分段之后的List |
| | | List splitLists = getSplitList(awardInventoryCnt, awardIdList); |
| | | for(int j = 0; j<awardInventoryCnt; j++){ |
| | | List splitList = (List) splitLists.get(j); |
| | | //中间插入对应的奖品ID,如果和maxAwardIds相同,则索引+1 |
| | | List<Long> listInsert = getListInsert(maxAwardIds, awardIdNew, splitList); |
| | | if(minAwardIds == awardIdNew){ |
| | | awardIdFinalList.addAll(listInsert); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return awardIdFinalList; |
| | | } |
| | | |
| | | //中间插入对应的奖品ID,如果和maxAwardIds相同,则索引+1 |
| | | public static List<Long> getListInsert(Long awardOld,Long awardNew,List splitList){ |
| | | //中间位置索引 |
| | | LinkedList<Integer> indexs = new LinkedList<>(); |
| | | int groupFlag = splitList.size() % 2 == 0 ? (splitList.size() / 2) : (splitList.size() / 2 + 1); |
| | | for(int j = groupFlag-1; j < splitList.size();j++){ |
| | | if(splitList.get(j) == awardOld){ |
| | | indexs.add(j); |
| | | } |
| | | } |
| | | if(CollUtil.isNotEmpty(indexs)){ |
| | | splitList.set(indexs.get(0),awardNew); |
| | | }else{ |
| | | splitList.add(groupFlag,awardNew); |
| | | } |
| | | return splitList; |
| | | } |
| | | |
| | | //等份平分数组,最后剩余的添加到倒数第二个集合中 |
| | | public static List<List<Long>> getSplitList(int splitNum, List<Long> list) { |
| | | LinkedList<List<Long>> splitList = new LinkedList<>(); |
| | | // groupFlag >= 1 |
| | | int groupFlag = list.size() % splitNum == 0 ? (list.size() / splitNum) : (list.size() / splitNum); |
| | | if(groupFlag * splitNum < list.size()){ |
| | | for (int j = 1; j <= splitNum +1; j++) { |
| | | if ((j * groupFlag) <= list.size() ) { |
| | | splitList.add(list.subList(j * groupFlag - groupFlag, j * groupFlag)); |
| | | } else if ((j * groupFlag) > list.size()) { |
| | | splitList.add(list.subList(j * groupFlag - groupFlag, list.size())); |
| | | } |
| | | } |
| | | }else if(groupFlag * splitNum > list.size()){ |
| | | for (int j = 1; j < splitNum; j++) { |
| | | if ((j * groupFlag) <= list.size() ) { |
| | | splitList.add(list.subList(j * groupFlag - groupFlag, j * groupFlag)); |
| | | } else if ((j * groupFlag) > list.size()) { |
| | | splitList.add(list.subList(j * groupFlag - groupFlag, list.size())); |
| | | } |
| | | } |
| | | }else{ |
| | | for (int j = 1; j <= splitNum; j++) { |
| | | if ((j * groupFlag) <= list.size() ) { |
| | | splitList.add(list.subList(j * groupFlag - groupFlag, j * groupFlag)); |
| | | } else if ((j * groupFlag) > list.size()) { |
| | | splitList.add(list.subList(j * groupFlag - groupFlag, list.size())); |
| | | } |
| | | } |
| | | } |
| | | return splitList; |
| | | } |
| | | |
| | | |
| | | //对于奖品排序 1:升序进行排,2是倒序就是o2-o1 |
| | | public static HashMap<Long, ActivitySignAwardSet> sortHashMap(HashMap<Long, ActivitySignAwardSet> map,int type) { |
| | | // 首先拿到 map 的键值对集合 |
| | | Set<Map.Entry<Long, ActivitySignAwardSet>> entrySet = map.entrySet(); |
| | | // 将 set 集合转为 List 集合,为什么,为了使用工具类的排序方法 |
| | | List<Map.Entry<Long, ActivitySignAwardSet>> list = new ArrayList<Map.Entry<Long, ActivitySignAwardSet>>(entrySet); |
| | | // 使用 Collections 集合工具类对 list 进行排序,排序规则使用匿名内部类来实现 |
| | | Collections.sort(list, new Comparator<Map.Entry<Long, ActivitySignAwardSet>>() { |
| | | @Override |
| | | public int compare(Map.Entry<Long, ActivitySignAwardSet> o1, Map.Entry<Long, ActivitySignAwardSet> o2) { |
| | | if(type == 2){ |
| | | //按照要求根据 升序进行排,如果是倒序就是o2-o1 |
| | | return o2.getValue().getAwardInventoryCnt() - o1.getValue().getAwardInventoryCnt(); |
| | | } |
| | | return o1.getValue().getAwardInventoryCnt() - o2.getValue().getAwardInventoryCnt(); |
| | | } |
| | | }); |
| | | //创建一个新的有序的 HashMap 子类的集合 |
| | | LinkedHashMap<Long, ActivitySignAwardSet> linkedHashMap = new LinkedHashMap<Long, ActivitySignAwardSet>(); |
| | | //将 List 中的数据存储在 LinkedHashMap 中 |
| | | for (Map.Entry<Long, ActivitySignAwardSet> entry : list) { |
| | | linkedHashMap.put(entry.getKey(), entry.getValue()); |
| | | } |
| | | //返回结果 |
| | | return linkedHashMap; |
| | | } |
| | | |
| | | /** |
| | | *进入修改 |
| | | */ |
| | | @ApiOperation(value = "进入修改") |
| | | @PostMapping(value = "/findLuckyDrawForUpdate") |
| | | public @ResponseBody |
| | | AjaxResult findLuckyDrawForUpdate(@RequestBody LuckyDrawForUpdateDto luckyDrawForUpdateDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(luckyDrawForUpdateDto); |
| | | Long actId = luckyDrawForUpdateDto.getActId(); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | //获取对应的活动主表信息和对应的奖品设置信息 |
| | | AddLuckyDrawSetVo addLuckyDrawSetVo = new AddLuckyDrawSetVo(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | if(ObjectUtil.isNotEmpty(shopActivity)) { |
| | | addLuckyDrawSetVo.setId(actId); |
| | | addLuckyDrawSetVo.setActName(shopActivity.getActName()); |
| | | addLuckyDrawSetVo.setActCode(shopActivity.getActCode()); |
| | | addLuckyDrawSetVo.setBeginTime(shopActivity.getActBeginTime()); |
| | | addLuckyDrawSetVo.setEndTime(shopActivity.getActEndTime()); |
| | | |
| | | String actContent = shopActivity.getActContent(); |
| | | LuckyDrawBasicJsonVo luckyDrawBasicJsonVo = JSON.parseObject(actContent, LuckyDrawBasicJsonVo.class); |
| | | addLuckyDrawSetVo.setLuckyDrawBasicJsonVo(luckyDrawBasicJsonVo); |
| | | |
| | | Map<String, Object> columnMap = new HashMap<String, Object>(); |
| | | columnMap.put("activity_id", actId); |
| | | columnMap.put("company_id", luckyDrawForUpdateDto.getCompanyId()); |
| | | List<ActivitySignAwardSet> activityAwardSets = activitySignAwardSetDao.selectByMap(columnMap); |
| | | addLuckyDrawSetVo.setActivityluckyDrawSets(activityAwardSets); |
| | | } |
| | | result.putInMap("addLuckyDrawSetVo", addLuckyDrawSetVo); |
| | | return result; |
| | | } |
| | | /** |
| | | * 保存 |
| | | */ |
| | | @PostMapping(value = "/updateLuckyDrawSet") |
| | | public @ResponseBody |
| | | AjaxResult updateLuckyDrawSet(@RequestBody UpdateLuckyDrawSetDto updateLuckyDrawSetDto) { |
| | | //获取当前登录人员信息 |
| | | QueryUtil.setQueryLimitCom(updateLuckyDrawSetDto); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long actId = updateLuckyDrawSetDto.getActMainId(); |
| | | Long companyId = user.getCompanyId(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | //更新活动主表信息 |
| | | shopActivity.setActName(updateLuckyDrawSetDto.getActName()); |
| | | shopActivity.setActCode(updateLuckyDrawSetDto.getActCode()); |
| | | shopActivity.setActBeginTime(updateLuckyDrawSetDto.getBeginTime()); |
| | | shopActivity.setActEndTime(updateLuckyDrawSetDto.getEndTime()); |
| | | shopActivity.setCompanyId(companyId); |
| | | shopActivity.setCreateBy(user.getSuName()); |
| | | shopActivity.setUpdateBy(user.getSuName()); |
| | | //将基本信息转换成JSON字符串存储到活动主表的act_content字段 |
| | | LuckyDrawBasicJsonDto luckyDrawBasicJsonDto = updateLuckyDrawSetDto.getLuckyDrawBasicJsonDto(); |
| | | String json=JSON.toJSONString(luckyDrawBasicJsonDto); |
| | | shopActivity.setActContent(json); |
| | | shopActivitiesDao.updateByModel(shopActivity); |
| | | /** |
| | | * 比较两个奖品名单,多的新增,减少的更新为已失效,不变的更新 |
| | | */ |
| | | //原有的奖品 |
| | | ArrayList<Long> arrayListOld = new ArrayList<>(); |
| | | Map<String, Object> columnMap = new HashMap<String, Object>(); |
| | | columnMap.put("activity_id", actId); |
| | | columnMap.put("company_id", updateLuckyDrawSetDto.getCompanyId()); |
| | | List<ActivitySignAwardSet> activitySignAwardSetOld = activitySignAwardSetDao.selectByMap(columnMap); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSetOld)) { |
| | | for(ActivitySignAwardSet activitySignAwardSetUpdate : activitySignAwardSetOld) { |
| | | Long actSubid = activitySignAwardSetUpdate.getId(); |
| | | arrayListOld.add(actSubid); |
| | | } |
| | | } |
| | | //修改后的奖品 |
| | | List<ActivitySignAwardSet> activitySignAwardSetsUpdate = updateLuckyDrawSetDto.getActivityAwardSets(); |
| | | ArrayList<Long> arrayListUpdate = new ArrayList<>(); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSetsUpdate)) { |
| | | for(ActivitySignAwardSet activitySignAwardSetUpdate : activitySignAwardSetsUpdate) { |
| | | Long actSubid = activitySignAwardSetUpdate.getId(); |
| | | //如果ID为空则新增,不为空则修改 |
| | | if(ObjectUtil.isEmpty(actSubid)) { |
| | | activitySignAwardSetUpdate.setCreateBy(user.getSuName()); |
| | | activitySignAwardSetUpdate.setCreateTime(new Date()); |
| | | activitySignAwardSetUpdate.setUpdateTime(new Date()); |
| | | activitySignAwardSetUpdate.setUpdateBy(user.getSuName()); |
| | | activitySignAwardSetUpdate.setCompanyId(companyId); |
| | | activitySignAwardSetUpdate.setActivityId(actId); |
| | | activitySignAwardSetUpdate.setAwardState(ActivitySignAwardSet.AWARDSTATE_WORK); |
| | | activitySignAwardSetDao.insert(activitySignAwardSetUpdate); |
| | | }else { |
| | | activitySignAwardSetUpdate.setAwardState(ActivitySignAwardSet.AWARDSTATE_WORK); |
| | | activitySignAwardSetDao.updateById(activitySignAwardSetUpdate); |
| | | arrayListUpdate.add(actSubid); |
| | | } |
| | | } |
| | | } |
| | | //比较获取原来的比现在多出来的奖品,修改状态为失效 |
| | | boolean removeAll = arrayListOld.removeAll(arrayListUpdate); |
| | | if(removeAll && CollUtil.isNotEmpty(arrayListOld)) { |
| | | for(long id : arrayListOld) { |
| | | ActivitySignAwardSet activitySignAwardSetDel = activitySignAwardSetDao.selectById(id); |
| | | activitySignAwardSetDel.setAwardState(ActivitySignAwardSet.AWARDSTATE_UNWORK); |
| | | activitySignAwardSetDao.updateById(activitySignAwardSetDel); |
| | | } |
| | | } |
| | | |
| | | //生成中奖顺序 |
| | | List<ActivitySignAwardSet> activitySignAwardSetList = activitySignAwardSetDao |
| | | .selectActivitySignAwardSetByActIDAndCompanyIdAndAwardType(actId, companyId, ActivitySignAwardSet.AWARDSTATE_WORK,ActivitySignAwardSet.AWARDRULE_CUMULATIVEDAY); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSetList)){ |
| | | String awrdList = getAwrdList(activitySignAwardSetList).toString(); |
| | | ShopActivities shopActivitiesAward = shopActivitiesDao.selectById(actId); |
| | | String actContent = shopActivitiesAward.getActContent(); |
| | | LuckyDrawAwardCodeListVo luckyDrawAwardCodeListVo = JSON.parseObject(actContent, LuckyDrawAwardCodeListVo.class); |
| | | luckyDrawAwardCodeListVo.setAwardLine(awrdList); |
| | | luckyDrawAwardCodeListVo.setAwrdLineIndex(0); |
| | | String awardJson= JSON.toJSONString(luckyDrawAwardCodeListVo); |
| | | shopActivitiesAward.setActContent(awardJson); |
| | | shopActivitiesDao.updateByModel(shopActivitiesAward); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功"); |
| | | } |
| | | |
| | | public IPage<ActivitiesListVo> findActivitiesList(Page<ActivitiesListVo> page, |
| | | ActivitiesListDto activitiesListDto) { |
| | | return shopActivitiesDao.findActivitiesList(page,activitiesListDto); |
| | | } |
| | | |
| | | /** |
| | | * 马上创建签到活动 |
| | | */ |
| | | @PostMapping(value = "/createSignAwardSet") |
| | | public @ResponseBody |
| | | AjaxResult createSignAwardSet() { |
| | | //获取当前登录人员信息 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | //签到活动的唯一性 |
| | | List<ShopActivities> shopActivitiesDone = shopActivitiesDao.selectOneByCompanyIdAndActType(companyId,ShopActivities.ACTIVITIES_TYPE_SIGN); |
| | | if(CollUtil.isNotEmpty(shopActivitiesDone)){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "签到活动已经创建,请去活动管理菜单查看"); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, ""); |
| | | } |
| | | |
| | | /** |
| | | * 新增签到活动 |
| | | */ |
| | | @PostMapping(value = "/addSignAwardSet") |
| | | public @ResponseBody |
| | | AjaxResult addSignAwardSet(@RequestBody AddSignAwardSetDto addSignAwardSetDto) { |
| | | return activitySignAwardSetService.activitySignAwardSetService(addSignAwardSetDto); |
| | | } |
| | | |
| | | /** |
| | | * 查询优惠券 |
| | | */ |
| | | @ApiOperation(value = "查询优惠券") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = CouponVo.class) |
| | | }) |
| | | @PostMapping(value = "/selectCouponList") |
| | | public @ResponseBody |
| | | AjaxResult selectCouponList(@RequestBody CouponDto couponDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(couponDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(couponDto.getSort())){ |
| | | couponDto.setSort("create_time"); |
| | | couponDto.setOrder("desc"); |
| | | } |
| | | Page<CouponVo> page = new Page(couponDto.getPageNum(), couponDto.getPageSize()); |
| | | IPage<CouponVo> rows = activitySignAwardSetService.selectCouponList(page,couponDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询商品 |
| | | */ |
| | | @ApiOperation(value = "查询商品") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = GoodsVo.class) |
| | | }) |
| | | @PostMapping(value = "/selectGoodsList") |
| | | public @ResponseBody |
| | | AjaxResult selectGoodsList(@RequestBody GoodsDto goodsDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(goodsDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(goodsDto.getSort())){ |
| | | goodsDto.setSort("create_time"); |
| | | goodsDto.setOrder("desc"); |
| | | } |
| | | Page<GoodsVo> page = new Page(goodsDto.getPageNum(), goodsDto.getPageSize()); |
| | | IPage<GoodsVo> rows = activitySignAwardSetService.selectGoodsList(page,goodsDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询活动列表 |
| | | */ |
| | | @ApiOperation(value = "查询活动列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = ActivitiesListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findActivitiesList") |
| | | public @ResponseBody |
| | | AjaxResult findActivitiesList(@RequestBody ActivitiesListDto activitiesListDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(activitiesListDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(activitiesListDto.getSort())){ |
| | | activitiesListDto.setSort("create_time"); |
| | | activitiesListDto.setOrder("desc"); |
| | | } |
| | | Page<ActivitiesListVo> page = new Page(activitiesListDto.getPageNum(), activitiesListDto.getPageSize()); |
| | | IPage<ActivitiesListVo> rows = activitySignAwardSetService.findActivitiesList(page,activitiesListDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *发布 |
| | | */ |
| | | @ApiOperation(value = "发布") |
| | | @PostMapping(value = "/beReady") |
| | | public @ResponseBody |
| | | AjaxResult beReady(@RequestBody BeReadyDto beReadyDto) { |
| | | return activitySignAwardSetService.beReady(beReadyDto); |
| | | } |
| | | |
| | | /** |
| | | *删除 |
| | | */ |
| | | @ApiOperation(value = "删除") |
| | | @PostMapping(value = "/delRow") |
| | | public @ResponseBody |
| | | AjaxResult delRow(@RequestBody DelRowDto delRowDto) { |
| | | return activitySignAwardSetService.delRow(delRowDto); |
| | | } |
| | | |
| | | /** |
| | | *关闭 |
| | | */ |
| | | @ApiOperation(value = "关闭") |
| | | @PostMapping(value = "/beClose") |
| | | public @ResponseBody |
| | | AjaxResult beClose(@RequestBody BeCloseDto beCloseDto) { |
| | | return activitySignAwardSetService.beClose(beCloseDto); |
| | | } |
| | | |
| | | /** |
| | | * 活动统计 |
| | | */ |
| | | @ApiOperation(value = "活动统计") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = SignReceiveListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findSignReceiveList") |
| | | public @ResponseBody |
| | | AjaxResult findSignReceiveList(@RequestBody SignReceiveListDto signReceiveListDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(signReceiveListDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(signReceiveListDto.getSort())){ |
| | | signReceiveListDto.setSort("create_time"); |
| | | signReceiveListDto.setOrder("desc"); |
| | | } |
| | | Page<SignReceiveListVo> page = new Page(signReceiveListDto.getPageNum(), signReceiveListDto.getPageSize()); |
| | | IPage<SignReceiveListVo> rows = activitySignAwardSetService.findSignReceiveList(page,signReceiveListDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *进入修改 |
| | | */ |
| | | @ApiOperation(value = "进入修改") |
| | | @PostMapping(value = "/findSignForUpdate") |
| | | public @ResponseBody |
| | | AjaxResult findSignForUpdate(@RequestBody SignForUpdateDto signForUpdateDto) { |
| | | return activitySignAwardSetService.findSignForUpdate(signForUpdateDto); |
| | | } |
| | | |
| | | /** |
| | | * 保存 |
| | | */ |
| | | @PostMapping(value = "/updateSignAwardSet") |
| | | public @ResponseBody |
| | | AjaxResult updateSignAwardSet(@RequestBody UpdateSignAwardSetDto updateSignAwardSetDto) { |
| | | return activitySignAwardSetService.updateSignAwardSet(updateSignAwardSetDto); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.action; |
| | | import com.matrix.system.activity.service.ActivitySignReceiveRecordService; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | /** |
| | | * @description 领取记录表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "admin/activitySignReceiveRecord") |
| | | public class ActivitySignReceiveRecordAction { |
| | | |
| | | @Autowired |
| | | private ActivitySignReceiveRecordService activitySignReceiveRecordService; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.action; |
| | | |
| | | import com.matrix.system.activity.service.ActivitySignRecordService; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | /** |
| | | * @description 签到记录表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "admin/activitySignRecord") |
| | | public class ActivitySignRecordAction { |
| | | |
| | | @Autowired |
| | | private ActivitySignRecordService activitySignRecordService; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.action; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.activity.dto.LogisticsSubmitDto; |
| | | import com.matrix.system.activity.dto.SignWriteoffDto; |
| | | import com.matrix.system.activity.dto.SignWriteoffListDto; |
| | | import com.matrix.system.activity.dto.WriteoffCodeSubmitDto; |
| | | import com.matrix.system.activity.service.ActivitySignWriteoffService; |
| | | import com.matrix.system.activity.vo.SignWriteoffListVo; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | /** |
| | | * @description 核销记录 |
| | | * @author yourName |
| | | * @date 2021-04-08 14:25 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "admin/activitySignWriteoff") |
| | | public class ActivitySignWriteoffAction { |
| | | |
| | | @Autowired |
| | | private ActivitySignWriteoffService activitySignWriteoffService; |
| | | |
| | | /** |
| | | * 核销记录 |
| | | */ |
| | | @ApiOperation(value = "核销记录") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = SignWriteoffListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findSignWriteoffList") |
| | | public @ResponseBody |
| | | AjaxResult findSignWriteoffList(@RequestBody SignWriteoffListDto signWriteoffListDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(signWriteoffListDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(signWriteoffListDto.getSort())){ |
| | | signWriteoffListDto.setSort("create_time"); |
| | | signWriteoffListDto.setOrder("desc"); |
| | | } |
| | | Page<SignWriteoffListVo> page = new Page(signWriteoffListDto.getPageNum(), signWriteoffListDto.getPageSize()); |
| | | IPage<SignWriteoffListVo> rows = activitySignWriteoffService.findSignWriteoffList(page,signWriteoffListDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *中奖信息 |
| | | */ |
| | | @ApiOperation(value = "中奖信息") |
| | | @PostMapping(value = "/findSignWriteoff") |
| | | public @ResponseBody |
| | | AjaxResult findSignWriteoff(@RequestBody SignWriteoffDto signWriteoffDto) { |
| | | return activitySignWriteoffService.findSignWriteoff(signWriteoffDto); |
| | | } |
| | | |
| | | /** |
| | | *核销验证 |
| | | */ |
| | | @ApiOperation(value = "核销验证") |
| | | @PostMapping(value = "/writeoffCodeSubmit") |
| | | public @ResponseBody |
| | | AjaxResult writeoffCodeSubmit(@RequestBody WriteoffCodeSubmitDto writeoffCodeSubmitDto) { |
| | | return activitySignWriteoffService.writeoffCodeSubmit(writeoffCodeSubmitDto); |
| | | } |
| | | |
| | | /** |
| | | *物流发货 |
| | | */ |
| | | @ApiOperation(value = "物流发货") |
| | | @PostMapping(value = "/logisticsSubmit") |
| | | public @ResponseBody |
| | | AjaxResult logisticsSubmit(@RequestBody LogisticsSubmitDto logisticsSubmitDto) { |
| | | return activitySignWriteoffService.logisticsSubmit(logisticsSubmitDto); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.constant; |
| | | |
| | | public class ActivitySignConstant { |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dao; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import com.matrix.system.shopXcx.api.vo.ActivitySignAwardSetVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 奖品设置表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | public interface ActivitySignAwardSetDao extends BaseMapper<ActivitySignAwardSet>{ |
| | | |
| | | List<ActivitySignAwardSetVo> selectListByActIDAndCompanyId(@Param("actId")Long actId, @Param("companyId")Long companyId,@Param("awardState")int awardstateWork); |
| | | |
| | | List<ActivitySignAwardSetVo> selectListByActIDAndCompanyIdAndAwardType(@Param("actId")Long actId, @Param("companyId")Long companyId |
| | | ,@Param("awardState")int awardstateWork,@Param("awardRule")int awardRule); |
| | | |
| | | List<ActivitySignAwardSet> selectActivitySignAwardSetByActIDAndCompanyIdAndAwardType(@Param("actId")Long actId, @Param("companyId")Long companyId |
| | | ,@Param("awardState")int awardstateWork,@Param("awardRule")int awardRule); |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dao; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.activity.dto.CouponDto; |
| | | import com.matrix.system.activity.dto.GoodsDto; |
| | | import com.matrix.system.activity.dto.SignReceiveListDto; |
| | | import com.matrix.system.activity.entity.ActivitySignReceiveRecord; |
| | | import com.matrix.system.activity.vo.CouponVo; |
| | | import com.matrix.system.activity.vo.GoodsVo; |
| | | import com.matrix.system.activity.vo.SignReceiveListVo; |
| | | import com.matrix.system.shopXcx.api.dto.SeeAwardTextDto; |
| | | import com.matrix.system.shopXcx.api.dto.SignAwardDto; |
| | | import com.matrix.system.shopXcx.api.vo.SeeAwardTextVo; |
| | | import com.matrix.system.shopXcx.api.vo.SignAwardListVo; |
| | | import com.matrix.system.shopXcx.vo.SalesOrderVo; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | public interface ActivitySignReceiveRecordDao extends BaseMapper<ActivitySignReceiveRecord>{ |
| | | |
| | | IPage<SignReceiveListVo> findSignReceiveList(Page<SignReceiveListVo> page, |
| | | @Param("record")SignReceiveListDto signReceiveListDto); |
| | | |
| | | IPage<CouponVo> selectCouponList(Page<CouponVo> page, @Param("record")CouponDto couponDto); |
| | | |
| | | IPage<GoodsVo> selectGoodsList(Page<GoodsVo> page, @Param("record")GoodsDto goodsDto); |
| | | |
| | | int getSignAwardReceiveCount(@Param("userId")Long userId, @Param("companyId")Long companyId); |
| | | |
| | | IPage<SignAwardListVo> selectSignAwardList(Page<SalesOrderVo> page, @Param("record")SignAwardDto signAwardDto); |
| | | |
| | | SeeAwardTextVo selectSeeAwardTextVOById(@Param("record")SeeAwardTextDto seeAwardTextDto); |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dao; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.activity.entity.ActivitySignRecord; |
| | | import com.matrix.system.shopXcx.api.vo.ActivitySignRecordVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 签到记录表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | public interface ActivitySignRecordDao extends BaseMapper<ActivitySignRecord>{ |
| | | |
| | | ActivitySignRecord selectOneByActIdAndUserIdLikesignTime(@Param("actId")long actId, |
| | | @Param("userId")Long userId, @Param("format")Date format); |
| | | |
| | | List<ActivitySignRecordVo> selectRecordByMonth(@Param("actId")Long actId, @Param("userId")Long userId, @Param("date") DateTime date); |
| | | |
| | | List<ActivitySignRecord> selectListByActIdAndUserIdLikesignTime(@Param("actId")long actId, |
| | | @Param("userId")Long userId, @Param("format")Date format); |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dao; |
| | | |
| | | |
| | | import com.matrix.system.shopXcx.bean.ShopDeliveryInfo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.activity.dto.SignWriteoffListDto; |
| | | import com.matrix.system.activity.entity.ActivitySignWriteoff; |
| | | import com.matrix.system.activity.vo.SignWriteoffListVo; |
| | | import com.matrix.system.activity.vo.ZjrVo; |
| | | |
| | | /** |
| | | * @description 核销记录 |
| | | * @author yourName |
| | | * @date 2021-04-08 14:25 |
| | | */ |
| | | public interface ActivitySignWriteoffDao extends BaseMapper<ActivitySignWriteoff>{ |
| | | |
| | | IPage<SignWriteoffListVo> findSignWriteoffList(Page<SignWriteoffListVo> page, |
| | | @Param("record")SignWriteoffListDto signWriteoffListDto); |
| | | |
| | | ZjrVo selectUsernameByUserId(@Param("userId")Long userId, @Param("receiveId")Long receiveId); |
| | | |
| | | ShopDeliveryInfo selectShopDeliveryInfoByLogisticsId(@Param("logisticsId")Integer logisticsId); |
| | | |
| | | ActivitySignWriteoff selectActivitySignWriteoffByUserIDAndReceiveId(@Param("userId")Long userId, @Param("receiveId")long receiveId); |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ActivitiesListDto", description = "查询参数") |
| | | public class ActivitiesListDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String hdmc; |
| | | |
| | | @ApiModelProperty(value ="活动状态") |
| | | private Integer hdzt; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "AddLuckyDrawSetDto", description = "查询参数") |
| | | public class AddLuckyDrawSetDto { |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String actCode; |
| | | @ApiModelProperty(value ="活动开始时间") |
| | | private Date beginTime; |
| | | @ApiModelProperty(value ="活动结束时间") |
| | | private Date endTime; |
| | | |
| | | private LuckyDrawBasicJsonDto luckyDrawBasicJsonDto; |
| | | |
| | | private List<ActivitySignAwardSet> luckyDrawAwardSets; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "AddSignAwardSetDto", description = "查询参数") |
| | | public class AddSignAwardSetDto { |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String actCode; |
| | | @ApiModelProperty(value ="活动开始时间") |
| | | private Date beginTime; |
| | | @ApiModelProperty(value ="活动结束时间") |
| | | private Date endTime; |
| | | |
| | | private SignSetBasicJsonDto signSetBasicJsonDto; |
| | | |
| | | private List<ActivitySignAwardSet> activitySignAwardSets; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "BeCloseDto", description = "参数") |
| | | public class BeCloseDto { |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "BeReadyDto", description = "参数") |
| | | public class BeReadyDto { |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "CouponDto", description = "查询参数") |
| | | public class CouponDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String yhjmc; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "DelRowDto", description = "参数") |
| | | public class DelRowDto { |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "GoodsDto", description = "查询参数") |
| | | public class GoodsDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="商品名称") |
| | | private String cpmc; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LogisticsSubmitDto", description = "查询参数") |
| | | public class LogisticsSubmitDto { |
| | | |
| | | @ApiModelProperty(value ="核销ID") |
| | | private long writeoffId; |
| | | |
| | | @ApiModelProperty(value ="收货人") |
| | | private String shr; |
| | | @ApiModelProperty(value ="联系电话") |
| | | private String lxdh; |
| | | @ApiModelProperty(value ="收货地址") |
| | | private String shdz; |
| | | @ApiModelProperty(value ="快递公司Code") |
| | | private String kdgs; |
| | | @ApiModelProperty(value ="快递单号") |
| | | private String kddh; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LuckyDrawBasicJsonDto", description = "查询参数") |
| | | public class LuckyDrawBasicJsonDto { |
| | | |
| | | @ApiModelProperty(value ="头部图片") |
| | | private String imageUrlHead; |
| | | @ApiModelProperty(value ="开始按钮") |
| | | private String imageUrlTitle; |
| | | @ApiModelProperty(value ="转盘背景") |
| | | private String imageUrlButton; |
| | | @ApiModelProperty(value ="状态图片") |
| | | private String imageUrlState; |
| | | @ApiModelProperty(value ="奖品划分线") |
| | | private String imageLine; |
| | | |
| | | @ApiModelProperty(value ="规则内容") |
| | | private String ruleExplain; |
| | | @ApiModelProperty(value ="字体颜色") |
| | | private String typographyColor; |
| | | @ApiModelProperty(value ="背景颜色") |
| | | private String backgroundColor; |
| | | @ApiModelProperty(value ="字体大小") |
| | | private Integer typographyNum; |
| | | @ApiModelProperty(value ="字体透明度") |
| | | private Integer typographyLight; |
| | | |
| | | /** |
| | | * 抽奖规则 |
| | | */ |
| | | //每人每日有10次无门槛抽奖机会 |
| | | private Integer wmkcjjh; |
| | | //可用积分兑换1次抽奖机会, |
| | | private Integer dhycjfs; |
| | | // 每日最多兑换 |
| | | //10 |
| | | //次抽奖机会 |
| | | private Integer jfdhcs; |
| | | // 每人最多可中奖 |
| | | //10 |
| | | //次 |
| | | private Integer zzjcs; |
| | | // 总中奖率 |
| | | //10 |
| | | //% |
| | | private Integer zzjl; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LuckyDrawForUpdateDto", description = "参数") |
| | | public class LuckyDrawForUpdateDto { |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SignForUpdateDto", description = "参数") |
| | | public class SignForUpdateDto { |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SignReceiveListDto", description = "参数") |
| | | public class SignReceiveListDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String yhmc; |
| | | |
| | | @ApiModelProperty(value ="签到开始时间") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty(value ="签到结束时间") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SignSetBasicJsonDto", description = "查询参数") |
| | | public class SignSetBasicJsonDto { |
| | | |
| | | @ApiModelProperty(value ="标题图片") |
| | | private String imageUrlTitle; |
| | | @ApiModelProperty(value ="头部图片") |
| | | private String imageUrlHead; |
| | | @ApiModelProperty(value ="按钮图片") |
| | | private String imageUrlButton; |
| | | @ApiModelProperty(value ="状态图片") |
| | | private String imageUrlState; |
| | | |
| | | @ApiModelProperty(value ="规则内容") |
| | | private String ruleExplain; |
| | | @ApiModelProperty(value ="字体颜色") |
| | | private String typographyColor; |
| | | @ApiModelProperty(value ="背景颜色") |
| | | private String backgroundColor; |
| | | @ApiModelProperty(value ="字体大小") |
| | | private Integer typographyNum; |
| | | @ApiModelProperty(value ="字体透明度") |
| | | private Integer typographyLight; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SignWriteoffDto", description = "查询参数") |
| | | public class SignWriteoffDto { |
| | | |
| | | @ApiModelProperty(value ="核销ID") |
| | | private long writeoffId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SignWriteoffListDto", description = "查询参数") |
| | | public class SignWriteoffListDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="中奖者姓名") |
| | | private String zjzxm; |
| | | |
| | | @ApiModelProperty(value ="活动名称/编码") |
| | | private String hdmcbm; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateLuckyDrawSetDto", description = "查询参数") |
| | | public class UpdateLuckyDrawSetDto { |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String actCode; |
| | | @ApiModelProperty(value ="活动开始时间") |
| | | private Date beginTime; |
| | | @ApiModelProperty(value ="活动结束时间") |
| | | private Date endTime; |
| | | |
| | | private LuckyDrawBasicJsonDto luckyDrawBasicJsonDto; |
| | | |
| | | private List<ActivitySignAwardSet> activityAwardSets; |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actMainId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateSignAwardSetDto", description = "查询参数") |
| | | public class UpdateSignAwardSetDto { |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String actCode; |
| | | @ApiModelProperty(value ="活动开始时间") |
| | | private Date beginTime; |
| | | @ApiModelProperty(value ="活动结束时间") |
| | | private Date endTime; |
| | | |
| | | private SignSetBasicJsonDto signSetBasicJsonDto; |
| | | |
| | | private List<ActivitySignAwardSet> activitySignAwardSets; |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actMainId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "WriteoffCodeSubmitDto", description = "查询参数") |
| | | public class WriteoffCodeSubmitDto { |
| | | |
| | | @ApiModelProperty(value ="核销ID") |
| | | private long writeoffId; |
| | | |
| | | @ApiModelProperty(value ="兑奖码") |
| | | private String writeOffCode; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description 奖品设置表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @Data |
| | | @TableName("activity_sign_award_set") |
| | | public class ActivitySignAwardSet extends BaseEntity{ |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 奖项类型(1:自定义产品2:积分3:优惠券4:店铺商品) |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="奖项类型(1:自定义产品2:积分3:优惠券4:店铺商品)") |
| | | private int awardType; |
| | | |
| | | |
| | | public static final int AWARDTYPE_CUSTOMIZE = 1; |
| | | public static final int AWARDTYPE_SCORE = 2; |
| | | public static final int AWARDTYPE_COUPON = 3; |
| | | public static final int AWARDTYPE_GOODS = 4; |
| | | |
| | | /** |
| | | * 奖项规则(1:每日奖励(默认)2:累计签到天数) |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="奖项规则(1:每日奖励(默认)2:累计签到天数)") |
| | | private int awardRule; |
| | | |
| | | public static final int AWARDRULE_NORMAL = 1; |
| | | public static final int AWARDRULE_CUMULATIVEDAY = 2; |
| | | |
| | | /** |
| | | * 签到累计天数 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="签到累计天数") |
| | | private int cumulativeDay; |
| | | |
| | | /** |
| | | * 奖项名称 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="奖项名称") |
| | | private String awardName; |
| | | |
| | | /** |
| | | * 图片介绍 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="图片介绍") |
| | | private String introduceImg; |
| | | |
| | | /** |
| | | * 文字介绍 |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="文字介绍") |
| | | private String introduceTip; |
| | | |
| | | /** |
| | | * 奖项库存数量 |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="奖项库存数量") |
| | | private int awardInventoryCnt; |
| | | |
| | | /** |
| | | * 已派发数量 |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="已派发数量") |
| | | private int awardDistributeCnt; |
| | | |
| | | /** |
| | | * 兑奖方式(1:线下兑换2:物流配送3:客服兑换) |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="兑奖方式(1:线下兑换2:物流配送3:客服兑换)") |
| | | private int awardWay; |
| | | public static final int AWARDWAY_ONE = 1; |
| | | public static final int AWARDWAY_TWO = 2; |
| | | public static final int AWARDWAY_THREE = 3; |
| | | |
| | | /** |
| | | * 奖品是否有效(1:有效 2:无效) |
| | | */ |
| | | @ApiModelProperty(value ="奖品是否有效(1:有效 2:无效)") |
| | | private int awardState; |
| | | public static final int AWARDSTATE_WORK = 1; |
| | | public static final int AWARDSTATE_UNWORK = 2; |
| | | |
| | | /** |
| | | * 操作提示 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="操作提示") |
| | | private String operationTip; |
| | | |
| | | /** |
| | | * 兑奖地址 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="兑奖地址") |
| | | private String prizeAddress; |
| | | |
| | | /** |
| | | * 兑奖期限开始日期 |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="兑奖期限开始日期") |
| | | private Date prizeStartTime; |
| | | |
| | | /** |
| | | * 兑奖期限结束日期 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="兑奖期限结束日期") |
| | | private Date prizeEndTime; |
| | | |
| | | /** |
| | | * 客服微信 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="客服微信") |
| | | private String wechatImg; |
| | | @ApiModelProperty(value ="客服电话") |
| | | private String customerPhone; |
| | | |
| | | /** |
| | | * 积分数量 |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="积分数量") |
| | | private int scoreCnt; |
| | | |
| | | /** |
| | | * 优惠券ID |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="优惠券") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty(value ="优惠券ID") |
| | | private String couponId; |
| | | |
| | | /** |
| | | * 商品ID |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="商品") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty(value ="商品ID") |
| | | private String goodsId; |
| | | |
| | | /** |
| | | * 活动主表ID |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long activityId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="公司ID") |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description 领 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @Data |
| | | @TableName("activity_sign_receive_record") |
| | | public class ActivitySignReceiveRecord extends BaseEntity{ |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * userId |
| | | */ |
| | | |
| | | |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 领取时间 |
| | | */ |
| | | |
| | | |
| | | private Date receiveTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | |
| | | |
| | | private String remark; |
| | | |
| | | /** |
| | | * 奖品设置表ID |
| | | */ |
| | | |
| | | |
| | | private Long awardId; |
| | | |
| | | /** |
| | | * 是否已领取(1:待领取2:已领取 3:待配送 4:待收货 5:已失效) |
| | | */ |
| | | |
| | | |
| | | private Integer state; |
| | | |
| | | public static final int STATE_ING = 1; |
| | | public static final int STATE_DONE = 2; |
| | | public static final int STATE_THREE = 3; |
| | | public static final int STATE_FOUR = 4; |
| | | public static final int STATE_FIVE = 5; |
| | | |
| | | /** |
| | | * 核销码 |
| | | */ |
| | | |
| | | |
| | | private String writeOffCode; |
| | | |
| | | /** |
| | | * 活动主表ID |
| | | */ |
| | | |
| | | |
| | | private Long activityId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | private Long companyId; |
| | | |
| | | /** |
| | | * 收货人 |
| | | */ |
| | | private String consignee; |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | private String consigneePhone; |
| | | /** |
| | | * 收货地址 |
| | | */ |
| | | private String consigneeAddress; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description 签到记录表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @Data |
| | | @TableName("activity_sign_record") |
| | | public class ActivitySignRecord extends BaseEntity{ |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * userId |
| | | */ |
| | | |
| | | |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 签到时间 |
| | | */ |
| | | |
| | | |
| | | private Date signTime; |
| | | |
| | | /** |
| | | * 累计签到天数 |
| | | */ |
| | | |
| | | |
| | | private Integer cumulativeDay; |
| | | |
| | | /** |
| | | * 活动主表ID |
| | | */ |
| | | |
| | | |
| | | private Long activityId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @description 核销记录 |
| | | * @author yourName |
| | | * @date 2021-04-08 14:25 |
| | | */ |
| | | @Data |
| | | @TableName("activity_sign_writeoff") |
| | | public class ActivitySignWriteoff extends BaseEntity{ |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 核销时间 |
| | | */ |
| | | |
| | | |
| | | private Date writeoffTime; |
| | | |
| | | /** |
| | | * 核销员 |
| | | */ |
| | | |
| | | |
| | | private String writeoffUser; |
| | | |
| | | /** |
| | | * 兑奖码 |
| | | */ |
| | | |
| | | |
| | | private String writeoffCode; |
| | | |
| | | /** |
| | | * 活动ID |
| | | */ |
| | | |
| | | |
| | | private Long actId; |
| | | |
| | | /** |
| | | * 奖品ID |
| | | */ |
| | | |
| | | |
| | | private Long awardId; |
| | | |
| | | /** |
| | | * 中奖时间 |
| | | */ |
| | | |
| | | |
| | | private Date winTime; |
| | | |
| | | /** |
| | | * 状态(1:待兑换 2:待发货 3:已兑换 4:已失效 ) |
| | | */ |
| | | private Integer state; |
| | | public static final int STATE_ONE = 1; |
| | | public static final int STATE_TWO = 2; |
| | | public static final int STATE_THREE = 3; |
| | | public static final int STATE_FOUR = 4; |
| | | |
| | | /** |
| | | * 中奖者ID |
| | | */ |
| | | |
| | | |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 物流ID |
| | | */ |
| | | |
| | | |
| | | private Integer logisticsId; |
| | | |
| | | /** |
| | | * 中奖记录ID |
| | | */ |
| | | |
| | | |
| | | private Long receiveId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | private Long companyId; |
| | | |
| | | /** |
| | | * 店铺ID |
| | | */ |
| | | |
| | | |
| | | private Long shopId; |
| | | |
| | | /** |
| | | * 核销员ID |
| | | */ |
| | | |
| | | |
| | | private Long writeoffUserid; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.service; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.activity.dao.ActivitySignAwardSetDao; |
| | | import com.matrix.system.activity.dao.ActivitySignReceiveRecordDao; |
| | | import com.matrix.system.activity.dto.*; |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import com.matrix.system.activity.vo.ActivitiesListVo; |
| | | import com.matrix.system.activity.vo.AddSignAwardSetVo; |
| | | import com.matrix.system.activity.vo.CouponVo; |
| | | import com.matrix.system.activity.vo.GoodsVo; |
| | | import com.matrix.system.activity.vo.SignReceiveListVo; |
| | | import com.matrix.system.activity.vo.SignSetBasicJsonVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.shopXcx.bean.ShopActivities; |
| | | import com.matrix.system.shopXcx.dao.ShopActivitiesDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @description 奖品设置表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @Service |
| | | public class ActivitySignAwardSetService extends ServiceImpl<ActivitySignAwardSetDao, ActivitySignAwardSet>{ |
| | | |
| | | @Autowired |
| | | private ShopActivitiesDao shopActivitiesDao; |
| | | @Autowired |
| | | private ActivitySignAwardSetDao activitySignAwardSetDao; |
| | | @Autowired |
| | | private ActivitySignReceiveRecordDao activitySignReceiveRecordDao; |
| | | |
| | | @Transactional |
| | | public AjaxResult activitySignAwardSetService(AddSignAwardSetDto addSignAwardSetDto) { |
| | | //获取当前登录人员信息 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | //签到活动的唯一性 |
| | | List<ShopActivities> shopActivitiesDone = shopActivitiesDao.selectOneByCompanyIdAndActType(companyId,ShopActivities.ACTIVITIES_TYPE_SIGN); |
| | | if(CollUtil.isNotEmpty(shopActivitiesDone)){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "签到活动只能创建一次"); |
| | | } |
| | | |
| | | //新增活动主表信息 |
| | | ShopActivities shopActivities = new ShopActivities(); |
| | | shopActivities.setActName(addSignAwardSetDto.getActName()); |
| | | shopActivities.setActCode(addSignAwardSetDto.getActCode()); |
| | | shopActivities.setIsStart(ShopActivities.ACTIVITIES_STATUS_CLOSE); |
| | | shopActivities.setActType(ShopActivities.ACTIVITIES_TYPE_SIGN); |
| | | shopActivities.setActStatus(ShopActivities.ACTSTATUS_STATUS_RELEASE); |
| | | shopActivities.setActBeginTime(addSignAwardSetDto.getBeginTime()); |
| | | shopActivities.setActEndTime(addSignAwardSetDto.getEndTime()); |
| | | shopActivities.setCompanyId(companyId); |
| | | shopActivities.setCreateBy(user.getSuName()); |
| | | shopActivities.setUpdateBy(user.getSuName()); |
| | | //将基本信息转换成JSON字符串存储到活动主表的act_content字段 |
| | | SignSetBasicJsonDto signSetBasicJsonDto = addSignAwardSetDto.getSignSetBasicJsonDto(); |
| | | String json=JSON.toJSONString(signSetBasicJsonDto); |
| | | shopActivities.setActContent(json); |
| | | int insert = shopActivitiesDao.insert(shopActivities); |
| | | if(insert > 0){ |
| | | //新增活动奖品信息 |
| | | List<ActivitySignAwardSet> activitySignAwardSets = addSignAwardSetDto.getActivitySignAwardSets(); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSets)) { |
| | | for(ActivitySignAwardSet activitySignAwardSet : activitySignAwardSets) { |
| | | activitySignAwardSet.setCreateBy(user.getSuName()); |
| | | activitySignAwardSet.setCreateTime(new Date()); |
| | | activitySignAwardSet.setUpdateTime(new Date()); |
| | | activitySignAwardSet.setUpdateBy(user.getSuName()); |
| | | activitySignAwardSet.setCompanyId(companyId); |
| | | activitySignAwardSet.setActivityId(shopActivities.getId()); |
| | | activitySignAwardSet.setAwardState(ActivitySignAwardSet.AWARDSTATE_WORK); |
| | | activitySignAwardSetDao.insert(activitySignAwardSet); |
| | | } |
| | | } |
| | | }else{ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "保存失败"); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功"); |
| | | } |
| | | |
| | | public IPage<ActivitiesListVo> findActivitiesList(Page<ActivitiesListVo> page, |
| | | ActivitiesListDto activitiesListDto) { |
| | | return shopActivitiesDao.findActivitiesList(page,activitiesListDto); |
| | | } |
| | | |
| | | @Transactional |
| | | public AjaxResult beReady(BeReadyDto beReadyDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(beReadyDto); |
| | | Long actId = beReadyDto.getActId(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | if(ObjectUtil.isEmpty(shopActivity)) { |
| | | return AjaxResult.buildFailInstance("网络不通畅,请刷新页面"); |
| | | } |
| | | //未发布状态点击发布,状态变成进行中,且是开启状态 |
| | | shopActivity.setActStatus(ShopActivities.ACTSTATUS_STATUS_ING); |
| | | shopActivity.setIsStart(ShopActivities.ACTIVITIES_STATUS_OPEN); |
| | | shopActivitiesDao.updateByModel(shopActivity); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | |
| | | public AjaxResult delRow(DelRowDto delRowDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(delRowDto); |
| | | Long actId = delRowDto.getActId(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | if(ObjectUtil.isEmpty(shopActivity)) { |
| | | return AjaxResult.buildFailInstance("网络不通畅,请刷新页面"); |
| | | } |
| | | /** |
| | | * 删除状态更新状态为已删除,只能查看活动统计 |
| | | */ |
| | | shopActivity.setActStatus(ShopActivities.ACTSTATUS_STATUS_DEL); |
| | | shopActivity.setIsStart(ShopActivities.ACTIVITIES_STATUS_CLOSE); |
| | | shopActivitiesDao.updateByModel(shopActivity); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | |
| | | public AjaxResult beClose(BeCloseDto beCloseDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(beCloseDto); |
| | | Long actId = beCloseDto.getActId(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | if(ObjectUtil.isEmpty(shopActivity)) { |
| | | return AjaxResult.buildFailInstance("网络不通畅,请刷新页面"); |
| | | } |
| | | /** |
| | | * 关闭状态 |
| | | */ |
| | | shopActivity.setActStatus(ShopActivities.ACTSTATUS_STATUS_END); |
| | | shopActivity.setIsStart(ShopActivities.ACTIVITIES_STATUS_CLOSE); |
| | | shopActivitiesDao.updateByModel(shopActivity); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | |
| | | public IPage<SignReceiveListVo> findSignReceiveList(Page<SignReceiveListVo> page, |
| | | SignReceiveListDto signReceiveListDto) { |
| | | return activitySignReceiveRecordDao.findSignReceiveList(page,signReceiveListDto); |
| | | } |
| | | |
| | | public AjaxResult findSignForUpdate(SignForUpdateDto signForUpdateDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(signForUpdateDto); |
| | | Long actId = signForUpdateDto.getActId(); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | //获取对应的活动主表信息和对应的奖品设置信息 |
| | | AddSignAwardSetVo addSignAwardSetVo = new AddSignAwardSetVo(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | if(ObjectUtil.isNotEmpty(shopActivity)) { |
| | | addSignAwardSetVo.setId(actId); |
| | | addSignAwardSetVo.setActName(shopActivity.getActName()); |
| | | addSignAwardSetVo.setActCode(shopActivity.getActCode()); |
| | | addSignAwardSetVo.setBeginTime(shopActivity.getActBeginTime()); |
| | | addSignAwardSetVo.setEndTime(shopActivity.getActEndTime()); |
| | | |
| | | String actContent = shopActivity.getActContent(); |
| | | SignSetBasicJsonVo signSetBasicJsonVo = JSON.parseObject(actContent, SignSetBasicJsonVo.class); |
| | | addSignAwardSetVo.setSignSetBasicJsonDto(signSetBasicJsonVo); |
| | | |
| | | Map<String, Object> columnMap = new HashMap<String, Object>(); |
| | | columnMap.put("activity_id", actId); |
| | | columnMap.put("company_id", signForUpdateDto.getCompanyId()); |
| | | List<ActivitySignAwardSet> activitySignAwardSets = activitySignAwardSetDao.selectByMap(columnMap); |
| | | addSignAwardSetVo.setActivitySignAwardSets(activitySignAwardSets); |
| | | } |
| | | result.putInMap("addSignAwardSetVo", addSignAwardSetVo); |
| | | return result; |
| | | } |
| | | |
| | | @Transactional |
| | | public AjaxResult updateSignAwardSet(UpdateSignAwardSetDto updateSignAwardSetDto) { |
| | | //获取当前登录人员信息 |
| | | QueryUtil.setQueryLimitCom(updateSignAwardSetDto); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long actId = updateSignAwardSetDto.getActMainId(); |
| | | Long companyId = user.getCompanyId(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | //更新活动主表信息 |
| | | shopActivity.setActName(updateSignAwardSetDto.getActName()); |
| | | shopActivity.setActCode(updateSignAwardSetDto.getActCode()); |
| | | shopActivity.setActBeginTime(updateSignAwardSetDto.getBeginTime()); |
| | | shopActivity.setActEndTime(updateSignAwardSetDto.getEndTime()); |
| | | shopActivity.setCompanyId(companyId); |
| | | shopActivity.setCreateBy(user.getSuName()); |
| | | shopActivity.setUpdateBy(user.getSuName()); |
| | | //将基本信息转换成JSON字符串存储到活动主表的act_content字段 |
| | | SignSetBasicJsonDto signSetBasicJsonDto = updateSignAwardSetDto.getSignSetBasicJsonDto(); |
| | | String json=JSON.toJSONString(signSetBasicJsonDto); |
| | | shopActivity.setActContent(json); |
| | | shopActivitiesDao.updateByModel(shopActivity); |
| | | /** |
| | | * 比较两个奖品名单,多的新增,减少的更新为已失效,不变的更新 |
| | | */ |
| | | //原有的奖品 |
| | | ArrayList<Long> arrayListOld = new ArrayList<>(); |
| | | Map<String, Object> columnMap = new HashMap<String, Object>(); |
| | | columnMap.put("activity_id", actId); |
| | | columnMap.put("company_id", updateSignAwardSetDto.getCompanyId()); |
| | | List<ActivitySignAwardSet> activitySignAwardSetOld = activitySignAwardSetDao.selectByMap(columnMap); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSetOld)) { |
| | | for(ActivitySignAwardSet activitySignAwardSetUpdate : activitySignAwardSetOld) { |
| | | Long actSubid = activitySignAwardSetUpdate.getId(); |
| | | arrayListOld.add(actSubid); |
| | | } |
| | | } |
| | | //修改后的奖品 |
| | | List<ActivitySignAwardSet> activitySignAwardSetsUpdate = updateSignAwardSetDto.getActivitySignAwardSets(); |
| | | ArrayList<Long> arrayListUpdate = new ArrayList<>(); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSetsUpdate)) { |
| | | for(ActivitySignAwardSet activitySignAwardSetUpdate : activitySignAwardSetsUpdate) { |
| | | Long actSubid = activitySignAwardSetUpdate.getId(); |
| | | //如果ID为空则新增,不为空则修改 |
| | | if(ObjectUtil.isEmpty(actSubid)) { |
| | | activitySignAwardSetUpdate.setCreateBy(user.getSuName()); |
| | | activitySignAwardSetUpdate.setCreateTime(new Date()); |
| | | activitySignAwardSetUpdate.setUpdateTime(new Date()); |
| | | activitySignAwardSetUpdate.setUpdateBy(user.getSuName()); |
| | | activitySignAwardSetUpdate.setCompanyId(companyId); |
| | | activitySignAwardSetUpdate.setActivityId(actId); |
| | | activitySignAwardSetUpdate.setAwardState(ActivitySignAwardSet.AWARDSTATE_WORK); |
| | | activitySignAwardSetDao.insert(activitySignAwardSetUpdate); |
| | | }else { |
| | | activitySignAwardSetUpdate.setAwardState(ActivitySignAwardSet.AWARDSTATE_WORK); |
| | | activitySignAwardSetDao.updateById(activitySignAwardSetUpdate); |
| | | arrayListUpdate.add(actSubid); |
| | | } |
| | | } |
| | | } |
| | | //比较获取原来的比现在多出来的奖品,修改状态为失效 |
| | | boolean removeAll = arrayListOld.removeAll(arrayListUpdate); |
| | | if(removeAll && CollUtil.isNotEmpty(arrayListOld)) { |
| | | for(long id : arrayListOld) { |
| | | ActivitySignAwardSet activitySignAwardSetDel = activitySignAwardSetDao.selectById(id); |
| | | activitySignAwardSetDel.setAwardState(ActivitySignAwardSet.AWARDSTATE_UNWORK); |
| | | activitySignAwardSetDao.updateById(activitySignAwardSetDel); |
| | | } |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功"); |
| | | } |
| | | |
| | | public IPage<CouponVo> selectCouponList(Page<CouponVo> page, CouponDto couponDto) { |
| | | return activitySignReceiveRecordDao.selectCouponList(page,couponDto); |
| | | } |
| | | |
| | | public IPage<GoodsVo> selectGoodsList(Page<GoodsVo> page, GoodsDto goodsDto) { |
| | | return activitySignReceiveRecordDao.selectGoodsList(page,goodsDto); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.service; |
| | | |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.matrix.system.activity.dao.ActivitySignReceiveRecordDao; |
| | | import com.matrix.system.activity.entity.ActivitySignReceiveRecord; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @description 领 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @Service |
| | | public class ActivitySignReceiveRecordService extends ServiceImpl<ActivitySignReceiveRecordDao, ActivitySignReceiveRecord>{ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.service; |
| | | |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.matrix.system.activity.dao.ActivitySignRecordDao; |
| | | import com.matrix.system.activity.entity.ActivitySignRecord; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @description 签到记录表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @Service |
| | | public class ActivitySignRecordService extends ServiceImpl<ActivitySignRecordDao, ActivitySignRecord>{ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.service; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.activity.dao.ActivitySignAwardSetDao; |
| | | import com.matrix.system.activity.dao.ActivitySignReceiveRecordDao; |
| | | import com.matrix.system.activity.dao.ActivitySignWriteoffDao; |
| | | import com.matrix.system.activity.dto.LogisticsSubmitDto; |
| | | import com.matrix.system.activity.dto.SignWriteoffDto; |
| | | import com.matrix.system.activity.dto.SignWriteoffListDto; |
| | | import com.matrix.system.activity.dto.WriteoffCodeSubmitDto; |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import com.matrix.system.activity.entity.ActivitySignReceiveRecord; |
| | | import com.matrix.system.activity.entity.ActivitySignWriteoff; |
| | | import com.matrix.system.activity.vo.LogisticsVo; |
| | | import com.matrix.system.activity.vo.SignWriteoffListVo; |
| | | import com.matrix.system.activity.vo.SignWriteoffVo; |
| | | import com.matrix.system.activity.vo.ZjrVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.bean.SystemDictionary; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.SystemDictionaryDao; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.shopXcx.api.service.WxShopLogisticsQueryService; |
| | | import com.matrix.system.shopXcx.bean.ShopActivities; |
| | | import com.matrix.system.shopXcx.bean.ShopDeliveryInfo; |
| | | import com.matrix.system.shopXcx.bean.ShopLogisticsInfo; |
| | | import com.matrix.system.shopXcx.dao.ShopActivitiesDao; |
| | | import com.matrix.system.shopXcx.dao.ShopDeliveryInfoDao; |
| | | import com.matrix.system.shopXcx.dao.ShopLogisticsInfoDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 核销记录 |
| | | * @author yourName |
| | | * @date 2021-04-08 14:25 |
| | | */ |
| | | @Service |
| | | public class ActivitySignWriteoffService extends ServiceImpl<ActivitySignWriteoffDao, ActivitySignWriteoff>{ |
| | | |
| | | @Autowired |
| | | ActivitySignWriteoffDao activitySignWriteoffDao; |
| | | @Autowired |
| | | ShopActivitiesDao shopActivitiesDao; |
| | | @Autowired |
| | | ActivitySignAwardSetDao activitySignAwardSetDao; |
| | | @Autowired |
| | | ActivitySignReceiveRecordDao activitySignReceiveRecordDao; |
| | | @Autowired |
| | | SysVipInfoDao sysVipInfoDao; |
| | | @Autowired |
| | | SystemDictionaryDao systemDictionaryDao; |
| | | @Autowired |
| | | ShopDeliveryInfoDao shopDeliveryInfoDao; |
| | | @Autowired |
| | | ShopLogisticsInfoDao shopLogisticsInfoDao; |
| | | @Autowired |
| | | private WxShopLogisticsQueryService wxShopLogisticsQueryService; |
| | | |
| | | public IPage<SignWriteoffListVo> findSignWriteoffList(Page<SignWriteoffListVo> page, |
| | | SignWriteoffListDto signWriteoffListDto) { |
| | | return activitySignWriteoffDao.findSignWriteoffList(page,signWriteoffListDto); |
| | | } |
| | | |
| | | public AjaxResult findSignWriteoff(SignWriteoffDto signWriteoffDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(signWriteoffDto); |
| | | Long writeoffId = signWriteoffDto.getWriteoffId(); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("成功"); |
| | | //获取核销信息 |
| | | SignWriteoffVo signWriteoffVo = new SignWriteoffVo(); |
| | | ActivitySignWriteoff activitySignWriteoff = activitySignWriteoffDao.selectById(writeoffId); |
| | | if(ObjectUtil.isNotEmpty(activitySignWriteoff)) { |
| | | //获取奖品信息 |
| | | ActivitySignAwardSet activitySignAwardSet = activitySignAwardSetDao.selectById(activitySignWriteoff.getAwardId()); |
| | | signWriteoffVo.setJpmc(activitySignAwardSet.getAwardName()); |
| | | signWriteoffVo.setJptp(activitySignAwardSet.getIntroduceImg()); |
| | | signWriteoffVo.setSl(1); |
| | | signWriteoffVo.setDjfs(activitySignAwardSet.getAwardWay()); |
| | | //获取中奖人信息 |
| | | ZjrVo zjrVo = activitySignWriteoffDao.selectUsernameByUserId(activitySignWriteoff.getUserId(),activitySignAwardSet.getId()); |
| | | signWriteoffVo.setZjr(zjrVo.getZjr()); |
| | | signWriteoffVo.setZjsj(zjrVo.getZjsj()); |
| | | signWriteoffVo.setDjsj(activitySignWriteoff.getWriteoffTime()); |
| | | signWriteoffVo.setState(activitySignWriteoff.getState()); |
| | | //获取活动主表信息 |
| | | ShopActivities shopActivities = shopActivitiesDao.selectById(activitySignWriteoff.getActId()); |
| | | signWriteoffVo.setHdmc(shopActivities.getActName()); |
| | | signWriteoffVo.setHdbh(shopActivities.getActCode()); |
| | | //获取收货地址信息 |
| | | int awardWay = activitySignAwardSet.getAwardWay(); |
| | | if(ActivitySignAwardSet.AWARDWAY_TWO == awardWay) { |
| | | ActivitySignWriteoff activitySignWriteoffLogistics = activitySignWriteoffDao.selectById(writeoffId); |
| | | Long receiveId = activitySignWriteoffLogistics.getReceiveId(); |
| | | ActivitySignReceiveRecord activitySignReceiveRecordLogistic = activitySignReceiveRecordDao.selectById(receiveId); |
| | | signWriteoffVo.setConsignee(activitySignReceiveRecordLogistic.getConsignee()); |
| | | signWriteoffVo.setConsigneePhone(activitySignReceiveRecordLogistic.getConsigneePhone()); |
| | | signWriteoffVo.setConsigneeAddress(activitySignReceiveRecordLogistic.getConsigneeAddress()); |
| | | |
| | | //物流跟踪 |
| | | Integer logisticsId = activitySignWriteoffLogistics.getLogisticsId(); |
| | | ShopDeliveryInfo shopDeliveryInfo = shopDeliveryInfoDao.selectById(logisticsId); |
| | | if(ObjectUtil.isNotEmpty(shopDeliveryInfo)){ |
| | | signWriteoffVo.setLogisticsNum(shopDeliveryInfo.getWaybillNo()); |
| | | signWriteoffVo.setLogisticsCompany(shopDeliveryInfo.getLogisticsCompany()); |
| | | //查看物流信息 |
| | | wxShopLogisticsQueryService.selectLogisticsInfo(shopDeliveryInfo); |
| | | List<ShopLogisticsInfo> shopLogisticsInfos = shopLogisticsInfoDao.selectByDelieryId(shopDeliveryInfo.getId()); |
| | | if(CollUtil.isNotEmpty(shopLogisticsInfos)) { |
| | | ArrayList<LogisticsVo> logisticsVos = new ArrayList<>(); |
| | | for(ShopLogisticsInfo shopLogistics : shopLogisticsInfos) { |
| | | LogisticsVo logisticsVo = new LogisticsVo(); |
| | | logisticsVo.setContent(shopLogistics.getDescribe()); |
| | | logisticsVo.setTimestamp(shopLogistics.getLogisticsTime()); |
| | | logisticsVos.add(logisticsVo); |
| | | } |
| | | signWriteoffVo.setActivities(logisticsVos); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | result.putInMap("signWriteoffVo", signWriteoffVo); |
| | | return result; |
| | | } |
| | | |
| | | @Transactional |
| | | public AjaxResult writeoffCodeSubmit(WriteoffCodeSubmitDto writeoffCodeSubmitDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(writeoffCodeSubmitDto); |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long writeoffId = writeoffCodeSubmitDto.getWriteoffId(); |
| | | String writeOffCode = writeoffCodeSubmitDto.getWriteOffCode(); |
| | | /** |
| | | * 验证核销码是不是匹配 |
| | | * 只能核销一次 |
| | | * 更新核销记录 |
| | | * 更新领取记录 |
| | | */ |
| | | //验证核销码是不是匹配 |
| | | ActivitySignWriteoff activitySignWriteoff = activitySignWriteoffDao.selectById(writeoffId); |
| | | if(ActivitySignWriteoff.STATE_ONE != activitySignWriteoff.getState()){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "兑奖码已失效"); |
| | | } |
| | | if(ObjectUtil.isNotEmpty(activitySignWriteoff)) { |
| | | String writeoffCodeReal = activitySignWriteoff.getWriteoffCode(); |
| | | if(!writeoffCodeReal.equals(writeOffCode)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "兑奖码无效"); |
| | | } |
| | | } |
| | | //线下兑换失效 |
| | | Long awardId = activitySignWriteoff.getAwardId(); |
| | | ActivitySignAwardSet activitySignAwardSet = activitySignAwardSetDao.selectById(awardId); |
| | | if(ActivitySignAwardSet.AWARDWAY_ONE == activitySignAwardSet.getAwardWay() |
| | | || ActivitySignAwardSet.AWARDWAY_THREE == activitySignAwardSet.getAwardWay()){ |
| | | Date prizeStartTime = activitySignAwardSet.getPrizeStartTime(); |
| | | if(DateUtil.date().getTime() < prizeStartTime.getTime()){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "兑奖还没开始呢!"); |
| | | } |
| | | Date prizeEndTime = activitySignAwardSet.getPrizeEndTime(); |
| | | if(DateUtil.date().getTime() > prizeEndTime.getTime()){ |
| | | Long receiveId = activitySignWriteoff.getReceiveId(); |
| | | ActivitySignReceiveRecord activitySignReceiveRecord = activitySignReceiveRecordDao.selectById(receiveId); |
| | | if(ObjectUtil.isNotEmpty(activitySignReceiveRecord)){ |
| | | activitySignReceiveRecord.setState(ActivitySignReceiveRecord.STATE_FIVE); |
| | | } |
| | | activitySignReceiveRecordDao.updateById(activitySignReceiveRecord); |
| | | |
| | | activitySignWriteoff.setState(ActivitySignWriteoff.STATE_FOUR); |
| | | activitySignWriteoffDao.updateById(activitySignWriteoff); |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "已超出兑奖结束时间!"); |
| | | } |
| | | } |
| | | //更新核销记录 |
| | | activitySignWriteoff.setState(ActivitySignWriteoff.STATE_THREE); |
| | | activitySignWriteoff.setWriteoffTime(new Date()); |
| | | activitySignWriteoff.setWriteoffUser(sysUsers.getSuName()); |
| | | activitySignWriteoff.setWriteoffUserid(sysUsers.getSuId()); |
| | | activitySignWriteoffDao.updateById(activitySignWriteoff); |
| | | //更新领取记录 |
| | | ActivitySignReceiveRecord activitySignReceiveRecord = activitySignReceiveRecordDao.selectById(activitySignWriteoff.getReceiveId()); |
| | | activitySignReceiveRecord.setState(ActivitySignReceiveRecord.STATE_DONE); |
| | | activitySignReceiveRecordDao.updateById(activitySignReceiveRecord); |
| | | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "核销成功"); |
| | | } |
| | | |
| | | @Transactional |
| | | public AjaxResult logisticsSubmit(LogisticsSubmitDto logisticsSubmitDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(logisticsSubmitDto); |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long writeoffId = logisticsSubmitDto.getWriteoffId(); |
| | | /** |
| | | * 更新领取记录表的收货信息和状态 |
| | | * 更新核销记录表的状态和物流ID |
| | | */ |
| | | ActivitySignWriteoff activitySignWriteoff = activitySignWriteoffDao.selectById(writeoffId); |
| | | //新增一条物流信息 |
| | | ShopDeliveryInfo shopDeliveryInfo = new ShopDeliveryInfo(); |
| | | Long receiveId = activitySignWriteoff.getReceiveId(); |
| | | SystemDictionary systemDictionary = systemDictionaryDao.selectByCode(logisticsSubmitDto.getKdgs()); |
| | | if (ObjectUtil.isEmpty(systemDictionary)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "没有找到物流公司信息!"); |
| | | } |
| | | shopDeliveryInfo.setUserId(activitySignWriteoff.getUserId()); |
| | | shopDeliveryInfo.setReceiveId(receiveId); |
| | | shopDeliveryInfo.setReceiveAddress(logisticsSubmitDto.getShdz()); |
| | | |
| | | shopDeliveryInfo.setLogisticsCompany(systemDictionary.getName()); |
| | | shopDeliveryInfo.setLogisticsCompanyCode(systemDictionary.getCode()); |
| | | shopDeliveryInfo.setDeliveryWay("物流配送"); |
| | | shopDeliveryInfo.setLogisticsStatus(AppConstance.LOGISTICS_STATUS_OF_RECEIVE); |
| | | |
| | | shopDeliveryInfo.setWaybillNo(logisticsSubmitDto.getKddh()); |
| | | shopDeliveryInfo.setUpdateBy(sysUsers.getSuName()); |
| | | shopDeliveryInfo.setCreateBy(sysUsers.getSuName()); |
| | | |
| | | shopDeliveryInfo.setDeliveryTime(new Date()); |
| | | shopDeliveryInfoDao.insert(shopDeliveryInfo); |
| | | //更新核销记录 |
| | | activitySignWriteoff.setState(ActivitySignWriteoff.STATE_THREE); |
| | | activitySignWriteoff.setWriteoffTime(new Date()); |
| | | activitySignWriteoff.setWriteoffUser(sysUsers.getSuName()); |
| | | activitySignWriteoff.setWriteoffUserid(sysUsers.getSuId()); |
| | | activitySignWriteoff.setLogisticsId(shopDeliveryInfo.getId()); |
| | | activitySignWriteoffDao.updateById(activitySignWriteoff); |
| | | //更新领取记录 |
| | | ActivitySignReceiveRecord activitySignReceiveRecord = activitySignReceiveRecordDao.selectById(receiveId); |
| | | activitySignReceiveRecord.setState(ActivitySignReceiveRecord.STATE_FOUR); |
| | | activitySignReceiveRecord.setConsignee(logisticsSubmitDto.getShr()); |
| | | activitySignReceiveRecord.setConsigneeAddress(logisticsSubmitDto.getShdz()); |
| | | activitySignReceiveRecord.setConsigneePhone(logisticsSubmitDto.getLxdh()); |
| | | activitySignReceiveRecordDao.updateById(activitySignReceiveRecord); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "发货成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class ActivitiesListVo { |
| | | |
| | | /** |
| | | * 活动类型 团购 |
| | | */ |
| | | public static final int ACTIVITIES_TYPE_GROUP = 1; |
| | | |
| | | /** |
| | | * 活动类型 秒杀 |
| | | */ |
| | | public static final int ACTIVITIES_TYPE_SECKILL = 2; |
| | | |
| | | /** |
| | | * 活动类型 沙龙 |
| | | */ |
| | | public static final int ACTIVITIES_TYPE_SALON = 3; |
| | | /** |
| | | * 活动类型 签到 |
| | | */ |
| | | public static final int ACTIVITIES_TYPE_SIGN = 4; |
| | | |
| | | /** |
| | | * 活动状态 开启 |
| | | */ |
| | | public static final int ACTIVITIES_STATUS_OPEN = 1; |
| | | |
| | | /** |
| | | * 活动状态 关闭 |
| | | */ |
| | | public static final int ACTIVITIES_STATUS_CLOSE = 2; |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | |
| | | /** |
| | | * 活动名称 |
| | | */ |
| | | @ApiModelProperty(value = "活动名称") |
| | | private String actName; |
| | | /** |
| | | * 活动编码 |
| | | */ |
| | | @ApiModelProperty(value = "活动编码") |
| | | private String actCode; |
| | | |
| | | |
| | | /** |
| | | * 活动类型 |
| | | */ |
| | | @ApiModelProperty(value = "活动类型") |
| | | private Integer actType; |
| | | |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @ApiModelProperty(value = "开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date actBeginTime; |
| | | |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value = "结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date actEndTime; |
| | | /** |
| | | * 活动状态 |
| | | */ |
| | | @ApiModelProperty(value = "活动状态") |
| | | private Integer actStatus; |
| | | |
| | | //未发布 |
| | | public static final int ACTSTATUS_STATUS_RELEASE = 1; |
| | | //未开始 |
| | | public static final int ACTSTATUS_STATUS_READY = 2; |
| | | //进行中 |
| | | public static final int ACTSTATUS_STATUS_ING = 3; |
| | | //已结束 |
| | | public static final int ACTSTATUS_STATUS_END = 4; |
| | | @ApiModelProperty(value = "创建人") |
| | | private String createBy; |
| | | /** |
| | | * 活动说明 |
| | | */ |
| | | @ApiModelProperty(value = "活动说明") |
| | | private String actRemark; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class AddLuckyDrawSetVo { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String actCode; |
| | | @ApiModelProperty(value ="活动开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date beginTime; |
| | | @ApiModelProperty(value ="活动结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date endTime; |
| | | |
| | | private LuckyDrawBasicJsonVo luckyDrawBasicJsonVo; |
| | | |
| | | private List<ActivitySignAwardSet> activityluckyDrawSets; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class AddSignAwardSetVo { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String actCode; |
| | | @ApiModelProperty(value ="活动开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date beginTime; |
| | | @ApiModelProperty(value ="活动结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date endTime; |
| | | |
| | | private SignSetBasicJsonVo signSetBasicJsonDto; |
| | | |
| | | private List<ActivitySignAwardSet> activitySignAwardSets; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class CouponVo { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Integer id; |
| | | |
| | | |
| | | /** |
| | | * 优惠券名称 |
| | | */ |
| | | @ApiModelProperty(value = "优惠券名称") |
| | | private String cName; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value = "结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date endTime; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class GoodsVo { |
| | | |
| | | private Long id; |
| | | /** |
| | | * 产品名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 商品分类 组合商品/家居产品/项目/充值卡/综合卡 |
| | | */ |
| | | private String goodType; |
| | | |
| | | /** |
| | | * 产品编码 |
| | | */ |
| | | private String code; |
| | | |
| | | /** |
| | | * 售价/本金 |
| | | */ |
| | | private Double sealPice; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class LogisticsVo { |
| | | |
| | | @ApiModelProperty(value ="内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value ="时间戳") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private String timestamp; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class LuckyDrawAwardCodeListVo { |
| | | |
| | | @ApiModelProperty(value ="头部图片") |
| | | private String imageUrlHead; |
| | | @ApiModelProperty(value ="开始按钮") |
| | | private String imageUrlTitle; |
| | | @ApiModelProperty(value ="转盘背景") |
| | | private String imageUrlButton; |
| | | @ApiModelProperty(value ="状态图片") |
| | | private String imageUrlState; |
| | | @ApiModelProperty(value ="奖品划分线") |
| | | private String imageLine; |
| | | |
| | | @ApiModelProperty(value ="规则内容") |
| | | private String ruleExplain; |
| | | @ApiModelProperty(value ="字体颜色") |
| | | private String typographyColor; |
| | | @ApiModelProperty(value ="背景颜色") |
| | | private String backgroundColor; |
| | | @ApiModelProperty(value ="字体大小") |
| | | private Integer typographyNum; |
| | | @ApiModelProperty(value ="字体透明度") |
| | | private Integer typographyLight; |
| | | |
| | | |
| | | //@ApiModelProperty(value ="中奖顺序") |
| | | private String awardLine; |
| | | //@ApiModelProperty(value ="中奖顺序索引") |
| | | private Integer awrdLineIndex; |
| | | |
| | | /** |
| | | * 抽奖规则 |
| | | */ |
| | | //每人每日有10次无门槛抽奖机会 |
| | | private Integer wmkcjjh; |
| | | //可用积分兑换1次抽奖机会, |
| | | private Integer dhycjfs; |
| | | // 每日最多兑换 |
| | | //10 |
| | | //次抽奖机会 |
| | | private Integer jfdhcs; |
| | | // 每人最多可中奖 |
| | | //10 |
| | | //次 |
| | | private Integer zzjcs; |
| | | // 总中奖率 |
| | | //10 |
| | | //% |
| | | private Integer zzjl; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class LuckyDrawBasicJsonVo { |
| | | |
| | | @ApiModelProperty(value ="头部图片") |
| | | private String imageUrlHead; |
| | | @ApiModelProperty(value ="开始按钮") |
| | | private String imageUrlTitle; |
| | | @ApiModelProperty(value ="转盘背景") |
| | | private String imageUrlButton; |
| | | @ApiModelProperty(value ="状态图片") |
| | | private String imageUrlState; |
| | | @ApiModelProperty(value ="奖品划分线") |
| | | private String imageLine; |
| | | |
| | | @ApiModelProperty(value ="规则内容") |
| | | private String ruleExplain; |
| | | @ApiModelProperty(value ="字体颜色") |
| | | private String typographyColor; |
| | | @ApiModelProperty(value ="背景颜色") |
| | | private String backgroundColor; |
| | | @ApiModelProperty(value ="字体大小") |
| | | private Integer typographyNum; |
| | | @ApiModelProperty(value ="字体透明度") |
| | | private Integer typographyLight; |
| | | |
| | | /** |
| | | * 抽奖规则 |
| | | */ |
| | | //每人每日有10次无门槛抽奖机会 |
| | | private Integer wmkcjjh; |
| | | //可用积分兑换1次抽奖机会, |
| | | private Integer dhycjfs; |
| | | // 每日最多兑换 |
| | | //10 |
| | | //次抽奖机会 |
| | | private Integer jfdhcs; |
| | | // 每人最多可中奖 |
| | | //10 |
| | | //次 |
| | | private Integer zzjcs; |
| | | // 总中奖率 |
| | | //10 |
| | | //% |
| | | private Integer zzjl; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class SignReceiveListVo { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | //活动类型 |
| | | private int actType; |
| | | |
| | | @ApiModelProperty(value = "用户") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty(value = "签到时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date reciveTime; |
| | | |
| | | @ApiModelProperty(value = "连续签到天数") |
| | | private Integer cumulativeDay; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer scoreCnt; |
| | | |
| | | @ApiModelProperty(value = "奖励类型") |
| | | private String awardType; |
| | | |
| | | @ApiModelProperty(value = "获得奖励") |
| | | private String awardName; |
| | | @ApiModelProperty(value = "优惠券名") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty(value ="奖项规则(1:每日奖励(默认)2:累计签到天数)") |
| | | private int awardRule; |
| | | @ApiModelProperty(value ="是否已领取(1:待领取2:已领取)") |
| | | private int state; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class SignSetBasicJsonVo { |
| | | |
| | | @ApiModelProperty(value ="标题图片") |
| | | private String imageUrlTitle; |
| | | @ApiModelProperty(value ="头部图片") |
| | | private String imageUrlHead; |
| | | @ApiModelProperty(value ="按钮图片") |
| | | private String imageUrlButton; |
| | | @ApiModelProperty(value ="状态图片") |
| | | private String imageUrlState; |
| | | |
| | | @ApiModelProperty(value ="规则内容") |
| | | private String ruleExplain; |
| | | @ApiModelProperty(value ="字体颜色") |
| | | private String typographyColor; |
| | | @ApiModelProperty(value ="背景颜色") |
| | | private String backgroundColor; |
| | | @ApiModelProperty(value ="字体大小") |
| | | private Integer typographyNum; |
| | | @ApiModelProperty(value ="字体透明度") |
| | | private Integer typographyLight; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class SignWriteoffListVo { |
| | | |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 核销时间 |
| | | */ |
| | | @ApiModelProperty(value ="核销时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date writeoffTime; |
| | | |
| | | /** |
| | | * 核销员 |
| | | */ |
| | | @ApiModelProperty(value ="核销员") |
| | | private String writeoffUser; |
| | | |
| | | /** |
| | | * 兑奖码 |
| | | */ |
| | | @ApiModelProperty(value ="兑奖码") |
| | | private String writeoffCode; |
| | | |
| | | /** |
| | | * 活动名称 |
| | | */ |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | |
| | | /** |
| | | * 奖品名称 |
| | | */ |
| | | @ApiModelProperty(value ="奖品名称") |
| | | private String awardName; |
| | | |
| | | /** |
| | | * 中奖时间 |
| | | */ |
| | | @ApiModelProperty(value ="中奖时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date winTime; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | @ApiModelProperty(value ="状态(1:待兑换 2:待发货 3:已兑换)") |
| | | private int state; |
| | | |
| | | /** |
| | | * 兑奖方式 |
| | | */ |
| | | @ApiModelProperty(value ="兑奖方式(1:线下兑换2:物流配送3:客服兑换)") |
| | | private int awardWay; |
| | | |
| | | /** |
| | | * 中奖者 |
| | | */ |
| | | @ApiModelProperty(value ="中奖者") |
| | | private String receiveName; |
| | | |
| | | /** |
| | | * 收货地址 |
| | | */ |
| | | @ApiModelProperty(value ="收货地址") |
| | | private String receiveAddress; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class SignWriteoffVo { |
| | | |
| | | @ApiModelProperty(value ="奖品名称") |
| | | private String jpmc; |
| | | |
| | | @ApiModelProperty(value ="奖品图片") |
| | | private String jptp; |
| | | |
| | | @ApiModelProperty(value ="数量") |
| | | private int sl; |
| | | |
| | | @ApiModelProperty(value ="中奖人") |
| | | private String zjr; |
| | | |
| | | @ApiModelProperty(value ="中奖时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date zjsj; |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String hdmc; |
| | | |
| | | @ApiModelProperty(value ="活动编号") |
| | | private String hdbh; |
| | | |
| | | @ApiModelProperty(value ="兑奖方式") |
| | | private int djfs; |
| | | |
| | | @ApiModelProperty(value ="兑奖状态") |
| | | private int state; |
| | | |
| | | @ApiModelProperty(value ="兑奖时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date djsj; |
| | | |
| | | @ApiModelProperty(value ="收货人") |
| | | private String consignee; |
| | | |
| | | @ApiModelProperty(value ="联系电话") |
| | | private String consigneePhone; |
| | | |
| | | @ApiModelProperty(value ="收货地址") |
| | | private String consigneeAddress; |
| | | |
| | | @ApiModelProperty(value ="物流单号") |
| | | private String logisticsNum; |
| | | |
| | | @ApiModelProperty(value ="物流公司") |
| | | private String logisticsCompany; |
| | | |
| | | private List<LogisticsVo> activities; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | @Data |
| | | public class ZjrVo { |
| | | |
| | | @ApiModelProperty(value ="中奖人") |
| | | private String zjr; |
| | | |
| | | @ApiModelProperty(value ="中奖时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date zjsj; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.matrix.component.tools.HttpCurlUtil; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.*; |
| | | import com.matrix.system.app.authority.AppAuthorityManager; |
| | | import com.matrix.system.app.dto.*; |
| | | import com.matrix.system.app.utils.Sms106Send; |
| | | import com.matrix.system.app.vo.UserInfoVo; |
| | | import com.matrix.system.common.authority.strategy.AccountPasswordLogin; |
| | | import com.matrix.system.common.authority.strategy.LoginStrategy; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.common.service.SysCompanyService; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.PasswordUtil; |
| | | import com.matrix.system.common.tools.UploadUtil; |
| | | import com.matrix.system.hive.bean.AppVersion; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.plugin.util.ImageUtil; |
| | | import com.matrix.system.hive.service.SysShopInfoService; |
| | | import com.matrix.system.shopXcx.api.WeChatApiTools; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import net.sf.json.JSONObject; |
| | | import org.apache.commons.fileupload.FileUploadException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @CrossOrigin(origins = "*") |
| | | @Api(value = "CommonAction", tags = "手机端公共请求类(含登陆)") |
| | | @RestController |
| | | @RequestMapping(value = "/api/common") |
| | | public class ApiCommonAction { |
| | | |
| | | @Autowired |
| | | private SysUsersService sysUsersService; |
| | | |
| | | @Autowired |
| | | private SysShopInfoService sysShopInfoService; |
| | | |
| | | @Autowired |
| | | private AppAuthorityManager authorityManager; |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | @Autowired |
| | | private SysCompanyService sysCompanyService;; |
| | | |
| | | @Autowired |
| | | WeChatApiTools weChatApiTools; |
| | | |
| | | @Autowired |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | | @Value("${static_resource_url}") |
| | | private String nginxUrl; |
| | | |
| | | @Value("${login_public_key}") |
| | | private String publicKey; |
| | | |
| | | @ApiOperation(value = "登陆接口", notes = "手机端登陆接口") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = UserInfoVo.class) |
| | | }) |
| | | @PostMapping(value = "/login") |
| | | public AjaxResult login(@RequestBody @Validated LoginDto loginDto) throws Exception { |
| | | |
| | | SysUsers user = new SysUsers(); |
| | | user.setSuAccount(loginDto.getUsername()); |
| | | user.setSuPassword(loginDto.getPassword()); |
| | | LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService); |
| | | user = authorityManager.login(apLogin); |
| | | |
| | | UserInfoVo userInfoVo = new UserInfoVo(); |
| | | if(user.getShopId()!=null){ |
| | | SysShopInfo shopInfo = sysShopInfoService.findById(user.getShopId()); |
| | | user.setShopName(shopInfo.getShopName()); |
| | | userInfoVo.setShopName(shopInfo.getShopShortName()); |
| | | } |
| | | user.setSuPassword(null); |
| | | |
| | | String token = UUIDUtil.getRandomID(); |
| | | LocalCache.save(token, user); |
| | | |
| | | userInfoVo.setId(user.getSuId()); |
| | | userInfoVo.setName(user.getSuName()); |
| | | userInfoVo.setRoleName(user.getRoleName()); |
| | | userInfoVo.setPhoto(user.getSuPhoto()); |
| | | |
| | | String sb = token + "_1" + "_/api/vip/findVipInfoById/972"; |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("登陆成功"); |
| | | authorityManager.initUserPower(result,user); |
| | | result.putInMap("user", userInfoVo); |
| | | result.putInMap("token", token); |
| | | result.putInMap("rasToken", RSAUtils.encryptByPublicKey(sb, publicKey)); |
| | | return result; |
| | | } |
| | | |
| | | @ApiOperation(value = "图片上传接口", notes = "图片上传接口") |
| | | @PostMapping(value = "/uploadPhotoBase64") |
| | | public AjaxResult uploadPhotoBase64(@RequestBody @Validated UploadPhotoDto uploadPhotoDto) { |
| | | // 文件保存目录路径 |
| | | String savePath = fileStoragePath; |
| | | String abstractPath= DateUtil.dateFormatStr(new Date(),DateUtil.DATE_FORMAT_NO_SPLITE_DD); |
| | | savePath=savePath+File.separator+abstractPath; |
| | | |
| | | String fileName =UUIDUtil.getRandomID() + ".png"; |
| | | |
| | | |
| | | // 文件保存目录URL |
| | | String saveUrl = nginxUrl; |
| | | LogUtil.debug("图片保存目录路径={}",fileStoragePath); |
| | | LogUtil.debug("图片保存目录URL={}",nginxUrl); |
| | | // 保存和访问路径检查 |
| | | if (StringUtils.isBlank(saveUrl) || StringUtils.isBlank(savePath)) { |
| | | return AjaxResult.buildFailInstance("文件上传失败错误代码:001"); |
| | | } |
| | | |
| | | // 检查目录 |
| | | File uploadDir = new File(savePath); |
| | | if (!uploadDir.isDirectory()) { |
| | | uploadDir.mkdir(); |
| | | } |
| | | |
| | | ImageUtil.base64ToFile(uploadPhotoDto.getBase64(),savePath , fileName); |
| | | LogUtil.info("fileName : {}", fileName); |
| | | |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("上传成功"); |
| | | ajaxResult.putInMap("file", nginxUrl + abstractPath+"/"+fileName); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | |
| | | String folderType = "image"; |
| | | public final static List<FileType> EXT_LIST = new ArrayList<FileType>(); |
| | | static { |
| | | EXT_LIST.add(FileType.JPEG); |
| | | EXT_LIST.add(FileType.PNG); |
| | | } |
| | | |
| | | @ApiOperation(value = "表单图片上传接口", notes = "表单图片上传接口") |
| | | @PostMapping(value = "/uploadImg") |
| | | public AjaxResult uploadImg(HttpServletResponse response, MultipartHttpServletRequest request) |
| | | throws IOException, FileUploadException, NoSuchAlgorithmException { |
| | | Map<String, String> fileMap = UploadUtil.doUpload(request, EXT_LIST, folderType, 1L); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("上传成功"); |
| | | ajaxResult.putInMap("file", fileMap.get("visitPath")); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "短信验证码发送", notes = "短信验证码发送") |
| | | @PostMapping(value = "/sendSmsCode") |
| | | public AjaxResult sendSmsCode(@RequestBody @Validated SmsCodeDto smsCodeDto) { |
| | | SysUsers user = new SysUsers(); |
| | | user.setSuTel(smsCodeDto.getTelphone()); |
| | | List<SysUsers> users = sysUsersService.findByModel(user); |
| | | if (CollectionUtils.isEmpty(users)) { |
| | | return AjaxResult.buildFailInstance("该手机号不存在"); |
| | | } |
| | | |
| | | String codeExist = LocalCache.get(smsCodeDto.getTelphone()); |
| | | if (StringUtils.isNotBlank(codeExist)) { |
| | | return AjaxResult.buildFailInstance("请勿重复发送验证码"); |
| | | } |
| | | |
| | | Integer code =(int) ((Math.random() * 9 + 1) * 100000); |
| | | Sms106Send.sendVerifyCode(smsCodeDto.getTelphone(), code.toString(), 2); |
| | | LocalCache.save(smsCodeDto.getTelphone(), code.toString(), 120 * 1000); |
| | | return AjaxResult.buildSuccessInstance("发送成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "重置登陆密码", notes = "重置登陆密码") |
| | | @PostMapping(value = "/resetLoginPwd") |
| | | public AjaxResult resetLoginPwd(@RequestBody @Validated PwdResetDto pwdResetDto) throws UnsupportedEncodingException, NoSuchAlgorithmException { |
| | | SysUsers user = new SysUsers(); |
| | | user.setSuTel(pwdResetDto.getTelphone()); |
| | | List<SysUsers> users = sysUsersService.findByModel(user); |
| | | if (CollectionUtils.isEmpty(users)) { |
| | | return AjaxResult.buildFailInstance("该手机号不存在"); |
| | | } |
| | | |
| | | String code = LocalCache.get(pwdResetDto.getTelphone()); |
| | | if (StringUtils.isBlank(code)) { |
| | | return AjaxResult.buildFailInstance("验证码已失效,请重新发送"); |
| | | } |
| | | |
| | | if (!code.equals(pwdResetDto.getCode())) { |
| | | return AjaxResult.buildFailInstance("验证码错误"); |
| | | } |
| | | |
| | | user = users.get(0); |
| | | user.setSuPassword(pwdResetDto.getNewPwd()); |
| | | String pwd = PasswordUtil.getEncrypUserPwd(user); |
| | | |
| | | int i = sysUsersService.updateUserPassword(user.getSuId(), pwd); |
| | | if (i > 0) { |
| | | LocalCache.remove(pwdResetDto.getTelphone()); |
| | | return AjaxResult.buildSuccessInstance("修改成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("修改失败"); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取app版本", notes = "获取app版本") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = AppVersion.class) |
| | | }) |
| | | @GetMapping(value = "/findAppVersion") |
| | | public AjaxResult findAppVersion() { |
| | | return AjaxResult.buildSuccessInstance(sysUsersService.findAppVersion()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取api接口地址", notes = "获取api接口地址") |
| | | @GetMapping(value = "/findApiUrl") |
| | | public AjaxResult findApiUrl() { |
| | | List<UrlDto> data = new ArrayList<>(); |
| | | UrlDto urlDto = new UrlDto(); |
| | | urlDto.setUrl("http://myapp.jyymatrix.cc"); |
| | | urlDto.setName("正式环境"); |
| | | data.add(urlDto); |
| | | |
| | | urlDto = new UrlDto(); |
| | | urlDto.setUrl("http://test.hive.jyymatrix.cc"); |
| | | urlDto.setName("测试环境"); |
| | | data.add(urlDto); |
| | | |
| | | urlDto = new UrlDto(); |
| | | urlDto.setUrl("http://hive.mydoline.com"); |
| | | urlDto.setName("美度专线"); |
| | | data.add(urlDto); |
| | | |
| | | urlDto = new UrlDto(); |
| | | urlDto.setUrl("http://localhost:8080"); |
| | | urlDto.setName("开发环境"); |
| | | data.add(urlDto); |
| | | |
| | | return AjaxResult.buildSuccessInstance(data); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "根据企业编码获取对应的请求地址") |
| | | @PostMapping(value = "/getUrlByCompanyCode") |
| | | public AjaxResult getUrlByCompanyCode(@RequestBody SettingDto codeDto) { |
| | | SysCompany query = new SysCompany(); |
| | | query.setComCode(codeDto.getCode()); |
| | | List<SysCompany> list = sysCompanyService.findByModel(query); |
| | | if (CollUtil.isEmpty(list)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "企业编码有误"); |
| | | } |
| | | |
| | | AjaxResult ajaxResult = new AjaxResult(); |
| | | ajaxResult.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | ajaxResult.putInMap("url", list.get(0).getComWebUrl()); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | @ApiOperation(value = "管理端小程序登录") |
| | | @PostMapping(value = "/wxLogin/{code}") |
| | | public AjaxResult wxLogin(@PathVariable("code") String code) throws IOException { |
| | | if (StrUtil.isBlank(code)) { |
| | | return AjaxResult.buildFailInstance("code不存在"); |
| | | } |
| | | AjaxResult res = new AjaxResult(); |
| | | String requrl = weChatApiTools.getManagerXcxLoginUrl(code); |
| | | |
| | | String resultData = HttpCurlUtil.sendGetHttp(requrl, null); |
| | | JSONObject json = JSONObject.fromObject(resultData); |
| | | LogUtil.debug("管理端小程序登录获取到登录信息={}", json); |
| | | |
| | | if (json.containsKey("errcode")) { |
| | | res.setStatus(AjaxResult.STATUS_FAIL); |
| | | res.setInfo("自动登录失败"); |
| | | LogUtil.info("微信登录获取到异常信息errcode"); |
| | | return res; |
| | | } |
| | | |
| | | String openId = json.getString("openid"); |
| | | res.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | res.putInMap("openId", openId); |
| | | SysUsers hasBind = sysUsersService.findByOpenId(openId, HostInterceptor.getCompanyId()); |
| | | if (hasBind == null) { |
| | | res.setInfo("未绑定用户"); |
| | | return res; |
| | | } |
| | | |
| | | String token = userCacheManager.saveUserInfo(hasBind); |
| | | LogUtil.info("用户token={}", token); |
| | | |
| | | authorityManager.initUserPower(res, hasBind); |
| | | |
| | | UserInfoVo userInfoVo = new UserInfoVo(); |
| | | if(hasBind.getShopId()!=null){ |
| | | SysShopInfo shopInfo = sysShopInfoService.findById(hasBind.getShopId()); |
| | | hasBind.setShopName(shopInfo.getShopName()); |
| | | userInfoVo.setShopName(shopInfo.getShopShortName()); |
| | | } |
| | | |
| | | userInfoVo.setId(hasBind.getSuId()); |
| | | userInfoVo.setName(hasBind.getSuName()); |
| | | userInfoVo.setRoleName(hasBind.getRoleName()); |
| | | userInfoVo.setPhoto(hasBind.getSuPhoto()); |
| | | |
| | | res.putInMap("token", token); |
| | | res.putInMap("userInfo", userInfoVo); |
| | | return res; |
| | | } |
| | | |
| | | @ApiOperation(value = "绑定用户") |
| | | @PostMapping(value = "/bindUser") |
| | | public AjaxResult bindUser(@RequestBody @Validated LoginDto loginDto) { |
| | | SysUsers user = new SysUsers(); |
| | | user.setSuAccount(loginDto.getUsername()); |
| | | user.setSuPassword(loginDto.getPassword()); |
| | | LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService); |
| | | user = authorityManager.login(apLogin); |
| | | user.setSuPassword(null); |
| | | user.setOpenIds(null); |
| | | String token = userCacheManager.saveUserInfo(user); |
| | | |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("登陆成功"); |
| | | authorityManager.initUserPower(result, user); |
| | | |
| | | UserInfoVo userInfoVo = new UserInfoVo(); |
| | | if(user.getShopId()!=null){ |
| | | SysShopInfo shopInfo = sysShopInfoService.findById(user.getShopId()); |
| | | user.setShopName(shopInfo.getShopName()); |
| | | userInfoVo.setShopName(shopInfo.getShopShortName()); |
| | | } |
| | | |
| | | userInfoVo.setId(user.getSuId()); |
| | | userInfoVo.setName(user.getSuName()); |
| | | userInfoVo.setRoleName(user.getRoleName()); |
| | | userInfoVo.setPhoto(user.getSuPhoto()); |
| | | |
| | | result.putInMap("token", token); |
| | | result.putInMap("userInfo", userInfoVo); |
| | | |
| | | synchronized (this) { |
| | | SysUsers hasBind = sysUsersService.findByOpenId(loginDto.getOpenId(), HostInterceptor.getCompanyId()); |
| | | if (hasBind != null) { |
| | | if(StrUtil.isNotBlank(hasBind.getOpenIds())) { |
| | | List<String> openIds = StrUtil.split(hasBind.getOpenIds(), ','); |
| | | openIds.remove(loginDto.getOpenId()); |
| | | |
| | | sysUsersService.modifyUserOpenId(CollUtil.join(openIds, ","), hasBind.getSuId()); |
| | | } |
| | | } |
| | | |
| | | List<String> openIds = StrUtil.split(user.getOpenIds(), ','); |
| | | openIds.add(loginDto.getOpenId()); |
| | | user.setOpenIds(CollUtil.join(openIds, ",")); |
| | | sysUsersService.modifyByModel(user); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.*; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author jyy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @Api(value = "ApiFollowupAction", tags = "跟进记录接口类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/followup") |
| | | public class ApiFollowupAction { |
| | | |
| | | @Autowired |
| | | private SysFollowupDao followupDao; |
| | | |
| | | @Autowired |
| | | private SysVipAlbumDao vipAlbumDao; |
| | | |
| | | @Autowired |
| | | private SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | private SysFollowupCommentDao followupCommentDao; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private SysOrderItemDao orderItemDao; |
| | | |
| | | @Autowired |
| | | private SysBeauticianStateDao beauticianStateDao; |
| | | |
| | | |
| | | @ApiOperation(value = "新增跟进记录", notes = "新增跟进记录") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = SysFollowup.class) |
| | | }) |
| | | @PostMapping(value = "/addFollowup") |
| | | public AjaxResult addFollowup(@RequestBody @Validated SysFollowup followup) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | followup.setCreateBy(user.getSuName()); |
| | | followup.setUpdateBy(user.getSuName()); |
| | | followup.setStaffId(user.getSuId()); |
| | | followup.setCompanyId(user.getCompanyId()); |
| | | followup.setShopId(user.getShopId()); |
| | | //处理订单摘要 |
| | | if(followup.getOrderId()!=null){ |
| | | List<SysOrderItem> sysOrderItems = orderItemDao.selectByOrderId(followup.getOrderId()); |
| | | String abs=""; |
| | | if(sysOrderItems.size()>1){ |
| | | abs= sysOrderItems.get(0).getShoppingGoods().getName()+"等"+sysOrderItems.size()+"件商品"; |
| | | }else{ |
| | | abs= sysOrderItems.get(0).getShoppingGoods().getName(); |
| | | } |
| | | followup.setOrderAbstract(abs); |
| | | } |
| | | //服务单摘要 |
| | | if(followup.getServiceId()!=null){ |
| | | List<SysBeauticianState> sysBeauticianStates = beauticianStateDao.selectBySerIds(followup.getServiceId()); |
| | | String abs=""; |
| | | if(sysBeauticianStates.size()>1){ |
| | | abs= sysBeauticianStates.get(0).getProjInfo().getName()+"等"+sysBeauticianStates.size()+"项服务"; |
| | | }else{ |
| | | abs= sysBeauticianStates.get(0).getProjInfo().getName(); |
| | | } |
| | | followup.setOrderAbstract(abs); |
| | | } |
| | | |
| | | followupDao.insert(followup); |
| | | //插入图片 |
| | | List<SysVipAlbum> albums=followup.getAlbums(); |
| | | if(CollectionUtils.isNotEmpty(albums)){ |
| | | for (SysVipAlbum vipAlbum:albums){ |
| | | if(StringUtils.isNotBlank(vipAlbum.getImg())){ |
| | | vipAlbum.setCreateBy(user.getSuName()); |
| | | vipAlbum.setUpdateBy(user.getSuName()); |
| | | vipAlbum.setSource(SysVipAlbum.SOURCE_FOLLOW); |
| | | vipAlbum.setVipId(followup.getVipId()); |
| | | vipAlbum.setSourceId(followup.getId()); |
| | | vipAlbumDao.insert(vipAlbum); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return AjaxResult.buildSuccessInstance("保存成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "跟进记录点赞或者取消点赞", notes = "跟进记录点赞或者取消点赞") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = AjaxResult.class) |
| | | }) |
| | | @GetMapping(value = "/zanFollowup/{id}") |
| | | public AjaxResult zanFollowup(@PathVariable("id")Long id) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | SysFollowup followup = followupDao.selectById(id); |
| | | String zans=followup.getZans(); |
| | | if(StringUtils.isNotBlank(zans)){ |
| | | List<Long> zanIds = StringUtils.strToCollToLong(zans, ","); |
| | | List<Long> zaned = zanIds.stream().filter(zanid -> zanid.equals(user.getSuId())).collect(Collectors.toList()); |
| | | if(CollectionUtils.isNotEmpty(zaned)){ |
| | | //取消赞 |
| | | List<Long> newZaned = zanIds.stream().filter(zanid -> !zanid.equals(user.getSuId())).collect(Collectors.toList()); |
| | | zans=StringUtils.collToStr(newZaned,","); |
| | | |
| | | }else{ |
| | | //点赞 |
| | | zanIds.add(user.getSuId()); |
| | | zans=StringUtils.collToStr(zanIds,","); |
| | | } |
| | | }else{ |
| | | //直接点赞 |
| | | zans=user.getSuId()+""; |
| | | } |
| | | followupDao.updateZan(id,zans); |
| | | return AjaxResult.buildSuccessInstance("修改成功"); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "评论跟进", notes = "评论跟进") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = AjaxResult.class) |
| | | }) |
| | | @PostMapping(value = "/addFollowupComment") |
| | | public AjaxResult addFollowupComment(@RequestBody @Validated SysFollowupComment followupComment) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | followupComment.setCreateBy(user.getSuName()); |
| | | followupComment.setUpdateBy(user.getSuName()); |
| | | followupComment.setStaffId(user.getSuId()); |
| | | followupCommentDao.insert(followupComment); |
| | | return AjaxResult.buildSuccessInstance("评论成功"); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "查询跟进记录", notes = "查询跟进记录") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = SysFollowup.class) |
| | | }) |
| | | @PostMapping(value = "/findFollowup") |
| | | public AjaxResult findFollowup(@RequestBody @Validated FollowupListDto followupListDto) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!DataAuthUtil.hasAllShopAuth()){ |
| | | followupListDto.setShopId(user.getShopId()); |
| | | } |
| | | followupListDto.setCompanyId(user.getCompanyId()); |
| | | followupListDto.setSelfStaff(user.getSuId()); |
| | | //TODO 需要设置跨店数据权限 |
| | | List<SysFollowup> rows= followupDao.selectByAppDto(followupListDto); |
| | | return AjaxResult.buildSuccessInstance(rows,"查询成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.dto.ArticleListDto; |
| | | import com.matrix.system.hive.action.BaseController; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.Article; |
| | | import com.matrix.system.hive.bean.ArticleType; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.dao.ArticleDao; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.service.ArticleService; |
| | | import com.matrix.system.hive.service.ArticleTypeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-27 |
| | | **/ |
| | | @Api(value = "ApiKnowledgeAction", tags = "知识库接口类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/know") |
| | | public class ApiKnowledgeAction extends BaseController { |
| | | |
| | | @Autowired |
| | | private ArticleTypeService articleTypeService; |
| | | |
| | | |
| | | @Autowired |
| | | private ArticleService articleService; |
| | | |
| | | @ApiOperation(value = "获取知识库分类", notes = "获取知识库分类") |
| | | @GetMapping(value = "/findKnowledgeType") |
| | | public AjaxResult findKnowledgeType() { |
| | | ArticleType type = new ArticleType(); |
| | | type.setCompanyId(getMe().getCompanyId()); |
| | | return AjaxResult.buildSuccessInstance(articleTypeService.findByModel(type)); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据分类获取文章列表", notes = "根据分类获取文章列表") |
| | | @PostMapping(value = "/findArticleList") |
| | | public AjaxResult findArticleList(@RequestBody ArticleListDto articleListDto) { |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | pageVo.setOffset((articleListDto.getPageNum() - 1) * articleListDto.getPageSize()); |
| | | pageVo.setLimit(articleListDto.getPageSize()); |
| | | |
| | | Article article = new Article(); |
| | | QueryUtil.setQueryLimitCom(article); |
| | | article.setTypeId(articleListDto.getTypeId()); |
| | | return AjaxResult.buildSuccessInstance(articleService.findApiArticleListInPage(article, pageVo)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取文章详情页", notes = "获取文章详情页") |
| | | @GetMapping(value = "/findArticleDetail/{id}") |
| | | public AjaxResult findArticleDetail(@PathVariable("id") Long id) { |
| | | Article article = articleService.findById(id); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("article", article); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.CreateOderItemDto; |
| | | import com.matrix.system.app.dto.CreateOrderDto; |
| | | import com.matrix.system.app.dto.OrderListDto; |
| | | import com.matrix.system.app.dto.ShoppingGoodsListDto; |
| | | import com.matrix.system.app.vo.OrderDetailVo; |
| | | import com.matrix.system.app.vo.ShoppingGoodsDetailVo; |
| | | import com.matrix.system.app.vo.ShoppingGoodsListVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.pojo.ShoppingCarItem; |
| | | import com.matrix.system.hive.pojo.ShoppingCarItemsVo; |
| | | import com.matrix.system.hive.service.ShoppingGoodsCategoryService; |
| | | import com.matrix.system.hive.service.ShoppingGoodsService; |
| | | import com.matrix.system.hive.service.SysOrderService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @Api(value = "ApiOrderAction", tags = "订单接口类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/order") |
| | | public class ApiOrderAction { |
| | | |
| | | @Autowired |
| | | private ShoppingGoodsCategoryService shoppingGoodsCategoryService; |
| | | |
| | | @Autowired |
| | | private ShoppingGoodsService shoppingGoodsService; |
| | | |
| | | @Autowired |
| | | private SysOrderService sysOrderService; |
| | | |
| | | @Autowired |
| | | private SysShopInfoDao shopInfoDao; |
| | | |
| | | @ApiOperation(value = "获取商品类型列表", notes = "获取商品类型列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = ShoppingGoodsCategory.class) |
| | | }) |
| | | @GetMapping(value = "/findShoppingGoodsType") |
| | | public AjaxResult findShoppingGoodsType() { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | SysShopInfo zbShop = shopInfoDao.selectZbShop(user.getCompanyId()); |
| | | ShoppingGoodsCategory category = new ShoppingGoodsCategory(); |
| | | category.setShopId(zbShop.getId()); |
| | | List<ShoppingGoodsCategory> list = new ArrayList<>(); |
| | | List<ShoppingGoodsCategory> byModel = shoppingGoodsCategoryService.findByModel(category); |
| | | ShoppingGoodsCategory type = new ShoppingGoodsCategory(); |
| | | type.setName("全部"); |
| | | type.setParentId(0L); |
| | | list.add(type); |
| | | list.addAll(byModel); |
| | | return AjaxResult.buildSuccessInstance(list); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取商品列表", notes = "获取商品列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = ShoppingGoodsListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findShoppingGoods") |
| | | public AjaxResult findShoppingGoods(@RequestBody @Validated ShoppingGoodsListDto shoppingGoodsListDto) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | shoppingGoodsListDto.setShopId(user.getShopId()); |
| | | } |
| | | QueryUtil.setQueryLimitCom(shoppingGoodsListDto); |
| | | return AjaxResult.buildSuccessInstance(shoppingGoodsService.findShoppingGoodsListForApi(shoppingGoodsListDto), shoppingGoodsService.findShoppingGoodsListTotalForApi(shoppingGoodsListDto)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取商品详情", notes = "获取商品详情") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = ShoppingGoodsDetailVo.class) |
| | | }) |
| | | @GetMapping(value = "/findGoodsDetailById/{goodsId}") |
| | | public AjaxResult findGoodsDetailById(@PathVariable("goodsId") Long goodsId) { |
| | | ShoppingGoodsDetailVo goodsDetail = shoppingGoodsService.findApiShoppingGoodsDetailById(goodsId); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("goods", goodsDetail); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "创建订单", notes = "创建订单") |
| | | @PostMapping(value = "/createOrder") |
| | | public AjaxResult createOrder(@RequestBody @Validated CreateOrderDto createOrderDto) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | ShoppingCarItemsVo car = new ShoppingCarItemsVo(); |
| | | car.setVipId(createOrderDto.getVipId()); |
| | | |
| | | if (CollectionUtils.isNotEmpty(createOrderDto.getItems())) { |
| | | List<ShoppingCarItem> list = new ArrayList<>(); |
| | | for (CreateOderItemDto item : createOrderDto.getItems()) { |
| | | ShoppingCarItem carItem = new ShoppingCarItem(); |
| | | carItem.setCount(item.getCount()); |
| | | carItem.setGoodsId(item.getGoodsId()); |
| | | carItem.setIsFree(item.getIsFree()); |
| | | carItem.setType(item.getGoodsType()); |
| | | |
| | | carItem.setShoppingGoods(shoppingGoodsService.findById(item.getGoodsId())); |
| | | list.add(carItem); |
| | | } |
| | | car.setCarItems(list); |
| | | } |
| | | int i = sysOrderService.createOrder(WebUtil.getSession(), car); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("下单成功"); |
| | | } |
| | | |
| | | return AjaxResult.buildFailInstance("下单失败"); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取订单列表", notes = "获取订单列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = OrderDetailVo.class) |
| | | }) |
| | | @PostMapping(value = "/findOrderList") |
| | | public AjaxResult findOrderList(@RequestBody @Validated OrderListDto orderListDto) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | int offset = (orderListDto.getPageNum() - 1) * orderListDto.getPageSize(); |
| | | int limit = orderListDto.getPageSize(); |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | pageVo.setOffset(offset); |
| | | pageVo.setLimit(limit); |
| | | |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | orderListDto.setShopId(user.getShopId()); |
| | | } |
| | | QueryUtil.setQueryLimitCom(orderListDto); |
| | | return AjaxResult.buildSuccessInstance(sysOrderService.findApiOrderListInPage(orderListDto, pageVo), sysOrderService.findApiOrderListTotal(orderListDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取订单详情", notes = "获取订单详情") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = OrderDetailVo.class) |
| | | }) |
| | | @GetMapping(value = "/findOrderDetail/{orderId}") |
| | | public AjaxResult findOrderDetail(@PathVariable("orderId") Long orderId) { |
| | | OrderDetailVo orderDetail = sysOrderService.findApiOrderDetailByOrderId(orderId); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("orderDetail", orderDetail); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | @ApiOperation(value = "取消订单", notes = "取消订单") |
| | | @GetMapping(value = "/cancelOrder/{orderId}") |
| | | public AjaxResult cancelOrder(@PathVariable("orderId") Long orderId) { |
| | | SysOrder order = sysOrderService.findById(orderId); |
| | | if (order == null) { |
| | | throw new GlobleException("订单不存在"); |
| | | } |
| | | |
| | | |
| | | int i = sysOrderService.cancelOrder(orderId); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("取消成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("取消失败"); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.app.dto.RankingDto; |
| | | import com.matrix.system.app.vo.RankingVo; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.dao.AchieveNewDao; |
| | | import com.matrix.system.hive.service.AchieveNewService; |
| | | import com.matrix.system.hive.service.SysOrderService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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.RestController; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-28 |
| | | **/ |
| | | @Api(value = "ApiRankingAction", tags = "排行榜接口类") |
| | | @RestController |
| | | @RequestMapping(value ="/api/ranking") |
| | | public class ApiRankingAction { |
| | | |
| | | @Autowired |
| | | private SysOrderService sysOrderService; |
| | | |
| | | @Autowired |
| | | private AchieveNewDao achieveNewDao; |
| | | |
| | | @ApiOperation(value = "顾问业绩排行榜", notes = "顾问业绩排行榜") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = RankingVo.class) |
| | | }) |
| | | @PostMapping(value = "/findStaffAchieveRanking") |
| | | public AjaxResult findStaffAchieveRanking(@RequestBody RankingDto rankingDto) { |
| | | AchieveNew achieveNew = new AchieveNew(); |
| | | QueryUtil.setQueryLimitCom(achieveNew); |
| | | achieveNew.setType(rankingDto.getType()); |
| | | achieveNew.setDatatime(new Date()); |
| | | return AjaxResult.buildSuccessInstance(achieveNewDao.selectStaffSaleAchieveRanking(achieveNew)); |
| | | } |
| | | |
| | | @ApiOperation(value = "门店业绩排行榜", notes = "门店业绩排行榜") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = RankingVo.class) |
| | | }) |
| | | @PostMapping(value = "/findShopAchieveRanking") |
| | | public AjaxResult findShopAchieveRanking(@RequestBody RankingDto rankingDto) { |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance(""); |
| | | AchieveNew achieveNew = new AchieveNew(); |
| | | QueryUtil.setQueryLimitCom(achieveNew); |
| | | achieveNew.setT1(rankingDto.getType()); |
| | | achieveNew.setDatatime(new Date()); |
| | | |
| | | if (RankingDto.SALE.equals(rankingDto.getDataType())) { |
| | | List<RankingVo> list = achieveNewDao.selectShopSaleAchieveRanking(achieveNew); |
| | | ajaxResult.setRows(list); |
| | | } else { |
| | | List<RankingVo> rankingVos = achieveNewDao.selectShopConsumeAchieveRanking(achieveNew); |
| | | ajaxResult.setRows(rankingVos); |
| | | } |
| | | return ajaxResult; |
| | | } |
| | | |
| | | @ApiOperation(value = "美疗师业绩排行榜", notes = "美疗师业绩排行榜") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = RankingVo.class) |
| | | }) |
| | | @PostMapping(value = "/findBeauticianAchieveRanking") |
| | | public AjaxResult findBeauticianAchieveRanking(@RequestBody RankingDto rankingDto) { |
| | | AchieveNew achieveNew = new AchieveNew(); |
| | | QueryUtil.setQueryLimitCom(achieveNew); |
| | | achieveNew.setDatatime(new Date()); |
| | | achieveNew.setT1(rankingDto.getType()); |
| | | return AjaxResult.buildSuccessInstance(achieveNewDao.selectBeauticianConsumeAchieveRanking(achieveNew)); |
| | | } |
| | | |
| | | @ApiOperation(value = "人头数排名", notes = "人头数排名") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = RankingVo.class) |
| | | }) |
| | | @PostMapping(value = "/findNumOfPeopleRanking") |
| | | public AjaxResult findNumOfPeopleRanking(@RequestBody RankingDto rankingDto) { |
| | | AchieveNew achieveNew = new AchieveNew(); |
| | | QueryUtil.setQueryLimitCom(achieveNew); |
| | | achieveNew.setDatatime(new Date()); |
| | | achieveNew.setT1(rankingDto.getType()); |
| | | return AjaxResult.buildSuccessInstance(achieveNewDao.selectNumOfPeopleAchieveRanking(achieveNew)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.component.asyncmessage.AsyncMessageManager; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.pojo.VerifyResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.CreateServiceOrderDto; |
| | | import com.matrix.system.app.dto.IdSubmitDto; |
| | | import com.matrix.system.app.dto.ServiceOrderListDto; |
| | | import com.matrix.system.app.dto.ServiceVipProjDto; |
| | | import com.matrix.system.app.mapper.SysBeauticianStateMapper; |
| | | import com.matrix.system.app.mapper.SysProjServiceMapper; |
| | | import com.matrix.system.app.mapper.SysProjUseMapper; |
| | | import com.matrix.system.app.vo.*; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.bean.SysProjUse; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.service.SysBeauticianStateService; |
| | | import com.matrix.system.hive.service.SysProjServicesService; |
| | | import com.matrix.system.hive.service.SysProjUseService; |
| | | import com.matrix.system.hive.service.SysVipInfoService; |
| | | import com.matrix.system.shopXcx.mqTask.AsyncMessageRouting; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgParam; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-24 |
| | | **/ |
| | | @Api(value = "ApiServiceOrderAction", tags = "服务单接口类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/serviceOrder") |
| | | public class ApiServiceOrderAction { |
| | | |
| | | @Autowired |
| | | private SysProjUseService projUseService; |
| | | |
| | | @Autowired |
| | | private SysVipInfoService sysVipInfoService; |
| | | |
| | | @Autowired |
| | | private SysProjServicesService projServicesService; |
| | | |
| | | @Autowired |
| | | private SysBeauticianStateService sysBeauticianStateService; |
| | | |
| | | |
| | | @Autowired |
| | | private AsyncMessageManager asyncMessageManager; |
| | | |
| | | @Value("${evn}") |
| | | private String evn; |
| | | |
| | | @ApiOperation(value ="获取用户项目/套餐列表", notes = "获取用户项目/套餐列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = ServiceProductListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findVipProject") |
| | | public AjaxResult findVipProject(@RequestBody @Validated ServiceVipProjDto serviceVipProjDto) { |
| | | SysVipInfo vipInfo = sysVipInfoService.findById(serviceVipProjDto.getVipId()); |
| | | |
| | | if (vipInfo == null) { |
| | | throw new GlobleException("会员不存在"); |
| | | } |
| | | |
| | | ServiceProductListVo productListVo = new ServiceProductListVo(); |
| | | productListVo.setName(vipInfo.getVipName()); |
| | | productListVo.setVipId(serviceVipProjDto.getVipId()); |
| | | |
| | | SysProjUse queryUse = new SysProjUse(); |
| | | queryUse.setVipId(serviceVipProjDto.getVipId()); |
| | | queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM); |
| | | queryUse.setTaocanId(-1L); |
| | | if (serviceVipProjDto.getType() != null) { |
| | | switch (serviceVipProjDto.getType()) { |
| | | case "0": |
| | | break; |
| | | case "1": |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | // queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | break; |
| | | case "2": |
| | | queryUse.setTargetFailTime(DateUtil.getDateAfterMonth(new Date(), 1)); |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | // queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | break; |
| | | case "3": |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_WX); |
| | | // queryUse.setIsOver(Dictionary.FLAG_YES_Y); |
| | | break; |
| | | default: |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | // queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | break; |
| | | } |
| | | } else { |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | } |
| | | |
| | | queryUse.setQueryKey(serviceVipProjDto.getQueryKey()); |
| | | List<SysProjUse> projList = projUseService.findInPage(queryUse, null); |
| | | List<ServiceProjVo> serviceProjVos = SysProjUseMapper.INSTANCE.entityListToProjVoList(projList); |
| | | |
| | | queryUse.setTaocanId(null); |
| | | queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_TC); |
| | | // List<SysProjUse> taoCanList = projUseService.findInPage(queryUse, null); |
| | | List<SysProjUse> taoCanList = projUseService.findTaocaoProjUseWithProj(queryUse); |
| | | List<ServiceTcVo> serviceTcVos = SysProjUseMapper.INSTANCE.entityListToTcVoList(taoCanList); |
| | | |
| | | if (CollectionUtils.isNotEmpty(serviceTcVos)) { |
| | | serviceTcVos.forEach(item -> { |
| | | // List<SysProjUse> sysProjUses = projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus()); |
| | | List<ServiceProjVo> taocanProj = SysProjUseMapper.INSTANCE.entityListToProjVoList(item.getTaocanProjUse()); |
| | | item.setTaocanProjUse(null); |
| | | item.setProj(taocanProj); |
| | | }); |
| | | } |
| | | |
| | | productListVo.setProj(serviceProjVos); |
| | | productListVo.setComposeProj(serviceTcVos); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("proj", productListVo); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | @ApiOperation(value = "提交服务单", notes = "提交服务单") |
| | | @PostMapping(value = "/createServiceOrder") |
| | | public AjaxResult createServiceOrder(@RequestBody @Validated CreateServiceOrderDto serviceOrderDto) { |
| | | if (CollectionUtils.isEmpty(serviceOrderDto.getProjItems())) { |
| | | throw new GlobleException("请选择服务"); |
| | | } |
| | | SysVipInfo vipInfo = sysVipInfoService.findById(serviceOrderDto.getVipId()); |
| | | |
| | | |
| | | if (StringUtils.isNotBlank(vipInfo.getPassWord())) { |
| | | if (!vipInfo.getPassWord().equals(serviceOrderDto.getPassword())) { |
| | | return AjaxResult.buildFailInstance("资金密码错误"); |
| | | } |
| | | } |
| | | |
| | | SysProjServices sysProjServices = new SysProjServices(); |
| | | sysProjServices.setVipId(serviceOrderDto.getVipId()); |
| | | sysProjServices.setYyTime(serviceOrderDto.getYyTime()); |
| | | sysProjServices.setRemark(serviceOrderDto.getRemark()); |
| | | |
| | | List<SysBeauticianState> sysBeauticianStates = new ArrayList<>(); |
| | | serviceOrderDto.getProjItems().forEach(item ->{ |
| | | SysBeauticianState sysBeauticianState = SysBeauticianStateMapper.INSTANCE.serviceOrderItemVoToEntity(item); |
| | | |
| | | sysBeauticianState.setBeginTime(serviceOrderDto.getYyTime()); |
| | | sysBeauticianState.setEndTime(DateUtil.getDateAfterMinute(serviceOrderDto.getYyTime(), serviceOrderDto.getTotalTime())); |
| | | sysBeauticianState.setStaffId(serviceOrderDto.getBeautyId()); |
| | | sysBeauticianStates.add(sysBeauticianState); |
| | | }); |
| | | |
| | | sysProjServices.setServiceItems(sysBeauticianStates); |
| | | |
| | | //检测欠款 |
| | | VerifyResult arrearsVerifyResult = projServicesService.checkArrears(sysProjServices); |
| | | if (arrearsVerifyResult.isError()) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, arrearsVerifyResult.getMsg()); |
| | | } |
| | | //检测余次 |
| | | VerifyResult balanceverifyResult = projServicesService.checkBalance(sysProjServices); |
| | | if (balanceverifyResult.isError()) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, balanceverifyResult.getMsg()); |
| | | } |
| | | |
| | | // 设置状态为待预约 |
| | | sysProjServices.setState(Dictionary.SERVICE_STATU_DYY); |
| | | SysProjServices newSysProjServices = projServicesService.addSysProjServices(sysProjServices); |
| | | if (newSysProjServices != null) { |
| | | return AjaxResult.buildSuccessInstance("下单成功"); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "下单失败!"); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "查询服务单列表", notes = "查询服务单列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = ServiceOrderListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findServiceOrderList") |
| | | public AjaxResult findServiceOrderList(@RequestBody @Validated ServiceOrderListDto orderListDto) { |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | int offset = (orderListDto.getPageNum() - 1) * orderListDto.getPageSize(); |
| | | int limit = orderListDto.getPageSize(); |
| | | pageVo.setOffset(offset); |
| | | pageVo.setLimit(limit); |
| | | |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | orderListDto.setShopId(user.getShopId()); |
| | | } |
| | | QueryUtil.setQueryLimitCom(orderListDto); |
| | | return AjaxResult.buildSuccessInstance(projServicesService.findApiServiceOrderListInPage(orderListDto, pageVo), projServicesService.findApiServiceOrderListTotal(orderListDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取服务单详情", notes = "获取服务单详情") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = ServiceOrderDetailVo.class) |
| | | }) |
| | | @GetMapping(value = "/findServiceOrderDetail/{id}") |
| | | public AjaxResult findServiceOrderDetail(@PathVariable("id") Long id) { |
| | | SysProjServices projServices = projServicesService.findById(id); |
| | | if (projServices == null) { |
| | | return AjaxResult.buildFailInstance("服务单不存在"); |
| | | } |
| | | |
| | | ServiceOrderDetailVo detailVo = SysProjServiceMapper.INSTANCE.projServiceToDetailVo(projServices); |
| | | |
| | | List<SysBeauticianState> beauticianStates = sysBeauticianStateService.findBySerId(projServices.getId()); |
| | | List<ServiceOrderDetailItemVo> items = SysBeauticianStateMapper.INSTANCE.entitiesToDetailItemsVo(beauticianStates); |
| | | detailVo.setItems(items); |
| | | |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("detail", detailVo); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | @ApiOperation(value = "开始服务", notes = "开始服务") |
| | | @GetMapping(value = "/startService/{id}") |
| | | public AjaxResult startService(@PathVariable("id") Long id) { |
| | | SysProjServices sysProjServices = new SysProjServices(); |
| | | sysProjServices.setId(id); |
| | | int i = projServicesService.modifyFWKSProjServices(sysProjServices); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("开始服务成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("开始服务失败"); |
| | | } |
| | | |
| | | @ApiOperation(value = "结束服务", notes = "结束服务") |
| | | @GetMapping(value = "/stopService/{id}") |
| | | public AjaxResult stopService(@PathVariable("id") Long id) { |
| | | SysProjServices projServvices = new SysProjServices(); |
| | | projServvices.setId(id); |
| | | int result = projServicesService.modifyFWJSrojServices(projServvices); |
| | | if (result > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "结束服务成功"); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "结束服务失败"); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "取消服务", notes = "取消服务") |
| | | @GetMapping(value = "/cancelService/{id}") |
| | | public AjaxResult cancelService(@PathVariable("id") Long id) { |
| | | SysProjServices services = new SysProjServices(); |
| | | services.setId(id); |
| | | int i = projServicesService.modifyCancelProjServices(services); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "取消预约成功"); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "取消预约失败"); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "确认服务", notes = "确认服务") |
| | | @PostMapping(value = "/confirmServiceOrder") |
| | | public AjaxResult confirmServiceOrder(@RequestBody @Validated IdSubmitDto idSubmitDto) { |
| | | int i=projServicesService.confirmServiceOrder(idSubmitDto.getId()); |
| | | if(i>0){ |
| | | return AjaxResult.buildSuccessInstance("确认成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("确认失败"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.SettingDto; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.hive.bean.AppVersion; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @author jyy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @CrossOrigin(origins = "*") |
| | | @Api(value = "ApiSettingAction", tags = "配置查询类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/setting") |
| | | public class ApiSettingAction { |
| | | |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | |
| | | @ApiOperation(value = "获取app配置", notes = "获取app配置") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = AppVersion.class) |
| | | }) |
| | | @GetMapping(value = "/findAppSettings") |
| | | public AjaxResult findAppSettings() { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("查询成功"); |
| | | result.putInMap(AppConstance.APP_BANNER_GL, busParameterSettingsDao.selectCompanyParamByCode(AppConstance.APP_BANNER_GL,user.getCompanyId())); |
| | | return result; |
| | | } |
| | | |
| | | @ApiOperation(value = "根据code获取配置", notes = "根据code获取配置") |
| | | @PostMapping(value = "/findAppSettingsByCode") |
| | | public AjaxResult findAppSettingsByCode(@RequestBody SettingDto settingDto) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("查询成功"); |
| | | result.putInMap(settingDto.getCode(), busParameterSettingsDao.selectCompanyParamByCode(settingDto.getCode(),user.getCompanyId())); |
| | | return result; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.service.SysShopInfoService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-30 |
| | | **/ |
| | | @Api(value = "ApiShopInfoAction", tags = "店铺信息接口类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/shop") |
| | | public class ApiShopInfoAction { |
| | | |
| | | @Autowired |
| | | private SysShopInfoService shopInfoService; |
| | | |
| | | @ApiOperation(value = "获取门店列表", notes = "获取门店列表") |
| | | @GetMapping(value = "/findAllShopList") |
| | | public AjaxResult findAllShopList() { |
| | | SysShopInfo shopInfo = new SysShopInfo(); |
| | | QueryUtil.setQueryLimitCom(shopInfo); |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!DataAuthUtil.hasAllShopAuth()){ |
| | | shopInfo.setId(sysUsers.getShopId()); |
| | | } |
| | | |
| | | return AjaxResult.buildSuccessInstance(shopInfoService.findByModel(shopInfo)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.app.dto.SkinCheckListDto; |
| | | import com.matrix.system.app.mapper.SysSkinCheckRecordMapper; |
| | | import com.matrix.system.app.vo.SkinCheckAnalysisItems; |
| | | import com.matrix.system.app.vo.SkinCheckDetailVo; |
| | | import com.matrix.system.app.vo.SkinCheckDiagnoseItemVo; |
| | | import com.matrix.system.app.vo.SkinCheckListVo; |
| | | import com.matrix.system.hive.bean.SysSkinCheckRecord; |
| | | import com.matrix.system.hive.dao.SysSkinCheckRecordDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.shopXcx.bean.ShopProduct; |
| | | import com.matrix.system.shopXcx.dao.ShopProductDao; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-27 |
| | | **/ |
| | | @Api(value = "ApiSkinCheckAction", tags = "皮肤检测接口类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/skinCheck") |
| | | public class ApiSkinCheckAction { |
| | | |
| | | @Autowired |
| | | private SysSkinCheckRecordDao sysSkinCheckRecordDao; |
| | | |
| | | @Autowired |
| | | private ShopProductDao shopProductDao; |
| | | |
| | | @ApiOperation(value = "获取皮肤检测列表", notes = "获取皮肤检测列表") |
| | | @PostMapping(value = "/findSkinCheckList") |
| | | public AjaxResult findSkinCheckList(@RequestBody @Validated SkinCheckListDto skinCheckListDto) { |
| | | SysSkinCheckRecord sysSkinCheckRecord = new SysSkinCheckRecord(); |
| | | sysSkinCheckRecord.setUserId(skinCheckListDto.getVipId()); |
| | | |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | pageVo.setOffset((skinCheckListDto.getPageNum() - 1) * skinCheckListDto.getPageSize()); |
| | | pageVo.setLimit(skinCheckListDto.getPageSize()); |
| | | pageVo.setSort("t1.create_time"); |
| | | pageVo.setOrder("desc"); |
| | | |
| | | List<SysSkinCheckRecord> dataList = sysSkinCheckRecordDao.selectInPage(sysSkinCheckRecord, pageVo); |
| | | List<SkinCheckListVo> list = SysSkinCheckRecordMapper.INSTANCE.entitiesToListVos(dataList); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, list, |
| | | sysSkinCheckRecordDao.selectTotalRecord(sysSkinCheckRecord)); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取皮肤检测详情", notes = "获取皮肤检测详情") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = SkinCheckDetailVo.class) |
| | | }) |
| | | @GetMapping(value = "/findSkinCheckDetail/{id}") |
| | | public AjaxResult findSkinCheckDetail(@PathVariable("id") Long id) { |
| | | |
| | | SysSkinCheckRecord sysSkinCheckRecord = sysSkinCheckRecordDao.selectById(id); |
| | | |
| | | SysSkinCheckRecordMapper instance = SysSkinCheckRecordMapper.INSTANCE; |
| | | SkinCheckDetailVo detail = instance.entityToDetailVo(sysSkinCheckRecord); |
| | | detail.setSex(sysSkinCheckRecord.getSex()); |
| | | List<SkinCheckDiagnoseItemVo> diagnoseItems = instance.entitiesToDiagnoseItems(sysSkinCheckRecord.getAnalysisDetail()); |
| | | List<SkinCheckAnalysisItems> analysisItems = instance.entitiesToAnalysisItems(sysSkinCheckRecord.getSkinDetails()); |
| | | |
| | | analysisItems.forEach(item -> { |
| | | List<Integer> ids = StringUtils.strToCollToInteger(item.getProductIds(), ","); |
| | | if(CollectionUtils.isNotEmpty(ids)){ |
| | | List<String> shopProducts = shopProductDao.selectProductNameByIds(ids); |
| | | item.setProducts(shopProducts); |
| | | } |
| | | }); |
| | | |
| | | detail.setDiagnoseItems(diagnoseItems); |
| | | detail.setAnalysisItems(analysisItems); |
| | | |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("detail", detail); |
| | | return ajaxResult; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.BusinessesDto; |
| | | import com.matrix.system.app.dto.VipStatisticsParamDto; |
| | | import com.matrix.system.app.vo.BeauticianVo; |
| | | import com.matrix.system.app.vo.BusinessesDataShowVo; |
| | | import com.matrix.system.app.vo.VipAchieveDataShowVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | | import com.matrix.system.hive.bean.SysBusinessData; |
| | | import com.matrix.system.hive.dao.SysBusinessDataDao; |
| | | import com.matrix.system.hive.service.imp.DataAnalysisCustomerServiceImpl; |
| | | import com.matrix.system.hiveErp.analysUtil.*; |
| | | import com.matrix.system.hiveErp.dao.TjVipSumDao; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.jsoup.helper.DataUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-28 |
| | | **/ |
| | | @Api(value = "ApiStatisticsAction", tags = "报表接口类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/statistics") |
| | | public class ApiStatisticsAction { |
| | | |
| | | @Autowired |
| | | TjVipSumDao tjVipSumDao; |
| | | |
| | | @Autowired |
| | | private SysBusinessDataDao sysBusinessDataDao; |
| | | |
| | | @Autowired |
| | | private DataAnalysisCustomerServiceImpl dataAnalysisCustomerService; |
| | | |
| | | @ApiOperation(value = "公司经营报表/门店经营报表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = BusinessesDataShowVo.class) |
| | | }) |
| | | @PostMapping(value = "/findShopBusinessesData") |
| | | public AjaxResult findShopBusinessesData(@RequestBody BusinessesDto businessesDto) { |
| | | String unit = ""; |
| | | int calenderUnit; |
| | | if (BusinessesDto.DAY.equals(businessesDto.getType())) { |
| | | unit = "日"; |
| | | calenderUnit = Calendar.DATE; |
| | | } else { |
| | | unit = "月"; |
| | | calenderUnit = Calendar.MONTH; |
| | | } |
| | | |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | int start = (businessesDto.getPageNum() - 1) * businessesDto.getPageSize(); |
| | | int size = businessesDto.getPageSize(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.add(calenderUnit, 1); |
| | | calendar.add(calenderUnit, -start); |
| | | String endTime = DateUtil.dateToString(calendar.getTime(), DateUtil.DATE_FORMAT_DD); |
| | | calendar.add(calenderUnit, -size); |
| | | String startTime = DateUtil.dateToString(calendar.getTime(), DateUtil.DATE_FORMAT_DD); |
| | | List<Date> xAxis = StatisticsTimeUtil.getTimeSpace(startTime, endTime, unit); |
| | | List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis); |
| | | List<StatisticsTimeDaoParam> statisticsTimeDaoParams = timeSpaceParam.subList(0, timeSpaceParam.size() - 2); |
| | | List<BusinessesDataShowVo> list = sysBusinessDataDao.selectApiBusinessData(statisticsTimeDaoParams, businessesDto.getShopId(), user.getCompanyId()); |
| | | |
| | | List<BusinessesDataShowVo> result = new ArrayList<>(); |
| | | for (int i = list.size() - 1; i >= 0; i--) { |
| | | BusinessesDataShowVo item = list.get(i); |
| | | String dataTime = item.getDataTime(); |
| | | if (BusinessesDto.DAY.equals(businessesDto.getType())) { |
| | | item.setDataTime(DateUtil.dateToString(DateUtil.stringToDate(dataTime, DateUtil.DATE_FORMAT_DD), DateUtil.DATE_FORMAT_DD)); |
| | | } else { |
| | | item.setDataTime(DateUtil.dateToString(DateUtil.stringToDate(dataTime, DateUtil.MONTH), DateUtil.MONTH)); |
| | | } |
| | | result.add(item); |
| | | } |
| | | return AjaxResult.buildSuccessInstance(result); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | int start = 1; |
| | | |
| | | int end = 10; |
| | | |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.add(Calendar.DATE, start); |
| | | Date time = calendar.getTime(); |
| | | System.out.println(time); |
| | | calendar.add(Calendar.DATE, end); |
| | | System.out.println(calendar.getTime()); |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "专项", notes = "专项") |
| | | @PostMapping(value = "/findBusinessInCome") |
| | | public AjaxResult findBusinessInCome(@RequestBody @Validated StatisticsParamVo statisticsParam) { |
| | | if (statisticsParam.getShopId() != null) { |
| | | AjaxResult ajaxResult = dataAnalysisCustomerService.getAnalysisResult(statisticsParam, new Caculate<BigDecimal>() { |
| | | @Override |
| | | public Map<String, BigDecimal> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long companyId) { |
| | | switch (statisticsParam.getType()) { |
| | | case "1" : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, shopId, null); |
| | | case "2" : |
| | | return tjVipSumDao.selectCashIncome(timeSpaceParam, shopId, null); |
| | | case "3" : |
| | | return tjVipSumDao.selectCardUse(timeSpaceParam, shopId, null); |
| | | case "4" : |
| | | return tjVipSumDao.selectArrears(timeSpaceParam, shopId, null); |
| | | case "5" : |
| | | return tjVipSumDao.selectCashRefund(timeSpaceParam, shopId, null); |
| | | case "6" : |
| | | return tjVipSumDao.selectCardRefund(timeSpaceParam, shopId, null); |
| | | case "7": |
| | | return tjVipSumDao.selectProductAchieve(timeSpaceParam, shopId, null); |
| | | case "8": |
| | | return tjVipSumDao.selectCardAchieve(timeSpaceParam, shopId, null); |
| | | case "9": |
| | | return tjVipSumDao.selectRepayment(timeSpaceParam, shopId, null); |
| | | case "10": |
| | | return tjVipSumDao.selectPerCustomCnt(timeSpaceParam, shopId, null); |
| | | case "11": |
| | | return tjVipSumDao.selectCustomGoodsCnt(timeSpaceParam, shopId, null); |
| | | case "12": |
| | | return tjVipSumDao.selectPerCustomPrice(timeSpaceParam, shopId, null); |
| | | case "13": |
| | | return tjVipSumDao.selectCost(timeSpaceParam, shopId, null); |
| | | case "14": |
| | | return tjVipSumDao.selectGrossProfit(timeSpaceParam, shopId, null); |
| | | case "15": |
| | | return tjVipSumDao.selectGrossProfitRate(timeSpaceParam, shopId, null); |
| | | case "16" : |
| | | return tjVipSumDao.selectHisConsume(timeSpaceParam, shopId, null); |
| | | case "17" : |
| | | return tjVipSumDao.selectFreeConsume(timeSpaceParam, shopId, null); |
| | | case "18" : |
| | | return tjVipSumDao.selectPeopleCnt(timeSpaceParam, shopId, null); |
| | | case "19" : |
| | | return tjVipSumDao.selectProjConsumeCnt(timeSpaceParam, shopId, null); |
| | | case "20" : |
| | | return tjVipSumDao.selectTimeLength(timeSpaceParam, shopId, null); |
| | | case "21" : |
| | | return tjVipSumDao.selectCardAmount(timeSpaceParam, shopId, null); |
| | | case "22" : |
| | | return tjVipSumDao.selectFreeAmount(timeSpaceParam, shopId, null); |
| | | default : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, shopId, null); |
| | | } |
| | | } |
| | | }); |
| | | return setDataList(ajaxResult); |
| | | } else { |
| | | AjaxResult ajaxResult = dataAnalysisCustomerService.getCompanyAnalysisResult(statisticsParam, new Caculate<BigDecimal>() { |
| | | @Override |
| | | public Map<String, BigDecimal> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long companyId) { |
| | | switch (statisticsParam.getType()) { |
| | | case "1" : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, null, companyId); |
| | | case "2" : |
| | | return tjVipSumDao.selectCashIncome(timeSpaceParam, null, companyId); |
| | | case "3" : |
| | | return tjVipSumDao.selectCardUse(timeSpaceParam, null, companyId); |
| | | case "4" : |
| | | return tjVipSumDao.selectArrears(timeSpaceParam, null, companyId); |
| | | case "5" : |
| | | return tjVipSumDao.selectCashRefund(timeSpaceParam, null, companyId); |
| | | case "6" : |
| | | return tjVipSumDao.selectCardRefund(timeSpaceParam, null, companyId); |
| | | case "7": |
| | | return tjVipSumDao.selectProductAchieve(timeSpaceParam, null, companyId); |
| | | case "8": |
| | | return tjVipSumDao.selectCardAchieve(timeSpaceParam, null, companyId); |
| | | case "9": |
| | | return tjVipSumDao.selectRepayment(timeSpaceParam, null, companyId); |
| | | case "10": |
| | | return tjVipSumDao.selectPerCustomCnt(timeSpaceParam, null, companyId); |
| | | case "11": |
| | | return tjVipSumDao.selectCustomGoodsCnt(timeSpaceParam, null, companyId); |
| | | case "12": |
| | | return tjVipSumDao.selectPerCustomPrice(timeSpaceParam, null, companyId); |
| | | case "13": |
| | | return tjVipSumDao.selectCost(timeSpaceParam, null, companyId); |
| | | case "14": |
| | | return tjVipSumDao.selectCost(timeSpaceParam, null, companyId); |
| | | case "15": |
| | | return tjVipSumDao.selectCost(timeSpaceParam, null, companyId); |
| | | case "16" : |
| | | return tjVipSumDao.selectHisConsume(timeSpaceParam, null, companyId); |
| | | case "17" : |
| | | return tjVipSumDao.selectFreeConsume(timeSpaceParam, null, companyId); |
| | | case "18" : |
| | | return tjVipSumDao.selectPeopleCnt(timeSpaceParam, null, companyId); |
| | | case "19" : |
| | | return tjVipSumDao.selectProjConsumeCnt(timeSpaceParam, null, companyId); |
| | | case "20" : |
| | | return tjVipSumDao.selectTimeLength(timeSpaceParam, null, companyId); |
| | | case "21" : |
| | | return tjVipSumDao.selectCardAmount(timeSpaceParam, null, companyId); |
| | | case "22" : |
| | | return tjVipSumDao.selectFreeAmount(timeSpaceParam, null, companyId); |
| | | default : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, null, companyId); |
| | | } |
| | | } |
| | | }); |
| | | return setDataList(ajaxResult); |
| | | } |
| | | } |
| | | |
| | | private AjaxResult setDataList(AjaxResult ajaxResult) { |
| | | List<SeriesVo> list = (List<SeriesVo>) ajaxResult.getMapInfo().get("series"); |
| | | String[] xAxis = (String[]) ajaxResult.getMapInfo().get("xAxis"); |
| | | String [] data = list.get(0).getData(); |
| | | if (data != null && data.length != 0) { |
| | | List<Map<String, String>> dataList = new ArrayList<>(); |
| | | for(int i = data.length - 1; i >= 0; i--) { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put(xAxis[i], data[i]); |
| | | dataList.add(map); |
| | | } |
| | | ajaxResult.setRows(dataList); |
| | | } |
| | | |
| | | return ajaxResult; |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "查询员工业绩报表", notes = "查询员工业绩报表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = VipAchieveDataShowVo.class) |
| | | }) |
| | | @PostMapping(value = "/findVipAchieve") |
| | | public AjaxResult findVipAchieve(@RequestBody BusinessesDto businessesDto) { |
| | | String unit = ""; |
| | | int calenderUnit; |
| | | if (BusinessesDto.DAY.equals(businessesDto.getType())) { |
| | | unit = "日"; |
| | | calenderUnit = Calendar.DATE; |
| | | } else { |
| | | unit = "月"; |
| | | calenderUnit = Calendar.MONTH; |
| | | } |
| | | |
| | | int start = (businessesDto.getPageNum() - 1) * businessesDto.getPageSize(); |
| | | int size = businessesDto.getPageSize(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.add(calenderUnit, 1); |
| | | calendar.add(calenderUnit, -start); |
| | | String endTime = DateUtil.dateToString(calendar.getTime(), DateUtil.DATE_FORMAT_DD); |
| | | calendar.add(calenderUnit, -size); |
| | | String startTime = DateUtil.dateToString(calendar.getTime(), DateUtil.DATE_FORMAT_DD); |
| | | List<Date> xAxis = StatisticsTimeUtil.getTimeSpace(startTime, endTime, unit); |
| | | List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis); |
| | | List<StatisticsTimeDaoParam> statisticsTimeDaoParams = timeSpaceParam.subList(0, timeSpaceParam.size() - 2); |
| | | List<VipAchieveDataShowVo> list = tjVipSumDao.selectVipAchieveInPage(statisticsTimeDaoParams, businessesDto.getStaffId()); |
| | | |
| | | List<VipAchieveDataShowVo> result = new ArrayList<>(); |
| | | for (int i = list.size() - 1; i >= 0; i--) { |
| | | VipAchieveDataShowVo item = list.get(i); |
| | | String dataTime = item.getTime(); |
| | | if (BusinessesDto.DAY.equals(businessesDto.getType())) { |
| | | item.setTime(DateUtil.dateToString(DateUtil.stringToDate(dataTime, DateUtil.DATE_FORMAT_DD), DateUtil.DATE_FORMAT_DD)); |
| | | } else { |
| | | item.setTime(DateUtil.dateToString(DateUtil.stringToDate(dataTime, DateUtil.MONTH), DateUtil.MONTH)); |
| | | } |
| | | result.add(item); |
| | | } |
| | | return AjaxResult.buildSuccessInstance(result); |
| | | } |
| | | |
| | | @ApiOperation(value = "员工专项", notes = "员工专项") |
| | | @PostMapping(value = "/findVipBusinessData") |
| | | public AjaxResult findVipBusinessData(@RequestBody @Validated VipStatisticsParamDto vipStatisticsParamDto) { |
| | | AjaxResult ajaxResult = dataAnalysisCustomerService.getStaffAnalysisResult(vipStatisticsParamDto, new Caculate<BigDecimal>() { |
| | | @Override |
| | | public Map<String, BigDecimal> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long staffId) { |
| | | switch (vipStatisticsParamDto.getType()) { |
| | | case "1" : |
| | | return tjVipSumDao.selectStaffOrderAchieve(timeSpaceParam, staffId); |
| | | case "2" : |
| | | return tjVipSumDao.selectStaffCashAchieve(timeSpaceParam, staffId); |
| | | case "3" : |
| | | return tjVipSumDao.selectStaffCardAchieve(timeSpaceParam, staffId); |
| | | case "4" : |
| | | return tjVipSumDao.selectStaffGoodsAchieve(timeSpaceParam, staffId); |
| | | case "5" : |
| | | return tjVipSumDao.selectStaffHisConsumeAchieve(timeSpaceParam, staffId); |
| | | case "6" : |
| | | return tjVipSumDao.selectStaffFreeConsumeAchieve(timeSpaceParam, staffId); |
| | | case "7" : |
| | | return tjVipSumDao.selectStaffCommissionAchieve(timeSpaceParam, staffId); |
| | | case "8" : |
| | | return tjVipSumDao.selectStaffPeopleNum(timeSpaceParam, staffId); |
| | | case "9" : |
| | | return tjVipSumDao.selectStaffProjNum(timeSpaceParam, staffId); |
| | | case "10" : |
| | | return tjVipSumDao.selectStaffProjTime(timeSpaceParam, staffId); |
| | | default: |
| | | return tjVipSumDao.selectStaffOrderAchieve(timeSpaceParam, staffId); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | return setDataList(ajaxResult); |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.StoreInOutListDto; |
| | | import com.matrix.system.app.dto.StoreListDto; |
| | | import com.matrix.system.app.mapper.SysStoreInfoMapper; |
| | | import com.matrix.system.app.vo.StoreInOutListVo; |
| | | import com.matrix.system.app.vo.StoreListVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.bean.SysStoreInfo; |
| | | import com.matrix.system.hive.dao.SysStoreInfoDao; |
| | | import com.matrix.system.hive.pojo.StoreInOutRecordVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-27 |
| | | **/ |
| | | @Api(value = "ApiStoreAction", tags = "库存管理接口类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/store") |
| | | public class ApiStoreAction { |
| | | |
| | | @Autowired |
| | | private SysStoreInfoDao sysStoreInfoDao; |
| | | |
| | | @ApiOperation(value = "获取库存列表", notes = "获取库存列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = StoreListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findStoreList") |
| | | public AjaxResult findStoreList(@RequestBody @Validated StoreListDto storeListDto) { |
| | | SysStoreInfo sysStoreInfo = new SysStoreInfo(); |
| | | |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysStoreInfo.setShopId(users.getShopId()); |
| | | sysStoreInfo.setCompanyId(users.getCompanyId()); |
| | | sysStoreInfo.setQueryKey(storeListDto.getQueryKey()); |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | pageVo.setOffset((storeListDto.getPageNum() - 1) * storeListDto.getPageSize()); |
| | | pageVo.setLimit(storeListDto.getPageSize()); |
| | | pageVo.setSort("c.goods_no"); |
| | | pageVo.setOrder("asc"); |
| | | |
| | | List<SysStoreInfo> dataList = sysStoreInfoDao.selectCountInPage(sysStoreInfo, pageVo); |
| | | List<StoreListVo> resultList = SysStoreInfoMapper.INSTANCE.entitiesToStoreVos(dataList); |
| | | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, resultList, sysStoreInfoDao.selectCountTotalRecord(sysStoreInfo)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取商品出入库列表", notes = "获取商品出入库列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = StoreInOutListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findGoodsInOutInfo") |
| | | public AjaxResult findGoodsInOutInfo(@RequestBody @Validated StoreInOutListDto storeInOutListDto) { |
| | | StoreInOutRecordVO inOutRecordVO = new StoreInOutRecordVO(); |
| | | inOutRecordVO.setBeginTime(storeInOutListDto.getStartTime()); |
| | | inOutRecordVO.setEndTime(storeInOutListDto.getEndTime()); |
| | | inOutRecordVO.setName(storeInOutListDto.getCode()); |
| | | |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | pageVo.setOffset((storeInOutListDto.getPageNum() - 1) * storeInOutListDto.getPageSize()); |
| | | pageVo.setLimit(storeInOutListDto.getPageSize()); |
| | | List<StoreInOutRecordVO> dataList =sysStoreInfoDao.findStoreInOutRecord(inOutRecordVO,pageVo); |
| | | List<StoreInOutListVo> list = SysStoreInfoMapper.INSTANCE.recordVosToInOutListVos(dataList); |
| | | return AjaxResult.buildSuccessInstance(list,sysStoreInfoDao.findStoreInOutTotal(inOutRecordVO)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.BeauticianDto; |
| | | import com.matrix.system.app.dto.ModifyUserDto; |
| | | import com.matrix.system.app.dto.PwdModifyDto; |
| | | import com.matrix.system.app.dto.UsersQueryDto; |
| | | import com.matrix.system.app.mapper.SysUsersMapper; |
| | | import com.matrix.system.app.mapper.SysWorkBeatuistaffMapper; |
| | | import com.matrix.system.app.vo.BeauticianVo; |
| | | import com.matrix.system.app.vo.UserAchieveVo; |
| | | import com.matrix.system.app.vo.UserInfoDetailVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.interceptor.ApiUserLoginInterceptor; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.PasswordUtil; |
| | | import com.matrix.system.hive.action.BaseController; |
| | | import com.matrix.system.hive.bean.SysWorkBeatuistaff; |
| | | import com.matrix.system.hive.service.AchieveNewService; |
| | | import com.matrix.system.hive.service.SysWorkBeatuistaffService; |
| | | import com.matrix.system.hive.service.SysWorktimeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @Api(value = "ApiUsersAction", tags = "用户中心接口类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/user") |
| | | public class ApiUsersAction extends BaseController { |
| | | |
| | | @Autowired |
| | | private AchieveNewService achieveNewService; |
| | | |
| | | @Autowired |
| | | private SysWorktimeService sysWorkTimeService; |
| | | |
| | | @Autowired |
| | | private SysUsersService sysUsersService; |
| | | |
| | | @Autowired |
| | | private SysWorkBeatuistaffService sysWorkBeatuistaffService; |
| | | |
| | | @Value("${login_private_key}") |
| | | private String privateKey; |
| | | |
| | | @ApiOperation(value = "个人中心--获取用户业绩接口 type 1-今日 2-昨天 3-本月 4-上月") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = UserAchieveVo.class) |
| | | }) |
| | | @GetMapping(value = "/findUserAchieve/{type}") |
| | | public AjaxResult findUserAchieve(@PathVariable("type") Integer type) { |
| | | UserAchieveVo achieveVo = achieveNewService.findUserAchieveByTime(type); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("achieve", achieveVo); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | @ApiOperation(value = "获取美疗师列表 - 开始时间结束时间") |
| | | @ApiResponses( |
| | | @ApiResponse(code = 200, message = "Ok", response = BeauticianVo.class) |
| | | ) |
| | | @PostMapping(value = "/findBeauticianList") |
| | | public AjaxResult findBeauticianList(@RequestBody @Validated BeauticianDto beauticianDto) { |
| | | // SysBeauticianState sysBeauticianState = new SysBeauticianState(); |
| | | // sysBeauticianState.setBeginTime(beauticianDto.getStartTime()); |
| | | // sysBeauticianState.setEndTime(beauticianDto.getEndTime()); |
| | | // |
| | | // // 根据时间获取一段排班码 |
| | | // String panBanCodes = DateUtil.dateToString(sysBeauticianState.getBeginTime(),DateUtil.DATE_FORMAT_NO_SPLITE_DD); |
| | | // // 获取登陆的用户 |
| | | // SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | // List<SysUsers> staffs=new ArrayList<>(); |
| | | // if(sysWorkTimeService.isInWorkTime(user.getShopId(),sysBeauticianState.getBeginTime(),sysBeauticianState.getEndTime())){ |
| | | // staffs= sysUsersService.findByCodeBeaStateShop(user.getShopId(), |
| | | // sysBeauticianState, panBanCodes); |
| | | // } |
| | | |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | String panBanCodes = DateUtil.dateToString(beauticianDto.getStartTime(),DateUtil.DATE_FORMAT_NO_SPLITE_DD); |
| | | List<SysWorkBeatuistaff> workBeauty = sysWorkBeatuistaffService.findByDateStr(panBanCodes, user.getShopId()); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SysWorkBeatuistaffMapper.INSTANCE.workBeautysToBeautyVos(workBeauty), 0); |
| | | } |
| | | |
| | | @ApiOperation(value = "退出登陆", notes = "退出登陆") |
| | | @GetMapping(value = "/loginOut") |
| | | public AjaxResult loginOut(HttpServletRequest request) { |
| | | String token=ApiUserLoginInterceptor.resolveToken(request,privateKey); |
| | | LocalCache.remove(token); |
| | | return AjaxResult.buildSuccessInstance("退出成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "小程序退出登陆", notes = "小程序退出登陆") |
| | | @GetMapping(value = "/xcxloginOut/{code}") |
| | | public AjaxResult xcxloginOut(HttpServletRequest request, @PathVariable("code") String code) { |
| | | SysUsers hasBind = sysUsersService.findByOpenId(code, HostInterceptor.getCompanyId()); |
| | | if (hasBind != null) { |
| | | if(StrUtil.isNotBlank(hasBind.getOpenIds())) { |
| | | List<String> openIds = StrUtil.split(hasBind.getOpenIds(), ','); |
| | | openIds.remove(code); |
| | | |
| | | sysUsersService.modifyUserOpenId(CollUtil.join(openIds, ","), hasBind.getSuId()); |
| | | } |
| | | } |
| | | String token=ApiUserLoginInterceptor.resolveToken(request,privateKey); |
| | | LocalCache.remove(token); |
| | | return AjaxResult.buildSuccessInstance("退出成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "员工列表", notes = "员工列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = BeauticianVo.class) |
| | | }) |
| | | @PostMapping(value = "/findAllUsers") |
| | | public AjaxResult findAllUsers(@RequestBody UsersQueryDto usersQueryDto) { |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | SysUsers query = new SysUsers(); |
| | | if (DataAuthUtil.hasAllShopAuth()) { |
| | | query.setCompanyId(sysUsers.getCompanyId()); |
| | | } else { |
| | | query.setCompanyId(sysUsers.getCompanyId()); |
| | | query.setShopId(sysUsers.getShopId()); |
| | | } |
| | | query.setSuUserType("employee"); |
| | | query.setSuName(usersQueryDto.getQueryKey()); |
| | | List<SysUsers> list = sysUsersService.findByModel(query); |
| | | List<BeauticianVo> dataList = SysUsersMapper.INSTANCE.usersListToBeautyList(list); |
| | | return AjaxResult.buildSuccessInstance(dataList); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改密码", notes = "修改密码") |
| | | @PostMapping(value = "/modifyPwd") |
| | | public AjaxResult modifyPwd(@RequestBody @Validated PwdModifyDto pwdModifyDto) throws UnsupportedEncodingException, NoSuchAlgorithmException { |
| | | SysUsers me = getMe(); |
| | | SysUsers user = sysUsersService.findById(me.getSuId()); |
| | | |
| | | SysUsers pwdUser = new SysUsers(); |
| | | pwdUser.setSuPassword(pwdModifyDto.getOldPwd()); |
| | | pwdUser.setSuRegisterTime(user.getSuRegisterTime()); |
| | | String pwd = PasswordUtil.getEncrypUserPwd(pwdUser); |
| | | if (!pwd.equals(user.getSuPassword())) { |
| | | return AjaxResult.buildFailInstance("老密码错误"); |
| | | } |
| | | |
| | | int i = sysUsersService.updateUserPassword(user.getSuId(), pwd); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("修改成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("修改失败"); |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "获取当前登陆用户信息", notes = "获取当前登陆用户信息") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = UserInfoDetailVo.class) |
| | | }) |
| | | @GetMapping(value = "/findUserInfo") |
| | | public AjaxResult findUserInfo() { |
| | | SysUsers user = sysUsersService.findById(getMe().getSuId()); |
| | | |
| | | UserInfoDetailVo userInfoDetailVo = SysUsersMapper.INSTANCE.usersToDetailInfoVo(user); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("detail", userInfoDetailVo); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑当前用户信息", notes = "编辑当前用户信息") |
| | | @PostMapping(value = "/modifyUserInfo") |
| | | public AjaxResult modifyUserInfo(@RequestBody @Validated ModifyUserDto modifyUserDto) { |
| | | SysUsers user = SysUsersMapper.INSTANCE.modifyUserDtoToUsers(modifyUserDto); |
| | | user.setSuId(getMe().getSuId()); |
| | | int i = sysUsersService.modifyByModel(user); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("修改成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("修改失败"); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.AddVipDto; |
| | | import com.matrix.system.app.dto.ModifyVipDto; |
| | | import com.matrix.system.app.dto.QuestionAnswerDto; |
| | | import com.matrix.system.app.dto.VipInfoListDto; |
| | | import com.matrix.system.app.mapper.MoneyCardUseMapper; |
| | | import com.matrix.system.app.mapper.QuestionMapper; |
| | | import com.matrix.system.app.vo.*; |
| | | import com.matrix.system.common.bean.CustomerDataDictionary; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.CustomerDataDictionaryDao; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.action.BaseController; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.VipAnswerDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.service.MoneyCardUseService; |
| | | import com.matrix.system.hive.service.QuestionSerivce; |
| | | import com.matrix.system.hive.service.SysVipInfoService; |
| | | import com.matrix.system.hive.service.SysVipLevelService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @Api(value = "ApiVipInfoAction", tags = "会员接口类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/vip") |
| | | public class ApiVipInfoAction extends BaseController { |
| | | |
| | | @Autowired |
| | | private SysVipInfoService sysVipInfoService; |
| | | |
| | | @Autowired |
| | | private SysVipLevelService sysVipLevelService; |
| | | |
| | | @Autowired |
| | | private CustomerDataDictionaryDao customerDataDictionaryDao; |
| | | |
| | | @Autowired |
| | | private MoneyCardUseService moneyCardUseService; |
| | | |
| | | @Autowired |
| | | private QuestionSerivce questionSerivce; |
| | | |
| | | @Autowired |
| | | private VipAnswerDao vipAnswerDao; |
| | | |
| | | @ApiOperation(value = "获取会员通讯录列表", notes = "获取会员通讯录列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = VipInfoListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findVipInfoList") |
| | | public AjaxResult findVipInfoList(@RequestBody VipInfoListDto vipInfoListDto) { |
| | | if (StringUtils.isBlank(vipInfoListDto.getSort())) { |
| | | vipInfoListDto.setSort("zjm"); |
| | | } |
| | | |
| | | if (StringUtils.isBlank(vipInfoListDto.getOrder())) { |
| | | vipInfoListDto.setOrder("asc"); |
| | | } |
| | | |
| | | |
| | | int offset = (vipInfoListDto.getPageNum() - 1) * vipInfoListDto.getPageSize(); |
| | | int limit = vipInfoListDto.getPageSize(); |
| | | vipInfoListDto.setOffset(offset); |
| | | vipInfoListDto.setLimit(limit); |
| | | |
| | | |
| | | |
| | | |
| | | return AjaxResult.buildSuccessInstance(sysVipInfoService.findVipAddressBook(vipInfoListDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据id查询用户信息(通讯录及个人中心)", notes = "根据id查询用户信息") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = VipInfoVo.class) |
| | | }) |
| | | @GetMapping(value = "/findVipInfoById/{id}") |
| | | public AjaxResult findVipInfoById(@PathVariable("id") Long id) { |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | VipInfoVo vipInfoVo = sysVipInfoService.findApiVipInfoById(id); |
| | | ajaxResult.putInMap("vipInfo", vipInfoVo); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | @ApiOperation(value = "根据id查询用户详细信息") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = VipInfoDetailVo.class) |
| | | }) |
| | | @GetMapping(value = "/findVipInfoDetailById/{id}") |
| | | public AjaxResult findVipInfoDetailById(@PathVariable("id") Long id) { |
| | | VipInfoDetailVo vipInfoDetailVo = sysVipInfoService.findVipInfoDetail(id); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("vipInfo", vipInfoDetailVo); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | @ApiOperation(value = "查询会员类型", notes = "查询会员类型") |
| | | @ApiResponses( |
| | | @ApiResponse(code = 200, message = "ok", response = SysVipLevel.class) |
| | | ) |
| | | @GetMapping(value = "/findVipType") |
| | | public AjaxResult findVipType() { |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | SysVipLevel sysVipLevel = new SysVipLevel(); |
| | | if(!DataAuthUtil.hasAllShopAuth()) { |
| | | sysVipLevel.setShopId(sysUsers.getShopId()); |
| | | } |
| | | |
| | | return AjaxResult.buildSuccessInstance(sysVipLevelService.findByModel(sysVipLevel)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取到店途径列表", notes = "获取到店途径列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = CustomerDataDictionary.class) |
| | | }) |
| | | @GetMapping(value = "/findArrivalWayList") |
| | | public AjaxResult findArrivalWayList() { |
| | | List<CustomerDataDictionary> ddtj = customerDataDictionaryDao.selectByParentCode("DDTJ", getMe().getCompanyId()); |
| | | return AjaxResult.buildSuccessInstance(ddtj); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加会员", notes = "添加会员") |
| | | @PostMapping(value = "/addVip") |
| | | public AjaxResult addVip(@RequestBody @Validated AddVipDto addVipDto) { |
| | | int i = sysVipInfoService.apiAddVip(addVipDto); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("新增成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("新增失败"); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑会员", notes = "编辑会员") |
| | | @PostMapping(value = "/modifyVip") |
| | | public AjaxResult modifyVip(@RequestBody ModifyVipDto modifyVipDto) { |
| | | int i = sysVipInfoService.apiModifyVip(modifyVipDto); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("修改成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("修改失败"); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取用户信息列表", notes = "获取用户信息列表") |
| | | @GetMapping(value = "/findAllVipInfo") |
| | | public AjaxResult findAllVipInfo() { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | SysVipInfo sysVipInfo = new SysVipInfo(); |
| | | if(!DataAuthUtil.hasAllShopAuth()) { |
| | | sysVipInfo.setShopId(user.getShopId()); |
| | | } |
| | | QueryUtil.setQueryLimitCom(sysVipInfo); |
| | | return AjaxResult.buildSuccessInstance(sysVipInfoService.findAll(sysVipInfo)); |
| | | } |
| | | |
| | | @ApiOperation(value = "卡项 - 获取会员卡项列表", notes = "卡项 - 获取会员卡项列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = VipCardListVo.class) |
| | | }) |
| | | @GetMapping(value = "/findVipCardInfo/{vipId}") |
| | | public AjaxResult findVipCardInfo(@PathVariable("vipId") Long vipId) { |
| | | MoneyCardUse moneyCardUse = new MoneyCardUse(); |
| | | moneyCardUse.setVipId(vipId); |
| | | List<MoneyCardUse> list = moneyCardUseService.findVipCardUseInPage(moneyCardUse, null); |
| | | |
| | | List<VipCardListVo> dataList = MoneyCardUseMapper.INSTANCE.entitiesToCardListVos(list); |
| | | return AjaxResult.buildSuccessInstance(dataList); |
| | | } |
| | | |
| | | @ApiOperation(value = "会员档案 - 获取客户档案问题", notes = "会员档案 - 获取客户档案问题") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = QuestionVo.class) |
| | | }) |
| | | @GetMapping(value = "/findVipQuestions/{vipId}") |
| | | public AjaxResult findVipQuestions(@PathVariable("vipId") Long vipId) { |
| | | // 获取会员所有的答案,分类型 |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | List<Question> questions = questionSerivce.findByVipId(vipId,user.getCompanyId()); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("获取成功"); |
| | | List<QuestionVo> list = QuestionMapper.INSTANCE.entitiesToVos(questions); |
| | | result.putInMap("questions", list); |
| | | return result; |
| | | } |
| | | |
| | | @ApiOperation(value = "会员档案 - 提交会员档案", notes = "会员档案 - 提交会员档案") |
| | | @PostMapping(value = "/saveVipQuestionsAnswer") |
| | | public AjaxResult saveVipQuestionsAnswer(@RequestBody QuestionAnswerDto questionAnswerDto) { |
| | | VipAnswer delAnswer = new VipAnswer(); |
| | | delAnswer.setVipId(questionAnswerDto.getVipId()); |
| | | vipAnswerDao.deleteByModel(delAnswer); |
| | | if (CollectionUtils.isNotEmpty(questionAnswerDto.getItems())) { |
| | | List<VipAnswer> vipAnswers = QuestionMapper.INSTANCE.dtosToVipAnswers(questionAnswerDto.getItems()); |
| | | vipAnswerDao.batchInsert(vipAnswers); |
| | | } |
| | | return AjaxResult.buildSuccessInstance("档案更新成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户是否存在资金密码", notes = "用户是否存在资金密码") |
| | | @GetMapping(value = "/isExistFundPassword/{vipId}") |
| | | public AjaxResult isExistFundPassword(@PathVariable(value = "vipId") Long vipId) { |
| | | SysVipInfo vipInfo = sysVipInfoService.findById(vipId); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | if (StringUtils.isNotBlank(vipInfo.getPassWord())) { |
| | | ajaxResult.putInMap("isExist", true); |
| | | } else { |
| | | ajaxResult.putInMap("isExist", false); |
| | | } |
| | | |
| | | return ajaxResult; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.app.dto.LabelDto; |
| | | import com.matrix.system.hive.action.BaseController; |
| | | import com.matrix.system.hive.bean.SysVipLabel; |
| | | import com.matrix.system.hive.dao.SysVipLabelDao; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-22 |
| | | **/ |
| | | @Api(value = "ApiVipLabelAction", tags = "客户标签接口类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/label") |
| | | public class ApiVipLabelAction extends BaseController { |
| | | |
| | | @Autowired |
| | | private SysVipLabelDao sysVipLabelDao; |
| | | |
| | | @ApiOperation(value = "获取标签列表", notes = "获取标签列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = SysVipLabel.class) |
| | | }) |
| | | @PostMapping(value = "/findLabelList") |
| | | public AjaxResult findLabelByVipId(@RequestBody LabelDto labelDto) { |
| | | SysVipLabel sysVipLabel = new SysVipLabel(); |
| | | sysVipLabel.setCompanyId(getMe().getCompanyId()); |
| | | sysVipLabel.setIsAll(1); |
| | | sysVipLabel.setLabel(labelDto.getLabel()); |
| | | List<SysVipLabel> zbLabel = sysVipLabelDao.selectByModel(sysVipLabel); |
| | | |
| | | sysVipLabel = new SysVipLabel(); |
| | | sysVipLabel.setUserId(getMe().getSuId()); |
| | | sysVipLabel.setLabel(labelDto.getLabel()); |
| | | List<SysVipLabel> userLabel = sysVipLabelDao.selectByModel(sysVipLabel); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("allLabel", zbLabel); |
| | | ajaxResult.putInMap("myLabel", userLabel); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "添加标签", notes = "添加标签") |
| | | @PostMapping(value = "/addLabel") |
| | | public AjaxResult addLabel(@RequestBody LabelDto labelDto) { |
| | | SysVipLabel sysVipLabel = new SysVipLabel(); |
| | | sysVipLabel.setCreateBy(getMe().getSuName()); |
| | | sysVipLabel.setLabel(labelDto.getLabel()); |
| | | sysVipLabel.setColor(labelDto.getColor()); |
| | | sysVipLabel.setShopId(getMe().getShopId()); |
| | | sysVipLabel.setCompanyId(getMe().getCompanyId()); |
| | | sysVipLabel.setUserId(getMe().getSuId()); |
| | | sysVipLabel.setIsAll(2); |
| | | int i = sysVipLabelDao.insert(sysVipLabel); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("添加成功"); |
| | | } else { |
| | | return AjaxResult.buildFailInstance("添加失败"); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "删除标签", notes = "删除标签") |
| | | @GetMapping(value = "/delById/{id}") |
| | | public AjaxResult delById(@PathVariable("id") Long id) { |
| | | int i = sysVipLabelDao.deleteById(id); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("删除成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("删除失败"); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.vo.StoreListVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.action.BaseController; |
| | | import com.matrix.system.hive.action.OccupancyController; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysWorkBeatuistaff; |
| | | import com.matrix.system.hive.dao.SysBeauticianStateDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.service.SysWorkBeatuistaffService; |
| | | import com.matrix.system.hive.service.SysWorktimeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * @author jiangyouyao |
| | | * @date 2016-12-24 |
| | | * @description 占用Controller |
| | | */ |
| | | @Api(value = "AppOccupancyController", tags = "员工预约情况") |
| | | @RestController |
| | | @RequestMapping(value = "/api/occupancy") |
| | | public class AppOccupancyController extends BaseController { |
| | | |
| | | @Resource |
| | | private OccupancyController occupancyController; |
| | | |
| | | /** |
| | | * 获取员工预约情况 |
| | | */ |
| | | @ApiOperation(value = "获取员工预约情况", notes = "获取员工预约情况,示例参数:2021-01-06") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = OccupancyController.OccupancySPan.class) |
| | | }) |
| | | @GetMapping(value = "/getKanban/{timeStr}") |
| | | AjaxResult showCwzyList(@PathVariable String timeStr) { |
| | | //TODO app的用户获不能在session中,方案要改 |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | return occupancyController.getCwzyList(timeStr,sysUsers.getShopId()); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @Api(value = "TestAction", tags = "测试类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/test") |
| | | public class TestAction { |
| | | |
| | | @ApiOperation(value = "测试请求", notes = "测试请求") |
| | | @GetMapping(value = "/testQuery") |
| | | public AjaxResult testQuery() { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.authority; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.authority.AuthorityManager; |
| | | import com.matrix.system.common.authority.strategy.LoginStrategy; |
| | | import com.matrix.system.common.bean.SysFnBtnRel; |
| | | import com.matrix.system.common.bean.SysFunction; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.service.SysFunctionService; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.*; |
| | | import java.util.Map.Entry; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * DefaultAuthorityManager 实现了权限控制接口 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月6日 |
| | | */ |
| | | @Component |
| | | public class AppAuthorityManager implements AuthorityManager { |
| | | |
| | | private static final int DEFAULT_2 = 2; |
| | | |
| | | |
| | | @Autowired |
| | | SysFunctionService sysFunctionService; |
| | | |
| | | public static final String USER_POWER_REDISKEY_APP = "USER_POWER_APP"; |
| | | |
| | | public static final String USERFUNCTION = "userFunction"; |
| | | /** 用户所有路径权限的记录 **/ |
| | | public static final String USER_URL_MAPPING = "userUrlMapping"; |
| | | |
| | | private AppAuthorityManager() { |
| | | } |
| | | |
| | | public <T> T login(LoginStrategy loginStrategy) { |
| | | @SuppressWarnings("unchecked") |
| | | T user = (T) loginStrategy.login(); |
| | | WebUtil.setSessionAttribute(MatrixConstance.LOGIN_KEY, user); |
| | | WebUtil.setSessionAttribute(AppConstance.DEFAULT_AUTHORITYMANAGER, this); |
| | | return user; |
| | | } |
| | | |
| | | @Override |
| | | public void getLoginOut() { |
| | | WebUtil.getSession().removeAttribute(MatrixConstance.LOGIN_KEY); |
| | | } |
| | | |
| | | /** |
| | | * 判断用户是否具有按钮功能 |
| | | * |
| | | * @param matchStr |
| | | * @return |
| | | * @throws IllegalArgumentException |
| | | */ |
| | | @Override |
| | | public boolean isBtnPermitted(String matchStr) { |
| | | throw new UnsupportedOperationException("未实现"); |
| | | } |
| | | |
| | | /** |
| | | * 判断用户是否具有功能权限 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean isFnPermitted(String fnCode) { |
| | | throw new UnsupportedOperationException("未实现"); |
| | | } |
| | | |
| | | /** |
| | | * 初始化用户权限 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | * @param result |
| | | * @param user |
| | | */ |
| | | public void initUserPower(AjaxResult result, SysUsers user) { |
| | | |
| | | // 记录用户所有的功能 |
| | | Map<String, SysFunction> userFunction = new HashMap<>(MatrixConstance.COLLECTION_SIZE); |
| | | // |
| | | List<String> userUrlMapping = new ArrayList<>(); |
| | | |
| | | |
| | | String redisKey = USER_POWER_REDISKEY_APP + SecureUtil.md5(user.getSuId()+""); |
| | | Map<String, Object> cachePowerMap = LocalCache.get(redisKey); |
| | | if (Objects.nonNull(cachePowerMap)) { |
| | | |
| | | userFunction = (Map<String, SysFunction>) cachePowerMap.get(USERFUNCTION); |
| | | |
| | | userUrlMapping = (List<String>) cachePowerMap.get(USER_URL_MAPPING); |
| | | |
| | | } else { |
| | | // 获取用户所有权限 |
| | | getUserFunction(user,userFunction, userUrlMapping); |
| | | |
| | | Map<String ,Object> powerMap=new HashMap<>(); |
| | | powerMap.put(USERFUNCTION, userFunction); |
| | | powerMap.put(USER_URL_MAPPING, userUrlMapping); |
| | | LocalCache.save(redisKey,powerMap); |
| | | } |
| | | |
| | | WebUtil.setSessionAttribute(USERFUNCTION, userFunction); |
| | | WebUtil.setSessionAttribute(USER_URL_MAPPING, userUrlMapping); |
| | | result.putInMap(USERFUNCTION, userFunction); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取用的功能,包括菜单功能和非菜单功能 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | * @param userFunctionMap |
| | | * @param userUrlMapping |
| | | */ |
| | | private void getUserFunction(SysUsers sysUser, Map<String, SysFunction> userFunctionMap, |
| | | List<String> userUrlMapping) { |
| | | // 判断用户类型 |
| | | if (AppConstance.USER_TYPE_ADMIN.equals(sysUser.getSuUserType())) { |
| | | // 管理员拥有公司全部权限 |
| | | List<SysFunction> tempList = sysFunctionService.findCompanyFunction(sysUser.getCompanyId()); |
| | | |
| | | // 区分菜单和非菜单功能 |
| | | for (SysFunction sysFunction : tempList) { |
| | | |
| | | userFunctionMap.put(sysFunction.getFnCode(), sysFunction); |
| | | // 注册访问路径 |
| | | registerUrlMapping(userUrlMapping, sysFunction,true); |
| | | } |
| | | } else if (AppConstance.USER_TYPE_EMPLOYEE.equals(sysUser.getSuUserType())) { |
| | | // 普通员工账号只拥有自己所拥有的权限 |
| | | List<SysFunction> userFunctionList = sysFunctionService.findFunctionByRoleIds(sysUser.getRoleIds()); |
| | | for (SysFunction sysFunction : userFunctionList) { |
| | | |
| | | sysFunction.setSysFnBtnRel( |
| | | sysFunction.getSysFnBtnRel().stream().filter(item->StringUtils.isContentSet(item.getBtnValue(),sysFunction.getRpfBns())).collect(Collectors.toList()) |
| | | ); |
| | | |
| | | // TODO注册访问路径 |
| | | registerUrlMapping(userUrlMapping, sysFunction,false); |
| | | if (userFunctionMap.containsKey(sysFunction.getFnCode())) { |
| | | // 如果功能已经被添加到集合中则追加权限按钮 |
| | | SysFunction oneFunctionInMap = userFunctionMap.get(sysFunction.getFnCode()); |
| | | |
| | | // 为了方便判断所以用字符串记录一下 |
| | | if (StringUtils.isBlank(oneFunctionInMap.getRpfBns())) { |
| | | oneFunctionInMap.setRpfBns(sysFunction.getRpfBns()); |
| | | } else { |
| | | oneFunctionInMap.setRpfBns(oneFunctionInMap.getRpfBns() + "," + sysFunction.getRpfBns()); |
| | | } |
| | | } else { |
| | | // 如果是新功能则直接添加 |
| | | userFunctionMap.put(sysFunction.getFnCode(), sysFunction); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 注册功能和按钮的访问路径 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月8日 |
| | | * @param userUrlMapping |
| | | * @param sysFunction |
| | | */ |
| | | private void registerUrlMapping(List<String> userUrlMapping, SysFunction sysFunction, boolean isAdmin) { |
| | | String path = sysFunction.getFnPath(); |
| | | if (StringUtils.isNotBlank(path) && !userUrlMapping.contains(path)) { |
| | | userUrlMapping.add(path); |
| | | } |
| | | // 注册按钮路径 |
| | | List<SysFnBtnRel> btnRels = sysFunction.getSysFnBtnRel(); |
| | | if (CollectionUtils.isNotEmpty(btnRels)) { |
| | | for (SysFnBtnRel sysFnBtnRel : btnRels) { |
| | | //公司管理员可以添加所有按钮权限否则只能添加员工自己所有拥有的权限 |
| | | if(isAdmin ||StringUtils.isContentSet(sysFnBtnRel.getBtnValue(),sysFunction.getRpfBns())){ |
| | | String btnPath = sysFnBtnRel.getFbPath(); |
| | | if (StringUtils.isNotBlank(btnPath) && !userUrlMapping.contains(btnPath)) { |
| | | userUrlMapping.add(btnPath); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 把菜单组装成树形结构 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | * @param menuFunction |
| | | * @param menuFunctionMap |
| | | */ |
| | | private void assembleMenu(List<SysFunction> menuFunction, Map<String, SysFunction> menuFunctionMap) { |
| | | // 将map.entrySet()转换成list,并按照功能的FnSequence倒序 |
| | | List<Entry<String, SysFunction>> list = new ArrayList<>(menuFunctionMap.entrySet()); |
| | | Collections.sort(list, new Comparator<Entry<String, SysFunction>>() { |
| | | @Override |
| | | public int compare(Entry<String, SysFunction> o1, Entry<String, SysFunction> o2) { |
| | | Integer a = o1.getValue().getFnSequence() == null ? 0 : o1.getValue().getFnSequence(); |
| | | Integer b = o2.getValue().getFnSequence() == null ? 0 : o2.getValue().getFnSequence(); |
| | | return Integer.compare(b, a); |
| | | } |
| | | }); |
| | | // 获取菜单权限,思路:如果遍历map如果功能存在父节点,就找到父节点然后把子节点加入进去,这样就只需要遍历一次 |
| | | for (Entry<String, SysFunction> entry : list) { |
| | | String id = entry.getKey(); |
| | | |
| | | SysFunction function = menuFunctionMap.get(id); |
| | | // 如果是一级节点则直接存入菜单 |
| | | if (null == function.getFnParentId() || 0L == function.getFnParentId()) { |
| | | menuFunction.add(function); |
| | | } else { |
| | | // 非一级节点找到父节点后存入 |
| | | SysFunction parentFn = menuFunctionMap.get(String.valueOf(function.getFnParentId())); |
| | | if(parentFn!=null){ |
| | | List<SysFunction> childs = parentFn.getChilds(); |
| | | if (childs == null) { |
| | | parentFn.setChilds(new ArrayList<SysFunction>()); |
| | | } |
| | | parentFn.getChilds().add(function); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-22 |
| | | **/ |
| | | @ApiModel(value = "AddVipDto", description = "添加会员接收参数类") |
| | | public class AddVipDto { |
| | | @ApiModelProperty(value = "头像") |
| | | private String photo; |
| | | |
| | | @ApiModelProperty(value = "会员编号") |
| | | private String vipNo; |
| | | |
| | | @NotBlank(message = "姓名不能为空") |
| | | @ApiModelProperty(value = "会员姓名") |
| | | private String vipName; |
| | | |
| | | @NotBlank(message = "手机号不能为空") |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @NotBlank(message = "性别不能为空") |
| | | @ApiModelProperty(value = "性别", example = "男/女") |
| | | private String sex; |
| | | |
| | | @NotNull(message = "生日不能为空") |
| | | @ApiModelProperty(value = "生日") |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | private Date birthday; |
| | | |
| | | @ApiModelProperty(value = "资金密码", example = "123456") |
| | | private String password; |
| | | |
| | | @ApiModelProperty(value = "省市区", example = "湖南省,长沙市,岳麓区") |
| | | private String areas; |
| | | |
| | | @ApiModelProperty(value = "详细地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "到店途径", example = "网络团购") |
| | | private String arrivalWay; |
| | | |
| | | @ApiModelProperty(value = "推荐人ID") |
| | | private Long recommendId; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "标签列表") |
| | | private List<String> labels; |
| | | |
| | | public String getVipNo() { |
| | | return vipNo; |
| | | } |
| | | |
| | | public void setVipNo(String vipNo) { |
| | | this.vipNo = vipNo; |
| | | } |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public String getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public void setSex(String sex) { |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public Date getBirthday() { |
| | | return birthday; |
| | | } |
| | | |
| | | public void setBirthday(Date birthday) { |
| | | this.birthday = birthday; |
| | | } |
| | | |
| | | public String getAreas() { |
| | | return areas; |
| | | } |
| | | |
| | | public void setAreas(String areas) { |
| | | this.areas = areas; |
| | | } |
| | | |
| | | public String getAddress() { |
| | | return address; |
| | | } |
| | | |
| | | public void setAddress(String address) { |
| | | this.address = address; |
| | | } |
| | | |
| | | public String getArrivalWay() { |
| | | return arrivalWay; |
| | | } |
| | | |
| | | public void setArrivalWay(String arrivalWay) { |
| | | this.arrivalWay = arrivalWay; |
| | | } |
| | | |
| | | public Long getRecommendId() { |
| | | return recommendId; |
| | | } |
| | | |
| | | public void setRecommendId(Long recommendId) { |
| | | this.recommendId = recommendId; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public List<String> getLabels() { |
| | | return labels; |
| | | } |
| | | |
| | | public void setLabels(List<String> labels) { |
| | | this.labels = labels; |
| | | } |
| | | |
| | | public String getPassword() { |
| | | return password; |
| | | } |
| | | |
| | | public void setPassword(String password) { |
| | | this.password = password; |
| | | } |
| | | |
| | | public String getPhoto() { |
| | | return photo; |
| | | } |
| | | |
| | | public void setPhoto(String photo) { |
| | | this.photo = photo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-05 |
| | | **/ |
| | | @ApiModel(value = "ArticleListDto", description = "文章列表接收参数类") |
| | | public class ArticleListDto extends BasePageDto { |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "分类ID") |
| | | private Long typeId; |
| | | |
| | | public Long getTypeId() { |
| | | return typeId; |
| | | } |
| | | |
| | | public void setTypeId(Long typeId) { |
| | | this.typeId = typeId; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "BasePageDto", description = "基础分页参数接收类") |
| | | public class BasePageDto { |
| | | |
| | | @NotNull(message = "参数不能为空") |
| | | @ApiModelProperty(value = "第几页", example = "1") |
| | | private Integer pageNum; |
| | | |
| | | @NotNull(message = "参数不能为空") |
| | | @ApiModelProperty(value ="数量", example = "10") |
| | | private Integer pageSize; |
| | | |
| | | public Integer getPageNum() { |
| | | return pageNum; |
| | | } |
| | | |
| | | public void setPageNum(Integer pageNum) { |
| | | this.pageNum = pageNum; |
| | | } |
| | | |
| | | public Integer getPageSize() { |
| | | return pageSize; |
| | | } |
| | | |
| | | public void setPageSize(Integer pageSize) { |
| | | this.pageSize = pageSize; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-25 |
| | | **/ |
| | | @ApiModel(value = "BeauticianDto", description = "获取美疗师列表接收参数类") |
| | | public class BeauticianDto { |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "开始时间") |
| | | private Date startTime; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "结束时间") |
| | | private Date endTime; |
| | | |
| | | public Date getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public void setStartTime(Date startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public Date getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public void setEndTime(Date endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | @ApiModel(value = "BusinessesDto", description = "门店/公司报表参数接受类") |
| | | public class BusinessesDto extends BasePageDto{ |
| | | |
| | | public static final String DAY = "1"; |
| | | |
| | | public static final String MONTH = "2"; |
| | | |
| | | @ApiModelProperty(value = "type 1-每日 2-每月", example = "1") |
| | | private String type; |
| | | |
| | | @ApiModelProperty(value = "门店ID", example = "34") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty(value = "会员ID") |
| | | private Long staffId; |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public Long getStaffId() { |
| | | return staffId; |
| | | } |
| | | |
| | | public void setStaffId(Long staffId) { |
| | | this.staffId = staffId; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "CreateOderItemDto", description = "提交订单明细接收类") |
| | | public class CreateOderItemDto { |
| | | |
| | | @NotNull(message = "商品ID不能为空") |
| | | @ApiModelProperty(value = "商品ID", example = "1234") |
| | | private Long goodsId; |
| | | |
| | | @NotNull(message = "数量不能为空") |
| | | @ApiModelProperty(value = "购买数量", example = "1") |
| | | private Integer count; |
| | | |
| | | @NotNull(message = "参数错误") |
| | | @ApiModelProperty(value = "是否赠送 是/否", example = "否") |
| | | private String isFree; |
| | | |
| | | @NotNull(message = "参数错误") |
| | | @ApiModelProperty(value = "商品类型", example = "家居产品") |
| | | private String goodsType; |
| | | |
| | | public String getGoodsType() { |
| | | return goodsType; |
| | | } |
| | | |
| | | public void setGoodsType(String goodsType) { |
| | | this.goodsType = goodsType; |
| | | } |
| | | |
| | | public Long getGoodsId() { |
| | | return goodsId; |
| | | } |
| | | |
| | | public void setGoodsId(Long goodsId) { |
| | | this.goodsId = goodsId; |
| | | } |
| | | |
| | | public Integer getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(Integer count) { |
| | | this.count = count; |
| | | } |
| | | |
| | | public String getIsFree() { |
| | | if ("1".equals(isFree)) { |
| | | return "是"; |
| | | } else { |
| | | return "否"; |
| | | } |
| | | } |
| | | |
| | | public void setIsFree(String isFree) { |
| | | this.isFree = isFree; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "CreateOrderDto", description = "提交订单接收类") |
| | | public class CreateOrderDto { |
| | | |
| | | @NotNull(message = "会员不能为空") |
| | | @ApiModelProperty(value = "会员Id", example = "361") |
| | | private Long vipId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "购买商品明细") |
| | | private List<CreateOderItemDto> items; |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public List<CreateOderItemDto> getItems() { |
| | | return items; |
| | | } |
| | | |
| | | public void setItems(List<CreateOderItemDto> items) { |
| | | this.items = items; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-25 |
| | | **/ |
| | | @ApiModel(value = "CreateServiceOrderDto", description = "创建服务单接口接收参数类") |
| | | public class CreateServiceOrderDto { |
| | | |
| | | @NotNull(message = "请选择会员") |
| | | @ApiModelProperty(value = "会员ID") |
| | | private Long vipId; |
| | | |
| | | // @NotNull(message = "请选择美疗师") |
| | | @ApiModelProperty(value = "美疗师ID") |
| | | private Long beautyId; |
| | | |
| | | @NotNull(message = "请选择预约时间") |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "预约时间") |
| | | private Date yyTime; |
| | | |
| | | @ApiModelProperty(value = "选择的项目") |
| | | private List<CreateServiceOrderItemDto> projItems; |
| | | |
| | | @ApiModelProperty(value = "总时长") |
| | | private Integer totalTime; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "资金密码") |
| | | private String password; |
| | | |
| | | public String getPassword() { |
| | | return password; |
| | | } |
| | | |
| | | public void setPassword(String password) { |
| | | this.password = password; |
| | | } |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public Long getBeautyId() { |
| | | return beautyId; |
| | | } |
| | | |
| | | public void setBeautyId(Long beautyId) { |
| | | this.beautyId = beautyId; |
| | | } |
| | | |
| | | public Date getYyTime() { |
| | | return yyTime; |
| | | } |
| | | |
| | | public void setYyTime(Date yyTime) { |
| | | this.yyTime = yyTime; |
| | | } |
| | | |
| | | public List<CreateServiceOrderItemDto> getProjItems() { |
| | | return projItems; |
| | | } |
| | | |
| | | public void setProjItems(List<CreateServiceOrderItemDto> projItems) { |
| | | this.projItems = projItems; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public Integer getTotalTime() { |
| | | return totalTime; |
| | | } |
| | | |
| | | public void setTotalTime(Integer totalTime) { |
| | | this.totalTime = totalTime; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-25 |
| | | **/ |
| | | @ApiModel(value = "CreateServiceOrderItemDto", description = "创建服务单参数接收类") |
| | | public class CreateServiceOrderItemDto { |
| | | |
| | | @NotNull(message = "请选择项目") |
| | | @ApiModelProperty(value = "项目ID") |
| | | private Long puseId; |
| | | |
| | | @NotNull(message = "请输入数量") |
| | | @Min(1) |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer count; |
| | | |
| | | |
| | | public Long getPuseId() { |
| | | return puseId; |
| | | } |
| | | |
| | | public void setPuseId(Long puseId) { |
| | | this.puseId = puseId; |
| | | } |
| | | |
| | | public Integer getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(Integer count) { |
| | | this.count = count; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author jyy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "FollowupCommonetListDto", description = "跟进记录查询参数") |
| | | public class FollowupListDto { |
| | | |
| | | @NotNull(message = "参数错误") |
| | | @ApiModelProperty(value = "查询条数", example = "10") |
| | | private Integer limit = 10; |
| | | |
| | | @NotNull(message = "查询起点") |
| | | @ApiModelProperty(value = "第0条开始", example = "0") |
| | | private Integer offset = 0; |
| | | |
| | | @ApiModelProperty(value = "门店ID 后台自动赋值", example = "0") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty(value = "公司ID 后台自动赋值", example = "0") |
| | | private Long companyId; |
| | | |
| | | @ApiModelProperty(value = "当前员工ID 后台自动赋值", example = "0") |
| | | private Long selfStaff; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "查询参数开始时间", example = "2021-01-10") |
| | | private Date startTime; |
| | | |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "查询参数结束时间", example = "2021-01-10") |
| | | private Date endTime; |
| | | |
| | | |
| | | @ApiModelProperty(value = "查询参数员工ID数组", example = "[1,2]") |
| | | private List<Long> staffIds; |
| | | |
| | | @ApiModelProperty(value = "查询参数客户ID数组", example = "[1,2]") |
| | | private List<Long> vipIds; |
| | | |
| | | @ApiModelProperty(value = "查询参数,查询跟进类型,1=全部,2=我发出的,3=我的团队", example = "1") |
| | | private Integer queryType=1; |
| | | |
| | | public Integer getQueryType() { |
| | | return queryType; |
| | | } |
| | | |
| | | public void setQueryType(Integer queryType) { |
| | | this.queryType = queryType; |
| | | } |
| | | |
| | | public Date getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public void setStartTime(Date startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public Date getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public void setEndTime(Date endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public Long getSelfStaff() { |
| | | return selfStaff; |
| | | } |
| | | |
| | | public void setSelfStaff(Long selfStaff) { |
| | | this.selfStaff = selfStaff; |
| | | } |
| | | |
| | | public List<Long> getStaffIds() { |
| | | return staffIds; |
| | | } |
| | | |
| | | public void setStaffIds(List<Long> staffIds) { |
| | | this.staffIds = staffIds; |
| | | } |
| | | |
| | | public List<Long> getVipIds() { |
| | | return vipIds; |
| | | } |
| | | |
| | | public void setVipIds(List<Long> vipIds) { |
| | | this.vipIds = vipIds; |
| | | } |
| | | |
| | | public Integer getLimit() { |
| | | return limit; |
| | | } |
| | | |
| | | public void setLimit(Integer limit) { |
| | | this.limit = limit; |
| | | } |
| | | |
| | | public Integer getOffset() { |
| | | return offset; |
| | | } |
| | | |
| | | public void setOffset(Integer offset) { |
| | | this.offset = offset; |
| | | } |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-14 |
| | | **/ |
| | | @ApiModel(value = "IdSubmitDto", description = "根据id修改接口参数接收类") |
| | | public class IdSubmitDto { |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "id", example = "1") |
| | | private Long id; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-22 |
| | | **/ |
| | | @ApiModel(value = "LabelDto", description = "添加标签接收参数接收类") |
| | | public class LabelDto { |
| | | |
| | | @Length(max = 10, message = "不能超过10") |
| | | @ApiModelProperty(value = "标签内容", example = "123") |
| | | private String label; |
| | | |
| | | @ApiModelProperty(value = "颜色", example = "#FFFFFF") |
| | | private String color; |
| | | |
| | | public String getLabel() { |
| | | return label; |
| | | } |
| | | |
| | | public void setLabel(String label) { |
| | | this.label = label; |
| | | } |
| | | |
| | | public String getColor() { |
| | | return color; |
| | | } |
| | | |
| | | public void setColor(String color) { |
| | | this.color = color; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @ApiModel(value = "LoginDto", description = "手机端登陆接收类") |
| | | public class LoginDto { |
| | | |
| | | @ApiModelProperty(value = "用户名", example = "1234") |
| | | @NotBlank(message = "用户名或密码错误") |
| | | private String username; |
| | | |
| | | @ApiModelProperty(value = "密码", example = "123456") |
| | | @NotBlank(message = "用户名或密码错误") |
| | | private String password; |
| | | |
| | | private String openId; |
| | | |
| | | public String getOpenId() { |
| | | return openId; |
| | | } |
| | | |
| | | public void setOpenId(String openId) { |
| | | this.openId = openId; |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-06 |
| | | **/ |
| | | @ApiModel(value = "ModifyUserDto", description = "编辑用户信息接口参数接收类") |
| | | public class ModifyUserDto { |
| | | |
| | | @ApiModelProperty(value = "头像") |
| | | private String photo; |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "英文名") |
| | | private String engName; |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "手机号") |
| | | private String telphone; |
| | | |
| | | @ApiModelProperty(value = "性别") |
| | | private String sex; |
| | | |
| | | @ApiModelProperty(value = "生日") |
| | | private Date birthday; |
| | | |
| | | @ApiModelProperty(value = "邮箱") |
| | | private String email; |
| | | |
| | | @ApiModelProperty(value = "服务签名") |
| | | private String serviceSign; |
| | | |
| | | @ApiModelProperty(value = "地址") |
| | | private String address; |
| | | |
| | | public String getPhoto() { |
| | | return photo; |
| | | } |
| | | |
| | | public void setPhoto(String photo) { |
| | | this.photo = photo; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getEngName() { |
| | | return engName; |
| | | } |
| | | |
| | | public void setEngName(String engName) { |
| | | this.engName = engName; |
| | | } |
| | | |
| | | public String getTelphone() { |
| | | return telphone; |
| | | } |
| | | |
| | | public void setTelphone(String telphone) { |
| | | this.telphone = telphone; |
| | | } |
| | | |
| | | public String getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public void setSex(String sex) { |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public Date getBirthday() { |
| | | return birthday; |
| | | } |
| | | |
| | | public void setBirthday(Date birthday) { |
| | | this.birthday = birthday; |
| | | } |
| | | |
| | | public String getEmail() { |
| | | return email; |
| | | } |
| | | |
| | | public void setEmail(String email) { |
| | | this.email = email; |
| | | } |
| | | |
| | | public String getServiceSign() { |
| | | return serviceSign; |
| | | } |
| | | |
| | | public void setServiceSign(String serviceSign) { |
| | | this.serviceSign = serviceSign; |
| | | } |
| | | |
| | | public String getAddress() { |
| | | return address; |
| | | } |
| | | |
| | | public void setAddress(String address) { |
| | | this.address = address; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-22 |
| | | **/ |
| | | @ApiModel(value = "ModifyVipDto", description = "修改会员接收参数类") |
| | | public class ModifyVipDto { |
| | | |
| | | @ApiModelProperty(value = "头像") |
| | | private String photo; |
| | | |
| | | @NotNull(message = "参数错误") |
| | | @ApiModelProperty(value = "会员ID") |
| | | private Long vipId; |
| | | |
| | | @ApiModelProperty(value = "会员编号") |
| | | private String vipNo; |
| | | |
| | | @NotBlank(message = "姓名不能为空") |
| | | @ApiModelProperty(value = "会员姓名") |
| | | private String vipName; |
| | | |
| | | @NotBlank(message = "手机号不能为空") |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @NotBlank(message = "性别不能为空") |
| | | @ApiModelProperty(value = "性别", example = "男/女") |
| | | private String sex; |
| | | |
| | | @NotNull(message = "生日不能为空") |
| | | @ApiModelProperty(value = "生日") |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | private Date birthday; |
| | | |
| | | @Length(max = 6) |
| | | @ApiModelProperty(value = "资金密码", example = "123456") |
| | | private String password; |
| | | |
| | | @ApiModelProperty(value = "省市区", example = "湖南省,长沙市,岳麓区") |
| | | private String areas; |
| | | |
| | | @ApiModelProperty(value = "详细地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "到店途径", example = "网络团购") |
| | | private String arrivalWay; |
| | | |
| | | @ApiModelProperty(value = "推荐人ID") |
| | | private Long recommendId; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "标签列表") |
| | | private List<String> labels; |
| | | |
| | | public String getVipNo() { |
| | | return vipNo; |
| | | } |
| | | |
| | | public void setVipNo(String vipNo) { |
| | | this.vipNo = vipNo; |
| | | } |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public String getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public void setSex(String sex) { |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public Date getBirthday() { |
| | | return birthday; |
| | | } |
| | | |
| | | public void setBirthday(Date birthday) { |
| | | this.birthday = birthday; |
| | | } |
| | | |
| | | public String getAreas() { |
| | | return areas; |
| | | } |
| | | |
| | | public void setAreas(String areas) { |
| | | this.areas = areas; |
| | | } |
| | | |
| | | public String getAddress() { |
| | | return address; |
| | | } |
| | | |
| | | public void setAddress(String address) { |
| | | this.address = address; |
| | | } |
| | | |
| | | public String getArrivalWay() { |
| | | return arrivalWay; |
| | | } |
| | | |
| | | public void setArrivalWay(String arrivalWay) { |
| | | this.arrivalWay = arrivalWay; |
| | | } |
| | | |
| | | public Long getRecommendId() { |
| | | return recommendId; |
| | | } |
| | | |
| | | public void setRecommendId(Long recommendId) { |
| | | this.recommendId = recommendId; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public List<String> getLabels() { |
| | | return labels; |
| | | } |
| | | |
| | | public void setLabels(List<String> labels) { |
| | | this.labels = labels; |
| | | } |
| | | |
| | | public String getPassword() { |
| | | return password; |
| | | } |
| | | |
| | | public void setPassword(String password) { |
| | | this.password = password; |
| | | } |
| | | |
| | | public String getPhoto() { |
| | | return photo; |
| | | } |
| | | |
| | | public void setPhoto(String photo) { |
| | | this.photo = photo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "OrderListDto", description = "订单列表接收参数类") |
| | | public class OrderListDto extends BasePageDto { |
| | | |
| | | @ApiModelProperty(value = "订单状态 0-全部 1-待付款 2-已付款 3-欠款 全部默认传空字符串", example = "1") |
| | | private Integer orderStatus; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "查询字段") |
| | | private String queryKey; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getQueryKey() { |
| | | return queryKey; |
| | | } |
| | | |
| | | public void setQueryKey(String queryKey) { |
| | | this.queryKey = queryKey; |
| | | } |
| | | |
| | | public Integer getOrderStatus() { |
| | | return orderStatus; |
| | | } |
| | | |
| | | public void setOrderStatus(Integer orderStatus) { |
| | | this.orderStatus = orderStatus; |
| | | switch (orderStatus) { |
| | | case 0 : |
| | | this.status = ""; |
| | | break; |
| | | case 1: |
| | | this.status = "待付款"; |
| | | break; |
| | | case 2: |
| | | this.status = "已付款"; |
| | | break; |
| | | case 3: |
| | | this.status = "欠款"; |
| | | break; |
| | | default: |
| | | this.status = ""; |
| | | break; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-06 |
| | | **/ |
| | | @ApiModel(value = "PwdModifyDto", description = "修改密码接口参数接收类") |
| | | public class PwdModifyDto { |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "老密码", example = "123456") |
| | | private String oldPwd; |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "新密码", example = "123456") |
| | | private String newPwd; |
| | | |
| | | public String getOldPwd() { |
| | | return oldPwd; |
| | | } |
| | | |
| | | public void setOldPwd(String oldPwd) { |
| | | this.oldPwd = oldPwd; |
| | | } |
| | | |
| | | public String getNewPwd() { |
| | | return newPwd; |
| | | } |
| | | |
| | | public void setNewPwd(String newPwd) { |
| | | this.newPwd = newPwd; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-06 |
| | | **/ |
| | | @ApiModel(value = "PwdResetDto", description = "密码重置接收类") |
| | | public class PwdResetDto { |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "手机号", example = "11") |
| | | private String telphone; |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "验证码", example = "123456") |
| | | private String code; |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "新密码", example = "123456") |
| | | private String newPwd; |
| | | |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getNewPwd() { |
| | | return newPwd; |
| | | } |
| | | |
| | | public void setNewPwd(String newPwd) { |
| | | this.newPwd = newPwd; |
| | | } |
| | | |
| | | public String getTelphone() { |
| | | return telphone; |
| | | } |
| | | |
| | | public void setTelphone(String telphone) { |
| | | this.telphone = telphone; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-28 |
| | | **/ |
| | | @ApiModel(value = "QuestionAnswerDto", description = "提交客户档案接口参数接收类") |
| | | public class QuestionAnswerDto { |
| | | |
| | | @NotNull(message = "参数错误") |
| | | @ApiModelProperty(value = "会员ID") |
| | | private Long vipId; |
| | | |
| | | @ApiModelProperty(value = "题目答案列表") |
| | | private List<QuestionAnswerItemDto> items; |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public List<QuestionAnswerItemDto> getItems() { |
| | | return items; |
| | | } |
| | | |
| | | public void setItems(List<QuestionAnswerItemDto> items) { |
| | | this.items = items; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-28 |
| | | **/ |
| | | @ApiModel(value = "QuestionAnswerItemDto", description = "问题答案接收类") |
| | | public class QuestionAnswerItemDto { |
| | | |
| | | @ApiModelProperty(value = "问题ID") |
| | | private Long questionId; |
| | | |
| | | @ApiModelProperty(value = "会员ID") |
| | | private Long vipId; |
| | | |
| | | @ApiModelProperty(value = "答案Ids,逗号隔开") |
| | | private String answerId; |
| | | |
| | | @ApiModelProperty(value = "文本答案") |
| | | private String answerText; |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public Long getQuestionId() { |
| | | return questionId; |
| | | } |
| | | |
| | | public void setQuestionId(Long questionId) { |
| | | this.questionId = questionId; |
| | | } |
| | | |
| | | public String getAnswerId() { |
| | | return answerId; |
| | | } |
| | | |
| | | public void setAnswerId(String answerId) { |
| | | this.answerId = answerId; |
| | | } |
| | | |
| | | public String getAnswerText() { |
| | | return answerText; |
| | | } |
| | | |
| | | public void setAnswerText(String answerText) { |
| | | this.answerText = answerText; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-28 |
| | | **/ |
| | | @ApiModel(value = "RankingDto", description = "排行榜参数接收类") |
| | | public class RankingDto { |
| | | |
| | | public static final String SALE = "1"; |
| | | public static final String CONSUME = "2"; |
| | | |
| | | public static final String DAY = "1"; |
| | | public static final String MONTH = "2"; |
| | | public static final String YEAR = "3"; |
| | | public static final String WEEK = "4"; |
| | | |
| | | @ApiModelProperty(value = "数据类型 1-销售 2-消耗", example = "1") |
| | | private String dataType; |
| | | |
| | | @ApiModelProperty(value = "排行榜类型 1-日榜 2-月榜 3-年榜 4-周榜", example = "1") |
| | | private String type; |
| | | |
| | | public String getDataType() { |
| | | return dataType; |
| | | } |
| | | |
| | | public void setDataType(String dataType) { |
| | | this.dataType = dataType; |
| | | } |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-24 |
| | | **/ |
| | | @ApiModel(value = "ServiceOrderListDto", description = "服务单列表参数接收类") |
| | | public class ServiceOrderListDto extends BasePageDto{ |
| | | |
| | | @ApiModelProperty(value = "查询参数") |
| | | private String queryKey; |
| | | |
| | | @ApiModelProperty(value = "状态 0/全部 1/待确认 2/待排班 3/待配料 4/待服务 5/服务中 6/已完成 ") |
| | | private String status; |
| | | |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "客户ID") |
| | | private Long vipId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public Long getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUserId(Long userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public String getQueryKey() { |
| | | return queryKey; |
| | | } |
| | | |
| | | public void setQueryKey(String queryKey) { |
| | | this.queryKey = queryKey; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | switch (status) { |
| | | case "0" : |
| | | this.status = ""; |
| | | break; |
| | | case "1": |
| | | this.status = "待确认"; |
| | | break; |
| | | case "2": |
| | | this.status = "待预约"; |
| | | break; |
| | | case "3" : |
| | | this.status = "需配料"; |
| | | break; |
| | | case "4" : |
| | | this.status = "配料完成"; |
| | | break; |
| | | case "5" : |
| | | this.status = "服务中"; |
| | | break; |
| | | case "6" : |
| | | this.status = "服务完成"; |
| | | break; |
| | | default: |
| | | this.status = ""; |
| | | break; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-27 |
| | | **/ |
| | | @ApiModel(value = "ServiceVipProjDto", description = "获取用户套餐/项目接收参数类") |
| | | public class ServiceVipProjDto { |
| | | |
| | | @NotNull(message = "参数错误") |
| | | @ApiModelProperty(value = "会员ID") |
| | | private Long vipId; |
| | | |
| | | @ApiModelProperty(value = "查询参数") |
| | | private String queryKey; |
| | | |
| | | @ApiModelProperty(value = "类型 0-全部 1-有效 3-无效 2-一个月内过期") |
| | | private String type; |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public String getQueryKey() { |
| | | return queryKey; |
| | | } |
| | | |
| | | public void setQueryKey(String queryKey) { |
| | | this.queryKey = queryKey; |
| | | } |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SettingDto", description = "根据code获取配置参数接收类") |
| | | public class SettingDto { |
| | | |
| | | @ApiModelProperty(value = "code", example = "1") |
| | | private String code; |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "ShoppingGoodsListDto", description = "商品列表接受类") |
| | | public class ShoppingGoodsListDto { |
| | | |
| | | @ApiModelProperty(value = "商品名称/编号/拼音") |
| | | private String queryKey; |
| | | |
| | | @ApiModelProperty(value = "商品类型") |
| | | private String goodType; |
| | | |
| | | @ApiModelProperty(value = "类型ID", example = "13") |
| | | private Long cateId; |
| | | |
| | | @NotNull(message = "参数错误") |
| | | @ApiModelProperty(value = "条数", example = "10") |
| | | private Integer pageSize = 10; |
| | | |
| | | @NotNull(message = "参数错误") |
| | | @ApiModelProperty(value = "第几页", example = "1") |
| | | private Integer pageNum = 1; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public String getGoodType() { |
| | | return goodType; |
| | | } |
| | | |
| | | public void setGoodType(String goodType) { |
| | | this.goodType = goodType; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public String getQueryKey() { |
| | | return queryKey; |
| | | } |
| | | |
| | | public void setQueryKey(String queryKey) { |
| | | this.queryKey = queryKey; |
| | | } |
| | | |
| | | public Long getCateId() { |
| | | return cateId; |
| | | } |
| | | |
| | | public void setCateId(Long cateId) { |
| | | this.cateId = cateId; |
| | | } |
| | | |
| | | public Integer getPageSize() { |
| | | return pageSize; |
| | | } |
| | | |
| | | public void setPageSize(Integer pageSize) { |
| | | this.pageSize = pageSize; |
| | | } |
| | | |
| | | public Integer getPageNum() { |
| | | return pageNum; |
| | | } |
| | | |
| | | public void setPageNum(Integer pageNum) { |
| | | this.pageNum = pageNum; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @ApiModel(value = "SkinCheckListDto", description = "皮肤检测列表接收参数类") |
| | | public class SkinCheckListDto extends BasePageDto{ |
| | | |
| | | @NotNull(message = "参数错误") |
| | | @ApiModelProperty(value = "会员ID", example = "361") |
| | | private Long vipId; |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-06 |
| | | **/ |
| | | @ApiModel(value = "SmsCodeDto", description = "短信发送接收参数类") |
| | | public class SmsCodeDto { |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "手机号") |
| | | private String telphone; |
| | | |
| | | public String getTelphone() { |
| | | return telphone; |
| | | } |
| | | |
| | | public void setTelphone(String telphone) { |
| | | this.telphone = telphone; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-27 |
| | | **/ |
| | | @ApiModel(value = "InOutListDto", description = "商品出入库记录参数接收") |
| | | public class StoreInOutListDto extends BasePageDto { |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "开始时间") |
| | | private Date startTime; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "结束时间") |
| | | private Date endTime; |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "商品编号") |
| | | private String code; |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public Date getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public void setStartTime(Date startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public Date getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public void setEndTime(Date endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-27 |
| | | **/ |
| | | @ApiModel(value = "StoreListDto", description = "库存列表参数接收类") |
| | | public class StoreListDto extends BasePageDto { |
| | | |
| | | @ApiModelProperty(value = "查询参数") |
| | | private String queryKey; |
| | | |
| | | public String getQueryKey() { |
| | | return queryKey; |
| | | } |
| | | |
| | | public void setQueryKey(String queryKey) { |
| | | this.queryKey = queryKey; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-06 |
| | | **/ |
| | | @ApiModel(value = "UploadPhotoDto", description = "图片上传接口接收参数类") |
| | | public class UploadPhotoDto { |
| | | |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "图片base64字符串") |
| | | private String base64; |
| | | |
| | | public String getBase64() { |
| | | return base64; |
| | | } |
| | | |
| | | public void setBase64(String base64) { |
| | | this.base64 = base64; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class UrlDto { |
| | | |
| | | private String url; |
| | | |
| | | private String name; |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-05 |
| | | **/ |
| | | @ApiModel(value = "UsersQueryDto", description = "员工列表接口参数类") |
| | | public class UsersQueryDto { |
| | | |
| | | @ApiModelProperty(value = "查询参数") |
| | | private String queryKey; |
| | | |
| | | public String getQueryKey() { |
| | | return queryKey; |
| | | } |
| | | |
| | | public void setQueryKey(String queryKey) { |
| | | this.queryKey = queryKey; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @ApiModel(value = "VipInfoListDto", description = "获取会员列表参数类") |
| | | public class VipInfoListDto extends BasePageDto { |
| | | |
| | | @ApiModelProperty(value = "查询参数(客户姓名/手机/会员编号/拼音)", example = "") |
| | | private String queryKey; |
| | | |
| | | @ApiModelProperty(value = "排序 desc/asc", example = "asc") |
| | | private String order = "asc"; |
| | | |
| | | @ApiModelProperty(value = "排序字段 monthArrived(本月到店次数) yearArrived(本年) used(消费) consume(消耗) vipLevel(会员等级) arriveTime(上次到店)", example = "zjm") |
| | | private String sort = "zjm"; |
| | | |
| | | @ApiModelProperty(value = "生日 1-三天内生日 2-本月生日 3-下月生日") |
| | | private String birthType; |
| | | |
| | | @ApiModelProperty(value = "会员类型ID") |
| | | private Long vipType; |
| | | |
| | | @ApiModelProperty(value = "其他 2-新客户 1-老客户") |
| | | private String other; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private int offset; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private int limit; |
| | | |
| | | public int getOffset() { |
| | | return offset; |
| | | } |
| | | |
| | | public void setOffset(int offset) { |
| | | this.offset = offset; |
| | | } |
| | | |
| | | public int getLimit() { |
| | | return limit; |
| | | } |
| | | |
| | | public void setLimit(int limit) { |
| | | this.limit = limit; |
| | | } |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public String getQueryKey() { |
| | | return queryKey; |
| | | } |
| | | |
| | | public void setQueryKey(String queryKey) { |
| | | this.queryKey = queryKey; |
| | | } |
| | | |
| | | public String getOrder() { |
| | | return order; |
| | | } |
| | | |
| | | public void setOrder(String order) { |
| | | this.order = order; |
| | | } |
| | | |
| | | public String getSort() { |
| | | return sort; |
| | | } |
| | | |
| | | public void setSort(String sort) { |
| | | this.sort = sort; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public String getBirthType() { |
| | | return birthType; |
| | | } |
| | | |
| | | public void setBirthType(String birthType) { |
| | | this.birthType = birthType; |
| | | } |
| | | |
| | | public Long getVipType() { |
| | | return vipType; |
| | | } |
| | | |
| | | public void setVipType(Long vipType) { |
| | | this.vipType = vipType; |
| | | } |
| | | |
| | | public String getOther() { |
| | | return other; |
| | | } |
| | | |
| | | public void setOther(String other) { |
| | | this.other = other; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | /** |
| | | * 统计查询条件 |
| | | * @author jyy |
| | | */ |
| | | @ApiModel(value = "VipStatisticsParamDto", description = "员工专项统计接收参数类") |
| | | public class VipStatisticsParamDto { |
| | | |
| | | public static final String COMPANY = "1"; |
| | | |
| | | public static final String SHOP = "2"; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "开始时间", example = "2020-12-01") |
| | | private String beginTime; |
| | | |
| | | /** |
| | | *结束时间 |
| | | */ |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "结束时间", example = "2020-12-31") |
| | | private String endTime; |
| | | /** |
| | | *统计单位 |
| | | */ |
| | | @NotBlank(message = "参数错误") |
| | | @ApiModelProperty(value = "统计单位", example = "日") |
| | | private String statisticsUnit; |
| | | |
| | | /** |
| | | *对比单位 |
| | | */ |
| | | @ApiModelProperty(hidden = true) |
| | | private String contrastUnit; |
| | | /** |
| | | * 门店id |
| | | */ |
| | | @ApiModelProperty(value = "员工, 不传默认当前登陆用户") |
| | | private Long staffId; |
| | | |
| | | @ApiModelProperty(value = "类型 1-订单业绩 2-现金业绩 3-售卡业绩 4-产品业绩 5-划扣业绩 6-本金消耗 7-赠送消耗 8-服务提成 9-人头数 10-项目数 11-服务时长", example = "1") |
| | | private String type; |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getBeginTime() { |
| | | return beginTime; |
| | | } |
| | | |
| | | public void setBeginTime(String beginTime) { |
| | | this.beginTime = beginTime; |
| | | } |
| | | |
| | | public String getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public void setEndTime(String endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public String getStatisticsUnit() { |
| | | return statisticsUnit; |
| | | } |
| | | |
| | | public void setStatisticsUnit(String statisticsUnit) { |
| | | this.statisticsUnit = statisticsUnit; |
| | | } |
| | | |
| | | public String getContrastUnit() { |
| | | return contrastUnit; |
| | | } |
| | | |
| | | public void setContrastUnit(String contrastUnit) { |
| | | this.contrastUnit = contrastUnit; |
| | | } |
| | | |
| | | public Long getStaffId() { |
| | | return staffId; |
| | | } |
| | | |
| | | public void setStaffId(Long staffId) { |
| | | this.staffId = staffId; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.mapper; |
| | | |
| | | import com.matrix.system.app.vo.VipCardListVo; |
| | | import com.matrix.system.hive.bean.MoneyCardUse; |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-28 |
| | | **/ |
| | | @Mapper |
| | | public abstract class MoneyCardUseMapper { |
| | | public static final MoneyCardUseMapper INSTANCE = Mappers.getMapper(MoneyCardUseMapper.class); |
| | | |
| | | public abstract VipCardListVo entityToCardListVo(MoneyCardUse moneyCardUse); |
| | | |
| | | public abstract List<VipCardListVo> entitiesToCardListVos(List<MoneyCardUse> list); |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.mapper; |
| | | |
| | | import com.matrix.system.app.dto.QuestionAnswerDto; |
| | | import com.matrix.system.app.dto.QuestionAnswerItemDto; |
| | | import com.matrix.system.app.vo.QuestionVo; |
| | | import com.matrix.system.hive.bean.Question; |
| | | import com.matrix.system.hive.bean.VipAnswer; |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.Mapping; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-28 |
| | | **/ |
| | | @Mapper |
| | | public abstract class QuestionMapper { |
| | | public static final QuestionMapper INSTANCE = Mappers.getMapper(QuestionMapper.class); |
| | | |
| | | public abstract QuestionVo entityToVo(Question question); |
| | | |
| | | public abstract List<QuestionVo> entitiesToVos(List<Question> list); |
| | | |
| | | @Mapping(source = "questionId", target = "quesionId") |
| | | public abstract VipAnswer dtoToVipAnswer(QuestionAnswerItemDto questionAnswerDto); |
| | | |
| | | public abstract List<VipAnswer> dtosToVipAnswers(List<QuestionAnswerItemDto> list); |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.mapper; |
| | | |
| | | import com.matrix.system.app.dto.CreateServiceOrderItemDto; |
| | | import com.matrix.system.app.vo.ServiceOrderDetailItemVo; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.Mapping; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-25 |
| | | **/ |
| | | @Mapper |
| | | public abstract class SysBeauticianStateMapper { |
| | | public static final SysBeauticianStateMapper INSTANCE = Mappers.getMapper(SysBeauticianStateMapper.class); |
| | | |
| | | |
| | | public abstract SysBeauticianState serviceOrderItemVoToEntity(CreateServiceOrderItemDto dto); |
| | | |
| | | public abstract List<SysBeauticianState> orderItmesVoToEntityList(List<CreateServiceOrderItemDto> dtoList); |
| | | |
| | | @Mapping(source = "projUse.price", target = "price") |
| | | @Mapping(source = "projInfo.name", target = "name") |
| | | @Mapping(source = "projInfo.timeLength", target = "timeLength") |
| | | @Mapping(source = "beautiStaffInfo.suName", target = "beautyName") |
| | | @Mapping(source = "extract", target = "commission") |
| | | public abstract ServiceOrderDetailItemVo entityToDetailItemVo(SysBeauticianState sysBeauticianState); |
| | | |
| | | public abstract List<ServiceOrderDetailItemVo> entitiesToDetailItemsVo(List<SysBeauticianState> list); |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.mapper; |
| | | |
| | | import com.matrix.system.app.vo.ServiceOrderDetailVo; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.Mapping; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-27 |
| | | **/ |
| | | @Mapper |
| | | public abstract class SysProjServiceMapper { |
| | | public static final SysProjServiceMapper INSTANCE = Mappers.getMapper(SysProjServiceMapper.class); |
| | | |
| | | @Mapping(source = "state", target = "status") |
| | | @Mapping(source = "vipInfo.vipName", target = "vipName") |
| | | @Mapping(source = "vipInfo.phone", target = "phone") |
| | | @Mapping(source = "createStaffName", target = "staffName") |
| | | public abstract ServiceOrderDetailVo projServiceToDetailVo(SysProjServices projServices); |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.mapper; |
| | | |
| | | import com.matrix.system.app.vo.ServiceProjVo; |
| | | import com.matrix.system.app.vo.ServiceTcVo; |
| | | import com.matrix.system.hive.bean.SysProjUse; |
| | | import com.matrix.system.hive.bean.SysProjUseFlow; |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.Mapping; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-24 |
| | | **/ |
| | | @Mapper |
| | | public abstract class SysProjUseMapper { |
| | | public static final SysProjUseMapper INSTANCE = Mappers.getMapper(SysProjUseMapper.class); |
| | | |
| | | @Mapping(source = "projName", target = "name") |
| | | @Mapping(source = "failTime", target = "invalidTime") |
| | | @Mapping(source = "surplusCount", target = "count") |
| | | public abstract ServiceTcVo entityToServiceTcVo(SysProjUse sysProjUse); |
| | | |
| | | public abstract List<ServiceTcVo> entityListToTcVoList(List<SysProjUse> list); |
| | | |
| | | @Mapping(source = "projName", target = "name") |
| | | @Mapping(source = "failTime", target = "invalidTime") |
| | | @Mapping(source = "surplusCount", target = "count") |
| | | public abstract ServiceProjVo entityToServiceProjVo(SysProjUse sysProjUse); |
| | | |
| | | public abstract List<ServiceProjVo> entityListToProjVoList(List<SysProjUse> list); |
| | | |
| | | @Mapping(source = "id", target = "projUseId") |
| | | public abstract SysProjUseFlow projUseToFlow(SysProjUse sysProjUse); |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.mapper; |
| | | |
| | | import com.matrix.system.app.vo.SkinCheckAnalysisItems; |
| | | import com.matrix.system.app.vo.SkinCheckDetailVo; |
| | | import com.matrix.system.app.vo.SkinCheckDiagnoseItemVo; |
| | | import com.matrix.system.app.vo.SkinCheckListVo; |
| | | import com.matrix.system.hive.bean.SysSkinCheckRecord; |
| | | import com.matrix.system.hive.bean.SysSkinDetail; |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.Mapping; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public abstract class SysSkinCheckRecordMapper { |
| | | public static final SysSkinCheckRecordMapper INSTANCE = Mappers.getMapper(SysSkinCheckRecordMapper.class); |
| | | |
| | | public abstract SkinCheckListVo entityToSkinCheckListVo(SysSkinCheckRecord sysSkinCheckRecord); |
| | | |
| | | public abstract List<SkinCheckListVo> entitiesToListVos(List<SysSkinCheckRecord> list); |
| | | |
| | | @Mapping(target = "sex", source = "ext2") |
| | | @Mapping(target = "vipName", source = "userName") |
| | | public abstract SkinCheckDetailVo entityToDetailVo(SysSkinCheckRecord sysSkinCheckRecord); |
| | | |
| | | @Mapping(target = "title", source = "symptom") |
| | | public abstract SkinCheckDiagnoseItemVo entityToDiagnoseItem(SysSkinDetail sysSkinDetail); |
| | | |
| | | public abstract List<SkinCheckDiagnoseItemVo> entitiesToDiagnoseItems(List<SysSkinDetail> list); |
| | | |
| | | @Mapping(target = "title", source = "symptom") |
| | | public abstract SkinCheckAnalysisItems entityToAnalysisItem(SysSkinDetail sysSkinDetail); |
| | | |
| | | public abstract List<SkinCheckAnalysisItems> entitiesToAnalysisItems(List<SysSkinDetail> list); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.mapper; |
| | | |
| | | import com.matrix.system.app.vo.StoreInOutListVo; |
| | | import com.matrix.system.app.vo.StoreListVo; |
| | | import com.matrix.system.hive.bean.SysStoreInfo; |
| | | import com.matrix.system.hive.pojo.StoreInOutRecordVO; |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.Mapping; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-27 |
| | | **/ |
| | | @Mapper |
| | | public abstract class SysStoreInfoMapper { |
| | | public static final SysStoreInfoMapper INSTANCE = Mappers.getMapper(SysStoreInfoMapper.class); |
| | | |
| | | @Mapping(target = "goodsName", source = "goods.name") |
| | | @Mapping(target = "goodsCode", source = "goods.code") |
| | | @Mapping(target = "alarmNum", source = "goods.alarmNum") |
| | | @Mapping(target = "img", source = "goods.img") |
| | | public abstract StoreListVo entityToStoreVo(SysStoreInfo sysStoreInfo); |
| | | |
| | | public abstract List<StoreListVo> entitiesToStoreVos(List<SysStoreInfo> list); |
| | | |
| | | @Mapping(target = "content", source = "orderType") |
| | | public abstract StoreInOutListVo recordVoToInOutListVo(StoreInOutRecordVO recordVO); |
| | | |
| | | public abstract List<StoreInOutListVo> recordVosToInOutListVos(List<StoreInOutRecordVO> list); |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.mapper; |
| | | |
| | | import com.matrix.system.app.dto.ModifyUserDto; |
| | | import com.matrix.system.app.vo.BeauticianVo; |
| | | import com.matrix.system.app.vo.UserInfoDetailVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.Mapping; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-25 |
| | | **/ |
| | | @Mapper |
| | | public abstract class SysUsersMapper { |
| | | public static final SysUsersMapper INSTANCE = Mappers.getMapper(SysUsersMapper.class); |
| | | |
| | | @Mapping(source = "suId", target = "id") |
| | | @Mapping(source = "suName", target = "name") |
| | | @Mapping(source = "suPhoto", target = "photo") |
| | | @Mapping(source = "suTel", target = "telphone") |
| | | public abstract BeauticianVo sysUsersToBeauticianVo(SysUsers sysUsers); |
| | | |
| | | public abstract List<BeauticianVo> usersListToBeautyList(List<SysUsers> list); |
| | | |
| | | @Mapping(source = "suPhoto", target = "photo") |
| | | @Mapping(source = "suName", target = "name") |
| | | @Mapping(source = "suAliases", target = "engName") |
| | | @Mapping(source = "suTel", target = "telphone") |
| | | @Mapping(source = "suSex", target = "sex") |
| | | @Mapping(source = "suBirthday", target = "birthday") |
| | | @Mapping(source = "suEmail", target = "email") |
| | | @Mapping(source = "serviceSignature", target = "serviceSign") |
| | | @Mapping(source = "suAddress", target = "address") |
| | | public abstract UserInfoDetailVo usersToDetailInfoVo(SysUsers sysUsers); |
| | | |
| | | public abstract ModifyUserDto usersToModifyUserDto(SysUsers sysUsers); |
| | | |
| | | @Mapping(target = "suPhoto", source = "photo") |
| | | @Mapping(target = "suName", source = "name") |
| | | @Mapping(target = "suAliases", source = "engName") |
| | | @Mapping(target = "suTel", source = "telphone") |
| | | @Mapping(target = "suSex", source = "sex") |
| | | @Mapping(target = "suBirthday", source = "birthday") |
| | | @Mapping(target = "suEmail", source = "email") |
| | | @Mapping(target = "serviceSignature", source = "serviceSign") |
| | | @Mapping(target = "suAddress", source = "address") |
| | | public abstract SysUsers modifyUserDtoToUsers(ModifyUserDto modifyUserDto); |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.mapper; |
| | | |
| | | import com.matrix.system.app.vo.BeauticianVo; |
| | | import com.matrix.system.hive.bean.SysWorkBeatuistaff; |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.Mapping; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-25 |
| | | **/ |
| | | @Mapper |
| | | public abstract class SysWorkBeatuistaffMapper { |
| | | public static final SysWorkBeatuistaffMapper INSTANCE = Mappers.getMapper(SysWorkBeatuistaffMapper.class); |
| | | |
| | | @Mapping(source = "staffId", target = "id") |
| | | @Mapping(source = "workStaffName", target = "name") |
| | | public abstract BeauticianVo workBeautyToBeautyVo(SysWorkBeatuistaff sysWorkBeatuistaff); |
| | | |
| | | |
| | | public abstract List<BeauticianVo> workBeautysToBeautyVos(List<SysWorkBeatuistaff> sysWorkBeatuistaff); |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.utils; |
| | | |
| | | import cn.hutool.core.date.DatePattern; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.core.util.XmlUtil; |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.LogUtil; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-07-14 |
| | | **/ |
| | | public class Sms106Send { |
| | | |
| | | private static final String URL = "http://www.qf106.com/sms.aspx"; |
| | | private static final String ID = "16655"; |
| | | private static final String ACCOUNT = "taiyan"; |
| | | private static final String PASSWORD = "123456"; |
| | | |
| | | |
| | | /** |
| | | * @param phone 手机号 |
| | | * @param code 验证码 |
| | | * @param time 失效时间 |
| | | * @return |
| | | */ |
| | | public static boolean sendVerifyCode(String phone, String code, int time) { |
| | | String msg = "您的验证码是{},请在{}分钟内输入,请勿泄露给他人,如非本人操作,请及时修改密码。"; |
| | | String content = StrUtil.format(msg, code, time); |
| | | return request(phone, content, "验证码"); |
| | | } |
| | | |
| | | private static boolean request(String phone, String content, String tagName) { |
| | | HashMap<String, Object> param = new HashMap<>(); |
| | | param.put("userid", ID); |
| | | param.put("account", ACCOUNT); |
| | | param.put("password", PASSWORD); |
| | | param.put("mobile", phone); |
| | | param.put("content", content); |
| | | param.put("sendTime", DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN)); |
| | | param.put("action", "send"); |
| | | param.put("checkcontent", 0); |
| | | param.put("taskName", tagName); |
| | | param.put("countnumber", 1); |
| | | param.put("mobilenumber", 1); |
| | | param.put("telephonenumber", 0); |
| | | |
| | | String response = HttpUtil.post(URL, param); |
| | | LogUtil.info("短信发送:{}, {}", tagName, response); |
| | | if ("Success".equals(XmlUtil.xmlToMap(response).get("returnstatus"))) { |
| | | return true; |
| | | } else { |
| | | throw new GlobleException((String) XmlUtil.xmlToMap(response).get("message")); |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(sendVerifyCode("15773002834", "123456", 2)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-25 |
| | | **/ |
| | | @ApiModel(value = "BeauticianVo", description = "美疗师列表返回参数类") |
| | | public class BeauticianVo { |
| | | |
| | | private Long id; |
| | | |
| | | private String name; |
| | | |
| | | private String roleName; |
| | | |
| | | private String photo; |
| | | |
| | | private String telphone; |
| | | |
| | | 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 getRoleName() { |
| | | return roleName; |
| | | } |
| | | |
| | | public void setRoleName(String roleName) { |
| | | this.roleName = roleName; |
| | | } |
| | | |
| | | public String getPhoto() { |
| | | return photo; |
| | | } |
| | | |
| | | public void setPhoto(String photo) { |
| | | this.photo = photo; |
| | | } |
| | | |
| | | public String getTelphone() { |
| | | return telphone; |
| | | } |
| | | |
| | | public void setTelphone(String telphone) { |
| | | this.telphone = telphone; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-29 |
| | | **/ |
| | | @ApiModel(value = "BusinessDataShowVo", description = "经营报表返回参数类") |
| | | public class BusinessesDataShowVo { |
| | | |
| | | @ApiModelProperty(value = "时间") |
| | | private String dataTime; |
| | | |
| | | @ApiModelProperty(value = "营业收入") |
| | | private BigDecimal totalPay; |
| | | |
| | | @ApiModelProperty(value = "现金收款") |
| | | private BigDecimal cashPay; |
| | | |
| | | @ApiModelProperty(value = "储值卡收款") |
| | | private BigDecimal cardPay; |
| | | |
| | | @ApiModelProperty(value = "欠款") |
| | | private BigDecimal arrearsPay; |
| | | |
| | | @ApiModelProperty(value = "现金退款") |
| | | private BigDecimal refundCashPay; |
| | | |
| | | @ApiModelProperty(value = "卡项退款") |
| | | private BigDecimal refundCardPay; |
| | | |
| | | @ApiModelProperty(value = "产品业绩") |
| | | private BigDecimal productAchieve; |
| | | |
| | | @ApiModelProperty(value = "卡项业绩") |
| | | private BigDecimal cardAchieve; |
| | | |
| | | @ApiModelProperty(value = "储值卡本金扣款") |
| | | private BigDecimal cardAmount; |
| | | |
| | | @ApiModelProperty(value = "储值卡增金扣款") |
| | | private BigDecimal cardFreeAmount; |
| | | |
| | | @ApiModelProperty(value = "退款") |
| | | private BigDecimal refund; |
| | | |
| | | @ApiModelProperty(value = "客单数") |
| | | private BigDecimal perCustomCnt; |
| | | |
| | | @ApiModelProperty(value = "客品数") |
| | | private BigDecimal customGoodsCnt; |
| | | |
| | | @ApiModelProperty(value = "客单价") |
| | | private BigDecimal perCustomPrice; |
| | | |
| | | @ApiModelProperty(value = "成本") |
| | | private BigDecimal cost; |
| | | |
| | | @ApiModelProperty(value = "毛利") |
| | | private BigDecimal grossProfit; |
| | | |
| | | @ApiModelProperty(value = "毛利率") |
| | | private BigDecimal grossProfitRate; |
| | | |
| | | @ApiModelProperty(value = "本金消耗") |
| | | private BigDecimal consumePay; |
| | | |
| | | @ApiModelProperty(value = "赠送消耗") |
| | | private BigDecimal freeConsumePay; |
| | | |
| | | @ApiModelProperty(value = "人头数") |
| | | private BigDecimal peopleCnt; |
| | | |
| | | @ApiModelProperty(value = "项目消耗数") |
| | | private BigDecimal projConsumeCnt; |
| | | |
| | | @ApiModelProperty(value = "服务时长") |
| | | private BigDecimal timeLength; |
| | | |
| | | /** |
| | | * 当天销售总数量 |
| | | */ |
| | | @ApiModelProperty(hidden = true) |
| | | private Integer totalSaleCnt; |
| | | |
| | | /** |
| | | * 家居产品成本 |
| | | */ |
| | | @ApiModelProperty(hidden = true) |
| | | private BigDecimal goodsCost; |
| | | |
| | | /** |
| | | * 除家具产品以外成本 |
| | | */ |
| | | @ApiModelProperty(hidden = true) |
| | | private BigDecimal otherCost; |
| | | |
| | | public Integer getTotalSaleCnt() { |
| | | return totalSaleCnt; |
| | | } |
| | | |
| | | public void setTotalSaleCnt(Integer totalSaleCnt) { |
| | | this.totalSaleCnt = totalSaleCnt; |
| | | } |
| | | |
| | | public BigDecimal getGoodsCost() { |
| | | return goodsCost; |
| | | } |
| | | |
| | | public void setGoodsCost(BigDecimal goodsCost) { |
| | | this.goodsCost = goodsCost; |
| | | } |
| | | |
| | | public BigDecimal getOtherCost() { |
| | | return otherCost; |
| | | } |
| | | |
| | | public void setOtherCost(BigDecimal otherCost) { |
| | | this.otherCost = otherCost; |
| | | } |
| | | |
| | | public String getDataTime() { |
| | | return dataTime; |
| | | } |
| | | |
| | | public void setDataTime(String dataTime) { |
| | | this.dataTime = dataTime; |
| | | } |
| | | |
| | | public BigDecimal getTotalPay() { |
| | | return totalPay; |
| | | } |
| | | |
| | | public void setTotalPay(BigDecimal totalPay) { |
| | | this.totalPay = totalPay; |
| | | } |
| | | |
| | | public BigDecimal getCashPay() { |
| | | return cashPay; |
| | | } |
| | | |
| | | public void setCashPay(BigDecimal cashPay) { |
| | | this.cashPay = cashPay; |
| | | } |
| | | |
| | | public BigDecimal getCardPay() { |
| | | return cardPay; |
| | | } |
| | | |
| | | public void setCardPay(BigDecimal cardPay) { |
| | | this.cardPay = cardPay; |
| | | } |
| | | |
| | | public BigDecimal getArrearsPay() { |
| | | return arrearsPay; |
| | | } |
| | | |
| | | public void setArrearsPay(BigDecimal arrearsPay) { |
| | | this.arrearsPay = arrearsPay; |
| | | } |
| | | |
| | | public BigDecimal getFreeConsumePay() { |
| | | return freeConsumePay; |
| | | } |
| | | |
| | | public void setFreeConsumePay(BigDecimal freeConsumePay) { |
| | | this.freeConsumePay = freeConsumePay; |
| | | } |
| | | |
| | | public BigDecimal getConsumePay() { |
| | | return consumePay.setScale(2, BigDecimal.ROUND_HALF_UP); |
| | | } |
| | | |
| | | public void setConsumePay(BigDecimal consumePay) { |
| | | this.consumePay = consumePay; |
| | | } |
| | | |
| | | public BigDecimal getRefundCashPay() { |
| | | return refundCashPay; |
| | | } |
| | | |
| | | public void setRefundCashPay(BigDecimal refundCashPay) { |
| | | this.refundCashPay = refundCashPay; |
| | | } |
| | | |
| | | public BigDecimal getRefundCardPay() { |
| | | return refundCardPay; |
| | | } |
| | | |
| | | public void setRefundCardPay(BigDecimal refundCardPay) { |
| | | this.refundCardPay = refundCardPay; |
| | | } |
| | | |
| | | public BigDecimal getProductAchieve() { |
| | | return productAchieve; |
| | | } |
| | | |
| | | public void setProductAchieve(BigDecimal productAchieve) { |
| | | this.productAchieve = productAchieve; |
| | | } |
| | | |
| | | public BigDecimal getCardAchieve() { |
| | | return cardAchieve; |
| | | } |
| | | |
| | | public void setCardAchieve(BigDecimal cardAchieve) { |
| | | this.cardAchieve = cardAchieve; |
| | | } |
| | | |
| | | public BigDecimal getRefund() { |
| | | return refund; |
| | | } |
| | | |
| | | public void setRefund(BigDecimal refund) { |
| | | this.refund = refund; |
| | | } |
| | | |
| | | public BigDecimal getPerCustomCnt() { |
| | | return perCustomCnt; |
| | | } |
| | | |
| | | public void setPerCustomCnt(BigDecimal perCustomCnt) { |
| | | this.perCustomCnt = perCustomCnt; |
| | | } |
| | | |
| | | public BigDecimal getCustomGoodsCnt() { |
| | | if (BigDecimal.ZERO.compareTo(perCustomCnt) != 0) { |
| | | return new BigDecimal(totalSaleCnt).divide(perCustomCnt, 2, BigDecimal.ROUND_DOWN); |
| | | } else { |
| | | return BigDecimal.ZERO; |
| | | } |
| | | } |
| | | |
| | | public void setCustomGoodsCnt(BigDecimal customGoodsCnt) { |
| | | this.customGoodsCnt = customGoodsCnt; |
| | | } |
| | | |
| | | public BigDecimal getPerCustomPrice() { |
| | | if (perCustomCnt.compareTo(BigDecimal.ZERO) != 0) { |
| | | return totalPay.divide(perCustomCnt, 2, BigDecimal.ROUND_DOWN); |
| | | } else { |
| | | return BigDecimal.ZERO; |
| | | } |
| | | } |
| | | |
| | | public void setPerCustomPrice(BigDecimal perCustomPrice) { |
| | | this.perCustomPrice = perCustomPrice; |
| | | } |
| | | |
| | | public BigDecimal getCost() { |
| | | return goodsCost.add(otherCost); |
| | | } |
| | | |
| | | public void setCost(BigDecimal cost) { |
| | | this.cost = cost; |
| | | } |
| | | |
| | | public BigDecimal getGrossProfit() { |
| | | return totalPay.subtract(getCost()); |
| | | } |
| | | |
| | | public void setGrossProfit(BigDecimal grossProfit) { |
| | | this.grossProfit = grossProfit; |
| | | } |
| | | |
| | | public BigDecimal getGrossProfitRate() { |
| | | if (totalPay.compareTo(BigDecimal.ZERO) != 0) { |
| | | return getGrossProfit().divide(totalPay, 2, BigDecimal.ROUND_DOWN); |
| | | } else { |
| | | return BigDecimal.ZERO; |
| | | } |
| | | } |
| | | |
| | | public void setGrossProfitRate(BigDecimal grossProfitRate) { |
| | | this.grossProfitRate = grossProfitRate; |
| | | } |
| | | |
| | | public BigDecimal getPeopleCnt() { |
| | | return peopleCnt == null ? BigDecimal.ZERO : peopleCnt.setScale(2, BigDecimal.ROUND_DOWN); |
| | | } |
| | | |
| | | public void setPeopleCnt(BigDecimal peopleCnt) { |
| | | this.peopleCnt = peopleCnt; |
| | | } |
| | | |
| | | public BigDecimal getProjConsumeCnt() { |
| | | return projConsumeCnt; |
| | | } |
| | | |
| | | public void setProjConsumeCnt(BigDecimal projConsumeCnt) { |
| | | this.projConsumeCnt = projConsumeCnt; |
| | | } |
| | | |
| | | public BigDecimal getTimeLength() { |
| | | return timeLength; |
| | | } |
| | | |
| | | public void setTimeLength(BigDecimal timeLength) { |
| | | this.timeLength = timeLength; |
| | | } |
| | | |
| | | public BigDecimal getCardAmount() { |
| | | return cardAmount; |
| | | } |
| | | |
| | | public void setCardAmount(BigDecimal cardAmount) { |
| | | this.cardAmount = cardAmount; |
| | | } |
| | | |
| | | public BigDecimal getCardFreeAmount() { |
| | | return cardFreeAmount; |
| | | } |
| | | |
| | | public void setCardFreeAmount(BigDecimal cardFreeAmount) { |
| | | this.cardFreeAmount = cardFreeAmount; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "OrderDetailAchieveItemVo", description = "订单明细业绩返回参数类") |
| | | public class OrderDetailAchieveItemVo { |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "业绩") |
| | | private BigDecimal achieve; |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public BigDecimal getAchieve() { |
| | | return achieve; |
| | | } |
| | | |
| | | public void setAchieve(BigDecimal achieve) { |
| | | this.achieve = achieve; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "OrderDetailItemVo", description = "订单详情明细表") |
| | | public class OrderDetailItemVo { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | private String count; |
| | | |
| | | @ApiModelProperty(value = "现金支付") |
| | | private BigDecimal cashPay; |
| | | |
| | | @ApiModelProperty(value = "储值卡支付") |
| | | private BigDecimal cardPay; |
| | | |
| | | @ApiModelProperty(value = "欠款") |
| | | private BigDecimal arrears; |
| | | |
| | | @ApiModelProperty(value = "原价") |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty(value = "折扣价格") |
| | | private BigDecimal zkPrice; |
| | | |
| | | @ApiModelProperty(value = "支付状态") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "订单业绩") |
| | | private List<OrderDetailAchieveItemVo> achieves; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public List<OrderDetailAchieveItemVo> getAchieves() { |
| | | return achieves; |
| | | } |
| | | |
| | | public void setAchieves(List<OrderDetailAchieveItemVo> achieves) { |
| | | this.achieves = achieves; |
| | | } |
| | | |
| | | public String getGoodsName() { |
| | | return goodsName; |
| | | } |
| | | |
| | | public void setGoodsName(String goodsName) { |
| | | this.goodsName = goodsName; |
| | | } |
| | | |
| | | public String getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(String count) { |
| | | this.count = count; |
| | | } |
| | | |
| | | public BigDecimal getCashPay() { |
| | | return cashPay; |
| | | } |
| | | |
| | | public void setCashPay(BigDecimal cashPay) { |
| | | this.cashPay = cashPay; |
| | | } |
| | | |
| | | public BigDecimal getCardPay() { |
| | | return cardPay; |
| | | } |
| | | |
| | | public void setCardPay(BigDecimal cardPay) { |
| | | this.cardPay = cardPay; |
| | | } |
| | | |
| | | public BigDecimal getPrice() { |
| | | return price; |
| | | } |
| | | |
| | | public void setPrice(BigDecimal price) { |
| | | this.price = price; |
| | | } |
| | | |
| | | public BigDecimal getZkPrice() { |
| | | return zkPrice; |
| | | } |
| | | |
| | | public void setZkPrice(BigDecimal zkPrice) { |
| | | this.zkPrice = zkPrice; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public BigDecimal getArrears() { |
| | | return arrears; |
| | | } |
| | | |
| | | public void setArrears(BigDecimal arrears) { |
| | | this.arrears = arrears; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "OrderDetailVo", description = "订单详情返回参数类") |
| | | public class OrderDetailVo { |
| | | |
| | | @ApiModelProperty(value = "订单ID") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty(value = "会员ID") |
| | | private String vipId; |
| | | |
| | | @ApiModelProperty(value = "会员姓名") |
| | | private String vipName; |
| | | |
| | | @ApiModelProperty(value = "会员手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "订单号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value = "顾问姓名") |
| | | private String staffName; |
| | | |
| | | @ApiModelProperty(value = "现金支付金额") |
| | | private BigDecimal cashPay; |
| | | |
| | | @ApiModelProperty(value = "储值卡支付金额") |
| | | private BigDecimal cardPay; |
| | | |
| | | @ApiModelProperty(value = "应付金额") |
| | | private BigDecimal needPay; |
| | | |
| | | @ApiModelProperty(value = "实付金额") |
| | | private BigDecimal realPay; |
| | | |
| | | @ApiModelProperty(value = "优惠金额") |
| | | private BigDecimal discount; |
| | | |
| | | @ApiModelProperty(value = "订单明细") |
| | | private List<OrderDetailItemVo> items; |
| | | |
| | | @ApiModelProperty(value = "订单状态") |
| | | private String orderStatus; |
| | | |
| | | @ApiModelProperty(value = "欠款") |
| | | private BigDecimal arrears; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_SS, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "下单时间") |
| | | private Date orderTime; |
| | | |
| | | public String getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(String vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public Date getOrderTime() { |
| | | return orderTime; |
| | | } |
| | | |
| | | public void setOrderTime(Date orderTime) { |
| | | this.orderTime = orderTime; |
| | | } |
| | | |
| | | public String getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(String orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public BigDecimal getArrears() { |
| | | return arrears; |
| | | } |
| | | |
| | | public void setArrears(BigDecimal arrears) { |
| | | this.arrears = arrears; |
| | | } |
| | | |
| | | public String getOrderStatus() { |
| | | return orderStatus; |
| | | } |
| | | |
| | | public void setOrderStatus(String orderStatus) { |
| | | this.orderStatus = orderStatus; |
| | | } |
| | | |
| | | public List<OrderDetailItemVo> getItems() { |
| | | return items; |
| | | } |
| | | |
| | | public void setItems(List<OrderDetailItemVo> items) { |
| | | this.items = items; |
| | | } |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public String getOrderNo() { |
| | | return orderNo; |
| | | } |
| | | |
| | | public void setOrderNo(String orderNo) { |
| | | this.orderNo = orderNo; |
| | | } |
| | | |
| | | public String getStaffName() { |
| | | return staffName; |
| | | } |
| | | |
| | | public void setStaffName(String staffName) { |
| | | this.staffName = staffName; |
| | | } |
| | | |
| | | public BigDecimal getCashPay() { |
| | | return cashPay; |
| | | } |
| | | |
| | | public void setCashPay(BigDecimal cashPay) { |
| | | this.cashPay = cashPay; |
| | | } |
| | | |
| | | public BigDecimal getCardPay() { |
| | | return cardPay; |
| | | } |
| | | |
| | | public void setCardPay(BigDecimal cardPay) { |
| | | this.cardPay = cardPay; |
| | | } |
| | | |
| | | public BigDecimal getNeedPay() { |
| | | return needPay; |
| | | } |
| | | |
| | | public void setNeedPay(BigDecimal needPay) { |
| | | this.needPay = needPay; |
| | | } |
| | | |
| | | public BigDecimal getRealPay() { |
| | | return realPay; |
| | | } |
| | | |
| | | public void setRealPay(BigDecimal realPay) { |
| | | this.realPay = realPay; |
| | | } |
| | | |
| | | public BigDecimal getDiscount() { |
| | | return discount; |
| | | } |
| | | |
| | | public void setDiscount(BigDecimal discount) { |
| | | this.discount = discount; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * jyy |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "ParameterSettingVo", description = "配置返回参数类") |
| | | public class ParameterSettingVo { |
| | | |
| | | @ApiModelProperty(value = "参数编码ID") |
| | | private Long paramId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "参数编码") |
| | | private String paramCode; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "参数值") |
| | | private String paramValue; |
| | | |
| | | |
| | | @ApiModelProperty(value = "值1") |
| | | private String paramValue1; |
| | | |
| | | |
| | | @ApiModelProperty(value = "值2") |
| | | private String paramValue2; |
| | | |
| | | |
| | | @ApiModelProperty(value = "值3") |
| | | private String paramValue3; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.hive.bean.Answer; |
| | | import com.matrix.system.hive.bean.VipAnswer; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-28 |
| | | **/ |
| | | @ApiModel(value = "QuestionVo", description = "会员档案返回参数类") |
| | | public class QuestionVo { |
| | | |
| | | @ApiModelProperty(value = "问题ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "问题") |
| | | private String question; |
| | | |
| | | @ApiModelProperty(value = "类型 1-文本 输入框 2-单选 下拉框 3-多选 多选框 4-长文本 文本域 5-标题 只显示即可") |
| | | private String type; |
| | | |
| | | @ApiModelProperty(value = "单选、多选的选项") |
| | | private List<Answer> answers; |
| | | |
| | | @ApiModelProperty(value = "回显答案") |
| | | private VipAnswer vipAnswer; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getQuestion() { |
| | | return question; |
| | | } |
| | | |
| | | public void setQuestion(String question) { |
| | | this.question = question; |
| | | } |
| | | |
| | | public String getType() { |
| | | if (StringUtils.isNotBlank(type)) { |
| | | switch (type) { |
| | | case "文本" : |
| | | return "1"; |
| | | case "单选" : |
| | | return "2"; |
| | | case "多选" : |
| | | return "3"; |
| | | case "长文本" : |
| | | return "4"; |
| | | case "标题" : |
| | | return "5"; |
| | | default: |
| | | return "6"; |
| | | } |
| | | } |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public List<Answer> getAnswers() { |
| | | return answers; |
| | | } |
| | | |
| | | public void setAnswers(List<Answer> answers) { |
| | | this.answers = answers; |
| | | } |
| | | |
| | | public VipAnswer getVipAnswer() { |
| | | return vipAnswer; |
| | | } |
| | | |
| | | public void setVipAnswer(VipAnswer vipAnswer) { |
| | | this.vipAnswer = vipAnswer; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-28 |
| | | **/ |
| | | @ApiModel(value = "RankingVo", description = "排行榜返回参数类") |
| | | public class RankingVo { |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "头像") |
| | | private String photo; |
| | | |
| | | @ApiModelProperty(value = "金额") |
| | | private BigDecimal amount; |
| | | |
| | | @ApiModelProperty(value = "店铺名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty(value = "员工ID") |
| | | private Long id; |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getPhoto() { |
| | | return photo; |
| | | } |
| | | |
| | | public void setPhoto(String photo) { |
| | | this.photo = photo; |
| | | } |
| | | |
| | | public BigDecimal getAmount() { |
| | | return amount == null ? amount : amount.setScale(BigDecimal.ROUND_DOWN, 2); |
| | | } |
| | | |
| | | public void setAmount(BigDecimal amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-25 |
| | | **/ |
| | | @ApiModel(value = "ServiceOrderDetailItemVo", description = "服务单详情接口参数返回类") |
| | | public class ServiceOrderDetailItemVo { |
| | | |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer count; |
| | | |
| | | @ApiModelProperty(value = "价格") |
| | | private BigDecimal price; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "服务开始时间") |
| | | private Date beginTime; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "服务结束时间") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty(value = "时长") |
| | | private Integer timeLength; |
| | | |
| | | @ApiModelProperty(value = "美疗师") |
| | | private String beautyName; |
| | | |
| | | @ApiModelProperty(value = "提成") |
| | | private BigDecimal commission; |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Integer getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(Integer count) { |
| | | this.count = count; |
| | | } |
| | | |
| | | public BigDecimal getPrice() { |
| | | return price; |
| | | } |
| | | |
| | | public void setPrice(BigDecimal price) { |
| | | this.price = price; |
| | | } |
| | | |
| | | public Date getBeginTime() { |
| | | return beginTime; |
| | | } |
| | | |
| | | public void setBeginTime(Date beginTime) { |
| | | this.beginTime = beginTime; |
| | | } |
| | | |
| | | public Date getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public void setEndTime(Date endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public Integer getTimeLength() { |
| | | return timeLength; |
| | | } |
| | | |
| | | public void setTimeLength(Integer timeLength) { |
| | | this.timeLength = timeLength; |
| | | } |
| | | |
| | | public String getBeautyName() { |
| | | return beautyName; |
| | | } |
| | | |
| | | public void setBeautyName(String beautyName) { |
| | | this.beautyName = beautyName; |
| | | } |
| | | |
| | | public BigDecimal getCommission() { |
| | | return commission; |
| | | } |
| | | |
| | | public void setCommission(BigDecimal commission) { |
| | | this.commission = commission; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-25 |
| | | **/ |
| | | @ApiModel(value = "ServiceOrderDetailVo", description = "服务单详情返回参数类") |
| | | public class ServiceOrderDetailVo { |
| | | |
| | | @ApiModelProperty(value = "服务单号") |
| | | private String serviceNo; |
| | | |
| | | @ApiModelProperty(value = "会员姓名") |
| | | private String vipName; |
| | | |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "预约时间") |
| | | private Date yyTime; |
| | | |
| | | @ApiModelProperty(value = "床位") |
| | | private String bedName; |
| | | |
| | | @ApiModelProperty(value = "配料师傅") |
| | | private String plsName; |
| | | |
| | | @ApiModelProperty(value = "服务总时长") |
| | | private Integer totalTime; |
| | | |
| | | @ApiModelProperty(value = "下单顾问") |
| | | private String staffName; |
| | | |
| | | @ApiModelProperty(value = "服务单状态") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "服务单评论") |
| | | private String comment; |
| | | |
| | | |
| | | @ApiModelProperty(value = "服务明细") |
| | | private List<ServiceOrderDetailItemVo> items; |
| | | |
| | | public String getComment() { |
| | | return comment; |
| | | } |
| | | |
| | | public void setComment(String comment) { |
| | | this.comment = comment; |
| | | } |
| | | |
| | | public String getServiceNo() { |
| | | return serviceNo; |
| | | } |
| | | |
| | | public void setServiceNo(String serviceNo) { |
| | | this.serviceNo = serviceNo; |
| | | } |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public Date getYyTime() { |
| | | return yyTime; |
| | | } |
| | | |
| | | public void setYyTime(Date yyTime) { |
| | | this.yyTime = yyTime; |
| | | } |
| | | |
| | | public String getBedName() { |
| | | return bedName; |
| | | } |
| | | |
| | | public void setBedName(String bedName) { |
| | | this.bedName = bedName; |
| | | } |
| | | |
| | | public String getPlsName() { |
| | | return plsName; |
| | | } |
| | | |
| | | public void setPlsName(String plsName) { |
| | | this.plsName = plsName; |
| | | } |
| | | |
| | | public Integer getTotalTime() { |
| | | return totalTime; |
| | | } |
| | | |
| | | public void setTotalTime(Integer totalTime) { |
| | | this.totalTime = totalTime; |
| | | } |
| | | |
| | | public String getStaffName() { |
| | | return staffName; |
| | | } |
| | | |
| | | public void setStaffName(String staffName) { |
| | | this.staffName = staffName; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public List<ServiceOrderDetailItemVo> getItems() { |
| | | return items; |
| | | } |
| | | |
| | | public void setItems(List<ServiceOrderDetailItemVo> items) { |
| | | this.items = items; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-24 |
| | | **/ |
| | | @ApiModel(value = "ServiceOrderListProjVo", description = "服务单列表项目返回参数类") |
| | | public class ServiceOrderListProjVo { |
| | | |
| | | @ApiModelProperty(value = "美疗师ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "项目名称") |
| | | private String projName; |
| | | |
| | | @ApiModelProperty(value = "美疗师") |
| | | private String beautyName; |
| | | |
| | | |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getProjName() { |
| | | return projName; |
| | | } |
| | | |
| | | public void setProjName(String projName) { |
| | | this.projName = projName; |
| | | } |
| | | |
| | | public String getBeautyName() { |
| | | return beautyName; |
| | | } |
| | | |
| | | public void setBeautyName(String beautyName) { |
| | | this.beautyName = beautyName; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-24 |
| | | **/ |
| | | @ApiModel(value = "ServiceOrderListVo", description = "服务单列表返回参数类") |
| | | public class ServiceOrderListVo { |
| | | |
| | | @ApiModelProperty(value = "服务单Id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "会员ID") |
| | | private Long vipId; |
| | | |
| | | @ApiModelProperty(value = "下单顾问ID") |
| | | private Long createStaffId; |
| | | |
| | | @ApiModelProperty(value = "服务单编号") |
| | | private String serviceNo; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "预约时间") |
| | | private Date time; |
| | | |
| | | @ApiModelProperty(value = "会员名称") |
| | | private String vipName; |
| | | |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty(value = "服务时长") |
| | | private Integer timeLength; |
| | | |
| | | @ApiModelProperty(value = "床位") |
| | | private String bed; |
| | | |
| | | @ApiModelProperty(value = "状态 1-待预约 2-待派单 3-待配料 4-待服务 5-服务中 6-服务完成 7-服务单结束") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "服务项目信息") |
| | | private List<ServiceOrderListProjVo> projs; |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public Long getCreateStaffId() { |
| | | return createStaffId; |
| | | } |
| | | |
| | | public void setCreateStaffId(Long createStaffId) { |
| | | this.createStaffId = createStaffId; |
| | | } |
| | | |
| | | public List<ServiceOrderListProjVo> getProjs() { |
| | | return projs; |
| | | } |
| | | |
| | | public void setProjs(List<ServiceOrderListProjVo> projs) { |
| | | this.projs = projs; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getServiceNo() { |
| | | return serviceNo; |
| | | } |
| | | |
| | | public void setServiceNo(String serviceNo) { |
| | | this.serviceNo = serviceNo; |
| | | } |
| | | |
| | | public Date getTime() { |
| | | return time; |
| | | } |
| | | |
| | | public void setTime(Date time) { |
| | | this.time = time; |
| | | } |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public Integer getTimeLength() { |
| | | return timeLength; |
| | | } |
| | | |
| | | public void setTimeLength(Integer timeLength) { |
| | | this.timeLength = timeLength; |
| | | } |
| | | |
| | | public String getBed() { |
| | | return bed; |
| | | } |
| | | |
| | | public void setBed(String bed) { |
| | | this.bed = bed; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | switch (status) { |
| | | case "待预约" : |
| | | this.status = "1"; |
| | | break; |
| | | case "预约成功待处理" : |
| | | this.status = "2"; |
| | | break; |
| | | case "需配料" : |
| | | this.status = "3"; |
| | | break; |
| | | case "配料完成" : |
| | | this.status = "4"; |
| | | break; |
| | | case "服务中" : |
| | | this.status = "5"; |
| | | break; |
| | | case "服务完成" : |
| | | this.status = "6"; |
| | | break; |
| | | case "服务单结束" : |
| | | this.status = "7"; |
| | | break; |
| | | case "预约取消" : |
| | | this.status = "8"; |
| | | break; |
| | | case "待确认" : |
| | | this.status = "9"; |
| | | break; |
| | | default: |
| | | this.status = "0"; |
| | | break; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-24 |
| | | **/ |
| | | @ApiModel(value = "ServiceProjListVo", description = "用户产品列表") |
| | | public class ServiceProductListVo { |
| | | |
| | | @ApiModelProperty(value = "会员ID") |
| | | private Long vipId; |
| | | |
| | | @ApiModelProperty(value = "会员名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "项目列表") |
| | | private List<ServiceProjVo> proj; |
| | | |
| | | @ApiModelProperty(value = "套餐列表") |
| | | private List<ServiceTcVo> composeProj; |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public List<ServiceProjVo> getProj() { |
| | | return proj; |
| | | } |
| | | |
| | | public void setProj(List<ServiceProjVo> proj) { |
| | | this.proj = proj; |
| | | } |
| | | |
| | | public List<ServiceTcVo> getComposeProj() { |
| | | return composeProj; |
| | | } |
| | | |
| | | public void setComposeProj(List<ServiceTcVo> composeProj) { |
| | | this.composeProj = composeProj; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-24 |
| | | **/ |
| | | @ApiModel(value = "ServiceProjVo", description = "用户项目返回参数类") |
| | | public class ServiceProjVo { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "订单ID") |
| | | private Long projId; |
| | | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "套餐来源,转让,购买") |
| | | private String source; |
| | | |
| | | @ApiModelProperty(value = "划扣金额") |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty(value = "时长") |
| | | private Integer timeLength; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "有效期") |
| | | private Date invalidTime; |
| | | |
| | | @ApiModelProperty(value = "剩余数量") |
| | | private Integer count; |
| | | |
| | | @ApiModelProperty(value = "图片") |
| | | private String img; |
| | | |
| | | @ApiModelProperty(value = "快过期 1-是 2-否") |
| | | private String isInvalid; |
| | | |
| | | @ApiModelProperty(value = " 使用情况余额") |
| | | private Double balance; |
| | | |
| | | @ApiModelProperty(value = "项目状态 有效/无效") |
| | | private String status; |
| | | |
| | | public String getIsInvalid() { |
| | | Date date = DateUtil.getDateAfterMonth(new Date(), 1); |
| | | if (invalidTime != null) { |
| | | if (new Date().after(invalidTime)) { |
| | | return "3"; |
| | | } |
| | | |
| | | if (date.after(invalidTime)) { |
| | | return "1"; |
| | | } |
| | | } |
| | | return "2"; |
| | | } |
| | | |
| | | public void setIsInvalid(String isInvalid) { |
| | | this.isInvalid = isInvalid; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Integer getTimeLength() { |
| | | return timeLength; |
| | | } |
| | | |
| | | public void setTimeLength(Integer timeLength) { |
| | | this.timeLength = timeLength; |
| | | } |
| | | |
| | | public Long getProjId() { |
| | | return projId; |
| | | } |
| | | |
| | | public void setProjId(Long projId) { |
| | | this.projId = projId; |
| | | } |
| | | |
| | | public Date getInvalidTime() { |
| | | return invalidTime; |
| | | } |
| | | |
| | | public void setInvalidTime(Date invalidTime) { |
| | | this.invalidTime = invalidTime; |
| | | } |
| | | |
| | | public Integer getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(Integer count) { |
| | | this.count = count; |
| | | } |
| | | |
| | | public String getImg() { |
| | | return img; |
| | | } |
| | | |
| | | public void setImg(String img) { |
| | | this.img = img; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | if ("有效".equals(status)) { |
| | | return "1"; |
| | | } else { |
| | | return "2"; |
| | | } |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getSource() { |
| | | return source; |
| | | } |
| | | |
| | | public void setSource(String source) { |
| | | this.source = source; |
| | | } |
| | | |
| | | public Double getBalance() { |
| | | return balance; |
| | | } |
| | | |
| | | public void setBalance(Double balance) { |
| | | this.balance = balance; |
| | | } |
| | | |
| | | public BigDecimal getPrice() { |
| | | return price; |
| | | } |
| | | |
| | | public void setPrice(BigDecimal price) { |
| | | this.price = price; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.bean.SysProjUse; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-24 |
| | | **/ |
| | | @ApiModel(value = "ServiceTcVo", description = "用户套餐返回参数类") |
| | | public class ServiceTcVo { |
| | | @ApiModelProperty(hidden = true) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "商品ID") |
| | | private Long projId; |
| | | |
| | | @ApiModelProperty(value = "套餐名称") |
| | | private String name; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "有效期") |
| | | private Date invalidTime; |
| | | |
| | | @ApiModelProperty(value = "剩余数量") |
| | | private String count; |
| | | |
| | | @ApiModelProperty(value = "固定/任选套餐 Y-任选 N-固定") |
| | | private String isCourse; |
| | | |
| | | @ApiModelProperty(value = "若套餐为任选套餐 则判断是否无限次 Y是 N否") |
| | | private String isInfinite; |
| | | |
| | | @ApiModelProperty(value = "来源") |
| | | private String source; |
| | | |
| | | @ApiModelProperty(value = "套餐内产品") |
| | | List<ServiceProjVo> proj; |
| | | |
| | | @ApiModelProperty(value = "快过期 1-是 2-否") |
| | | private String isInvalid; |
| | | |
| | | @ApiModelProperty(value = "状态 有效/无效") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private List<SysProjUse> taocanProjUse; |
| | | |
| | | public List<SysProjUse> getTaocanProjUse() { |
| | | return taocanProjUse; |
| | | } |
| | | |
| | | public void setTaocanProjUse(List<SysProjUse> taocanProjUse) { |
| | | this.taocanProjUse = taocanProjUse; |
| | | } |
| | | |
| | | public String getIsInvalid() { |
| | | Date date = DateUtil.getDateAfterMonth(new Date(), 1); |
| | | if (invalidTime != null) { |
| | | if (new Date().after(invalidTime)) { |
| | | return "3"; |
| | | } |
| | | |
| | | if (date.after(invalidTime)) { |
| | | return "1"; |
| | | } |
| | | } |
| | | return "2"; |
| | | } |
| | | |
| | | public void setIsInvalid(String isInvalid) { |
| | | this.isInvalid = isInvalid; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getProjId() { |
| | | return projId; |
| | | } |
| | | |
| | | public void setProjId(Long projId) { |
| | | this.projId = projId; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Date getInvalidTime() { |
| | | return invalidTime; |
| | | } |
| | | |
| | | public void setInvalidTime(Date invalidTime) { |
| | | this.invalidTime = invalidTime; |
| | | } |
| | | |
| | | public String getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(String count) { |
| | | this.count = count; |
| | | } |
| | | |
| | | public String getIsCourse() { |
| | | return isCourse; |
| | | } |
| | | |
| | | public void setIsCourse(String isCourse) { |
| | | this.isCourse = isCourse; |
| | | } |
| | | |
| | | public String getIsInfinite() { |
| | | return isInfinite; |
| | | } |
| | | |
| | | public void setIsInfinite(String isInfinite) { |
| | | this.isInfinite = isInfinite; |
| | | } |
| | | |
| | | public List<ServiceProjVo> getProj() { |
| | | return proj; |
| | | } |
| | | |
| | | public void setProj(List<ServiceProjVo> proj) { |
| | | this.proj = proj; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | if ("有效".equals(status)) { |
| | | return "1"; |
| | | } else { |
| | | return "2"; |
| | | } |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getSource() { |
| | | return source; |
| | | } |
| | | |
| | | public void setSource(String source) { |
| | | this.source = source; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.matrix.system.hive.bean.ShoppingGoodsCategory; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-24 |
| | | **/ |
| | | @Data |
| | | @ApiModel(value = "ShoppingGoodsDetailVo", description = "商品详情返回参数类") |
| | | public class ShoppingGoodsDetailVo { |
| | | |
| | | @ApiModelProperty(value = "商品编号") |
| | | private String goodsNo; |
| | | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty(value = "销售价格") |
| | | private BigDecimal salePrice; |
| | | |
| | | @ApiModelProperty(value = "销量") |
| | | private Integer saleCnt; |
| | | |
| | | @ApiModelProperty(value = "主图") |
| | | private String img; |
| | | |
| | | @ApiModelProperty(value = "详情") |
| | | private String desc; |
| | | |
| | | @ApiModelProperty(value = "商品类型") |
| | | private String goodsType; |
| | | |
| | | @ApiModelProperty(value = "容积") |
| | | private Integer volume; |
| | | |
| | | @ApiModelProperty(value = "规格") |
| | | private String measure; |
| | | |
| | | @ApiModelProperty(value = "最大销售数量") |
| | | private Integer maxSaleCnt; |
| | | |
| | | @ApiModelProperty(value = "每人限购次数") |
| | | private Integer limitBuyCnt; |
| | | |
| | | @ApiModelProperty(value = "充值卡使用范围 是-所有产品 否-部分产品") |
| | | private String carIsAll; |
| | | |
| | | @ApiModelProperty(value = "赠送金额") |
| | | private BigDecimal giftPrice; |
| | | |
| | | @ApiModelProperty(value = "固定/任选套餐 Y-任选 N-固定") |
| | | private String isCourse; |
| | | |
| | | @ApiModelProperty(value = "最大使用次数") |
| | | private Integer maxUseCnt; |
| | | |
| | | @ApiModelProperty(value = "项目关联产品--配料表、卡项可消费产品") |
| | | List<ShoppingGoodsDetailVo> assembleProj; |
| | | |
| | | @ApiModelProperty(value = "套餐项目权益") |
| | | List<ShoppingGoodsDetailVo> assembleTaocanProj; |
| | | |
| | | @ApiModelProperty(value = "套餐产品权益") |
| | | List<ShoppingGoodsDetailVo> assembleTaocanProduct; |
| | | |
| | | @ApiModelProperty(value = "卡项产品可消费类型") |
| | | List<ShoppingGoodsCategory> cardCategory; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.matrix.system.hive.bean.ShoppingGoods; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "ShoppingGoodsListVo", description = "商品列表返回类") |
| | | public class ShoppingGoodsListVo { |
| | | |
| | | @ApiModelProperty(value = "商品ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "商品编号") |
| | | private String goodsCode; |
| | | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "商品价格") |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty(value = "是否赠送") |
| | | private String isPresent; |
| | | |
| | | @ApiModelProperty(value = "商品规格") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty(value = "计量单位") |
| | | private String measure; |
| | | |
| | | @ApiModelProperty(value = "商品图片") |
| | | private String img; |
| | | |
| | | @ApiModelProperty(value = "商品类型") |
| | | private String goodsType; |
| | | |
| | | public String getGoodsType() { |
| | | return goodsType; |
| | | } |
| | | |
| | | public void setGoodsType(String goodsType) { |
| | | this.goodsType = goodsType; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getGoodsCode() { |
| | | return goodsCode; |
| | | } |
| | | |
| | | public void setGoodsCode(String goodsCode) { |
| | | this.goodsCode = goodsCode; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public BigDecimal getPrice() { |
| | | return price; |
| | | } |
| | | |
| | | public void setPrice(BigDecimal price) { |
| | | this.price = price; |
| | | } |
| | | |
| | | public String getIsPresent() { |
| | | return isPresent; |
| | | } |
| | | |
| | | public void setIsPresent(String isPresent) { |
| | | if ("是".equals(isPresent)) { |
| | | this.isPresent = "1"; |
| | | } else { |
| | | this.isPresent = "0"; |
| | | } |
| | | } |
| | | |
| | | public String getUnit() { |
| | | return unit; |
| | | } |
| | | |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | } |
| | | |
| | | public String getMeasure() { |
| | | return measure; |
| | | } |
| | | |
| | | public void setMeasure(String measure) { |
| | | this.measure = measure; |
| | | } |
| | | |
| | | public String getImg() { |
| | | return img; |
| | | } |
| | | |
| | | public void setImg(String img) { |
| | | this.img = img; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.matrix.system.shopXcx.bean.ShopProduct; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.util.List; |
| | | |
| | | @ApiModel(value = "SkinCheckAnalysisItems", description = "问题分析返回接口类") |
| | | public class SkinCheckAnalysisItems { |
| | | |
| | | @ApiModelProperty(value = "图片") |
| | | private String img; |
| | | |
| | | @ApiModelProperty(value = "标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "问题分析") |
| | | private String analysis; |
| | | |
| | | @ApiModelProperty(value = "解决办法") |
| | | private String solution; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private String productIds; |
| | | |
| | | @ApiModelProperty(value = "产品列表") |
| | | private List<String> products; |
| | | |
| | | public String getProductIds() { |
| | | return productIds; |
| | | } |
| | | |
| | | public void setProductIds(String productIds) { |
| | | this.productIds = productIds; |
| | | } |
| | | |
| | | public String getImg() { |
| | | return img; |
| | | } |
| | | |
| | | public void setImg(String img) { |
| | | this.img = img; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public String getAnalysis() { |
| | | return analysis; |
| | | } |
| | | |
| | | public void setAnalysis(String analysis) { |
| | | this.analysis = analysis; |
| | | } |
| | | |
| | | public String getSolution() { |
| | | return solution; |
| | | } |
| | | |
| | | public void setSolution(String solution) { |
| | | this.solution = solution; |
| | | } |
| | | |
| | | public List<String> getProducts() { |
| | | return products; |
| | | } |
| | | |
| | | public void setProducts(List<String> products) { |
| | | this.products = products; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @ApiModel(value = "SkinCheckDetailVo", description = "皮肤检测详情返回接口类") |
| | | public class SkinCheckDetailVo { |
| | | |
| | | @ApiModelProperty(value = "会员姓名") |
| | | private String vipName; |
| | | |
| | | @ApiModelProperty(value = "头像") |
| | | private String photo; |
| | | |
| | | @ApiModelProperty(value = "性别") |
| | | private String sex; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "检测时间") |
| | | private Date checkTime; |
| | | |
| | | @ApiModelProperty(value = "诊断结果") |
| | | List<SkinCheckDiagnoseItemVo> diagnoseItems; |
| | | |
| | | @ApiModelProperty(value = "问题分析") |
| | | List<SkinCheckAnalysisItems> analysisItems; |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public String getPhoto() { |
| | | return photo; |
| | | } |
| | | |
| | | public void setPhoto(String photo) { |
| | | this.photo = photo; |
| | | } |
| | | |
| | | public String getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public void setSex(String sex) { |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public Date getCheckTime() { |
| | | return checkTime; |
| | | } |
| | | |
| | | public void setCheckTime(Date checkTime) { |
| | | this.checkTime = checkTime; |
| | | } |
| | | |
| | | public List<SkinCheckDiagnoseItemVo> getDiagnoseItems() { |
| | | return diagnoseItems; |
| | | } |
| | | |
| | | public void setDiagnoseItems(List<SkinCheckDiagnoseItemVo> diagnoseItems) { |
| | | this.diagnoseItems = diagnoseItems; |
| | | } |
| | | |
| | | public List<SkinCheckAnalysisItems> getAnalysisItems() { |
| | | return analysisItems; |
| | | } |
| | | |
| | | public void setAnalysisItems(List<SkinCheckAnalysisItems> analysisItems) { |
| | | this.analysisItems = analysisItems; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | @ApiModel(value = "SkinCheckDiagnoseItemVo", description = "诊断结果返回参数类") |
| | | public class SkinCheckDiagnoseItemVo { |
| | | |
| | | @ApiModelProperty(value = "标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "百分比") |
| | | private Double percentage; |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | |
| | | public Double getPercentage() { |
| | | return percentage; |
| | | } |
| | | |
| | | public void setPercentage(Double percentage) { |
| | | this.percentage = percentage; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @ApiModel(value = "SkinCheckListVo", description = "皮肤检测列表返回参数类") |
| | | public class SkinCheckListVo { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "检测人员") |
| | | private String checkUserName; |
| | | |
| | | @ApiModelProperty(value = "检测门店") |
| | | private String shopName; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "检测时间") |
| | | private Date checkTime; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | |
| | | public String getCheckUserName() { |
| | | return checkUserName; |
| | | } |
| | | |
| | | public void setCheckUserName(String checkUserName) { |
| | | this.checkUserName = checkUserName; |
| | | } |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | public Date getCheckTime() { |
| | | return checkTime; |
| | | } |
| | | |
| | | public void setCheckTime(Date checkTime) { |
| | | this.checkTime = checkTime; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-27 |
| | | **/ |
| | | @ApiModel(value = "StoreInOutListVo", description = "商品出入库返回参数类") |
| | | public class StoreInOutListVo { |
| | | |
| | | @ApiModelProperty(value = "详情") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "单号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | private BigDecimal amount; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "出入库时间") |
| | | private Date createTime; |
| | | |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | |
| | | public void setContent(String content) { |
| | | this.content = content; |
| | | } |
| | | |
| | | public String getOrderNo() { |
| | | return orderNo; |
| | | } |
| | | |
| | | public void setOrderNo(String orderNo) { |
| | | this.orderNo = orderNo; |
| | | } |
| | | |
| | | public BigDecimal getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(BigDecimal amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-27 |
| | | **/ |
| | | @ApiModel(value = "StoreListVo", description = "库存列表返回参数类") |
| | | public class StoreListVo { |
| | | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty(value = "商品编号") |
| | | private String goodsCode; |
| | | |
| | | @ApiModelProperty(value = "在库数量") |
| | | private Integer storeTotal; |
| | | |
| | | @ApiModelProperty(value = "警戒值") |
| | | private Integer alarmNum; |
| | | |
| | | @ApiModelProperty(value = "图片") |
| | | private String img; |
| | | |
| | | public String getGoodsName() { |
| | | return goodsName; |
| | | } |
| | | |
| | | public void setGoodsName(String goodsName) { |
| | | this.goodsName = goodsName; |
| | | } |
| | | |
| | | public String getGoodsCode() { |
| | | return goodsCode; |
| | | } |
| | | |
| | | public void setGoodsCode(String goodsCode) { |
| | | this.goodsCode = goodsCode; |
| | | } |
| | | |
| | | public Integer getStoreTotal() { |
| | | return storeTotal; |
| | | } |
| | | |
| | | public void setStoreTotal(Integer storeTotal) { |
| | | this.storeTotal = storeTotal; |
| | | } |
| | | |
| | | public Integer getAlarmNum() { |
| | | return alarmNum; |
| | | } |
| | | |
| | | public void setAlarmNum(Integer alarmNum) { |
| | | this.alarmNum = alarmNum; |
| | | } |
| | | |
| | | public String getImg() { |
| | | return img; |
| | | } |
| | | |
| | | public void setImg(String img) { |
| | | this.img = img; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @ApiModel(value = "UserAchieveVo", description = "员工业绩返回类") |
| | | public class UserAchieveVo { |
| | | |
| | | @ApiModelProperty(value = "用户ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "现金业绩") |
| | | private BigDecimal orderCash; |
| | | |
| | | @ApiModelProperty(value = "划扣业绩") |
| | | private BigDecimal cash; |
| | | |
| | | @ApiModelProperty(value = "业绩提成") |
| | | private BigDecimal cardUse; |
| | | |
| | | @ApiModelProperty(value = "本金消耗") |
| | | private BigDecimal hisConsume; |
| | | |
| | | @ApiModelProperty(value = "赠送消耗") |
| | | private BigDecimal freeConsume; |
| | | |
| | | @ApiModelProperty(value = "服务提成") |
| | | private BigDecimal projCommission; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public BigDecimal getOrderCash() { |
| | | return orderCash; |
| | | } |
| | | |
| | | public void setOrderCash(BigDecimal orderCash) { |
| | | this.orderCash = orderCash; |
| | | } |
| | | |
| | | public BigDecimal getCash() { |
| | | return cash; |
| | | } |
| | | |
| | | public void setCash(BigDecimal cash) { |
| | | this.cash = cash; |
| | | } |
| | | |
| | | public BigDecimal getHisConsume() { |
| | | return hisConsume; |
| | | } |
| | | |
| | | public void setHisConsume(BigDecimal hisConsume) { |
| | | this.hisConsume = hisConsume; |
| | | } |
| | | |
| | | public BigDecimal getFreeConsume() { |
| | | return freeConsume; |
| | | } |
| | | |
| | | public void setFreeConsume(BigDecimal freeConsume) { |
| | | this.freeConsume = freeConsume; |
| | | } |
| | | |
| | | public BigDecimal getCardUse() { |
| | | return cardUse; |
| | | } |
| | | |
| | | public void setCardUse(BigDecimal cardUse) { |
| | | this.cardUse = cardUse; |
| | | } |
| | | |
| | | public BigDecimal getProjCommission() { |
| | | return projCommission; |
| | | } |
| | | |
| | | public void setProjCommission(BigDecimal projCommission) { |
| | | this.projCommission = projCommission; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-06 |
| | | **/ |
| | | @ApiModel(value = "UserInfoDetailVo", description = "获取当前登陆用户详情接口返回参数类") |
| | | public class UserInfoDetailVo { |
| | | |
| | | @ApiModelProperty(value = "头像") |
| | | private String photo; |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "英文名") |
| | | private String engName; |
| | | |
| | | @ApiModelProperty(value = "手机号") |
| | | private String telphone; |
| | | |
| | | @ApiModelProperty(value = "性别") |
| | | private String sex; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "生日") |
| | | private Date birthday; |
| | | |
| | | @ApiModelProperty(value = "邮箱") |
| | | private String email; |
| | | |
| | | @ApiModelProperty(value = "服务签名") |
| | | private String serviceSign; |
| | | |
| | | @ApiModelProperty(value = "地址") |
| | | private String address; |
| | | |
| | | public String getPhoto() { |
| | | return photo; |
| | | } |
| | | |
| | | public void setPhoto(String photo) { |
| | | this.photo = photo; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getEngName() { |
| | | return engName; |
| | | } |
| | | |
| | | public void setEngName(String engName) { |
| | | this.engName = engName; |
| | | } |
| | | |
| | | public String getTelphone() { |
| | | return telphone; |
| | | } |
| | | |
| | | public void setTelphone(String telphone) { |
| | | this.telphone = telphone; |
| | | } |
| | | |
| | | public String getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public void setSex(String sex) { |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public Date getBirthday() { |
| | | return birthday; |
| | | } |
| | | |
| | | public void setBirthday(Date birthday) { |
| | | this.birthday = birthday; |
| | | } |
| | | |
| | | public String getEmail() { |
| | | return email; |
| | | } |
| | | |
| | | public void setEmail(String email) { |
| | | this.email = email; |
| | | } |
| | | |
| | | public String getServiceSign() { |
| | | return serviceSign; |
| | | } |
| | | |
| | | public void setServiceSign(String serviceSign) { |
| | | this.serviceSign = serviceSign; |
| | | } |
| | | |
| | | public String getAddress() { |
| | | return address; |
| | | } |
| | | |
| | | public void setAddress(String address) { |
| | | this.address = address; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @ApiModel(value = "UserInfoVo", description = "用户信息返回类") |
| | | public class UserInfoVo { |
| | | |
| | | @ApiModelProperty(value = "用户ID", example = "1") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "用户名称", example = "呵呵") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "职位", example = "店长") |
| | | private String roleName; |
| | | |
| | | @ApiModelProperty(value = "头像", example = "--") |
| | | private String photo; |
| | | |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String shopName; |
| | | |
| | | 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 getRoleName() { |
| | | return roleName; |
| | | } |
| | | |
| | | public void setRoleName(String roleName) { |
| | | this.roleName = roleName; |
| | | } |
| | | |
| | | public String getPhoto() { |
| | | return photo; |
| | | } |
| | | |
| | | public void setPhoto(String photo) { |
| | | this.photo = photo; |
| | | } |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-31 |
| | | **/ |
| | | @ApiModel(value = "VipAchieveDataShowVo", description = "员工业绩返回参数类") |
| | | public class VipAchieveDataShowVo { |
| | | |
| | | @ApiModelProperty(value = "时间") |
| | | private String time; |
| | | |
| | | @ApiModelProperty(value = "订单业绩") |
| | | private BigDecimal orderAmount; |
| | | |
| | | @ApiModelProperty(value = "现金业绩") |
| | | private BigDecimal cashAmount; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private BigDecimal cardAmount; |
| | | |
| | | @ApiModelProperty(value = "订单提成") |
| | | private BigDecimal goodsAmount; |
| | | |
| | | @ApiModelProperty(value = "划扣业绩") |
| | | private BigDecimal cardUseAmount; |
| | | |
| | | @ApiModelProperty(value = "本金消耗") |
| | | private BigDecimal hisConsume; |
| | | |
| | | @ApiModelProperty(value = "赠送消耗") |
| | | private BigDecimal freeConsume; |
| | | |
| | | @ApiModelProperty(value = "服务提成") |
| | | private BigDecimal commission; |
| | | |
| | | @ApiModelProperty(value = "人头数") |
| | | private BigDecimal peopleNum; |
| | | |
| | | @ApiModelProperty(value = "项目数") |
| | | private Integer projNum; |
| | | |
| | | @ApiModelProperty(value = "服务时长") |
| | | private Integer serviceTime; |
| | | |
| | | |
| | | public String getTime() { |
| | | return time; |
| | | } |
| | | |
| | | public void setTime(String time) { |
| | | this.time = time; |
| | | } |
| | | |
| | | public BigDecimal getOrderAmount() { |
| | | return orderAmount; |
| | | } |
| | | |
| | | public void setOrderAmount(BigDecimal orderAmount) { |
| | | this.orderAmount = orderAmount; |
| | | } |
| | | |
| | | public BigDecimal getCashAmount() { |
| | | return cashAmount; |
| | | } |
| | | |
| | | public void setCashAmount(BigDecimal cashAmount) { |
| | | this.cashAmount = cashAmount; |
| | | } |
| | | |
| | | public BigDecimal getCardAmount() { |
| | | return cardAmount; |
| | | } |
| | | |
| | | public void setCardAmount(BigDecimal cardAmount) { |
| | | this.cardAmount = cardAmount; |
| | | } |
| | | |
| | | public BigDecimal getGoodsAmount() { |
| | | return goodsAmount; |
| | | } |
| | | |
| | | public void setGoodsAmount(BigDecimal goodsAmount) { |
| | | this.goodsAmount = goodsAmount; |
| | | } |
| | | |
| | | public BigDecimal getCardUseAmount() { |
| | | return cardUseAmount; |
| | | } |
| | | |
| | | public void setCardUseAmount(BigDecimal cardUseAmount) { |
| | | this.cardUseAmount = cardUseAmount; |
| | | } |
| | | |
| | | public BigDecimal getHisConsume() { |
| | | return hisConsume; |
| | | } |
| | | |
| | | public void setHisConsume(BigDecimal hisConsume) { |
| | | this.hisConsume = hisConsume; |
| | | } |
| | | |
| | | public BigDecimal getFreeConsume() { |
| | | return freeConsume; |
| | | } |
| | | |
| | | public void setFreeConsume(BigDecimal freeConsume) { |
| | | this.freeConsume = freeConsume; |
| | | } |
| | | |
| | | public BigDecimal getCommission() { |
| | | return commission; |
| | | } |
| | | |
| | | public void setCommission(BigDecimal commission) { |
| | | this.commission = commission; |
| | | } |
| | | |
| | | public BigDecimal getPeopleNum() { |
| | | return peopleNum == null ? peopleNum : peopleNum.setScale(2, BigDecimal.ROUND_DOWN); |
| | | } |
| | | |
| | | public void setPeopleNum(BigDecimal peopleNum) { |
| | | this.peopleNum = peopleNum; |
| | | } |
| | | |
| | | public Integer getProjNum() { |
| | | return projNum; |
| | | } |
| | | |
| | | public void setProjNum(Integer projNum) { |
| | | this.projNum = projNum; |
| | | } |
| | | |
| | | public Integer getServiceTime() { |
| | | return serviceTime; |
| | | } |
| | | |
| | | public void setServiceTime(Integer serviceTime) { |
| | | this.serviceTime = serviceTime; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-28 |
| | | **/ |
| | | @ApiModel(value = "VipCardListVo", description = "会员卡项列表") |
| | | public class VipCardListVo { |
| | | |
| | | @ApiModelProperty(value = "卡项名称") |
| | | private String cardName; |
| | | |
| | | @ApiModelProperty(value = "现有金额") |
| | | private BigDecimal realMoney; |
| | | |
| | | @ApiModelProperty(value = "赠送金额") |
| | | private BigDecimal giftMoney; |
| | | |
| | | @ApiModelProperty(value = "状态 1-有效 2-无效") |
| | | private String status; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "有效时间") |
| | | private Date failTime; |
| | | |
| | | public String getCardName() { |
| | | return cardName; |
| | | } |
| | | |
| | | public void setCardName(String cardName) { |
| | | this.cardName = cardName; |
| | | } |
| | | |
| | | public BigDecimal getRealMoney() { |
| | | return realMoney; |
| | | } |
| | | |
| | | public void setRealMoney(BigDecimal realMoney) { |
| | | this.realMoney = realMoney; |
| | | } |
| | | |
| | | public BigDecimal getGiftMoney() { |
| | | return giftMoney; |
| | | } |
| | | |
| | | public void setGiftMoney(BigDecimal giftMoney) { |
| | | this.giftMoney = giftMoney; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | if (Dictionary.MONEYCARD_STATUS_YX.equals(status)) { |
| | | this.status = "1"; |
| | | } else { |
| | | this.status = "2"; |
| | | } |
| | | } |
| | | |
| | | public Date getFailTime() { |
| | | return failTime; |
| | | } |
| | | |
| | | public void setFailTime(Date failTime) { |
| | | this.failTime = failTime; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.bean.SysVipLabel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-22 |
| | | **/ |
| | | @ApiModel(value = "VipInfoDetailVo", description = "客户详细信息接口返回类") |
| | | public class VipInfoDetailVo { |
| | | |
| | | @ApiModelProperty(value = "头像") |
| | | private String photo; |
| | | |
| | | @ApiModelProperty(value = "资金密码") |
| | | private String password; |
| | | |
| | | @ApiModelProperty(value = "会员ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "会员编号") |
| | | private String vipNo; |
| | | |
| | | @ApiModelProperty(value = "会员姓名") |
| | | private String vipName; |
| | | |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "性别") |
| | | private String sex; |
| | | |
| | | @ApiModelProperty(value = "生日") |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | private Date birthday; |
| | | |
| | | @ApiModelProperty(value = "省") |
| | | private String province; |
| | | |
| | | @ApiModelProperty(value = "市") |
| | | private String city; |
| | | |
| | | @ApiModelProperty(value = "区") |
| | | private String area; |
| | | |
| | | @ApiModelProperty(value = "详细地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "到店途径") |
| | | private String arrivalWay; |
| | | |
| | | @ApiModelProperty(value = "推荐人ID") |
| | | private Long recommendId; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "标签") |
| | | private List<SysVipLabel> labels; |
| | | |
| | | public List<SysVipLabel> getLabels() { |
| | | return labels; |
| | | } |
| | | |
| | | public void setLabels(List<SysVipLabel> labels) { |
| | | this.labels = labels; |
| | | } |
| | | |
| | | public String getVipNo() { |
| | | return vipNo; |
| | | } |
| | | |
| | | public void setVipNo(String vipNo) { |
| | | this.vipNo = vipNo; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public String getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public void setSex(String sex) { |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public Date getBirthday() { |
| | | return birthday; |
| | | } |
| | | |
| | | public void setBirthday(Date birthday) { |
| | | this.birthday = birthday; |
| | | } |
| | | |
| | | public String getProvince() { |
| | | return province; |
| | | } |
| | | |
| | | public void setProvince(String province) { |
| | | this.province = province; |
| | | } |
| | | |
| | | public String getCity() { |
| | | return city; |
| | | } |
| | | |
| | | public void setCity(String city) { |
| | | this.city = city; |
| | | } |
| | | |
| | | public String getArea() { |
| | | return area; |
| | | } |
| | | |
| | | public void setArea(String area) { |
| | | this.area = area; |
| | | } |
| | | |
| | | public String getAddress() { |
| | | return address; |
| | | } |
| | | |
| | | public void setAddress(String address) { |
| | | this.address = address; |
| | | } |
| | | |
| | | public String getArrivalWay() { |
| | | return arrivalWay; |
| | | } |
| | | |
| | | public void setArrivalWay(String arrivalWay) { |
| | | this.arrivalWay = arrivalWay; |
| | | } |
| | | |
| | | public Long getRecommendId() { |
| | | return recommendId; |
| | | } |
| | | |
| | | public void setRecommendId(Long recommendId) { |
| | | this.recommendId = recommendId; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public String getPhoto() { |
| | | return photo; |
| | | } |
| | | |
| | | public void setPhoto(String photo) { |
| | | this.photo = photo; |
| | | } |
| | | |
| | | public String getPassword() { |
| | | return password; |
| | | } |
| | | |
| | | public void setPassword(String password) { |
| | | this.password = password; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import com.matrix.system.hive.bean.SysVipLevel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-22 |
| | | **/ |
| | | @ApiModel(value = "VipInfoListVo", description = "会员列表返回类") |
| | | public class VipInfoListVo { |
| | | |
| | | @ApiModelProperty(value = "会员姓名") |
| | | private String vipName; |
| | | |
| | | @ApiModelProperty(value = "会员编号") |
| | | private String vipNo; |
| | | |
| | | @ApiModelProperty(value = "会员手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "到店次数") |
| | | private Integer arriveCnt; |
| | | |
| | | @ApiModelProperty(value = "头像") |
| | | private String photo; |
| | | |
| | | @ApiModelProperty(value = "会员ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "门店简称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty(value = "会员等级对象") |
| | | private String vipLevel; |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public Integer getArriveCnt() { |
| | | return arriveCnt; |
| | | } |
| | | |
| | | public void setArriveCnt(Integer arriveCnt) { |
| | | this.arriveCnt = arriveCnt; |
| | | } |
| | | |
| | | public String getPhoto() { |
| | | return photo; |
| | | } |
| | | |
| | | public void setPhoto(String photo) { |
| | | this.photo = photo; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | public String getVipLevel() { |
| | | return vipLevel; |
| | | } |
| | | |
| | | public void setVipLevel(String vipLevel) { |
| | | this.vipLevel = vipLevel; |
| | | } |
| | | |
| | | public String getVipNo() { |
| | | return vipNo; |
| | | } |
| | | |
| | | public void setVipNo(String vipNo) { |
| | | this.vipNo = vipNo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-22 |
| | | **/ |
| | | @ApiModel(value = "VipInfoVo", description = "客户信息返回类") |
| | | public class VipInfoVo { |
| | | |
| | | @ApiModelProperty(value = "头像") |
| | | private String photo; |
| | | |
| | | @ApiModelProperty(value = "会员名称") |
| | | private String vipName; |
| | | |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "会员级别") |
| | | private String vipLevel; |
| | | |
| | | @ApiModelProperty(value = "会员编号") |
| | | private String vipNo; |
| | | |
| | | @ApiModelProperty(value = "总余额") |
| | | private BigDecimal totalBalance; |
| | | |
| | | @ApiModelProperty(value = "赠送余额") |
| | | private BigDecimal giftBalance; |
| | | |
| | | @ApiModelProperty(value = "积分") |
| | | private Integer integral; |
| | | |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty(value = "累计消费") |
| | | private BigDecimal totalShopping; |
| | | |
| | | @ApiModelProperty(value = "欠款") |
| | | private BigDecimal arrears; |
| | | |
| | | public BigDecimal getArrears() { |
| | | return arrears; |
| | | } |
| | | |
| | | public void setArrears(BigDecimal arrears) { |
| | | this.arrears = arrears; |
| | | } |
| | | |
| | | public String getPhoto() { |
| | | return photo; |
| | | } |
| | | |
| | | public void setPhoto(String photo) { |
| | | this.photo = photo; |
| | | } |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public String getVipLevel() { |
| | | return vipLevel; |
| | | } |
| | | |
| | | public void setVipLevel(String vipLevel) { |
| | | this.vipLevel = vipLevel; |
| | | } |
| | | |
| | | public String getVipNo() { |
| | | return vipNo; |
| | | } |
| | | |
| | | public void setVipNo(String vipNo) { |
| | | this.vipNo = vipNo; |
| | | } |
| | | |
| | | public BigDecimal getTotalBalance() { |
| | | return totalBalance.setScale(2, BigDecimal.ROUND_DOWN); |
| | | } |
| | | |
| | | public void setTotalBalance(BigDecimal totalBalance) { |
| | | this.totalBalance = totalBalance; |
| | | } |
| | | |
| | | public BigDecimal getGiftBalance() { |
| | | return giftBalance.setScale(2, BigDecimal.ROUND_DOWN); |
| | | } |
| | | |
| | | public void setGiftBalance(BigDecimal giftBalance) { |
| | | this.giftBalance = giftBalance; |
| | | } |
| | | |
| | | public Integer getIntegral() { |
| | | return integral; |
| | | } |
| | | |
| | | public void setIntegral(Integer integral) { |
| | | this.integral = integral; |
| | | } |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | public BigDecimal getTotalShopping() { |
| | | return totalShopping; |
| | | } |
| | | |
| | | public void setTotalShopping(BigDecimal totalShopping) { |
| | | this.totalShopping = totalShopping; |
| | | } |
| | | } |
| | |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.PasswordUtil; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.constance.SystemConstance; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import java.net.URLEncoder; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | import static com.matrix.system.common.constance.AppConstance.SAFEPATH; |
| | | |
| | | /** |
| | | * @author 姜ø友瑶 |
| | |
| | | SysUsers loginUser = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | loginUser.setCreateBy(loginUser.getSuName()); |
| | | sysUsers.setCompanyId(loginUser.getCompanyId()); |
| | | sysUsers.setShopId(loginUser.getShopId()); |
| | | int i = sysUsersService.addAdmin(sysUsers); |
| | | |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.ADD_SUCCES, AppVocabularyCode.ADMIN); |
| | | } else { |
| | | throw new GlobleException(SystemErrorCode.DATA_ADD_FAIL); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增门店管理员 |
| | | */ |
| | | @RemoveRequestToken |
| | | @PostMapping(value = "/addShopAdmin") |
| | | public @ResponseBody |
| | | AjaxResult addShopAdmin(SysUsers sysUsers) { |
| | | |
| | | SysUsers loginUser = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | loginUser.setCreateBy(loginUser.getSuName()); |
| | | sysUsers.setCompanyId(loginUser.getCompanyId()); |
| | | sysUsers.setShopId(loginUser.getShopId()); |
| | | int i = sysUsersService.addAdmin(sysUsers); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.ADD_SUCCES, AppVocabularyCode.ADMIN); |
| | | } else { |
| | | throw new GlobleException(SystemErrorCode.DATA_ADD_FAIL); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改公司管理员 |
| | |
| | | throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/goStaffEditForm") |
| | |
| | | return result; |
| | | } |
| | | |
| | | @RequestMapping(value = "/getUserById") |
| | | public @ResponseBody |
| | | AjaxResult getUserById(Long id) { |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(""); |
| | | SysUsers user = sysUsersService.findById(id); |
| | | result.putInMap("user", user); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 条件查询所有员工,不分页 |
| | |
| | | AjaxResult all() { |
| | | SysUsers sysUsers = new SysUsers(); |
| | | QueryUtil.setQueryLimit(sysUsers); |
| | | sysUsers.setSuValid(AppConstance.RECORD_VALID); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, sysUsersService.findInPage(sysUsers, null)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询历史搜索人数 |
| | | * |
| | | * @return |
| | | * @author luoyuanhong |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | @RequestMapping(value = "/showHistoryUser") |
| | | public @ResponseBody |
| | | AjaxResult showHistoryUser() { |
| | | if (WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER) != null) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, |
| | | (LinkedList<SysVipInfo>) WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER), 0); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, null, 0); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | orderSheet.setHeaders(header); |
| | | SysUsers loginUser = getSessionUser(); |
| | | shopStaffInfo.setShopId(loginUser.getShopId()); |
| | | shopStaffInfo.setSuValid(AppConstance.RECORD_VALID); |
| | | List<SysUsers> dataList = sysUsersService.findInPage(shopStaffInfo, null); |
| | | List<List<Object>> list = new ArrayList<>(); |
| | | if (dataList.size() > 0) { |
| | |
| | | import com.matrix.system.hive.bean.ParameterSettings; |
| | | import com.matrix.system.hive.dao.ParameterSettingsDao; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jetbrains.annotations.NotNull; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.RSAUtils; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.tools.*; |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | | import com.matrix.system.common.authority.strategy.AccountPasswordLogin; |
| | | import com.matrix.system.common.authority.strategy.LoginStrategy; |
| | | import com.matrix.system.common.authority.strategy.ScanQrCodeLogin; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.ProjExceptionDao; |
| | | import com.matrix.system.common.dao.SysCompanyDao; |
| | | import com.matrix.system.common.dto.WebLoginDto; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.statistics.StatisticsBusinessDataJob; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.security.Key; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @description 通用控制器,本action未经session过验证器 |
| | |
| | | */ |
| | | @RequestMapping(value = "/common") |
| | | @Controller |
| | | @CrossOrigin(origins = "*", maxAge = 3600) |
| | | public class CommonAction extends BaseAction { |
| | | |
| | | @Autowired |
| | |
| | | StatisticsBusinessDataJob sjobp; |
| | | @RequestMapping(value = "/job") |
| | | public @ResponseBody String job() { |
| | | sjobp.executeExt2(); |
| | | //sjobp.executeExt2(); |
| | | return "1"; |
| | | } |
| | | |
| | |
| | | |
| | | @Autowired |
| | | SysShopInfoDao sysShopInfoDao; |
| | | |
| | | @Autowired |
| | | SysCompanyDao sysCompanyDao; |
| | | |
| | | /** |
| | | * 页面定向方法,每个权限模块公用一个,每个模块共享一个一级路径,已便于进行权限过滤 |
| | |
| | | * |
| | | * 登录验证 |
| | | * @author:姜友瑶 |
| | | * @param user |
| | | * @return 返回类型 AjaxResult |
| | | * @date 2016年8月30日 |
| | | */ |
| | | @RequestMapping(value = "/dologin") |
| | | public @ResponseBody AjaxResult dologin(SysUsers user) { |
| | | long sqlStart = System.currentTimeMillis(); |
| | | decryptAccountAndPassword(user); |
| | | LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService); |
| | | public @ResponseBody AjaxResult dologin(WebLoginDto webLoginDto) { |
| | | |
| | | user = authorityManager.login(apLogin); |
| | | long sqlStart = System.currentTimeMillis(); |
| | | SysUsers user=null; |
| | | if(WebLoginDto.ACCOUNT_LOGIN.equals(webLoginDto.getLoginType())){ |
| | | user= decryptAccountAndPassword(webLoginDto); |
| | | LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService); |
| | | user = authorityManager.login(apLogin); |
| | | }else { |
| | | ScanQrCodeLogin apLogin = new ScanQrCodeLogin( sysUsersService,webLoginDto.getLoginQrCodeKey()); |
| | | user = authorityManager.login(apLogin); |
| | | } |
| | | |
| | | |
| | | if(user.getShopId()!=null){ |
| | |
| | | AjaxResult result = new AjaxResult(); |
| | | authorityManager.initUserPower(result); |
| | | |
| | | SysCompany sysCompany = sysCompanyDao.selectById(user.getCompanyId()); |
| | | WebUtil.setSessionAttribute(HostInterceptor.ATTR_COMPANY, sysCompany); |
| | | |
| | | result.putInMap("user",user); |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月11日 |
| | | * @param user |
| | | */ |
| | | private void decryptAccountAndPassword(SysUsers user) { |
| | | private SysUsers decryptAccountAndPassword(WebLoginDto webLoginDto) { |
| | | |
| | | String privateKey = WebUtil.getSessionAttribute(MatrixConstance.PRIVATE_KEY); |
| | | if (StringUtils.isBlank(privateKey)) { |
| | | throw new GlobleException(SystemErrorCode.REQUEST_INVALID); |
| | | } |
| | | |
| | | SysUsers user=new SysUsers(); |
| | | try { |
| | | // 账号解密 |
| | | byte[] acccountData = RSAUtils.decryptByPrivateKey(user.getSuAccount(), privateKey); |
| | | byte[] acccountData = RSAUtils.decryptByPrivateKey(webLoginDto.getSuAccount(), privateKey); |
| | | user.setSuAccount(new String(acccountData)); |
| | | // 密码解密 |
| | | byte[] passWordData = RSAUtils.decryptByPrivateKey(user.getSuPassword(), privateKey); |
| | | byte[] passWordData = RSAUtils.decryptByPrivateKey(webLoginDto.getSuPassword(), privateKey); |
| | | user.setSuPassword(new String(passWordData)); |
| | | |
| | | } catch (Exception e) { |
| | | LogUtil.error("用户账号密码解密失败", e); |
| | | throw new GlobleException(SystemErrorCode.LOGIN_FAIL); |
| | | } |
| | | |
| | | return user; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 移动端登录 |
| | | * @param user |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/doHiveMobilelogin") |
| | | public @ResponseBody AjaxResult doHiveMobilelogin(SysUsers user) { |
| | | long sqlStart = System.currentTimeMillis(); |
| | | decryptAccountAndPassword(user); |
| | | LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService); |
| | | user = authorityManager.login(apLogin); |
| | | // 获取该账户的岗位信息,并判断是否为店长 |
| | | if(user.getShopId()!=null){ |
| | | user.setShopName(sysShopInfoDao.selectById(user.getShopId()).getShopName()); |
| | | } |
| | | |
| | | AjaxResult result = new AjaxResult(); |
| | | authorityManager.initUserPower(result); |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | LogUtil.info("#用户登录成功 账号={}#", user.getSuAccount()); |
| | | switch (user.getSuUserType()) { |
| | | // 企业管理员 |
| | | case AppConstance.USER_TYPE_ADMIN: |
| | | result.setPage(HIVE_MOBILE_REDIRECT_INDEX); |
| | | break; |
| | | // 企业用户 |
| | | case AppConstance.USER_TYPE_EMPLOYEE: |
| | | result.setPage(HIVE_MOBILE_REDIRECT_INDEX); |
| | | break; |
| | | default:// 不能识别的用户 |
| | | result.setPage("common/redirect/404"); |
| | | } |
| | | long endStart = System.currentTimeMillis(); |
| | | LogUtil.info("本次登录耗时#{}毫秒", (endStart-sqlStart)+""); |
| | | return result; |
| | | } |
| | | |
| | | @GetMapping(value = "/hiveMobileLoginOut") |
| | | public String hiveMobileLoginOut() { |
| | | authorityManager.getLoginOut(); |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 官网联系我们通知 |
| | | */ |
| | | @RequestMapping(value = "/gwLinkUs") |
| | | public @ResponseBody |
| | | AjaxResult gwLinkUs(@RequestBody Map<String , Object> param) { |
| | | |
| | | String title = "hive新客户在官网提交联系请求"; |
| | | if(Objects.nonNull(param.get("name"))){ |
| | | String content = "hive=>name:" + param.get("name") + " tel:" + param.get("tel") ; |
| | | DingDingRobotUtil.sendLink("https://oapi.dingtalk.com/robot/send?access_token=62bb902f0e3945f0ece31306b99abae043fc69a66da0ef04d89fd20bf58d88d8", content, title, "", "www.baidu.com"); |
| | | |
| | | } |
| | | |
| | | return AjaxResult.buildSuccessInstance("提交成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @RequestMapping(value = "/modifyDataDictionary") |
| | | public @ResponseBody |
| | | AjaxResult modifyDataDictionary(CustomerDataDictionary newDataDictionary) { |
| | | // 自己不能是自己的父节点 |
| | | if (newDataDictionary.getParentId() != null && newDataDictionary.getParentId().equals(newDataDictionary.getId())) { |
| | | throw new GlobleException("父级不能是自己"); |
| | | } |
| | | dataDictionaryDao.updateByModel(newDataDictionary); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.UPDATE_SUCCES, "数据字典"); |
| | | |
| | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "debug模式开启"); |
| | | } |
| | | |
| | | @RequestMapping("/getLocalCache") |
| | | public @ResponseBody AjaxResult getLocalCache(String key) { |
| | | return AjaxResult.buildSuccessInstance(LocalCache.getValues(key)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.system.common.actions; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.tools.FileType; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.common.tools.UploadUtil; |
| | | import org.apache.commons.fileupload.FileUploadException; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | public String doImageUpload(HttpServletResponse response, MultipartHttpServletRequest request) |
| | | throws IOException, FileUploadException, NoSuchAlgorithmException { |
| | | SysUsers user = getSessionUser(); |
| | | Map<String, String> fileMap = UploadUtil.doUpload(request, EXT_LIST, folderType, user.getSuId()); |
| | | |
| | | SysCompany company = WebUtil.getSessionAttribute(HostInterceptor.ATTR_COMPANY); |
| | | Map<String, String> fileMap = UploadUtil.doUpload(request, EXT_LIST, folderType, company.getComId()); |
| | | String callBack = request.getParameter("callBack"); |
| | | String inputId = request.getParameter("inputId"); |
| | | request.setAttribute("callBack", callBack); |
New file |
| | |
| | | package com.matrix.system.common.actions; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import org.apache.commons.fileupload.FileUploadException; |
| | | import org.apache.log4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.FileCopyUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | /** |
| | | * 多文件上传控制器 |
| | | * |
| | | * @author jiangyouyao |
| | | * @email 512061637@qq.com |
| | | * @date 2019年2月25日 |
| | | */ |
| | | @Controller |
| | | @RequestMapping(value = "admin/multipleUploadFile") |
| | | public class MultipleFileUploadAction { |
| | | Logger log = Logger.getLogger(MultipleFileUploadAction.class); |
| | | |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | | @Value("${static_resource_url}") |
| | | private String nginxUrl; |
| | | |
| | | /** |
| | | * 最大值 |
| | | */ |
| | | private Long maxSize = 1024*1024*100L; |
| | | |
| | | /** |
| | | * 多文件上传方法 |
| | | * |
| | | * @author jiangyouyao |
| | | * @email 512061637@qq.com |
| | | * @date 2019年2月25日 |
| | | * @param response |
| | | * @param request |
| | | * @return |
| | | * @throws IOException |
| | | * @throws FileUploadException |
| | | */ |
| | | @RequestMapping(value = "/doUpload") |
| | | public @ResponseBody JSONObject doFileUpload(HttpServletResponse response, MultipartHttpServletRequest request, Integer data) |
| | | throws IOException, FileUploadException { |
| | | // 文件保存目录路径 |
| | | String savePath = fileStoragePath; |
| | | // 文件保存目录URL |
| | | String saveUrl = nginxUrl; |
| | | // String msgPag = "common/fileUploadResult"; |
| | | JSONObject object = new JSONObject(); |
| | | response.setContentType("text/html; charset=UTF-8"); |
| | | request.setCharacterEncoding("UTF-8"); |
| | | |
| | | // 保存和访问路径检查 |
| | | if (StringUtils.isBlank(saveUrl) || StringUtils.isBlank(savePath)) { |
| | | object.put("status", "err"); |
| | | object.put("msg", "文件上传失败错误代码:001"); |
| | | return object; |
| | | } |
| | | // 检查目录 |
| | | File uploadDir = new File(savePath); |
| | | if (!uploadDir.isDirectory()) { |
| | | uploadDir.mkdir(); |
| | | } |
| | | // 检查目录写权限 |
| | | // if (!uploadDir.canWrite()) { |
| | | // object.put("status", "err"); |
| | | // object.put("msg", "上传目录没有写权限"); |
| | | // return object; |
| | | // } |
| | | |
| | | Map<String, MultipartFile> fileMaps = request.getFileMap(); |
| | | for (String key : fileMaps.keySet()) { |
| | | MultipartFile file = fileMaps.get(key); |
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); |
| | | String ymd = sdf.format(new Date()); |
| | | savePath += ymd + "/"; |
| | | saveUrl += ymd + "/"; |
| | | File dirFile = new File(savePath); |
| | | if (!dirFile.exists()) { |
| | | dirFile.mkdirs(); |
| | | } |
| | | log.info("上传文件名:" + file.getOriginalFilename()); |
| | | log.info("上传文件大小:" + file.getBytes().length); |
| | | log.info("上传文件大小限制:" + maxSize); |
| | | log.info("上传文件大小是否超过限制:" + (file.getBytes().length > maxSize)); |
| | | if (file.getBytes().length > maxSize) { |
| | | object.put("status", "err"); |
| | | object.put("msg", "上传文件大小超过限制"); |
| | | return object; |
| | | } |
| | | String fileName = file.getOriginalFilename(); |
| | | String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase(); |
| | | |
| | | fileName = fileName.replace("." + fileExt, ""); |
| | | fileName = getSensitive(fileName); |
| | | String newFileName = UUIDUtil.getRandomID() + UUIDUtil.getRandomID() + "." + fileExt; |
| | | File uploadedFile = new File(savePath, newFileName); |
| | | try { |
| | | FileCopyUtils.copy(file.getBytes(), uploadedFile); |
| | | } catch (Exception e) { |
| | | object.put("status", "err"); |
| | | object.put("msg", "上传文件失败 "+e.getMessage()); |
| | | return object; |
| | | } |
| | | log.info("saveUrl:" + saveUrl); |
| | | String visitPath = saveUrl + newFileName; |
| | | log.info("上传一个文件:" + newFileName); |
| | | log.info("访问路径:" + visitPath); |
| | | // 获取回调函数 |
| | | /* |
| | | * String callBack = request.getParameter("callBack"); String inputId = |
| | | * request.getParameter("inputId"); request.setAttribute("status", "200"); |
| | | * request.setAttribute("callBack", callBack); request.setAttribute("inputId", |
| | | * inputId); request.setAttribute("url", visitPath); |
| | | */ |
| | | object.put("path", visitPath); |
| | | object.put("fileName", fileName); |
| | | object.put("status", 200); |
| | | if (data != null) { |
| | | object.put("index", data); |
| | | } |
| | | } |
| | | return object; |
| | | } |
| | | |
| | | /** |
| | | * 检查文件名,过滤特殊字符 |
| | | * |
| | | * @author jiangyouyao |
| | | * @email 512061637@qq.com |
| | | * @date 2019年2月25日 |
| | | * @param globWords |
| | | * @return |
| | | */ |
| | | public String getSensitive(String globWords) { |
| | | |
| | | String sensitive = ""; |
| | | Pattern pattern = Pattern.compile(AppConstance.SPECIAL_CHARACTERS); |
| | | Matcher matcher = pattern.matcher(globWords); |
| | | while (matcher.find()) { |
| | | sensitive += matcher.group(); |
| | | } |
| | | /* |
| | | * if(sensitive=="" || sensitive.length()<3 ){ |
| | | * sensitive=StringUtils.getRandomString(8); } |
| | | */ |
| | | return sensitive; |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.common.actions; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.ProjException; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.ProjExceptionDao; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author 姜友瑶 |
| | |
| | | ProjExceptionDao projExceptionDao; |
| | | |
| | | @RequestMapping(value = "/showException") |
| | | public @ResponseBody |
| | | AjaxResult showException(Long id) { |
| | | public |
| | | ModelAndView showException(Long id) { |
| | | ProjException projException = projExceptionDao.selectById(id); |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(projException)); |
| | | ModelAndView mv = new ModelAndView("common/showprojException"); |
| | | mv.addObject("obj", projException); |
| | | return mv; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/projException/del") |
| | | public @ResponseBody |
| | | AjaxResult del(@RequestBody ProjException projException) { |
| | |
| | | |
| | | import com.matrix.core.anotations.RemoveRequestToken; |
| | | import com.matrix.core.anotations.SaveRequestToken; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.constance.SystemMessageCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.InternationaUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.constance.AppVocabularyCode; |
| | | import com.matrix.system.common.init.InitWebContainer; |
| | | import com.matrix.system.common.service.SysCompanyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | private SysCompanyService sysCompanyService; |
| | | |
| | | public static final String BEV = "SYSCOMPANY_BEV"; |
| | | |
| | | |
| | | @Autowired |
| | | InitWebContainer initWebContainer; |
| | | |
| | | /** |
| | | * 列表显示 |
| | |
| | | public @ResponseBody |
| | | AjaxResult addCompany(SysCompany sysCompany) { |
| | | int i = sysCompanyService.add(sysCompany); |
| | | initWebContainer.initParams(); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("创建成功"); |
| | | } else { |
| | |
| | | AjaxResult modifyCompany(SysCompany sysCompany) { |
| | | AjaxResult result = modify(sysCompanyService, WebUtil.getSessionAttribute(BEV), sysCompany, |
| | | AppVocabularyCode.COMPANY); |
| | | initWebContainer.initParams(); |
| | | WebUtil.removeSessionAttribute(BEV); |
| | | return result; |
| | | } |
| | |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | | import com.matrix.system.common.bean.SysFnBtnRel; |
| | | import com.matrix.system.common.bean.SysFunction; |
| | | import com.matrix.system.common.bean.SysRole; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppVocabularyCode; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.service.SysFunctionService; |
| | | import com.matrix.system.common.service.SysRoleService; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | private SysFunctionService sysFunctionService; |
| | | |
| | | public static final String BEV = "SYSROLE_BEV"; |
| | | |
| | | /** |
| | | * 列表显示 |
| | | * |
| | |
| | | } |
| | | AjaxResult result = modify(sysRoleService, WebUtil.getSessionAttribute(BEV), sysRole, AppVocabularyCode.ROLE); |
| | | WebUtil.removeSessionAttribute(BEV); |
| | | LocalCache.batchRemove(DefaultAuthorityManager.USER_POWER_REDISKEY+"*"); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 进入修改界面 |
| | | * |
New file |
| | |
| | | package com.matrix.system.common.actions; |
| | | |
| | | import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.web.BaseAction; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | /** |
| | | * 测试一下 |
| | | */ |
| | | @RequestMapping(value = "/testb") |
| | | @Controller |
| | | public class TestActionBB extends BaseAction { |
| | | |
| | | @Autowired |
| | | WeixinServiceUtil weixinServiceUtil; |
| | | |
| | | |
| | | @GetMapping(value = "/testPay/{no}") |
| | | @ResponseBody |
| | | public AjaxResult hiveMobileLoginOut(@PathVariable String no) { |
| | | weixinServiceUtil.comPay("提现", no,1,"oJkRK4yelehsY4S7I6Ee1ydWtQMI",36L); |
| | | return AjaxResult.buildSuccessInstance(""); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.system.common.authority; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.authority.strategy.LoginStrategy; |
| | |
| | | import com.matrix.system.common.bean.SysFunction; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.service.SysFunctionService; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import java.util.*; |
| | | import java.util.Map.Entry; |
| | | import java.util.logging.Logger; |
| | | |
| | | /** |
| | | * DefaultAuthorityManager 实现了权限控制接口 |
| | |
| | | |
| | | private static final int DEFAULT_2 = 2; |
| | | |
| | | public static final String USER_POWER_REDISKEY = "USER_POWER_"; |
| | | public static final String USER_POWER_REDISKEY_PC = "USER_POWER_PC"; |
| | | |
| | | @Autowired |
| | | SysFunctionService sysFunctionService; |
| | | |
| | | public static final String USERFUNCTION = "userFunction"; |
| | | public static final String MENUSFUNCTION = "menusFunction"; |
| | | /** 用户所有路径权限的记录 **/ |
| | | /** |
| | | * 用户所有路径权限的记录 |
| | | **/ |
| | | public static final String USER_URL_MAPPING = "userUrlMapping"; |
| | | |
| | | |
| | | private DefaultAuthorityManager() { |
| | | } |
| | |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | Map<String, SysFunction> userFunction = WebUtil.getSessionAttribute(USERFUNCTION); |
| | | |
| | | |
| | | // 企业管理员不校验按钮权限 |
| | | if (AppConstance.USER_TYPE_DEVELOPER.equals(user.getSuUserType()) |
| | | || AppConstance.USER_TYPE_SUPER.equals(user.getSuUserType()) |
| | | || AppConstance.USER_TYPE_ADMIN.equals(user.getSuUserType())) { |
| | | return true; |
| | | } |
| | | String[] strs = matchStr.split("-"); |
| | | if (strs.length != DEFAULT_2) { |
| | | throw new IllegalArgumentException("权限matchStr格式错误,需要fnCode:btnValue"); |
| | | } |
| | | |
| | | SysFunction fn = userFunction.get(strs[0].trim()); |
| | | // 功能是否存在 |
| | | if (fn == null) { |
| | | if (userFunction == null) { |
| | | return false; |
| | | } else { |
| | | return StringUtils.isContentSet(strs[1].trim(), fn.getRpfBns()); |
| | | |
| | | String[] strs = matchStr.split("-"); |
| | | if (strs.length != DEFAULT_2) { |
| | | throw new IllegalArgumentException("权限matchStr格式错误,需要fnCode:btnValue"); |
| | | } |
| | | |
| | | SysFunction fn = userFunction.get(strs[0].trim()); |
| | | // 功能是否存在 |
| | | if (fn == null) { |
| | | return false; |
| | | } else { |
| | | return StringUtils.isContentSet(strs[1].trim(), fn.getRpfBns()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 判断用户是否具有功能权限 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | return true; |
| | | } |
| | | Map<String, SysFunction> userFunction = WebUtil.getSessionAttribute(USERFUNCTION); |
| | | SysFunction fn = userFunction.get(fnCode); |
| | | return fn == null ? false : true; |
| | | if (userFunction == null) { |
| | | return false; |
| | | } else { |
| | | SysFunction fn = userFunction.get(fnCode); |
| | | return fn == null ? false : true; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 初始化用户权限 |
| | | * |
| | | * @param result |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | * @param result |
| | | */ |
| | | public void initUserPower(AjaxResult result) { |
| | | |
| | |
| | | // 用户的所有功能权限用id记录,方便后面查询菜单树形结构 |
| | | Map<String, SysFunction> menuFunctionMap = new TreeMap<>(); |
| | | |
| | | // 获取用户所有权限 |
| | | getUserFunction(userFunction, menuFunctionMap, userUrlMapping); |
| | | SysUsers sysUser = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | // 组装菜单 |
| | | assembleMenu(menuFunction, menuFunctionMap); |
| | | String redisKey = USER_POWER_REDISKEY_PC + SecureUtil.md5(sysUser.getSuId() + ""); |
| | | Map<String, Object> cachePowerMap = LocalCache.get(redisKey); |
| | | |
| | | if (Objects.nonNull(cachePowerMap)) { |
| | | |
| | | userFunction = (Map<String, SysFunction>) cachePowerMap.get(USERFUNCTION); |
| | | |
| | | menuFunction = (List<SysFunction>) cachePowerMap.get(MENUSFUNCTION); |
| | | |
| | | userUrlMapping = (List<String>) cachePowerMap.get(USER_URL_MAPPING); |
| | | |
| | | } else { |
| | | // 获取用户所有权限 |
| | | getUserFunction(userFunction, menuFunctionMap, userUrlMapping); |
| | | |
| | | // 组装菜单 |
| | | assembleMenu(menuFunction, menuFunctionMap); |
| | | |
| | | Map<String, Object> powerMap = new HashMap<>(); |
| | | powerMap.put(USERFUNCTION, userFunction); |
| | | powerMap.put(MENUSFUNCTION, menuFunction); |
| | | powerMap.put(USER_URL_MAPPING, userUrlMapping); |
| | | //权限信息加入缓存中 |
| | | LocalCache.save(redisKey,powerMap); |
| | | } |
| | | |
| | | |
| | | // 把用户菜单和用户的功能都存在session中。 |
| | | WebUtil.setSessionAttribute(USERFUNCTION, userFunction); |
| | |
| | | /** |
| | | * 获取用的功能,包括菜单功能和非菜单功能 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | * @param userFunctionMap |
| | | * @param menuFunctionMap |
| | | * @param userUrlMapping |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | */ |
| | | private void getUserFunction(Map<String, SysFunction> userFunctionMap, Map<String, SysFunction> menuFunctionMap, |
| | | List<String> userUrlMapping) { |
| | |
| | | |
| | | userFunctionMap.put(sysFunction.getFnCode(), sysFunction); |
| | | // 注册访问路径 |
| | | registerUrlMapping(userUrlMapping, sysFunction,true); |
| | | registerUrlMapping(userUrlMapping, sysFunction, true); |
| | | |
| | | // 如果是菜单功能单独记录 |
| | | if (AppConstance.IS_Y.equals(sysFunction.getFnShowMenu())) { |
| | |
| | | List<SysFunction> userFunctionList = sysFunctionService.findFunctionByRoleIds(sysUser.getRoleIds()); |
| | | for (SysFunction sysFunction : userFunctionList) { |
| | | // TODO注册访问路径 |
| | | registerUrlMapping(userUrlMapping, sysFunction,false); |
| | | registerUrlMapping(userUrlMapping, sysFunction, false); |
| | | |
| | | |
| | | if (userFunctionMap.containsKey(sysFunction.getFnCode())) { |
| | |
| | | /** |
| | | * 注册功能和按钮的访问路径 |
| | | * |
| | | * @param userUrlMapping |
| | | * @param sysFunction |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月8日 |
| | | * @param userUrlMapping |
| | | * @param sysFunction |
| | | */ |
| | | private void registerUrlMapping(List<String> userUrlMapping, SysFunction sysFunction, boolean isAdmin) { |
| | | String path = sysFunction.getFnPath(); |
| | |
| | | if (CollectionUtils.isNotEmpty(btnRels)) { |
| | | for (SysFnBtnRel sysFnBtnRel : btnRels) { |
| | | //公司管理员可以添加所有按钮权限否则只能添加员工自己所有拥有的权限 |
| | | if(isAdmin ||StringUtils.isContentSet(sysFnBtnRel.getBtnValue(),sysFunction.getRpfBns())){ |
| | | if (isAdmin || StringUtils.isContentSet(sysFnBtnRel.getBtnValue(), sysFunction.getRpfBns())) { |
| | | String btnPath = sysFnBtnRel.getFbPath(); |
| | | if (StringUtils.isNotBlank(btnPath) && !userUrlMapping.contains(btnPath)) { |
| | | userUrlMapping.add(btnPath); |
| | |
| | | /** |
| | | * 把菜单组装成树形结构 |
| | | * |
| | | * @param menuFunction |
| | | * @param menuFunctionMap |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | * @param menuFunction |
| | | * @param menuFunctionMap |
| | | */ |
| | | private void assembleMenu(List<SysFunction> menuFunction, Map<String, SysFunction> menuFunctionMap) { |
| | | // 将map.entrySet()转换成list,并按照功能的FnSequence倒序 |
| | |
| | | } else { |
| | | // 非一级节点找到父节点后存入 |
| | | SysFunction parentFn = menuFunctionMap.get(String.valueOf(function.getFnParentId())); |
| | | if(parentFn!=null){ |
| | | if (parentFn != null) { |
| | | List<SysFunction> childs = parentFn.getChilds(); |
| | | if (childs == null) { |
| | | parentFn.setChilds(new ArrayList<SysFunction>()); |
New file |
| | |
| | | package com.matrix.system.common.authority.strategy; |
| | | |
| | | import com.matrix.component.websoket.WebSoketScanQrCodeLoginObserver; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUserLoginRecord; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.constance.AppMessageCode; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 账号密码登录策略 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月9日 |
| | | */ |
| | | public class ScanQrCodeLogin implements LoginStrategy { |
| | | |
| | | private SysUsersService sysUsersService; |
| | | |
| | | |
| | | private String loginQrCodeKey; |
| | | |
| | | public ScanQrCodeLogin(SysUsersService sysUsersService, String loginQrCodeKey) { |
| | | |
| | | this.sysUsersService = sysUsersService; |
| | | this.loginQrCodeKey = loginQrCodeKey; |
| | | } |
| | | |
| | | @Override |
| | | public Object login() { |
| | | |
| | | Long loginUserId = WebSoketScanQrCodeLoginObserver.getScanCashValue(loginQrCodeKey); |
| | | |
| | | if (loginUserId != null) { |
| | | SysUsers loginUser = sysUsersService.findById(loginUserId); |
| | | if (loginUser != null) { |
| | | addErrorLoginRecord(loginUser,AppConstance.LOGIN_SUCCESS); |
| | | return loginUser; |
| | | } else { |
| | | LogUtil.error("登录失败"); |
| | | throw new GlobleException(AppMessageCode.User.ACCOUNT_NOT_EXIST); |
| | | } |
| | | } |
| | | |
| | | LogUtil.error("登录失败"); |
| | | throw new GlobleException(AppMessageCode.User.ACCOUNT_NOT_EXIST); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加登录记录 |
| | | * |
| | | * @param loginUser |
| | | * @param loginResult |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月12日 |
| | | */ |
| | | private void addErrorLoginRecord(SysUsers loginUser, int loginResult) { |
| | | |
| | | if (AppConstance.LOGIN_SUCCESS.equals(loginResult)) { |
| | | sysUsersService.cleanUserTodayErrorLoginTime(loginUser.getSuAccount()); |
| | | } |
| | | SysUserLoginRecord loginRecord = new SysUserLoginRecord(); |
| | | loginRecord.setCreateBy(MatrixConstance.SYSTEM_USER); |
| | | loginRecord.setUpdateBy(MatrixConstance.SYSTEM_USER); |
| | | loginRecord.setLrLoginTime(new Date()); |
| | | loginRecord.setLrId(null); |
| | | loginRecord.setUserAccount(loginUser.getSuAccount()); |
| | | loginRecord.setLrResult(loginResult); |
| | | loginRecord.setLrIp(WebUtil.getCustomerIp()); |
| | | loginRecord.setLrValid(AppConstance.RECORD_VALID); |
| | | sysUsersService.addUserLoginRecord(loginRecord); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | private String comPlats; |
| | | |
| | | |
| | | |
| | | private String comCode; |
| | | |
| | | public String getComCode() { |
| | | return comCode; |
| | | } |
| | | |
| | | public void setComCode(String comCode) { |
| | | this.comCode = comCode; |
| | | } |
| | | |
| | | public Long getComId() { |
| | | return comId; |
| | |
| | | public void setComPlats(String comPlats) { |
| | | this.comPlats=comPlats; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String toString() { |
| | |
| | | package com.matrix.system.common.bean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.pojo.EntityDTO; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 功能按钮关系表 |
| | |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月3日 |
| | | */ |
| | | public class SysFnBtnRel extends EntityDTO { |
| | | public class SysFnBtnRel { |
| | | |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | private String createBy; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone="GMT+8") |
| | | private Date createTime; |
| | | |
| | | private String updateBy; |
| | | |
| | | private Date updateTime; |
| | | |
| | | |
| | | /** 主键:这个关系表物理主键在修改比较中不参与比较 **/ |
| | | @Extend |
| | | private Long fbId; |
| | |
| | | public void setBtnKey(String btnKey) { |
| | | this.btnKey = btnKey; |
| | | } |
| | | |
| | | public String getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public void setCreateBy(String createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public void setUpdateBy(String updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.common.bean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.pojo.EntityDTO; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月3日 |
| | | */ |
| | | public class SysFunction extends EntityDTO { |
| | | public class SysFunction { |
| | | |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String createBy; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone="GMT+8") |
| | | private Date createTime; |
| | | |
| | | private String updateBy; |
| | | |
| | | private Date updateTime; |
| | | |
| | | private Long fnId; |
| | | |
| | |
| | | this.fnCode = fnCode; |
| | | } |
| | | |
| | | public String getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public void setCreateBy(String createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public void setUpdateBy(String updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public boolean isHasThisFn() { |
| | | return hasThisFn; |
| | | } |
| | | } |
| | |
| | | private String plates; |
| | | |
| | | /** |
| | | * 所有客户权限 |
| | | */ |
| | | private String customer; |
| | | |
| | | /** |
| | | * 功能集合 |
| | | */ |
| | | @Extend |
| | |
| | | @Extend |
| | | private String menuKeys; |
| | | |
| | | public String getCustomer() { |
| | | return customer; |
| | | } |
| | | |
| | | public void setCustomer(String customer) { |
| | | this.customer = customer; |
| | | } |
| | | |
| | | public Integer getIsDefault() { |
| | | return isDefault; |
| | | } |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 有效*/ |
| | | @Extend |
| | | public static final String VALID_Y="Y"; |
| | | |
| | | /** 无效*/ |
| | | @Extend |
| | | public static final String VALID_N="N"; |
| | | |
| | | private Long suId; |
| | |
| | | private String shopName; |
| | | |
| | | |
| | | private String allCustomer; |
| | | |
| | | private String roleName; |
| | | |
| | |
| | | private String departName; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 入职时间区域查询 |
| | | **/ |
| | |
| | | @Extend |
| | | private SysCompany company; |
| | | |
| | | private String openIds; |
| | | |
| | | public String getOpenIds() { |
| | | return openIds; |
| | | } |
| | | |
| | | public void setOpenIds(String openIds) { |
| | | this.openIds = openIds; |
| | | } |
| | | |
| | | public String getAllCustomer() { |
| | | return allCustomer; |
| | | } |
| | | |
| | | public void setAllCustomer(String allCustomer) { |
| | | this.allCustomer = allCustomer; |
| | | } |
| | | |
| | | public Long getSuId() { |
| | | return suId; |
| | | } |
| | |
| | | public static final String WX_ORDER_FLAG = "微商城同步订单"; |
| | | public static final String ZONGDIAN = "总店"; |
| | | |
| | | |
| | | |
| | | private AppConstance() { |
| | | } |
| | | |
| | |
| | | |
| | | // =====================================订单包裹相关 |
| | | |
| | | /** |
| | | * 省内包裹 |
| | | */ |
| | | public static final String IN_PROVINCE_PACKAGE = "IN_PROVINCE_PACKAGE"; |
| | | |
| | | /** |
| | | * 外省包裹 |
| | | */ |
| | | public static final String OUT_PROVINCE_PACKAGE = "OUT_PROVINCE_PACKAGE"; |
| | | |
| | | /** |
| | | * 省内免邮费包裹 |
| | | */ |
| | | public static final String PROVINCE_OVER_FREE_PACKAGE = "PROVINCE_OVER_FREE_PACKAGE"; |
| | | |
| | | // =====================================订单短信提醒相关 |
| | | /** |
| | | * 短信提醒 |
| | | */ |
| | | public static final String MSG_ALERT = "MSG_ALERT"; |
| | | |
| | | /** |
| | | * 短信提醒号码(多个以",分割") |
| | | */ |
| | | public static final String MSG_ALERT_MOBILE = "MSG_ALERT_MOBILE"; |
| | | |
| | | /** |
| | | * 短信提醒内容 |
| | | */ |
| | | public static final String MSG_ALERT_CONTENT = "MSG_ALERT_CONTENT"; |
| | | |
| | | /** |
| | | * 商户余额不足短信提醒内容 |
| | | */ |
| | | public static final String MSG_ALERT_NSF = "MSG_ALERT_NSF"; |
| | | |
| | | /** |
| | | * 待开票 |
| | |
| | | public static final String REFUND_FAIL_NOTENOUGH = "NOTENOUGH"; |
| | | |
| | | |
| | | // =====================================分销相关 |
| | | /** |
| | | * 成为分销商最低额度(查询数据字典时使用) |
| | | * 运费 |
| | | */ |
| | | public static final String BECOMING_DISTRIBUTOR_CONDITION = "BECOMING_DISTRIBUTOR_CONDITION"; |
| | | |
| | | public static final String PACKAGE_PRICE = "PACKAGE_PRICE"; |
| | | /** |
| | | * 用户等级-分销商 |
| | | * 免免邮金额 |
| | | */ |
| | | public static final Integer USER_VIP_DISTRIBUTOR = 1; |
| | | |
| | | /** |
| | | * 积分业务类型-获得 |
| | | */ |
| | | public static final Integer SCORE_BUSINESS_TYPE_GET = 1; |
| | | |
| | | /** |
| | | * 积分业务类型-兑换 |
| | | */ |
| | | public static final Integer SCORE_BUSINESS_TYPE_EXCHANGE = 2; |
| | | |
| | | /** |
| | | * 免费配送距离 |
| | | */ |
| | | public static final String DELIVERY_DISTANCE = "delivery_distance"; |
| | | /** |
| | | * 支持学校列表 |
| | | */ |
| | | public static final String SCHOOL = "SCHOOL"; |
| | | public static final String FREE_PACKAGE_PRICE = "FREE_PACKAGE_PRICE"; |
| | | |
| | | |
| | | /** |
| | | * 省运费关系 |
| | | * 小程序APPID |
| | | */ |
| | | public static final String IN_PROVINCE_PACKAGE_PRICE = "IN_PROVINCE_PACKAGE_PRICE"; |
| | | public static final String FIRST_OUT_PROVINCE_PACKAGE_PRICE = "FIRST_OUT_PROVINCE_PACKAGE_PRICE"; |
| | | public static final String SECOND_OUT_PROVINCE_PACKAGE_PRICE = "SECOND_OUT_PROVINCE_PACKAGE_PRICE"; |
| | | |
| | | public static final String IN_PROVINCE_PACKAGE_LIST = "IN_PROVINCE_PACKAGE_LIST"; |
| | | public static final String FIRST_PROVINCE_PACKAGE_LIST = "FIRST_PROVINCE_PACKAGE_LIST"; |
| | | public static final String SECOND_PROVINCE_PACKAGE_LIST = "SECOND_PROVINCE_PACKAGE_LIST"; |
| | | public static final String MINIPROGRAM_APPID = "miniprogramAppid"; |
| | | /** |
| | | * 起送费 |
| | | * 小程序Secret |
| | | */ |
| | | public static final String QSFY = "QSFY"; |
| | | public static final String MINIPROGRAM_SECRET = "miniprogramSecret"; |
| | | /** |
| | | * 公众号APPID |
| | | */ |
| | | public static final String GZH_APPID = "gzhAppId"; |
| | | |
| | | /** |
| | | * 微信商户号 |
| | | */ |
| | | public static final String WECHARPAY_MCHID = "wecharPayMchId"; |
| | | /** |
| | | * 支付秘钥 |
| | | */ |
| | | public static final String WECHARPAY_SECRET = "wecharPaySecret"; |
| | | |
| | | /** |
| | | * 支付通知地址 |
| | | */ |
| | | public static final String WECHARPAY_NOTIFYURL = "wecharPaynotifyUrl"; |
| | | /** |
| | | * 充值支付通知地址 |
| | | */ |
| | | public static final String WECHARPAY_RECHARGE_NOTIFYURL = "wecharpayRechargeNotifyurl"; |
| | | |
| | | |
| | | /** |
| | | * 支付证书地址 |
| | | */ |
| | | public static final String WECHARPAY_CERTLOCAL_PATH = "certLocalPath"; |
| | | |
| | | /** |
| | | * APP管理模块Banner |
| | | */ |
| | | public static final String APP_BANNER_GL = "APP_BANNER_GL"; |
| | | |
| | | |
| | | /** |
| | | * 是否管理产品库存 |
| | | */ |
| | | public static final String WAREHOUSE_MANAGE_STOCK = "WAREHOUSE_MANAGE_STOCK"; |
| | | |
| | | |
| | | /** |
| | | * 家居产品销售是否生成消耗业绩 |
| | | */ |
| | | public static final String SHOP_MANAGE_JJCPAS_CONSUME = "shopManageJjcpasConsume"; |
| | | |
| | | /** |
| | | * 门店是否只能取消待付款订单,服务单 |
| | | */ |
| | | public static final String SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER = "shopManageAbleCancelDfkOrder"; |
| | | /** |
| | | * 服务记录跟进模板 |
| | | */ |
| | | public static final String SERVICE_FLOW_TEMPLATE = "SERVICE_FLOW_TEMPLATE"; |
| | | /** |
| | | * 开启短信提醒 |
| | | */ |
| | | public static final String OPEN_SMS_NOTICE = "OPEN_SMS_NOTICE"; |
| | | |
| | | /** |
| | | * 服务单自动配料 |
| | | */ |
| | | public static final String OPEN_SERVICE_ORDER_AUTO_BATCHING = "OPEN_SERVICE_ORDER_AUTO_BATCHING"; |
| | | |
| | | /** |
| | | * 赠送金额购买产品算赠送购买 |
| | | */ |
| | | public static final String SHOP_MANAGE_GIFTISFREE = "shopManageGiftisfree"; |
| | | |
| | | /** |
| | | * 钉钉通知token |
| | | */ |
| | | public static final String WX_ORDER_NOTICE_DINGDING_TOKEN = "wxOrderNoticeDingdingToken"; |
| | | |
| | | /** |
| | | * 管理端小程序appid |
| | | */ |
| | | public static final String MINI_PROGRAM_MANAGER_APP_ID = "xcx_manager_appid"; |
| | | /** |
| | | * 管理端小程序secret |
| | | */ |
| | | public static final String MINI_PROGRAM_MANAGER_SECRET = "xcx_manager_secret"; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.system.common.dao; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * This field was generated by Zking.software.Codegen. |
| | | * @date 2016-11-28 16:55 |
| | | */ |
| | | |
| | | |
| | | public interface BusParameterSettingsDao { |
| | | |
| | | public int insert(BusParameterSettings busParameterSettings); |
| | | |
| | | public int batchInsert(@Param("list") List<BusParameterSettings> busParameterSettingsList); |
| | | |
| | | public int updateByMap(Map<String, Object> modifyMap); |
| | | |
| | | public int updateByModel(BusParameterSettings busParameterSettings); |
| | | |
| | | public int deleteByIds(@Param("list") List<Long> list); |
| | | |
| | | public int deleteById(Long paramId); |
| | | |
| | | public int deleteByModel(@Param("record") BusParameterSettings busParameterSettings); |
| | | |
| | | public List<BusParameterSettings> selectInPage(@Param("record") BusParameterSettings busParameterSettings, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | public List<BusParameterSettings> selectByModel(@Param("record") BusParameterSettings busParameterSettings); |
| | | |
| | | public int selectTotalRecord(@Param("record") BusParameterSettings busParameterSettings); |
| | | |
| | | public BusParameterSettings selectById(Long paramId); |
| | | |
| | | public BusParameterSettings selectForUpdate(Long paramId); |
| | | |
| | | List<BusParameterSettings> selectByCodes(@Param("list")List<String> codeList, @Param("companyId")Long companyId,@Param("shopId")Long shopId); |
| | | |
| | | |
| | | |
| | | BusParameterSettings selectByCode(@Param("code")String code, @Param("companyId")Long companyId,@Param("shopId")Long shopId); |
| | | |
| | | BusParameterSettings selectCompanyParamByCode(@Param("code")String code, @Param("companyId")Long companyId); |
| | | |
| | | int updateParams(@Param("list")List<BusParameterSettings> parameterSettings, @Param("companyId")Long companyId); |
| | | package com.matrix.system.common.dao;
|
| | |
|
| | | import com.matrix.core.pojo.PaginationVO;
|
| | | import com.matrix.system.common.bean.BusParameterSettings;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | |
|
| | | /**
|
| | | * This field was generated by Zking.software.Codegen.
|
| | | * @date 2016-11-28 16:55
|
| | | */
|
| | | |
| | |
|
| | | public interface BusParameterSettingsDao {
|
| | |
|
| | | public int insert(BusParameterSettings busParameterSettings);
|
| | | |
| | | public int batchInsert(@Param("list") List<BusParameterSettings> busParameterSettingsList);
|
| | | |
| | | public int updateByMap(Map<String, Object> modifyMap);
|
| | | |
| | | public int updateByModel(BusParameterSettings busParameterSettings);
|
| | | |
| | | public int deleteByIds(@Param("list") List<Long> list);
|
| | | |
| | | public int deleteById(Long paramId);
|
| | |
|
| | | public int deleteByModel(@Param("record") BusParameterSettings busParameterSettings);
|
| | | |
| | | public List<BusParameterSettings> selectInPage(@Param("record") BusParameterSettings busParameterSettings, @Param("pageVo") PaginationVO pageVo);
|
| | |
|
| | | public List<BusParameterSettings> selectByModel(@Param("record") BusParameterSettings busParameterSettings);
|
| | | |
| | | public int selectTotalRecord(@Param("record") BusParameterSettings busParameterSettings);
|
| | | |
| | | public BusParameterSettings selectById(Long paramId);
|
| | | |
| | | public BusParameterSettings selectForUpdate(Long paramId);
|
| | |
|
| | | List<BusParameterSettings> selectByCodes(@Param("list")List<String> codeList, @Param("companyId")Long companyId,@Param("shopId")Long shopId);
|
| | |
|
| | | List<BusParameterSettings> selectByCodesAndCompanyId(@Param("list")List<String> codeList, @Param("companyId")Long companyId);
|
| | |
|
| | | BusParameterSettings selectByCode(@Param("code")String code, @Param("companyId")Long companyId,@Param("shopId")Long shopId);
|
| | |
|
| | | BusParameterSettings selectCompanyParamByCode(@Param("code")String code, @Param("companyId")Long companyId);
|
| | |
|
| | | int updateParams(@Param("list")List<BusParameterSettings> parameterSettings, @Param("companyId")Long companyId);
|
| | | } |
| | |
| | | |
| | | public SysCompany selectForUpdate(Long comId); |
| | | |
| | | List<SysCompany> selectAll(); |
| | | } |
| | |
| | | |
| | | public SysRolePwoerFn selectForUpdate(Long rpfId); |
| | | |
| | | int deleteByFns(@Param("companyId") Long comId, @Param("list") List<String> deletedFn); |
| | | } |
| | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.common.bean.SysUserLoginRecord; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.hive.bean.AppVersion; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | */ |
| | | public int emptySignInfoById(Long id); |
| | | |
| | | public List<AppVersion> selectAppVersion(); |
| | | |
| | | SysUsers selectUserByOpenId(@Param("openId") String openId, @Param("companyId") Long companyId); |
| | | |
| | | int updateUserOpenId(@Param("openId") String openId, @Param("suId") Long suId); |
| | | } |
New file |
| | |
| | | package com.matrix.system.common.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class WebLoginDto { |
| | | |
| | | public static final Integer ACCOUNT_LOGIN=1; |
| | | |
| | | public static final Integer SCANQRCORD_LOGIN=2; |
| | | |
| | | |
| | | /** |
| | | * 账号 |
| | | */ |
| | | private String suAccount; |
| | | |
| | | /** |
| | | * 密码 |
| | | */ |
| | | private String suPassword; |
| | | |
| | | /** |
| | | * 登录方式1,账号密码,2扫码 |
| | | */ |
| | | private Integer loginType; |
| | | /** |
| | | * 终端标识 |
| | | */ |
| | | private String loginQrCodeKey; |
| | | |
| | | } |
| | |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | import java.util.Map; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.concurrent.ConcurrentMap; |
| | | |
| | | import javax.servlet.ServletContext; |
| | | |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.service.SysCompanyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.core.Ordered; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.context.ServletContextAware; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * 初始化web容器的类 一些网站启动需要加载的数据和方法在这里配置和执行 |
| | | * @author:姜友瑶 |
| | | * @date 2016年10月18日 |
| | | */ |
| | | @Controller |
| | | public class InitWebContainer implements ServletContextAware{ |
| | | @Component |
| | | @Order(Ordered.HIGHEST_PRECEDENCE) |
| | | public class InitWebContainer implements ApplicationRunner { |
| | | |
| | | |
| | | private static final String TRUE = "true"; |
| | | |
| | | private ServletContext servletContext; |
| | | |
| | | static private final String LANGUAGE_ZH = "zh"; |
| | | |
| | |
| | | private String systemLanguage; |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * 容器启动后加载数据 |
| | | * @author:姜友瑶 |
| | | * @param sc |
| | | * @date 2016年10月18日 |
| | | */ |
| | | @Override |
| | | public void setServletContext(ServletContext sc) { |
| | | this.servletContext = sc; |
| | | public void run(ApplicationArguments args) { |
| | | |
| | | // 初始化调试模式 |
| | | initDebug(); |
| | |
| | | //初始化公司 |
| | | initParams(); |
| | | LogUtil.info("\r\n\r\n**********************************************\r\n" |
| | | + "* =========== Matrix启动成功 ===========\r\n" |
| | | + "* =========== 成功 ===========\r\n" |
| | | + "* DEBUG模式:" + debug+"*\r\n" |
| | | + "* 语言环境:" + Locale.getDefault().getLanguage()+"\r\n" |
| | | |
| | | |
| | | + "**********************************************\r\n"); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 初始化语言环境,默认为中文 |
| | | * |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年11月30日 |
| | |
| | | List<SysCompany> company=sysCompanyService.findByModel(null); |
| | | Map<String, SysCompany> companyMap=new HashMap<>(); |
| | | for (SysCompany sysCompany : company) { |
| | | companyMap.put(sysCompany.getComWebUrl(), sysCompany); |
| | | companyMap.put(sysCompany.getComCode(), sysCompany); |
| | | } |
| | | servletContext.setAttribute("companyMap", companyMap); |
| | | LocalCache.save("companyMap", companyMap); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.common.init; |
| | | |
| | | import com.google.common.util.concurrent.ThreadFactoryBuilder; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Iterator; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.Set; |
| | | import java.util.concurrent.*; |
| | | import java.util.concurrent.atomic.AtomicLong; |
| | | import java.util.stream.Collectors; |
| | | |
| | | public class LocalCache { |
| | | |
| | | /* |
| | | * 清理线程运行状态 0 未启动,1 已启动 |
| | | */ |
| | | private static int CLEAR_THREAD_STATUS = 0; |
| | | |
| | | private static ConcurrentMap<String, Value> localCache = new ConcurrentHashMap(60); |
| | | |
| | | /** |
| | | * 根据key匹配多个缓存值 |
| | | * |
| | | * @param key |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public static <T> Map<String, T> getValues(String key) { |
| | | return localCache.entrySet().stream() |
| | | .filter(item -> StringUtils.isMatch(key, item.getKey())) |
| | | .map(Map.Entry::getValue) |
| | | .filter(item -> Objects.nonNull(item.value)) |
| | | .collect(Collectors.toMap(Value::getKey, item -> (T) item.value)); |
| | | } |
| | | |
| | | /** |
| | | * 获取本地缓存 |
| | | * |
| | | * @param key |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public static <T> T get(String key) { |
| | | Value value = localCache.get(key); |
| | | if (Objects.nonNull(value)) { |
| | | return (T) value.value; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 删除缓存 |
| | | * |
| | | * @param key |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public static <T> T remove(String key) { |
| | | Value value = localCache.remove(key); |
| | | if (Objects.nonNull(value)) { |
| | | return (T) value.value; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 批量删除缓存 |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public static int batchRemove(String key) { |
| | | int count = 0; |
| | | Set<Map.Entry<String, Value>> entries = localCache.entrySet(); |
| | | Iterator<Map.Entry<String, Value>> iterator = entries.iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, Value> next = iterator.next(); |
| | | if (StringUtils.isMatch(key, next.getKey())) { |
| | | remove(next.getKey()); |
| | | count++; |
| | | } |
| | | } |
| | | return count; |
| | | } |
| | | |
| | | /** |
| | | * 保存一个本地缓存 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | */ |
| | | public static void save(String key, Object value) { |
| | | if (null != localCache.put(key, buildValue(key, value))) { |
| | | LogUtil.debug("覆盖原有缓存{}", key); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 设置含过期时间的缓存 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | * @param timeOut 毫秒 |
| | | */ |
| | | public static void save(String key, Object value, long timeOut) { |
| | | if (null != localCache.put(key, buildValue(key, value, timeOut))) { |
| | | LogUtil.debug("覆盖原有缓存{}", key); |
| | | } |
| | | startClearThread(); |
| | | } |
| | | |
| | | /** |
| | | * 重置缓存失效时间 |
| | | * @param key |
| | | */ |
| | | public static void resetExpire(String key) { |
| | | Objects.requireNonNull(key); |
| | | Value value = localCache.get(key); |
| | | if(Objects.nonNull(value)){ |
| | | value.getCreateTime().set(System.currentTimeMillis()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 清理过期对象 |
| | | */ |
| | | private synchronized static void startClearThread() { |
| | | if (CLEAR_THREAD_STATUS == 0) { |
| | | ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
| | | .setNameFormat("demo-pool-%d").build(); |
| | | ExecutorService singleThreadPool = new ThreadPoolExecutor(1, 1, |
| | | 0L, TimeUnit.MILLISECONDS, |
| | | new LinkedBlockingQueue<Runnable>(1), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); |
| | | singleThreadPool.execute(() -> { |
| | | CLEAR_THREAD_STATUS = 1; |
| | | while (true) { |
| | | try { |
| | | Set<Map.Entry<String, Value>> entries = localCache.entrySet(); |
| | | Iterator<Map.Entry<String, Value>> iterator = entries.iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, Value> next = iterator.next(); |
| | | |
| | | if (next.getValue().timeOut == 0) { |
| | | continue; |
| | | } |
| | | |
| | | boolean isTimeOut = (System.currentTimeMillis() - next.getValue().getCreateTime().longValue()) > next.getValue().timeOut; |
| | | if (isTimeOut) { |
| | | Value removed = localCache.remove(next.getKey()); |
| | | LogUtil.debug("清除过期对象:{}", removed.value); |
| | | } |
| | | } |
| | | Thread.sleep(1000); |
| | | } catch (InterruptedException e) { |
| | | LogUtil.error("清理缓存线程异常停止", e); |
| | | CLEAR_THREAD_STATUS = 0; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | private static Value buildValue(String key, Object value) { |
| | | return buildValue(key, value, 0); |
| | | } |
| | | |
| | | |
| | | private static Value buildValue(String key, Object value, long timeOut) { |
| | | Value instances = new Value(); |
| | | instances.createTime = new AtomicLong(System.currentTimeMillis()); |
| | | instances.key = key; |
| | | instances.value = value; |
| | | instances.timeOut = timeOut; |
| | | return instances; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 缓存对象 |
| | | */ |
| | | @Data |
| | | static class Value { |
| | | |
| | | /** |
| | | * 过期时间,0 表示不过期,单位毫秒 |
| | | */ |
| | | private long timeOut = 0; |
| | | /** |
| | | * 缓存key |
| | | */ |
| | | private String key; |
| | | /** |
| | | * 缓存值 |
| | | */ |
| | | private Object value; |
| | | |
| | | /** |
| | | * 缓存创建时间 |
| | | */ |
| | | private AtomicLong createTime; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: UserCacheManager.java |
| | | * packageName: com.matrix.system.common.init |
| | | * date: 2021-10-25 16:58 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix.system.common.init; |
| | | |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: UserCacheManager |
| | | * @packageName: com.matrix.system.common.init |
| | | * @description: 用户缓存管理 |
| | | * @data: 2021-10-25 16:58 |
| | | **/ |
| | | @Component |
| | | public class UserCacheManager { |
| | | |
| | | @Value("${debug}") |
| | | private String isDebug; |
| | | |
| | | |
| | | /** |
| | | * 判断用户是否已经登录过 |
| | | * |
| | | * @return |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2018年1月19日 |
| | | * 会从http请求投中获取token进行验证 |
| | | */ |
| | | public boolean isUserLogin() { |
| | | String token = getUserToken(); |
| | | if (StringUtils.isNotBlank(token)) { |
| | | return LocalCache.get(token) != null; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 在本地缓存中保存用户信息,并且返回保存的token |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2018年1月19日 |
| | | * @return 返回保存用户信息的token |
| | | */ |
| | | public String saveUserInfo(Object obj) { |
| | | String token = UUIDUtil.getRandomID(); |
| | | LocalCache.save(token, obj); |
| | | return token; |
| | | } |
| | | |
| | | /** |
| | | * 用户退出 |
| | | * |
| | | * @author:吕敬瑛 |
| | | * @date:2018年1月19日下午3:17:14 |
| | | */ |
| | | public void loginOut() { |
| | | LocalCache.remove(getUserToken()); |
| | | } |
| | | |
| | | /** |
| | | * 更新用户缓存 |
| | | */ |
| | | public void updateUserInfo(Object user) { |
| | | LocalCache.save(getUserToken(),user); |
| | | } |
| | | |
| | | /** |
| | | * 获取登录用户信息,如果 获取失败将会抛出异常 |
| | | * |
| | | * @return |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2018年1月19日 |
| | | */ |
| | | public <T> T getLoginUser() { |
| | | String userToken = getUserToken(); |
| | | if (userToken != null) { |
| | | T user = LocalCache.get(userToken); |
| | | if (Objects.nonNull(user)) { |
| | | //重新设置key过期时间 |
| | | LocalCache.resetExpire(userToken); |
| | | return user; |
| | | } else { |
| | | throw new GlobleException(SystemErrorCode.REQUEST_INVALID); |
| | | } |
| | | } else { |
| | | throw new GlobleException(SystemErrorCode.REQUEST_INVALID); |
| | | } |
| | | } |
| | | |
| | | public String getUserToken() { |
| | | String token = WebUtil.getRequest().getHeader("token"); |
| | | // debug模式可以从url参数中获取token |
| | | if (StringUtils.isBlank(token) && "true".equals(isDebug)) { |
| | | if (token == null) { |
| | | token = WebUtil.getRequest().getParameter("token"); |
| | | } |
| | | } |
| | | return token; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.common.interceptor; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.RSAUtils; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.SysUsersDao; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.servlet.HandlerInterceptor; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @Component |
| | | public class ApiUserLoginInterceptor implements HandlerInterceptor { |
| | | |
| | | |
| | | @Value("${login_private_key}") |
| | | private String privateKey; |
| | | |
| | | @Value("${evn}") |
| | | private String evn; |
| | | |
| | | @Autowired |
| | | private SysUsersDao sysUsersDao; |
| | | |
| | | private static final String TOKEN_HEADER = "Authorization"; |
| | | private static final String TOKEN_START_WITH = "Bearer "; |
| | | |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { |
| | | // if ("dev".equals(evn)) { |
| | | // SysUsers sysUsers = sysUsersDao.selectById(1022L); |
| | | // request.getSession().setAttribute(MatrixConstance.LOGIN_KEY, sysUsers); |
| | | // return true; |
| | | // } |
| | | |
| | | String token = resolveToken(request,privateKey); |
| | | AjaxResult ajaxResult = new AjaxResult(); |
| | | ajaxResult.setStatus(AjaxResult.STATUS_LOGIN_INVALID); |
| | | |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setContentType("application/json; charset=utf-8"); |
| | | if (StringUtils.isBlank(token)) { |
| | | ajaxResult.setInfo("login time out"); |
| | | response.getWriter().write(new ObjectMapper().writeValueAsString(ajaxResult)); |
| | | response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); |
| | | return false; |
| | | } |
| | | |
| | | SysUsers sysUsers = LocalCache.get(token); |
| | | if (Objects.isNull(sysUsers)) { |
| | | ajaxResult.setInfo("login time out"); |
| | | response.getWriter().write(new ObjectMapper().writeValueAsString(ajaxResult)); |
| | | response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); |
| | | return false; |
| | | } |
| | | |
| | | request.getSession().setAttribute(MatrixConstance.LOGIN_KEY, sysUsers); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { |
| | | request.getSession().removeAttribute(MatrixConstance.LOGIN_KEY); |
| | | } |
| | | |
| | | @Override |
| | | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 解析token token_timestamp_url |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | public static String resolveToken(HttpServletRequest request,String privateKey) { |
| | | String headToken = request.getHeader(TOKEN_HEADER); |
| | | String sb = request.getRequestURI(); |
| | | |
| | | if (StringUtils.isNotBlank(headToken) && headToken.startsWith(TOKEN_START_WITH)) { |
| | | // 去掉令牌前缀 |
| | | String rsaToken = headToken.replace(TOKEN_START_WITH, ""); |
| | | |
| | | try { |
| | | String decryptToken = new String(RSAUtils.decryptByPrivateKey(rsaToken, privateKey)); |
| | | |
| | | String[] s = decryptToken.split("_"); |
| | | if (s == null || s.length != 3) { |
| | | return ""; |
| | | } |
| | | |
| | | LogUtil.info("请求路径:{} -- {}", sb, s[2]); |
| | | if (!sb.equals(s[2])) { |
| | | return ""; |
| | | } |
| | | |
| | | return s[0]; |
| | | } catch (Exception e) { |
| | | LogUtil.info("#token解析错误:{}#", e); |
| | | return ""; |
| | | } |
| | | |
| | | } |
| | | |
| | | return ""; |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.common.interceptor; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.init.InitWebContainer; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.servlet.HandlerInterceptor; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; |
| | | |
| | |
| | | |
| | | /** |
| | | * 域名与公司对应绑定拦截 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年11月29日 |
| | |
| | | public class HostInterceptor extends HandlerInterceptorAdapter { |
| | | |
| | | |
| | | public static final String ATTR_COMPANY = "company"; |
| | | public static final String ATTR_COMPANY = "company"; |
| | | |
| | | @Override |
| | | public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, ModelAndView arg3) |
| | | throws Exception { |
| | | } |
| | | @Override |
| | | public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, ModelAndView arg3) |
| | | throws Exception { |
| | | } |
| | | |
| | | /** |
| | | * 通用拦截器 |
| | | */ |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object obj) throws Exception { |
| | | SysCompany company= WebUtil.getSessionAttribute(ATTR_COMPANY); |
| | | /** |
| | | * 通用拦截器 |
| | | */ |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object obj) throws Exception { |
| | | |
| | | if (company != null) { |
| | | LogUtil.debug("匹配到公司{}", company.getComName()); |
| | | return true; |
| | | } else { |
| | | // 获得请求的域名 |
| | | String host = WebUtil.getRequest().getServerName(); |
| | | //判断是否为debug模式 |
| | | if(MatrixConstance.DEBUG){ |
| | | String debugHost=request.getHeader("debugHost"); |
| | | if(StringUtils.isNotBlank(debugHost)){ |
| | | host=debugHost; |
| | | WebUtil.getSession().removeAttribute(ATTR_COMPANY); |
| | | LogUtil.debug("debugHost={}",host); |
| | | } |
| | | } |
| | | LogUtil.debug("当前请求域名{}", host); |
| | | @SuppressWarnings("unchecked") |
| | | Map<String, SysCompany> companyMap = (Map<String, SysCompany>) WebUtil.getServletContext() |
| | | .getAttribute("companyMap"); |
| | | if(Objects.nonNull(companyMap)){ |
| | | Set<String> hostSet = companyMap.keySet(); |
| | | for (String key : hostSet) { |
| | | LogUtil.debug("-- 匹配公司key={},host={} 匹配结果={}", key , host, key.contains(host)); |
| | | if (key.contains(host)) { |
| | | // 查到公司后存到sesssion中 |
| | | WebUtil.setSessionAttribute(ATTR_COMPANY, companyMap.get(key)); |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | LogUtil.debug("没有匹配到对应的公司"); |
| | | return false; |
| | | } |
| | | // 获得请求的域名--由小程序直接传过来companyCode参数对应公司的网址 |
| | | String host = request.getHeader("companyCode"); |
| | | LogUtil.debug("当前请求域名{}", host); |
| | | if (StringUtils.isBlank(host)) { |
| | | return false; |
| | | } |
| | | |
| | | Map<String, SysCompany> companyMap = LocalCache.get("companyMap"); |
| | | SysCompany company=companyMap.get(host); |
| | | if(Objects.nonNull(company)){ |
| | | // 查到公司后存到sesssion中 |
| | | LogUtil.debug("匹配到公司{}", company.getComName()); |
| | | WebUtil.setSessionAttribute(ATTR_COMPANY, company); |
| | | return true; |
| | | } |
| | | LogUtil.debug("没有匹配到对应的公司"); |
| | | return false; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取当前域名对于的公司ID |
| | | * @return |
| | | */ |
| | | public static Long getCompanyId() { |
| | | return ((SysCompany) WebUtil.getSessionAttribute(ATTR_COMPANY)).getComId(); |
| | | } |
| | | /** |
| | | * 获取当前域名对于的公司ID |
| | | * |
| | | * @return |
| | | */ |
| | | public static Long getCompanyId() { |
| | | return ((SysCompany) WebUtil.getSessionAttribute(ATTR_COMPANY)).getComId(); |
| | | } |
| | | |
| | | } |
| | |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object obj) throws Exception { |
| | | |
| | | String requestUrl = request.getRequestURI(); |
| | | String requestUrl = request.getRequestURI(); |
| | | // 如果访问特殊的路径需要验证管理员的登录权限 |
| | | if (requestUrl.indexOf(ADMIN) != -1 || requestUrl.indexOf(SUPER) != -1 |
| | | || requestUrl.indexOf(DEVELOPER) != -1 || requestUrl.indexOf(CUSTOMER) != -1) { |
| | | |
| | | if (WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY) == null) { |
| | | // 判断是否为异步请求 |
| | | String requestType = request.getHeader(X_REQUESTED_WITH); |
New file |
| | |
| | | package com.matrix.system.common.service; |
| | | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant; |
| | | import com.matrix.system.score.constant.ScoreSettingConstant; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class BusParameterSettingService { |
| | | |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 判断某个设置是否是开启状态 |
| | | * 未配置,或者无效settingkey都返回false |
| | | */ |
| | | public boolean isSettingOpen(String settingKey,Long companyId) { |
| | | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(settingKey, companyId); |
| | | return ( |
| | | Objects.nonNull(busParameterSettings) |
| | | && StringUtils.isNotBlank(busParameterSettings.getParamValue()) |
| | | && AppConstance.IS_Y.equals(busParameterSettings.getParamValue()) |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.common.bean.SysUserLoginRecord; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.hive.bean.AppVersion; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | |
| | |
| | | public int findByCodeBeaStateShopCount(Long shopId, |
| | | SysProjServices sysProjServices, List<String> panBanCodes); |
| | | |
| | | public List<AppVersion> findAppVersion(); |
| | | |
| | | SysUsers findByOpenId(String openId, Long companyId); |
| | | |
| | | int modifyUserOpenId(String openId, Long suId); |
| | | } |
New file |
| | |
| | | package com.matrix.system.common.service.impl;
|
| | |
|
| | | import com.matrix.system.common.bean.BusParameterSettings;
|
| | | import com.matrix.system.common.bean.SysCompany;
|
| | | import com.matrix.system.common.dao.BusParameterSettingsDao;
|
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant;
|
| | | import com.matrix.system.score.constant.ScoreSettingConstant;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | @Service
|
| | | public class InitBusParameterSettingService {
|
| | |
|
| | | @Autowired
|
| | | private BusParameterSettingsDao busParameterSettingsDao;
|
| | |
|
| | | /**
|
| | | * 初始化默认积分规则设置
|
| | | */
|
| | | public void initBusParameterSetting(SysCompany sysCompany) {
|
| | | long companyId = sysCompany.getComId();
|
| | | List<BusParameterSettings> ruleSettings=new ArrayList<>();
|
| | |
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.VALID_PERIOD_POINTS, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.CREDIT_POINTS_CASH, companyId));
|
| | |
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.CASH_CONSUMPTION, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.PRINCIPAL_BALANCE_CONSUMPTION, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.BONUS_BALANCE_CONSUMPTION, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.PRINCIPAL_CONSUMPTION, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.GIVE_CONSUMPTION, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.REFERRALS_CONSUMPTION, companyId));
|
| | |
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.CASH_CONSUMPTION_SHOP, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.RESERVATION_SERVICE_SHOP, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.EVALUATUIN_ORDER_SHOP, companyId));
|
| | |
|
| | | busParameterSettingsDao.batchInsert(ruleSettings);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 初始化默认分销规则设置
|
| | | */
|
| | | public void initBusParameterFenxiaoSetting(SysCompany sysCompany) {
|
| | | long companyId = sysCompany.getComId();
|
| | | List<BusParameterSettings> ruleSettings=new ArrayList<>();
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_SWITCH, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_MODEL, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_APPLY_WAY, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_AUDIT_METHOD, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_APPLY_CONDITION, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_TG_PLAN, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_TG_POSTER, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_ZGFY, companyId));
|
| | | busParameterSettingsDao.batchInsert(ruleSettings);
|
| | | }
|
| | |
|
| | | private BusParameterSettings addScoreRuleSetting(String code,long companyId) {
|
| | | BusParameterSettings busParameterSetting = new BusParameterSettings();
|
| | | busParameterSetting.setParamCode(code);
|
| | | busParameterSetting.setCompanyId(companyId);
|
| | | return busParameterSetting;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.bean.SysRole; |
| | | import com.matrix.system.common.dao.SysRoleDao; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.shopXcx.bean.ShopProductAttribute; |
| | | import com.matrix.system.shopXcx.dao.ShopProductAttributeDao; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | |
| | | ShopProductAttribute service=new ShopProductAttribute(); |
| | | BeanUtils.copyProperties(cpfl,service); |
| | | service.setAttrName("服务"); |
| | | service.setAttrName("属性"); |
| | | service.setAttrCode("service"); |
| | | shopProductAttributeDao.batchInsert(Arrays.asList(cpfl,service)); |
| | | |
| | | |
| | |
| | | package com.matrix.system.common.service.impl; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.ModelUtils; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.*; |
| | | import com.matrix.system.app.authority.AppAuthorityManager; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.bean.SysRole; |
| | | import com.matrix.system.common.bean.SysRolePwoerFn; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.SysCompanyDao; |
| | | import com.matrix.system.common.dao.SysRoleDao; |
| | | import com.matrix.system.common.dao.SysRolePwoerFnDao; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.service.SysCompanyService; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.bean.Warehouse; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.dao.WarehouseDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 公司管理 |
| | | * |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date Dec 11, 2017 |
| | |
| | | @Service |
| | | public class SysCompanyServiceImpl implements SysCompanyService { |
| | | |
| | | @Autowired |
| | | private SysCompanyDao sysCompanyDao; |
| | | @Autowired |
| | | private SysRoleDao sysRoleDao; |
| | | @Autowired |
| | | private SysRolePwoerFnDao rolePwoerFnDao; |
| | | @Autowired |
| | | private SysCompanyDao sysCompanyDao; |
| | | @Autowired |
| | | private SysRoleDao sysRoleDao; |
| | | @Autowired |
| | | private SysRolePwoerFnDao rolePwoerFnDao; |
| | | |
| | | @Autowired |
| | | private SysShopInfoDao shopInfoDao; |
| | | @Autowired |
| | | private SysShopInfoDao shopInfoDao; |
| | | |
| | | |
| | | @Autowired |
| | | private InitCustomerDataDictionaryService initCustomerDataDictionaryService; |
| | | @Autowired |
| | | private InitCustomerDataDictionaryService initCustomerDataDictionaryService; |
| | | |
| | | |
| | | @Autowired |
| | | private InitShoppingGoodsCategoryService initShoppingGoodsCategoryService; |
| | | @Autowired |
| | | private InitShoppingGoodsCategoryService initShoppingGoodsCategoryService; |
| | | |
| | | |
| | | @Autowired |
| | | private InitRolePowerService initRolePowerService; |
| | | @Autowired |
| | | private InitRolePowerService initRolePowerService; |
| | | |
| | | @Autowired |
| | | private InitGoodsTypeService initGoodsTypeService; |
| | | @Autowired |
| | | private InitGoodsTypeService initGoodsTypeService; |
| | | |
| | | @Autowired |
| | | private InitShopProductCateService initShopProductCateService; |
| | | @Autowired |
| | | private InitShopProductCateService initShopProductCateService; |
| | | |
| | | @Autowired |
| | | private InitBusParameterSettingService initBusParameterSettingService; |
| | | |
| | | |
| | | @Transactional |
| | | @Override |
| | | public int add(SysCompany sysCompany) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysCompany.setCreateBy(user.getSuName()); |
| | | sysCompany.setUpdateBy(user.getSuName()); |
| | | int i= sysCompanyDao.insert(sysCompany); |
| | | SysShopInfo zbShop= addZbShop(sysCompany); |
| | | initCustomerDataDictionaryService.initCustomerDataDictionary(sysCompany); |
| | | initShoppingGoodsCategoryService.initShoppingGoodsCategory(sysCompany,zbShop); |
| | | initRolePowerService.initRolePower(sysCompany); |
| | | initGoodsTypeService.initRolePower(sysCompany); |
| | | initShopProductCateService.initShopProductCate(sysCompany); |
| | | @Transactional |
| | | @Override |
| | | public int add(SysCompany sysCompany) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysCompany.setCreateBy(user.getSuName()); |
| | | sysCompany.setUpdateBy(user.getSuName()); |
| | | int i = sysCompanyDao.insert(sysCompany); |
| | | SysShopInfo zbShop = addZbShop(sysCompany); |
| | | initCustomerDataDictionaryService.initCustomerDataDictionary(sysCompany); |
| | | initShoppingGoodsCategoryService.initShoppingGoodsCategory(sysCompany, zbShop); |
| | | initRolePowerService.initRolePower(sysCompany); |
| | | initGoodsTypeService.initRolePower(sysCompany); |
| | | initShopProductCateService.initShopProductCate(sysCompany); |
| | | initBusParameterSettingService.initBusParameterSetting(sysCompany); |
| | | initBusParameterSettingService.initBusParameterFenxiaoSetting(sysCompany); |
| | | |
| | | return i; |
| | | return i; |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private WarehouseDao warehouseDao; |
| | | /** |
| | | * 为新公司创建一个总部 |
| | | * @param sysCompany |
| | | */ |
| | | private SysShopInfo addZbShop(SysCompany sysCompany) { |
| | | SysShopInfo zbShopInfo=new SysShopInfo(); |
| | | zbShopInfo.setShopType(SysShopInfo.SHOP_TYPE_ZONGBU); |
| | | zbShopInfo.setShopName(sysCompany.getComName()+"(总部)"); |
| | | zbShopInfo.setCompanyId(sysCompany.getComId()); |
| | | zbShopInfo.setShopTel(sysCompany.getComTel()); |
| | | zbShopInfo.setShopShortName("总部"); |
| | | zbShopInfo.setIsOpenNet(SysShopInfo.CLOSE_NET); |
| | | zbShopInfo.setShopNo(StringUtils.getRandomString(10)); |
| | | shopInfoDao.insert(zbShopInfo); |
| | | @Autowired |
| | | private WarehouseDao warehouseDao; |
| | | |
| | | //新增一个总部仓库 |
| | | Warehouse warehouse=new Warehouse(); |
| | | warehouse.setCompanyId(sysCompany.getComId()); |
| | | warehouse.setName("总部仓库"); |
| | | warehouse.setShopId(zbShopInfo.getId()); |
| | | warehouse.setSort("1"); |
| | | warehouseDao.insert(warehouse); |
| | | return zbShopInfo; |
| | | } |
| | | /** |
| | | * 为新公司创建一个总部 |
| | | * |
| | | * @param sysCompany |
| | | */ |
| | | private SysShopInfo addZbShop(SysCompany sysCompany) { |
| | | SysShopInfo zbShopInfo = new SysShopInfo(); |
| | | zbShopInfo.setShopType(SysShopInfo.SHOP_TYPE_ZONGBU); |
| | | zbShopInfo.setShopName(sysCompany.getComName() + "(总部)"); |
| | | zbShopInfo.setCompanyId(sysCompany.getComId()); |
| | | zbShopInfo.setShopTel(sysCompany.getComTel()); |
| | | zbShopInfo.setShopShortName("总部"); |
| | | zbShopInfo.setIsOpenNet(SysShopInfo.CLOSE_NET); |
| | | zbShopInfo.setShopNo(StringUtils.getRandomString(10)); |
| | | shopInfoDao.insert(zbShopInfo); |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public int modifyByMap(SysCompany oldSysCompany, SysCompany newSysCompany) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | newSysCompany.setUpdateBy(user.getSuName()); |
| | | //新增一个总部仓库 |
| | | Warehouse warehouse = new Warehouse(); |
| | | warehouse.setCompanyId(sysCompany.getComId()); |
| | | warehouse.setName("总部仓库"); |
| | | warehouse.setShopId(zbShopInfo.getId()); |
| | | warehouse.setSort("1"); |
| | | warehouseDao.insert(warehouse); |
| | | return zbShopInfo; |
| | | } |
| | | |
| | | updatePower(newSysCompany); |
| | | Map<String, Object> modifyMap = null; |
| | | try { |
| | | if (!ModelUtils.isModified(oldSysCompany, newSysCompany)) { |
| | | return MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public int modifyByMap(SysCompany oldSysCompany, SysCompany newSysCompany) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | newSysCompany.setUpdateBy(user.getSuName()); |
| | | |
| | | modifyMap = ModelUtils.comparePojo2Map(oldSysCompany, newSysCompany); |
| | | } catch (Exception e) { |
| | | throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newSysCompany.getComName()); |
| | | } |
| | | if (modifyMap.size() > 0) { |
| | | modifyMap.put("comId", oldSysCompany.getComId()); |
| | | return sysCompanyDao.updateByMap(modifyMap); |
| | | } |
| | | return MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | updatePower(newSysCompany); |
| | | Map<String, Object> modifyMap = null; |
| | | try { |
| | | if (!ModelUtils.isModified(oldSysCompany, newSysCompany)) { |
| | | return MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | |
| | | /** |
| | | * 更新公司员工权限 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | * @param newSysCompany |
| | | */ |
| | | private void updatePower(SysCompany newSysCompany) { |
| | | List<String> oldFunctions = null; |
| | | String functions = sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions(); |
| | | if (functions == null || functions.equals("")) { |
| | | oldFunctions = new ArrayList<>(); |
| | | } else { |
| | | oldFunctions = StringUtils |
| | | .strToCollToString(sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions(), ","); |
| | | } |
| | | List<String> newFunctions = new ArrayList<>(); |
| | | if (StringUtils.isNotBlank(newSysCompany.getComFunctions())) { |
| | | newFunctions = StringUtils.strToCollToString(newSysCompany.getComFunctions(), ","); |
| | | } |
| | | modifyMap = ModelUtils.comparePojo2Map(oldSysCompany, newSysCompany); |
| | | } catch (Exception e) { |
| | | throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newSysCompany.getComName()); |
| | | } |
| | | if (modifyMap.size() > 0) { |
| | | modifyMap.put("comId", oldSysCompany.getComId()); |
| | | return sysCompanyDao.updateByMap(modifyMap); |
| | | } |
| | | return MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | |
| | | for (String old : oldFunctions) { |
| | | // 如果新权限中不包含这个老的功能,则要更新改企业下所有的角色权限 |
| | | if (!newFunctions.contains(old)) { |
| | | SysRole role = new SysRole(); |
| | | role.setCompanyId(newSysCompany.getComId()); |
| | | List<SysRole> roles = sysRoleDao.selectByModel(role); |
| | | // 获取该公司下所有的权限信息 |
| | | List<SysRolePwoerFn> compalyRolePwoer = new ArrayList<>(); |
| | | for (SysRole tempRole : roles) { |
| | | SysRolePwoerFn r = new SysRolePwoerFn(); |
| | | r.setRoleId(tempRole.getRoleId()); |
| | | compalyRolePwoer.addAll(rolePwoerFnDao.selectByModel(r)); |
| | | } |
| | | // 记录要删除的id |
| | | List<String> delRolePwoer = new ArrayList<>(); |
| | | for (SysRolePwoerFn rolePwoer : compalyRolePwoer) { |
| | | // 如果有一个老权限则删除这个权限 |
| | | if (rolePwoer.getFnId() != null && rolePwoer.getFnId().equals(old)) { |
| | | delRolePwoer.add(rolePwoer.getRpfId()+""); |
| | | } |
| | | } |
| | | // 如果获取到了就删除 |
| | | if (!delRolePwoer.isEmpty()) { |
| | | rolePwoerFnDao.deleteByIds(delRolePwoer); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * 更新公司员工权限 |
| | | * |
| | | * @param newSysCompany |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | */ |
| | | private void updatePower(SysCompany newSysCompany) { |
| | | List<String> oldFunctions = null; |
| | | String functions = sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions(); |
| | | if (functions == null || functions.equals("")) { |
| | | oldFunctions = new ArrayList<>(); |
| | | } else { |
| | | oldFunctions = StringUtils |
| | | .strToCollToString(sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions(), ","); |
| | | } |
| | | List<String> newFunctions = new ArrayList<>(); |
| | | if (StringUtils.isNotBlank(newSysCompany.getComFunctions())) { |
| | | newFunctions = StringUtils.strToCollToString(newSysCompany.getComFunctions(), ","); |
| | | } |
| | | |
| | | @Override |
| | | public int modifyByModel(SysCompany sysCompany) { |
| | | Collections.sort(newFunctions); |
| | | Collections.sort(oldFunctions); |
| | | if (Objects.equals(JSONUtil.toJsonStr(newFunctions), JSONUtil.toJsonStr(oldFunctions))) { |
| | | //没有更新的权限 |
| | | return; |
| | | } |
| | | |
| | | return sysCompanyDao.updateByModel(sysCompany); |
| | | List<String> finalNewFunctions = newFunctions; |
| | | List<String> deletedFn = oldFunctions.stream().map(old -> { |
| | | if (finalNewFunctions.stream().noneMatch(newFn -> Objects.equals(newFn, old))) { |
| | | return old; |
| | | } else { |
| | | return ""; |
| | | } |
| | | }).filter(item->StringUtils.isNotBlank(item)).collect(Collectors.toList()); |
| | | |
| | | } |
| | | if(CollectionUtils.isNotEmpty(deletedFn)){ |
| | | rolePwoerFnDao.deleteByFns(newSysCompany.getComId(),deletedFn); |
| | | //有更新权限清空缓存 |
| | | SysUsers sysUsers = new SysUsers(); |
| | | sysUsers.setCompanyId(newSysCompany.getComId()); |
| | | sysUsers.setSuValid(AppConstance.RECORD_VALID); |
| | | List<SysUsers> users = sysUsersService.findByModel(sysUsers); |
| | | users.forEach(user -> { |
| | | String userKey = SecureUtil.md5(user.getSuId() + ""); |
| | | LocalCache.remove(DefaultAuthorityManager.USER_POWER_REDISKEY_PC + userKey); |
| | | LocalCache.remove(AppAuthorityManager.USER_POWER_REDISKEY_APP + userKey); |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public int remove(List<String> list) { |
| | | |
| | | return sysCompanyDao.deleteByIds(list); |
| | | |
| | | } |
| | | /* for (String old : oldFunctions) { |
| | | // 如果新权限中不包含这个老的功能,则要更新改企业下所有的角色权限 |
| | | if (!newFunctions.contains(old)) { |
| | | SysRole role = new SysRole(); |
| | | role.setCompanyId(newSysCompany.getComId()); |
| | | List<SysRole> roles = sysRoleDao.selectByModel(role); |
| | | // 获取该公司下所有的权限信息 |
| | | List<SysRolePwoerFn> compalyRolePwoer = new ArrayList<>(); |
| | | for (SysRole tempRole : roles) { |
| | | SysRolePwoerFn r = new SysRolePwoerFn(); |
| | | r.setRoleId(tempRole.getRoleId()); |
| | | compalyRolePwoer.addAll(rolePwoerFnDao.selectByModel(r)); |
| | | } |
| | | // 记录要删除的id |
| | | List<String> delRolePwoer = new ArrayList<>(); |
| | | for (SysRolePwoerFn rolePwoer : compalyRolePwoer) { |
| | | // 如果有一个老权限则删除这个权限 |
| | | if (rolePwoer.getFnId() != null && rolePwoer.getFnId().equals(old)) { |
| | | delRolePwoer.add(rolePwoer.getRpfId() + ""); |
| | | } |
| | | } |
| | | // 如果获取到了就删除 |
| | | if (!delRolePwoer.isEmpty()) { |
| | | rolePwoerFnDao.deleteByIds(delRolePwoer); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | @Override |
| | | public int removeById(String comId) { |
| | | |
| | | return sysCompanyDao.deleteById(Long.parseLong(comId)); |
| | | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public int removeByModel(SysCompany sysCompany) { |
| | | @Autowired |
| | | SysUsersService sysUsersService; |
| | | |
| | | return sysCompanyDao.deleteByModel(sysCompany); |
| | | @Override |
| | | public int modifyByModel(SysCompany sysCompany) { |
| | | |
| | | } |
| | | return sysCompanyDao.updateByModel(sysCompany); |
| | | |
| | | @Override |
| | | public List<SysCompany> findInPage(SysCompany sysCompany, PaginationVO pageVo) { |
| | | } |
| | | |
| | | return sysCompanyDao.selectInPage(sysCompany, pageVo); |
| | | @Override |
| | | public int remove(List<String> list) { |
| | | |
| | | } |
| | | return sysCompanyDao.deleteByIds(list); |
| | | |
| | | @Override |
| | | public List<SysCompany> findByModel(SysCompany sysCompany) { |
| | | } |
| | | |
| | | return sysCompanyDao.selectByModel(sysCompany); |
| | | @Override |
| | | public int removeById(String comId) { |
| | | |
| | | } |
| | | return sysCompanyDao.deleteById(Long.parseLong(comId)); |
| | | |
| | | @Override |
| | | public int findTotal(SysCompany sysCompany) { |
| | | } |
| | | |
| | | return sysCompanyDao.selectTotalRecord(sysCompany); |
| | | @Override |
| | | public int removeByModel(SysCompany sysCompany) { |
| | | |
| | | } |
| | | return sysCompanyDao.deleteByModel(sysCompany); |
| | | |
| | | @Override |
| | | public SysCompany findById(String comId) { |
| | | } |
| | | |
| | | return sysCompanyDao.selectById(Long.parseLong(comId)); |
| | | @Override |
| | | public List<SysCompany> findInPage(SysCompany sysCompany, PaginationVO pageVo) { |
| | | |
| | | } |
| | | return sysCompanyDao.selectInPage(sysCompany, pageVo); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<SysCompany> findByModel(SysCompany sysCompany) { |
| | | |
| | | return sysCompanyDao.selectByModel(sysCompany); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public int findTotal(SysCompany sysCompany) { |
| | | |
| | | return sysCompanyDao.selectTotalRecord(sysCompany); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public SysCompany findById(String comId) { |
| | | |
| | | return sysCompanyDao.selectById(Long.parseLong(comId)); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.ModelUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | |
| | | } else { |
| | | // 非一级节点找到父节点后存入 |
| | | SysFunction parentFn = allFnMap.get(String.valueOf(function.getFnParentId())); |
| | | List<SysFunction> childs = parentFn.getChilds(); |
| | | if (childs == null) { |
| | | parentFn.setChilds(new ArrayList<SysFunction>()); |
| | | if(parentFn!=null){ |
| | | List<SysFunction> childs = parentFn.getChilds(); |
| | | if (childs == null) { |
| | | parentFn.setChilds(new ArrayList<SysFunction>()); |
| | | } |
| | | parentFn.getChilds().add(function); |
| | | } |
| | | parentFn.getChilds().add(function); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | package com.matrix.system.common.service.impl; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.ModelUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | | import com.matrix.system.common.bean.SysUserLoginRecord; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.constance.AppMessageCode; |
| | | import com.matrix.system.common.dao.SysUsersDao; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.PasswordUtil; |
| | | import com.matrix.system.common.tools.ServiceUtil; |
| | | import com.matrix.system.hive.bean.AppVersion; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private static final String SU_ID = "su_id"; |
| | | |
| | | private static final String SU_ACCOUNT = "su_account"; |
| | | |
| | | @Autowired |
| | | private SysUsersDao sysUsersDao; |
| | | |
| | |
| | | } |
| | | if (modifyMap.size() > 0) { |
| | | modifyMap.put("suId", oldSysUsers.getSuId()); |
| | | return sysUsersDao.updateByMap(modifyMap); |
| | | sysUsersDao.updateByMap(modifyMap); |
| | | } |
| | | //删除用户权限缓存 |
| | | String redisKey=DefaultAuthorityManager.USER_POWER_REDISKEY+ SecureUtil.md5(oldSysUsers.getSuId()+""); |
| | | String redisKeyPc=DefaultAuthorityManager.USER_POWER_REDISKEY_PC+ SecureUtil.md5(oldSysUsers.getSuId()+""); |
| | | LocalCache.remove(redisKey); |
| | | LocalCache.remove(redisKeyPc); |
| | | |
| | | return MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<AppVersion> findAppVersion() { |
| | | return sysUsersDao.selectAppVersion(); |
| | | } |
| | | |
| | | @Override |
| | | public SysUsers findByOpenId(String openId, Long companyId) { |
| | | return sysUsersDao.selectUserByOpenId(openId, companyId); |
| | | } |
| | | |
| | | @Override |
| | | public int modifyUserOpenId(String openId, Long suId) { |
| | | return sysUsersDao.updateUserOpenId(openId, suId); |
| | | } |
| | | } |
| | |
| | | public Set<IProcessor> getProcessors(final String dialectPrefix) { |
| | | final Set<IProcessor> processors = new HashSet<IProcessor>(); |
| | | processors.add(new ButtonRoleAttributeTagProcessor(dialectPrefix)); |
| | | processors.add(new ButtonRoleJsTagProcessor(dialectPrefix)); |
| | | processors.add(new ButtonRoleFnTagProcessor(dialectPrefix)); |
| | | // This will remove the xmlns:matrix attributes we might add for IDE validation |
| | | processors.add(new StandardXmlNsTagProcessor(TemplateMode.HTML, dialectPrefix)); |
| | |
| | | */ |
| | | public static boolean hasAllShopAuth() { |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | return user.getShopRole().equals(Dictionary.FLAG_YES_Y) || user.getSuUserType().equals(AppConstance.USER_TYPE_ADMIN); |
| | | return Dictionary.FLAG_YES_Y.equals(user.getShopRole()) || AppConstance.USER_TYPE_ADMIN.equals(user.getSuUserType()); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 可以查询所有会员 |
| | | * @return |
| | | */ |
| | | public static boolean hasAllCustomerAuth() { |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | return Dictionary.FLAG_YES_Y.equals(user.getShopRole()) || AppConstance.USER_TYPE_ADMIN.equals(user.getSuUserType()); |
| | | |
| | | } |
| | | } |
| | |
| | | * 支付方式-现金支付 |
| | | */ |
| | | String PAY_TYPE_MOENY = "现金"; |
| | | /** |
| | | * 支付方式-现金支付 |
| | | */ |
| | | String PAY_TYPE_MOENY_CARD = "会员卡"; |
| | | |
| | | /** |
| | | * 支付方式-卡支付 |
| | | */ |
| | | String PAY_TYPE_CARD = "划扣"; |
| | | |
| | | |
| | | /** |
| | | * 服务单状态-待确认 |
| | | */ |
| | | String SERVICE_STATU_DQR = "待确认"; |
| | | /** |
| | | * 服务单状态-待预约 |
| | | */ |
| | |
| | | |
| | | // 服务器文件上传配置 |
| | | String SAVE_PATH = "/mnt/hive/static/uploadeFile/"; |
| | | String SAVE_URL = "http://resource.hive.jyymatrix.cc/uploadeFile/"; |
| | | String SAVE_URL = "http://filehive2.jyymatrix.cc/uploadeFile/"; |
| | | |
| | | |
| | | // 积分规则编号 |
| | |
| | | |
| | | String ORDER_TYPE_SEAL="订单"; |
| | | String ORDER_TYPE_SERVICE="服务单"; |
| | | |
| | | |
| | | String ACHIEVE_TYPE_CASH = "现金业绩"; |
| | | String ACHIEVE_TYPE_CARD = "划扣业绩"; |
| | | |
| | | String SEX_MAN ="男"; |
| | | String SEX_WOMAN ="女"; |
| | | |
| | | String[] COLORS = { "#57c5d2", "#e3565e", "#2f343a", "#4d98db", "#4fbc9d", "#be9d4c"}; |
| | | |
| | | String SERVICE_OVER_BEGIN_END = "SERVICE_OVER_BEGIN_END"; |
| | | String SALE_MAN_IS_CONSUME_ACHIEVE = "SALE_MAN_IS_CONSUME_ACHIEVE"; |
| | | String ZS_CONSUME_ACHIEVE = "ZS_CONSUME_ACHIEVE"; |
| | | } |
| | |
| | | public class SystemConstance { |
| | | |
| | | |
| | | /** |
| | | * 当前进行操作的用户 |
| | | */ |
| | | public static final String CURRENT_CUSTOMER = "CURRENT_CUSTOMER"; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | public static final String SYSTEM_USER = "SYSTEM"; |
| | | |
| | | /** |
| | | * 查询历史记录 |
| | | */ |
| | | public static final String HISTORY_CUSTOMER = "HISTORY_CUSTOMER"; |
| | | |
| | | /** |
| | | * 登陆前要访问的地址 |
| | | */ |
New file |
| | |
| | | package com.matrix.system.fenxiao.action; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | | import com.matrix.core.tools.excl.ExcelVersion; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.fenxiao.dto.LoadFenxiaoOrderBasicDto; |
| | | import com.matrix.system.fenxiao.dto.LoadFenxiaoOrderListDto; |
| | | import com.matrix.system.fenxiao.dto.LoadSetOrderListDtoDto; |
| | | import com.matrix.system.fenxiao.dto.UpdateSetOrderDoneDto; |
| | | import com.matrix.system.fenxiao.service.ShopSalesmanOrderService; |
| | | import com.matrix.system.fenxiao.vo.FenxiaoOrderListExportVo; |
| | | import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderBasicVo; |
| | | import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderListVo; |
| | | import com.matrix.system.fenxiao.vo.LoadSetOrderListDtoVo; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/fenXiao/fenXiaoOrder") |
| | | public class FenXiaoOrderAction { |
| | | |
| | | @Autowired |
| | | private ShopSalesmanOrderService shopSalesmanOrderService; |
| | | |
| | | /** |
| | | * 分销订单基本信息 |
| | | */ |
| | | @ApiOperation(value = "分销订单基本信息") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = LoadFenxiaoOrderBasicVo.class) |
| | | }) |
| | | @PostMapping(value = "/loadFenxiaoOrderBasic") |
| | | public @ResponseBody |
| | | AjaxResult loadFenxiaoOrderBasic(@RequestBody LoadFenxiaoOrderBasicDto loadFenxiaoOrderBasicDto) { |
| | | return shopSalesmanOrderService.loadFenxiaoOrderBasic(loadFenxiaoOrderBasicDto); |
| | | } |
| | | |
| | | /** |
| | | * 分销订单 |
| | | */ |
| | | @ApiOperation(value = "分销订单") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = LoadFenxiaoOrderListVo.class) |
| | | }) |
| | | @PostMapping(value = "/loadFenxiaoOrderList") |
| | | public @ResponseBody |
| | | AjaxResult loadFenxiaoOrderList(@RequestBody LoadFenxiaoOrderListDto loadFenxiaoOrderListDto) { |
| | | return shopSalesmanOrderService.loadFenxiaoOrderList(loadFenxiaoOrderListDto); |
| | | } |
| | | |
| | | /** |
| | | *批量结算分销订单 |
| | | */ |
| | | @ApiOperation(value = "批量结算分销订单") |
| | | @PostMapping(value = "/updateSetOrderDone") |
| | | public @ResponseBody |
| | | AjaxResult updateSetOrderDone(@RequestBody UpdateSetOrderDoneDto updateSetOrderDoneDto) { |
| | | return shopSalesmanOrderService.updateSetOrderDone(updateSetOrderDoneDto); |
| | | } |
| | | |
| | | /** |
| | | * 结算记录 |
| | | */ |
| | | @ApiOperation(value = "结算记录") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = LoadSetOrderListDtoVo.class) |
| | | }) |
| | | @PostMapping(value = "/loadSetOrderList") |
| | | public @ResponseBody |
| | | AjaxResult loadSetOrderList(@RequestBody LoadSetOrderListDtoDto loadSetOrderListDto) { |
| | | return shopSalesmanOrderService.loadSetOrderList(loadSetOrderListDto); |
| | | } |
| | | |
| | | @RequestMapping(value = "/exportExcel") |
| | | public void exportExcel(HttpServletResponse response, LoadFenxiaoOrderListDto loadFenxiaoOrderListDto) throws IOException { |
| | | List<ExcelSheetPO> res = new ArrayList<>(); |
| | | ExcelSheetPO orderSheet = new ExcelSheetPO(); |
| | | String title = "分销订单明细"; |
| | | orderSheet.setSheetName(title); |
| | | orderSheet.setTitle(title); |
| | | String[] header = {"订单编号","实付金额(元)", "订单状态", "下单门店","客户", "推广员","收益类型","收益金额", "结算状态", "结算编号", "结算时间", "结算人"}; |
| | | orderSheet.setHeaders(header); |
| | | |
| | | List<FenxiaoOrderListExportVo> dataList = shopSalesmanOrderService.findFenxiaoOrderList(loadFenxiaoOrderListDto); |
| | | List<List<Object>> list = new ArrayList<>(); |
| | | if (dataList.size() > 0) { |
| | | for (FenxiaoOrderListExportVo item : dataList) { |
| | | List<Object> temp = new ArrayList<>(); |
| | | temp.add(item.getOrderNo()); |
| | | temp.add(item.getActualBalance()); |
| | | temp.add(item.getOrderState()); |
| | | temp.add(item.getAddress()); |
| | | temp.add(item.getCustom()); |
| | | temp.add(item.getParentSale()); |
| | | temp.add(item.getProfitType()); |
| | | temp.add(item.getProfitBalance()); |
| | | temp.add(item.getSettleType()); |
| | | temp.add(item.getSettleNo()); |
| | | temp.add(DateUtil.dateToString(item.getSettleTime(), DateUtil.DATE_FORMAT_MM)); |
| | | temp.add(item.getSettler()); |
| | | list.add(temp); |
| | | } |
| | | } |
| | | orderSheet.setDataList(list); |
| | | res.add(orderSheet); |
| | | response = ResponseHeadUtil.setExcelHead(response); |
| | | response.setHeader("Content-Disposition", |
| | | "attachment;filename=" + URLEncoder.encode(title + DateUtil.getTimeMark() + ".xlsx".trim(), "UTF-8")); |
| | | OutputStream os = response.getOutputStream(); |
| | | ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, res, os, true); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.action; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant; |
| | | import com.matrix.system.fenxiao.service.FenXiaoSettingService; |
| | | import com.matrix.system.fenxiao.vo.FenXiaoSettingVo; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.dao.ShoppingGoodsDao; |
| | | import com.matrix.system.shopXcx.bean.ShopProduct; |
| | | import com.matrix.system.shopXcx.dao.ShopProductDao; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/fenXiao/ruleSetting") |
| | | public class FenXiaoSettingAction { |
| | | |
| | | @Autowired |
| | | private FenXiaoSettingService fenXiaoSettingService; |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | @Autowired |
| | | private ShoppingGoodsDao shoppingGoodsDao; |
| | | |
| | | @Autowired |
| | | private SysVipInfoDao sysVipInfoDao; |
| | | |
| | | @Autowired |
| | | private ShopProductDao shopProductDao; |
| | | |
| | | /** |
| | | *查询分销配置 |
| | | */ |
| | | @RequestMapping(value = "/selectFenXiaoSetting") |
| | | public AjaxResult selectFenXiaoSetting() { |
| | | |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | |
| | | //分销开关 |
| | | String[] FXKGCode={FenxiaoSettingConstant.FX_SWITCH}; |
| | | String[] FXKGName={"分销开关"}; |
| | | List<FenXiaoSettingVo> fxkgRuleSettingsVo = getRuleSettingsVo(FXKGCode,FXKGName,companyId); |
| | | result.putInMap("fxkg", fxkgRuleSettingsVo); |
| | | //自购返佣 |
| | | String[] ZGFYCode={FenxiaoSettingConstant.FX_ZGFY}; |
| | | String[] ZGFYName={"自购返佣"}; |
| | | List<FenXiaoSettingVo> zgfyRuleSettingsVo = getRuleSettingsVo(ZGFYCode,ZGFYName,companyId); |
| | | result.putInMap("zgfy", zgfyRuleSettingsVo); |
| | | |
| | | //分销模式 |
| | | String[] FXMSCode={FenxiaoSettingConstant.FX_MODEL}; |
| | | String[] FXMSName={"分销模式"}; |
| | | List<FenXiaoSettingVo> fxmsRuleSettingsVo = getRuleSettingsVo(FXMSCode,FXMSName,companyId); |
| | | result.putInMap("fxms", fxmsRuleSettingsVo); |
| | | //申请方式 |
| | | String[] sqfsCode={FenxiaoSettingConstant.FX_APPLY_WAY}; |
| | | String[] sqfsName={"申请方式"}; |
| | | List<FenXiaoSettingVo> sqfsRuleSettingsVo = getRuleSettingsVo(sqfsCode,sqfsName,companyId); |
| | | result.putInMap("sqfs", sqfsRuleSettingsVo); |
| | | //审核方式 |
| | | String[] shfsCode={FenxiaoSettingConstant.FX_AUDIT_METHOD}; |
| | | String[] shfsName={"审核方式"}; |
| | | List<FenXiaoSettingVo> shfsRuleSettingsVo = getRuleSettingsVo(shfsCode,shfsName,companyId); |
| | | result.putInMap("shfs", shfsRuleSettingsVo); |
| | | //申请条件 |
| | | String[] sqtjCode={FenxiaoSettingConstant.FX_APPLY_CONDITION}; |
| | | String[] sqtjName={"申请条件"}; |
| | | List<FenXiaoSettingVo> sqtjRuleSettingsVo = getRuleSettingsVo(sqtjCode,sqtjName,companyId); |
| | | result.putInMap("sqtj", sqtjRuleSettingsVo); |
| | | if(CollUtil.isNotEmpty(sqtjRuleSettingsVo)){ |
| | | for(FenXiaoSettingVo fenXiaoSettingVo : sqtjRuleSettingsVo) { |
| | | //选择申请条件条件3时,获得选中产品集合 |
| | | if(FenxiaoSettingConstant.FX_APPLY_CONDITION_XFZDCP.equals(fenXiaoSettingVo.getParamValue())) { |
| | | String paramValue1 = fenXiaoSettingVo.getParamValue1(); |
| | | if(StrUtil.isNotEmpty(paramValue1)) { |
| | | List<Integer> idsList = new ArrayList<>(); |
| | | List<String> idsStringList = Arrays.asList(paramValue1.split(",")); |
| | | if(CollUtil.isNotEmpty(idsStringList)){ |
| | | for(String string : idsStringList) { |
| | | Integer parseInt = Integer.parseInt(string); |
| | | idsList.add(parseInt); |
| | | } |
| | | } |
| | | //List<ShoppingGoods> list = shoppingGoodsDao.selectByIds(idsList); |
| | | List<ShopProduct> shopProducts = shopProductDao.selectByIds(idsList); |
| | | result.putInMap("order", shopProducts); |
| | | } |
| | | }else{ |
| | | List<ShopProduct> shopProducts = new ArrayList<>(); |
| | | result.putInMap("order", shopProducts); |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 列表显示 |
| | | */ |
| | | @RequestMapping(value = "/selectProduct") |
| | | public @ResponseBody |
| | | AjaxResult selectProduct(ShopProduct shopProduct, PaginationVO pageVo) { |
| | | QueryUtil.setQueryLimitCom(shopProduct); |
| | | pageVo.setSort("createTime"); |
| | | pageVo.setOrder("desc"); |
| | | shopProduct.setDelFlag(AppConstance.DATA_USEABLE); |
| | | shopProduct.setCompanyId(shopProduct.getCompanyId()); |
| | | List<ShopProduct> dataList = shopProductDao.selectInPage(shopProduct, pageVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, |
| | | shopProductDao.selectTotalRecord(shopProduct)); |
| | | return result; |
| | | |
| | | } |
| | | |
| | | /** |
| | | *获取对应的规则设置数据 |
| | | * @param ArrayCode |
| | | * @param ArrayName |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | private List<FenXiaoSettingVo> getRuleSettingsVo(String[] ArrayCode,String[] ArrayName,Long companyId){ |
| | | List<BusParameterSettings> dataList = busParameterSettingsDao.selectByCodesAndCompanyId(Arrays.asList(ArrayCode), companyId); |
| | | List<FenXiaoSettingVo> scoreRuleSettingsVos=new ArrayList<FenXiaoSettingVo>(); |
| | | int index=0; |
| | | for (BusParameterSettings item:dataList){ |
| | | FenXiaoSettingVo paramVo=new FenXiaoSettingVo(); |
| | | BeanUtils.copyProperties(item,paramVo); |
| | | paramVo.setParamName(ArrayName[index]); |
| | | scoreRuleSettingsVos.add(paramVo); |
| | | index++; |
| | | } |
| | | return scoreRuleSettingsVos; |
| | | } |
| | | |
| | | /** |
| | | * 修改公司维度的分销规则 |
| | | */ |
| | | @PostMapping(value = "/updateFenXiaoSetting") |
| | | public @ResponseBody |
| | | AjaxResult updateFenXiaoSetting(@RequestBody List<BusParameterSettings> busParameterSettings) { |
| | | return fenXiaoSettingService.updateFenXiaoSettingByCompanyId(busParameterSettings); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.action; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao; |
| | | import com.matrix.system.fenxiao.dto.*; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanApply; |
| | | import com.matrix.system.fenxiao.service.ShopSalesmanApplyService; |
| | | import com.matrix.system.fenxiao.vo.*; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/fenXiao/fenXiaoUser") |
| | | public class FenXiaoUserAction { |
| | | |
| | | @Autowired |
| | | private ShopSalesmanApplyService shopSalesmanApplyService; |
| | | @Autowired |
| | | private ShopSalesmanApplyDao shopSalesmanApplyDao; |
| | | @Autowired |
| | | private SysVipInfoDao sysVipInfoDao; |
| | | @Autowired |
| | | private ShopSalesmanGradeDao shopSalesmanGradeDao; |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 分销员详情页面信息 |
| | | */ |
| | | @ApiOperation(value = "分销员详情页面信息") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = ShopSalesmanDetailVo.class) |
| | | }) |
| | | @PostMapping(value = "/loadParamSettingBasic") |
| | | public @ResponseBody |
| | | AjaxResult findShopSalesmanDetail(@RequestBody LoadParamSettingBasicDto loadParamSettingBasicDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(loadParamSettingBasicDto); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | SalesmanBasicDetailVo salesmanBasicDetailVo = shopSalesmanApplyService.selectShopSalesmanDetailByOpenId(loadParamSettingBasicDto.getUserId(),loadParamSettingBasicDto.getApplyId()); |
| | | result.putInMap("basicdetail", salesmanBasicDetailVo); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 分销员详情页面绑定客户 |
| | | */ |
| | | @ApiOperation(value = "分销员详情页面绑定客户") |
| | | @PostMapping(value = "/loadParamSetting") |
| | | public @ResponseBody |
| | | AjaxResult loadParamSetting(@RequestBody LoadParamSettingDto loadParamSettingDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(loadParamSettingDto); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | //排序 |
| | | if(StringUtils.isBlank(loadParamSettingDto.getSort())){ |
| | | loadParamSettingDto.setSort("create_time"); |
| | | loadParamSettingDto.setOrder("desc"); |
| | | } |
| | | //查询绑定客户信息 |
| | | Page<ShopCustomDetailVo> page = new Page(loadParamSettingDto.getPageNum(), loadParamSettingDto.getPageSize()); |
| | | IPage<ShopCustomDetailVo> customDetailRows = shopSalesmanApplyService.findCustomDetail(page,loadParamSettingDto); |
| | | result.putInMap("customDetailRecords", customDetailRows.getRecords()); |
| | | result.putInMap("customDetailTotal", customDetailRows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 分销员详情页面邀请下级 |
| | | */ |
| | | @ApiOperation(value = "分销员详情页面邀请下级") |
| | | @PostMapping(value = "/loadParamSettinglow") |
| | | public @ResponseBody |
| | | AjaxResult loadParamSettinglow(@RequestBody ShopSalesmanDetailDto shopSalesmanDetailDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(shopSalesmanDetailDto); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | //排序 |
| | | if(StringUtils.isBlank(shopSalesmanDetailDto.getSort())){ |
| | | shopSalesmanDetailDto.setSort("create_time"); |
| | | shopSalesmanDetailDto.setOrder("desc"); |
| | | } |
| | | //查询邀请下级信息 |
| | | Page<ShopCustomDetailVo> pageLow = new Page(shopSalesmanDetailDto.getPageNum(), shopSalesmanDetailDto.getPageSize()); |
| | | IPage<ShopCustomDetailVo> customLowRows = shopSalesmanApplyService.findCustomLow(pageLow,shopSalesmanDetailDto); |
| | | result.putInMap("customLowRecords", customLowRows.getRecords()); |
| | | result.putInMap("customLowTotal", customLowRows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 分销员详情页面收益订单 |
| | | */ |
| | | @ApiOperation(value = "分销员详情页面收益订单") |
| | | @PostMapping(value = "/loadParamSettingOrder") |
| | | public @ResponseBody |
| | | AjaxResult loadParamSettingOrder(@RequestBody ShopSalesmanDetailDto shopSalesmanDetailDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(shopSalesmanDetailDto); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | //排序 |
| | | if(StringUtils.isBlank(shopSalesmanDetailDto.getSort())){ |
| | | shopSalesmanDetailDto.setSort("create_time"); |
| | | shopSalesmanDetailDto.setOrder("desc"); |
| | | } |
| | | //查询收益订单 |
| | | Page<ShopOrderDetailVo> pageOrder = new Page(shopSalesmanDetailDto.getPageNum(), shopSalesmanDetailDto.getPageSize()); |
| | | IPage<ShopOrderDetailVo> orderRows = shopSalesmanApplyService.findShopOrderDetail(pageOrder,shopSalesmanDetailDto); |
| | | result.putInMap("orderRecords", orderRows.getRecords()); |
| | | result.putInMap("orderTotal", orderRows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *修改等级 |
| | | */ |
| | | @ApiOperation(value = "修改等级") |
| | | @PostMapping(value = "/changeSaleManGrade") |
| | | public @ResponseBody |
| | | AjaxResult changeSaleManGrade(@RequestBody ChangeSaleManGradeDto changeSaleManGradeDto) { |
| | | return shopSalesmanApplyService.changeSaleManGrade(changeSaleManGradeDto); |
| | | } |
| | | |
| | | /** |
| | | *解绑 |
| | | */ |
| | | @ApiOperation(value = "解绑") |
| | | @PostMapping(value = "/unbundlingSaleMan") |
| | | public @ResponseBody |
| | | AjaxResult unbundlingSaleMan(@RequestBody UnbundlingSaleManDto unbundlingSaleManDto) { |
| | | return shopSalesmanApplyService.unbundlingSaleMan(unbundlingSaleManDto); |
| | | } |
| | | |
| | | /** |
| | | *推广图片 |
| | | */ |
| | | @ApiOperation(value = "推广图片") |
| | | @PostMapping(value = "/updateTgtp") |
| | | public @ResponseBody |
| | | AjaxResult updateTgtp(@RequestBody UpdateTgtpDto updateTgtpDto) { |
| | | return shopSalesmanApplyService.updateTgtp(updateTgtpDto); |
| | | } |
| | | |
| | | /** |
| | | *推广图片 |
| | | */ |
| | | @RequestMapping(value = "/loadTgtpSetting") |
| | | public AjaxResult loadTgtpSetting() { |
| | | |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | |
| | | //推广文案 |
| | | String[] FXKGCode={FenxiaoSettingConstant.FX_TG_POSTER}; |
| | | String[] FXKGName={"推广图片"}; |
| | | List<FenXiaoSettingVo> fxkgRuleSettingsVo = getRuleSettingsVo(FXKGCode,FXKGName,companyId); |
| | | result.putInMap("tgtp", fxkgRuleSettingsVo.get(0)); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *推广计划更新 |
| | | */ |
| | | @ApiOperation(value = "推广计划更新") |
| | | @PostMapping(value = "/updateTgjh") |
| | | public @ResponseBody |
| | | AjaxResult updateTgjh(@RequestBody UpdateTgjhDto updateTgjhDto) { |
| | | return shopSalesmanApplyService.updateTgjh(updateTgjhDto); |
| | | } |
| | | /** |
| | | *查询推广计划 |
| | | */ |
| | | @RequestMapping(value = "/loadTgwaSetting") |
| | | public AjaxResult loadTgwaSetting() { |
| | | |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | |
| | | //推广文案 |
| | | String[] FXKGCode={FenxiaoSettingConstant.FX_TG_PLAN}; |
| | | String[] FXKGName={"推广文案"}; |
| | | List<FenXiaoSettingVo> fxkgRuleSettingsVo = getRuleSettingsVo(FXKGCode,FXKGName,companyId); |
| | | result.putInMap("tgwa", fxkgRuleSettingsVo.get(0)); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *获取对应的规则设置数据 |
| | | * @param ArrayCode |
| | | * @param ArrayName |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | private List<FenXiaoSettingVo> getRuleSettingsVo(String[] ArrayCode,String[] ArrayName,Long companyId){ |
| | | List<BusParameterSettings> dataList = busParameterSettingsDao.selectByCodesAndCompanyId(Arrays.asList(ArrayCode), companyId); |
| | | List<FenXiaoSettingVo> scoreRuleSettingsVos=new ArrayList<FenXiaoSettingVo>(); |
| | | int index=0; |
| | | for (BusParameterSettings item:dataList){ |
| | | FenXiaoSettingVo paramVo=new FenXiaoSettingVo(); |
| | | BeanUtils.copyProperties(item,paramVo); |
| | | paramVo.setParamName(ArrayName[index]); |
| | | scoreRuleSettingsVos.add(paramVo); |
| | | index++; |
| | | } |
| | | return scoreRuleSettingsVos; |
| | | } |
| | | |
| | | /** |
| | | * 分佣方案 |
| | | */ |
| | | @ApiOperation(value = "查询分佣方案") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = FyfaManageVo.class) |
| | | }) |
| | | @PostMapping(value = "/findFyfaManageList") |
| | | public @ResponseBody |
| | | AjaxResult findFyfaManageList(@RequestBody FyfaManageDto fyfaManageDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(fyfaManageDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(fyfaManageDto.getSort())){ |
| | | fyfaManageDto.setSort("create_time"); |
| | | fyfaManageDto.setOrder("asc"); |
| | | } |
| | | Page<FyfaManageVo> page = new Page(fyfaManageDto.getPageNum(), fyfaManageDto.getPageSize()); |
| | | IPage<FyfaManageVo> rows = shopSalesmanApplyService.findFyfaManageList(page,fyfaManageDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *新增分佣方案 |
| | | */ |
| | | @ApiOperation(value = "新增分佣方案") |
| | | @RequestMapping(value = "/addFyfa") |
| | | private @ResponseBody AjaxResult addFyfa(){ |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | shopSalesmanApplyService.addFyfa(user); |
| | | return AjaxResult.buildSuccessInstance("新增成功"); |
| | | } |
| | | |
| | | /** |
| | | *修改分佣方案 |
| | | */ |
| | | @ApiOperation(value = "修改分佣方案") |
| | | @PostMapping(value = "/updateFyfa") |
| | | public @ResponseBody |
| | | AjaxResult updateFyfa(@RequestBody UpdateFyfaDto updateFyfaDto) { |
| | | return shopSalesmanApplyService.updateFyfa(updateFyfaDto); |
| | | } |
| | | |
| | | /** |
| | | *删除分佣方案 |
| | | */ |
| | | @ApiOperation(value = "删除分佣方案") |
| | | @PostMapping(value = "/delFyfaApply") |
| | | public @ResponseBody |
| | | AjaxResult delFyfaApply(@RequestBody DelFyfaApplyDto delFyfaApplyDto) { |
| | | return shopSalesmanApplyService.delFyfaApply(delFyfaApplyDto); |
| | | } |
| | | |
| | | /** |
| | | * 查询分销员审核记录 |
| | | */ |
| | | @ApiOperation(value = "查询分销员审核记录") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = ShopSalesmanApplyVo.class) |
| | | }) |
| | | @PostMapping(value = "/findShopSalesmanApplyList") |
| | | public @ResponseBody |
| | | AjaxResult findShopSalesmanApplyList(@RequestBody ShopSalesmanApplyDto shopSalesmanApplyDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(shopSalesmanApplyDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(shopSalesmanApplyDto.getSort())){ |
| | | shopSalesmanApplyDto.setSort("create_time"); |
| | | shopSalesmanApplyDto.setOrder("desc"); |
| | | } |
| | | Page<ShopSalesmanApplyVo> page = new Page(shopSalesmanApplyDto.getPageNum(), shopSalesmanApplyDto.getPageSize()); |
| | | IPage<ShopSalesmanApplyVo> rows = shopSalesmanApplyService.findShopSalesmanApplyList(page,shopSalesmanApplyDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *获取分销员待审核记录 |
| | | */ |
| | | @ApiOperation(value = "获取分销员待审核记录") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = ShopSalesmanAppliingVo.class) |
| | | }) |
| | | @PostMapping(value = "/findShopSalesmanAppliingList") |
| | | public @ResponseBody |
| | | AjaxResult findShopSalesmanAppliingList(@RequestBody ShopSalesmanAppliingDto shopSalesmanAppliingDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(shopSalesmanAppliingDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(shopSalesmanAppliingDto.getSort())){ |
| | | shopSalesmanAppliingDto.setSort("create_time"); |
| | | shopSalesmanAppliingDto.setOrder("desc"); |
| | | } |
| | | |
| | | Page<ShopSalesmanAppliingVo> page = new Page(shopSalesmanAppliingDto.getPageNum(), shopSalesmanAppliingDto.getPageSize()); |
| | | IPage<ShopSalesmanAppliingVo> rows = shopSalesmanApplyService.selectBizUserApplyList(page,shopSalesmanAppliingDto); |
| | | |
| | | //IPage<ShopSalesmanAppliingVo> rows = shopSalesmanApplyService.findShopSalesmanAppliingList(page,shopSalesmanAppliingDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *新增分销员 |
| | | */ |
| | | @ApiOperation(value = "新增分销员") |
| | | @PostMapping(value = "/addSaleManApply") |
| | | public @ResponseBody |
| | | AjaxResult addSaleManApply(@RequestBody AddSaleManApplyDto addSaleManApplyDto) { |
| | | |
| | | if(addSaleManApplyDto.getGradeId()==null) { |
| | | return AjaxResult.buildFailInstance("请选择分销等级"); |
| | | } |
| | | |
| | | shopSalesmanApplyService.addSaleManApply(addSaleManApplyDto.getUserId(), addSaleManApplyDto.getGradeId()); |
| | | return AjaxResult.buildSuccessInstance("设置成功"); |
| | | } |
| | | |
| | | /** |
| | | *删除---设置成不是分销员 |
| | | */ |
| | | @ApiOperation(value = "删除---设置成不是分销员") |
| | | @PostMapping(value = "/delSaleManGradeApply") |
| | | public @ResponseBody |
| | | AjaxResult delSaleManGradeApply(@RequestBody DelSaleManGradeApplyDto delSaleManGradeApplyDto) { |
| | | return shopSalesmanApplyService.delSaleManGradeApply(delSaleManGradeApplyDto); |
| | | } |
| | | |
| | | /** |
| | | *审核分销员 |
| | | */ |
| | | @ApiOperation(value = "审核分销员") |
| | | @PostMapping(value = "/examineSaleManApply") |
| | | public @ResponseBody |
| | | AjaxResult examineSaleManApply(@RequestBody ExamineSaleManApplyDto examineSaleManApplyDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(examineSaleManApplyDto); |
| | | //待审核状态才允许提交 |
| | | ShopSalesmanApply shopSalesmanApply = shopSalesmanApplyDao.selectById(examineSaleManApplyDto.getApplyId()); |
| | | if(ObjectUtil.isEmpty(shopSalesmanApply)) { |
| | | return AjaxResult.buildFailInstance("当前记录有误"); |
| | | } |
| | | |
| | | SysVipInfo sysVipInfo = sysVipInfoDao.selectById(examineSaleManApplyDto.getUserId()); |
| | | if(ObjectUtil.isEmpty(sysVipInfo)) { |
| | | return AjaxResult.buildFailInstance("当前记录有误"); |
| | | } |
| | | |
| | | Integer applyStatus = shopSalesmanApply.getApplyStatus(); |
| | | if(ObjectUtil.isNotEmpty(applyStatus) && ShopSalesmanApply.APPLY_STATUS_DSH == applyStatus) { |
| | | Integer applyState = examineSaleManApplyDto.getApplyState(); |
| | | shopSalesmanApplyService.examineSaleManApply(shopSalesmanApply,applyState); |
| | | return AjaxResult.buildSuccessInstance("审核成功"); |
| | | }else{ |
| | | return AjaxResult.buildFailInstance("当前记录不是待审核状态"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | *获取对应的分销员等级 |
| | | */ |
| | | @RequestMapping(value = "/getShopSalesmanGrade") |
| | | private @ResponseBody AjaxResult getShopSalesmanGradeVo(){ |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | List<ShopSalesmanGradeVo> dataList = shopSalesmanApplyService.getShopSalesmanGradeVo(user.getCompanyId()); |
| | | result.putInMap("salesGrade", dataList); |
| | | return result; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.constant; |
| | | |
| | | public class FenxiaoSettingConstant { |
| | | /** |
| | | * 分销开关 |
| | | */ |
| | | public final static String FX_SWITCH = "FX_SWITCH"; |
| | | /** |
| | | * 分销模式 |
| | | */ |
| | | public final static String FX_MODEL = "FX_MODEL"; |
| | | /** |
| | | * 自购返佣 1:是 2:否 |
| | | */ |
| | | public final static String FX_ZGFY = "FX_ZGFY"; |
| | | |
| | | public final static String FX_ZGFY_YES = "1"; |
| | | public final static String FX_ZGFY_NO = "2"; |
| | | /** |
| | | * 申请方式 |
| | | */ |
| | | public final static String FX_APPLY_WAY = "FX_APPLY_WAY"; |
| | | /** |
| | | * 申请方式 1自动申请通过 |
| | | */ |
| | | public final static String FX_APPLY_WAY_AUTO = "1"; |
| | | /** |
| | | * 申请方式 2需要主动申请 |
| | | */ |
| | | public final static String FX_APPLY_WAY_CUSTOMER = "2"; |
| | | /** |
| | | * 审核方式 1系统自动审核,2人工审核 |
| | | */ |
| | | public final static String FX_AUDIT_METHOD = "FX_AUDIT_METHOD"; |
| | | /** |
| | | * 申请条件 |
| | | */ |
| | | public final static String FX_APPLY_CONDITION = "FX_APPLY_CONDITION"; |
| | | /** |
| | | * 申请条件 1 无条件 |
| | | */ |
| | | public final static String FX_APPLY_CONDITION_WTJ = "1"; |
| | | /** |
| | | * 申请条件 2 消费任意产品 |
| | | */ |
| | | public final static String FX_APPLY_CONDITION_XFRYCP = "2"; |
| | | /** |
| | | * 申请条件 3 消费指定产品 |
| | | */ |
| | | public final static String FX_APPLY_CONDITION_XFZDCP = "3"; |
| | | /** |
| | | * 申请条件 4 消费指定金额 |
| | | */ |
| | | public final static String FX_APPLY_CONDITION_XCZDJE = "4"; |
| | | /** |
| | | * 推广计划 |
| | | */ |
| | | public final static String FX_TG_PLAN = "FX_TG_PLAN"; |
| | | |
| | | public static final String FX_TG_POSTER ="FX_TG_POSTER"; |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.fenxiao.entity.BizUser; |
| | | |
| | | /** |
| | | * @description 推广员申请记录 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface BizUserDao extends BaseMapper<BizUser> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.fenxiao.entity.FenXiaoSettingEntity; |
| | | |
| | | public interface FenXiaoSettingDao extends BaseMapper<FenXiaoSettingEntity> { |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.fenxiao.entity.ShopRevenueFlow; |
| | | import com.matrix.system.shopXcx.api.dto.RevenueFlowDto; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @description 收益流水 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface ShopRevenueFlowDao extends BaseMapper<ShopRevenueFlow> { |
| | | |
| | | IPage<ShopRevenueFlow> selectRevenuFlowList(Page<ShopRevenueFlow> page, @Param("record") RevenueFlowDto revenueFlowDto); |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.fenxiao.entity.ShopSalemanSettlement; |
| | | |
| | | /** |
| | | * @description 订单结算记录 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface ShopSalemanSettlementDao extends BaseMapper<ShopSalemanSettlement> { |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.fenxiao.dto.LoadParamSettingDto; |
| | | import com.matrix.system.fenxiao.dto.ShopSalesmanAppliingDto; |
| | | import com.matrix.system.fenxiao.dto.ShopSalesmanApplyDto; |
| | | import com.matrix.system.fenxiao.dto.ShopSalesmanDetailDto; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanApply; |
| | | import com.matrix.system.fenxiao.vo.SalesmanBasicDetailVo; |
| | | import com.matrix.system.fenxiao.vo.ShopCustomDetailVo; |
| | | import com.matrix.system.fenxiao.vo.ShopOrderDetailVo; |
| | | import com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo; |
| | | import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo; |
| | | import com.matrix.system.shopXcx.vo.SalesmanCenterInfo; |
| | | import com.matrix.system.shopXcx.vo.SalesmanVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @description 推广员申请记录 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface ShopSalesmanApplyDao extends BaseMapper<ShopSalesmanApply> { |
| | | |
| | | IPage<SalesmanVo> selectInvitationuserInPage(Page<SalesmanVo> page, @Param("userId") Long userId, @Param("isSales")String isSales); |
| | | |
| | | IPage<SalesmanVo> selectInvitationuserInPage(Page<SalesmanVo> page, @Param("userId") Long userId); |
| | | |
| | | IPage<ShopSalesmanApplyVo> findShopSalesmanApplyList(Page<ShopSalesmanApplyVo> page, |
| | | @Param("record")ShopSalesmanApplyDto shopSalesmanApplyDto); |
| | | //根据公司ID、审核状态、会员昵称查询对应的记录 |
| | | IPage<ShopSalesmanAppliingVo> findShopSalesmanAppliingList(Page<ShopSalesmanAppliingVo> page, |
| | | @Param("record")ShopSalesmanAppliingDto shopSalesmanAppliingDto); |
| | | |
| | | IPage<ShopSalesmanAppliingVo> selectBizUserApplyList(Page<ShopSalesmanAppliingVo> page, |
| | | @Param("record")ShopSalesmanAppliingDto shopSalesmanAppliingDto); |
| | | |
| | | SalesmanCenterInfo selectSalesmanCenterInfo(Long id); |
| | | |
| | | SalesmanBasicDetailVo selectShopSalesmanDetailByOpenId(@Param("userId")Long userId, |
| | | @Param("companyId")Long companyId,@Param("applyId")long applyId); |
| | | |
| | | IPage<ShopCustomDetailVo> findCustomDetail(Page<ShopCustomDetailVo> page, |
| | | @Param("record")LoadParamSettingDto loadParamSettingDto); |
| | | |
| | | IPage<ShopCustomDetailVo> findCustomLow(Page<ShopCustomDetailVo> pageLow, |
| | | @Param("record")ShopSalesmanDetailDto shopSalesmanDetailDto); |
| | | |
| | | IPage<ShopOrderDetailVo> findShopOrderDetail(Page<ShopOrderDetailVo> pageOrder, |
| | | @Param("record")ShopSalesmanDetailDto shopSalesmanDetailDto); |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.fenxiao.dto.FyfaManageDto; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanGrade; |
| | | import com.matrix.system.fenxiao.vo.FyfaManageVo; |
| | | import com.matrix.system.fenxiao.vo.ShopSalesmanGradeVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 推广员等级 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface ShopSalesmanGradeDao extends BaseMapper<ShopSalesmanGrade> { |
| | | |
| | | List<ShopSalesmanGradeVo> getShopSalesmanGradeVo(@Param("companyId")Long companyId); |
| | | |
| | | IPage<FyfaManageVo> findFyfaManageList(Page<FyfaManageVo> page,@Param("record")FyfaManageDto fyfaManageDto); |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.fenxiao.dto.LoadFenxiaoOrderListDto; |
| | | import com.matrix.system.fenxiao.dto.LoadSetOrderListDtoDto; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanOrder; |
| | | import com.matrix.system.fenxiao.vo.FenxiaoOrderListExportVo; |
| | | import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderBasicVo; |
| | | import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderListVo; |
| | | import com.matrix.system.fenxiao.vo.LoadSetOrderListDtoVo; |
| | | import com.matrix.system.shopXcx.api.dto.SaleOrderDto; |
| | | import com.matrix.system.shopXcx.vo.SalesOrderVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 分销订单 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface ShopSalesmanOrderDao extends BaseMapper<ShopSalesmanOrder> { |
| | | |
| | | /** |
| | | * 查询推广订单 |
| | | * @param page |
| | | * @param saleOrderDto |
| | | * @return |
| | | */ |
| | | IPage<SalesOrderVo> selectSalesManOrder(Page<SalesOrderVo> page, @Param("record") SaleOrderDto saleOrderDto); |
| | | |
| | | LoadFenxiaoOrderBasicVo selectFenxiaoOrderBasicByCompanyId(@Param("companyId")Long companyId); |
| | | |
| | | IPage<LoadFenxiaoOrderListVo> findFenxiaoOrderList(Page<LoadFenxiaoOrderListVo> page, |
| | | @Param("record")LoadFenxiaoOrderListDto loadFenxiaoOrderListDto); |
| | | |
| | | IPage<LoadSetOrderListDtoVo> findSetOrderList(Page<LoadSetOrderListDtoVo> page, |
| | | @Param("record")LoadSetOrderListDtoDto loadSetOrderListDto); |
| | | |
| | | List<FenxiaoOrderListExportVo> selectFenxiaoOrderListNoPage(@Param("record")LoadFenxiaoOrderListDto loadFenxiaoOrderListDto); |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanOrderItem; |
| | | |
| | | /** |
| | | * @description 分销单明细 |
| | | * @author yourName |
| | | * @date 2021-03-12 13:17 |
| | | */ |
| | | public interface ShopSalesmanOrderItemDao extends BaseMapper<ShopSalesmanOrderItem> { |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "AddSaleManApplyDto", description = "查询参数") |
| | | public class AddSaleManApplyDto { |
| | | |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | |
| | | @ApiModelProperty(value ="等级ID") |
| | | private Long gradeId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ChangeSaleManGradeDto", description = "查询参数") |
| | | public class ChangeSaleManGradeDto { |
| | | |
| | | @ApiModelProperty(value ="会员id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value ="等级ID") |
| | | private Long gradeId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "DelFyfaApplyDto", description = "参数") |
| | | public class DelFyfaApplyDto { |
| | | |
| | | @ApiModelProperty(value ="申请记录ID") |
| | | private Long gradeId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "DelSaleManGradeApplyDto", description = "查询参数") |
| | | public class DelSaleManGradeApplyDto { |
| | | |
| | | @ApiModelProperty(value ="会员id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value ="申请记录ID") |
| | | private Long applyId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ExamineSaleManApplyDto", description = "查询参数") |
| | | public class ExamineSaleManApplyDto { |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "申请记录ID") |
| | | private Long applyId; |
| | | |
| | | @ApiModelProperty(value ="审核状态 2:同意 3:不同意") |
| | | private Integer applyState; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "FyfaManageDto", description = "查询参数") |
| | | public class FyfaManageDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value ="申请记录ID") |
| | | private Long applyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LoadFenxiaoOrderBasicDto", description = "查询参数") |
| | | public class LoadFenxiaoOrderBasicDto { |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LoadFenxiaoOrderListDto", description = "查询参数") |
| | | public class LoadFenxiaoOrderListDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | @ApiModelProperty(value ="订单状态") |
| | | private Integer ddType; |
| | | |
| | | @ApiModelProperty(value ="结算状态") |
| | | private Integer orderType; |
| | | |
| | | @ApiModelProperty(value ="客户名称") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value ="推广员名称") |
| | | private String tgy; |
| | | |
| | | @ApiModelProperty(value ="开始时间") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty(value ="结束时间") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty(value ="结算编号") |
| | | private String jsbh; |
| | | |
| | | @ApiModelProperty(value ="订单号") |
| | | private String ddh; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LoadParamSettingBasicDto", description = "查询参数") |
| | | public class LoadParamSettingBasicDto { |
| | | |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value ="申请记录ID") |
| | | private Long applyId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LoadParamSettingDto", description = "查询参数") |
| | | public class LoadParamSettingDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="会员姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value ="申请记录ID") |
| | | private Long applyId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LoadSetOrderListDtoDto", description = "查询参数") |
| | | public class LoadSetOrderListDtoDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | @ApiModelProperty(value ="会员姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value ="开始时间") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty(value ="结束时间") |
| | | private Date endTime; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ShopSalesmanAppliingDto", description = "查询参数") |
| | | public class ShopSalesmanAppliingDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="会员名称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ShopSalesmanApplyDto", description = "查询参数") |
| | | public class ShopSalesmanApplyDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="审核状态") |
| | | private Integer shenheState; |
| | | @ApiModelProperty(value ="分销员等级") |
| | | private Long salemanGrade; |
| | | @ApiModelProperty(value ="会员姓名") |
| | | private String userName; |
| | | |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ShopSalesmanDetailDto", description = "查询参数") |
| | | public class ShopSalesmanDetailDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="会员姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value ="申请记录ID") |
| | | private Long applyId; |
| | | |
| | | @ApiModelProperty(value = " 结算状态1,待结算,2,已结算,3已退款") |
| | | private Integer orderType; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UnbundlingSaleManDto", description = "查询参数") |
| | | public class UnbundlingSaleManDto { |
| | | |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateFyfaDto", description = "参数") |
| | | public class UpdateFyfaDto { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "方案名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "自购返佣%") |
| | | private Double selfCommission; |
| | | |
| | | @ApiModelProperty(value = "推广提成%") |
| | | private Double sealesCommission; |
| | | |
| | | @ApiModelProperty(value = "邀请提成 %") |
| | | private Double invitationCommission; |
| | | |
| | | @ApiModelProperty(value = "等级条件(推广金额)") |
| | | private Double gradeCondition; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateSetOrderDoneDto", description = "查询参数") |
| | | public class UpdateSetOrderDoneDto { |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | @ApiModelProperty(value ="需要处理的IDs(字符串逗号隔开)") |
| | | private String orderIds; |
| | | |
| | | @ApiModelProperty(value ="结算方式1,线下结算,2余额结算") |
| | | private Integer setType; |
| | | |
| | | @ApiModelProperty(value ="结算人数") |
| | | private Integer manCount; |
| | | |
| | | @ApiModelProperty(value ="结算单数") |
| | | private Integer orderCount; |
| | | |
| | | @ApiModelProperty(value ="结算金额") |
| | | private Double amount; |
| | | |
| | | @ApiModelProperty(value ="备注") |
| | | private String remark; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateTgjhDto", description = "参数") |
| | | public class UpdateTgjhDto { |
| | | |
| | | @ApiModelProperty(value = "方案名称") |
| | | private String tgfa; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateTgjhDto", description = "参数") |
| | | public class UpdateTgtpDto { |
| | | |
| | | @ApiModelProperty(value = "方案名称") |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description 用户表 |
| | | * @author jyy |
| | | */ |
| | | @Data |
| | | @TableName("biz_user") |
| | | public class BizUser { |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private String userId; |
| | | |
| | | |
| | | /** |
| | | * 真实姓名 |
| | | */ |
| | | private String userName; |
| | | |
| | | |
| | | /** |
| | | * 密码 |
| | | */ |
| | | private String userPassword; |
| | | |
| | | |
| | | /** |
| | | * 用户昵称 |
| | | */ |
| | | private String nickName; |
| | | |
| | | |
| | | /** |
| | | * 头像 |
| | | */ |
| | | private String avatarUrl; |
| | | |
| | | |
| | | /** |
| | | * 微信openid用户唯一标识 |
| | | */ |
| | | private String openId; |
| | | |
| | | |
| | | /** |
| | | * 用户在开发平台的唯一标识符 |
| | | */ |
| | | private String unionId; |
| | | |
| | | |
| | | /** |
| | | * 性别 1、男 2、女 0、未知 |
| | | */ |
| | | private String gender; |
| | | |
| | | |
| | | /** |
| | | * 手机号码 |
| | | */ |
| | | private String phoneNumber; |
| | | |
| | | |
| | | /** |
| | | * 用户所在地 |
| | | */ |
| | | private String area; |
| | | |
| | | |
| | | /** |
| | | * 用户所在城市 |
| | | */ |
| | | private String city; |
| | | |
| | | |
| | | /** |
| | | * 用户所在省份 |
| | | */ |
| | | private String province; |
| | | |
| | | |
| | | /** |
| | | * 用户所在国家 |
| | | */ |
| | | private String country; |
| | | |
| | | |
| | | /** |
| | | * 会话密匙 |
| | | */ |
| | | private String sessionKey; |
| | | |
| | | |
| | | /** |
| | | * 最后登录时间 |
| | | */ |
| | | private Date lastLoginTime; |
| | | |
| | | |
| | | /** |
| | | * 用户状态 |
| | | */ |
| | | private Integer userStatus; |
| | | |
| | | |
| | | /** |
| | | * vip等级 |
| | | */ |
| | | private Integer userVip; |
| | | |
| | | |
| | | /** |
| | | * 到期时间 |
| | | */ |
| | | private Date userExpiryTime; |
| | | |
| | | |
| | | /** |
| | | * 认证信息 |
| | | */ |
| | | private String userAuthentication; |
| | | |
| | | |
| | | /** |
| | | * 用户是否授权 1、是 2、否 |
| | | */ |
| | | private Integer userIsAuthorize; |
| | | |
| | | |
| | | /** |
| | | * 用户临时名称 |
| | | */ |
| | | private String userTempName; |
| | | |
| | | |
| | | /** |
| | | * 用户临时头像 |
| | | */ |
| | | private String userTempAvatarUrl; |
| | | |
| | | |
| | | /** |
| | | * 用户类型 1、普通用户 2、会员 3、游客 |
| | | */ |
| | | private Integer userType; |
| | | |
| | | |
| | | /** |
| | | * 用户总积分 |
| | | */ |
| | | private Integer totalScore; |
| | | |
| | | |
| | | /** |
| | | * 用户当前积分 |
| | | */ |
| | | private Integer currentScore; |
| | | |
| | | |
| | | /** |
| | | * 上级用户openId |
| | | */ |
| | | private String parentOpenId; |
| | | |
| | | |
| | | /** |
| | | * 绑定上级用户时间 |
| | | */ |
| | | private Date bindingParentTime; |
| | | |
| | | |
| | | /** |
| | | * 是否是销售员(1=是,0=否) |
| | | */ |
| | | private Integer isSales; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | |
| | | @TableName("score_order") |
| | | public class FenXiaoSettingEntity extends BaseEntity { |
| | | |
| | | private String orderNo; |
| | | |
| | | public String getOrderNo() { |
| | | return orderNo; |
| | | } |
| | | |
| | | public void setOrderNo(String orderNo) { |
| | | this.orderNo = orderNo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description 收益流水 |
| | | * @author yourName |
| | | * @date 2021-03-10 17:34 |
| | | */ |
| | | @Data |
| | | @TableName("shop_revenue_flow") |
| | | public class ShopRevenueFlow extends BaseEntity { |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 推广收益类型 推广收益 |
| | | */ |
| | | public static final String TYPE_TGSY = "推广收益"; |
| | | /** |
| | | * 推广收益类型 邀请收益 |
| | | */ |
| | | |
| | | public static final String TYPE_YQSY = "邀请收益"; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(hidden = true) |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 收益说明 |
| | | */ |
| | | |
| | | @ApiModelProperty(value = "收益说明") |
| | | private String revenueContent; |
| | | |
| | | /** |
| | | * 收益金额 |
| | | */ |
| | | |
| | | @ApiModelProperty(value = "收益金额") |
| | | private Double amount; |
| | | |
| | | /** |
| | | * 原始订单ID |
| | | */ |
| | | |
| | | @ApiModelProperty(value = "原始订单ID") |
| | | private Long businessId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description 订单结算记录 |
| | | * @author yourName |
| | | * @date 2021-03-10 17:34 |
| | | */ |
| | | @Data |
| | | @TableName("shop_saleman_settlement") |
| | | public class ShopSalemanSettlement extends BaseEntity { |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * 结算编号头部编码 |
| | | */ |
| | | public static final String ORDERNO_START = "J"; |
| | | |
| | | /** |
| | | * 结算方式 1 线下结算 |
| | | */ |
| | | public static final Integer SETTLEMENTWAY_XXJS = 1; |
| | | |
| | | /** |
| | | * 结算方式 2 微信余额结算 |
| | | */ |
| | | public static final Integer SETTLEMENTWAY_YEJS = 2; |
| | | |
| | | |
| | | /** |
| | | * 结算编号 |
| | | */ |
| | | |
| | | |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 结算方式1,线下结算,2余额结算 |
| | | */ |
| | | |
| | | |
| | | private Integer settlementWay; |
| | | |
| | | /** |
| | | * 结算人数 |
| | | */ |
| | | |
| | | |
| | | private Integer manCount; |
| | | |
| | | /** |
| | | * 结算单数 |
| | | */ |
| | | |
| | | |
| | | private Integer orderCount; |
| | | |
| | | /** |
| | | * 结算金额 |
| | | */ |
| | | |
| | | |
| | | private Double amount; |
| | | |
| | | /** |
| | | * 结算人 |
| | | */ |
| | | |
| | | |
| | | private Integer userId; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | |
| | | |
| | | private String remark; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description 推广员申请记录 |
| | | * @author yourName |
| | | * @date 2021-03-10 17:34 |
| | | */ |
| | | @Data |
| | | @TableName("shop_salesman_apply") |
| | | public class ShopSalesmanApply extends BaseEntity { |
| | | /** |
| | | * 审核状态-1、待审核 |
| | | */ |
| | | public static final int APPLY_STATUS_DSH = 1; |
| | | /** |
| | | * 审核状态-2通过 |
| | | */ |
| | | public static final int APPLY_STATUS_TG= 2; |
| | | /** |
| | | * 审核状态-3未通过 |
| | | */ |
| | | public static final int APPLY_STATUS_WTG = 3; |
| | | /** |
| | | * 审核状态-4系统删除 |
| | | */ |
| | | public static final int APPLY_STATUS_XTQX = 4; |
| | | |
| | | |
| | | /** |
| | | * 申请方式1、自主申请 |
| | | */ |
| | | public static final int APPLY_WAY_SELF=1; |
| | | /** |
| | | * 申请方式2、自动添加 |
| | | */ |
| | | public static final int APPLY_WAY_AUTO_ADD=2; |
| | | /** |
| | | * 申请方式3上级邀请 |
| | | */ |
| | | public static final int APPLY_WAY_INVITATION=3; |
| | | /** |
| | | * 申请方式 4、手动添加 |
| | | */ |
| | | public static final int APPLY_WAY_HAND_ADD=4; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "申请方式1、自主申请,2、自动添加,3上级邀请,4、手动添加") |
| | | private Integer applyWay; |
| | | |
| | | @ApiModelProperty(value = "申请用户id") |
| | | private Long userId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "邀请用户ID") |
| | | private Long parentUserId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "申请状态1、待审核,2通过,3未通过") |
| | | private Integer applyStatus; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "等级ID") |
| | | private long gradeId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description 推广员等级 |
| | | * @author yourName |
| | | * @date 2021-03-10 17:34 |
| | | */ |
| | | @Data |
| | | @TableName("shop_salesman_grade") |
| | | public class ShopSalesmanGrade extends BaseEntity { |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 等级名称 |
| | | */ |
| | | |
| | | |
| | | private String name; |
| | | |
| | | /** |
| | | * 推广提成% |
| | | */ |
| | | |
| | | |
| | | private Double sealesCommission; |
| | | |
| | | /** |
| | | * 自购返佣比例% |
| | | */ |
| | | |
| | | private Double selfCommission; |
| | | |
| | | |
| | | /** |
| | | * 邀请提成 % |
| | | */ |
| | | |
| | | |
| | | private Double invitationCommission; |
| | | |
| | | /** |
| | | * 等级条件(推广金额额) |
| | | */ |
| | | |
| | | |
| | | private Double gradeCondition; |
| | | |
| | | /** |
| | | * 默认等级1是,2不是 |
| | | */ |
| | | |
| | | |
| | | private Integer isDefault; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description 分销订单 |
| | | * @author yourName |
| | | * @date 2021-03-10 17:34 |
| | | */ |
| | | @Data |
| | | @TableName("shop_salesman_order") |
| | | public class ShopSalesmanOrder extends BaseEntity { |
| | | /** |
| | | * 推广收益类型1推广收益 |
| | | */ |
| | | public static final Integer REVENUE_TYPE_SALES = 1; |
| | | |
| | | /** |
| | | * 推广收益类型2邀请收益 |
| | | */ |
| | | public static final Integer REVENUE_TYPE_INVITATION = 2; |
| | | /** |
| | | * 分销单状态1待结算 |
| | | */ |
| | | public static final Integer STATUS_DJS = 1; |
| | | /** |
| | | * 分销单状态2已结算 |
| | | */ |
| | | public static final Integer STATUS_YJS = 2; |
| | | /** |
| | | * 分销单状态3已退款 |
| | | */ |
| | | public static final Integer STATUS_YTK = 3; |
| | | |
| | | |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 订单id |
| | | */ |
| | | |
| | | |
| | | private Long orderId ; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | |
| | | |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 收益人id |
| | | */ |
| | | |
| | | |
| | | private Long salesUserId; |
| | | |
| | | /** |
| | | * 收益类型1,推广收益,2邀请收益 |
| | | */ |
| | | |
| | | |
| | | private Integer revenueType; |
| | | |
| | | /** |
| | | * 收益金额 |
| | | */ |
| | | |
| | | |
| | | private Double amount; |
| | | |
| | | /** |
| | | * 结算状态 1,待结算,2,已结算,3已退款 |
| | | */ |
| | | private Integer orderStatus; |
| | | |
| | | /** |
| | | * 结算单ID |
| | | */ |
| | | |
| | | |
| | | private Long settlementId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description 分销单明细 |
| | | * @author yourName |
| | | * @date 2021-03-12 13:17 |
| | | */ |
| | | @Data |
| | | @TableName("shop_salesman_order_item") |
| | | public class ShopSalesmanOrderItem extends BaseEntity { |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 订单id |
| | | */ |
| | | |
| | | |
| | | private Long orderId ; |
| | | |
| | | /** |
| | | * 分销订单id |
| | | */ |
| | | |
| | | |
| | | private Long salesmanOrderId; |
| | | |
| | | /** |
| | | * 订单明细id |
| | | */ |
| | | |
| | | |
| | | private Long orderItemId; |
| | | |
| | | /** |
| | | * 收益金额 |
| | | */ |
| | | |
| | | |
| | | private Double amount; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.fenxiao.dao.FenXiaoSettingDao; |
| | | import com.matrix.system.fenxiao.entity.FenXiaoSettingEntity; |
| | | import com.matrix.system.hive.bean.ShoppingGoods; |
| | | |
| | | @Service |
| | | public class FenXiaoSettingService extends ServiceImpl<FenXiaoSettingDao, FenXiaoSettingEntity> { |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | public AjaxResult updateFenXiaoSettingByCompanyId(List<BusParameterSettings> busParameterSettings) { |
| | | //获取当前登录人员信息 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | for (BusParameterSettings busParameterSetting:busParameterSettings ) { |
| | | String paramCode = busParameterSetting.getParamCode(); |
| | | if(StringUtils.isNotBlank(paramCode)){ |
| | | //删除原有code |
| | | BusParameterSettings delParanm=new BusParameterSettings(); |
| | | delParanm.setCompanyId(user.getCompanyId()); |
| | | delParanm.setParamCode(paramCode); |
| | | busParameterSettingsDao.deleteByModel(delParanm); |
| | | //添加新的code |
| | | BusParameterSettings newParam=new BusParameterSettings(); |
| | | newParam.setParamCode(paramCode); |
| | | newParam.setCompanyId(user.getCompanyId()); |
| | | newParam.setParamValue(busParameterSetting.getParamValue()); |
| | | newParam.setParamValue1(busParameterSetting.getParamValue1()); |
| | | newParam.setParamValue2(busParameterSetting.getParamValue2()); |
| | | busParameterSettingsDao.insert(newParam); |
| | | }else{ |
| | | return AjaxResult.buildFailInstance("code不能为空"); |
| | | } |
| | | } |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, "更新成功"); |
| | | return result; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.matrix.system.fenxiao.dao.ShopRevenueFlowDao; |
| | | import com.matrix.system.fenxiao.entity.ShopRevenueFlow; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @description 收益流水 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | @Service |
| | | public class ShopRevenueFlowService extends ServiceImpl<ShopRevenueFlowDao, ShopRevenueFlow>{ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.matrix.system.fenxiao.dao.ShopSalemanSettlementDao; |
| | | import com.matrix.system.fenxiao.entity.ShopSalemanSettlement; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @description 订单结算记录 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | @Service |
| | | public class ShopSalemanSettlementService extends ServiceImpl<ShopSalemanSettlementDao, ShopSalemanSettlement>{ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.service; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.VerificationResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao; |
| | | import com.matrix.system.fenxiao.dto.*; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanApply; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanGrade; |
| | | import com.matrix.system.fenxiao.vo.*; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.hive.service.SysVipInfoService; |
| | | import com.matrix.system.shopXcx.dao.ShopOrderV2Dao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 推广员申请记录 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | @Service |
| | | public class ShopSalesmanApplyService extends ServiceImpl<ShopSalesmanApplyDao, ShopSalesmanApply>{ |
| | | |
| | | |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | @Autowired |
| | | ShopSalesmanApplyDao shopSalesmanApplyDao; |
| | | |
| | | @Autowired |
| | | ShopSalesmanGradeDao shopSalesmanGradeDao; |
| | | |
| | | @Autowired |
| | | SysVipInfoDao sysVipInfoDao; |
| | | |
| | | @Autowired |
| | | SysVipInfoService sysVipInfoService; |
| | | |
| | | @Autowired |
| | | ShopOrderV2Dao shopOrderV2Dao; |
| | | |
| | | /** |
| | | * 申请成为推广员 |
| | | * @param userId |
| | | * @param invitationId |
| | | * @return |
| | | */ |
| | | public ShopSalesmanApply applyToBeAnSalesman(Long userId,Long gradeId,Long invitationId,int applyWay) { |
| | | |
| | | SysVipInfo loginUser=sysVipInfoDao.selectById(userId); |
| | | //验证申请条件 |
| | | VerificationResult verificationResult = isAbleToBeAnSalesman(userId,loginUser.getCompanyId()); |
| | | if(verificationResult.isJudgeResult()){ |
| | | //校验审核状态,和是否重复发起 |
| | | QueryWrapper<ShopSalesmanApply> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("user_id",loginUser.getId()); |
| | | queryWrapper.in("apply_status",Arrays.asList("1,2".split(","))); |
| | | ShopSalesmanApply checkApply = shopSalesmanApplyDao.selectOne(queryWrapper); |
| | | if(checkApply==null|| |
| | | checkApply.getApplyStatus()==ShopSalesmanApply.APPLY_STATUS_WTG){ |
| | | |
| | | ShopSalesmanApply shopSalesmanApply=new ShopSalesmanApply(); |
| | | shopSalesmanApply.setUserId(userId); |
| | | |
| | | shopSalesmanApply.setCreateBy(MatrixConstance.SYSTEM_USER); |
| | | shopSalesmanApply.setApplyWay(ShopSalesmanApply.APPLY_WAY_SELF); |
| | | |
| | | shopSalesmanApply.setCompanyId(loginUser.getCompanyId()); |
| | | shopSalesmanApply.setUpdateBy(MatrixConstance.SYSTEM_USER); |
| | | Date date = new Date(); |
| | | shopSalesmanApply.setCreateTime(date); |
| | | shopSalesmanApply.setUpdateTime(date); |
| | | |
| | | if(invitationId!=null){ |
| | | shopSalesmanApply.setParentUserId(invitationId); |
| | | }else if(loginUser.getRecommendId()!=null){ |
| | | //如果曾经是被邀请进来的则自动绑定为之前邀请人的下级 |
| | | shopSalesmanApply.setParentUserId(loginUser.getRecommendId()); |
| | | } |
| | | if(gradeId!=null){ |
| | | shopSalesmanApply.setGradeId(gradeId); |
| | | }else{ |
| | | //获取初始等级ID(公司id,是否为初始等级) |
| | | QueryWrapper<ShopSalesmanGrade> queryWrapperOrepool = new QueryWrapper<>(); |
| | | queryWrapperOrepool.eq("company_id", loginUser.getCompanyId()); |
| | | queryWrapperOrepool.eq("is_default", 1); |
| | | ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectOne(queryWrapperOrepool); |
| | | shopSalesmanApply.setGradeId(shopSalesmanGrade.getId()); |
| | | } |
| | | shopSalesmanApply.setApplyWay(applyWay); |
| | | |
| | | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_AUDIT_METHOD, loginUser.getCompanyId()); |
| | | if(busParameterSettings!=null |
| | | &&busParameterSettings.getParamValue().equals("1")){ |
| | | //自动审核 |
| | | //初始等级ID(公司id,是否为初始等级) |
| | | QueryWrapper<ShopSalesmanGrade> queryWrapperOrepool = new QueryWrapper<>(); |
| | | queryWrapperOrepool.eq("company_id", loginUser.getCompanyId()); |
| | | queryWrapperOrepool.eq("is_default", 1); |
| | | ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectOne(queryWrapperOrepool); |
| | | shopSalesmanApply.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_TG); |
| | | sysVipInfoService.setToBeAnSalesman(loginUser.getId(),invitationId,shopSalesmanGrade.getId()); |
| | | |
| | | }else{ |
| | | shopSalesmanApply.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_DSH); |
| | | } |
| | | shopSalesmanApplyDao.insert(shopSalesmanApply); |
| | | return shopSalesmanApply; |
| | | }else{ |
| | | throw new GlobleException("不能重复申请"); |
| | | } |
| | | }else{ |
| | | throw new GlobleException(verificationResult.getMsg()); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 判断是否满足申请成为分销员的条件 |
| | | */ |
| | | public VerificationResult isAbleToBeAnSalesman(Long userId,Long companyId) { |
| | | |
| | | VerificationResult verificationResult=null; |
| | | |
| | | //申请模式 |
| | | BusParameterSettings applyWay = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_APPLY_WAY, companyId); |
| | | if (FenxiaoSettingConstant.FX_APPLY_WAY_AUTO.equals(applyWay.getParamValue())) { |
| | | verificationResult= VerificationResult.buildVerificationResult(true); |
| | | }else{ |
| | | //申请条件 |
| | | BusParameterSettings applyCondition = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_APPLY_CONDITION, companyId); |
| | | switch (applyCondition.getParamValue()){ |
| | | case FenxiaoSettingConstant.FX_APPLY_CONDITION_WTJ: |
| | | verificationResult= VerificationResult.buildVerificationResult(true); |
| | | break; |
| | | case FenxiaoSettingConstant.FX_APPLY_CONDITION_XFZDCP: |
| | | int buyZdcpCount= shopOrderV2Dao.countBuyZdcp(userId,applyCondition.getParamValue1()); |
| | | if(buyZdcpCount>0){ |
| | | verificationResult= VerificationResult.buildVerificationResult(true); |
| | | }else{ |
| | | verificationResult= VerificationResult.buildVerificationResult(false,"不符合申请条件,请消费指定产品后再申请!"); |
| | | } |
| | | break; |
| | | case FenxiaoSettingConstant.FX_APPLY_CONDITION_XFRYCP: |
| | | //判断用户是否有确认收货的产品 |
| | | int receivedOrderCount= shopOrderV2Dao.selectReceivedOrderCount(userId); |
| | | if(receivedOrderCount>0){ |
| | | verificationResult= VerificationResult.buildVerificationResult(true); |
| | | }else{ |
| | | verificationResult= VerificationResult.buildVerificationResult(false,"不符合申请条件,请消费任意产品后再申请!"); |
| | | } |
| | | break; |
| | | case FenxiaoSettingConstant.FX_APPLY_CONDITION_XCZDJE: |
| | | Double zdje=Double.parseDouble(applyCondition.getParamValue2()); |
| | | Double yxfje=shopOrderV2Dao.countOrderAmount(userId); |
| | | if(zdje<yxfje){ |
| | | verificationResult=VerificationResult.buildVerificationResult(true); |
| | | }else{ |
| | | verificationResult= VerificationResult.buildVerificationResult(false,"不符合申请条件,请消费满"+zdje+"元后再申请!"); |
| | | } |
| | | break; |
| | | default: |
| | | verificationResult= VerificationResult.buildVerificationResult(true); |
| | | } |
| | | } |
| | | return verificationResult; |
| | | } |
| | | |
| | | |
| | | public IPage<ShopSalesmanApplyVo> findShopSalesmanApplyList(Page<ShopSalesmanApplyVo> page, ShopSalesmanApplyDto shopSalesmanApplyDto) { |
| | | return shopSalesmanApplyDao.findShopSalesmanApplyList(page,shopSalesmanApplyDto); |
| | | } |
| | | |
| | | public IPage<ShopSalesmanAppliingVo> findShopSalesmanAppliingList(Page<ShopSalesmanAppliingVo> page, |
| | | ShopSalesmanAppliingDto shopSalesmanAppliingDto) { |
| | | return shopSalesmanApplyDao.findShopSalesmanAppliingList(page,shopSalesmanAppliingDto); |
| | | } |
| | | |
| | | public IPage<ShopSalesmanAppliingVo> selectBizUserApplyList(Page<ShopSalesmanAppliingVo> page, ShopSalesmanAppliingDto shopSalesmanAppliingDto) { |
| | | return shopSalesmanApplyDao.selectBizUserApplyList(page,shopSalesmanAppliingDto); |
| | | } |
| | | |
| | | public List<ShopSalesmanGradeVo> getShopSalesmanGradeVo(Long companyId) { |
| | | return shopSalesmanGradeDao.getShopSalesmanGradeVo(companyId); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void addSaleManApply(Long userId,Long gradeId) { |
| | | SysVipInfo user = sysVipInfoDao.selectById(userId); |
| | | applyToBeAnSalesman(user.getId(),gradeId, null,ShopSalesmanApply.APPLY_WAY_HAND_ADD); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void examineSaleManApply(ShopSalesmanApply shopSalesmanApply, Integer applyState) { |
| | | Long userId = shopSalesmanApply.getUserId(); |
| | | Long parentUserId = shopSalesmanApply.getParentUserId(); |
| | | SysVipInfo sysVipInfo = sysVipInfoDao.selectById(userId); |
| | | //修改审核记录 |
| | | if(ShopSalesmanApply.APPLY_STATUS_TG == applyState) { |
| | | shopSalesmanApply.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_TG); |
| | | sysVipInfo.setIsSales(SysVipInfo.IS_SALES); |
| | | }else { |
| | | shopSalesmanApply.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_WTG); |
| | | sysVipInfo.setIsSales(SysVipInfo.NOT_SALES); |
| | | } |
| | | shopSalesmanApplyDao.updateById(shopSalesmanApply); |
| | | //修改USER的状态 |
| | | sysVipInfo.setRecommendId(parentUserId); |
| | | sysVipInfo.setBindingParentTime(new Date()); |
| | | sysVipInfo.setSalesmanGrade(shopSalesmanApply.getGradeId()); |
| | | sysVipInfoDao.update(sysVipInfo); |
| | | } |
| | | |
| | | public IPage<ShopSalesmanApplyVo> findShopSalesmanDetail(Page<ShopSalesmanApplyVo> page, |
| | | ShopSalesmanDetailDto shopSalesmanDetailDto) { |
| | | // TODO Auto-generated method stub |
| | | return null; |
| | | } |
| | | |
| | | public SalesmanBasicDetailVo selectShopSalesmanDetailByOpenId(Long userId, long applyId) { |
| | | //获取个人信息 |
| | | SysVipInfo sysVipInfo = sysVipInfoDao.selectById(userId); |
| | | Long companyId = sysVipInfo.getCompanyId(); |
| | | return shopSalesmanApplyDao.selectShopSalesmanDetailByOpenId(sysVipInfo.getId(),companyId,applyId); |
| | | } |
| | | |
| | | public IPage<ShopCustomDetailVo> findCustomDetail(Page<ShopCustomDetailVo> page,LoadParamSettingDto loadParamSettingDto) { |
| | | return shopSalesmanApplyDao.findCustomDetail(page,loadParamSettingDto); |
| | | } |
| | | |
| | | public IPage<ShopCustomDetailVo> findCustomLow(Page<ShopCustomDetailVo> pageLow, |
| | | ShopSalesmanDetailDto shopSalesmanDetailDto) { |
| | | return shopSalesmanApplyDao.findCustomLow(pageLow,shopSalesmanDetailDto); |
| | | } |
| | | |
| | | public IPage<ShopOrderDetailVo> findShopOrderDetail(Page<ShopOrderDetailVo> pageOrder, |
| | | ShopSalesmanDetailDto shopSalesmanDetailDto) { |
| | | return shopSalesmanApplyDao.findShopOrderDetail(pageOrder,shopSalesmanDetailDto); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult changeSaleManGrade(ChangeSaleManGradeDto changeSaleManGradeDto) { |
| | | |
| | | SysVipInfo vipInfo = sysVipInfoDao.selectById(changeSaleManGradeDto.getUserId()); |
| | | |
| | | //获取对应的公司的等级 |
| | | QueryWrapper<ShopSalesmanGrade> queryWrapperOrepool = new QueryWrapper<>(); |
| | | queryWrapperOrepool.eq("is_default", 1); |
| | | queryWrapperOrepool.eq("company_id", vipInfo.getCompanyId()); |
| | | ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectOne(queryWrapperOrepool); |
| | | |
| | | //不是分销员不允许修改 |
| | | Integer isSales = vipInfo.getIsSales(); |
| | | if(SysVipInfo.IS_SALES != isSales) { |
| | | return AjaxResult.buildFailInstance("当前用户未通过审核,不允许修改"); |
| | | } |
| | | |
| | | //修改申请记录的等级 |
| | | QueryWrapper<ShopSalesmanApply> queryShopSalesmanApply = new QueryWrapper<>(); |
| | | queryShopSalesmanApply.eq("apply_status", 2); |
| | | queryShopSalesmanApply.eq("user_id", vipInfo.getId()); |
| | | queryShopSalesmanApply.eq("company_id", vipInfo.getCompanyId()); |
| | | ShopSalesmanApply shopSalesmanApply = shopSalesmanApplyDao.selectOne(queryShopSalesmanApply); |
| | | Long gradeId = changeSaleManGradeDto.getGradeId(); |
| | | if(ObjectUtil.isEmpty(gradeId)) { |
| | | vipInfo.setSalesmanGrade(shopSalesmanGrade.getId()); |
| | | shopSalesmanApply.setGradeId(shopSalesmanGrade.getId()); |
| | | }else { |
| | | vipInfo.setSalesmanGrade(gradeId); |
| | | shopSalesmanApply.setGradeId(gradeId); |
| | | } |
| | | sysVipInfoDao.update(vipInfo); |
| | | shopSalesmanApplyDao.updateById(shopSalesmanApply); |
| | | |
| | | return AjaxResult.buildSuccessInstance("修改等级成功"); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult unbundlingSaleMan(UnbundlingSaleManDto unbundlingSaleManDto) { |
| | | |
| | | Long userId = unbundlingSaleManDto.getUserId(); |
| | | sysVipInfoDao.unbundlingSaleMan(userId); |
| | | return AjaxResult.buildSuccessInstance("解绑成功"); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult delSaleManGradeApply(DelSaleManGradeApplyDto delSaleManGradeApplyDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(delSaleManGradeApplyDto); |
| | | |
| | | |
| | | //将biz_user的is_sale设置成否 |
| | | SysVipInfo vipInfo = sysVipInfoDao.selectById(delSaleManGradeApplyDto.getUserId()); |
| | | if(ObjectUtil.isEmpty(vipInfo)) { |
| | | return AjaxResult.buildFailInstance("当前用户已不存在"); |
| | | } |
| | | vipInfo.setIsSales(SysVipInfo.NOT_SALES); |
| | | sysVipInfoDao.update(vipInfo); |
| | | //将记录设置成系统取消 |
| | | ShopSalesmanApply selectById = shopSalesmanApplyDao.selectById(delSaleManGradeApplyDto.getApplyId()); |
| | | selectById.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_XTQX); |
| | | shopSalesmanApplyDao.updateById(selectById); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | |
| | | public IPage<FyfaManageVo> findFyfaManageList(Page<FyfaManageVo> page, FyfaManageDto fyfaManageDto) { |
| | | return shopSalesmanGradeDao.findFyfaManageList(page,fyfaManageDto); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void addFyfa(SysUsers user) { |
| | | ShopSalesmanGrade shopSalesmanGrade = new ShopSalesmanGrade(); |
| | | shopSalesmanGrade.setIsDefault(2); |
| | | shopSalesmanGrade.setCreateBy(user.getSuName()); |
| | | shopSalesmanGrade.setUpdateBy(user.getSuName()); |
| | | shopSalesmanGrade.setCreateTime(new Date()); |
| | | shopSalesmanGrade.setUpdateTime(new Date()); |
| | | shopSalesmanGrade.setCompanyId(user.getCompanyId()); |
| | | shopSalesmanGradeDao.insert(shopSalesmanGrade); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult delFyfaApply(DelFyfaApplyDto delFyfaApplyDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(delFyfaApplyDto); |
| | | Long gradeId = delFyfaApplyDto.getGradeId(); |
| | | ShopSalesmanGrade selectById = shopSalesmanGradeDao.selectById(gradeId); |
| | | if(ObjectUtil.isEmpty(selectById)) { |
| | | return AjaxResult.buildFailInstance("当前行数据不存在,请刷新页面"); |
| | | } |
| | | shopSalesmanGradeDao.deleteById(gradeId); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult updateFyfa(UpdateFyfaDto updateFyfaDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(updateFyfaDto); |
| | | ShopSalesmanGrade selectById = shopSalesmanGradeDao.selectById(updateFyfaDto.getId()); |
| | | String name = updateFyfaDto.getName(); |
| | | if(StrUtil.isEmpty(name)) { |
| | | return AjaxResult.buildFailInstance("请输入方案名称"); |
| | | } |
| | | Double selfCommission = updateFyfaDto.getSelfCommission(); |
| | | if(ObjectUtil.isEmpty(selfCommission)) { |
| | | return AjaxResult.buildFailInstance("请输入正确的自购返佣"); |
| | | } |
| | | Double sealesCommission = updateFyfaDto.getSealesCommission(); |
| | | if(ObjectUtil.isEmpty(sealesCommission)) { |
| | | return AjaxResult.buildFailInstance("请输入正确的推广提成"); |
| | | } |
| | | Double invitationCommission = updateFyfaDto.getInvitationCommission(); |
| | | if(ObjectUtil.isEmpty(invitationCommission)) { |
| | | return AjaxResult.buildFailInstance("请输入正确的邀请提成"); |
| | | } |
| | | if(ObjectUtil.isEmpty(selectById)) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | ShopSalesmanGrade shopSalesmanGrade = new ShopSalesmanGrade(); |
| | | shopSalesmanGrade.setCompanyId(updateFyfaDto.getCompanyId()); |
| | | shopSalesmanGrade.setName(updateFyfaDto.getName()); |
| | | shopSalesmanGrade.setSelfCommission(selfCommission); |
| | | shopSalesmanGrade.setSealesCommission(sealesCommission); |
| | | shopSalesmanGrade.setInvitationCommission(invitationCommission); |
| | | shopSalesmanGrade.setGradeCondition(updateFyfaDto.getGradeCondition()); |
| | | shopSalesmanGrade.setIsDefault(2); |
| | | shopSalesmanGrade.setCreateBy(user.getSuName()); |
| | | shopSalesmanGrade.setUpdateBy(user.getSuName()); |
| | | shopSalesmanGrade.setCreateTime(new Date()); |
| | | shopSalesmanGrade.setUpdateTime(new Date()); |
| | | shopSalesmanGrade.setCompanyId(user.getCompanyId()); |
| | | shopSalesmanGradeDao.insert(shopSalesmanGrade); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | selectById.setCompanyId(updateFyfaDto.getCompanyId()); |
| | | selectById.setName(updateFyfaDto.getName()); |
| | | selectById.setSelfCommission(selfCommission); |
| | | selectById.setSealesCommission(sealesCommission); |
| | | selectById.setInvitationCommission(invitationCommission); |
| | | selectById.setGradeCondition(updateFyfaDto.getGradeCondition()); |
| | | shopSalesmanGradeDao.updateById(selectById); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult updateTgjh(UpdateTgjhDto updateTgjhDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(updateTgjhDto); |
| | | //获取推广计划的Param |
| | | Long companyId = updateTgjhDto.getCompanyId(); |
| | | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_TG_PLAN, companyId); |
| | | busParameterSettings.setParamValue3(updateTgjhDto.getTgfa()); |
| | | busParameterSettingsDao.updateByModel(busParameterSettings); |
| | | return AjaxResult.buildSuccessInstance("保存成功"); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult updateTgtp(UpdateTgtpDto updateTgtpDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(updateTgtpDto); |
| | | //获取推广计划的Param |
| | | Long companyId = updateTgtpDto.getCompanyId(); |
| | | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_TG_POSTER, companyId); |
| | | busParameterSettings.setParamValue(updateTgtpDto.getImageUrl()); |
| | | busParameterSettingsDao.updateByModel(busParameterSettings); |
| | | return AjaxResult.buildSuccessInstance("保存成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanGradeService.java
zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanOrderItemService.java
zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanOrderService.java
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/FenXiaoSettingVo.java
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/FenxiaoOrderListExportVo.java
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/FyfaManageVo.java
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadFenxiaoOrderBasicVo.java
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadFenxiaoOrderListVo.java
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/LoadSetOrderListDtoVo.java
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/SalesmanBasicDetailVo.java
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopCustomDetailVo.java
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopOrderDetailVo.java
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanAppliingVo.java
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanApplyVo.java
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanDetailVo.java
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanGradeVo.java
zq-erp/src/main/java/com/matrix/system/hive/action/ArticleController.java
zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java
zq-erp/src/main/java/com/matrix/system/hive/action/BaseController.java
zq-erp/src/main/java/com/matrix/system/hive/action/CardLevelController.java
zq-erp/src/main/java/com/matrix/system/hive/action/CustomerController.java
zq-erp/src/main/java/com/matrix/system/hive/action/DepartInfoController.java
zq-erp/src/main/java/com/matrix/system/hive/action/ErpShopScoreAction.java
zq-erp/src/main/java/com/matrix/system/hive/action/GoodsTypeController.java
zq-erp/src/main/java/com/matrix/system/hive/action/MoneyCardUseController.java
zq-erp/src/main/java/com/matrix/system/hive/action/OccupancyController.java
zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
zq-erp/src/main/java/com/matrix/system/hive/action/ProjTypeController.java
zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
zq-erp/src/main/java/com/matrix/system/hive/action/ShopInfoController.java
zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsCategoryController.java
zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java
zq-erp/src/main/java/com/matrix/system/hive/action/SupplierInfoController.java
zq-erp/src/main/java/com/matrix/system/hive/action/SysVipLabelController.java
zq-erp/src/main/java/com/matrix/system/hive/action/TaocanController.java
zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
zq-erp/src/main/java/com/matrix/system/hive/action/util/QueryUtil.java
zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java
zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveRule.java
zq-erp/src/main/java/com/matrix/system/hive/bean/AppVersion.java
zq-erp/src/main/java/com/matrix/system/hive/bean/Article.java
zq-erp/src/main/java/com/matrix/system/hive/bean/ArticleType.java
zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java
zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUseFlow.java
zq-erp/src/main/java/com/matrix/system/hive/bean/ShoppingGoods.java
zq-erp/src/main/java/com/matrix/system/hive/bean/ShoppingGoodsCategory2.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysFollowup.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysFollowupComment.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysInstoreInfo.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrderFlow.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrderItem.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUse.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUseFlow.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysSkinCheckRecord.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysStoreInfo.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipAlbum.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipLabel.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipLabelRelate.java
zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipLevel.java
zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveRuleDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/ArticleDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/MoneyCardAssembleDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/MoneyCardUseDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/MoneyCardUseFlowDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/MoneyCardUseV2Dao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/QuestionDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/ShoppingGoodsAssembleDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/ShoppingGoodsCategoryDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/ShoppingGoodsDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/SysBeauticianStateDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/SysBusinessDataDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/SysFollowupCommentDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/SysFollowupDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderFlowDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderItemDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjServicesDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjUseDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipAlbumDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java
zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipLabelDao.java
zq-erp/src/main/java/com/matrix/system/hive/dto/AchieveNewStatisticsDto.java
zq-erp/src/main/java/com/matrix/system/hive/dto/OrderFlowListDto.java
zq-erp/src/main/java/com/matrix/system/hive/dto/ScoreChangeDto.java
zq-erp/src/main/java/com/matrix/system/hive/dto/ServiceOrderTimeDto.java
zq-erp/src/main/java/com/matrix/system/hive/plugin/util/ImageUtil.java
zq-erp/src/main/java/com/matrix/system/hive/plugin/util/MoneyUtil.java
zq-erp/src/main/java/com/matrix/system/hive/pojo/CzXkVo.java
zq-erp/src/main/java/com/matrix/system/hive/pojo/MoneyCardUserVo.java (deleted)
zq-erp/src/main/java/com/matrix/system/hive/pojo/ShoppingCarItemsVo.java
zq-erp/src/main/java/com/matrix/system/hive/pojo/StoreInOutRecordVO.java
zq-erp/src/main/java/com/matrix/system/hive/service/AchieveNewService.java
zq-erp/src/main/java/com/matrix/system/hive/service/AchieveRuleService.java
zq-erp/src/main/java/com/matrix/system/hive/service/ArticleService.java
zq-erp/src/main/java/com/matrix/system/hive/service/CodeService.java
zq-erp/src/main/java/com/matrix/system/hive/service/MoneyCardUseService.java
zq-erp/src/main/java/com/matrix/system/hive/service/QuestionSerivce.java
zq-erp/src/main/java/com/matrix/system/hive/service/ShoppingGoodsCategoryService.java
zq-erp/src/main/java/com/matrix/system/hive/service/ShoppingGoodsService.java
zq-erp/src/main/java/com/matrix/system/hive/service/SysBeauticianStateService.java
zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderFlowService.java
zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderItemService.java
zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java
zq-erp/src/main/java/com/matrix/system/hive/service/SysProjServicesService.java
zq-erp/src/main/java/com/matrix/system/hive/service/SysProjUseService.java
zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java
zq-erp/src/main/java/com/matrix/system/hive/service/TaiYanAliyunSmsService.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/ArticleServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/CodeServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/DataAnalysisCustomerServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/MoneyCardUseServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/QuestionServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsCategoryServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysBeauticianStateServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysInstoreInfoServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderFlowServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderItemServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysWorktimeServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/DailySaleVo.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderFlowAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderStatisticsAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/ProjUseStatisticsAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/ServiceStatisticsAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/StatisticsBusinessDataJob.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/SysBusinessDataAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/VipStatisticsAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/moneyCardUseStatisticsAction.java
zq-erp/src/main/java/com/matrix/system/hive/vo/AchieveNewStatisticsVo.java
zq-erp/src/main/java/com/matrix/system/hive/vo/BjOrderVo.java
zq-erp/src/main/java/com/matrix/system/hive/vo/DailyBeautyListVo.java
zq-erp/src/main/java/com/matrix/system/hive/vo/OrderFlowVo.java
zq-erp/src/main/java/com/matrix/system/hive/vo/ServiceOrderInfoVo.java
zq-erp/src/main/java/com/matrix/system/hiveErp/action/AchieveRuleAction.java
zq-erp/src/main/java/com/matrix/system/hiveErp/action/DataAnalysisCustomer.java
zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpOrderController.java
zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpShopInfoController.java
zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpShoppingGoodsController.java
zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java
zq-erp/src/main/java/com/matrix/system/hiveErp/analysUtil/Caculate.java
zq-erp/src/main/java/com/matrix/system/hiveErp/analysUtil/StatisticsParamVo.java
zq-erp/src/main/java/com/matrix/system/hiveErp/dao/TjVipSumDao.java
zq-erp/src/main/java/com/matrix/system/hiveErp/pojo/AchieveRuleItem.java
zq-erp/src/main/java/com/matrix/system/job/InvalidTimeJob.java
zq-erp/src/main/java/com/matrix/system/job/ServiceOvertimeNoticeJob.java
zq-erp/src/main/java/com/matrix/system/oa/actions/OaFixedAssetsAction.java
zq-erp/src/main/java/com/matrix/system/score/action/ScoreRuleSettingAction.java
zq-erp/src/main/java/com/matrix/system/score/constant/ScoreSettingConstant.java
zq-erp/src/main/java/com/matrix/system/score/dao/ScoreUseRecordDao.java
zq-erp/src/main/java/com/matrix/system/score/dao/ScoreVipDetailDao.java
zq-erp/src/main/java/com/matrix/system/score/dto/ScoreRuleSettingDto.java
zq-erp/src/main/java/com/matrix/system/score/dto/SocreRuleDto.java
zq-erp/src/main/java/com/matrix/system/score/entity/BaseEntity.java
zq-erp/src/main/java/com/matrix/system/score/entity/ScoreUseRecord.java
zq-erp/src/main/java/com/matrix/system/score/entity/ScoreVipDetail.java
zq-erp/src/main/java/com/matrix/system/score/mapper/ScoreRuleSettingMapper.java
zq-erp/src/main/java/com/matrix/system/score/scheduledJob/ScoreScheduledJob.java
zq-erp/src/main/java/com/matrix/system/score/service/ScoreRuleSettingService.java
zq-erp/src/main/java/com/matrix/system/score/service/ScoreVipDetailService.java
zq-erp/src/main/java/com/matrix/system/score/vo/ScoreRuleSettingsVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopActivitiesAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopAdvertisTypeAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopBizUserScoreAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopCouponAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopOrderAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopPageAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopProductAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopRefundRecordAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopShoppingCartAction.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopWxtemplateMsgAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatApiTools.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatGzhApiTools.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/WxUserAction.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WXShopOrderAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxBindingPhoneNumber.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCollectionAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCommonAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxErpOrderAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxGetAcodeAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxInvoiceAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxMoneyCardUseAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductAttributeAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductCommentAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxReceiveAddressAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxRefundRecordAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesOrderAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesWithdrawalAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesmanAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesGroupBuyController.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesLuckydrawAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSalonAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSecKillAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSignAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopCouponAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopLogisticsQueryAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopScoreAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShoppingCartAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSkinCheckAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserSearchRecord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ApplyToBeAnSalesmanDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ClickSignDTO.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ErpOrderListDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ErpServiceCommentDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ErpServiceOrderListDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/MoneyCardUseFlowDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/RevenueFlowDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleOrderDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleProductDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreFlowDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreProductDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SeeAwardTextDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SignAwardDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/WithdrawalCashDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/XcxUserSaveUserInfoDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/AddShopOrderPOJO.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/CalculatePostagePOJO.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderCouponGroup.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderItemDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderProductSkuPOJO.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/ShopOrderDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/OrderCouponGroupService.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/ShoppingCartService.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WXShopOrderService.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopCouponService.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopRefundRecordService.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WXShopOrderServiceImpl.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesGroupServiceImpl.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopCouponServiceImpl.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopLogisticsQueryServiceImpl.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopRefundRecordServiceImpl.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopCouponUtil.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ActivitySignAwardSetVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ActivitySignRecordVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ErpOrderDetailFlowVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ErpOrderDetailItemVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ErpOrderDetailVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ErpServiceOrderListProjVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ErpServiceOrderListVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/LuckyDrawBasicInfoJsonVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/LuckyDrawInfoVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/LuckyDrawSuccessVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ScoreUseRecordVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SeeAwardTextVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartBillVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartGroupVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignAwardListVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignBasicInfoJsonVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignBasicInfoVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignSuccessVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/WxMoneyCardUseVO.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivities.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoin.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoinUser.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSalonRecord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSeckillRecord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopAdvertis.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopCouponRecord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryDetail.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryInfo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrder.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrderDetails.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopPage.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProduct.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProductComment.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopRefundRecord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopScoreRecord.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSearchRecord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShareQrcord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShoppingCart.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSku.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopWxtemplateMsg.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopActivitiesDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponRecordDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopDeliveryDetailDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopOrderDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopOrderV2Dao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopPageDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopProductDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopQrcordVisitorDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopScoreRecordDao.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShareQrcordDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShoppingCartDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopWxtemplateMsgDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dto/CreateGroupBuyDTO.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dto/CreateSecKillDTO.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dto/DiscountExplain.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/AsyncMessageRouting.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/MQTaskRouting.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/OrderDingDingNoticeTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/OrderOutSotoreTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/OrderTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/SalesOrderRefundTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/SalesOrderTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/ScoreOrderTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/TemplateMsgTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/VipCreateTask.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/templateMsg/AppointmentSuccess.java
zq-erp/src/main/java/com/matrix/system/shopXcx/pojo/ShopOrderQueryPOJO.java
zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityGroupJoinTimeOutQuartz.java
zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityPayTimeOutQuartz.java
zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityTimeOutQuartz.java
zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopAutomaticReceiveQuartz.java
zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopCouponQuartz.java
zq-erp/src/main/java/com/matrix/system/shopXcx/vo/LogisticsImportVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesOrderVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanApplyCondition.java
zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanCenterInfo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanVo.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/GzhTemplateMessagePojo.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/TemplateMessageBulder.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/UniformMsgSentTask.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/messageBulderDemo/CzcgTemplateMessageBulder.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/messageBulderDemo/DdqxTemplateMessageBulder.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/messageBulderDemo/DefaultTemplateMessageBulder.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/messageBulderDemo/FwwcTemplateMessageBulder.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/messageBulderDemo/GmcgTemplateMessageBulder.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/messageBulderDemo/YycgTemplateMessageBulder.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/messageBulderDemo/YydsTemplateMessageBulder.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/UniformMsgParam.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/UniformMsgPojo.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/demo/MsgDemo2.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/demo/MsgDemo3.java
zq-erp/src/main/java/fileMove.java
zq-erp/src/main/java/filecopy.java
zq-erp/src/main/java/findC.java
zq-erp/src/main/resources/config/application.properties
zq-erp/src/main/resources/config/config.json
zq-erp/src/main/resources/config/db/increment/2021-04-20bug.sql
zq-erp/src/main/resources/config/db/increment/20210109.sql
zq-erp/src/main/resources/config/db/increment/推广员.sql
zq-erp/src/main/resources/config/db/increment/签到活动.sql
zq-erp/src/main/resources/config/db/increment/美度业绩升级.sql
zq-erp/src/main/resources/config/dev/config.json
zq-erp/src/main/resources/config/dev/system.properties
zq-erp/src/main/resources/config/lhx/application.properties
zq-erp/src/main/resources/config/lhx/config.json
zq-erp/src/main/resources/config/lhx/system.properties
zq-erp/src/main/resources/config/mdprd/application.properties
zq-erp/src/main/resources/config/mdprd/config.json
zq-erp/src/main/resources/config/mdprd/system.properties
zq-erp/src/main/resources/config/prd/application.properties
zq-erp/src/main/resources/config/prd/config.json
zq-erp/src/main/resources/config/prd/system.properties
zq-erp/src/main/resources/config/system.properties
zq-erp/src/main/resources/config/test/application.properties
zq-erp/src/main/resources/config/test/config.json
zq-erp/src/main/resources/config/test/system.properties
zq-erp/src/main/resources/config/xcshop/application.properties
zq-erp/src/main/resources/config/xcshop/config.json
zq-erp/src/main/resources/config/xcshop/system.properties
zq-erp/src/main/resources/config/xcx/application.properties
zq-erp/src/main/resources/config/xcx/config.json
zq-erp/src/main/resources/config/xcx/system.properties
zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/MoneyCardUseMapperImpl.java
zq-erp/src/main/resources/log4j.properties
zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignAwardSetDao.xml
zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignWriteoffDao.xml
zq-erp/src/main/resources/mybatis/mapper/common/BusParameterSettingsDao.xml
zq-erp/src/main/resources/mybatis/mapper/common/SysCompanyDao.xml
zq-erp/src/main/resources/mybatis/mapper/common/SysRoleDao.xml
zq-erp/src/main/resources/mybatis/mapper/common/SysRolePwoerFnDao.xml
zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/BizUserDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopRevenueFlowDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalemanSettlementDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanGradeDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanOrderDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanOrderItemDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveRuleDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/ArticleDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/ArticleTypeDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardAssembleDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseV2Dao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/QuestionDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsAssembleDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsCategoryDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupCommentDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderFlowDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderItemDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysSkinCheckRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysVipAlbumDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLabelDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLevelDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysWorkBeatuistaffDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
zq-erp/src/main/resources/mybatis/mapper/score/ScoreUseRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/BizUserDao.xml (deleted)
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinUserDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSalonRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSeckillRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopAdvertisDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCollectionDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCouponDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCouponRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopDeliveryInfoDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopInvoiceDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDetailsDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderSearchDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderV2Dao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductAttributeDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopRefundRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopSkuDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopWxtemplateMsgDao.xml
zq-erp/src/main/resources/mybatis/mybatis-config.xml
zq-erp/src/main/resources/readme-jyy
zq-erp/src/main/resources/static/css/styleOne/style.min.css
zq-erp/src/main/resources/static/demoPage/soketLoginTest.html
zq-erp/src/main/resources/static/demoPage/soketTest.html
zq-erp/src/main/resources/static/images/dui.png
zq-erp/src/main/resources/static/images/luckyDraw/line.png
zq-erp/src/main/resources/static/images/luckyDraw/oAward.png
zq-erp/src/main/resources/static/images/luckyDraw/sAward.png
zq-erp/src/main/resources/static/images/luckyDraw/start.png
zq-erp/src/main/resources/static/images/luckyDraw/tAward.png
zq-erp/src/main/resources/static/images/luckyDraw/xiexiecanyu.png
zq-erp/src/main/resources/static/images/luckyDraw/zhuanpan.png
zq-erp/src/main/resources/static/images/luckyDraw/zhuanpanchoujian.png
zq-erp/src/main/resources/static/images/pay/card.png
zq-erp/src/main/resources/static/images/pay/cash.png
zq-erp/src/main/resources/static/images/pay/qian.png
zq-erp/src/main/resources/static/images/pay/tuan.png
zq-erp/src/main/resources/static/images/pay/wechat.png
zq-erp/src/main/resources/static/images/pay/yinlian.png
zq-erp/src/main/resources/static/images/pay/zhifubao.png
zq-erp/src/main/resources/static/images/pc.png
zq-erp/src/main/resources/static/images/qrcode.png
zq-erp/src/main/resources/static/images/qrcodeBack.png
zq-erp/src/main/resources/static/images/sign/jisumiaosha.png
zq-erp/src/main/resources/static/images/sign/meiriqiandao.png
zq-erp/src/main/resources/static/images/sign/shalonghuodong.png
zq-erp/src/main/resources/static/images/sign/signButton.png
zq-erp/src/main/resources/static/images/sign/signHead.png
zq-erp/src/main/resources/static/images/sign/tiantianpingtuan.png
zq-erp/src/main/resources/static/js/function/vip.js
zq-erp/src/main/resources/static/js/plugin/kindeditor/plugins/baidumap/index.html
zq-erp/src/main/resources/static/js/plugin/kindeditor/plugins/baidumap/map.html
zq-erp/src/main/resources/static/js/plugin/moment.mini.js
zq-erp/src/main/resources/static/js/plugin/qrcode.js
zq-erp/src/main/resources/static/js/systools/AjaxProxyVue.js
zq-erp/src/main/resources/static/js/systools/MBase.js
zq-erp/src/main/resources/static/plugin/beditor/dialogs/map/map.html
zq-erp/src/main/resources/static/plugin/beditor/dialogs/map/show.html
zq-erp/src/main/resources/static/plugin/kindeditor/plugins/baidumap/index.html
zq-erp/src/main/resources/static/plugin/kindeditor/plugins/baidumap/map.html
zq-erp/src/main/resources/static/templates/logisticsImport.xls
zq-erp/src/main/resources/static/templates/vipInfoImport.xls
zq-erp/src/main/resources/static/templates/vipProjUse.xls
zq-erp/src/main/resources/templates/views/admin/activity/activity-list.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-luckdraw-receive.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-luckyDraw-update.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-luckyDraw.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-market.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-logistics-info.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-receive.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-update.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-writeoff-info.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-writeoff.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-sign.html
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-apply.html
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-order.html
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-setting.html
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-update.html
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/order/projService-list.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/order/serviceOrderDetail.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/products/achieverule-list.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/products/shoppinggoods-list.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/score/score-setting.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/shop/shopInfo-form.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/achieveNewStatiostics.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/custom-consume-list.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-list-new.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-sale-list.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-sum-list-new.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/jyls.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-item.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-summary.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-item.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-summary.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-item.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-sumary.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-item.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-sumary.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/store/store-list.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/vip/vipInfo-list.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form-bak.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form-bak.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/index.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak2.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form-bak.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/print-order.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/print-service.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/projUseFlow-list.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/servicceAddForm.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service-hk.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/updateOrderTime.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/updateServiceOrderTime.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/updateServiceOrderTimeV2.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip_bak.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yyServiceAddForm.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form-bak.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html
zq-erp/src/main/resources/templates/views/admin/hive/instore/instoreinfo-list.html
zq-erp/src/main/resources/templates/views/admin/hive/instore/store-list-pl.html
zq-erp/src/main/resources/templates/views/admin/hive/instore/store-list.html
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-card.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-choice.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-detail.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-follow-add.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-follow.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-mealuse.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-msg.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-my.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-potential.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-service.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-turn.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-card-user.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-search.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-vip.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-vipInfo-search.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit-info.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit-list.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/_foot.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/_pageNav.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/cwqk-list.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/mls-list.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/mobileLogin.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-car.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-history-msg.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-history.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-list.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg2.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg3.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg4.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg5.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-search.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-service.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-completed.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-end-service.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-look-endService.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-new.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-start-service.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-time.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-msg.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-resetPassWord.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-shop-list.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-staff-list.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials-data.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials-info.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials1.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials2.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/store-check-detail.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/store-check.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/vip-archives.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/operate/label-form.html
zq-erp/src/main/resources/templates/views/admin/hive/operate/label-list.html
zq-erp/src/main/resources/templates/views/admin/hive/operate/trainingMaterialsManage-form.html
zq-erp/src/main/resources/templates/views/admin/hive/orgment/shopInfo-form.html
zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/meidu.html
zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/print-service-meidu.html
zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/print-service-taiyan.html
zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/taiyan.html
zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html
zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-md-list.html
zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-zb-list.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/custom-consume-list.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-beauty-list.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new-bak.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-sale-list.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-sum-list-new.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/jyls.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-item.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-summary.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-item.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-summary.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-item.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-sumary.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-item.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-sumary.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/store-inout-list.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/vip-arrears-list.html
zq-erp/src/main/resources/templates/views/admin/hive/store/outStore-form.html
zq-erp/src/main/resources/templates/views/admin/hive/store/projService-list.html
zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list-bak.html
zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/moneyCardUse-form.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/moneyCardUseFlow-list.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/projUse-form.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/question-form.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/question-list.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/sysSkinCheckRecord-form.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/tc-form.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-form.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html
zq-erp/src/main/resources/templates/views/admin/index.html
zq-erp/src/main/resources/templates/views/admin/oa/assets/fixeAssets-list.html
zq-erp/src/main/resources/templates/views/admin/shop/logisticsImport-form.html
zq-erp/src/main/resources/templates/views/admin/shop/parameterSetting-form.html
zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html
zq-erp/src/main/resources/templates/views/admin/shop/shopCoupon-form.html
zq-erp/src/main/resources/templates/views/admin/shop/shopDeliveryInfo-list.html
zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-form.html
zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html
zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.html
zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-list.html
zq-erp/src/main/resources/templates/views/admin/shop/shopProductComment-list.html
zq-erp/src/main/resources/templates/views/admin/shop/shopUser-list.html
zq-erp/src/main/resources/templates/views/admin/shop/templateMsg-form.html
zq-erp/src/main/resources/templates/views/admin/shop/templateMsg-list.html
zq-erp/src/main/resources/templates/views/admin/sys/admin-form.html
zq-erp/src/main/resources/templates/views/admin/sys/customerDataDictionary-list.html
zq-erp/src/main/resources/templates/views/admin/sys/sysRole-form.html
zq-erp/src/main/resources/templates/views/common/login.html
zq-erp/src/main/resources/templates/views/common/showprojException.html
zq-erp/src/main/resources/templates/views/super/sysCompany-form.html
zq-erp/src/main/resources/templates/views/super/sysCompany-list.html
zq-erp/src/main/resources/权限
zq-erp/src/test/java/com/matrix/BizUserToVipInfoTool.java
zq-erp/src/test/java/com/matrix/FenxiaoSoreInitTest.java
zq-erp/src/test/java/com/matrix/JyyTests.java
zq-erp/src/test/java/com/matrix/JyyTests2.java
zq-erp/src/test/java/com/matrix/LocalCacheTest.java
zq-erp/src/test/java/com/matrix/ParameterSettingsTool.java
zq-erp/src/test/java/com/matrix/SalesOrderTaskTest.java
zq-erp/src/test/java/com/matrix/SourceFlowTests.java
zq-erp/src/test/java/com/matrix/TaiYanAliyunSmsServiceTest.java
zq-erp/src/test/java/com/matrix/TcProjTest.java
zq-erp/src/test/java/com/matrix/TesatAsyncMessage.java
zq-erp/src/test/java/com/matrix/四月份家居产品业绩恢复.java
zq-xcx/app.js
zq-xcx/project.config.json
zq-xcx/utils/util.js |