Merge branch 'api' into test
207 files modified
3 files deleted
160 files added
| | |
| | | .idea/sqlDataSources.xml |
| | | .idea/dynamic.xml |
| | | .idea/uiDesigner.xml |
| | | */resources/generated-sources/* |
| | | # Gradle: |
| | | .idea/gradle.xml |
| | | .idea/ |
| | |
| | | <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>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>5.3.1</version> |
| | | </dependency> |
| | | </dependencies> |
| | | <build> |
| | | <resources> |
| | | <resource> |
| | |
| | | <exclude>config/xcx/*</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> |
| | | |
| | | |
| | | |
| | |
| | | <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> |
| | | </annotationProcessorPaths> |
| | | </configuration> |
| | | </plugin> |
| | | |
| | | <!-- 热部署插件 --> |
| | |
| | | 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("本次发送空消息"); |
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; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | 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>")); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * |
| | |
| | | // 这个就是自己要保管好的私有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这个属性中 |
| | | } |
| | | |
| | |
| | | * @param bankTrueName 收款号姓名 |
| | | * @param bankCode 收款号开户行 |
| | | */ |
| | | public JsApiPayComReqData(String desc, String outTradeNo, int totalFee, String bankNo, String bankTrueName, String bankCode) { |
| | | public JsApiPayComReqData(String mchID,String paySecret ,String desc, String outTradeNo, int totalFee, String bankNo, String bankTrueName, String bankCode) { |
| | | //默认必须设置 |
| | | setMch_id(WechatConfigure.mchID); |
| | | setMch_id(mchID); |
| | | setDesc(desc); |
| | | setPartner_trade_no(outTradeNo); |
| | | setAmount(totalFee); |
| | | //随机字符串,不长于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(); |
| | |
| | | /** |
| | | * 接收微信支付异步通知回调地址 |
| | | */ |
| | | 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" |
| | |
| | | // 创建微信支付预付接口 |
| | | 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 notifyUrl = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_NOTIFYURL, 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{ |
| | |
| | | * @param desc 描述 |
| | | * @param outTradeNo 提现申请编号 |
| | | * @param totalFee 提现金额(分) |
| | | * @param spBillCreateIP 调用接口的IP |
| | | * @param openid |
| | | * @return |
| | | */ |
| | |
| | | try { |
| | | JsApiPayBusiness jsApiPayBusiness = new JsApiPayBusiness(); |
| | | // TODO 企业付款 |
| | | JsApiPayComReqData jsApiPayComReqData=new JsApiPayComReqData("","",0,"","",""); |
| | | Long companyId=HostInterceptor.getCompanyId(); |
| | | BusParameterSettings mchID = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_MCHID, companyId); |
| | | BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, companyId); |
| | | |
| | | |
| | | JsApiPayComReqData jsApiPayComReqData=new JsApiPayComReqData(mchID.getParamValue(),paySecret.getParamValue(),"","",0,"","",""); |
| | | JsApiPayComService jsApiPayComService=new JsApiPayComService(); |
| | | result = jsApiPayBusiness.payComOrder(jsApiPayComService, jsApiPayComReqData); |
| | | LogUtil.info("#提现,企业付款到个人---result:{}",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(); |
| | |
| | | |
| | | |
| | | 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; |
| | |
| | | @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/**"); |
| | | registry.addInterceptor(userLoginInterceptor) |
| | | .addPathPatterns("/**") |
| | | .excludePathPatterns("/common/**") |
| | | .excludePathPatterns("/resource/**") |
| | | .excludePathPatterns("/swagger**/**") |
| | | .excludePathPatterns("/webjars/**") |
| | | .excludePathPatterns("/api/**"); |
| | | |
| | | // url权限拦截 |
| | | registry.addInterceptor(suAuthorityInterceptor).addPathPatterns("/**/su/**"); |
| | | //小程序公司与域名对应关系拦截 |
| | |
| | | import com.matrix.component.rabbitmq.MqTask; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplateFactory; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.system.shopXcx.mqTask.*; |
| | | 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; |
| | |
| | | return new TemplateMsgTask(); |
| | | } |
| | | |
| | | @Bean |
| | | UniformMsgSentTask UniformMsgSentTask(){ |
| | | return new UniformMsgSentTask(); |
| | | } |
| | | |
| | | @Bean |
| | | OrderOutSotoreTask OrderOutSotoreTask(){ |
| | | return new OrderOutSotoreTask(); |
| | |
| | | |
| | | @Bean |
| | | public RabiitMqTemplate rabiitMqTemplate() throws IOException { |
| | | |
| | | LogUtil.info("rabbitmq: {}, {}, {}, {}", host, port, username, password); |
| | | RabiitMqTemplate rabiitMqTemplate = RabiitMqTemplateFactory.buildTemplate(host, port, username, password); |
| | | |
| | | //声明一个交换机 |
| | |
| | | |
| | | //注册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())); |
| | | taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG + evn,MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG + evn, UniformMsgSentTask())); |
| | | |
| | | rabiitMqTemplate.binding(taskList); |
| | | |
New file |
| | |
| | | package com.matrix.config; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | 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.any()).build().globalOperationParameters(parameters); |
| | | // .ignoredParameterTypes(MemberEntity.class); |
| | | } |
| | | |
| | | private ApiInfo apiInfo(){ |
| | | return new ApiInfoBuilder() |
| | | .title("Hive") |
| | | .description("This is a restful api document of Hive.") |
| | | .version("1.0") |
| | | .build(); |
| | | } |
| | | } |
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("参数校验失败"); |
| | | } |
| | | } |
| | | |
| | | } |
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 { |
| | | |
| | | /** |
| | | * 起点 |
| | |
| | | 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.app.action; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.component.redis.RedisClient; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.*; |
| | | import com.matrix.system.app.authority.AppAuthorityManager; |
| | | import com.matrix.system.app.dto.LoginDto; |
| | | import com.matrix.system.app.dto.PwdResetDto; |
| | | import com.matrix.system.app.dto.SmsCodeDto; |
| | | import com.matrix.system.app.dto.UploadPhotoDto; |
| | | import com.matrix.system.app.utils.Sms106Send; |
| | | import com.matrix.system.app.vo.UserInfoVo; |
| | | 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.bean.SysUsers; |
| | | 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 io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | 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 RedisClient redisClient; |
| | | |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | | @Value("${static_resource_url}") |
| | | private String nginxUrl; |
| | | |
| | | @ApiOperation(value = "登陆接口", notes = "手机端登陆接口") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = UserInfoVo.class) |
| | | }) |
| | | @PostMapping(value = "/login") |
| | | public AjaxResult login(@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); |
| | | |
| | | 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(); |
| | | redisClient.saveValueForever(token, JSONObject.toJSONString(user)); |
| | | |
| | | userInfoVo.setId(user.getSuId()); |
| | | userInfoVo.setName(user.getSuName()); |
| | | userInfoVo.setRoleName(user.getRoleName()); |
| | | userInfoVo.setPhoto(user.getSuPhoto()); |
| | | |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("登陆成功"); |
| | | authorityManager.initUserPower(result,user); |
| | | result.putInMap("user", userInfoVo); |
| | | result.putInMap("token", token); |
| | | 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 = redisClient.getCachedValue(smsCodeDto.getTelphone()); |
| | | if (StringUtils.isNotBlank(codeExist)) { |
| | | return AjaxResult.buildFailInstance("请勿重复发送验证码"); |
| | | } |
| | | |
| | | Integer code =(int) ((Math.random() * 9 + 1) * 100000); |
| | | Sms106Send.sendVerifyCode(smsCodeDto.getTelphone(), code.toString(), 2); |
| | | redisClient.saveValue(smsCodeDto.getTelphone(), code.toString(), 120); |
| | | 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 = redisClient.getCachedValue(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) { |
| | | redisClient.removeObject(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()); |
| | | } |
| | | } |
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)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | 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.MQTaskRouting; |
| | | 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 RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @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.setIsOver(Dictionary.FLAG_NO_N); |
| | | } |
| | | |
| | | 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<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(sysProjUses); |
| | | 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.isBlank(vipInfo.getPassWord())) { |
| | | // return AjaxResult.buildFailInstance("未设置资金密码"); |
| | | // } |
| | | |
| | | 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) { |
| | | SysProjServices services = new SysProjServices(); |
| | | services.setId(idSubmitDto.getId()); |
| | | services.setState(Dictionary.BEATUI_STATE_DYY); |
| | | int i = projServicesService.modify(services); |
| | | if (i > 0) { |
| | | //发送微信公众号提醒 |
| | | services=projServicesService.findById(services.getId()); |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(services.getCompanyId(),UniformMsgParam.GZH_YYCG); |
| | | uniformMsgParam.put("serviceId",services.getId()); |
| | | rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | |
| | | 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.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); |
| | | 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); |
| | | 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 com.matrix.component.redis.RedisClient; |
| | | 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.*; |
| | | import com.matrix.system.app.mapper.SysBeauticianStateMapper; |
| | | 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.interceptor.ApiUserLoginInterceptor; |
| | | 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.SysBeauticianState; |
| | | 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.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.ArrayList; |
| | | 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; |
| | | |
| | | @Autowired |
| | | private RedisClient redisClient; |
| | | @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); |
| | | redisClient.removeObject(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.pojo.PaginationVO; |
| | | import com.matrix.core.tools.EncrypUtil; |
| | | 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.common.tools.PasswordUtil; |
| | | 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.MoneyCardUseDao; |
| | | 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.io.UnsupportedEncodingException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | 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) { |
| | | // 获取会员所有的答案,分类型 |
| | | List<Question> questions = questionSerivce.findByVipId(vipId); |
| | | 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 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.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; |
| | | |
| | | /** |
| | | * 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 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<>(); |
| | | |
| | | |
| | | // 获取用户所有权限 |
| | | getUserFunction(user,userFunction, userUrlMapping); |
| | | |
| | | |
| | | // TODO 这里的用户权限应该放到redis缓存中,在拦截器中做权限拦截 |
| | | 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) { |
| | | // 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; |
| | | |
| | | 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"; |
| | | |
| | | @ApiModelProperty(value = "数据类型 1-销售 2-消耗", example = "1") |
| | | private String dataType; |
| | | |
| | | @ApiModelProperty(value = "排行榜类型 1-日榜 2-月榜 3-年榜", 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 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 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 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; |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | } |
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 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.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 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; |
| | | |
| | | 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; |
| | | } |
| | | } |
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 = "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 = "套餐内产品") |
| | | List<ServiceProjVo> proj; |
| | | |
| | | @ApiModelProperty(value = "快过期 1-是 2-否") |
| | | private String isInvalid; |
| | | |
| | | 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; |
| | | } |
| | | } |
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 java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-24 |
| | | **/ |
| | | @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 String 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; |
| | | |
| | | public BigDecimal getGiftPrice() { |
| | | return giftPrice; |
| | | } |
| | | |
| | | public void setGiftPrice(BigDecimal giftPrice) { |
| | | this.giftPrice = giftPrice; |
| | | } |
| | | |
| | | public String getCarIsAll() { |
| | | return carIsAll; |
| | | } |
| | | |
| | | public void setCarIsAll(String carIsAll) { |
| | | this.carIsAll = carIsAll; |
| | | } |
| | | |
| | | public String getGoodsNo() { |
| | | return goodsNo; |
| | | } |
| | | |
| | | public void setGoodsNo(String goodsNo) { |
| | | this.goodsNo = goodsNo; |
| | | } |
| | | |
| | | public String getGoodsName() { |
| | | return goodsName; |
| | | } |
| | | |
| | | public void setGoodsName(String goodsName) { |
| | | this.goodsName = goodsName; |
| | | } |
| | | |
| | | public BigDecimal getSalePrice() { |
| | | return salePrice; |
| | | } |
| | | |
| | | public void setSalePrice(BigDecimal salePrice) { |
| | | this.salePrice = salePrice; |
| | | } |
| | | |
| | | public Integer getSaleCnt() { |
| | | return saleCnt; |
| | | } |
| | | |
| | | public void setSaleCnt(Integer saleCnt) { |
| | | this.saleCnt = saleCnt; |
| | | } |
| | | |
| | | public String getImg() { |
| | | return img; |
| | | } |
| | | |
| | | public void setImg(String img) { |
| | | this.img = img; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public void setDesc(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public String getGoodsType() { |
| | | return goodsType; |
| | | } |
| | | |
| | | public void setGoodsType(String goodsType) { |
| | | this.goodsType = goodsType; |
| | | } |
| | | |
| | | public Integer getVolume() { |
| | | return volume; |
| | | } |
| | | |
| | | public void setVolume(Integer volume) { |
| | | this.volume = volume; |
| | | } |
| | | |
| | | public String getMeasure() { |
| | | return measure; |
| | | } |
| | | |
| | | public void setMeasure(String measure) { |
| | | this.measure = measure; |
| | | } |
| | | |
| | | public Integer getMaxSaleCnt() { |
| | | return maxSaleCnt; |
| | | } |
| | | |
| | | public void setMaxSaleCnt(Integer maxSaleCnt) { |
| | | this.maxSaleCnt = maxSaleCnt; |
| | | } |
| | | |
| | | public String getLimitBuyCnt() { |
| | | return limitBuyCnt; |
| | | } |
| | | |
| | | public void setLimitBuyCnt(String limitBuyCnt) { |
| | | this.limitBuyCnt = limitBuyCnt; |
| | | } |
| | | |
| | | public List<ShoppingGoodsDetailVo> getAssembleProj() { |
| | | return assembleProj; |
| | | } |
| | | |
| | | public void setAssembleProj(List<ShoppingGoodsDetailVo> assembleProj) { |
| | | this.assembleProj = assembleProj; |
| | | } |
| | | |
| | | public List<ShoppingGoodsDetailVo> getAssembleTaocanProj() { |
| | | return assembleTaocanProj; |
| | | } |
| | | |
| | | public void setAssembleTaocanProj(List<ShoppingGoodsDetailVo> assembleTaocanProj) { |
| | | this.assembleTaocanProj = assembleTaocanProj; |
| | | } |
| | | |
| | | public List<ShoppingGoodsDetailVo> getAssembleTaocanProduct() { |
| | | return assembleTaocanProduct; |
| | | } |
| | | |
| | | public void setAssembleTaocanProduct(List<ShoppingGoodsDetailVo> assembleTaocanProduct) { |
| | | this.assembleTaocanProduct = assembleTaocanProduct; |
| | | } |
| | | |
| | | public List<ShoppingGoodsCategory> getCardCategory() { |
| | | return cardCategory; |
| | | } |
| | | |
| | | public void setCardCategory(List<ShoppingGoodsCategory> cardCategory) { |
| | | this.cardCategory = cardCategory; |
| | | } |
| | | |
| | | public String getIsCourse() { |
| | | return isCourse; |
| | | } |
| | | |
| | | public void setIsCourse(String isCourse) { |
| | | this.isCourse = isCourse; |
| | | } |
| | | |
| | | public Integer getMaxUseCnt() { |
| | | return maxUseCnt; |
| | | } |
| | | |
| | | public void setMaxUseCnt(Integer maxUseCnt) { |
| | | this.maxUseCnt = maxUseCnt; |
| | | } |
| | | } |
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 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; |
| | | } |
| | | } |
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; |
| | | |
| | | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 条件查询所有员工,不分页 |
| | |
| | | @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, "数据字典"); |
| | | |
| | |
| | | public static final String QSFY = "QSFY"; |
| | | |
| | | |
| | | /** |
| | | * 小程序APPID |
| | | */ |
| | | public static final String MINIPROGRAM_APPID = "miniprogramAppid"; |
| | | /** |
| | | * 小程序Secret |
| | | */ |
| | | 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_CERTLOCAL_PATH = "certLocalPath"; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | 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(); |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.common.interceptor; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.matrix.component.redis.RedisClient; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | 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.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | 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; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @Component |
| | | public class ApiUserLoginInterceptor implements HandlerInterceptor { |
| | | |
| | | @Autowired |
| | | private RedisClient redisClient; |
| | | |
| | | @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(1012L); |
| | | 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; |
| | | } |
| | | |
| | | String userStr = redisClient.getCachedValue(token); |
| | | // redisClient.resetExpire(token); |
| | | if (StringUtils.isBlank(userStr)) { |
| | | ajaxResult.setInfo("login time out"); |
| | | response.getWriter().write(new ObjectMapper().writeValueAsString(ajaxResult)); |
| | | response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); |
| | | return false; |
| | | } |
| | | |
| | | SysUsers sysUsers = JSONObject.parseObject(userStr, SysUsers.class); |
| | | 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 org.springframework.stereotype.Component; |
| | | import org.springframework.web.servlet.HandlerInterceptor; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; |
| | | |
| | |
| | | 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); |
| | | } |
| | | } |
| | | // 获得请求的域名--由小程序直接传过来companyCode参数对应公司的网址 |
| | | String host = request.getHeader("companyCode"); |
| | | LogUtil.debug("当前请求域名{}", host); |
| | | @SuppressWarnings("unchecked") |
| | | Map<String, SysCompany> companyMap = (Map<String, SysCompany>) WebUtil.getServletContext() |
| | |
| | | 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(); |
| | | |
| | | } |
| | |
| | | |
| | | 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)); |
| | | |
| | | |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<AppVersion> findAppVersion() { |
| | | return sysUsersDao.selectAppVersion(); |
| | | } |
| | | } |
| | |
| | | * 支付方式-卡支付 |
| | | */ |
| | | String PAY_TYPE_CARD = "划扣"; |
| | | |
| | | |
| | | /** |
| | | * 服务单状态-待确认 |
| | | */ |
| | | String SERVICE_STATU_DQR = "待确认"; |
| | | /** |
| | | * 服务单状态-待预约 |
| | | */ |
| | |
| | | |
| | | 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"}; |
| | | } |
| | |
| | | AjaxResult showList(Article article, PaginationVO pageVo) { |
| | | article.setType(Dictionary.ARTICEL_TYPE_NAME_SCWZ); |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | article.setShopId(users.getShopId()); |
| | | article.setCompanyId(users.getCompanyId()); |
| | | return showList(currentService, article, pageVo); |
| | | } |
| | | |
| | |
| | | article.setType(Dictionary.ARTICEL_TYPE_NAME_MDXY); |
| | | |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | article.setShopId(users.getShopId()); |
| | | article.setCompanyId(users.getCompanyId()); |
| | | return showList(currentService, article, pageVo); |
| | | //return new AjaxResult(AjaxResult.STATUS_SUCCESS, currentService.findInPage(article, pageVo),currentService.findTotal(article)); |
| | | } |
| | |
| | | public @ResponseBody AjaxResult queryAll(Article article, PaginationVO pageVo) { |
| | | article.setType(Dictionary.ARTICEL_TYPE_NAME_WXXMWZ); |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | article.setShopId(users.getShopId()); |
| | | article.setCompanyId(users.getCompanyId()); |
| | | return showList(currentService, article, pageVo); |
| | | //return new AjaxResult(AjaxResult.STATUS_SUCCESS, currentService.findInPage(article, pageVo),currentService.findTotal(article)); |
| | | } |
| | |
| | | @RemoveRequestToken |
| | | public @ResponseBody AjaxResult addOrModify(Article article) { |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | article.setShopId(users.getShopId()); |
| | | article.setCompanyId(users.getCompanyId()); |
| | | if (article.getId() != null) { |
| | | return modify(currentService, article, "文章"); |
| | | } else { |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | 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.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.ArticleType; |
| | | import com.matrix.system.hive.plugin.message.StringUtil; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.service.ArticleTypeService; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | public @ResponseBody AjaxResult queryAll(ArticleType articleType) { |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | articleType.setType(Dictionary.ARTICEL_TYPE_NAME_MDXY); |
| | | articleType.setShopId(users.getShopId()); |
| | | articleType.setCompanyId(users.getCompanyId()); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, currentService.findByModel(articleType), 0); |
| | | } |
| | | |
| | |
| | | articleType.setType(Dictionary.ARTICEL_TYPE_NAME_MDXY); |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | articleType.setShopId(users.getShopId()); |
| | | if (articleType.getId() != null) { |
| | | articleType.setCompanyId(users.getCompanyId()); |
| | | Long parentId = articleType.getParentId(); |
| | | List<Long> ids = new ArrayList<>(); |
| | | while (parentId != 0) { |
| | | ArticleType type = currentService.findById(parentId); |
| | | ids.add(type.getId()); |
| | | parentId = type.getParentId(); |
| | | } |
| | | |
| | | articleType.setParentIds(CollectionUtils.isNotEmpty(ids) ? StringUtils.collToStr(ids, ",") : null); |
| | | if (articleType.getId() != null) { |
| | | // 自己不能是自己的父节点 |
| | | if (articleType.getParentId() != null && articleType.getParentId().equals(articleType.getId())) { |
| | | throw new GlobleException("父级不能是自己"); |
| | | } |
| | | return modify(currentService, articleType, "文章类型"); |
| | | } else { |
| | | |
| | |
| | | public @ResponseBody AjaxResult addOrModify(SysVipLevel vipLevel) { |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | vipLevel.setShopId(users.getShopId()); |
| | | vipLevel.setCompanyId(users.getCompanyId()); |
| | | if (vipLevel.getId() != null) { |
| | | |
| | | return modify(cardLevelService, vipLevel, "会员卡信息"); |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.WebUtil; |
| | |
| | | public @ResponseBody AjaxResult addOrModify(SysDepartInfo departInfo) { |
| | | |
| | | if (departInfo.getId() != null) { |
| | | |
| | | if (departInfo.getParentId() != null && departInfo.getParentId().equals(departInfo.getId())) { |
| | | throw new GlobleException("父级不能是自己"); |
| | | } |
| | | return modify(currentService, departInfo, "部门"); |
| | | } else { |
| | | QueryUtil.setQueryLimit(departInfo); |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | |
| | | AjaxResult addOrModify(SysGoodsType sysGoodsType) { |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | if (sysGoodsType.getId() != null) { |
| | | |
| | | if (sysGoodsType.getParentId() != null && sysGoodsType.getParentId().equals(sysGoodsType.getId())) { |
| | | throw new GlobleException("父级不能是自己"); |
| | | } |
| | | return modify(currentService, sysGoodsType, "产品分类"); |
| | | } else { |
| | | |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | 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.tools.DateUtil; |
| | | import com.matrix.system.hive.pojo.CzXkVo; |
| | | import com.matrix.system.hive.service.*; |
| | | import com.matrix.system.shopXcx.mqTask.MQTaskRouting; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | |
| | | @Resource |
| | | private SysVipInfoService vipInfoService; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private MoneyCardUseFlowDao moneyCardUseFlowDao; |
| | | @Autowired |
| | | |
| | | @Resource |
| | | private MoneyCardUseDao moneyCardUseDao; |
| | | |
| | | |
| | | @Value("${evn}") |
| | | private String evn; |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | |
| | | /** |
| | | * 跳转 充值页面 |
| | | * |
| | | * @author jyy |
| | | */ |
| | | @RequestMapping(value = "/editFormCz") |
| | | public String editFormCz() { |
| | | SysVipInfo info = |
| | | (SysVipInfo) WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER); |
| | | MoneyCardUse cardUseInfo = cardUseService.findByVipId(info.getId()); |
| | | |
| | | public String editFormCz(Long id) { |
| | | MoneyCardUse cardUseInfo = cardUseService.findByVipId(id); |
| | | if (cardUseInfo == null) { |
| | | cardUseInfo = new MoneyCardUse(); |
| | | cardUseInfo.setVipId(info.getId()); |
| | | cardUseInfo.setCardName("储值卡"); |
| | | cardUseInfo.setIsVipCar(Dictionary.FLAG_YES_Y); |
| | | cardUseInfo.setRealMoney(0D); |
| | | cardUseInfo.setGiftMoney(0D); |
| | | cardUseInfo.setSource("-"); |
| | | cardUseInfo.setFailTime(DateUtil.stringToDate("2050-01-01 00:00",DateUtil.DATE_FORMAT_MM)); |
| | | cardUseInfo.setStatus(Dictionary.MONEYCARD_STATUS_YX); |
| | | moneyCardUseDao.insert(cardUseInfo); |
| | | cardUseInfo=vipInfoService.addVipDefaultCard(id); |
| | | } |
| | | |
| | | WebUtil.getRequest().setAttribute("obj", cardUseInfo); |
| | | return "admin/hive/beautySalon/cz-form"; |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/cz") |
| | | public @ResponseBody |
| | | AjaxResult cz(CzXkVo czVo) { |
| | | AjaxResult cz(@RequestBody CzXkVo czVo) { |
| | | SysOrder order= orderService.updateAddCardMoney(czVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, "充值成功"); |
| | | |
| | | //发送微信公众号提醒 |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(order.getCompanyId(),UniformMsgParam.GZH_CZCG); |
| | | uniformMsgParam.put("orderId",order.getId()); |
| | | rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | |
| | | result.putInMap("orderId",order.getId()); |
| | | return result; |
| | | } |
| | |
| | | * @author jyy |
| | | */ |
| | | @RequestMapping(value = "/toBj") |
| | | public String toBj(Long id, HttpServletRequest request) { |
| | | public String toBj(Long id) { |
| | | // 根据id查到对应的订单信息 |
| | | SysOrder order = orderService.findById(id); |
| | | WebUtil.getRequest().setAttribute("order", order); |
| | | |
| | | SysOrderItem item = new SysOrderItem(); |
| | | item.setOrderId(order.getId()); |
| | | item.setStatus(Dictionary.ORDER_STATU_QK); |
| | | order.setItems(orderItemService.findByModel(item)); |
| | | |
| | | |
| | | MoneyCardUse moneyCardUse = new MoneyCardUse(); |
| | | moneyCardUse.setVipId(order.getVipId()); |
| | | moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_YX); |
| | | List<MoneyCardUse> cards = cardUseService.findByModel(moneyCardUse); |
| | | |
| | | WebUtil.getRequest().setAttribute("cards", cards); |
| | | List<SysOrderItem> items = orderItemService.findByModel(item); |
| | | order.setItems(items); |
| | | WebUtil.getRequest().setAttribute("order", order); |
| | | |
| | | return "admin/hive/beautySalon/bj-form"; |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/bj") |
| | | public @ResponseBody |
| | | AjaxResult bj(SysOrder order) throws GlobleException { |
| | | AjaxResult bj(@RequestBody SysOrder order) throws GlobleException { |
| | | |
| | | orderService.updateAfterMoney(order); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "补交成功"); |
| | |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "冻结失败"); |
| | | } |
| | | |
| | | /** |
| | | * 退款 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "getEffectCard") |
| | | public @ResponseBody |
| | | AjaxResult getEffectCard(MoneyCardUse moneyCardUse) { |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(""); |
| | | //要退款的充值卡 |
| | | MoneyCardUse srcCardUse = cardUseService.findById(moneyCardUse.getId()); |
| | | if (!srcCardUse.getStatus().equals(Dictionary.TAOCAN_STATUS_YX)) { |
| | | throw new GlobleException("不是有效充值卡"); |
| | | } |
| | | //该会员是否有有效会籍卡 |
| | | MoneyCardUse targetCardUse = cardUseService.findByVipId(moneyCardUse.getVipId()); |
| | | |
| | | double money = srcCardUse.getRealMoney(); |
| | | |
| | | if (targetCardUse != null) { |
| | | targetCardUse.setRealMoney(money); |
| | | List<MoneyCardUse> list = Arrays.asList(targetCardUse); |
| | | |
| | | if (targetCardUse.getId().equals(srcCardUse.getId())) { |
| | | result.setInfo("会籍卡退款只能退现金"); |
| | | result.setRows(list); |
| | | |
| | | } else { |
| | | result.setInfo("有有效会籍卡"); |
| | | result.setRows(list); |
| | | } |
| | | } else { |
| | | //无会员卡则new一个,为了把钱传递到前台 |
| | | targetCardUse = new MoneyCardUse(); |
| | | targetCardUse.setRealMoney(money); |
| | | List<MoneyCardUse> list1 = Arrays.asList(targetCardUse); |
| | | result.setInfo("无有效会籍卡,退现金"); |
| | | result.setRows(list1); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | @RequestMapping(value = "/returnMoney") |
| | | public @ResponseBody |
| | | AjaxResult returnMoney(MoneyCardUse moneyCardUse, Long hjkId, String tcRemark, Long |
| | | shopId, Double money |
| | | , String tcName) { |
| | | int i = cardUseService.returnMoney(moneyCardUse, hjkId); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "退款成功"); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "冻结失败"); |
| | | } |
| | | } |
| | |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.service.SysWorkBeatuistaffService; |
| | | import com.matrix.system.hive.service.SysWorktimeService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @RequestMapping(value = "/getKanban") |
| | | public @ResponseBody |
| | | AjaxResult showCwzyList(String timeStr) { |
| | | Long shopId = getMe().getShopId(); |
| | | return getCwzyList(timeStr,shopId); |
| | | } |
| | | |
| | | public AjaxResult getCwzyList(String timeStr,Long shopId){ |
| | | |
| | | if (timeStr == null || timeStr.equals("")) { |
| | | timeStr = DateUtil.dateToString(new Date(), "yyyy-MM-dd"); |
| | | } |
| | | // 查询上班下班的最大时间段 |
| | | Date currentDate = DateUtil.stringToDate(timeStr, DateUtil.DATE_FORMAT_DD); |
| | | // 把日期调整为当前查询日期 |
| | | Long shopId = 16L; //getMe().getShopId(); |
| | | |
| | | |
| | | Date maxTime = worktimeService.findMaxTime(shopId); |
| | | //如果没有获取到门店的排班时间,无法查询占用情况 |
| | |
| | | |
| | | //计算表头的时间间隔 |
| | | buildTimeSpan(startTime, maxTime, result); |
| | | |
| | | return result; |
| | | return result; |
| | | } |
| | | |
| | | private void buildTimeSpan(Date startTime, Date maxTime, AjaxResult result) { |
| | |
| | | } |
| | | } |
| | | |
| | | class OccupancySPan { |
| | | public class OccupancySPan { |
| | | /** |
| | | * 休息 |
| | | */ |
| | |
| | | */ |
| | | static final int WORKTYPE_OCCUPANCY = 3; |
| | | |
| | | @ApiModelProperty(value = "色块长度") |
| | | Long spanLength; |
| | | @ApiModelProperty(value = "占用状态,1休息,2 上班,3 占用") |
| | | int workType; |
| | | @ApiModelProperty(value = "床位名称") |
| | | String bedName; |
| | | @ApiModelProperty(value = "项目名称") |
| | | String projName; |
| | | @ApiModelProperty(value = "会员名称") |
| | | String vipName; |
| | | @ApiModelProperty(value = "服务单id") |
| | | Long serviceId; |
| | | @ApiModelProperty(value = "服务单状态") |
| | | String serviceState; |
| | | |
| | | |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | 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.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.constance.SystemConstance; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | | import com.matrix.system.hive.bean.MoneyCardUse; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.bean.SysOrderItem; |
| | | import com.matrix.system.hive.dao.MoneyCardUseDao; |
| | | import com.matrix.system.hive.dao.SysOrderDao; |
| | | import com.matrix.system.hive.dao.SysOrderItemDao; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | 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.AchieveNewService; |
| | | import com.matrix.system.hive.service.MoneyCardUseService; |
| | | import com.matrix.system.hive.service.SysOrderItemService; |
| | | import com.matrix.system.hive.service.SysOrderService; |
| | | import com.matrix.system.hive.service.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.ModelMap; |
| | |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | SysShopInfoDao shopInfoDao; |
| | | |
| | | @Autowired |
| | | private SysVipInfoService sysVipInfoService; |
| | | |
| | | @Autowired |
| | | private SysOrderFlowService sysOrderFlowService; |
| | | |
| | | @Autowired |
| | | private SysOrderFlowDao sysOrderFlowDao; |
| | | |
| | | @Autowired |
| | | RabiitMqTemplate rabiitMqTemplate; |
| | | @Value("${evn}") |
| | | private String evn; |
| | | |
| | | /** |
| | | * 计算订单金额 |
| | |
| | | //校验订单是否满足结算调价,新订单则保存订单,已有订单则删除后更新 |
| | | sysOrder = orderService.checkAndSaveOrder(sysOrder); |
| | | orderService.updateReceiptMoney(sysOrder); |
| | | |
| | | //发送微信公众号提醒 |
| | | // UniformMsgParam uniformMsgParam=new UniformMsgParam(user.getCompanyId(),UniformMsgParam.GZH_GMCG); |
| | | // uniformMsgParam.put("orderId",sysOrder.getId()); |
| | | // rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | |
| | | |
| | | //处理用户购买的产品 |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(sysOrder), "订单结算成功"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 退款 |
| | | * |
| | | * @param sysOrder |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/refundOrder") |
| | | @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult refundOrder(@RequestBody SysOrder sysOrder) { |
| | | //储值卡订单不能通过退款渠道退款 |
| | | if(CollectionUtils.isNotEmpty(sysOrder.getItems())){ |
| | | List<SysOrderItem> orderItem = orderItemService.findByOrderId(sysOrder.getItems().get(0).getOrderId()); |
| | | if(orderItem.size()==1){ |
| | | if(orderItem.get(0).getShoppingGoods().getCode().equals("vipCzk")){ |
| | | return AjaxResult.buildFailInstance("充值订单请直接冲负数金额退款!"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | SysUsers user = getMe(); |
| | | sysOrder.setShopId(user.getShopId()); |
| | | sysOrder.setStatu(Dictionary.ORDER_STATU_TK); |
| | | sysOrder.setOrderTime(new Date()); |
| | | |
| | | |
| | | //校验订单是否满足结算调价,新订单则保存订单,已有订单则删除后更新 |
| | | sysOrder = orderService.checkAndSaveOrder(sysOrder); |
| | | orderService.refundOrderMoney(sysOrder); |
| | | //处理用户购买的产品 |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(sysOrder), "订单退款成功"); |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | //处理用户购买的产品 |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(sysOrder), "订单保存成功"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新建订单 |
| | |
| | | } |
| | | //设置过滤后的购物车条目 |
| | | car.setCarItems(carItems); |
| | | |
| | | SysVipInfo info = (SysVipInfo) WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER); |
| | | car.setVipId(info.getId()); |
| | | |
| | | // 添加新订单 |
| | | int i = orderService.createOrder(WebUtil.getSession(), car); |
| | |
| | | public @ResponseBody |
| | | AjaxResult updateOrderTime(SysOrder sysOrder) { |
| | | |
| | | sysOrderDao.updateOrderTime(sysOrder.getOrderTime(), sysOrder.getId()); |
| | | sysOrderDao.updateOrderTime(sysOrder.getPayTime(), sysOrder.getId()); |
| | | // 修改业绩时间 |
| | | // 更新业绩时间 |
| | | AchieveNew achieveNew = new AchieveNew(); |
| | | achieveNew.setOrderId(sysOrder.getId()); |
| | | achieveNew.setDatatime(sysOrder.getOrderTime()); |
| | | achieveNew.setDatatime(sysOrder.getPayTime()); |
| | | achieveNewService.modifyAchieveTime(achieveNew); |
| | | //更新收款流水时间 |
| | | sysOrderFlowDao.updateTimeByOrderId(sysOrder.getId(),sysOrder.getPayTime()); |
| | | |
| | | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功"); |
| | | } |
| | | |
| | |
| | | MoneyCardUse cardUseInfo = cardUseService.findByVipId(order.getVipId()); |
| | | |
| | | if (cardUseInfo == null) { |
| | | cardUseInfo = new MoneyCardUse(); |
| | | cardUseInfo.setVipId(order.getVipId()); |
| | | cardUseInfo.setCardName("储值卡"); |
| | | cardUseInfo.setIsVipCar(Dictionary.FLAG_YES_Y); |
| | | cardUseInfo.setRealMoney(0D); |
| | | cardUseInfo.setGiftMoney(0D); |
| | | cardUseInfo.setSource("-"); |
| | | cardUseInfo.setStatus(Dictionary.MONEYCARD_STATUS_YX); |
| | | cardUseInfo.setFailTime(DateUtil.stringToDate("2050-01-01 00:00",DateUtil.DATE_FORMAT_MM)); |
| | | moneyCardUseDao.insert(cardUseInfo); |
| | | cardUseInfo=sysVipInfoService.addVipDefaultCard(order.getVipId()); |
| | | } |
| | | |
| | | //打印需求加入门店信息 |
| | |
| | | return "admin/hive/beautySalon/point-order"; |
| | | } |
| | | |
| | | @RequestMapping(value = "/findOrderDetailByIdOrNo") |
| | | @ResponseBody |
| | | public AjaxResult findOrderDetailByIdOrNo(SysOrder orderVo) { |
| | | // 根据id查到对应的订单信息 |
| | | SysOrder order=null; |
| | | if(orderVo.getId()!=null){ |
| | | order = orderService.findById(orderVo.getId()); |
| | | }else if(StringUtils.isNotBlank(orderVo.getOrderNo())){ |
| | | List<SysOrder> byModel = orderService.findByModel(orderVo); |
| | | if(byModel.size()==1){ |
| | | order=orderService.findById(byModel.get(0).getId()); |
| | | } |
| | | } |
| | | List<SysOrderItem> sysOrderItems = orderItemDao.selectByOrderId(order.getId()); |
| | | order.setItems(sysOrderItems); |
| | | |
| | | SysVipInfo vipInfo = sysVipInfoService.findById(order.getVipId()); |
| | | // 根据会员Id查到会员有效的会员卡 |
| | | // 根据订单号查找订单条目 |
| | | List<SysOrderItem> orderItems = orderItemService.findByOrderId(order.getId()); |
| | | |
| | | MoneyCardUse moneyCardUse = new MoneyCardUse(); |
| | | moneyCardUse.setVipId(order.getVipId()); |
| | | List<MoneyCardUse> cards = cardUseService.findByModel(moneyCardUse); |
| | | |
| | | List<SysOrderFlow> flows = sysOrderFlowService.findByOrderId(order.getId()); |
| | | order.setFlows(flows); |
| | | |
| | | List<SysOrderFlow> payMethods = sysOrderFlowService.findPayMethodsAmount(order.getId()); |
| | | |
| | | List<AchieveNew> achieveList = achieveNewService.findOrderItemAchieve(order.getId()); |
| | | |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("orderItems", orderItems); |
| | | ajaxResult.putInMap("order", order); |
| | | ajaxResult.putInMap("cards", cards); |
| | | ajaxResult.putInMap("vipInfo", vipInfo); |
| | | ajaxResult.putInMap("payMethods", payMethods); |
| | | ajaxResult.putInMap("achieveList", achieveList); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | /** |
| | | * 跳转 消费流水详情页面 |
| | | * |
| | |
| | | */ |
| | | @RequestMapping(value = "/orderItem") |
| | | public String orderItem(SysOrder orderVo) { |
| | | // 根据id查到对应的订单信息 |
| | | SysOrder order=null; |
| | | if(orderVo.getId()!=null){ |
| | | order = orderService.findById(orderVo.getId()); |
| | | }else if(StringUtils.isNotBlank(orderVo.getOrderNo())){ |
| | | List<SysOrder> byModel = orderService.findByModel(orderVo); |
| | | if(byModel.size()==1){ |
| | | order=orderService.findById(byModel.get(0).getId()); |
| | | } |
| | | } |
| | | List<SysOrderItem> sysOrderItems = orderItemDao.selectByOrderId(order.getId()); |
| | | order.setItems(sysOrderItems); |
| | | |
| | | WebUtil.getRequest().setAttribute("order", order); |
| | | // 根据会员Id查到会员有效的会员卡 |
| | | // 根据订单号查找订单条目 |
| | | SysOrderItem orderItem = new SysOrderItem(); |
| | | orderItem.setOrderId(order.getId()); |
| | | List<SysOrderItem> orderItems = orderItemService.findByModel(orderItem); |
| | | WebUtil.getRequest().setAttribute("orderItems", orderItems); |
| | | |
| | | MoneyCardUse moneyCardUse = new MoneyCardUse(); |
| | | moneyCardUse.setVipId(order.getVipId()); |
| | | List<MoneyCardUse> cards = cardUseService.findByModel(moneyCardUse); |
| | | |
| | | WebUtil.getRequest().setAttribute("cards", cards); |
| | | if(orderVo.getId()!=null){ |
| | | WebUtil.getRequest().setAttribute("orderParam", orderVo.getId()); |
| | | }else if(StringUtils.isNotBlank(orderVo.getOrderNo())){ |
| | | WebUtil.getRequest().setAttribute("orderParam", orderVo.getOrderNo()); |
| | | } |
| | | return "admin/hive/beautySalon/orderXq-form"; |
| | | } |
| | | |
| | |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.pojo.TaoCanVo; |
| | | import com.matrix.system.hive.service.*; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.jsoup.helper.DataUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | |
| | | queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_TC); |
| | | List<SysProjUse> taoCanList = projUseService.findInPage(queryUse, null); |
| | | taoCanList.forEach(item->{ |
| | | item.setTaocanProjUse(projUseService.selectTaocanProjUse(item.getId())); |
| | | item.setTaocanProjUse(projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus())); |
| | | item.setProjInfo(shoppingGoodsDao.selectById(item.getProjId())); |
| | | }); |
| | | result.putInMap("projList", projList); |
| | |
| | | public @ResponseBody |
| | | AjaxResult updateOrderTime(SysProjServices serviceQuery) { |
| | | SysProjServices services = sysProjServicesDao.selectById(serviceQuery.getId()); |
| | | sysProjServicesDao.updateOrderTime(serviceQuery.getCreateTime(), serviceQuery.getId()); |
| | | sysProjServicesDao.updateOrderTime(serviceQuery.getConsumeTime(), serviceQuery.getId()); |
| | | // 更新业绩时间 |
| | | AchieveNew achieveNew = new AchieveNew(); |
| | | achieveNew.setServiceOrderId(serviceQuery.getId()); |
| | | achieveNew.setDatatime(serviceQuery.getCreateTime()); |
| | | achieveNew.setDatatime(serviceQuery.getConsumeTime()); |
| | | achieveNewService.modifyAchieveTime(achieveNew); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功"); |
| | | } |
| | |
| | | if (balanceverifyResult.isError()) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, balanceverifyResult.getMsg()); |
| | | } |
| | | sysProjServices.setState(Dictionary.SERVICE_STATU_YYCG); |
| | | SysProjServices newSysProjServices = sysProjServicesService.addSysProjServices(sysProjServices); |
| | | if (newSysProjServices != null) { |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(newSysProjServices)); |
| | |
| | | @RequestMapping(value = "/admin/projtype") |
| | | public class ProjTypeController extends BaseController { |
| | | |
| | | |
| | | @Resource |
| | | private SysProjTypeService currentService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public static final String fnCode = "projType"; |
| | | public static final String search = fnCode + ":search"; |
| | |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.MoneyCardUse; |
| | | import com.matrix.system.hive.bean.ShoppingGoods; |
| | | import com.matrix.system.hive.bean.SysProjUse; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.MoneyCardUseDao; |
| | | import com.matrix.system.hive.dao.ShoppingGoodsDao; |
| | | import com.matrix.system.hive.dao.SysProjUseDao; |
| | |
| | | import com.matrix.system.hive.service.SysProjUseService; |
| | | import com.matrix.system.hive.service.SysProjuseFreezeService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @Resource |
| | | private MoneyCardUseService moneyCardUseService; |
| | | |
| | | @Resource |
| | | private SysProjUseDao projUseDao; |
| | | |
| | | @Autowired |
| | | SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | ShoppingGoodsDao shoppingGoodsDao; |
| | | |
| | | @Autowired |
| | | MoneyCardUseDao moneyCardUseDao; |
| | | |
| | | @Value("${default.vip.photo.woman}") |
| | | String defaultWoman; |
| | | |
| | | @Value("${default.vip.photo.man}") |
| | | String defaultman; |
| | | |
| | | |
| | | |
| | | public static final String fnCode = "projUse"; |
| | | public static final String search = fnCode + ":search"; |
| | |
| | | projUseService.findInPage(sysProjUse, pageVo), projUseService.findTotal(sysProjUse)); |
| | | } |
| | | |
| | | /** |
| | | * 查看会员项目使用情况 |
| | | * |
| | | * @author jiangyouyao |
| | | * @date 2016-09-03 |
| | | */ |
| | | @RequestMapping(value = "/findProjUseFlow") |
| | | public @ResponseBody |
| | | AjaxResult findProjUseFlow(PaginationVO pageVo, SysProjUseFlow projUseFlow) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, |
| | | projUseDao.selectProjUseFlow(projUseFlow, pageVo), projUseDao.selectProjUseFlowTotal(projUseFlow)); |
| | | } |
| | | |
| | | /** |
| | | * 将项目设置为有效 |
| | |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "项目转让失败"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/returnProj") |
| | | public @ResponseBody |
| | | AjaxResult returnTc(SysProjUse sysProjUse, Long moneyCardUseId, String tcRemark, Long shopId, Double money, String tcName) { |
| | | |
| | | MoneyCardUse card = null; |
| | | if (moneyCardUseId != null) { |
| | | card = moneyCardUseService.findById(moneyCardUseId); |
| | | } |
| | | int i = projUseService.returnMoneyProj(sysProjUse, card, moneyCardUseId); |
| | | if (i > 0) { |
| | | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "退款成功"); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "退款失败"); |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 退款 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/getEffectCard") |
| | | public @ResponseBody |
| | | AjaxResult getEffectCard(SysProjUse sysProjUse) { |
| | | MoneyCardUse cardUse = moneyCardUseService.findByVipId(sysProjUse.getVipId()); |
| | | double money = projUseService.getTotalMoneyProj(sysProjUse); |
| | | if (cardUse != null) { |
| | | cardUse.setRealMoney(money); |
| | | List<MoneyCardUse> list = new ArrayList<MoneyCardUse>(); |
| | | list.add(cardUse); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, null, "有有效会籍卡", list, null); |
| | | } else { |
| | | //无会员卡则new一个,为了把钱传递到前台 |
| | | cardUse = new MoneyCardUse(); |
| | | cardUse.setRealMoney(money); |
| | | List<MoneyCardUse> list = new ArrayList<MoneyCardUse>(); |
| | | list.add(cardUse); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, null, "无有效会籍卡", list, null); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 冻结会员项目 |
| | |
| | | /** |
| | | * 添加或修改会员項目信息 |
| | | */ |
| | | @Transactional |
| | | @RequestMapping(value = "/addOrModify") |
| | | public @ResponseBody |
| | | AjaxResult addOrModify(SysProjUse sysProjUse) { |
| | | if (sysProjUse.getId() != null) { |
| | | SysUsers user=getMe(); |
| | | //插入修改记录 |
| | | SysProjUse oldProjUse = projUseService.findById(sysProjUse.getId()); |
| | | SysProjUseFlow projUseFlow=new SysProjUseFlow(); |
| | | projUseFlow.setProjUseId(sysProjUse.getId()); |
| | | projUseFlow.setOptionType("人工修改"); |
| | | projUseFlow.setProjName(oldProjUse.getProjName()); |
| | | projUseFlow.setCreateBy(user.getSuName()); |
| | | projUseFlow.setUpdateBy(user.getSuName()); |
| | | projUseFlow.setPrice(sysProjUse.getPrice()); |
| | | projUseFlow.setStatus(sysProjUse.getStatus()); |
| | | projUseFlow.setBalance(sysProjUse.getBalance()); |
| | | projUseFlow.setFailTime(sysProjUse.getFailTime()); |
| | | projUseFlow.setIsOver(sysProjUse.getIsOver()); |
| | | projUseFlow.setRemark(sysProjUse.getUpdateRemark()); |
| | | projUseFlow.setSurplusCount(sysProjUse.getSurplusCount()); |
| | | projUseDao.insertFlow(projUseFlow); |
| | | |
| | | return modify(projUseService, sysProjUse, "项目"); |
| | | } else { |
| | | return add(projUseService, sysProjUse, "项目"); |
| | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | ShoppingGoodsDao shoppingGoodsDao; |
| | | |
| | | @Autowired |
| | | SysProjUseDao projUseDao; |
| | | |
| | | @Autowired |
| | | MoneyCardUseDao moneyCardUseDao; |
| | | |
| | | |
| | | @RequestMapping(value = "/importProjUse") |
| | |
| | | vipInfo = new SysVipInfo(); |
| | | vipInfo.setShopId(sysUsers.getShopId()); |
| | | vipInfo.setPhone(telStr); |
| | | vipInfo.setPhoto(defaultWoman); |
| | | vipInfo.setName(objects.get(0).toString()); |
| | | vipInfoDao.insert(vipInfo); |
| | | } |
| | |
| | | vipInfo = new SysVipInfo(); |
| | | vipInfo.setShopId(sysUsers.getShopId()); |
| | | vipInfo.setPhone(telStr); |
| | | vipInfo.setPhoto(defaultWoman); |
| | | vipInfo.setName(objects.get(0).toString()); |
| | | vipInfoDao.insert(vipInfo); |
| | | } |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | |
| | | public @ResponseBody |
| | | AjaxResult addOrModify(ShoppingGoodsCategory shoppingGoodsCategory) { |
| | | if (shoppingGoodsCategory.getId() != null) { |
| | | |
| | | // 自己不能是自己的父节点 |
| | | if (shoppingGoodsCategory.getParentId() != null && shoppingGoodsCategory.getParentId().equals(shoppingGoodsCategory.getId())) { |
| | | throw new GlobleException("父级不能是自己"); |
| | | } |
| | | |
| | | return modify(goodsCategoryService, shoppingGoodsCategory, "商品类型"); |
| | | } else { |
| | |
| | | @RequestMapping(value = "/all") |
| | | public @ResponseBody |
| | | AjaxResult all(ShoppingGoodsCategory shoppingGoodsCategory) { |
| | | SysUsers user = getMe(); |
| | | if(shoppingGoodsCategory.getShopId()==null){ |
| | | shoppingGoodsCategory.setShopId(user.getShopId()); |
| | | } |
| | | shoppingGoodsCategory.setCompanyId(user.getCompanyId()); |
| | | // SysUsers user = getMe(); |
| | | // if(shoppingGoodsCategory.getShopId()==null){ |
| | | // shoppingGoodsCategory.setShopId(user.getShopId()); |
| | | // } |
| | | // shoppingGoodsCategory.setCompanyId(user.getCompanyId()); |
| | | SysShopInfo zbShop = shopInfoDao.selectZbShop(getMe().getCompanyId()); |
| | | shoppingGoodsCategory.setShopId(zbShop.getId()); |
| | | QueryUtil.setQueryLimitCom(shoppingGoodsCategory); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, goodsCategoryService.findByModel(shoppingGoodsCategory), 0); |
| | | } |
| | | |
| | |
| | | public @ResponseBody |
| | | AjaxResult showList(ShoppingGoods shoppingGoods, PaginationVO pageVo) { |
| | | QueryUtil.setQueryLimit(shoppingGoods); |
| | | pageVo.setOrder("desc"); |
| | | pageVo.setSort("createTime"); |
| | | if(StringUtils.isBlank(pageVo.getSort())){ |
| | | pageVo.setOrder("desc"); |
| | | pageVo.setSort("createTime"); |
| | | } |
| | | |
| | | //2表示查询总部产品 |
| | | if (shoppingGoods.getHeadquarters()!=null && 2==shoppingGoods.getHeadquarters()) { |
| | | //仅查询本店产品 |
| | |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.bean.SysSupplierInfo; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.service.CodeService; |
| | | import com.matrix.system.hive.service.SysSupplierInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | |
| | | @Resource |
| | | private CodeService codeService; |
| | | |
| | | @Autowired |
| | | private SysShopInfoDao shopInfoDao; |
| | | |
| | | |
| | | |
| | |
| | | @RequestMapping(value = "/all") |
| | | public @ResponseBody AjaxResult all(SysSupplierInfo sysSupplierInfo) { |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysSupplierInfo.setShopId(sysUsers.getShopId()); |
| | | sysSupplierInfo.setCompanyId(sysUsers.getCompanyId()); |
| | | SysShopInfo shopInfo = shopInfoDao.selectZbShop(sysUsers.getCompanyId()); |
| | | sysSupplierInfo.setShopId(shopInfo.getId()); |
| | | sysSupplierInfo.setCompanyId(shopInfo.getCompanyId()); |
| | | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, currentService.findByModel(sysSupplierInfo), 0); |
| | | } |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.SysVipLabel; |
| | | import com.matrix.system.hive.dao.SysVipLabelDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | @Autowired |
| | | private SysVipLabelDao sysVipLabelDao; |
| | | |
| | | |
| | | @RequestMapping(value = "/showList") |
| | | @ResponseBody |
| | | private AjaxResult showList(SysVipLabel sysVipLabel, PaginationVO pageVo) { |
| | | SysUsers user = getMe(); |
| | | sysVipLabel.setCompanyId(user.getCompanyId()); |
| | | return AjaxResult.buildSuccessInstance(sysVipLabelDao.selectInPage(sysVipLabel, pageVo), sysVipLabelDao.selectTotal(sysVipLabel)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public AjaxResult add(SysVipLabel sysVipLabel) { |
| | | SysUsers sysUsers = getMe(); |
| | | |
| | | sysVipLabel.setIsAll(1); |
| | | sysVipLabel.setCompanyId(sysUsers.getCompanyId()); |
| | | List<SysVipLabel> sysVipLabels = sysVipLabelDao.selectByModel(sysVipLabel); |
| | | if (CollectionUtils.isNotEmpty(sysVipLabels)) { |
| | | return AjaxResult.buildFailInstance("已存在该标签"); |
| | |
| | | |
| | | sysVipLabel.setCreateBy(sysUsers.getSuName()); |
| | | sysVipLabel.setCreateTime(new Date()); |
| | | sysVipLabel.setColor(Dictionary.COLORS[new Random().nextInt(6)]); |
| | | |
| | | int i = sysVipLabelDao.insert(sysVipLabel); |
| | | if (i > 0) { |
| | |
| | | return AjaxResult.buildFailInstance("添加失败"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/modify") |
| | | @ResponseBody |
| | | public AjaxResult modify(SysVipLabel sysVipLabel) { |
| | | SysUsers sysUsers = getMe(); |
| | | |
| | | SysVipLabel hasExist = sysVipLabelDao.selectById(sysVipLabel.getId()); |
| | | if (!sysVipLabel.getLabel().equals(hasExist.getLabel())) { |
| | | SysVipLabel query = new SysVipLabel(); |
| | | query.setIsAll(1); |
| | | query.setCompanyId(sysUsers.getCompanyId()); |
| | | query.setLabel(sysVipLabel.getLabel()); |
| | | List<SysVipLabel> sysVipLabels = sysVipLabelDao.selectByModel(sysVipLabel); |
| | | if (CollectionUtils.isNotEmpty(sysVipLabels)) { |
| | | return AjaxResult.buildFailInstance("已存在该标签"); |
| | | } |
| | | } |
| | | |
| | | sysVipLabel.setColor(Dictionary.COLORS[new Random().nextInt(6)]); |
| | | |
| | | int i = sysVipLabelDao.update(sysVipLabel); |
| | | if (i > 0) { |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("编辑成功"); |
| | | ajaxResult.putInMap("label", sysVipLabel); |
| | | return ajaxResult; |
| | | } |
| | | return AjaxResult.buildFailInstance("编辑失败"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/del") |
| | | @ResponseBody |
| | | public AjaxResult del(Long id) { |
| | | int i = sysVipLabelDao.deleteById(id); |
| | | public AjaxResult del(String keys) { |
| | | List<Long> ids = StringUtils.strToCollToLong(keys, ","); |
| | | int i = sysVipLabelDao.deleteByIds(ids); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("删除成功"); |
| | | } else { |
| | | return AjaxResult.buildFailInstance("删除失败"); |
| | | } |
| | | return AjaxResult.buildFailInstance("删除失败"); |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/edit") |
| | | public String edit(Long id) { |
| | | if (id != null) { |
| | | SysVipLabel sysVipLabel = sysVipLabelDao.selectById(id); |
| | | WebUtil.getRequest().setAttribute("obj", sysVipLabel); |
| | | } |
| | | return "admin/hive/operate/label-form"; |
| | | } |
| | | } |
| | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.MoneyCardUse; |
| | | import com.matrix.system.hive.bean.SysProjUse; |
| | | import com.matrix.system.hive.bean.SysProjUseFlow; |
| | | import com.matrix.system.hive.dao.SysProjUseDao; |
| | | import com.matrix.system.hive.service.MoneyCardUseService; |
| | | import com.matrix.system.hive.service.SysProjUseService; |
| | |
| | | List<SysProjUse> projUseList =sysProjUseService.findInPage(sysProjUse,null); |
| | | //设置套餐中的项目 |
| | | projUseList.forEach(taocanProjUse -> { |
| | | taocanProjUse.setTaocanProjUse(sysProjUseService.selectTaocanProjUse(taocanProjUse.getId())); |
| | | taocanProjUse.setTaocanProjUse(sysProjUseService.selectTaocanProjUse(taocanProjUse.getId(),sysProjUse.getStatus())); |
| | | }); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, projUseList, sysProjUseService.findTotal(sysProjUse)); |
| | | } |
| | |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "套餐转让失败"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/returnTc") |
| | | public @ResponseBody |
| | | AjaxResult returnTc(SysProjUse sysProjUse, Long moneyCardUseId, String tcRemark, Long shopId, Double money, String tcName) { |
| | | |
| | | System.out.println("moneyCardUseId = " + moneyCardUseId); |
| | | MoneyCardUse card = moneyCardUseService.findById(moneyCardUseId); |
| | | System.out.println("card = " + card); |
| | | int i = sysProjUseService.returnMoneyTc(sysProjUse, card, moneyCardUseId); |
| | | if (i > 0) { |
| | | |
| | | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "退款成功"); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "退款失败"); |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 退款 |
| | | * |
| | | * @return |
| | | */ |
| | | |
| | | @RequestMapping(value = "/getEffectCard") |
| | | public @ResponseBody |
| | | AjaxResult getEffectCard(SysProjUse sysProjUse) { |
| | |
| | | public String editForm(Long id) { |
| | | if (id != null) { |
| | | SysProjUse sysProjUse = sysProjUseService.findById(id); |
| | | sysProjUse.setTaocanProjUse(sysProjUseService.selectTaocanProjUse(sysProjUse.getId())); |
| | | sysProjUse.setTaocanProjUse(sysProjUseService.selectTaocanProjUse(sysProjUse.getId(), sysProjUse.getStatus())); |
| | | WebUtil.getRequest().setAttribute("obj", sysProjUse); |
| | | } |
| | | return "admin/hive/vip/tc-form"; |
| | |
| | | public @ResponseBody |
| | | AjaxResult addOrModify(SysProjUse sysProjUse) { |
| | | if (sysProjUse.getId() != null) { |
| | | |
| | | //插入修改记录 |
| | | SysUsers user=getMe(); |
| | | //插入修改记录 |
| | | SysProjUse oldProjUse = sysProjUseService.findById(sysProjUse.getId()); |
| | | SysProjUseFlow projUseFlow=new SysProjUseFlow(); |
| | | projUseFlow.setProjUseId(sysProjUse.getId()); |
| | | projUseFlow.setOptionType("人工修改"); |
| | | projUseFlow.setProjName(oldProjUse.getProjName()); |
| | | projUseFlow.setCreateBy(user.getSuName()); |
| | | projUseFlow.setUpdateBy(user.getSuName()); |
| | | projUseFlow.setPrice(sysProjUse.getPrice()); |
| | | projUseFlow.setStatus(sysProjUse.getStatus()); |
| | | projUseFlow.setBalance(sysProjUse.getBalance()); |
| | | projUseFlow.setFailTime(sysProjUse.getFailTime()); |
| | | projUseFlow.setIsOver(sysProjUse.getIsOver()); |
| | | projUseFlow.setRemark(sysProjUse.getUpdateRemark()); |
| | | projUseFlow.setSurplusCount(sysProjUse.getSurplusCount()); |
| | | projUseDao.insertFlow(projUseFlow); |
| | | |
| | | |
| | | int modifyResult = sysProjUseService.modify(sysProjUse); |
| | | |
| | | List<SysProjUse> modifyUse = sysProjUse.getTaocanProjUse(); |
| | |
| | | if (modifyResult > 0) { |
| | | if (CollectionUtils.isNotEmpty(modifyUse)) { |
| | | for (SysProjUse use : modifyUse) { |
| | | |
| | | //插入修改记录 |
| | | SysProjUse oldProjUse2 = sysProjUseService.findById(use.getId()); |
| | | SysProjUseFlow projUseFlow2=new SysProjUseFlow(); |
| | | //套餐中的项目需要记录套餐id |
| | | projUseFlow2.setProjUseId(oldProjUse.getId()); |
| | | projUseFlow2.setOptionType("人工修改"); |
| | | projUseFlow2.setProjName(oldProjUse2.getProjName()); |
| | | projUseFlow2.setCreateBy(user.getSuName()); |
| | | projUseFlow2.setUpdateBy(user.getSuName()); |
| | | projUseFlow2.setPrice(use.getPrice()); |
| | | projUseFlow2.setStatus(use.getStatus()); |
| | | projUseFlow2.setBalance(use.getBalance()); |
| | | projUseFlow2.setFailTime(use.getFailTime()); |
| | | projUseFlow2.setIsOver(use.getIsOver()); |
| | | projUseFlow2.setRemark(sysProjUse.getUpdateRemark()); |
| | | projUseFlow2.setSurplusCount(use.getSurplusCount()); |
| | | projUseDao.insertFlow(projUseFlow2); |
| | | |
| | | sysProjUseService.modify(use); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | private String t2; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 业绩种类 1-现金业绩 2-划扣业绩 |
| | | */ |
| | | private String t3; |
| | | |
| | | |
| | |
| | | @Extend |
| | | private Double achieveMoney; |
| | | |
| | | private String goodsNo; |
| | | |
| | | private String goodsName; |
| | | |
| | | private String type; |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getGoodsNo() { |
| | | return goodsNo; |
| | | } |
| | | |
| | | public void setGoodsNo(String goodsNo) { |
| | | this.goodsNo = goodsNo; |
| | | } |
| | | |
| | | public String getGoodsName() { |
| | | return goodsName; |
| | | } |
| | | |
| | | public void setGoodsName(String goodsName) { |
| | | this.goodsName = goodsName; |
| | | } |
| | | |
| | | public Integer getArriveCnt() { |
| | | return arriveCnt; |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-15 |
| | | **/ |
| | | public class AppVersion { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private Long id; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createtime; |
| | | |
| | | private String version; |
| | | private String content; |
| | | private String address; |
| | | private Integer type; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Date getCreatetime() { |
| | | return createtime; |
| | | } |
| | | |
| | | public void setCreatetime(Date createtime) { |
| | | this.createtime = createtime; |
| | | } |
| | | |
| | | public String getVersion() { |
| | | return version; |
| | | } |
| | | |
| | | public void setVersion(String version) { |
| | | this.version = version; |
| | | } |
| | | |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | |
| | | public void setContent(String content) { |
| | | this.content = content; |
| | | } |
| | | |
| | | public String getAddress() { |
| | | return address; |
| | | } |
| | | |
| | | public void setAddress(String address) { |
| | | this.address = address; |
| | | } |
| | | |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | |
| | | import java.util.Date; |
| | | import java.io.Serializable; |
| | | /** |
| | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_SS, timezone = "GMT+8") |
| | | private Date createtiem; |
| | | |
| | | |
| | |
| | | */ |
| | | private Integer commentNum; |
| | | |
| | | private Long shopId; |
| | | private Long companyId; |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Integer getCommentNum() { |
| | |
| | | private String type; |
| | | |
| | | private Long shopId; |
| | | |
| | | private String parentIds; |
| | | |
| | | private Long companyId; |
| | | |
| | | /** |
| | | * 扩展属性 |
| | |
| | | public void setArticle(Article article) { |
| | | this.article = article; |
| | | }*/ |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | |
| | | this.type=type; |
| | | } |
| | | |
| | | public String getParentIds() { |
| | | return parentIds; |
| | | } |
| | | |
| | | public void setParentIds(String parentIds) { |
| | | this.parentIds = parentIds; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ArticleType [id=" + id + ", articleTypeName=" + articleTypeName |
| | |
| | | * 充值卡的id |
| | | */ |
| | | private Long goodsId; |
| | | |
| | | /** |
| | | * 订单ID |
| | | */ |
| | | private Long orderId; |
| | | |
| | | |
| | | private Long vipId; |
| | |
| | | private String isOver; |
| | | |
| | | /** |
| | | * 是会籍卡? Y 是,N否 |
| | | * 是默认储值卡? Y 是,N否 |
| | | */ |
| | | private String isVipCar; |
| | | /** |
| | |
| | | */ |
| | | private String cardName; |
| | | |
| | | public Long getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(Long orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public String getCardName() { |
| | | return cardName; |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * |
| | | * @date 2016-07-30 09:54 |
| | | */ |
| | | public class ShoppingGoodsCategory2 implements Serializable{ |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | private String id; |
| | | |
| | | |
| | | /** |
| | | * 类型名称 |
| | | */ |
| | | private String name; |
| | | |
| | | |
| | | /** |
| | | * 父类型 |
| | | */ |
| | | private Long parentId; |
| | | |
| | | |
| | | /** |
| | | * 排序 |
| | | */ |
| | | private Integer sequence; |
| | | |
| | | /** |
| | | * 销售平台 |
| | | */ |
| | | private String salePlatform; |
| | | |
| | | |
| | | private Long shopId; |
| | | |
| | | private Long companyId; |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id=id; |
| | | } |
| | | |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name=name; |
| | | } |
| | | |
| | | |
| | | public Long getParentId() { |
| | | return parentId; |
| | | } |
| | | |
| | | public void setParentId(Long parentId) { |
| | | this.parentId=parentId; |
| | | } |
| | | |
| | | |
| | | public Integer getSequence() { |
| | | return sequence; |
| | | } |
| | | |
| | | public void setSequence(Integer sequence) { |
| | | this.sequence=sequence; |
| | | } |
| | | |
| | | public String getSalePlatform() { |
| | | return salePlatform; |
| | | } |
| | | |
| | | public void setSalePlatform(String salePlatform) { |
| | | this.salePlatform = salePlatform; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ShoppingGoodsCategory [id=" + id + ", name=" + name |
| | | + ", parentId=" + parentId + ", sequence=" + sequence |
| | | + ", salePlatform=" + salePlatform + "]"; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.pojo.EntityDTO; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.common.bean.EntityDTOExt; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 跟进 |
| | | * @author |
| | | * @date 2021-01-10 15:15 |
| | | */ |
| | | public class SysFollowup extends EntityDTOExt{ |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | |
| | | /** |
| | | * 员工ID |
| | | */ |
| | | private Long staffId; |
| | | |
| | | |
| | | /** |
| | | * 客户ID |
| | | */ |
| | | @NotNull(message = "客户ID不能为空") |
| | | @ApiModelProperty(value = "客户ID", example = "10") |
| | | private Long vipId; |
| | | |
| | | |
| | | /** |
| | | * 订单id |
| | | */ |
| | | @ApiModelProperty(value = "订单id", example = "10") |
| | | private Long orderId; |
| | | |
| | | |
| | | /** |
| | | * 服务单id |
| | | */ |
| | | @ApiModelProperty(value = "服务单id", example = "10") |
| | | private Long serviceId; |
| | | |
| | | |
| | | /** |
| | | * 门店id |
| | | */ |
| | | private Long shopId; |
| | | |
| | | |
| | | /** |
| | | * 公司id |
| | | */ |
| | | private Long companyId; |
| | | |
| | | |
| | | /** |
| | | * 下次跟进时间 |
| | | */ |
| | | @ApiModelProperty(value = "下次跟进时间", example = "2021-01-02 12:22") |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | private Date nextNotifyTime; |
| | | |
| | | |
| | | /** |
| | | * 跟进内容 |
| | | */ |
| | | @NotNull(message = "跟进内容不能为空") |
| | | @ApiModelProperty(value = "跟进内容", example = "") |
| | | private String content; |
| | | |
| | | |
| | | /** |
| | | * 可见范围1公开,2仅自己可见 |
| | | */ |
| | | @NotNull(message = "可见范围不能为空") |
| | | @ApiModelProperty(value = "可见范围1公开,2仅自己可见", example = "") |
| | | private Integer visible; |
| | | |
| | | |
| | | /** |
| | | * 订单摘要信息 |
| | | */ |
| | | @ApiModelProperty(value = "订单摘要信息", example = "") |
| | | private String orderAbstract; |
| | | |
| | | /** |
| | | * 点赞人ids |
| | | */ |
| | | @ApiModelProperty(value = "点赞人ids", example = "1,2") |
| | | private String zans; |
| | | |
| | | @Extend |
| | | @ApiModelProperty(value = "点赞人列表",example ="") |
| | | private List<SysUsers> zanUsers; |
| | | |
| | | @Extend |
| | | @ApiModelProperty(value = "图片集合", example = "") |
| | | private List<SysVipAlbum> albums; |
| | | |
| | | @Extend |
| | | @ApiModelProperty(value = "评论集合",example ="") |
| | | private List<SysFollowupComment> followupComments; |
| | | |
| | | @Extend |
| | | @ApiModelProperty(value = "员工名称",example ="") |
| | | private String staffName; |
| | | |
| | | @Extend |
| | | @ApiModelProperty(value = "员工头像",example ="") |
| | | private String staffPhoto; |
| | | |
| | | @Extend |
| | | @ApiModelProperty(value = "客户名称",example ="") |
| | | private String vipName; |
| | | |
| | | public String getStaffName() { |
| | | return staffName; |
| | | } |
| | | |
| | | public void setStaffName(String staffName) { |
| | | this.staffName = staffName; |
| | | } |
| | | |
| | | public String getStaffPhoto() { |
| | | return staffPhoto; |
| | | } |
| | | |
| | | public void setStaffPhoto(String staffPhoto) { |
| | | this.staffPhoto = staffPhoto; |
| | | } |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public List<SysFollowupComment> getFollowupComments() { |
| | | return followupComments; |
| | | } |
| | | |
| | | public void setFollowupComments(List<SysFollowupComment> followupComments) { |
| | | this.followupComments = followupComments; |
| | | } |
| | | |
| | | public Integer getVisible() { |
| | | return visible; |
| | | } |
| | | |
| | | public void setVisible(Integer visible) { |
| | | this.visible = visible; |
| | | } |
| | | |
| | | public List<SysUsers> getZanUsers() { |
| | | return zanUsers; |
| | | } |
| | | |
| | | public void setZanUsers(List<SysUsers> zanUsers) { |
| | | this.zanUsers = zanUsers; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getStaffId() { |
| | | return staffId; |
| | | } |
| | | |
| | | public void setStaffId(Long staffId) { |
| | | this.staffId = staffId; |
| | | } |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public Long getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(Long orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public Long getServiceId() { |
| | | return serviceId; |
| | | } |
| | | |
| | | public void setServiceId(Long serviceId) { |
| | | this.serviceId = serviceId; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public List<SysVipAlbum> getAlbums() { |
| | | return albums; |
| | | } |
| | | |
| | | public void setAlbums(List<SysVipAlbum> albums) { |
| | | this.albums = albums; |
| | | } |
| | | |
| | | public Date getNextNotifyTime() { |
| | | return nextNotifyTime; |
| | | } |
| | | |
| | | public SysFollowup setNextNotifyTime(Date nextNotifyTime) { |
| | | this.nextNotifyTime=nextNotifyTime; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | |
| | | public SysFollowup setContent(String content) { |
| | | this.content=content; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | public String getOrderAbstract() { |
| | | return orderAbstract; |
| | | } |
| | | |
| | | public SysFollowup setOrderAbstract(String orderAbstract) { |
| | | this.orderAbstract=orderAbstract; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | public String getZans() { |
| | | return zans; |
| | | } |
| | | |
| | | public SysFollowup setZans(String zans) { |
| | | this.zans=zans; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.matrix.core.pojo.EntityDTO; |
| | | import com.matrix.core.anotations.Extend; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @description 跟进评论 |
| | | * @author |
| | | * @date 2021-01-10 15:15 |
| | | */ |
| | | public class SysFollowupComment extends EntityDTO{ |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | |
| | | /** |
| | | * 跟进id |
| | | */ |
| | | @NotNull(message = "跟进记录id不能为空") |
| | | @ApiModelProperty(value = "跟进id", example = "1") |
| | | private Long follId; |
| | | |
| | | |
| | | /** |
| | | * 员工ID |
| | | */ |
| | | private Long staffId; |
| | | |
| | | |
| | | /** |
| | | * 评论内容 |
| | | */ |
| | | @NotNull(message = "评论内容不能为空") |
| | | @ApiModelProperty(value = "评论内容不能为空", example = "不错") |
| | | private String content; |
| | | |
| | | |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public SysFollowupComment setId(Long id) { |
| | | this.id=id; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | public Long getFollId() { |
| | | return follId; |
| | | } |
| | | |
| | | public SysFollowupComment setFollId(Long follId) { |
| | | this.follId=follId; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | public Long getStaffId() { |
| | | return staffId; |
| | | } |
| | | |
| | | public SysFollowupComment setStaffId(Long staffId) { |
| | | this.staffId=staffId; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | |
| | | public SysFollowupComment setContent(String content) { |
| | | this.content=content; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public static final String INSTORE_TYPE_RETURN = "退货入库"; |
| | | |
| | | /** |
| | | * 序号 |
| | |
| | | * 订单明细 |
| | | */ |
| | | private List<SysOrderItem> items; |
| | | |
| | | private List<SysOrderFlow> flows; |
| | | /** |
| | | * 会员姓名 |
| | | */ |
| | |
| | | private String staffName; |
| | | |
| | | private String shopName; |
| | | |
| | | private String shopShortName; |
| | | |
| | | private Long searchShop; |
| | | /** |
| | |
| | | */ |
| | | private Integer times; |
| | | |
| | | private String type; |
| | | |
| | | /** |
| | | * 原有订单ID 退款时使用 |
| | | */ |
| | | private Long oldOrderId; |
| | | |
| | | public Long getOldOrderId() { |
| | | return oldOrderId; |
| | | } |
| | | |
| | | public void setOldOrderId(Long oldOrderId) { |
| | | this.oldOrderId = oldOrderId; |
| | | } |
| | | |
| | | public List<SysOrderFlow> getFlows() { |
| | | return flows; |
| | | } |
| | | |
| | | public void setFlows(List<SysOrderFlow> flows) { |
| | | this.flows = flows; |
| | | } |
| | | |
| | | public String getShopShortName() { |
| | | return shopShortName; |
| | | } |
| | | |
| | | public void setShopShortName(String shopShortName) { |
| | | this.shopShortName = shopShortName; |
| | | } |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public Integer getTimes() { |
| | | return times; |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-07 |
| | | **/ |
| | | public class SysOrderFlow implements Serializable { |
| | | private static final long serialVersionUID = 7519131902836023680L; |
| | | |
| | | public static final String PAY_METHOD_CARD = "储值卡"; |
| | | |
| | | public static final String PAY_METHOD_ARREARS = "欠款"; |
| | | |
| | | public static final String FLOW_TYPE_BUY = "购买"; |
| | | |
| | | public static final String FLOW_TYPE_REPAY = "还款"; |
| | | |
| | | public static final String FLOW_TYPE_REFUND = "退款"; |
| | | |
| | | public static final String IS_GIFT_Y = "Y"; |
| | | public static final String IS_GIFT_N = "N"; |
| | | |
| | | private String createBy; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT-8") |
| | | private Date createTime; |
| | | |
| | | private String updateBy; |
| | | |
| | | private Date updateTime; |
| | | |
| | | private Long id; |
| | | |
| | | private String flowNo; |
| | | |
| | | private Long orderId; |
| | | |
| | | private String flowContent; |
| | | |
| | | private String flowType; |
| | | |
| | | private BigDecimal amount; |
| | | |
| | | private String payMethod; |
| | | |
| | | private Long vipId; |
| | | |
| | | private Long cardId; |
| | | |
| | | private String isGift; |
| | | |
| | | private String orderNo; |
| | | |
| | | private Long shopId; |
| | | |
| | | private Long companyId; |
| | | |
| | | public String getOrderNo() { |
| | | return orderNo; |
| | | } |
| | | |
| | | public void setOrderNo(String orderNo) { |
| | | this.orderNo = orderNo; |
| | | } |
| | | |
| | | public Long getCardId() { |
| | | return cardId; |
| | | } |
| | | |
| | | public void setCardId(Long cardId) { |
| | | this.cardId = cardId; |
| | | } |
| | | |
| | | public String getIsGift() { |
| | | return isGift; |
| | | } |
| | | |
| | | public void setIsGift(String isGift) { |
| | | this.isGift = isGift; |
| | | } |
| | | |
| | | 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 Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getFlowNo() { |
| | | return flowNo; |
| | | } |
| | | |
| | | public void setFlowNo(String flowNo) { |
| | | this.flowNo = flowNo; |
| | | } |
| | | |
| | | public Long getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(Long orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public String getFlowContent() { |
| | | return flowContent; |
| | | } |
| | | |
| | | public void setFlowContent(String flowContent) { |
| | | this.flowContent = flowContent; |
| | | } |
| | | |
| | | public String getFlowType() { |
| | | return flowType; |
| | | } |
| | | |
| | | public void setFlowType(String flowType) { |
| | | this.flowType = flowType; |
| | | } |
| | | |
| | | public BigDecimal getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(BigDecimal amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public String getPayMethod() { |
| | | return payMethod; |
| | | } |
| | | |
| | | public void setPayMethod(String payMethod) { |
| | | this.payMethod = payMethod; |
| | | } |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | } |
| | |
| | | |
| | | private ShoppingGoods shoppingGoods; |
| | | |
| | | /** |
| | | * 原有数量 |
| | | */ |
| | | private int preCount; |
| | | |
| | | /** |
| | | * 是否退库存 |
| | | */ |
| | | private String isReturnStore; |
| | | |
| | | /** |
| | | * 退款时,原itemid |
| | | */ |
| | | private Long oldItemId; |
| | | |
| | | public Long getOldItemId() { |
| | | return oldItemId; |
| | | } |
| | | |
| | | public void setOldItemId(Long oldItemId) { |
| | | this.oldItemId = oldItemId; |
| | | } |
| | | |
| | | public String getIsReturnStore() { |
| | | return isReturnStore; |
| | | } |
| | | |
| | | public void setIsReturnStore(String isReturnStore) { |
| | | this.isReturnStore = isReturnStore; |
| | | } |
| | | |
| | | public int getPreCount() { |
| | | return preCount; |
| | | } |
| | | |
| | | public void setPreCount(int preCount) { |
| | | this.preCount = preCount; |
| | | } |
| | | |
| | | public ShoppingGoods getShoppingGoods() { |
| | | return shoppingGoods; |
| | | } |
| | |
| | | /** |
| | | * 订单划扣时间 |
| | | */ |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date consumeTime; |
| | | |
| | | /** |
| | |
| | | * 床位名称 |
| | | */ |
| | | private String bedName; |
| | | /** |
| | | * 评价 |
| | | */ |
| | | private String comment; |
| | | /** |
| | | * 评价回复 |
| | | */ |
| | | private String reply; |
| | | /** |
| | | * 商机 |
| | | */ |
| | |
| | | * 服务预计时长 |
| | | */ |
| | | private Integer totalTime; |
| | | |
| | | |
| | | /** |
| | | * 到时提醒次数 |
| | | */ |
| | | private Integer overtimeNotice; |
| | | |
| | | |
| | | |
| | |
| | | * 门店 |
| | | */ |
| | | private SysShopInfo shopInfo; |
| | | |
| | | public String getComment() { |
| | | return comment; |
| | | } |
| | | |
| | | public void setComment(String comment) { |
| | | this.comment = comment; |
| | | } |
| | | |
| | | public String getReply() { |
| | | return reply; |
| | | } |
| | | |
| | | public void setReply(String reply) { |
| | | this.reply = reply; |
| | | } |
| | | |
| | | @Extend |
| | | private String shopName; |
| | |
| | | @Extend |
| | | private String pageFlae; |
| | | |
| | | |
| | | public Integer getOvertimeNotice() { |
| | | return overtimeNotice; |
| | | } |
| | | |
| | | public void setOvertimeNotice(Integer overtimeNotice) { |
| | | this.overtimeNotice = overtimeNotice; |
| | | } |
| | | |
| | | public String getPageFlae() { |
| | | return pageFlae; |
| | | } |
| | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.pojo.EntityDTO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.common.bean.EntityDTOExt; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | /** |
| | | * @date 2016-07-03 20:53 |
| | | */ |
| | | public class SysProjUse implements Serializable { |
| | | public class SysProjUse extends EntityDTO { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_DD) |
| | | private Date failTime; |
| | | |
| | | |
| | | private Date targetFailTime; |
| | | /** |
| | | * 套餐id |
| | | */ |
| | |
| | | * 订单明细id 不明确 |
| | | */ |
| | | private Long orderItemId; |
| | | |
| | | /** |
| | | * 订单id |
| | | */ |
| | | @Extend |
| | | private Long orderId; |
| | | |
| | | /** |
| | | * 单次扣减金额(理解为单次手工业绩) |
| | |
| | | */ |
| | | private Integer deductionNum; |
| | | |
| | | private Integer timeLength; |
| | | |
| | | private String img; |
| | | |
| | | private String queryKey; |
| | | |
| | | @Extend |
| | | private String updateRemark; |
| | | |
| | | |
| | | public Long getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(Long orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public String getUpdateRemark() { |
| | | return updateRemark; |
| | | } |
| | | |
| | | public void setUpdateRemark(String updateRemark) { |
| | | this.updateRemark = updateRemark; |
| | | } |
| | | |
| | | public Date getTargetFailTime() { |
| | | return targetFailTime; |
| | | } |
| | | |
| | | public void setTargetFailTime(Date targetFailTime) { |
| | | this.targetFailTime = targetFailTime; |
| | | } |
| | | |
| | | public String getQueryKey() { |
| | | return queryKey; |
| | | } |
| | | |
| | | public void setQueryKey(String queryKey) { |
| | | this.queryKey = queryKey; |
| | | } |
| | | |
| | | public Integer getTimeLength() { |
| | | return timeLength; |
| | | } |
| | | |
| | | public void setTimeLength(Integer timeLength) { |
| | | this.timeLength = timeLength; |
| | | } |
| | | |
| | | public String getImg() { |
| | | return img; |
| | | } |
| | | |
| | | public void setImg(String img) { |
| | | this.img = img; |
| | | } |
| | | |
| | | public String getIsInfinite() { |
| | | return isInfinite; |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.pojo.EntityDTO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.common.bean.EntityDTOExt; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | | /**项目余次操作记录 |
| | | * @date 2016-07-03 20:53 |
| | | */ |
| | | public class SysProjUseFlow extends EntityDTO { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | */ |
| | | private Long id; |
| | | |
| | | |
| | | /** |
| | | * 项目id |
| | | */ |
| | | private Long projUseId; |
| | | |
| | | /** |
| | | * 剩余次数 |
| | | */ |
| | | private Integer surplusCount; |
| | | |
| | | /** |
| | | * 是否使用完成Y完成,N未完成 |
| | | */ |
| | | private String isOver; |
| | | |
| | | /** |
| | | * 有效期 |
| | | */ |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_DD) |
| | | private Date failTime; |
| | | |
| | | /** |
| | | * 单次扣减金额 |
| | | */ |
| | | private Double price; |
| | | |
| | | /** |
| | | * 套餐状态,有效,无效,冻结,转让,退款 |
| | | */ |
| | | private String status; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 使用情况余额 |
| | | */ |
| | | private Double balance; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 项目名称 |
| | | */ |
| | | private String projName; |
| | | |
| | | /** |
| | | * 操作类型 |
| | | */ |
| | | private String optionType; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @Extend |
| | | private String beginTime; |
| | | |
| | | /** |
| | | *结束时间 |
| | | */ |
| | | @Extend |
| | | private String endTime; |
| | | |
| | | 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 Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getProjUseId() { |
| | | return projUseId; |
| | | } |
| | | |
| | | public void setProjUseId(Long projUseId) { |
| | | this.projUseId = projUseId; |
| | | } |
| | | |
| | | public Integer getSurplusCount() { |
| | | return surplusCount; |
| | | } |
| | | |
| | | public void setSurplusCount(Integer surplusCount) { |
| | | this.surplusCount = surplusCount; |
| | | } |
| | | |
| | | public String getIsOver() { |
| | | return isOver; |
| | | } |
| | | |
| | | public void setIsOver(String isOver) { |
| | | this.isOver = isOver; |
| | | } |
| | | |
| | | public Date getFailTime() { |
| | | return failTime; |
| | | } |
| | | |
| | | public void setFailTime(Date failTime) { |
| | | this.failTime = failTime; |
| | | } |
| | | |
| | | public Double getPrice() { |
| | | return price; |
| | | } |
| | | |
| | | public void setPrice(Double price) { |
| | | this.price = price; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Double getBalance() { |
| | | return balance; |
| | | } |
| | | |
| | | public void setBalance(Double balance) { |
| | | this.balance = balance; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public String getProjName() { |
| | | return projName; |
| | | } |
| | | |
| | | public void setProjName(String projName) { |
| | | this.projName = projName; |
| | | } |
| | | |
| | | public String getOptionType() { |
| | | return optionType; |
| | | } |
| | | |
| | | public void setOptionType(String optionType) { |
| | | this.optionType = optionType; |
| | | } |
| | | } |
| | |
| | | private String userName; |
| | | |
| | | @Extend |
| | | private String sex; |
| | | |
| | | @Extend |
| | | private String shopName; |
| | | |
| | | @Extend |
| | | private String checkUserName; |
| | | |
| | | public String getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public void setSex(String sex) { |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public Date getBeginTime() { |
| | | return beginTime; |
| | | } |
| | |
| | | |
| | | private String name; |
| | | |
| | | @Extend |
| | | private String queryKey; |
| | | |
| | | public String getQueryKey() { |
| | | return queryKey; |
| | | } |
| | | |
| | | public void setQueryKey(String queryKey) { |
| | | this.queryKey = queryKey; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.matrix.core.pojo.EntityDTO; |
| | | import com.matrix.core.anotations.Extend; |
| | | |
| | | /** |
| | | * @description 客户相册 |
| | | * @author |
| | | * @date 2021-01-10 15:15 |
| | | */ |
| | | public class SysVipAlbum extends EntityDTO{ |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | public static final int SOURCE_FOLLOW = 1; |
| | | public static final int SOURCE_SKILL = 2; |
| | | |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | |
| | | /** |
| | | * 客户ID |
| | | */ |
| | | private Long vipId; |
| | | |
| | | |
| | | /** |
| | | * 图片路径 |
| | | */ |
| | | private String img; |
| | | |
| | | |
| | | /** |
| | | * 来源1,跟进,2批发检测 |
| | | */ |
| | | private Integer source; |
| | | |
| | | |
| | | /** |
| | | * 来源主键 |
| | | */ |
| | | private Long sourceId; |
| | | |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public String getImg() { |
| | | return img; |
| | | } |
| | | |
| | | public SysVipAlbum setImg(String img) { |
| | | this.img=img; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | public Integer getSource() { |
| | | return source; |
| | | } |
| | | |
| | | public SysVipAlbum setSource(Integer source) { |
| | | this.source=source; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | public Long getSourceId() { |
| | | return sourceId; |
| | | } |
| | | |
| | | public SysVipAlbum setSourceId(Long sourceId) { |
| | | this.sourceId=sourceId; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | private Long companyId; |
| | | |
| | | |
| | | /** |
| | | * 省 |
| | | */ |
| | | private String province; |
| | | |
| | | /** |
| | | * 市 |
| | | */ |
| | | private String city; |
| | | |
| | | /** |
| | | * 区 |
| | | */ |
| | | private String area; |
| | | |
| | | /** |
| | | * 推荐人 |
| | | */ |
| | | private Long recommendId; |
| | | |
| | | |
| | | //血型 |
| | | private String blood; |
| | |
| | | |
| | | private SysOrder sysOrder; |
| | | |
| | | 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 Long getRecommendId() { |
| | | return recommendId; |
| | | } |
| | | |
| | | public void setRecommendId(Long recommendId) { |
| | | this.recommendId = recommendId; |
| | | } |
| | | |
| | | public SysOrder getSysOrder() { |
| | | return sysOrder; |
| | | } |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 会员ID |
| | | */ |
| | | private Long vipId; |
| | | |
| | | /** |
| | | * 标签内容 |
| | | */ |
| | | private String label; |
| | | |
| | | private Long shopId; |
| | | |
| | | private Long companyId; |
| | | |
| | | private Long userId; |
| | | |
| | | private Integer isAll; |
| | | |
| | | private String color; |
| | | |
| | | private String shopName; |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | public Long getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUserId(Long userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public Integer getIsAll() { |
| | | return isAll; |
| | | } |
| | | |
| | | public void setIsAll(Integer isAll) { |
| | | this.isAll = isAll; |
| | | } |
| | | |
| | | public String getColor() { |
| | | return color; |
| | | } |
| | | |
| | | public void setColor(String color) { |
| | | this.color = color; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public String getLabel() { |
New file |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-22 |
| | | **/ |
| | | public class SysVipLabelRelate implements Serializable { |
| | | private static final long serialVersionUID = 1860770077746416680L; |
| | | |
| | | private Long id; |
| | | |
| | | private Long labelId; |
| | | |
| | | private Long vipId; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getLabelId() { |
| | | return labelId; |
| | | } |
| | | |
| | | public void setLabelId(Long labelId) { |
| | | this.labelId = labelId; |
| | | } |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | } |
| | |
| | | |
| | | private Long shopId; |
| | | |
| | | private Long companyId; |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.vo.OrderDetailAchieveItemVo; |
| | | import com.matrix.system.app.vo.RankingVo; |
| | | import com.matrix.system.app.vo.UserAchieveVo; |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | List<AchieveNew> selectVipConsumeStatisticsList(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | int selectVipConsumeStatisticsTotal(@Param("record") AchieveNew achieveNew); |
| | | |
| | | |
| | | UserAchieveVo selectUserAchieveByTime(@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("userId") Long userId); |
| | | |
| | | List<OrderDetailAchieveItemVo> selectApiOrderItemAchieve(@Param("itemId") Long itemId); |
| | | |
| | | List<RankingVo> selectShopConsumeAchieveRanking(@Param("record") AchieveNew achieveNew); |
| | | |
| | | List<RankingVo> selectShopSaleAchieveRanking(@Param("record") AchieveNew achieveNew); |
| | | |
| | | List<RankingVo> selectBeauticianConsumeAchieveRanking(@Param("record") AchieveNew achieveNew); |
| | | |
| | | List<AchieveNew> selectOrderItemAchieveByOrderId(Long orderId); |
| | | |
| | | List<RankingVo> selectStaffSaleAchieveRanking(@Param("record") AchieveNew achieveNew); |
| | | } |
| | |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.bean.Article; |
| | | import com.matrix.system.hive.bean.ArticleType; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import java.util.List; |
| | | |
| | |
| | | public int selectTotalRecord(@Param("record") Article article); |
| | | |
| | | public Article selectById(Long id); |
| | | |
| | | |
| | | public List<Article> selectApiArticleListInPage(@Param("record") Article article, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.vo.ShoppingGoodsDetailVo; |
| | | import com.matrix.system.hive.bean.MoneyCardAssemble; |
| | | import com.matrix.system.hive.bean.ShoppingGoodsCategory; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | |
| | |
| | | public void batchInsert(@Param("list") List<MoneyCardAssemble> newAssemble); |
| | | |
| | | public List<MoneyCardAssemble> selectByCardId(Long cardId); |
| | | |
| | | List<ShoppingGoodsDetailVo> selectCardRelationGoods(@Param("cardId") Long cardId); |
| | | |
| | | List<ShoppingGoodsCategory> selectCardRelationCategory(@Param("cardId") Long cardId); |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.vo.ShoppingGoodsDetailVo; |
| | | import com.matrix.system.hive.bean.ShoppingGoodsAssemble; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | public int deleteByGoodsId(@Param("shoppingGoodsId") Long shoppingGoodsId); |
| | | |
| | | public void batchInsert(@Param("list") List<ShoppingGoodsAssemble> list); |
| | | |
| | | List<ShoppingGoodsDetailVo> selectGoodsRelationGoodsList(@Param("goodsId") Long id, @Param("goodsType") String goodsType); |
| | | } |
| | |
| | | |
| | | public int batchInsert(@Param("list")List<ShoppingGoodsCategory> shoppingGoodsCategoryList); |
| | | |
| | | List<ShoppingGoodsCategory> selectChildNodesByName(@Param("record") ShoppingGoodsCategory shoppingGoodsCategory); |
| | | |
| | | } |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.dto.ShoppingGoodsListDto; |
| | | import com.matrix.system.app.vo.ShoppingGoodsListVo; |
| | | import com.matrix.system.hive.bean.ShoppingGoods; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | public ShoppingGoods selectVipCzGoods(); |
| | | |
| | | List<ShoppingGoodsListVo> selectShoppingGoodsApiInPage(@Param("record") ShoppingGoodsListDto shoppingGoodsListDto, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | int selectShopppingGoodsAipTotal(@Param("record") ShoppingGoodsListDto shoppingGoodsListDto); |
| | | } |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.vo.BusinessesDataShowVo; |
| | | import com.matrix.system.hive.bean.SysBusinessData; |
| | | import com.matrix.system.hive.statistics.BusinessDataShowVo; |
| | | import com.matrix.system.hive.statistics.DailySaleVo; |
| | | import com.matrix.system.hiveErp.analysUtil.StatisticsTimeDaoParam; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | public SysBusinessData selectById(Integer id); |
| | | |
| | | public SysBusinessData selectForUpdate(Integer id); |
| | | |
| | | |
| | | List<BusinessesDataShowVo> selectApiBusinessDataInPage(@Param("record") SysBusinessData data,@Param("pageVo") PaginationVO pageVo); |
| | | |
| | | int selectApiBusinessDataTotal(@Param("record") SysBusinessData data); |
| | | |
| | | List<BusinessesDataShowVo> selectApiBusinessData(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | List<DailySaleVo> selectDailySaleData(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId); |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.bean.SysFollowupComment; |
| | | |
| | | /** |
| | | * @description 跟进评论 |
| | | * @author |
| | | * @date 2021-01-10 15:15 |
| | | */ |
| | | public interface SysFollowupCommentDao{ |
| | | |
| | | public int insert(@Param("item") SysFollowupComment sysFollowupComment); |
| | | |
| | | public int batchInsert(@Param("list") List<SysFollowupComment> sysFollowupCommentList); |
| | | |
| | | public int updateByMap(Map<String, Object> modifyMap); |
| | | |
| | | public int updateByModel(@Param("record")SysFollowupComment sysFollowupComment); |
| | | |
| | | public int deleteByIds(@Param("list") List<String> list); |
| | | |
| | | public int deleteById(Integer id); |
| | | |
| | | public int deleteByModel(@Param("record") SysFollowupComment sysFollowupComment); |
| | | |
| | | public List<SysFollowupComment> selectInPage(@Param("record") SysFollowupComment sysFollowupComment, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | public List<SysFollowupComment> selectByfollId(Long follId); |
| | | |
| | | public List<SysFollowupComment> selectByModel(@Param("record") SysFollowupComment sysFollowupComment); |
| | | |
| | | public int selectTotalRecord(@Param("record") SysFollowupComment sysFollowupComment); |
| | | |
| | | public SysFollowupComment selectById(Long id); |
| | | |
| | | public SysFollowupComment selectForUpdate(Long id); |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.matrix.system.app.dto.FollowupListDto; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.bean.SysFollowup; |
| | | |
| | | /** |
| | | * @description 跟进 |
| | | * @author |
| | | * @date 2021-01-10 15:15 |
| | | */ |
| | | public interface SysFollowupDao{ |
| | | |
| | | public int insert(@Param("item") SysFollowup sysFollowup); |
| | | |
| | | public int batchInsert(@Param("list") List<SysFollowup> sysFollowupList); |
| | | |
| | | public int updateByMap(Map<String, Object> modifyMap); |
| | | |
| | | public int updateByModel(@Param("record")SysFollowup sysFollowup); |
| | | |
| | | public int deleteByIds(@Param("list") List<String> list); |
| | | |
| | | public int deleteById(Long id); |
| | | |
| | | public int deleteByModel(@Param("record") SysFollowup sysFollowup); |
| | | |
| | | public List<SysFollowup> selectInPage(@Param("record") SysFollowup sysFollowup, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | public List<SysFollowup> selectByModel(@Param("record") SysFollowup sysFollowup); |
| | | |
| | | public int selectTotalRecord(@Param("record") SysFollowup sysFollowup); |
| | | |
| | | public SysFollowup selectById(Long id); |
| | | |
| | | public SysFollowup selectForUpdate(Long id); |
| | | |
| | | void updateZan(@Param("id")Long id, @Param("zans")String zans); |
| | | |
| | | List<SysFollowup> selectByAppDto(FollowupListDto followupListDto); |
| | | } |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.dto.OrderListDto; |
| | | import com.matrix.system.app.vo.OrderDetailVo; |
| | | import com.matrix.system.app.vo.RankingVo; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.shopXcx.api.dto.ErpOrderListDto; |
| | | import com.matrix.system.shopXcx.api.vo.ErpOrderDetailVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | |
| | | |
| | | public int selectInPageCount(@Param("record") SysOrder sysOrder); |
| | | |
| | | public void updateOrderTime(@Param("orderTime") Date orderTime, @Param("id") Long id); |
| | | public void updateOrderTime(@Param("payTime") Date orderTime, @Param("id") Long id); |
| | | |
| | | SysOrder selectVipOrderInfoTotal(@Param("vipId") Long vipId); |
| | | |
| | | List<OrderDetailVo> selectApiOrderListInPage(@Param("record") OrderListDto orderListDto, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | int selectApiOrderListTotal(@Param("record") OrderListDto orderListDto); |
| | | |
| | | OrderDetailVo selectApiOrderDetailById(@Param("orderId") Long orderId); |
| | | |
| | | List<RankingVo> selectShopAchieveRanking(@Param("record") SysOrder sysOrder); |
| | | |
| | | List<RankingVo> selectStaffSaleAchieveRanking(@Param("record") SysOrder sysOrder); |
| | | |
| | | List<ErpOrderDetailVo> selectErpOrderList(ErpOrderListDto erpOrderListDto); |
| | | |
| | | ErpOrderDetailVo findUserOrderById(Long orderId); |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.matrix.system.hive.bean.SysOrderFlow; |
| | | import com.matrix.system.hive.dto.OrderFlowListDto; |
| | | import com.matrix.system.hive.vo.OrderFlowVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | public interface SysOrderFlowDao { |
| | | |
| | | public int insert(SysOrderFlow sysOrderFlow); |
| | | |
| | | public List<SysOrderFlow> selectByOrderId(@Param("orderId") Long orderId); |
| | | |
| | | public List<SysOrderFlow> selectPayMethodsAmountByOrderId(@Param("orderId") Long orderId); |
| | | |
| | | List<OrderFlowVo> selectInPage(@Param("record") OrderFlowListDto orderFlowListDto); |
| | | |
| | | Integer selectTotal(@Param("record")OrderFlowListDto orderFlowListDto); |
| | | |
| | | Integer updateTimeByOrderId(@Param("orderId") Long orderId, @Param("payTime") Date payTime); |
| | | |
| | | Integer deleteByOrderId(@Param("orderId") Long orderId); |
| | | } |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.vo.OrderDetailItemVo; |
| | | import com.matrix.system.hive.bean.SysOrderItem; |
| | | import com.matrix.system.shopXcx.api.vo.ErpOrderDetailItemVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | |
| | | |
| | | |
| | | public int deleteByOrderId(Long id); |
| | | |
| | | List<OrderDetailItemVo> selectApiOrderDetailItemsByOrderId(@Param("orderId") Long orderId); |
| | | |
| | | List<ErpOrderDetailItemVo> selectErpOrderItemByOrderId(String orderId); |
| | | } |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | |
| | | import com.matrix.system.app.dto.ServiceOrderListDto; |
| | | import com.matrix.system.app.vo.ServiceOrderListVo; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.shopXcx.api.dto.ErpServiceOrderListDto; |
| | | import com.matrix.system.shopXcx.api.vo.ErpServiceOrderListVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | |
| | | public SysProjServices selectById(Long id); |
| | | |
| | | public void updateOrderTime(@Param("createTime") Date createTime, @Param("id") Long id); |
| | | |
| | | public void updateOrderTime(@Param("consumeTime") Date createTime, @Param("id") Long id); |
| | | |
| | | List<ServiceOrderListVo> selectApiServiceOrderListInPage(@Param("record") ServiceOrderListDto serviceOrderListDto, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | int selectApiServiceOrderListTotal(@Param("record") ServiceOrderListDto serviceOrderListDto); |
| | | |
| | | /** |
| | | * 小程序端查询客户预约单 |
| | | * @param orderListDto |
| | | * @return |
| | | */ |
| | | List<ErpServiceOrderListVo> findWxServiceOrderList(ErpServiceOrderListDto orderListDto); |
| | | |
| | | /** |
| | | * 小程序端查询客户预约单详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | ErpServiceOrderListVo findWxServiceOrderById(Long id); |
| | | |
| | | /** |
| | | * 查询预约时间在1小时之内且没有通知过的服务单 |
| | | * @return |
| | | */ |
| | | List<SysProjServices> selectNeedNoticeService(); |
| | | |
| | | /** |
| | | * 设置服务单为已通知 |
| | | * @param noticedIds |
| | | * @return |
| | | */ |
| | | int updateNoticeTimes(@Param("list")List<Long> noticedIds); |
| | | } |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.matrix.system.hive.bean.SysProjUse; |
| | | import com.matrix.system.hive.bean.SysProjUseFlow; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | |
| | | public interface SysProjUseDao{ |
| | | |
| | | public int insert(SysProjUse sysProjUse); |
| | | |
| | | |
| | | public int insertFlow(SysProjUseFlow sysProjUseFlow); |
| | | |
| | | public int update(SysProjUse sysProjUse); |
| | | /** |
| | | * 批量修改余次信息 |
| | |
| | | |
| | | public List<SysProjUse> selectByModel(@Param("record") SysProjUse sysProjUse); |
| | | |
| | | public List<SysProjUse> selectFlowByProjUseId(Long projUseId); |
| | | |
| | | public int selectTotalRecord(@Param("record") SysProjUse sysProjUse); |
| | | |
| | |
| | | public int updateTcStatus(@Param("id") Long id, @Param("status") String status); |
| | | |
| | | List<SysProjUse> selectHasValidProjUse(); |
| | | |
| | | List<SysProjUseFlow> selectProjUseFlow(@Param("record") SysProjUseFlow projUseFlow, @Param("pageVo")PaginationVO pageVo); |
| | | |
| | | Integer selectProjUseFlowTotal(@Param("record") SysProjUseFlow projUseFlow); |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.bean.SysVipAlbum; |
| | | |
| | | /** |
| | | * @description 客户相册 |
| | | * @author |
| | | * @date 2021-01-10 15:15 |
| | | */ |
| | | public interface SysVipAlbumDao{ |
| | | |
| | | public int insert(@Param("item") SysVipAlbum sysVipAlbum); |
| | | |
| | | public int batchInsert(@Param("list") List<SysVipAlbum> sysVipAlbumList); |
| | | |
| | | public int updateByMap(Map<String, Object> modifyMap); |
| | | |
| | | public int updateByModel(@Param("record")SysVipAlbum sysVipAlbum); |
| | | |
| | | public int deleteByIds(@Param("list") List<String> list); |
| | | |
| | | public int deleteById(Integer id); |
| | | |
| | | public int deleteByModel(@Param("record") SysVipAlbum sysVipAlbum); |
| | | |
| | | public List<SysVipAlbum> selectInPage(@Param("record") SysVipAlbum sysVipAlbum, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | public List<SysVipAlbum> selectBySourceId(Long sourceId); |
| | | |
| | | public List<SysVipAlbum> selectByModel(@Param("record") SysVipAlbum sysVipAlbum); |
| | | |
| | | public int selectTotalRecord(@Param("record") SysVipAlbum sysVipAlbum); |
| | | |
| | | public SysVipAlbum selectById(Long id); |
| | | |
| | | public SysVipAlbum selectForUpdate(Long id); |
| | | |
| | | } |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.dto.VipInfoListDto; |
| | | import com.matrix.system.app.vo.VipInfoListVo; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.pojo.VipInfoVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | public SysVipInfo selectById(Long id); |
| | | |
| | | public List<SysVipInfo> selectByVipNoOrTel(@Param("key") String key, @Param("shopId") Long shopId); |
| | | public List<SysVipInfo> selectByVipNoOrTel(@Param("key") String key); |
| | | |
| | | /** |
| | | * 查询是否唯一 @Title: selectTotalByField |
| | |
| | | * @param keyWord |
| | | * @return |
| | | */ |
| | | public List<SysVipInfo> selectUserByKey(@Param("keyWord") String keyWord, @Param("shopId") Long shopId); |
| | | public List<SysVipInfo> selectUserByKey(@Param("keyWord") String keyWord,@Param("companyId") Long companyId); |
| | | |
| | | /** |
| | | * 会员活跃状态自动修改 |
| | |
| | | public int batchInsert(@Param("list") List<SysVipInfo> list); |
| | | |
| | | public List<SysVipInfo> selectVipInfoByVipNo(@Param("companyId") Long companyId, @Param("vipNo") String vipNo); |
| | | |
| | | List<VipInfoListVo> selectVipAddressBookByList(@Param("record") VipInfoListDto vipInfoListDto); |
| | | |
| | | com.matrix.system.app.vo.VipInfoVo selectVipInfoById(@Param("id") Long id); |
| | | } |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.bean.SysVipLabel; |
| | | import com.matrix.system.hive.bean.SysVipLabelRelate; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | int insert(SysVipLabel sysVipLabel); |
| | | |
| | | int insertRelate(SysVipLabelRelate sysVipLabelRelate); |
| | | |
| | | int update(SysVipLabel sysVipLabel); |
| | | |
| | | List<SysVipLabel> selectInPage(@Param("record") SysVipLabel sysVipLabel, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | int selectTotal(@Param("record") SysVipLabel sysVipLabel); |
| | | |
| | | int deleteById(@Param("id") Long id); |
| | | |
| | | int deleteByIds(@Param("list") List<Long> list); |
| | | |
| | | List<SysVipLabel> selectByVipId(@Param("vipId") Long vipId); |
| | | |
| | | List<SysVipLabel> selectByModel(@Param("record") SysVipLabel sysVipLabel); |
| | | |
| | | int deleteRelateByVipId(@Param("vipId") Long vipId); |
| | | |
| | | SysVipLabel selectById(@Param("id") Long id); |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.pojo.PaginationDto; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | 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 jyy |
| | | * @date 2021-01-27 |
| | | **/ |
| | | @ApiModel(value = "OrderFlowListDto", description = "交易流水查询参数") |
| | | public class OrderFlowListDto extends PaginationDto { |
| | | |
| | | |
| | | @ApiModelProperty(value = "客户姓名/拼音/手机") |
| | | private String queryKey; |
| | | |
| | | @ApiModelProperty(value ="操作人") |
| | | private String oprationMan; |
| | | |
| | | @ApiModelProperty(value ="订单号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value ="交易类型") |
| | | private String flowType; |
| | | |
| | | |
| | | @ApiModelProperty(value ="支付方式") |
| | | private String payMethod; |
| | | |
| | | |
| | | @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(hidden = true) |
| | | private Long shopId; |
| | | |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | |
| | | public String getQueryKey() { |
| | | return queryKey; |
| | | } |
| | | |
| | | public void setQueryKey(String queryKey) { |
| | | this.queryKey = queryKey; |
| | | } |
| | | |
| | | public String getOprationMan() { |
| | | return oprationMan; |
| | | } |
| | | |
| | | public void setOprationMan(String oprationMan) { |
| | | this.oprationMan = oprationMan; |
| | | } |
| | | |
| | | public String getOrderNo() { |
| | | return orderNo; |
| | | } |
| | | |
| | | public void setOrderNo(String orderNo) { |
| | | this.orderNo = orderNo; |
| | | } |
| | | |
| | | public String getFlowType() { |
| | | return flowType; |
| | | } |
| | | |
| | | public void setFlowType(String flowType) { |
| | | this.flowType = flowType; |
| | | } |
| | | |
| | | public String getPayMethod() { |
| | | return payMethod; |
| | | } |
| | | |
| | | public void setPayMethod(String payMethod) { |
| | | this.payMethod = payMethod; |
| | | } |
| | | |
| | | 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 getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.hive.plugin.util; |
| | | |
| | | import com.matrix.core.tools.DateUtil; |
| | | import sun.misc.BASE64Decoder; |
| | | import sun.misc.BASE64Encoder; |
| | | |
| | | import java.awt.Image; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.File; |
| | | import java.io.FileOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.*; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public static String base64ToFile(String base64Str, String savePath, String fileName) { |
| | | |
| | | |
| | | |
| | | |
| | | File dir = new File(savePath); |
| | | if (!dir.isDirectory()) { |
| | | dir.mkdir(); |
| | | } |
| | | |
| | | BufferedOutputStream bos = null; |
| | | FileOutputStream fos = null; |
| | | File file = null; |
| | | String filePathAndName = dir + File.separator + fileName; |
| | | BASE64Decoder decoder = new BASE64Decoder(); |
| | | byte[] bfile = new byte[0]; |
| | | try { |
| | | bfile = decoder.decodeBuffer(base64Str); |
| | | file = new File(filePathAndName); |
| | | fos = new FileOutputStream(file); |
| | | bos = new BufferedOutputStream(fos); |
| | | bos.write(bfile); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | return filePathAndName; |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | GenerateImage("iVBORw0KGgoAAAANSUhEUgAABAEAAAQBCAIAAADU4QRPAAAACXBIWXMAAAsSAAALEgHS3X78AAAgAElEQVR4nOzdQWyc530/+CekmWGG4gwZdIRdeJC/DDbdlkM0pYJKFHqQKKDWtqHcQ7alsHAu8sE9WD2kB+8l3aCXNVB4u1inrYvCav+osbXgeg82162LQpLRdmWqrZRNSRVIpJXaMkCqSSOJEseaakUtHo4gO9RIoqghOe/7fD7QLQggPS8tvd+Z7+/3fObfr905MR8AAIBEPHV5MRz7yNMGAIBU9HjSAACQFBkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQBStL0U9tc8eYBEPeXBAyRloBCmdobpifhnnhwNR0+Gi3U/AQBpkQEAErK/Ft/+K6W7f+JaNbz6fDhxLiaBpaYfBIBUyAAASRirhuk98aX/fpOjYfdIeO9sOHbKzwJAEmQAgJzbXopv/5OjD/tTFgvx+4H9o+G1D8Lcgp8IgJyTAQDybHpPODgeX/HXolIKv/2rYX4hJoHLi34uAHJLBgDIp90j4fC+T6r/a1erhtdfCDMr1SBDAgC5JAMA5M0zlfj237b6v3ZT47Ea9NZHYeaMHxCAvJEBAPJjoBDf/h9e/V+7YiEc3huTwNGThgQAckUGAMiJqZ3h0MRaq/9rt6MShwROX4hJwJAAQD7IAACZN1YNRw6sp/q/drtG4q9jK9UgQwIAWScDAGTY9lJ8+3/C6v/aTU/ELUNHPwzH5/3UAGSYDACQSQOFWP6Zntjs33uxEF56No4cHDtlSAAgq2QAgOzZX4vTuh2v/q9drRqHBE6ci0nAkABA5sgAAFkyVo2bf3ZUuuK3PDkabyF476whAYCMkQEAsmF7Kb797xrprt9ssRD7SK39obMXuuA3BMAayAAA3a5V/T84vpXln4erlMLLz4X5hZgELtYzcKQAiZMBALra/lr8oH1D9352Sq0aXn0+DgkcPakaBNDVZACALjVWDdN7Nm/vZ6e0hgTeWrlJAIDuJAMAdJ2BQqz+T45m9ckUC3Ft0cHx8NoH9ocCdCMZAKC7TO/p6ur/2lVKcX/o/EJMAvaHAnQVGQCgW+weiR//Z6L6v3a1anj9hTBzNt4kYEgAoEvIAABb75lKfPvPXPV/7abGV/aHfhiOz2fltwyQZzIAwFYaKMTyz9R4/h9CsRBeejb+SY+eNCQAsMVkAIAtM7UzHJrIQ/V/7XZU4pDA6QsxCRgSANgqMgDAFhirhiMH8lb9X7tdI/HXsZX9oYYEADafDACwqbaXYvV/14hTj3ef7R+NScCQAMAmkwEANslAIZZ/piec9ycqpTgkMDkatwYZEgDYNDIAwGbYX4vXZiVV/V+7WjUOCZw4F5OAIQGATSADAGyssWos/+yoOOZHmByNNyS8t3KTAAAbSgYA2CjbS3Hv5+SoA16rYuHukMDRk2H2QjZ+zwBZJAMAdF6r+n9wXPlnPSql8PJzYX4hJoGL9ez9/gG6nwwA0GH7a/HD7GT3fnZKrRpefT7MrFSD7A8F6CwZAKBjnqnE6n+t6kQ7Zmo8VoPeWrlJAIBOkQEAOmCgEN/+Vf83QrEQVyodHA+vfWB/KEBnyAAAT2p6j+r/hquU4v7Q+YWYBOwPBXhCMgDA+o1Vw5EDqv+bp1YNr78QrxaeOWNIAGD9ZACA9dheim//qv9bYnoifvFy9MNwfD7BPz1AB8gAAI9noBDLP1Pjjm0rFQvhpWfjUzh60pAAwGOTAQAew9TOcGhC9b9b7KjEIYHTF2ISMCQAsHYyAMCajFXj5p8dFafVdXaNxKfz3llDAgBrJQMAPML2Unz73zXinLpXsRCHBPaPxnFhQwIAjyQDADzQQCGWf6YnnFA2VEpxSGByNF4tbEgA4CFkAID29tfi1VSq/5lTq8YhgRPn4pCAahBAWzIAwGpj1bj5x97PTJscDbtH4pDAsVOpHwXA/WQAgE9sL8W3/8lRR5IH94YEjp4MsxdSPw2AT5MBAMK96v/BceWfvKmUwsvPhfmF8NoH9ocC3CUDAMTSyOF98WWRvKpVw+svhJmVapAhAQAZAEjaM5X49q/6n4ip8VgNeuujeJMAQMpkACBRA4X49q/6n5piIa57Ojgeq0H2hwLJkgGAFE3tDIcmVP/TVSnF/aGnL8RxYUMCQIJkACAtY9Vw5IDqP9Gukfjr2Eo1yJAAkBQZAEjF9lJ8+1f9Z5XpifCVn719fK75J39XdDZAImQAIP8GCnHr/9S4R81qy8vLN27cWFpa+vLTyzunb8zMlf9qXkUMyD8ZAMi5/bU4A6r6z/1u3rx59erV27dvt/6Xz9y5dbD2w71fLP7XU6Xv/nuvAwNyTAYAcmusGjf/7Kh4wqx269ata9euNZtthgBKn238xr6b/3Jt4I//dtsPb/Q4OiCXZAAgh7aX4tv/rhHPltWWl5evXbvWaDQecjJ37ix/oXT9m1ON//v/Lf0fpw0JADkkAwC5MlCIez+nJzxV2rhx48b169eXl5fXcjh3lm/v2XHl53c0/uzvy6cv9jlPIE9kACA/9tfi27+9n9yv2WxeuXLlXvV/7Z4Kza/9/OVf+VLxd/+6rBoE5IYMAOTBWDVu/rH3k/vdvn376tWrN2/efJKzKX228c2vxCGB3/lLERPIAxkAyLbtpfj2PznqMbJaa+/n9evXO3IyrSGBbx1qvPtPw/aHAlknAwAZNr0nHBy395M2Go3G4uLiOso/D3dn+fbB2g9/qVb4gw+H7Q8FsksGADJp90jc/KP6z/0esvezU54KzSN7f1BvbPv9k4OGBIAskgGAjHmmEt/+Vf+531r2fnZQpXjjm19p/HN98PeOb/M0gGyRAYDMGCjE8s/UuCdGG4+197NT7txZ/umfuPa/Tzdm5sqGBIAMkQGAbJjaGQ5NqP7Txrr3fnbKZ+7cOlj74S/+TP8f/c2QIQEgE2QAoNuNVcORA6r/tNGRvZ+d0t9z88jeH/zr4uAf/+02QwJAl5MBgO61vRTf/lX/uV9n93520BdK17/5laV/WCj/yd8VPTega8kAQDcaKMTyz/SEh0MbG7T3s1Pu3Fn+8tNXvvRrjb+YHzQkAHQnGQDoOvtr4fBe1X/a2IS9n53yVGgerDX3frH4X0+VDAkA3UYGALrIWDXu/dxR8UxYbZP3fnZK6bON39h381+uDfzOX5poAbqIDAB0he2l+Pa/a8TToI0t2fvZKXfuLH+hdP1bhxonvzf05//Y7/kC3UAGALZYq/p/cFz5hza2fO9np9xZvr135D9+YaTwZ39fPn2xz7MGtpYMAGyl/bU4+GvvJ/frqr2fnfJUaH7t5y//ypeKv/vXZftDgS0kAwBbY6waL/2195P7de3ez04pfbbxza/c/Of64O8d35aPPxGQOTIAsNkGCrH6Pznq4Gmjy/d+dsqdO8s//RPXvnXoxrv/NGx/KLD5ZABgU03vUf2nvQzt/eyUO8u3D9Z++Eu1wh98OGx/KLCZZABgk+weiR//q/5zv4zu/eyUp0LzyN4f1Bvbfv/koCEBYHPIAMCG214KRw6o/tNepvd+dlCleOObX2n8w0L5T/6umJs/FNC1ZABgAw0UYvlnatwZ00Zu9n52yp07y19++srO6Rszc2VDAsCGkgGAjTK1MxyaUP2njVzu/eyUz9y5dbD2w1/8mf4/+pshQwLABpEBgM4bq8byj+o/98v93s9O6e+5eWTvD/51cfCP/3abIQGg42QAoJO2l+Lg764Rh0objUbj2rVrqv9r94XS9W9ONf7h30qGBIDOkgGAzhgoxPLP9ITjpI1ms3n9+vWk9n52yp3l219++sqXfq3xF/ODhgSATpEBgA7YXwuH96r+00biez875anQPFhr7v1i8Xf/uqwaBDw5GQB4ImPVWP7ZUXGKtLG4uLi0tKT80ymlzza++ZWb/3Jt4Hf+0rQN8ERkAGCdtpfi3s/JUedHG/Z+bpA7d5a/ULr+rUONk98b+vN/7M/lnxHYBDIA8Nha1f+D48o/tHH79u0rV66o/m+oO8u39478xy+MFP7s78unL/bl+E8KbBAZAHg8u0di+cfeT+5n7+cmeyo0v/bzl//72rbfPzloSAB4LDIAsFbPVOLbf63qwGjD3s+tUine+OZXGv9cH/y949vSPAFgHWQA4NEGCvHtX/Wftuz93HJ37iz/9E9c+9ahG+/+07D9ocBayADAI0zvUf2nPXs/u8qd5dsHaz/8pVrhDz4c/u6/96Z+HMBDyQDAA41Vw5EDqv+0Z+9nd3oqNI/s/cG/Lg7+8d9uMyQAPIgMALSxvRTf/lX/acvez+73hdL1b35l6R8Wyn/yd8XUzwJoRwYAfsxAIZZ/psadCm3Y+5khd+4sf/npKzunb8zMlQ0JAKvIAMAnpnaGQxOq/7Rh72dGfebOrYO1H/7iz/T/0d8MGRIA7pEBgNCq/h/eF3ZUHAZt2PuZdf09N39j3+V/uTZgSABokQEgddtL8e1/10jq50Bb9n7mxp07y3FIYKrxD/9WMiQAyACQroFCLP9MT/gRoA17P3PpzvLtLz995Uu/1vizvy+fvtiX+nFAwmQASNT+Wji8V/Wf9uz9zLenQvNrP3/5V75U/N2/LqsGQZpkAEjOWDVu/rH3k7bs/UxH6bONb37l5r9cG/idv3QJCCRHBoCEbC/Ft//JUc+cNuz9TFBrSOBbhxonvzf05//Yn/pxQEpkAEjF9J5wcFz5hzbs/UzcneXbe0f+4xdGCn/w4bD9oZAIGQDyb/dI3PxT8W0/7dj7SctToXlk7w9+sDT4v/11acm3QZB3MgDk2TOV+Pav+k9b9n6ySrFYHP9vt/3hfwlvfRRmzjgdyDMZAPJpoBDf/lX/eZD5hTD0mR86HloKhUK5XO7ri9tCi4W4NOzgeHjtgzC34IAgn2QAyKGpneHQhOo/7dUXw9GTYfZCeO3XnBCht7d3aGiov3/1QHClFH77V8PpC/Gn5fKic4K8kQEgV8aq4cgB1X/aazTDe2djx0PbmxBCT0/PwMDAtm3benoeeEXArpH469hHfmwgb2QAyIntpfj2r/rPg5w4F46d8oEudxWLxVKp1Nu7pi1A0xOxGnT0w3B83vlBTsgAkHkDhbj3c2rck6S9+YX49q/YTUtfX1+5XC4UHq8sWCyEl56NI0Z+liAfZADItv21OL2n+k9bjabPbvlET09PuVwuFovrPpNaNQ4J+E4JckAGgKwaq8bNPzsqHiDt6XDzaYODgw+v/q/d5Gi8dcRsCWSaDADZs70U3/53jXh0tGeXC5/W398/NDS0xur/GhULcUhg/+jdHVNA5sgAkCUDhbj3c3rCQ6O9S/X4TqauTUtvb+/w8PDjVv/XrlIKLz8XB06OngwX6w4dskQGgMzYX4tv//Z+0laj6W5XPtHT09Mq/2zCmdSq4dXn45DA0ZOqQZAZMgBkwFg1bv6x95MHmTkbZzS9ftGybdu2wcHBjlT/1+7ekMCxUx4DZIAMAF1toBCr/5OjnhLtzS+E1z5Q/eeuQqEwPDzc2er/2t0bEnjtA4U06HYyAHSv6T3xXh57P2mrvmgck0/09vYODQ319/dv+ZlUSnF/qHQKXU4GgG60eyR+/K/6T1uNpsYFn+jp6RkYGCiVuuvvi1o1vP6Clhp0LxkAusszlfj2r/rPg5i85NOKxWK5XN7k6v/aTY3HapBpdehCMgB0i4FCLP9MjXsgtGcDI59WKBTK5XJfX1+Xn0qxEO8yb90kYEgAuocMAF1hamc4NKH6T3v1xXjp7/F5x0NoVf9LpVKxWMzQaeyoxCEBt9dB95ABYIuNVcORA6r/tNeq/s+cUf4h3Kv+b9u2rWvLPw+3ayT+OvaRH2nYejIAbJntpfj2r/rPg5w4F+cpfWhKS39//9DQ0Fbt/eyg1v5QX23B1pIBYAsMFGL5Z3rC2dPepbryNJ/o6+srl8uFQn7KgpVSeOnZePPJsVN+zmFryACw2fbX4oSc6j9tNZrh6Ic+H+Wunp6ecrmcrer/2tWqcUjA912wJWQA2Dxj1bj3c0fFkdOenjSfNjg4mN3q/9pNjsYbUVx5AZtMBoDNsL0U3/53jThs2rMvhU8rFArDw8M5qP6vUbFwd0jA1dewaWQA2Fit6v/BceUf2qsvhtc+UInmrt7e3uHh4TxV/9euUgovP+ceDNgkMgBsoP21+OGWvZ+01Wi6P5VP9PT0tMo/iZ9JrRpefd592LDhZADYEM9UYvnH3k8eZGal/ewVh5Zt27YNDg7mvvq/dq0hASEZNo4MAB02UIhv/5OjzpX2VB34tEKhUC6X+/r6nMoqxUJcoXZwXFkONoQMAJ00vUf1nweqLxp55BO9vb1DQ0P9/f3O5CEqpbg/dH4hJgFD89BBMgB0xu6R+PG/6j9tNZpWH/KJnp6egYGBUsnfF2tVq4bXX9Cgg06SAeBJbS+FIwdU/3kg0418WrFYLJfLqv/rMDW+sj/UJXrQCTIArN9AIZZ/psYdIe3NL8SPLVWZaSkUCoODg2nu/eyUYiG89Gz8W/foSf9lwRORAWCdpnaGQxOq/7RXX4yX/vq0kpbe3t5SqVQsFp1HR+yoxCEBN+vBk5AB4LGNVWP5R/WftlrV/5kzyj/c1dr6r/zTcbtG4t/G/nOD9ZEB4DFsL8XB310jzoz2fDDJp/X39w8NDfX29jqVDVIsxHsY94/62g0emwwAazJQiOWf6QmnRXuX6grKfKKvr69cLqv+b45KKQ4JTI4av4HHIAPAo+2vxatqVP9pq9G0qIRP9PT0lMtl1f/NV6vGIQFruGCNZAB4mLFq3Pxj7ycPYmE5n7Zt27bBwUHV/y00ORpva3EdBzySDADtbS/Ft//JUcdDey4u5dMKhcLw8LDqfze4NyTgWm54CBkAVmtV/w+OK//QXn0xvv2rHdPS29s7PDys+t9tKqXw8nMxqx89GS7WUz8NuJ8MAD9m90jc/GPvJ201muGtj+IiQmhV/1t7Px1G16pVw6vP6+xBGzIA3PVMJb79q/7zIGYN+bRisVgul1X/M2FqPFaDBHj4NBkAYvnn8D7Vfx5InYBPKxQK5XK5r6/PqWRIsRDXux0cV+SDu2QAUje9R/WfB6ovGivkE729vUNDQ/39/c4koyqluD/UQD/JCzIASRurhiMHVP9pr9G0XpBP9PT0DAwMlEr+vsiDWjW8/kK8WnjmjHYf6ZIBSNH2Unz7V/3nQU6ci2//PiakpVgslkolez9zZnoifgnsgj+SJQOQloFCLP9MjXvstDe/EN/+1YVpKRQKg4OD9n7mVbEQXno2/otw9KT/6kmODEBCpnaGQxOq/7RXX4zdAJ8I0tLT01Mul4vFovPIvR2VOCTg2z9SIwOQhLFq3Pyzo+Jp055mMJ/W2vpv72dSJkfj/TDvnfVXAamQAci57aX49r9rxHOmvdMXYg0gzQ//ztcLP1nxsvNj+vv7h4aGVP/TVCzEIYH9o74SJAkyALk1UIjln+kJT5j2LtWVgPlEb2/v8PCw6j+VUhwSmBx1Kwg5JwOQT/tr8e3f3k/aajTdGMpqTz31lADAPbVqePV5t4OTZzIAeTNWjZt/7P3kQWZWtv77Rx14pHtDAq4KIX9kAPJjeym+/U+OeqS053JQHuLyYigO2hvGaveGBFwZTs7IAOTE9J5424t/v2mrvhjf/lX/eYj6Yvhf/jKuEPA5AverlMLLz/kcgVyRAci83SPxn23Vf9pqNH2Pz1otNeMb3ol5fULaq1XD6y/oE5ITMgAZ9kwlvv37p5oHMc/HOswthLm37RXggabGYzXIXgGyTgYgw1593tOjvfkFe/14Isfnw+x5+4Vpr79v+X8Yv/GfzcJfzWugklUyAJAr9UWje3TGUjNWPk7Mu2eQH9NoNBYXF2/fvh2CAECGyQBATrSq/+75p7MuL4ZX3o1Lhw/vCzsqDjdpt27dunbtWrPprxjyQAYA8uDEufiRrX0dbJC5hfD1N+OQwOG99o+laHl5+fr16zdu3Ej9IMgRGQDItvmF+PZv7yeboDUkML0nToWSjkajce3ateXlZc+cPJEBgKxqNMPRD+NrGWyapWYcOJk5E44csJQs/5R/yDEZAMikYx+p/rNlLi+Gb7wdhwSOHLA/NJ+Uf8g9GQDImNMX4gexqv9submF8OIbcX/ooQlDArmi/EMKZAAgM+qL8RpX1X+6ysyZu/tDJ0c9mMxT/iEdMgCQAY2mWznpXkvNmE5nzri5PMOUf0iNDAB0u5mzcfOP6j9d7mI9DgnsHolJwJBAtty4ceP69evKPyRFBgC61/xC/HhV9Z8Mmb0Qf03vCQfHDQlkQLPZvHbt2q1bt1I/CNIjAwDdqL4YB39nL3g4ZNKxU3FIYHqPIYHutby8fO3atUajkfpBkCoZAOgujWZ4b6X8A5l2eWWEvZUEDAl0G+UfkAGALnLiXPz4X/Wf3JhbCHNvh/21cHivalBXUP6BFhkA6ArzC/Ht/2Ld0yCHjs+H2fPxJoHpCY93yyj/wKfJAMAWqy/GS3+Pz3sO5NlS8+6QwOF9YdeIR73ZlH9gFRkA2DKt6v/MGeUfUnF5MbzybhirxiSwo+KxbwblH2hLBgC2xolz8WNRez9J0NxC+PqbsRp0aMKQwAa6ffv24uKi8g+0JQMAm+1SPVb/5xYcPEmbOXN3a9DUeOpHsREWFxeXlpaUf+BBZABg8zSa4eiHqv9w11Iz5uGZM+HIAftDO6bZbF65cuX27ds5+fPAxpABgE1y7CPVf2jj8mL4xttxSODIgVApOaH1u3379tWrV2/evJnVPwBsIhkA2HDzC/GyJNV/eIi5hfDiG7EadHDckMB6KP/AY5EBgA1UX7kqVfUf1ujYqfh12eF9YXLUka2V8g+sgwwAbIhGM7y1Uv4BHstSMybnVhIwJPBwyj+wbjIA0HkzZ+PHmar/sG4X63FIYPdITAKGBNpS/oEnIQMAnTS/EPecXKw7VOiA2QuxSje105DAj1H+gScnAwCdUV+Mb/+zFxwndNJSM36r1rpJwJDA7du3r1y50mz6khGelAwAPKlGM7y3Uv4BNsjllfH6E/OxGrSjkuIpLy8v37hx4/r1613we4E8kAGAJ3LiXPz4X/UfNsHcQvj6m2F/LRzem1Y16ObNm1evXlX+gQ6SAYB1ml+In/3b+wmb7Ph8mD0fhwSmJ/J/9Mo/sEFkAOCx1Rfjpb/H550cbI17QwKH94VdI/l8CMo/sKFkAODxHFvZ+q/8A1vu8mJ45d0wVg1HDuRtf6jyD2w0GQBYq9MXYvX/8qIDgy4ytxBefCNWgw5N5GFIQPkHNocMADzapXp8+1f9h641c+bu/tCp8aw+JOUf2EwyAPAwjWY4+qHqP2TAUjNm9ZkzsRpUq2bsiTUajWvXrrn0FzaNDAA80MzK1n/Vf8iQy4vhG2+H3SNxXDgTQwK3bt26du2a8g9sMhkAaGN+IV5IpPoPGTV7If6a3hMOjnfvkMDy8vL169dv3LjRBb8XSI4MAPyY+sp1pKr/kAPHTsVq0OF9YXK06/4wyj+wtWQA4K5GM7y1svcTyI2lZkz1rSTQJUMCyj/QDWQAIDpxLk4Tqv5DLl2sxyGB/bV4tfAWDgko/0D3kBxt+2gAACAASURBVAEgdfML8e3/Yj31c4DcOz4fZs/HmwS2ZEhA+Qe6igwA6aovxrf/2Qt+BCAVS804JHBiPlaDdo1s0h9a+Qe6kAwAKWo0w3srez+BBF1eDK+8G8aqMQnsqGzgn395efnatWuNRsNPGXQbGQCSc+JcfPu39xMSN7cQvv5mHBI4vHdDqkGtS3+Vf6A7yQCQkPmF+PZv7ydwz70hgemJjh1Ks9m8du3arVu3HDN0LRkAktBohqMfxn/sAVa5NyRw5MCT7g9V/oGskAEg/46tbP239xN4iMuLcX/oWDUmgfXtD1X+gQyRASDPTl+Im39U/4E1mlsIL74Rq0GHJh5jSED5BzJHBoB8ulSPb/+q/8A6zJyJ1aDpPWFq/BH/Z+UfyCgZAPKm0QxvrZR/ANZtqRk/R2jdJPCgIQHlH8guGQByZWZl67/qP9ARF+txSGD3SEwCnx4SUP6BrJMBICfqK/N8qv9Ax81eiL8O74vVoNu3b1+9evXmzZuOGTKtx+ODfLi8KAAAG+j0+bC4uHj58mUBAHLA9wAAwCN8cXvzf/zylevXbzsoyAcZAAB4oM8P3P7qz1392ad99g+5IgMAAO39cm1x308tfa7P5h/IGxkAAFjti9ubz++68vmi8g/kkwwAAHxC+QdSIAMAAHcp/0AiZAAAIPzs0ze/On5V+QcSIQMAQNI+P3D7a7uu/GTFBeOQEBkAABL1ub7lyZ+68Uu1634AIDUyAACkSPkHUiYDAEBalH8AGQAAUqH8A7TIAACQBOUf4B4ZAAByTvkHWEUGAIDcUv4B2pIBACCfdu9ofHX8mkt/gfvJAACQN9WhW18dv6b8AzyIDAAA+fG5vuVfHru+74s3PFPgIWQAAMgJ5R9gjWQAAMg85R/gscgAAJBhyj/AOsgAAJBVyj/A+sgAAJA9yj/Ak5ABACBLPte3/NXxa7t3NDw1YN1kAADIjNalv8o/wBOSAQAgA764vfnVn7v29NAtDwt4cjIAAHQ15R+g42QAAOheyj/ARpABAKAbKf8AG0cGAIDuovwDbDQZAAC6iPIPsAlkAADoCso/wKaRAQBgi31+4PZXf+7qzz5904MANocMAABb6Zdri/t+akn5B9hMMgAAbI0vbm8+v+vK54u3nT+wyWQAANhsyj/A1pIBAGBTKf8AW04GAIBNovwDdAkZAAA2nPIP0FVkAADYWMo/QLeRAQBgo/zs0ze/On5V+QfoNjIAAHTe5wduf23XlZ+sNJ0t0IVkAADopM/1LU/+1I1fql13qkDXkgEAoGOUf4BMkAEAoAOUf4AMkQEA4Iko/wCZIwMAwPop/wBZJAMAwHoo/wDZJQMAwONR/gGyTgYAgMewe0fjq+PXXPqbuGKx+MOlvtRPgSyTAQBgTapDt746fk35J3GFQmFwcLBQKPzn/5f6UZBpMgAAPMLn+pZ/eez6vi/ecFAp6+npKZfLxWIx9YMgF2QAAHgY5R9CCIODg9u2bevp6XEY5IMMAADtKf8QQujv7x8aGurt7XUY5IkMAACrKf8QQujt7R0eHi4UCg6D/JEBAODHKP/Q09PTKv8kfxLklgwAAHcp/xBC2LZt2+DgoOo/+SYDAEAs/zy/68ruHQ1HkbJCoVAul/v6LP4n/2QAAAhPD916euiWc0hWb2/v0NBQf39/6gdBMmQAACBdPT09AwMD9n6SGhkAAEhUsVgslUr2fpIgGQAASE5fX1+5XLb3k2TJAABAQnp6esrlcrFY9NBJmQwAAKSitfVf9R9kAAAg/wqFwvDwsOo/tMgAAECe9fb2Dg8Pq/7Dp8kAAEA+tfZ+lkolzxdWkQEAgBwqFovlcln1H9qSAQCAXCkUCuVyua+vz2OFB5EBAICc6O3tLZVK9n7CI8kAAEDmtar/9n7CGskAAEC29ff3Dw0N2fsJaycDAABZ1dfXVy6X7f2ExyUDAADZ09PT07r017ODdZABAICM2bZt2+DgoOo/rJsMAABkRqFQGB4eVv2HJyQDAAAZ0NvbOzQ01N/f72HBk5MBAICu1tr7WSqVPCboFBkAAOhexWKxXC6r/kNnyQAAQDcqFAqDg4P2fsJGkAEAgO7S09NTLpeLxaLnAhtEBgAAukhr67/yD2woGQAA6Ar9/f1DQ0P2fsImkAEAgC3W29s7PDys+g+bRgYAALZMT09Pq/zjEcBmkgEAgK2xbdu2wcFB1X/YfDIAALDZCoVCuVzu6+tz8rAlZAAAYPP09vYODQ319/c7c9hCMgAAsBl6enoGBgbs/YRuIAMAABuuWCyWSiV7P6FLyAAAwAbq6+srl8v2fkJXkQEAgA3R09NTLpeLxaLjhW4jAwAAndfa+q/6D91JBgAAOqlQKAwPD6v+QzeTAQCAzujt7R0eHlb9h+4nAwAAT6q197NUKjlJyAQZAAB4IsVisVwuq/5DhsgAAMA6FQqFcrnc19fnACFbZAAA4LH19vaWSiV7PyGjZAAA4DG0qv/2fkKmyQAAwFr19/cPDQ3Z+wlZJwMAAI/2H0t9/91/Kdv7CfngWzwA4GE+vtXzf367/Of/z3YBAHLD9wAAwAOd/N629+cGP77VM1Z1SJAfMgAA0Mb5euFPTw//aEn1H3JIBgAAfsyPGr3vnB36zvf7HQvklQwAANz18a2ek98deH++5EAg32QAACCavVR852z541v2hUD+yQAAkLrz9cL784Pfu2ztD6RCBgCAdH18q+eds+XZS0U/A5AUGQAAEvUX84MnvrtN+QcSJAMAQHK+8/3+d749ZO8nJEsGAICE/KjR++bpYdV/SJwMAABJ+PhWT6v843EDMgAA5N/J7217f25Q9R9okQEAIM/O1wvvnC0vXO3zlIF7ZAAAyKcfNXrfOTv0ne/3e77AKjIAAOTNx7d6Tn53wN5P4EFkAADIldlLxffnS/Z+Ag8hAwBATnz/at873y7b+wk8kgwAAJn38a2ed86WZy8VPUpgLWQAAMi21tZ/1X9g7WQAAMiq8/XCn54eVv0HHpcMAADZ86NG75unh1X/gfWRAQAgS1p7P9+fL3lqwLrJAACQGbOXiu+cLav+A09IBgCADDhfL7xztrxwtc/DAp6cDAAAXe1Hjd7350r2fgIdJAMAQJdqVf/t/QQ6TgYAgG70ne/3v/PtIXs/gY0gAwBAd/n+1b53vl229xPYODIAAHSLj2/1tC799USADSUDAEBXOPm9be/PDar+A5tABgCALXa+XvjT08Oq/8CmkQEAYMv8qNH7ztmh73y/3yMANpMMAABboLX38/35ksMHNp8MAACbbfZS8Z2zZdV/YKvIAACwec7XC+/PD9r7CWwtGQAANsPHt3reOVuevVR02sCWkwEAYMO1tv4r/wBdQgYAgA30ne/3v/PtIXs/ga4iAwDAhvhRo/fN08Oq/0AXkgEAoMM+vtXTKv84WKA7yQAA0En2fgLdTwYAgM44Xy+8c7a8cLXPeQJdTgYAgCf1o0bvO2eHvvP9ficJZIIMAADr9/GtnpPfHbD3E8gWGQAA1mn2UvH9+ZK9n0DmyAAA8Ni+f7XvnW+X7f0EMkoGAIDH8PGtnnfOlmcvFR0akF0yAACs1cnvbXt/blD1H8g6GQAAHu18vfCnp4dV/4F8kAEA4GF+1Oh98/Sw6j+QJzIAALTX2vv5/nzJ+QA5IwMAQBuzl4rvnC2r/gO5JAMAwI85Xy+8c7a8cLXPsQB5JQMAwF0/avS+P1ey9xPIPRkAAKK/mB888d1tyj9ACmQAAAj/8//139j7CaTDpx0AEAQAICkyAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRAQAAIC0yAAAApEUGAACAtMgAAACQFhkAAADSIgMAAEBaZAAAAEiLDAAAAGmRASAnatXwPz0Xtpc8T6DzpnbGv2GA3HjKo4Tc2DUSfx37KMycCUtNzxXogLFqOHIgVHy+APkiA0DeTE+Eg+Ph6Ifh+LxnC6zf9lJ8+69VHSHkkAwAOVQshJeeDZOj4dipMLfgCQOPZ6AQyz/TE44NcksGgNyqVcNv/2o4cS4mgcuLnjOwJvtr4fDe+FECkGMyAOTc5GjYPRLeOxuTAMBDjFXD4X1hR8UZQf7JAJB/xUL8Tn//aDh6Msxe8MCB1baX4tv/rhEHA6mQASAVlVJ4+bkwvxCTwMW6xw6Ee9X/g+PKP5AWGQDSUquGV5+PQwJHT9ofCqnbX4tfEtr7CQmSASBFrSGBt1ZuEgAS9Ewlln/s/YRkyQCQqGIhrv44OB5e+8D+UEjIQCG+/U+OeuaQNBkAklYpxf2h8wsxCdgfCrk3vUf1HwgyABBaQwKvvxBmVvaHGhKAXNo9Ej/+V/0HWmQA4K6p8ZX9oR+G4/OOBPJjeykcOaD6D/wYGQD4RLEQXno2hoGjJw0JQOYNFGL5Z2rckwRWkwGA1XZU4pDA6QsxCRgSgIya2hkOTaj+A+3JAEB7u0bir2Mr+0MNCUCGjFVj+Uf1H3gIGQB4mOmJOCRw7CNDApAB20tx8HfXiGcFPIIMADxCpRSHBCZH49YgQwLQnQYKsfwzPeHxAGsiAwBrUqvGIYET5+KQgGoQdJX9tXjln+o/sHYyAPAYJkfjlvH3Vm4SALbcWDWWf3ZUPAng8cgAwOMpFu4OCRw9GWYvODzYGttLce/n5KjjB9ZDBgDWo1IKLz8X5hdiErhYd4SweVrV/4Pjyj/A+skAwPrVquHV58PMSjXIkABsgt0jsfxj7yfwhGQA4ElNjcdq0FsrNwkAG+SZSnz7r1WdL9ABMgDQAcVCXEtycDy89oH9odBhA4X49q/6D3SQDAB0TKUU94fOL8QkcHnRuUIHTO9R/Qc6TwYAOqxWDa+/EK8WnjljSADWb6wajhxQ/Qc2hAwAbIjpifjh5dEPw/F5BwyPZ3spvv2r/gMbRwYANkqxEF56Nk4MHz1pSADWZKAQyz9T404L2FgyALCxdlTikMCJc3F/qCEBeIipneHQhOo/sBlkAGAzTI7GvebvnTUkAG2MVePmnx0VZwNsEhkA2CTFQhwS2D8ax4UNCUDL9lJ8+9814jiATSUDAJuqUopDApOjcUjgYt3Zk66BQiz/TE/4EQC2gAwAbIFaNbz6fBwSOHpSNYgU7a/Fa/VU/4GtIgMAW+bekMCxUx4CqRirxs0/9n4CW0sGALbSvSGBoyfD7AWPgjzbXopv/5OjHjKw9WQAYOtVSuHl58L8QnjtA/tDyafpPfHWPOUfoEvIAEC3qFXD6y+EmZVqkCEBcmP3SNz8Uyl5okAXkQGA7jI1HqtBb30UbxKATHumEt/+Vf+BLiQDAF2nWIgrUw6Ox2rQ3ILnQ/YMFOLbv+o/0LVkAKBLVUrht381nL4Qx4UNCZAhUzvDoQnVf6CryQBAV9s1En8dW6kGGRKgy41Vw5EDqv9ABsgAQAZMT8Rq0NEPw/F5j4tutL0U3/5V/4GskAGAbCgWwkvPxoL1sVOGBDpj4WrfT1Z8t/KkBgpx7+fUeLb/FEBqZAAgS2rVOCRw4lxMAoYEntDH//mZTP/+u8H+WpxfV/0HMkcGALJncjTuXH/vrCEBtsxYNW7+2VHxBIBMkgGATCoW4pDA/tG4NWj2gmfI5tleim//u0YcOZBhMgCQYZVSePm5ML8Qk8DFuifJxhooxL2fB8eVf4DMkwGAzKtVw6vPxyGBoydVg9go+2vxqyd7P4F8kAGAnLg3JHDslEdKJ41V4+Yfez+BPJEBgPy4NyTw2gf2h9IBA4VY/Z8cdZZA3sgAZNiJc/5tpo1KKe4PnV+IScD+UNZteo/qPw9UX/TXC9kmA5Bhr30QTsz7jp72atXw+gthZqUaZEiAx7J7JH78r/pPW42mziF5IAOQbXMLYe5ts3o80NR4rAa99VG8SQAe6ZlKfPv3sQIPYvcAuSEDkAfH58Ps+bizb3rC82S1YiHe5Nq6ScCQAA8yUIhfKk6NOyDas4OYnPnMP/3bnd9621MlJ9zdw8OdvhD/Fdfibfnl2uIv1a53w++kGwz/xNOq/7RVXwzHPoofNkGe+B6AXLm8GF551x3+PNCukfjr2Eo1yLf5fJoAwP1a1X9/XZBLMgA5NLcQvv5mrAYdmvDvOm209of6YA94iBPn4uCvrw3JKxmA3Jo5c3drkIIv96uUwkvPxt2yx04ZEgB+zKW68SHyTwYgz5aa8e/xmTPhyAGLPmijVo03Cfi0D2hpNMPRD31DSBJkAPLv8mL4xttxSODIAftDaWNyNO6Dt/AbEmdSiKT0eNwkYm4hvPhG/Cu+4e937lMsxCGBP3whhgEgNfML4dffcJ8gafE9AGk5dip+zHN4X/zoF1aplMLLz9kCDgmpL8Yr51X/SZDvAUjOUjP+jf+bb8ZXPbhfrRpefT42xwYslYL8alX/X3xDACBRvgcgURfrcUhg90j8TsCQAPdrDQm8tdIPBnJm5qzmD6mTAUja7IX4CdDUznBw3E0CrFYshMN748+GqgDkhrIftMgApG6pGT8Nat0kYEiA+1VKcX/o/EJMAvaHQnbVF+Pb/+wFjxCCDAB3XV4ZC2slATcJcL9aNbz+gv4AZFKjafkvrCYDwCfmFsLc22F/LTZAVIO439R42D/qCiHIkhPn4sf/ojusIgPAasfnw+z5OCQwPeFsWK1YCC89G8PA0ZOGBKCrzS/Ez/79dwptyQDQxr0hgcP7wi6XRnGfHZU4JHD6QkwChgSg29QX442Qvq+Dh5AB4IEuL4ZX3g1j1bgq3v5Q7rdrJP54vHc27g/VNIBu0Kr++08SHkkGgEeYW4iXyEztDIcmDAmwWrEQO2P7R33oCFvPV3OwdjIArMnMmbtbg6bGHRirVUpxSGByVPkYtsaluhEdeDw9zgvWaKkZ/4359TfinBncr1aNQwJHDoQB3xfBZmk0w7f+Knz9TQEAHo/vAeDxXF4M33g77B6J48KGBLjf5Gj88bCMHDaBKztg3WQAWI/ZC/HX9J5wcNyQAKvdGxJwKSlsEFd3wxOSAWD9jp2KcwKH98WPfmGVSim8/Fx8Uzl6MlysOx3ojPrKte6aP/CEzAPAE1lqxn+NfvNNQwK0V6uGV5+PQdGQADyhRjPe0v3iGwIAdIDvAaADLtbjkMD+WmyAGBLgflPjsRr01kfxiyNgHU6ci1+pqf5Dp8gA0DHH58Ps+XiTgCEB7lcshMN748+GGgM8FoU62AgyAHTSUjMOCZyYj92PXSOOltUqpbg/1E1GsBb1RYP1sFFkAOi8y4vhlXfDWDUmgR0VB8xqu0bir2Mr1SDdBrhfo2nBLmwsM8GwUeYW4rU13/qr+I8Z3G96IvzhC3GMBPi0E+fiX54CAGwo3wPAxro3JDA94aRZrVgILz0bJ4aPnjQkALH6f+yU/xZgM8gAsOHuDQkcORA3RcIqOypxSODEufhzYkiANNUXYzvu+LzHD5tEBoBNcnkx7g8dq8YkYH8o95scDbtHYgfakACpMRsDm08GgE01txAvuJnaGQ5N2B/KasVC7IztH/WBKKmwIwu2igwAW2DmTKwGTe+JRXBYpVKKQwKTo3aik2eX6sZgYCvJALA1lprx37/WTQKGBLhfrRpefd7dqORQo+nObNh6MgBspYv1OCSweyQmAUMC3O/ekIA9ieTDzMoPs1gLW04GgK03eyH+mt4TDo4bEmC1e0MCLkwl0+YXwmsfqP5Dt5ABoFscOxW/HD+8L370C6tUSuHl57xFkUn1xfhzq/oPXcU9wdBFlprxX8rfeju+6sH9atXw+gsxKA74vogsaDTjkqsX3xAAoOv4HgC6ztxCmHs77K/FBoghAe43NR6rQaYq6XIm2qGbyQDQpY7Ph9nz8SaB6QmPiNWKhXB4790hAZ+w0m3mF2y2hW4nA0D3WmrGIYHW/tBdIx4Uq+2ohN/+Vbcs0UXqi4bXIRtkAOh2lxfDK++GsWpMAjsqHher7RqJv46tVIP0LtgqjWZcYuuHELJCBoBsmFsIX38zDgkc3mt/KG1MT8Tdskc/jC0y2GQnzsUvLX0ZBRkiA0CWtIYEpvfEqVBYpVgILz0bd8seO2VIgE0yv+DnDTJJBoCMWWrGuu3MmXDkQNwUCavUqnFIwOeybLRG0/dOkGEyAGTS5cXwjbfjkMCRA/aH0sbkaNg9op/NRjF/AlnnjjDIsLmFePnO0Q/jB3KwSrEQhwT+1+djGIBOOX0h/Pob8VsmAQAyzfcAkHkzZ+7uD50c9TBZrVIKLz9nXzsdUF+MF5mr/kM++B4A8mCpGf9t/s0346se3K9WDa8+H5tjA5ZK8fha1f8X3xAAID98DwD5cbEehwR2j8TvBAwJcL97QwLHTjkd1mrmrOYP5JAMAHkzeyH+mt4Tt8W7SYBVWkMC+0fjF0d9/gXgoeYX4s+J7VKQS5/5p3+781tve7aQQ9tLMQkYEuBBFhcXr1+/7nhann766W74bXSJ+mIcIJm9kPo5QI75FAhy6/LKAN+J+ZgE3CQArEWjqS0GSZABIOfmFsLc22F/LRzeqxoEPMyJc/Hjf9V/SIEMAEk4Ph9mz4epnbELDrCK7bGQGhkAUrHUjN/vt24S2OXSKGBFfTFe+nt83mlAWmQASMvlxfDKu2GsGpPAjoqHD+lqVf9nzij/QIpkAEjR3EL4+puxGnRowpAApOj0hVj+sfcTkiUDQLpmztzdGjQ17qcAUnGpHt/+3fgLiZMBIGlLzfg2MHMmHDlgfyjkXKMZjn6o+g8EGQAIrSGBb7wdhwSOHAiVkiOBHDr2keo/8AkZALhrbiG8+EasBh0cNyQA+TG/EK8LVP0HPk0GAH7MsVPxw8LD+8LkqIOBbKuvXBau+g/cTwYAVltqxveGVhIwJABZ1GiGt1bKPwBtyQBAexfrcUhg90hMAoYEIENmzsYv9FT/gYeQAYCHmb0QiwRTOw0JQAbML8RNXxfrnhXwCDIA8AhLzfiZYusmAUMC0J3qi/Htf/aCxwOsiQwArMnlleHCE/OxGrSj4sygWzSa4b2V8g/A2skAwGOYWwhffzPsr4XDe1WDYOudOBc//lf9Bx6XDAA8tuPzYfZ8HBKYnnB4sDXmF+Jn//Z+AusjAwDrcW9I4PC+sGvEEcLmqS/GS3+PzztyYP1kAGD9Li+GV94NY9Vw5ID9obAZjq1s/Vf+AZ6QDAA8qbmF8OIbsRp0aMKQAGyU0xdi9f/yogMGOkAGADpj5szd/aFT404UOulSPb79q/4DHSQDAB2z1IxvKjNnYjWoVnWu8KQazXD0Q9V/oPNkAKDDLi+Gb7wddo/EcWFDArBuMytb/1X/gY0gAwAbYvZC/DW9JxwcNyQAj2d+IV7Jp/oPbBwZANhAx07FatDhfWFy1DHDo9VXLuRW/Qc2mgwAbKylZnynaY0LGxKAB2k0w1srez8BNoEMAGyGuYUw93bYX4tXCxsSgFVOnIvz9Kr/wKaRAYDNc3w+zJ6PNwkYEoCW+YX49n+x7jiATSUDAJtqqRmHBE7MxyGBXSPOnnTVF+Pb/+wFPwLAFpABgC1weTG88m4Yq8YksKPiCZCWRjO8t7L3E2CryADAlplbCF9/Mw4JHN6rGkQqTpyLb//2fgJbSwYAtti9IYHpCY+CPJtfiG//9n4C3UAGALbevSGBIwfsDyWHGs1w9MMYdwG6hAwAdIvLi+Ebb8chgSMH7A8lP46tbP239xPoKjIA0F3mFsKLb8Rq0KEJQwJk2+kLcfOP6j/QhWQAoBvNnLl7tfDUuOdD9lyqx7d/1X+ga8kAQJdaasa3qNZNAoYEyIpGM7y1Uv4B6GYyANDVLtbjkMDukZgEDAnQ5WZWtv6r/gPdTwYAMmD2Qvw1vSccHDckQDeaXwivfaD6D2SGDABkRmt/6PSeMDnqodEt6ovx7V/1H8gWGQDIkssr71utJGBIgK3VaIb3Vso/AJkjAwDZM7cQ5t4O+2vxamFDAmyJE+fizLrqP5BRMgCQVcfnw+z5eJPA9IRnyOaZX4hv/xfrjhzIMBkAyLCl5t0hgcP7wq4RT5KNVV+Mb/+zFxwzkHkyAJB5lxfDK++GsWpMAjsqnied16r+z5xR/gFyQgYAcmJuIXz9zTgkcHiv/aF00olz8esmez+BPJEBgFxpDQlM7wlT4x4sT+pSPZZ/7P0E8kcGAPJm6f9v715+ozrPAA5/M65ly/Yw9oJFJRZI3gGqRBdgVlw2bMLarL1hxYau2SN1EzVKQ9JiEslVhVxaCVlVaSLADjeH4LZkrKBgSpNMqTJOSnCYoClgqhNbJFFpuPkyc97nkf+A42+88M/+3vc0st/bxqbS/t32h/Kcvm6k4fEsKQFySQMA+VSbSwdHsyGB/bvtD+XZHLvo6j+QcxoAyLNKNe07ku0P3TtgSIAne+969k8kV/+B3NMAQP6NTS3uD925wafN481+8wpqV/+BIIo+aCCCeiP7De9nI9kLnuC7CoXi1c/L+44IACAQ/wcAArkxmw0JbO3P/idgSIDsz/9f9/zyTOnzO/4iBsSiAYBwJq9nf/F96adpz2ZDAnHdTx1Hz5evVNujHwQQkgYAIqo3src+nZ7O3iRgSCCaQrHtzLXe313ujH4QQGAaAIir9s0Y6EIJeJNABIVC8ePb3T//k3tgQHQaAIiuUk2VnYT1oAAACXJJREFU0bRrYxra7mpQns39p+u18TXVW23RDwJAAwAsODWdJmeyIYHBASeSNw9S+x+ny3+eVngAizQAwKJHQwJDO9KWfqeSC4Xi5Wr5zXNd0c8B4Ps0AMD31ObSoRNp07qsBNavdTYt7JO50tGzPfZ+AvwvDQDwGJVqOjCSXQ3aO2BIoPU05jveeLfvo89c/Qd4PA0A8H+NTS1uDXpps0NqDQ8LbWOVPlf/AX6YBgD4IfVGGj6TxcD+3faHNrVCoXjlX6U3JnqiHwTAU9AAAE9Wm0sHR9PW/mxIYK3l8s2nVu96bbzs6j/AU9IAAE9r8nr2Nbgt7dlsSKBZ3E8dR8+Xr1Tbox8EwLPQAADP5tiF7GrQ0I60c4OTW02FYtvpj9Ycn7L3E+CZaQCAZ1ZvpFdOLpaAIYGVVygUZ77ofn285+49l38AnocGAHhON2azIYFdG7NXCxsSWDG3G52HJ3qrt+z9BHh+GgDghZyaTpMz2ZsEDAkstwep/fd/KU9cc8oAL0oDALyoeiMbElh4k4AhgWVRKL7/SemtC/Z+AiwNDQCwNGpz2ZDA6elsSGD9Woe6ZG5+1fPyOyVX/wGWkAYAWEqVajowkg0JDG13NehF3b3f8etzfR995uo/wBLTAABL79GQwOCA030e86nt7au9Y1c6W+/RAVqBBgBYFo+GBIZ2pC39zvipFYpXa92vnrZoCWAZaQCAZVSbS4dOpE3r0v7d9oc+Wa3e9dp4+fM7rv4DLC8NALDsKtW070h2NWjvgCGBx2vMdxx7v3TpH04HYCVoAIAVMja1uD/0pc2O/LuKZ2bKx6e6mueBAHJPAwCsnHojDZ9ZHBLYuM7Bp6uzpeGzPfZ+AqwwDQCw0m7MpoOjaWt/VgJhhwRuNzoPT/RWb9n7CbAKNADA6pi8nn0Nbkt7NscaEphPbSPv9bn6D7CKNADAajp2IZsTGNqRdm4I8DkUiuf/XvrtpZ4meBSA0DQAwCqrN9IrJxfHhXM8JPDxlz2vni65+g/QDDQAQFOoVFNlNO3amL1aOGdDAnfvd/zqbPlarb0JngWApAEAmsup6TQ5k71JIB9DAvOpbeyD3rc/7GyCZwHgWxoAoLnUG9mQwML+0C39LfvhFIpXbnaPXLT3E6AZaQCAZlSbS4dOpE3rshJYv7bFPqJavevo+TX2fgI0LQ0A0Lwq1XRgJBsSGNreGleDGg/aj10u2/sJ0OQ0AECzezQkMDjQvE/6MBXHZ8rHp7qa4FkAeAINANACHg0J7N/djPtDr86Whs+6+g/QMjQAQMuozaWDo9mQwP7dzbI/9Haj4/BEn6v/AK1FAwC0mEo17TuSXQ3aO7CaQwIPHrb95lKfq/8ArUgDALSksanF/aE7N6z84xcvf9r95oV8vckMIBINANCq6o30ysksBoZ2rNyQwM2vul5+p+zqP0BL0wAAre3GbDYksLU/K4FlHRK4c69j+Fz5Wq3dDwxAq9MAAHkweT37GtyW9mxe+iGB+dQ29sGatz+09xMgJzQAQH4s7A8d3LZ0QwKF4pWb3SMX7f0EyBUNAJArtblsSGChBF5wSOCLu52/ONX777q9nwB5owEAcqhSTZXRtGtj9mrh5xgSaDxof+ti+YN/2vsJkE8aACC3Tk2nyZnsTQKDA0/7LT5MxfGZ0vGpHj8VADmmAQDyrN5YHBIY2pG29D/hG73+Rc/rEyVX/wFyTwMA5F9tLh06kTaty0pg/drHfLu3Gx2HJ/qqt1z9BwhBAwBEUammAyPZkMDQ9m/3h96bb/vD33rfvdbpxwAgDg0AEMvCkMDgtvSTHxf/+mnpzQvL+V4xAJqSBgAIp95Iw2dSSgZ/AYIy+AUAALFoAAAAiEUDAABALBoAAABi0QAAABCLBgAAgFg0AAAAxKIBAAAgFg0AAACxaAAAAIhFAwAAQCwaAAAAYtEAAAAQiwYAAIBYNAAAAMSiAQAAIBYNAAAAsWgAAACIRQMAAEAsGgAAAGLRAAAAEIsGAACAWDQAAADEogEAACAWDQAAALFoAAAAiEUDAABALBoAAABi0QAAABCLBgAAgFg0AAAAxKIBAAAgFg0AAACxaAAAAIhFAwAAQCwaAAAAYtEAAAAQiwYAAIBYNAAAAMSiAQAAIBYNAAAAsWgAAACIRQMAAEAsGgAAAGLRAAAAEIsGAACAWDQAAADEogEAACAWDQAAALFoAAAAiEUDAABALBoAAABi0QAAABCLBgAAgFg0AAAAxKIBAAAgFg0AAACxaAAAAIhFAwAAQCwaAAAAYtEAAAAQiwYAAIBYNAAAAMSiAQAAIBYNAAAAsWgAAACIRQMAAEAsGgAAAGLRAAAAEIsGAACAWDQAAADEogEAACAWDQAAALFoAAAAiEUDAABALBoAAABi0QAAABCLBgAAgFg0AAAAxKIBAAAgFg0AAACxaAAAAIhFAwAAQCwaAAAAYtEAAAAQiwYAAIBYNAAAAMSiAQAAIBYNAAAAsWgAAACIRQMAAEAsGgAAAGLRAAAAEIsGAACAWDQAAADEogEAACAWDQAAALFoAAAAiEUDAABALBoAAABi0QAAABCLBgAAgFg0AAAAxKIBAAAgFg0AAACxaAAAAIhFAwAAQCwaAAAAYtEAAAAQiwYAAIBYNAAAAMSiAQAAIBYNAAAAsWgAAACIRQMAAEAsGgAAAGLRAAAAEIsGAACAWDQAAADEogEAACAWDQAAALFoAAAAiEUDAABALBoAAABi0QAAABCLBgAAgFg0AAAAxKIBAAAgFg0AAACxaAAAAIhFAwAAQCwaAAAAYtEAAAAQiwYAAIBYNAAAAMSiAQAAIBYNAAAAsWgAAACIRQMAAEAsGgAAAGLRAAAAEIsGAACAWDQAAADEogEAACAWDQAAALFoAAAAiEUDAABALBoAAABi0QAAABCLBgAAgFg0AAAAxKIBAAAgFg0AAACxaAAAAIhFAwAAQCwaAAAAYtEAAAAQiwYAAIBYNAAAAMSiAQAAIBYNAAAAsWgAAACIRQMAAEAsGgAAAGLRAAAAEIsGAACAWDQAAADEogEAACAWDQAAALFoAAAAiEUDAABALBoAAABi0QAAABCLBgAAgFg0AAAAxKIBAAAgFg0AAACxaAAAAIhFAwAAQCwaAAAAYtEAAAAQiwYAAIBYNAAAAMSiAQAAIBYNAAAAsWgAAACIRQMAAEAsGgAAAGLRAAAAEMuPujvSxnU+dAAACCGl9F8D7Zh3C+ILkwAAAABJRU5ErkJggg==" |
| | | ,"E:\\2021011620210116\\1.jpg"); |
| | | } |
| | | |
| | | |
| | | public static boolean GenerateImage(String imgStr, String imgFilePath) {// 对字节数组字符串进行Base64解码并生成图片 |
| | | if (imgStr == null) // 图像数据为空 |
| | | return false; |
| | | BASE64Decoder decoder = new BASE64Decoder(); |
| | | try { |
| | | // Base64解码 |
| | | byte[] bytes = decoder.decodeBuffer(imgStr); |
| | | for (int i = 0; i < bytes.length; ++i) { |
| | | if (bytes[i] < 0) {// 调整异常数据 |
| | | bytes[i] += 256; |
| | | } |
| | | } |
| | | // 生成jpeg图片 |
| | | OutputStream out = new FileOutputStream(imgFilePath); |
| | | out.write(bytes); |
| | | out.flush(); |
| | | out.close(); |
| | | return true; |
| | | } catch (Exception e) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public static String imgTobase64(String imgPath){ |
| | | InputStream inputStream = null; |
| | | byte[] data = null; |
| | | try { |
| | | inputStream = new FileInputStream(imgPath); |
| | | data = new byte[inputStream.available()]; |
| | | inputStream.read(data); |
| | | inputStream.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | // 加密 |
| | | BASE64Encoder encoder = new BASE64Encoder(); |
| | | return encoder.encode(data); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | package com.matrix.system.hive.pojo; |
| | | |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | | import com.matrix.system.hive.bean.SysOrderFlow; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | private Long staffId; |
| | | private Long vipId; |
| | | private List<AchieveNew> achaeveList; |
| | | |
| | | |
| | | |
| | | private List<SysOrderFlow> flows; |
| | | |
| | | public List<SysOrderFlow> getFlows() { |
| | | return flows; |
| | | } |
| | | |
| | | public void setFlows(List<SysOrderFlow> flows) { |
| | | this.flows = flows; |
| | | } |
| | | |
| | | public Long getCardId() { |
| | | return cardId; |
| | | } |
| | |
| | | private Long beatuyId; |
| | | |
| | | private String beatuyName; |
| | | |
| | | |
| | | |
| | | private Long vipId; |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public Long getBeatuyId() { |
| | | return beatuyId; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.matrix.system.app.vo.UserAchieveVo; |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.plugin.util.BaseServices; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * |
| | |
| | | |
| | | int findVipConsumeStatisticsTotal(AchieveNew achieveNew); |
| | | |
| | | public UserAchieveVo findUserAchieveByTime(int type); |
| | | |
| | | public List<AchieveNew> findOrderItemAchieve(Long orderid); |
| | | |
| | | } |
| | |
| | | */ |
| | | public Article findById(Long id); |
| | | |
| | | public List<Article> findApiArticleListInPage(Article article, PaginationVO pageVo); |
| | | |
| | | |
| | | |
| | |
| | | * @throws |
| | | */ |
| | | public String getOrderCode(); |
| | | |
| | | public String getFlowCode(); |
| | | |
| | | /** |
| | | * 根据一定的规则返回一个随机编号。 |
| | |
| | | */ |
| | | public void transfer(MoneyCardUse moneyCardUse, Long vipId2, Double money); |
| | | |
| | | /** |
| | | * 退款 |
| | | * jyy |
| | | */ |
| | | public int returnMoney(MoneyCardUse moneyCardUse, Long hjkId); |
| | | |
| | | |
| | | /** |
| | | * 设置为有效 |
| | |
| | | public ShoppingGoodsCategory findById(Long id); |
| | | |
| | | |
| | | |
| | | List<ShoppingGoodsCategory> findChildNodesByName(ShoppingGoodsCategory shoppingGoodsCategory); |
| | | |
| | | } |
| | |
| | | package com.matrix.system.hive.service; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.dto.ShoppingGoodsListDto; |
| | | import com.matrix.system.app.vo.ShoppingGoodsDetailVo; |
| | | import com.matrix.system.app.vo.ShoppingGoodsListVo; |
| | | import com.matrix.system.hive.bean.ShoppingGoods; |
| | | import com.matrix.system.hive.plugin.util.BaseServices; |
| | | |
| | |
| | | public ShoppingGoods findByCode(String goodsCode); |
| | | |
| | | Date calInvalidTime(ShoppingGoods shoppingGoods, Integer type, Date buyDate); |
| | | |
| | | List<ShoppingGoodsListVo> findShoppingGoodsListForApi(ShoppingGoodsListDto shoppingGoodsListDto); |
| | | |
| | | int findShoppingGoodsListTotalForApi(ShoppingGoodsListDto shoppingGoodsListDto); |
| | | |
| | | ShoppingGoodsDetailVo findApiShoppingGoodsDetailById(Long id); |
| | | } |
| | |
| | | public List<SysBeauticianState> findByTimeAndStaff(Long id, Date beginTime, Date endTime); |
| | | |
| | | |
| | | |
| | | public List<SysBeauticianState> findBySerId(Long serviceId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.service; |
| | | |
| | | import com.matrix.system.hive.bean.SysOrderFlow; |
| | | import com.matrix.system.hive.plugin.util.BaseServices; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-11 |
| | | **/ |
| | | public interface SysOrderFlowService extends BaseServices<SysOrderFlow> { |
| | | |
| | | public List<SysOrderFlow> findByOrderId(Long orderId); |
| | | |
| | | public List<SysOrderFlow> findPayMethodsAmount(Long orderId); |
| | | } |
| | |
| | | */ |
| | | public Integer findDclItemTotal(Long vipId); |
| | | |
| | | |
| | | public List<SysOrderItem> findByOrderId(Long orderId); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.dto.OrderListDto; |
| | | import com.matrix.system.app.vo.OrderDetailVo; |
| | | import com.matrix.system.app.vo.RankingVo; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.plugin.util.BaseServices; |
| | | import com.matrix.system.hive.pojo.CzXkVo; |
| | |
| | | */ |
| | | public void updateReceiptMoney(SysOrder sysOrder) throws GlobleException; |
| | | |
| | | public void refundOrderMoney(SysOrder sysOrder); |
| | | |
| | | /** |
| | | * 创建订单 |
| | | * @param session |
| | |
| | | SysOrder checkAndSaveOrder(SysOrder sysOrder); |
| | | |
| | | SysOrder findSysOrderTjByVipId(Long vipId); |
| | | |
| | | List<OrderDetailVo> findApiOrderListInPage(OrderListDto orderListDto, PaginationVO pageVo); |
| | | |
| | | int findApiOrderListTotal(OrderListDto orderListDto); |
| | | |
| | | OrderDetailVo findApiOrderDetailByOrderId(Long orderId); |
| | | |
| | | List<RankingVo> findApiShopAchieveRanking(SysOrder sysOrder); |
| | | |
| | | } |
| | |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.pojo.VerifyResult; |
| | | import com.matrix.system.app.dto.ServiceOrderListDto; |
| | | import com.matrix.system.app.vo.ServiceOrderListVo; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.plugin.util.BaseServices; |
| | | |
| | |
| | | public VerifyResult checkArrears(SysProjServices sysProjServices); |
| | | |
| | | public VerifyResult checkBalance(SysProjServices sysProjServices); |
| | | |
| | | |
| | | List<ServiceOrderListVo> findApiServiceOrderListInPage(ServiceOrderListDto serviceOrderListDto, PaginationVO pageVo); |
| | | |
| | | int findApiServiceOrderListTotal(ServiceOrderListDto serviceOrderListDto); |
| | | } |
| | |
| | | public int invalidTc(SysProjUse sysProjUse); |
| | | |
| | | |
| | | /** |
| | | * 退款 |
| | | * @param sysProjUse |
| | | * @return |
| | | */ |
| | | public int returnMoneyTc(SysProjUse sysProjUse, MoneyCardUse cardUse, Long moneyCardUseId); |
| | | |
| | | /** |
| | | * 设置为有效套餐 |
| | | * @param proj |
| | |
| | | |
| | | |
| | | /** |
| | | * 退款 |
| | | * @param sysProjUse |
| | | * @return |
| | | */ |
| | | public int returnMoneyProj(SysProjUse sysProjUse, MoneyCardUse cardUse, Long moneyCardUseId); |
| | | /** |
| | | * 设置为有效套餐 |
| | | * @param proj |
| | | * @return |
| | | */ |
| | | public AjaxResult activeProj(SysProjUse proj); |
| | | /** |
| | | * 退款项目 |
| | | * @param sysProjUse |
| | | * @return |
| | | */ |
| | | public double getTotalMoneyProj(SysProjUse sysProjUse); |
| | | |
| | | |
| | | |
| | | public int updateProjUseTck(SysProjUse projUse); |
| | | |
| | | |
| | | public List<SysProjUse> selectTaocanProjUse(Long id); |
| | | public List<SysProjUse> selectTaocanProjUse(Long id, String status); |
| | | } |
| | |
| | | package com.matrix.system.hive.service; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.dto.AddVipDto; |
| | | import com.matrix.system.app.dto.ModifyVipDto; |
| | | import com.matrix.system.app.dto.VipInfoListDto; |
| | | import com.matrix.system.app.vo.VipInfoDetailVo; |
| | | import com.matrix.system.app.vo.VipInfoListVo; |
| | | import com.matrix.system.hive.bean.MoneyCardUse; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.plugin.util.BaseServices; |
| | | import com.matrix.system.hive.pojo.VipInfoVo; |
| | |
| | | */ |
| | | public interface SysVipInfoService extends BaseServices<SysVipInfo>{ |
| | | |
| | | public int addVipDefaultCard(Long vipId); |
| | | public MoneyCardUse addVipDefaultCard(Long vipId); |
| | | /** |
| | | * 新增SysVipInfo |
| | | * |
| | |
| | | public List<SysVipInfo> findAll(SysVipInfo sysVipInfo); |
| | | |
| | | public int importVipInfo(File file) throws IOException; |
| | | |
| | | List<VipInfoListVo> findVipAddressBook(VipInfoListDto vipInfoListDto); |
| | | |
| | | com.matrix.system.app.vo.VipInfoVo findApiVipInfoById(Long id); |
| | | |
| | | int apiAddVip(AddVipDto addVipDto); |
| | | |
| | | int apiModifyVip(ModifyVipDto modifyVipDto); |
| | | |
| | | VipInfoDetailVo findVipInfoDetail(Long id); |
| | | } |
| | |
| | | package com.matrix.system.hive.service.imp; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.ModelUtils; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.vo.UserAchieveVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.SysUsersDao; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.*; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * This field was generated by Zking.software.Codegen. |
| | |
| | | |
| | | |
| | | @Override |
| | | public void addAchieveByServiceOrder(SysProjServices projServices) { |
| | | public void addAchieveByServiceOrder(SysProjServices projServices) { |
| | | List<AchieveNew> achieveNewList = new ArrayList<>(); |
| | | List<SysBeauticianState> beauticianStateList = sysBeauticianStateDao.selectBySerIds(projServices.getId()); |
| | | int size = beauticianStateList.size(); |
| | |
| | | achieveNew.setVipId(projServices.getVipId()); |
| | | // 是否为赠送业绩 |
| | | if (Dictionary.TAOCAN_SOURCE_ZS.equals(projUse.getSource())) { |
| | | achieveNew.setFreeConsume(projUse.getPrice()); |
| | | achieveNew.setFreeConsume(projUse.getPrice()*beauticianState.getCount()); |
| | | } else { |
| | | achieveNew.setHisConsume(projUse.getPrice()); |
| | | achieveNew.setHisConsume(projUse.getPrice()*beauticianState.getCount()); |
| | | } |
| | | achieveNew.setT2(projUse.getSource()); |
| | | if (projServices.getCreateTime() != null) { |
| | | achieveNew.setDatatime(projServices.getCreateTime()); |
| | | } else { |
| | | achieveNew.setDatatime(new Date()); |
| | | } |
| | | achieveNew.setDatatime(new Date()); |
| | | achieveNew.setOrderType(Dictionary.ORDER_TYPE_SERVICE); |
| | | achieveNew.setServiceOrderId(projServices.getId()); |
| | | achieveNew.setOrderItemId(beauticianState.getId()); |
| | | achieveNew.setShopId(projServices.getShopId()); |
| | | achieveNew.setCompanyId(projServices.getCompanyId()); |
| | | achieveNew.setShoppingGoodsId(projUse.getProjId()); |
| | | achieveNew.setNumberOfPeople(1D / size); |
| | | achieveNew.setProjNum(1); |
| | |
| | | achieveNewList.add(achieveNew); |
| | | } |
| | | } |
| | | } else { |
| | | // 如果该订单明细没有设置美疗师则单独设置顾问业绩 |
| | | AchieveNew achieveNew = new AchieveNew(); |
| | | // 顾问业绩等于收款金额 |
| | | achieveNew.setT1(orderItem.getPayMoney() + ""); |
| | | buildAchieve(pageOrder, orderItem, achieveNew); |
| | | // 新增顾问业绩 |
| | | achieveNewList.add(achieveNew); |
| | | } |
| | | } |
| | | } |
| | |
| | | ShoppingGoodsDao shoppingGoodsDao; |
| | | |
| | | private void buildAchieve(SysOrder pageOrder, SysOrderItem orderItem, AchieveNew achieveNew) { |
| | | if (Dictionary.ORDER_STATU_TK.equals(pageOrder.getStatu())) { |
| | | achieveNew.setId(null); |
| | | achieveNew.setProjPercentage(0 - achieveNew.getProjPercentage()); |
| | | achieveNew.setT1((0 - Double.parseDouble(achieveNew.getT1())) + ""); |
| | | } |
| | | |
| | | achieveNew.setVipId(pageOrder.getVipId()); |
| | | achieveNew.setSaleId(pageOrder.getStaffId()); |
| | | |
| | | if (pageOrder.getOrderTime() != null) { |
| | | achieveNew.setDatatime(pageOrder.getOrderTime()); |
| | | } else if (pageOrder.getOrderTime() != null) { |
| | | achieveNew.setDatatime(pageOrder.getOrderTime()); |
| | | if (pageOrder.getPayTime() != null) { |
| | | achieveNew.setDatatime(pageOrder.getPayTime()); |
| | | } else { |
| | | achieveNew.setDatatime(new Date()); |
| | | } |
| | |
| | | achieveNew.setOrderId(pageOrder.getId()); |
| | | achieveNew.setOrderItemId(orderItem.getId()); |
| | | achieveNew.setShopId(pageOrder.getShopId()); |
| | | achieveNew.setCompanyId(pageOrder.getCompanyId()); |
| | | achieveNew.setShoppingGoodsId(orderItem.getGoodsId()); |
| | | // 是否赠送 |
| | | achieveNew.setT2(orderItem.getIsFree()); |
| | | // 根据商品类型设置业绩类型 |
| | | |
| | | String goodType = shoppingGoodsDao.selectById(orderItem.getGoodsId()).getGoodType(); |
| | | if (orderItem.getPayMethod().equals(Dictionary.PAY_TYPE_MOENY) |
| | | && Dictionary.SHOPPING_GOODS_TYPE_XM.equals(goodType)) { |
| | | // 现金支付设置现金单次 |
| | | achieveNew.setProjCash(Double.parseDouble(achieveNew.getT1())); |
| | | |
| | | } else if (orderItem.getPayMethod().equals(Dictionary.PAY_TYPE_MOENY) |
| | | && Dictionary.SHOPPING_GOODS_TYPE_JJCP.equals(goodType)) { |
| | | // 设置现金产品 |
| | | achieveNew.setGoodsCash(Double.parseDouble(achieveNew.getT1())); |
| | | } else if (orderItem.getPayMethod().equals(Dictionary.PAY_TYPE_MOENY) |
| | | && (Dictionary.SHOPPING_GOODS_TYPE_TC.equals(goodType) |
| | | || Dictionary.SHOPPING_GOODS_TYPE_CZK.equals(goodType) |
| | | || Dictionary.SHOPPING_GOODS_TYPE_ZHK.equals(goodType) |
| | | || Dictionary.SHOPPING_GOODS_TYPE_TCK.equals(goodType))) { |
| | | // 设置卡项 |
| | | if (Dictionary.ACHIEVE_TYPE_CASH.equals(achieveNew.getT3())){ |
| | | achieveNew.setCardCash(Double.parseDouble(achieveNew.getT1())); |
| | | } else if (!orderItem.getPayMethod().equals(Dictionary.PAY_TYPE_CARD)) { |
| | | } else { |
| | | // 设置划扣金额 |
| | | achieveNew.setConsume(Double.parseDouble(achieveNew.getT1())); |
| | | } |
| | |
| | | public int findVipConsumeStatisticsTotal(AchieveNew achieveNew) { |
| | | return achieveNewDao.selectVipConsumeStatisticsTotal(achieveNew); |
| | | } |
| | | |
| | | @Override |
| | | public UserAchieveVo findUserAchieveByTime(int type) { |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | Date startTime = calendar.getTime(); |
| | | Date endTime = calendar.getTime(); |
| | | switch (type) { |
| | | // 本日 |
| | | case 1 : |
| | | break; |
| | | // 昨日 |
| | | case 2: |
| | | startTime = DateUtil.previousNDate(startTime, 1); |
| | | endTime = startTime; |
| | | break; |
| | | // 本月 |
| | | case 3: |
| | | calendar.set(Calendar.DAY_OF_MONTH, 1); |
| | | startTime = calendar.getTime(); |
| | | break; |
| | | // 上月 |
| | | case 4: |
| | | calendar.add(Calendar.MONTH, -1); |
| | | calendar.set(Calendar.DAY_OF_MONTH, 1); |
| | | startTime = calendar.getTime(); |
| | | calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH)); |
| | | endTime = calendar.getTime(); |
| | | break; |
| | | default: |
| | | break; |
| | | |
| | | } |
| | | |
| | | return achieveNewDao.selectUserAchieveByTime(startTime, endTime, users.getSuId()); |
| | | } |
| | | |
| | | @Override |
| | | public List<AchieveNew> findOrderItemAchieve(Long orderId) { |
| | | return achieveNewDao.selectOrderItemAchieveByOrderId(orderId); |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<Article> findApiArticleListInPage(Article article, PaginationVO pageVo) { |
| | | return articleDao.selectApiArticleListInPage(article, pageVo); |
| | | } |
| | | } |
| | |
| | | Date date=new Date(); |
| | | return fmt.format(date); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public String getFlowCode() { |
| | | return "F" + getNowTimeString(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.service.imp; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.VipStatisticsParamDto; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.SysCompanyDao; |
| | | import com.matrix.system.common.dao.SysUsersDao; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hiveErp.analysUtil.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-30 |
| | | **/ |
| | | @Service |
| | | public class DataAnalysisCustomerServiceImpl { |
| | | |
| | | @Autowired |
| | | private SysShopInfoDao shopInfoDao; |
| | | |
| | | @Autowired |
| | | private SysCompanyDao sysCompanyDao; |
| | | |
| | | @Autowired |
| | | private SysUsersDao sysUsersDao; |
| | | |
| | | /** |
| | | * 按店铺查询数据通用格式执行方法,支持时、日、月、年维度 |
| | | * 如: A店铺 B店铺 |
| | | * 2020-01-01 12 13 |
| | | * 2020-02-02 10 11 |
| | | * |
| | | * @param statisticsParam 时间条件 |
| | | * @param caculate 循环调用caculate计算该店的数据 |
| | | * 查询的数据需满足 只有一个门店只有一行 列名称为 t0,t1,t2 |
| | | * @return |
| | | */ |
| | | public AjaxResult getAnalysisResult(StatisticsParamVo statisticsParam, Caculate caculate) { |
| | | AjaxResult result = new AjaxResult(); |
| | | |
| | | //根据计算横坐标 |
| | | List<Date> xAxis = StatisticsTimeUtil.getTimeSpace(statisticsParam.getBeginTime(), statisticsParam.getEndTime(), statisticsParam.getStatisticsUnit()); |
| | | |
| | | //获取所有门店 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | List<SysShopInfo> shops = null; |
| | | if (statisticsParam.getShopId() != null) { |
| | | shops = Arrays.asList(shopInfoDao.selectById(user.getShopId())); |
| | | } else { |
| | | if (DataAuthUtil.hasAllShopAuth()) { |
| | | shops = shopInfoDao.selectShopInfo(user.getCompanyId()); |
| | | } else { |
| | | shops = Arrays.asList(shopInfoDao.selectById(user.getShopId())); |
| | | } |
| | | } |
| | | //定义数据项内容 |
| | | List<SeriesVo> series = new ArrayList<>(); |
| | | |
| | | //定义数据主体 |
| | | String[] legendData = new String[shops.size()]; |
| | | |
| | | int i = 0; |
| | | |
| | | //按门店统计数据 |
| | | List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis); |
| | | for (SysShopInfo shop : shops) { |
| | | |
| | | legendData[i++] = shop.getShopName(); |
| | | //数据项内容 |
| | | SeriesVo storeInfoSeries = new SeriesVo(); |
| | | storeInfoSeries.setName(shop.getShopName()); |
| | | //调用计算器获取数据库统计的结果 |
| | | Map<String, Integer> yAxisMap = caculate.exec(timeSpaceParam, shop.getId(), null); |
| | | //把统计结果转成数组格式 |
| | | storeInfoSeries.setData(StatisticsTimeUtil.getSeries(yAxisMap)); |
| | | series.add(storeInfoSeries); |
| | | |
| | | } |
| | | //构造返回对象 |
| | | Map<Object, Object> data = new HashMap<>(); |
| | | data.put("legendData", legendData); |
| | | data.put("series", series); |
| | | String[] xData = StatisticsTimeUtil.getFormartDateList(xAxis, statisticsParam); |
| | | data.put("xAxis", Arrays.copyOf(xData, xData.length - 1)); |
| | | result.setMapInfo(data); |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | return result; |
| | | } |
| | | |
| | | public AjaxResult getCompanyAnalysisResult(StatisticsParamVo statisticsParam, Caculate caculate) { |
| | | AjaxResult result = new AjaxResult(); |
| | | |
| | | //根据计算横坐标 |
| | | List<Date> xAxis = StatisticsTimeUtil.getTimeSpace(statisticsParam.getBeginTime(), statisticsParam.getEndTime(), statisticsParam.getStatisticsUnit()); |
| | | |
| | | //获取所有门店 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | SysCompany company = sysCompanyDao.selectById(user.getCompanyId()); |
| | | |
| | | //定义数据项内容 |
| | | List<SeriesVo> series = new ArrayList<>(); |
| | | |
| | | //定义数据主体 |
| | | String[] legendData = new String[1]; |
| | | |
| | | int i = 0; |
| | | |
| | | //按门店统计数据 |
| | | List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis); |
| | | |
| | | legendData[0] = company.getComName(); |
| | | //数据项内容 |
| | | SeriesVo storeInfoSeries = new SeriesVo(); |
| | | storeInfoSeries.setName(company.getComName()); |
| | | //调用计算器获取数据库统计的结果 |
| | | Map<String, Integer> yAxisMap = caculate.exec(timeSpaceParam, null, company.getComId()); |
| | | //把统计结果转成数组格式 |
| | | storeInfoSeries.setData(StatisticsTimeUtil.getSeries(yAxisMap)); |
| | | series.add(storeInfoSeries); |
| | | |
| | | //构造返回对象 |
| | | Map<Object, Object> data = new HashMap<>(); |
| | | data.put("legendData", legendData); |
| | | data.put("series", series); |
| | | String[] xData = StatisticsTimeUtil.getFormartDateList(xAxis, statisticsParam); |
| | | data.put("xAxis", Arrays.copyOf(xData, xData.length - 1)); |
| | | result.setMapInfo(data); |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | return result; |
| | | } |
| | | |
| | | public AjaxResult getStaffAnalysisResult(VipStatisticsParamDto statisticsParam, Caculate caculate) { |
| | | AjaxResult result = new AjaxResult(); |
| | | |
| | | //根据计算横坐标 |
| | | List<Date> xAxis = StatisticsTimeUtil.getTimeSpace(statisticsParam.getBeginTime(), statisticsParam.getEndTime(), statisticsParam.getStatisticsUnit()); |
| | | |
| | | //获取所有门店 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | Long staffId = null; |
| | | if (statisticsParam.getStaffId() == null) { |
| | | staffId = user.getSuId(); |
| | | } else { |
| | | staffId = statisticsParam.getStaffId(); |
| | | } |
| | | SysUsers sysUsers = sysUsersDao.selectById(staffId); |
| | | |
| | | //定义数据项内容 |
| | | List<SeriesVo> series = new ArrayList<>(); |
| | | |
| | | //定义数据主体 |
| | | String[] legendData = new String[1]; |
| | | |
| | | int i = 0; |
| | | |
| | | //按门店统计数据 |
| | | List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis); |
| | | |
| | | legendData[0] = sysUsers.getSuName(); |
| | | //数据项内容 |
| | | SeriesVo storeInfoSeries = new SeriesVo(); |
| | | storeInfoSeries.setName(sysUsers.getSuName()); |
| | | //调用计算器获取数据库统计的结果 |
| | | Map<String, Integer> yAxisMap = caculate.exec(timeSpaceParam, null, sysUsers.getSuId()); |
| | | //把统计结果转成数组格式 |
| | | storeInfoSeries.setData(StatisticsTimeUtil.getSeries(yAxisMap)); |
| | | series.add(storeInfoSeries); |
| | | |
| | | //构造返回对象 |
| | | Map<Object, Object> data = new HashMap<>(); |
| | | data.put("legendData", legendData); |
| | | data.put("series", series); |
| | | StatisticsParamVo statisticsParam1 = new StatisticsParamVo(); |
| | | statisticsParam1.setStatisticsUnit(statisticsParam.getStatisticsUnit()); |
| | | String[] xData = StatisticsTimeUtil.getFormartDateList(xAxis, statisticsParam1); |
| | | data.put("xAxis", Arrays.copyOf(xData, xData.length - 1)); |
| | | result.setMapInfo(data); |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | return result; |
| | | } |
| | | } |
| | |
| | | @Autowired |
| | | private SysVipLevelDao viplevelDao; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public int add(MoneyCardUse moneyCardUse) { |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | //退款 |
| | | @Override |
| | | public int returnMoney(MoneyCardUse moneyCardUse, Long hjkId) { |
| | | |
| | | |
| | | MoneyCardUse realObj = moneyCardUseDao.selectById(moneyCardUse.getId()); |
| | | |
| | | //检测商品是否已付款完成 |
| | | if (realObj.getOrderItemId() != 1) {//不是数据迁移过来的判断付款状态 |
| | | checkOrderStatu(realObj.getOrderItemId()); |
| | | } |
| | | |
| | | if (!realObj.getStatus().equals(Dictionary.TAOCAN_STATUS_YX)) { |
| | | throw new GlobleException("不是有效充值卡"); |
| | | } |
| | | |
| | | if (realObj.getSource().contains(Dictionary.TAOCAN_SOURCE_ZR)) { |
| | | throw new GlobleException("转让的充值卡不能退款"); |
| | | } |
| | | if (realObj.getSource().contains(Dictionary.TAOCAN_SOURCE_ZS)) { |
| | | throw new GlobleException("赠送的充值卡不能退款"); |
| | | } |
| | | |
| | | if (Dictionary.FLAG_YES_Y.equals(realObj.getIsVipCar())) { |
| | | //更新会员等级 |
| | | realObj.getVipInfo().setLevelId(0L); |
| | | infoDao.update(realObj.getVipInfo()); |
| | | } |
| | | StringBuilder content = new StringBuilder(); |
| | | |
| | | //有会籍卡退到会籍卡中,无则退了现金 |
| | | if (hjkId != null && !hjkId.equals("")) { |
| | | MoneyCardUse vipCard = moneyCardUseDao.selectById(hjkId); |
| | | vipCard.setRealMoney(vipCard.getRealMoney() + realObj.getRealMoney()); |
| | | moneyCardUseDao.update(vipCard); |
| | | content.append(realObj.getCardName() + "退款¥" + realObj.getRealMoney() + "到会籍卡") |
| | | .append(vipCard.getCardName()) |
| | | .append(",余次:" + vipCard.getLastCountName()) |
| | | .append(",本金余额:" + vipCard.getRealMoney()) |
| | | .append(",有效期:" + DateUtil.dateToString(vipCard.getFailTime(), DateUtil.DATE_FORMAT_MM)) |
| | | .append(",是否赠送:" + vipCard.getSourceName()); |
| | | } else { |
| | | content.append(realObj.getCardName() + "退款现金¥" + moneyCardUse.getReturnMonery() + ""); |
| | | } |
| | | DecimalFormat df = new DecimalFormat("#.00"); |
| | | double d = Double.valueOf(df.format(realObj.getRealMoney() - Double.valueOf(moneyCardUse.getReturnMonery()))); |
| | | //退款的本金为零,状态为已退款 |
| | | realObj.setRealMoney(d); |
| | | //赠送金额也清零 |
| | | realObj.setGiftMoney(0.0); |
| | | if (d <= 0) { |
| | | realObj.setStatus(Dictionary.TAOCAN_STATUS_TK); |
| | | } |
| | | int i = moneyCardUseDao.update(realObj); |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | //新增退款流水 |
| | | return i; |
| | | } |
| | | |
| | | //设置为有效 |
| | | @Override |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<ShoppingGoodsCategory> findChildNodesByName(ShoppingGoodsCategory shoppingGoodsCategory) { |
| | | return shoppingGoodsCategoryDao.selectChildNodesByName(shoppingGoodsCategory); |
| | | } |
| | | } |
| | |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.ShoppingGoodsListDto; |
| | | 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.dao.UtilDao; |
| | | import com.matrix.system.common.tools.ServiceUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.constance.TableMapping; |
| | | import com.matrix.system.hive.bean.MoneyCardAssemble; |
| | | import com.matrix.system.hive.bean.ShoppingGoods; |
| | | import com.matrix.system.hive.bean.ShoppingGoodsAssemble; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.MoneyCardAssembleDao; |
| | | import com.matrix.system.hive.dao.ShoppingGoodsAssembleDao; |
| | | import com.matrix.system.hive.dao.ShoppingGoodsDao; |
| | |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.awt.event.WindowStateListener; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | } |
| | | return target; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<ShoppingGoodsListVo> findShoppingGoodsListForApi(ShoppingGoodsListDto shoppingGoodsListDto) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | shoppingGoodsListDto.setShopId(user.getShopId()); |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | int offset = (shoppingGoodsListDto.getPageNum() - 1) * shoppingGoodsListDto.getPageSize(); |
| | | int limit = shoppingGoodsListDto.getPageSize(); |
| | | pageVo.setOffset(offset); |
| | | pageVo.setLimit(limit); |
| | | return shoppingGoodsDao.selectShoppingGoodsApiInPage(shoppingGoodsListDto, pageVo); |
| | | } |
| | | |
| | | @Override |
| | | public int findShoppingGoodsListTotalForApi(ShoppingGoodsListDto shoppingGoodsListDto) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | shoppingGoodsListDto.setShopId(user.getShopId()); |
| | | |
| | | return shoppingGoodsDao.selectShopppingGoodsAipTotal(shoppingGoodsListDto); |
| | | } |
| | | |
| | | @Override |
| | | public ShoppingGoodsDetailVo findApiShoppingGoodsDetailById(Long id) { |
| | | ShoppingGoods shoppingGoods = shoppingGoodsDao.selectById(id); |
| | | ShoppingGoodsDetailVo goodsDetailVo = goodsToGoodsDetailVo(shoppingGoods); |
| | | |
| | | if (ShoppingGoods.SHOPPING_GOODS_TYPE_TC.equals(shoppingGoods.getGoodType())) { |
| | | List<ShoppingGoodsDetailVo> products = shoppingGoodsAssembleDao.selectGoodsRelationGoodsList(shoppingGoods.getId(), ShoppingGoods.SHOPPING_GOODS_TYPE_JJCP); |
| | | List<ShoppingGoodsDetailVo> proj = shoppingGoodsAssembleDao.selectGoodsRelationGoodsList(shoppingGoods.getId(), ShoppingGoods.SHOPPING_GOODS_TYPE_XM); |
| | | |
| | | goodsDetailVo.setAssembleTaocanProduct(products); |
| | | goodsDetailVo.setAssembleTaocanProj(proj); |
| | | } else if (ShoppingGoods.SHOPPING_GOODS_TYPE_XM.equals(shoppingGoods.getGoodType())) { |
| | | List<ShoppingGoodsDetailVo> products = shoppingGoodsAssembleDao.selectGoodsRelationGoodsList(shoppingGoods.getId(), null); |
| | | goodsDetailVo.setAssembleProj(products); |
| | | } else if (ShoppingGoods.SHOPPING_GOODS_TYPE_CZK.equals(shoppingGoods.getGoodType())) { |
| | | List<ShoppingGoodsDetailVo> cardGoods = moneyCardAssembleDao.selectCardRelationGoods(shoppingGoods.getId()); |
| | | List<ShoppingGoodsCategory> cardCategory = moneyCardAssembleDao.selectCardRelationCategory(shoppingGoods.getId()); |
| | | |
| | | goodsDetailVo.setAssembleProj(cardGoods); |
| | | goodsDetailVo.setCardCategory(cardCategory); |
| | | } |
| | | return goodsDetailVo; |
| | | } |
| | | |
| | | private ShoppingGoodsDetailVo goodsToGoodsDetailVo(ShoppingGoods shoppingGoods) { |
| | | ShoppingGoodsDetailVo goodsDetailVo = new ShoppingGoodsDetailVo(); |
| | | goodsDetailVo.setImg(shoppingGoods.getImg()); |
| | | goodsDetailVo.setGoodsName(shoppingGoods.getName()); |
| | | goodsDetailVo.setGoodsNo(shoppingGoods.getCode()); |
| | | goodsDetailVo.setGoodsType(shoppingGoods.getGoodType()); |
| | | goodsDetailVo.setDesc(shoppingGoods.getDescription()); |
| | | goodsDetailVo.setMaxSaleCnt(shoppingGoods.getCarMaxSaleCount()); |
| | | goodsDetailVo.setLimitBuyCnt("否".equals(shoppingGoods.getIsOnce()) ? null : shoppingGoods.getIsOnce()); |
| | | goodsDetailVo.setMaxUseCnt(shoppingGoods.getCarUseCount()); |
| | | goodsDetailVo.setMeasure(shoppingGoods.getMeasure()); |
| | | goodsDetailVo.setVolume(shoppingGoods.getVolume()); |
| | | goodsDetailVo.setSalePrice(BigDecimal.valueOf(shoppingGoods.getSealPice())); |
| | | goodsDetailVo.setSaleCnt(shoppingGoods.getRealSealCount()); |
| | | goodsDetailVo.setGiftPrice(BigDecimal.valueOf(shoppingGoods.getReferencePice() == null ? 0 : shoppingGoods.getReferencePice())); |
| | | return goodsDetailVo; |
| | | } |
| | | } |
| | |
| | | |
| | | return sysBeauticianStateDao.selectByTimeAndStaff(id,beginTime,endTime); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<SysBeauticianState> findBySerId(Long serviceId) { |
| | | return sysBeauticianStateDao.selectBySerIds(serviceId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.service.imp; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.bean.SysOrderFlow; |
| | | import com.matrix.system.hive.dao.SysOrderFlowDao; |
| | | import com.matrix.system.hive.service.SysOrderFlowService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-11 |
| | | **/ |
| | | @Service |
| | | public class SysOrderFlowServiceImpl implements SysOrderFlowService { |
| | | |
| | | @Autowired |
| | | private SysOrderFlowDao sysOrderFlowDao; |
| | | |
| | | @Override |
| | | public int add(SysOrderFlow obje) { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public int modify(SysOrderFlow obje) { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public int remove(List<Long> list) { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public int removeById(Long id) { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public List<SysOrderFlow> findInPage(SysOrderFlow obje, PaginationVO pageVo) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<SysOrderFlow> findByModel(SysOrderFlow obje) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public int findTotal(SysOrderFlow obje) { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public SysOrderFlow findById(Long id) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<SysOrderFlow> findByOrderId(Long orderId) { |
| | | return sysOrderFlowDao.selectByOrderId(orderId); |
| | | } |
| | | |
| | | @Override |
| | | public List<SysOrderFlow> findPayMethodsAmount(Long orderId) { |
| | | return sysOrderFlowDao.selectPayMethodsAmountByOrderId(orderId); |
| | | } |
| | | } |
| | |
| | | return sysOrderItemDao.selectDclItemTotal(vipId); |
| | | } |
| | | |
| | | @Override |
| | | public List<SysOrderItem> findByOrderId(Long orderId) { |
| | | return sysOrderItemDao.selectByOrderId(orderId); |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.hive.service.imp; |
| | | |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.OrderListDto; |
| | | import com.matrix.system.app.mapper.SysProjUseMapper; |
| | | import com.matrix.system.app.vo.OrderDetailAchieveItemVo; |
| | | import com.matrix.system.app.vo.OrderDetailItemVo; |
| | | import com.matrix.system.app.vo.OrderDetailVo; |
| | | import com.matrix.system.app.vo.RankingVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.dao.SysUsersDao; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.constance.SystemConstance; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.hievEnum.PayMethodEnum; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.plugin.util.MoneyUtil; |
| | | import com.matrix.system.hive.pojo.CzXkVo; |
| | | import com.matrix.system.hive.pojo.ShoppingCarItem; |
| | | import com.matrix.system.hive.pojo.ShoppingCarItemsVo; |
| | | import com.matrix.system.hive.service.AchieveNewService; |
| | | import com.matrix.system.hive.service.CodeService; |
| | | import com.matrix.system.hive.service.ShoppingGoodsService; |
| | | import com.matrix.system.hive.service.SysOrderService; |
| | | import com.matrix.system.hive.service.*; |
| | | import com.matrix.system.shopXcx.mqTask.MQTaskRouting; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgParam; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpSession; |
| | | import java.util.*; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @date 2016-07-03 20:53 |
| | |
| | | private AchieveNewService achieveNewService; |
| | | |
| | | @Autowired |
| | | private AchieveNewDao achieveNewDao; |
| | | |
| | | @Autowired |
| | | private WarehouseDao warehouseDao; |
| | | |
| | | @Autowired |
| | | private ShoppingGoodsService shoppingGoodsService; |
| | | |
| | | @Autowired |
| | | private SysOrderFlowDao sysOrderFlowDao; |
| | | |
| | | @Autowired |
| | | private SysSupplierInfoDao sysSupplierInfoDao; |
| | | |
| | | @Autowired |
| | | private SysInstoreInfoDao sysInstoreInfoDao; |
| | | |
| | | @Autowired |
| | | private SysInstoreDetailDao sysInstoreDetailDao; |
| | | |
| | | @Autowired |
| | | private SysInstoreInfoService sysInstoreInfoService; |
| | | |
| | | |
| | | @Value("${evn}") |
| | | private String evn; |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | |
| | | @Override |
| | | public int add(SysOrder sysOrder) { |
| | |
| | | |
| | | @Override |
| | | public List<SysOrder> findInPage(SysOrder sysOrder, PaginationVO pageVo) { |
| | | if(pageVo!=null){ |
| | | if (pageVo != null) { |
| | | pageVo.setSort("desc"); |
| | | pageVo.setSort("orderTime"); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public SysOrder checkAndSaveOrder(SysOrder sysOrder) { |
| | | |
| | | // 收款改变订单状态 |
| | | /** |
| | | * 判断订单条目的一个付款情况 |
| | | */ |
| | | // 计算现金支付金额 |
| | | double xjMoney = 0.0; |
| | | // 计算卡支付总额 |
| | | double cardMoney = 0.0; |
| | | SysOrder source = null; |
| | | if (sysOrder.getId() != null) { |
| | | source = sysOrderDao.selectById(sysOrder.getId()); |
| | | } |
| | | |
| | | // 计算订单折扣金额,收款情况下 计算订单总额 |
| | | double zkTotal = 0.0; |
| | | /** |
| | | * 记录本次消费的卡,防止扣除多次消费记录 |
| | | */ |
| | | ArrayList<Long> userCard = new ArrayList<Long>(); |
| | | |
| | | // 判断是否为退款 |
| | | String orderStatus = Dictionary.ORDER_STATU_DFK; |
| | | if (Dictionary.ORDER_STATU_TK.equals(sysOrder.getStatu())) { |
| | | orderStatus = Dictionary.ORDER_STATU_TK; |
| | | } |
| | | |
| | | // 页面的pageOrder 参数只包含支付金额信息,不带有购买商品 |
| | | for (SysOrderItem item : sysOrder.getItems()) { |
| | | // 若为退款,则先更新原有数量 |
| | | if (orderStatus.equals(Dictionary.ORDER_STATU_TK)) { |
| | | SysOrderItem sysOrderItem = new SysOrderItem(); |
| | | sysOrderItem.setId(item.getId()); |
| | | sysOrderItem.setCount(item.getPreCount() - item.getCount()); |
| | | orderItemDao.update(sysOrderItem); |
| | | } |
| | | item.setId(null); |
| | | |
| | | ShoppingGoods shoppingGoods = shoppingGoodsDao.selectById(item.getGoodsId()); |
| | | item.setType(shoppingGoods.getGoodType()); |
| | |
| | | item.setIsFree(Dictionary.FLAG_YES); |
| | | } |
| | | |
| | | |
| | | // 如果支付方式是非现金则记录现金支付金额 |
| | | if (!item.getPayMethod().equals(PayMethodEnum.VIP_CARD.getCode())) { |
| | | xjMoney = MoneyUtil.add(xjMoney, item.getPayMoney()); |
| | | item.setCashPay(item.getPayMoney()); |
| | | } else { |
| | | cardMoney = MoneyUtil.add(cardMoney, item.getPayMoney()); |
| | | item.setCardPay(item.getPayMoney()); |
| | | |
| | | } |
| | | |
| | | |
| | | // 订单欠款减去支付金额 设置实际欠款 |
| | | Double itemZkTotal = MoneyUtil.mul(item.getZkPrice(), Double.valueOf(item.getCount())); |
| | | zkTotal=MoneyUtil.add(zkTotal, itemZkTotal); |
| | | item.setArrears(MoneyUtil.sub(itemZkTotal, item.getPayMoney())); |
| | | |
| | | |
| | | // 如果存在欠款,将条目状态设置为欠款 |
| | | if (item.getArrears() > 0) { |
| | | item.setStatus(Dictionary.ORDER_STATU_QK); |
| | | } else if (item.getArrears() < 0) { |
| | | item.setPayMoney(item.getZkPrice()); |
| | | item.setStatus(Dictionary.ORDER_STATU_DFK); |
| | | } else { |
| | | item.setStatus(Dictionary.ORDER_STATU_DFK); |
| | | } |
| | | zkTotal = MoneyUtil.add(zkTotal, itemZkTotal); |
| | | item.setStatus(orderStatus); |
| | | } |
| | | double arrears; |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | // 如果是收款,收款可以改变订单价格,所以需要求和出 订单折后价来计算本次欠款 |
| | | arrears = MoneyUtil.sub(zkTotal, MoneyUtil.add(cardMoney, xjMoney)); |
| | | sysOrder.setZkTotal(zkTotal); |
| | | sysOrder.setArrears(arrears); |
| | | sysOrder.setCardPay(cardMoney); |
| | | sysOrder.setCashPay(xjMoney); |
| | | sysOrder.setStatu(Dictionary.ORDER_STATU_DFK); |
| | | sysOrder.setStaffId(user.getSuId()); |
| | | sysOrder.setCompanyId(user.getCompanyId()); |
| | | |
| | | sysOrder.setPayTime(new Date()); |
| | | if(sysOrder.getId()==null){ |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysOrder.setZkTotal(zkTotal); |
| | | sysOrder.setStatu(orderStatus); |
| | | sysOrder.setStaffId(source != null ? source.getStaffId() : user.getSuId()); |
| | | sysOrder.setCompanyId(source != null ? source.getCompanyId() : user.getCompanyId()); |
| | | |
| | | |
| | | if (sysOrder.getId() == null) { |
| | | //新增订单 |
| | | sysOrder.setOrderNo(codeService.getOrderCode()); |
| | | sysOrderDao.insert(sysOrder); |
| | | |
| | | }else{ |
| | | } else { |
| | | //更新订单 |
| | | sysOrderDao.update(sysOrder); |
| | | //删除原有订单明细 |
| | |
| | | |
| | | sysOrder.getItems().forEach(sysOrderItem -> { |
| | | sysOrderItem.setOrderId(sysOrder.getId()); |
| | | orderItemDao.insert(sysOrderItem); |
| | | if (sysOrder.getStatu().equals(Dictionary.ORDER_STATU_TK)) { |
| | | // 取负数 |
| | | sysOrderItem.setCount(-sysOrderItem.getCount()); |
| | | orderItemDao.insert(sysOrderItem); |
| | | // 调整回来 |
| | | sysOrderItem.setCount(-sysOrderItem.getCount()); |
| | | } else { |
| | | orderItemDao.insert(sysOrderItem); |
| | | } |
| | | |
| | | }); |
| | | |
| | | return sysOrder; |
| | |
| | | |
| | | order.setStatu(Dictionary.ORDER_STATU_YQX); |
| | | order.setArrears(0D); |
| | | |
| | | //发送微信公众号提醒 |
| | | UniformMsgParam uniformMsgParam = new UniformMsgParam(order.getCompanyId(), UniformMsgParam.GZH_DDQX); |
| | | uniformMsgParam.put("orderId", order.getId()); |
| | | rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG + evn, uniformMsgParam.toJSONString()); |
| | | |
| | | return sysOrderDao.update(order); |
| | | |
| | | } else { |
| | |
| | | |
| | | // 根据订单明细判断是赠送金额购买还是本金购买 |
| | | |
| | | moneyCardUseFlow.setTotal(orderItem.getCardPay()); |
| | | moneyCardUse.setRealMoney(MoneyUtil.add(moneyCardUse.getRealMoney(), orderItem.getCardPay())); |
| | | moneyCardUseFlow.setTotal(orderItem.getCardPay()); |
| | | moneyCardUse.setRealMoney(MoneyUtil.add(moneyCardUse.getRealMoney(), orderItem.getCardPay())); |
| | | //TODO 目前无法退回到具体的赠送金额还是本金 |
| | | |
| | | if (!moneyCardUse.getIsVipCar().equals(Dictionary.FLAG_YES_Y)) { |
| | | if(moneyCardUse.getLastCount()!=null) { |
| | | if (moneyCardUse.getLastCount() != null) { |
| | | moneyCardUse.setLastCount(moneyCardUse.getLastCount() + 1); |
| | | moneyCardUseFlow.setTimes(1); |
| | | } |
| | |
| | | moneyCardUseFlow.setCreateTime(new Date()); |
| | | moneyCardUseFlow.setOperationId(user.getSuId()); |
| | | moneyCardUseFlow.setContent(moneyCardUse.getChangeRemark()); |
| | | moneyCardUseFlow.setBalance(moneyCardUse.getGiftMoney()+moneyCardUse.getRealMoney()); |
| | | moneyCardUseFlow.setBalance(moneyCardUse.getGiftMoney() + moneyCardUse.getRealMoney()); |
| | | moneyCardUseFlowDao.insert(moneyCardUseFlow); |
| | | } |
| | | } |
| | |
| | | AchieveNew achieveNew = new AchieveNew(); |
| | | achieveNew.setOrderId(id); |
| | | achieveNewService.removeByModel(achieveNew); |
| | | |
| | | // 删除收款记录 |
| | | sysOrderFlowDao.deleteByOrderId(id); |
| | | |
| | | // 取消订单 |
| | | order.setStatu(Dictionary.ORDER_STATU_YQX); |
| | | |
| | | |
| | | return sysOrderDao.update(order); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | throw new GlobleException("没用选择购买产品"); |
| | | } |
| | | // 获取会员信息,判断等级 获取相应家居折扣 |
| | | SysVipInfo info = (SysVipInfo) WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER); |
| | | SysVipInfo info = sysVipInfoDao.selectById(car.getVipId()); |
| | | |
| | | //获取折扣----- |
| | | Double zk = zk = 1.0; |
| | |
| | | order.setStatu(Dictionary.ORDER_STATU_DFK); |
| | | order.setCardPay(0.00); |
| | | order.setCashPay(0.00); |
| | | order.setCompanyId(user.getCompanyId()); |
| | | order.setBeatuyId(car.getBeatuyId() + ""); |
| | | // 根据美疗师id查询美疗师姓名 |
| | | if (car.getBeatuyId() != null) { |
| | |
| | | // 设置订单总价与折后价 |
| | | order.setTotal(total); |
| | | order.setZkTotal(zkTotal); |
| | | order.setArrears(zkTotal); |
| | | sysOrderDao.update(order); |
| | | return i; |
| | | } |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateReceiptMoney(SysOrder pageOrder) throws GlobleException { |
| | | |
| | | |
| | | if (!Dictionary.ORDER_STATU_DFK.equals(pageOrder.getStatu())) { |
| | | throw new GlobleException("该订单已经收过款,请刷新页面再试!"); |
| | | } |
| | |
| | | sysVipInfoDao.update(vipInfo); |
| | | } |
| | | |
| | | //设置订单的成交状态 |
| | | changeOrderStatu(pageOrder); |
| | | |
| | | // 设置会员充值卡使用情况 |
| | | addMoneyCardUse(pageOrder); |
| | | |
| | | // 新增出库单 |
| | | addOutStore(pageOrder); |
| | | |
| | | // 改变客户项目套餐使用情况 |
| | | addTaocanProj(pageOrder); |
| | | |
| | | // 新增出库单 |
| | | addOutStore(pageOrder); |
| | | |
| | | // 设置业绩 |
| | | achieveNewService.addAchaeveByOrder(pageOrder); |
| | | |
| | | setShopSelCount(pageOrder); |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 收款改变订单状态,划扣金额 |
| | | * |
| | | * @author:姜友瑶 |
| | | */ |
| | | private void changeOrderStatu(SysOrder sourceOrder) { |
| | | |
| | | boolean haQk=false; |
| | | String orderStatus = Dictionary.ORDER_STATU_YFK; |
| | | String flowType = SysOrderFlow.FLOW_TYPE_BUY; |
| | | double cashPayTotal = 0D; |
| | | double cardPayTotal = 0D; |
| | | |
| | | for(SysOrderItem sysOrderItem:sourceOrder.getItems()){ |
| | | //处理支付流水 |
| | | int flowCount = 1; |
| | | for (SysOrderFlow flow : sourceOrder.getFlows()) { |
| | | |
| | | if(!sysOrderItem.getStatus().equals(Dictionary.ORDER_STATU_QK)){ |
| | | SysOrderItem updateItem=new SysOrderItem(); |
| | | updateItem.setId(sysOrderItem.getId()); |
| | | updateItem.setStatus(Dictionary.ORDER_STATU_YFK); |
| | | //支付内容摘要设置 |
| | | Long goodsId = sourceOrder.getItems().get(0).getGoodsId(); |
| | | ShoppingGoods goods = shoppingGoodsDao.selectById(goodsId); |
| | | flow.setFlowContent(goods.getName() + "等" + sourceOrder.getItems().size() + "件产品"); |
| | | |
| | | if (sysOrderItem.getPayMethod().equals(Dictionary.PAY_TYPE_MOENY_CARD ) ) { |
| | | |
| | | if(sysOrderItem.getPayMethodDetail()!=null){ |
| | | // 查询要支付的充值卡 |
| | | MoneyCardUse moneyCardUse = moneyCardUseDao.selectById(Long.parseLong(sysOrderItem.getPayMethodDetail())); |
| | | // 扣除付款卡金额并添加流水 |
| | | cardPaySk(moneyCardUse, sourceOrder, sysOrderItem); |
| | | }else{ |
| | | throw new GlobleException("请选择支付的会员卡"); |
| | | } |
| | | |
| | | |
| | | } |
| | | orderItemDao.update(updateItem); |
| | | }else { |
| | | haQk=true; |
| | | // 若是退款,则取负数 |
| | | if (Dictionary.ORDER_STATU_TK.equals(sourceOrder.getStatu())) { |
| | | flowType = SysOrderFlow.FLOW_TYPE_REFUND; |
| | | flow.setAmount(flow.getAmount().negate()); |
| | | flow.setOrderId(sourceOrder.getOldOrderId()); |
| | | } else { |
| | | flow.setOrderId(sourceOrder.getId()); |
| | | } |
| | | } |
| | | //更新收款状态 |
| | | if(haQk){ |
| | | sourceOrder.setStatu(Dictionary.ORDER_STATU_QK); |
| | | }else{ |
| | | sourceOrder.setStatu(Dictionary.ORDER_STATU_YFK); |
| | | |
| | | //欠款处理 |
| | | if (SysOrderFlow.PAY_METHOD_ARREARS.equals(flow.getPayMethod())) { |
| | | orderStatus = Dictionary.ORDER_STATU_QK; |
| | | sourceOrder.setArrears(flow.getAmount().doubleValue()); |
| | | } |
| | | |
| | | //统计储值卡支付 |
| | | if (SysOrderFlow.PAY_METHOD_CARD.equals(flow.getPayMethod())) { |
| | | if (flow.getCardId() != null) { |
| | | MoneyCardUse moneyCardUse = moneyCardUseDao.selectById(flow.getCardId()); |
| | | cardPayTotal += flow.getAmount().doubleValue(); |
| | | |
| | | //修改储值卡余额 |
| | | cardPaySk(moneyCardUse, sourceOrder, flow); |
| | | }else{ |
| | | throw new GlobleException("无效的储值卡支付方式"); |
| | | } |
| | | } |
| | | //统计现金支付 |
| | | if (!SysOrderFlow.PAY_METHOD_ARREARS.equals(flow.getPayMethod()) |
| | | && !SysOrderFlow.PAY_METHOD_CARD.equals(flow.getPayMethod())) { |
| | | cashPayTotal += flow.getAmount().doubleValue(); |
| | | } |
| | | |
| | | flow.setFlowNo(codeService.getFlowCode() + "-" + flowCount); |
| | | flow.setVipId(sourceOrder.getVipId()); |
| | | flow.setFlowType(flowType); |
| | | flow.setShopId(sourceOrder.getShopId()); |
| | | flow.setCompanyId(sourceOrder.getCompanyId()); |
| | | sysOrderFlowDao.insert(flow); |
| | | flowCount++; |
| | | } |
| | | |
| | | //修改订单信息 |
| | | if (Dictionary.ORDER_STATU_TK.equals(sourceOrder.getStatu())) { |
| | | orderStatus = Dictionary.ORDER_STATU_TK; |
| | | } |
| | | // 更新收款状态 |
| | | sourceOrder.setPayTime(new Date()); |
| | | sourceOrder.setStatu(orderStatus); |
| | | sourceOrder.setCardPay(cardPayTotal); |
| | | sourceOrder.setCashPay(cashPayTotal); |
| | | sysOrderDao.update(sourceOrder); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | Integer buyNum = orderItemDao.selectByGoodsId(shopGoods.getId()); |
| | | buyNum = (buyNum == null ? 0 : buyNum); |
| | | if ((buyNum + carItem.getCount()) > maxNum) { |
| | | |
| | | throw new GlobleException(shopGoods.getName() + "已超过最大销售数量,还剩【" + (maxNum - buyNum) + "】件"); |
| | | throw new GlobleException(shopGoods.getName() + "已超过最大销售数量"); |
| | | } |
| | | if ((buyNum + carItem.getCount()) == maxNum) { |
| | | if (!shopGoods.getStaus().equals(Dictionary.BUSINESS_STATE_DOWN)) { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 使用充值卡付款操作 |
| | | * |
| | | * @param sourceOrder |
| | | * @param userCard |
| | | * @param orderItem |
| | | * @param temp 设置是否扣除使用次数 true 扣除 |
| | | * @param moneyCardUse |
| | | * @param flow |
| | | */ |
| | | private void cardPaySk(MoneyCardUse moneyCardUse, SysOrder sourceOrder, |
| | | SysOrderItem orderItem) { |
| | | private void cardPaySk(MoneyCardUse moneyCardUse, SysOrder sourceOrder, SysOrderFlow flow) { |
| | | // 判断商品是否在充值卡的限制购买,判断分类 |
| | | if (!isInBangding(moneyCardUse, orderItem.getGoodsId())) { |
| | | throw new GlobleException(shoppingGoodsDao.selectById(orderItem.getGoodsId()).getName() + "不在" |
| | | + moneyCardUse.getCardName() + "优惠中"); |
| | | } |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | Double balance = moneyCardUse.getRealMoney(); |
| | | if (moneyCardUse.getGiftMoney() != null) { |
| | | balance = MoneyUtil.add(balance, moneyCardUse.getGiftMoney()); |
| | | } |
| | | // 判断金额是否足够支付 |
| | | if (balance >= orderItem.getPayMoney()) { |
| | | |
| | | MoneyCardUseFlow moneyCardUseFlow=new MoneyCardUseFlow(); |
| | | |
| | | // 余额充足先从本金中扣除 |
| | | if (moneyCardUse.getRealMoney() >= orderItem.getPayMoney()) { |
| | | double surplus = MoneyUtil.sub(moneyCardUse.getRealMoney(), orderItem.getPayMoney()); |
| | | moneyCardUse.setRealMoney(surplus); |
| | | moneyCardUseFlow.setTotal(0-orderItem.getPayMoney()); |
| | | |
| | | } else { |
| | | // 本金不够 |
| | | double surplus = MoneyUtil.sub(orderItem.getPayMoney(), moneyCardUse.getRealMoney()); |
| | | moneyCardUseFlow.setTotal(0- moneyCardUse.getRealMoney()); |
| | | // 扣除所有本金 |
| | | moneyCardUse.setRealMoney(0D); |
| | | moneyCardUse.setGiftMoney(MoneyUtil.sub(moneyCardUse.getGiftMoney(), surplus)); |
| | | // 只要是用了赠送金额购买的就视为赠送套餐 18-12-01 jyy |
| | | orderItem.setIsFree(Dictionary.FLAG_YES); |
| | | moneyCardUseFlow.setGiftMoney(0-surplus); |
| | | sourceOrder.getItems().forEach(item -> { |
| | | if (!isInBangding(moneyCardUse, item.getGoodsId())) { |
| | | throw new GlobleException(shoppingGoodsDao.selectById(item.getGoodsId()).getName() + "不在" + moneyCardUse.getCardName() + "优惠中"); |
| | | } |
| | | }); |
| | | |
| | | //设置卡项使用流水 |
| | | moneyCardUseFlow.setCarUseId(moneyCardUse.getId()); |
| | | moneyCardUseFlow.setOrderNo(sourceOrder.getOrderNo()); |
| | | moneyCardUseFlow.setVipId(sourceOrder.getVipId()); |
| | | moneyCardUseFlow.setTimes(-1); |
| | | moneyCardUseFlow.setType(MoneyCardUseFlow.USE_TYPE_CONSUMER); |
| | | moneyCardUseFlow.setCreateTime(new Date()); |
| | | moneyCardUseFlow.setOperationId(user.getSuId()); |
| | | moneyCardUseFlow.setBalance(moneyCardUse.getGiftMoney()+moneyCardUse.getRealMoney()); |
| | | moneyCardUseFlowDao.insert(moneyCardUseFlow); |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | MoneyCardUseFlow moneyCardUseFlow = new MoneyCardUseFlow(); |
| | | if (SysOrderFlow.IS_GIFT_Y.equals(flow.getIsGift())) { |
| | | if (moneyCardUse.getGiftMoney() >= flow.getAmount().doubleValue()) { |
| | | double surplus = MoneyUtil.sub(moneyCardUse.getGiftMoney(), flow.getAmount().doubleValue()); |
| | | moneyCardUse.setGiftMoney(surplus); |
| | | moneyCardUseFlow.setGiftMoney(0D - flow.getAmount().doubleValue()); |
| | | } else { |
| | | throw new GlobleException(moneyCardUse.getCardName() + "余额不足"); |
| | | } |
| | | } else { |
| | | throw new GlobleException(moneyCardUse.getCardName() + "余额不足"); |
| | | if (moneyCardUse.getRealMoney() >= flow.getAmount().doubleValue()) { |
| | | double surplus = MoneyUtil.sub(moneyCardUse.getRealMoney(), flow.getAmount().doubleValue()); |
| | | moneyCardUse.setRealMoney(surplus); |
| | | moneyCardUseFlow.setTotal(0 - flow.getAmount().doubleValue()); |
| | | } else { |
| | | throw new GlobleException(moneyCardUse.getCardName() + "余额不足"); |
| | | } |
| | | } |
| | | |
| | | // 达到使用次数后自动清空余额 |
| | | if (!moneyCardUse.getIsVipCar().equals(Dictionary.FLAG_YES_Y) |
| | | && moneyCardUse.getLastCount() <= 0) { |
| | | moneyCardUse.setIsOver(Dictionary.FLAG_YES_Y); |
| | | moneyCardUse.setLastCount(0); |
| | | moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_WX); |
| | | } |
| | | if (moneyCardUse.getRealMoney().equals(0D) && moneyCardUse.getGiftMoney().equals(0D)) { |
| | | moneyCardUse.setIsOver(Dictionary.FLAG_YES_Y); |
| | | moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_WX); |
| | | if (moneyCardUse.getIsVipCar().equals(Dictionary.FLAG_NO_N)) { |
| | | //余额为0时充值卡变为无效 |
| | | if (moneyCardUse.getRealMoney().equals(0D) && moneyCardUse.getGiftMoney().equals(0D)) { |
| | | moneyCardUse.setIsOver(Dictionary.FLAG_YES_Y); |
| | | moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_WX); |
| | | } |
| | | } |
| | | |
| | | ShoppingGoods shoppingGoods = shoppingGoodsService.findById(moneyCardUse.getGoodsId()); |
| | | Date invalidTime = shoppingGoodsService.calInvalidTime(shoppingGoods, 2, moneyCardUse.getFailTime()); |
| | | moneyCardUse.setFailTime(invalidTime); |
| | | if (shoppingGoods != null) { |
| | | Date invalidTime = shoppingGoodsService.calInvalidTime(shoppingGoods, 2, moneyCardUse.getFailTime()); |
| | | moneyCardUse.setFailTime(invalidTime); |
| | | } |
| | | // 更新充值卡信息 |
| | | moneyCardUseDao.update(moneyCardUse); |
| | | //设置卡项使用流水 |
| | | moneyCardUseFlow.setCarUseId(moneyCardUse.getId()); |
| | | moneyCardUseFlow.setOrderNo(sourceOrder.getOrderNo()); |
| | | moneyCardUseFlow.setVipId(sourceOrder.getVipId()); |
| | | moneyCardUseFlow.setTimes(-1); |
| | | moneyCardUseFlow.setType(MoneyCardUseFlow.USE_TYPE_CONSUMER); |
| | | moneyCardUseFlow.setCreateTime(new Date()); |
| | | moneyCardUseFlow.setOperationId(user.getSuId()); |
| | | moneyCardUseFlow.setBalance(moneyCardUse.getGiftMoney() + moneyCardUse.getRealMoney()); |
| | | moneyCardUseFlowDao.insert(moneyCardUseFlow); |
| | | } |
| | | |
| | | /** |
| | |
| | | // 如果购买的是充值卡 |
| | | if (sysOrderItem.getType().equals(Dictionary.SHOPPING_GOODS_TYPE_CZK)) { |
| | | |
| | | ShoppingGoods moneyCar = shoppingGoodsDao.selectById(sysOrderItem.getGoodsId()); |
| | | MoneyCardUse moneyCardUse = new MoneyCardUse(); |
| | | moneyCardUse.setVipId(sourceOrder.getVipId()); |
| | | moneyCardUse.setGiftMoney(moneyCar.getReferencePice()); |
| | | moneyCardUse.setRealMoney(moneyCar.getSealPice()); |
| | | moneyCardUse.setGoodsId(moneyCar.getId()); |
| | | moneyCardUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | moneyCardUse.setOrderItemId(sysOrderItem.getId()); |
| | | moneyCardUse.setSource(Dictionary.TAOCAN_SOURCE_GM); |
| | | moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_YX); |
| | | moneyCardUse.setCardName(moneyCar.getName()); |
| | | |
| | | if (Dictionary.FLAG_YES.equals(moneyCar.getCarIsAll())) { |
| | | moneyCardUse.setIsVipCar(Dictionary.FLAG_YES_Y); |
| | | } else { |
| | | // 非会籍卡 |
| | | moneyCardUse.setIsVipCar(Dictionary.FLAG_NO_N); |
| | | } |
| | | |
| | | // 是否为赠送 |
| | | if (sysOrderItem.getIsFree().equals(Dictionary.FLAG_YES)) { |
| | | moneyCardUse.setSource(Dictionary.TAOCAN_SOURCE_ZS); |
| | | } else { |
| | | for (int i = 0; i < sysOrderItem.getCount(); i++) { |
| | | ShoppingGoods moneyCar = shoppingGoodsDao.selectById(sysOrderItem.getGoodsId()); |
| | | MoneyCardUse moneyCardUse = new MoneyCardUse(); |
| | | moneyCardUse.setVipId(sourceOrder.getVipId()); |
| | | moneyCardUse.setGiftMoney(moneyCar.getReferencePice()); |
| | | moneyCardUse.setRealMoney(moneyCar.getSealPice()); |
| | | moneyCardUse.setGoodsId(moneyCar.getId()); |
| | | moneyCardUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | moneyCardUse.setOrderItemId(sysOrderItem.getId()); |
| | | moneyCardUse.setSource(Dictionary.TAOCAN_SOURCE_GM); |
| | | } |
| | | if (moneyCar.getCarUseCount() == null || moneyCar.getCarUseCount() == 0) { |
| | | moneyCardUse.setUseTotal(999999999); |
| | | moneyCardUse.setLastCount(999999999); |
| | | } else { |
| | | moneyCardUse.setUseTotal(moneyCar.getCarUseCount()); |
| | | moneyCardUse.setLastCount(moneyCar.getCarUseCount()); |
| | | } |
| | | moneyCardUse.setVipId(sourceOrder.getVipId()); |
| | | // if (moneyCar.getValidity() == null || moneyCar.getValidity() == 0) { |
| | | // // 设置失效时间 |
| | | // Calendar cal = Calendar.getInstance(); |
| | | // cal.set(2200, 1, 1); |
| | | // moneyCardUse.setFailTime(cal.getTime()); |
| | | // } else { |
| | | // moneyCardUse.setFailTime(DateUtil.nextNDate(new Date(), 30 * moneyCar.getValidity())); |
| | | // } |
| | | Date invalidTime = shoppingGoodsService.calInvalidTime(sysOrderItem.getShoppingGoods(), 1, null); |
| | | moneyCardUse.setFailTime(invalidTime); |
| | | moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_YX); |
| | | moneyCardUse.setCardName(moneyCar.getName()); |
| | | moneyCardUse.setIsVipCar(Dictionary.FLAG_NO_N); |
| | | moneyCardUse.setVipId(sourceOrder.getVipId()); |
| | | |
| | | moneyCardUseDao.insert(moneyCardUse); |
| | | // 是否为赠送 |
| | | if (sysOrderItem.getIsFree().equals(Dictionary.FLAG_YES)) { |
| | | moneyCardUse.setSource(Dictionary.TAOCAN_SOURCE_ZS); |
| | | } else { |
| | | moneyCardUse.setSource(Dictionary.TAOCAN_SOURCE_GM); |
| | | } |
| | | //余次处理 |
| | | if (moneyCar.getCarUseCount() == null || moneyCar.getCarUseCount() == 0) { |
| | | moneyCardUse.setUseTotal(999999999); |
| | | moneyCardUse.setLastCount(999999999); |
| | | } else { |
| | | moneyCardUse.setUseTotal(moneyCar.getCarUseCount()); |
| | | moneyCardUse.setLastCount(moneyCar.getCarUseCount()); |
| | | } |
| | | //失效时间处理 |
| | | Date invalidTime = shoppingGoodsService.calInvalidTime(sysOrderItem.getShoppingGoods(), 1, null); |
| | | moneyCardUse.setFailTime(invalidTime); |
| | | |
| | | moneyCardUseDao.insert(moneyCardUse); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void updateAfterMoney(SysOrder pageOrder) { |
| | | |
| | | SysOrder sourceOrder = sysOrderDao.selectById(pageOrder.getId()); |
| | | |
| | | boolean haQk=false; |
| | | int i = 1; |
| | | double refundTotal = 0D; |
| | | double cardPayTotal = 0D; |
| | | double cashPayTotal = 0D; |
| | | for (SysOrderFlow flow : pageOrder.getFlows()) { |
| | | flow.setFlowNo(codeService.getFlowCode() + "-" + i); |
| | | Long goodsId = pageOrder.getItems().get(0).getGoodsId(); |
| | | ShoppingGoods goods = shoppingGoodsDao.selectById(goodsId); |
| | | flow.setFlowContent(goods.getName() + "等" + pageOrder.getItems().size() + "件产品"); |
| | | |
| | | double cardPayTotal=0D; |
| | | double carshPayTotal=0D; |
| | | flow.setOrderId(pageOrder.getId()); |
| | | flow.setVipId(pageOrder.getVipId()); |
| | | flow.setFlowType(SysOrderFlow.FLOW_TYPE_REPAY); |
| | | // 若使用储值卡付款 |
| | | if (SysOrderFlow.PAY_METHOD_CARD.equals(flow.getPayMethod())) { |
| | | if (flow.getCardId() != null) { |
| | | cardPayTotal += flow.getAmount().doubleValue(); |
| | | MoneyCardUse moneyCardUse = moneyCardUseDao.selectById(flow.getCardId()); |
| | | cardPaySk(moneyCardUse, pageOrder, flow); |
| | | } |
| | | } else { |
| | | cashPayTotal += flow.getAmount().doubleValue(); |
| | | } |
| | | |
| | | |
| | | for(SysOrderItem pageItem:pageOrder.getItems()){ |
| | | SysOrderItem sourceItem=orderItemDao.selectById(pageItem.getId()); |
| | | |
| | | //结清 |
| | | if(sourceItem.getArrears() == pageItem.getPayMoney()){ |
| | | |
| | | sourceItem.setStatus(Dictionary.ORDER_STATU_YFK); |
| | | }else if(sourceItem.getArrears() > pageItem.getPayMoney()) { |
| | | //未结清 |
| | | sourceItem.setStatus(Dictionary.ORDER_STATU_QK); |
| | | haQk=true; |
| | | }else if(sourceItem.getArrears() < pageItem.getPayMoney()) { |
| | | |
| | | throw new GlobleException("支付金额不能大于欠款金额"); |
| | | |
| | | } |
| | | |
| | | //更新卡支付 |
| | | if (!pageItem.getPayMethod().equals(Dictionary.PAY_TYPE_MOENY)) { |
| | | // 查询要支付的充值卡 |
| | | MoneyCardUse moneyCardUse = moneyCardUseDao.selectById(Long.parseLong(pageItem.getPayMethod())); |
| | | // 扣除付款卡金额并添加流水 |
| | | cardPaySk(moneyCardUse, sourceOrder, pageItem); |
| | | sourceItem.setCardPay((sourceItem.getCardPay()==null?0:sourceItem.getCardPay())+pageItem.getPayMoney()); |
| | | cardPayTotal+=pageItem.getPayMoney(); |
| | | }else{ |
| | | carshPayTotal+=pageItem.getPayMoney(); |
| | | sourceItem.setCashPay((sourceItem.getCashPay()==null?0:sourceItem.getCashPay())+pageItem.getPayMoney()); |
| | | } |
| | | |
| | | //更新订单明细状态 |
| | | sourceItem.setArrears(sourceItem.getArrears()-pageItem.getPayMoney()); |
| | | |
| | | orderItemDao.update(sourceItem); |
| | | |
| | | refundTotal += flow.getAmount().doubleValue(); |
| | | flow.setShopId(sourceOrder.getShopId()); |
| | | flow.setCompanyId(sourceOrder.getCompanyId()); |
| | | sysOrderFlowDao.insert(flow); |
| | | i++; |
| | | } |
| | | |
| | | boolean haQk = false; |
| | | |
| | | if (refundTotal == pageOrder.getArrears()) { |
| | | haQk = true; |
| | | } |
| | | |
| | | //更新收款状态 |
| | | if(haQk){ |
| | | sourceOrder.setStatu(Dictionary.ORDER_STATU_QK); |
| | | }else{ |
| | | if (haQk) { |
| | | sourceOrder.setStatu(Dictionary.ORDER_STATU_YFK); |
| | | } else { |
| | | sourceOrder.setStatu(Dictionary.ORDER_STATU_QK); |
| | | } |
| | | |
| | | sourceOrder.setArrears(sourceOrder.getArrears()-carshPayTotal-cardPayTotal); |
| | | sourceOrder.setCardPay(sourceOrder.getCardPay()+cardPayTotal); |
| | | sourceOrder.setCashPay(sourceOrder.getCashPay()+carshPayTotal); |
| | | sourceOrder.setArrears(sourceOrder.getArrears() - refundTotal); |
| | | sourceOrder.setCardPay(sourceOrder.getCardPay() + cardPayTotal); |
| | | sourceOrder.setCashPay(sourceOrder.getCashPay() + cashPayTotal); |
| | | sysOrderDao.update(sourceOrder); |
| | | |
| | | // 设置业绩 |
| | | achieveNewService.addAchaeveByOrder(pageOrder); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | ShoppingGoods sysGoods = shoppingGoodsDao.selectById(outStoreItem.getSkuId()); |
| | | if (sysGoods != null) { |
| | | throw new GlobleException("出库失败:【" + sysGoods.getName() + "库存不足】"); |
| | | |
| | | } else { |
| | | throw new GlobleException("出库失败没有找到出库产品"); |
| | | } |
| | |
| | | //综合卡中包含的项目 |
| | | List<ShoppingGoodsAssemble> assembleList = shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(sysOrderItem.getGoodsId(), ShoppingGoods.SHOPPING_GOODS_TYPE_XM); |
| | | assembleList.forEach(item -> { |
| | | createProjuseByAssemble(order, sysOrderItem, item, null); |
| | | //TODO 补综合卡逻辑 |
| | | createProjuseByAssemble(order, sysOrderItem, item, null, null); |
| | | }); |
| | | |
| | | //处理综合卡中包含的套餐 |
| | |
| | | * 通过组合关系创建用户项目余次 |
| | | */ |
| | | private SysProjUse createProjuseByAssemble(SysOrder order, SysOrderItem sysOrderItem, |
| | | ShoppingGoodsAssemble goodsAssemble, Long taocanId) { |
| | | ShoppingGoodsAssemble goodsAssemble, Long taocanId, Date failTime) { |
| | | //计算折扣 |
| | | Double zk=sysOrderItem.getZkPrice()/sysOrderItem.getPrice(); |
| | | Double zk = sysOrderItem.getZkPrice() / sysOrderItem.getPrice(); |
| | | |
| | | SysProjUse puse = new SysProjUse(); |
| | | puse.setIsOver(Dictionary.DELETED_N); |
| | |
| | | puse.setTaocanId(taocanId); |
| | | puse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM); |
| | | if (taocanId == null) { |
| | | puse.setPrice(goodsAssemble.getShoppingGoods().getPrice() * zk ); |
| | | puse.setPrice(goodsAssemble.getShoppingGoods().getPrice() * zk); |
| | | } else { |
| | | puse.setPrice(goodsAssemble.getPrice() * zk ); |
| | | puse.setPrice(goodsAssemble.getPrice() * zk); |
| | | } |
| | | puse.setBalance(MoneyUtil.mul(puse.getPrice(), Double.valueOf(puse.getSurplusCount()))); |
| | | // 赠送和打折后金额为0的都视为赠送项目 |
| | |
| | | } else { |
| | | puse.setSource(Dictionary.TAOCAN_SOURCE_ZS); |
| | | } |
| | | // 设置失效时间 |
| | | Calendar cal = Calendar.getInstance(); |
| | | cal.set(2200, 1, 1); |
| | | puse.setFailTime(cal.getTime()); |
| | | puse.setFailTime(failTime); |
| | | sysProjUseDao.insert(puse); |
| | | return puse; |
| | | } |
| | |
| | | taocanProjUse.setFailTime(invalidTime); |
| | | sysProjUseDao.insert(taocanProjUse); |
| | | //计划次数 |
| | | int surplusCount=0; |
| | | int surplusCount = 0; |
| | | //总余额 |
| | | Double sumBanance = 0D; |
| | | //创建套餐绑定的项目 |
| | | List<ShoppingGoodsAssemble> assembleList = shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(projId, ShoppingGoods.SHOPPING_GOODS_TYPE_XM); |
| | | for (ShoppingGoodsAssemble assemble : assembleList) { |
| | | SysProjUse tempUse = createProjuseByAssemble(order, sysOrderItem, assemble, taocanProjUse.getId()); |
| | | SysProjUse tempUse = createProjuseByAssemble(order, sysOrderItem, assemble, taocanProjUse.getId(),taocanProjUse.getFailTime()); |
| | | sumBanance += tempUse.getBalance(); |
| | | surplusCount+=tempUse.getSurplusCount(); |
| | | surplusCount += tempUse.getSurplusCount(); |
| | | } |
| | | if(Dictionary.FLAG_NO_N.equals(taocanShoppingGoods.getIsCourse())){ |
| | | if (Dictionary.FLAG_NO_N.equals(taocanShoppingGoods.getIsCourse())) { |
| | | //固定套餐,剩余次数等于绑定项目的次数 |
| | | taocanProjUse.setSurplusCount(surplusCount); |
| | | }else{ |
| | | } else { |
| | | //任选套餐剩余次数等于最大使用次数 |
| | | taocanProjUse.setSurplusCount(taocanShoppingGoods.getCarUseCount()); |
| | | } |
| | |
| | | puse.setVipId(order.getVipId()); |
| | | puse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | puse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM); |
| | | puse.setBalance(MoneyUtil.add(sysOrderItem.getCardPay(), sysOrderItem.getCashPay())); |
| | | puse.setBalance(sysOrderItem.getZkPrice()); |
| | | puse.setPrice(sysOrderItem.getZkPrice()); |
| | | puse.setProjName(sysOrderItem.getShoppingGoods().getName()); |
| | | // 赠送和打折后金额为0的都视为赠送项目 |
| | |
| | | |
| | | /** |
| | | * 会员卡充值 |
| | | * |
| | | * @param czVo |
| | | */ |
| | | @Override |
| | |
| | | public SysOrder updateAddCardMoney(CzXkVo czVo) { |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | SysVipInfo vip = (SysVipInfo) WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER); |
| | | czVo.setVipId(vip.getId()); |
| | | // SysVipInfo vip = (SysVipInfo) WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER); |
| | | // czVo.setVipId(vip.getId()); |
| | | |
| | | //更新会员会员卡金额 |
| | | MoneyCardUse cardUser = moneyCardUseDao.selectVipCard(vip.getId()); |
| | | MoneyCardUse cardUser = moneyCardUseDao.selectVipCard(czVo.getVipId()); |
| | | cardUser.setRealMoney(MoneyUtil.add(cardUser.getRealMoney(), czVo.getBjmoney())); |
| | | cardUser.setGiftMoney(MoneyUtil.add(cardUser.getGiftMoney(), czVo.getGiftMoney())); |
| | | moneyCardUseDao.update(cardUser); |
| | |
| | | order.setStaffId(user.getSuId()); |
| | | order.setIsCross(2 + ""); |
| | | order.setStatu(Dictionary.ORDER_STATU_YFK); |
| | | order.setCompanyId(user.getCompanyId()); |
| | | sysOrderDao.insert(order); |
| | | |
| | | SysOrderItem orderItem = new SysOrderItem(); |
| | | orderItem.setOrderId(order.getId()); |
| | | orderItem.setOrderNo(order.getOrderNo()); |
| | | orderItem.setArrears(0D); |
| | | ShoppingGoods shoppingGoods= shoppingGoodsDao.selectVipCzGoods(); |
| | | ShoppingGoods shoppingGoods = shoppingGoodsDao.selectVipCzGoods(); |
| | | orderItem.setGoodsId(shoppingGoods.getId()); |
| | | orderItem.setPayMethod(Dictionary.PAY_TYPE_MOENY); |
| | | orderItem.setCashPay(czVo.getBjmoney()); |
| | |
| | | orderItem.setStatus(Dictionary.ORDER_STATU_YFK); |
| | | orderItem.setAchaeveList(czVo.getAchaeveList()); |
| | | orderItemDao.insert(orderItem); |
| | | List<SysOrderItem> items = new ArrayList<>(); |
| | | items.add(orderItem); |
| | | order.setItems(items); |
| | | |
| | | |
| | | //设置卡项使用流水 |
| | | MoneyCardUseFlow moneyCardUseFlow=new MoneyCardUseFlow(); |
| | | MoneyCardUseFlow moneyCardUseFlow = new MoneyCardUseFlow(); |
| | | moneyCardUseFlow.setTotal(czVo.getBjmoney()); |
| | | moneyCardUseFlow.setGiftMoney(czVo.getGiftMoney()); |
| | | moneyCardUseFlow.setCarUseId(czVo.getCardId()); |
| | |
| | | moneyCardUseFlow.setOrderNo(order.getOrderNo()); |
| | | moneyCardUseFlow.setCreateTime(new Date()); |
| | | moneyCardUseFlow.setOperationId(user.getSuId()); |
| | | moneyCardUseFlow.setBalance(cardUser.getGiftMoney()+cardUser.getRealMoney()); |
| | | moneyCardUseFlow.setBalance(cardUser.getGiftMoney() + cardUser.getRealMoney()); |
| | | moneyCardUseFlowDao.insert(moneyCardUseFlow); |
| | | |
| | | |
| | | order.setFlows(czVo.getFlows()); |
| | | changeOrderStatu(order); |
| | | // 添加员工业绩 |
| | | achieveNewService.addAchaeveByOrder(order); |
| | | return order; |
| | |
| | | public SysOrder findSysOrderTjByVipId(Long vipId) { |
| | | return sysOrderDao.selectVipOrderInfoTotal(vipId); |
| | | } |
| | | |
| | | @Override |
| | | public List<OrderDetailVo> findApiOrderListInPage(OrderListDto orderListDto, PaginationVO pageVo) { |
| | | return sysOrderDao.selectApiOrderListInPage(orderListDto, pageVo); |
| | | } |
| | | |
| | | @Override |
| | | public int findApiOrderListTotal(OrderListDto orderListDto) { |
| | | return sysOrderDao.selectApiOrderListTotal(orderListDto); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetailVo findApiOrderDetailByOrderId(Long orderId) { |
| | | OrderDetailVo orderDetail = sysOrderDao.selectApiOrderDetailById(orderId); |
| | | |
| | | if (orderDetail == null) { |
| | | throw new GlobleException("该订单不存在"); |
| | | } |
| | | |
| | | List<OrderDetailItemVo> items = orderItemDao.selectApiOrderDetailItemsByOrderId(orderId); |
| | | if (CollectionUtils.isNotEmpty(items)) { |
| | | for (OrderDetailItemVo item : items) { |
| | | List<OrderDetailAchieveItemVo> achieveItems = achieveNewDao.selectApiOrderItemAchieve(item.getId()); |
| | | item.setAchieves(achieveItems); |
| | | } |
| | | } |
| | | |
| | | orderDetail.setItems(items); |
| | | return orderDetail; |
| | | } |
| | | |
| | | @Override |
| | | public List<RankingVo> findApiShopAchieveRanking(SysOrder sysOrder) { |
| | | return sysOrderDao.selectShopAchieveRanking(sysOrder); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void refundOrderMoney(SysOrder pageOrder) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | // 修改订单状态 |
| | | changeOrderStatu(pageOrder); |
| | | |
| | | List<SysOrderItem> returnItems = new ArrayList<>(); |
| | | for (SysOrderItem item : pageOrder.getItems()) { |
| | | |
| | | SysProjUse queryProjUse = new SysProjUse(); |
| | | queryProjUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | queryProjUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | queryProjUse.setOrderItemId(item.getOldItemId()); |
| | | // 修改项目信息 |
| | | if (Dictionary.SHOPPING_GOODS_TYPE_XM.equals(item.getType()) || Dictionary.SHOPPING_GOODS_TYPE_JJCP.equals(item.getType())) { |
| | | |
| | | if (Dictionary.SHOPPING_GOODS_TYPE_JJCP.equals(item.getType())) { |
| | | if (Dictionary.FLAG_YES_Y.equals(item.getIsReturnStore())) { |
| | | returnItems.add(item); |
| | | } |
| | | } else { |
| | | SysProjUse sysProjUse = sysProjUseDao.selectByModel(queryProjUse).get(0); |
| | | |
| | | int sub = sysProjUse.getSurplusCount() - item.getCount(); |
| | | sysProjUse.setSurplusCount(sub); |
| | | if (sub <= 0) { |
| | | sysProjUse.setIsOver(Dictionary.FLAG_YES_Y); |
| | | sysProjUse.setStatus(Dictionary.TAOCAN_STATUS_WX); |
| | | } |
| | | sysProjUseDao.update(sysProjUse); |
| | | |
| | | SysProjUseFlow sysProjUseFlow = SysProjUseMapper.INSTANCE.projUseToFlow(sysProjUse); |
| | | sysProjUseFlow.setOptionType("退款修改"); |
| | | sysProjUseFlow.setId(null); |
| | | sysProjUseFlow.setUpdateBy(user.getSuName()); |
| | | sysProjUseFlow.setCreateBy(user.getSuName()); |
| | | sysProjUseDao.insertFlow(sysProjUseFlow); |
| | | } |
| | | } |
| | | |
| | | if (Dictionary.SHOPPING_GOODS_TYPE_TC.equals(item.getType())) { |
| | | queryProjUse.setTaocanId(-1L); |
| | | List<SysProjUse> sysProjUses = sysProjUseDao.selectByModel(queryProjUse); |
| | | if (item.getCount() > sysProjUses.size()) { |
| | | throw new GlobleException("数据异常"); |
| | | } |
| | | |
| | | for (int i = 0; i < item.getCount(); i++) { |
| | | SysProjUse sysProjUse = sysProjUses.get(i); |
| | | sysProjUse.setIsOver(Dictionary.FLAG_YES_Y); |
| | | sysProjUse.setStatus(Dictionary.TAOCAN_STATUS_WX); |
| | | |
| | | sysProjUseDao.update(sysProjUse); |
| | | SysProjUseFlow sysProjUseFlow = SysProjUseMapper.INSTANCE.projUseToFlow(sysProjUse); |
| | | sysProjUseFlow.setOptionType("退款修改"); |
| | | sysProjUseFlow.setId(null); |
| | | sysProjUseFlow.setUpdateBy(user.getSuName()); |
| | | sysProjUseFlow.setCreateBy(user.getSuName()); |
| | | sysProjUseDao.insertFlow(sysProjUseFlow); |
| | | } |
| | | } |
| | | |
| | | if (Dictionary.SHOPPING_GOODS_TYPE_CZK.equals(item.getType())) { |
| | | MoneyCardUse queryCardUse = new MoneyCardUse(); |
| | | queryCardUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | queryCardUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | queryCardUse.setOrderItemId(item.getOldItemId()); |
| | | |
| | | List<MoneyCardUse> moneyCardUses = moneyCardUseDao.selectByModel(queryCardUse); |
| | | for (int i = 0; i < item.getCount(); i++) { |
| | | MoneyCardUse moneyCardUse = moneyCardUses.get(i); |
| | | moneyCardUse.setIsOver(Dictionary.FLAG_YES_Y); |
| | | moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_WX); |
| | | moneyCardUseDao.update(moneyCardUse); |
| | | } |
| | | } |
| | | |
| | | // TODO 综合卡退款 |
| | | if (Dictionary.SHOPPING_GOODS_TYPE_ZHK.equals(item.getType())) { |
| | | |
| | | } |
| | | |
| | | |
| | | ShoppingGoods goods = shoppingGoodsDao.selectById(item.getGoodsId()); |
| | | goods.setRealSealCount(goods.getRealSealCount() - item.getCount()); |
| | | shoppingGoodsDao.update(goods); |
| | | } |
| | | |
| | | // 家居产品退库存 |
| | | if (CollectionUtils.isNotEmpty(returnItems)) { |
| | | refundInstore(returnItems); |
| | | } |
| | | |
| | | // 设置业绩 |
| | | achieveNewService.addAchaeveByOrder(pageOrder); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 退款入库 |
| | | */ |
| | | private void refundInstore(@NotEmpty List<SysOrderItem> items) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | SysSupplierInfo supplierInfo = new SysSupplierInfo(); |
| | | supplierInfo.setShopId(user.getShopId()); |
| | | supplierInfo = sysSupplierInfoDao.selectByModel(supplierInfo).get(0); |
| | | |
| | | Warehouse warehouse = warehouseDao.findShopWarehouse(user.getShopId()).get(0); |
| | | SysInstoreInfo instoreInfo = new SysInstoreInfo(); |
| | | instoreInfo.setInstoreType(SysInstoreInfo.INSTORE_TYPE_RETURN); |
| | | instoreInfo.setInstoreDate(new Date()); |
| | | instoreInfo.setSupplierId(supplierInfo.getId().toString()); |
| | | instoreInfo.setStoreId(warehouse.getId()); |
| | | instoreInfo.setCheckStatus(Dictionary.CHECK_STATUS_DSH); |
| | | // 设置入库单编号 |
| | | instoreInfo.setInstoreId(DateUtil.getTimeMark()); |
| | | instoreInfo.setShopId(user.getShopId()); |
| | | instoreInfo.setCompanyId(user.getCompanyId()); |
| | | sysInstoreInfoDao.insert(instoreInfo); |
| | | |
| | | Double total = 0.0; |
| | | List<SysInstoreDetail> instoreDetails = new ArrayList<>(); |
| | | for (SysOrderItem item : items) { |
| | | ShoppingGoods goods = shoppingGoodsDao.selectById(item.getGoodsId()); |
| | | SysInstoreDetail sysInstoreDetail = new SysInstoreDetail(); |
| | | sysInstoreDetail.setAmount(item.getCount().doubleValue()); |
| | | sysInstoreDetail.setPrice(item.getZkPrice()); |
| | | sysInstoreDetail.setSkuId(goods.getId()); |
| | | |
| | | total = MoneyUtil.add(MoneyUtil.mul(Double.parseDouble(sysInstoreDetail.getAmount() + ""), sysInstoreDetail.getPrice()), total); |
| | | sysInstoreDetail.setInstoreId(instoreInfo.getId()); |
| | | // 设置小计 |
| | | sysInstoreDetail.setPriceTotal(MoneyUtil.mul(Double.parseDouble(sysInstoreDetail.getAmount() + ""), sysInstoreDetail.getPrice())); |
| | | instoreDetails.add(sysInstoreDetail); |
| | | |
| | | } |
| | | instoreInfo.setSumall(total); |
| | | sysInstoreInfoDao.update(instoreInfo); |
| | | sysInstoreDetailDao.batchInsert(instoreDetails); |
| | | |
| | | sysInstoreInfoService.check(instoreInfo); |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.hive.service.imp; |
| | | |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.pojo.VerifyResult; |
| | | import com.matrix.core.tools.*; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.ServiceOrderListDto; |
| | | import com.matrix.system.app.vo.ServiceOrderListVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.SysUsersDao; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.plugin.util.MoneyUtil; |
| | | import com.matrix.system.hive.pojo.MyBeauticianCount; |
| | | import com.matrix.system.hive.service.*; |
| | | import com.matrix.system.shopXcx.mqTask.MQTaskRouting; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgParam; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | @Resource |
| | | private ShoppingGoodsService shoppingGoodsService; |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @Value("${evn}") |
| | | private String evn; |
| | | |
| | | |
| | | /** |
| | | * 新增服务单 jyy |
| | | * |
| | |
| | | public SysProjServices addSysProjServices(SysProjServices sysProjServices) throws GlobleException { |
| | | |
| | | //创建服务单 |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysProjServices.setCreateStaffId(user.getSuId()); |
| | | sysProjServices.setShopId(user.getShopId()); |
| | | sysProjServices.setCompanyId(user.getCompanyId()); |
| | | if(WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY)!=null){ |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysProjServices.setCreateStaffId(user.getSuId()); |
| | | sysProjServices.setShopId(user.getShopId()); |
| | | sysProjServices.setCompanyId(user.getCompanyId()); |
| | | } |
| | | |
| | | |
| | | sysProjServices.setCreateTime(new Date()); |
| | | // 设置状态为待预约 |
| | | sysProjServices.setState(Dictionary.SERVICE_STATU_DYY); |
| | | sysProjServices.setServiceNo(codeService.getServiceOrderCode()); |
| | | Double hkPrice = 0.0; |
| | | int i = sysProjServicesDao.insert(sysProjServices); |
| | |
| | | //插入订单明细 |
| | | sysBeauticianState.setProjId(sysProjInfo.getId()); |
| | | sysBeauticianState.setServicesId(sysProjServices.getId()); |
| | | sysBeauticianState.setShopId(user.getShopId()); |
| | | sysBeauticianState.setShopId(sysProjServices.getShopId()); |
| | | sysBeauticianState.setState(Dictionary.BEATUI_STATE_DYY); |
| | | beauticianStateDao.insert(sysBeauticianState); |
| | | } |
| | |
| | | |
| | | |
| | | // 设置成功状态 |
| | | projServices.setState(Dictionary.SERVICE_STATU_YYCG); |
| | | projServices.setState(Dictionary.SERVICE_STATU_XPL); |
| | | // 判断当前门店是否有历史美疗师 |
| | | LastestWorkBeatuistaff lastWorkStaff = new LastestWorkBeatuistaff(); |
| | | lastWorkStaff.setShopId(checkProjServices.getShopId()); |
| | |
| | | if (!projServices.getState().equals(Dictionary.SERVICE_STATU_FWWC)) { |
| | | throw new GlobleException("该服务单状态为" + projServices.getState() + ",不可以进行当前操作!"); |
| | | } else { |
| | | |
| | | projServices.setState(Dictionary.SERVICE_STATU_FFJS); |
| | | projServices.setConsumeTime(new Date()); |
| | | return sysProjServicesDao.update(projServices); |
| | | int result=sysProjServicesDao.update(projServices); |
| | | achieveNewService.addAchieveByServiceOrder(projServices); |
| | | |
| | | //发送微信公众号提醒 |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(projServices.getCompanyId(),UniformMsgParam.GZH_FWWC); |
| | | uniformMsgParam.put("serviceId",projServices.getId()); |
| | | rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | |
| | | return result; |
| | | } |
| | | } |
| | | |
| | |
| | | @Override |
| | | public int modifyPLProjServices(SysProjServices projServicesVo) throws GlobleException { |
| | | SysProjServices projServices = sysProjServicesDao.selectById(projServicesVo.getId()); |
| | | |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | if (!projServices.getState().equals(Dictionary.SERVICE_STATU_XPL)) { |
| | | throw new GlobleException("该服务单状态为" + projServices.getState() + ",不可以进行当前操作!"); |
| | | } |
| | |
| | | if(projServices.getDevisionId()!=null){ |
| | | outStore.setStaffId(projServices.getDevisionId()); |
| | | }else{ |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | outStore.setStaffId(sysUsers.getSuId()); |
| | | } |
| | | outStore.setServiceId(projServices.getId()); |
| | |
| | | double sum = stores.stream().mapToDouble(item2 -> item2.getStoreTotal()).sum(); |
| | | Double needAmount = MoneyUtil.div(item.getAmount(), Double.valueOf(shoppingGoods.getVolume())); |
| | | if (sum < needAmount) { |
| | | throw new GlobleException("出库失败:【" + shoppingGoods.getName() + "库存不足】"); |
| | | throw new GlobleException("出库失败:【" + shoppingGoods.getName()+"-"+shoppingGoods.getCode()+ "库存不足】"); |
| | | } |
| | | //循环获取所有批次产品,并扣减库存 |
| | | for (SysStoreInfo storeInfo : stores) { |
| | |
| | | sysOutStoreItem.setStoreId(storeInfo.getId()); |
| | | sysOutStoreItem.setAmount(oldStoreTotal - storeInfo.getStoreTotal()); |
| | | realOutStoreItemList.add(sysOutStoreItem); |
| | | |
| | | |
| | | storeInfoDao.update(storeInfo); |
| | | //扣除后剩余库存大于0则跳出扣除,否则剩余数量的负数的绝对值就是再次扣减的数量 |
| | | if (surplus > 0) { |
| | |
| | | LogUtil.debug("未选择配料跳过sku={},amount={}", item.getSkuId(), item.getAmount()); |
| | | } |
| | | } |
| | | |
| | | sysOutStoreItemDao.batchInsert(realOutStoreItemList); |
| | | |
| | | } |
| | | |
| | | // 设置服务单状态 |
| | | projServices.setState(Dictionary.SERVICE_STATU_PLWC); |
| | | // 设置服务单操作流水 |
| | | // TODO 本功能待完善记录最新的排班员工 |
| | | /* List<LastestWorkBeatuistaff> lastList = LastestWorkBeatuistaffDao.selectByModel(null); |
| | | LastestWorkBeatuistaff lastWork = new LastestWorkBeatuistaff(); |
| | | if (lastList.size() > 0) { |
| | | lastWork.setChangeDate(new Date()); |
| | | lastWork.setStaffId(projServices.getBeauticianId()); |
| | | LastestWorkBeatuistaffDao.insert(lastWork); |
| | | } else { |
| | | if(projServices.getDevisionId()==null){ |
| | | //如果没有设置配料师则默认为操作配料的人为配料师 |
| | | projServices.setDevisionId(sysUsers.getSuId()); |
| | | |
| | | //TODO 有bug集合为零了 |
| | | LastestWorkBeatuistaff modifyObj = lastList.get(0); |
| | | modifyObj.setChangeDate(new Date()); |
| | | modifyObj.setStaffId(projServices.getBeauticianId()); |
| | | LastestWorkBeatuistaffDao.update(modifyObj); |
| | | }*/ |
| | | |
| | | } |
| | | return sysProjServicesDao.update(projServices); |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<ServiceOrderListVo> findApiServiceOrderListInPage(ServiceOrderListDto serviceOrderListDto, PaginationVO pageVo) { |
| | | return sysProjServicesDao.selectApiServiceOrderListInPage(serviceOrderListDto, pageVo); |
| | | } |
| | | |
| | | @Override |
| | | public int findApiServiceOrderListTotal(ServiceOrderListDto serviceOrderListDto) { |
| | | return sysProjServicesDao.selectApiServiceOrderListTotal(serviceOrderListDto); |
| | | } |
| | | } |
| | |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.plugin.util.MoneyUtil; |
| | | import com.matrix.system.hive.service.SysProjUseService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.xml.crypto.Data; |
| | | import java.sql.Timestamp; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | |
| | | @Override |
| | | public int modify(SysProjUse sysProjUse) { |
| | | //插入套餐项目操作记录 |
| | | |
| | | |
| | | |
| | | return sysProjUseDao.update(sysProjUse); |
| | | |
| | |
| | | return i; |
| | | } |
| | | |
| | | /** |
| | | * cardUser暂时没有用到 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int returnMoneyTc(SysProjUse sysProjUse, MoneyCardUse cardUse, Long moneyCardUseId) { |
| | | //充值记录 |
| | | //SysRechargeFlow flow=new SysRechargeFlow(); |
| | | |
| | | // 计算出套餐所有项目的剩余次数的钱 |
| | | getTotalMoney(sysProjUse, cardUse, moneyCardUseId); |
| | | //3、套餐下的项目状态改为退款 |
| | | sysProjUse.setStatus(Dictionary.TAOCAN_STATUS_TK); |
| | | int j = sysProjUseDao.updateProjStatus(sysProjUse); |
| | | |
| | | return j; |
| | | } |
| | | |
| | | |
| | | /*********************以下为项目使用情况操作***********************/ |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 退款 |
| | | * |
| | | * @param sysProjUse |
| | | * @return |
| | | */ |
| | | public int returnMoneyProj(SysProjUse sysProjUse, MoneyCardUse cardUse, Long moneyCardUseId) { |
| | | int i = 0; |
| | | sysProjUse = sysProjUseDao.selectById(sysProjUse.getId()); |
| | | //判断套餐是否存在欠款 |
| | | checkOrderStatu(sysProjUse); |
| | | if (!(sysProjUse.getStatus().equals(Dictionary.TAOCAN_STATUS_YX))) { |
| | | throw new GlobleException("不是有效项目"); |
| | | } |
| | | if (sysProjUse.getSource().equals(Dictionary.TAOCAN_SOURCE_ZR)) { |
| | | throw new GlobleException("转让的项目不能退款"); |
| | | } |
| | | if (sysProjUse.getSource().equals(Dictionary.TAOCAN_SOURCE_ZS)) { |
| | | throw new GlobleException("赠送的项目不能退款"); |
| | | } |
| | | StringBuilder content = new StringBuilder(); |
| | | ShoppingGoodsAssemble shoppingGoodsAssemble = shoppingGoodsAssembleDao.selectById(sysProjUse.getAssembleId()); |
| | | ShoppingGoods shoppingGoods = shoppingGoodsDao.selectById(shoppingGoodsAssemble.getShoppingGoodsId()); |
| | | content.append(shoppingGoods + "退款"); |
| | | if (cardUse != null) { |
| | | // 1、金额退到该用户的有效会籍卡中 |
| | | MoneyCardUse upCard = moneyCardUseDao.selectById(cardUse.getId()); |
| | | upCard.setRealMoney(upCard.getRealMoney() + sysProjUse.getBalance()); |
| | | ; |
| | | moneyCardUseDao.update(upCard); |
| | | |
| | | content.append("到会籍卡(" + upCard.getCardName() + ")" + sysProjUse.getBalance() + "元") |
| | | .append(",余次:" + upCard.getLastCountName()) |
| | | .append(",本金余额:" + upCard.getRealMoney()) |
| | | .append(",有效期:" + DateUtil.dateToString(upCard.getFailTime(), DateUtil.DATE_FORMAT_MM)) |
| | | .append(",是否赠送:" + upCard.getSourceName()); |
| | | } else { |
| | | content.append("现金" + sysProjUse.getBalance() + "元"); |
| | | } |
| | | |
| | | sysProjUse.setStatus(Dictionary.TAOCAN_STATUS_TK); |
| | | return sysProjUseDao.update(sysProjUse); |
| | | } |
| | | |
| | | /** |
| | | * 设置为有效套餐 |
| | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "操作成功"); |
| | | } |
| | | |
| | | /** |
| | | * 退款项目 |
| | | */ |
| | | @Override |
| | | public double getTotalMoneyProj(SysProjUse sysProjUse) { |
| | | sysProjUse = sysProjUseDao.selectById(sysProjUse.getId()); |
| | | //判断套餐是否存在欠款 |
| | | checkOrderStatu(sysProjUse); |
| | | if (!(sysProjUse.getStatus().equals(Dictionary.TAOCAN_STATUS_YX))) { |
| | | throw new GlobleException("不是有效项目"); |
| | | } |
| | | if (sysProjUse.getSource().equals(Dictionary.TAOCAN_SOURCE_ZR)) { |
| | | throw new GlobleException("转让的项目不能退款"); |
| | | } |
| | | if (sysProjUse.getSource().contains(Dictionary.TAOCAN_SOURCE_ZS)) { |
| | | throw new GlobleException("赠送的项目不能退款"); |
| | | } |
| | | return sysProjUse.getBalance(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<SysProjUse> selectTaocanProjUse(Long taocanId) { |
| | | public List<SysProjUse> selectTaocanProjUse(Long taocanId, String status) { |
| | | SysProjUse projUse = new SysProjUse(); |
| | | projUse.setTaocanId(taocanId); |
| | | projUse.setStatus(status); |
| | | return sysProjUseDao.selectByModel(projUse); |
| | | } |
| | | } |
| | |
| | | import com.matrix.core.tools.*; |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | | import com.matrix.system.app.dto.AddVipDto; |
| | | import com.matrix.system.app.dto.ModifyVipDto; |
| | | import com.matrix.system.app.dto.VipInfoListDto; |
| | | import com.matrix.system.app.vo.VipInfoDetailVo; |
| | | import com.matrix.system.app.vo.VipInfoListVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.ServiceUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.constance.TableMapping; |
| | | import com.matrix.system.hive.bean.MoneyCardUse; |
| | | import com.matrix.system.hive.bean.MyBeatician; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.bean.VipAnswer; |
| | | import com.matrix.system.hive.dao.MoneyCardUseDao; |
| | | import com.matrix.system.hive.dao.MyBeaticianDao; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.hive.dao.VipAnswerDao; |
| | | 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 com.matrix.system.hive.pojo.VipInfoVo; |
| | | import com.matrix.system.hive.service.SysVipInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | 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.*; |
| | | |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private MoneyCardUseDao moneyCardUseDao; |
| | | |
| | | @Autowired |
| | | private SysVipLabelDao sysVipLabelDao; |
| | | |
| | | @Value("${default.vip.photo.woman}") |
| | | String defaultWoman; |
| | | |
| | | @Value("${default.vip.photo.man}") |
| | | String defaultMan; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 新增会员储值卡 |
| | | * @param vipId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int addVipDefaultCard(Long vipId){ |
| | | public MoneyCardUse addVipDefaultCard(Long vipId){ |
| | | MoneyCardUse defaultCardUse=new MoneyCardUse(); |
| | | defaultCardUse.setVipId(vipId); |
| | | defaultCardUse.setCardName("储值卡"); |
| | |
| | | defaultCardUse.setGiftMoney(0D); |
| | | defaultCardUse.setSource("-"); |
| | | defaultCardUse.setStatus(Dictionary.MONEYCARD_STATUS_YX); |
| | | return moneyCardUseDao.insert(defaultCardUse); |
| | | moneyCardUseDao.insert(defaultCardUse); |
| | | return defaultCardUse; |
| | | |
| | | } |
| | | |
| | |
| | | sysVipInfo.setPointAll(0); |
| | | sysVipInfo.setIsDeal(SysVipInfo.UNDEAL_VIP); |
| | | sysVipInfo.setZjm(StringUtils.toHanyuPinyin(sysVipInfo.getVipName())+","+StringUtils.toHeadWordHanyuPinyin(sysVipInfo.getVipName())); |
| | | if(sysVipInfo.getSex().equals(Dictionary.SEX_MAN)){ |
| | | sysVipInfo.setPhoto(defaultMan); |
| | | }else{ |
| | | sysVipInfo.setPhoto(defaultWoman); |
| | | } |
| | | int i=sysVipInfoDao.insert(sysVipInfo); |
| | | modifyVipWithOtherInfo(sysVipInfo); |
| | | //创建用户默认储值卡 |
| | |
| | | |
| | | @Override |
| | | public List<SysVipInfo> findByVipNoOrTel(String key) { |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | return sysVipInfoDao.selectByVipNoOrTel(key, users.getShopId()); |
| | | return sysVipInfoDao.selectByVipNoOrTel(key); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<SysVipInfo> findUserByKey(String keyWord) { |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | return sysVipInfoDao.selectUserByKey(keyWord, users.getShopId()); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | return sysVipInfoDao.selectUserByKey(keyWord,user.getCompanyId()); |
| | | } |
| | | |
| | | |
| | |
| | | SysUsers users = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysVipInfo.setCompanyId(users.getCompanyId()); |
| | | sysVipInfo.setShopId(users.getShopId()); |
| | | if(sysVipInfo.getSex().equals(Dictionary.SEX_MAN)){ |
| | | sysVipInfo.setPhoto(defaultMan); |
| | | }else{ |
| | | sysVipInfo.setPhoto(defaultWoman); |
| | | } |
| | | int i=sysVipInfoDao.insert(sysVipInfo); |
| | | modifyVipWithOtherInfo(sysVipInfo); |
| | | return i; |
| | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public List<VipInfoListVo> findVipAddressBook(VipInfoListDto vipInfoListDto) { |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | vipInfoListDto.setShopId(sysUsers.getShopId()); |
| | | } |
| | | QueryUtil.setQueryLimitCom(vipInfoListDto); |
| | | return sysVipInfoDao.selectVipAddressBookByList(vipInfoListDto); |
| | | } |
| | | |
| | | @Override |
| | | public com.matrix.system.app.vo.VipInfoVo findApiVipInfoById(Long id) { |
| | | return sysVipInfoDao.selectVipInfoById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int apiAddVip(AddVipDto addVipDto) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | if (StringUtils.isNotBlank(addVipDto.getVipNo())) { |
| | | if (serviceUtil.addCheckRepeatTowColumn(TableMapping.SYS_VIP_INFO, "VIP_NO", addVipDto.getVipNo(), |
| | | "company_id", user.getCompanyId())) { |
| | | throw new GlobleException("编号已存在!"); |
| | | } |
| | | } |
| | | |
| | | if (serviceUtil.addCheckRepeatTowColumn(TableMapping.SYS_VIP_INFO, "PHONE", addVipDto.getPhone(), |
| | | "company_id",user.getCompanyId() )) { |
| | | throw new GlobleException("手机已被注册!"); |
| | | } |
| | | |
| | | SysVipInfo vipInfo = new SysVipInfo(); |
| | | |
| | | vipInfo.setPhoto(addVipDto.getPhoto()); |
| | | vipInfo.setVipName(addVipDto.getVipName()); |
| | | vipInfo.setVipNo(addVipDto.getVipNo()); |
| | | vipInfo.setSex(addVipDto.getSex()); |
| | | vipInfo.setArrivalWay(addVipDto.getArrivalWay()); |
| | | vipInfo.setPhone(addVipDto.getPhone()); |
| | | vipInfo.setAddr(addVipDto.getAddress()); |
| | | vipInfo.setRemark(addVipDto.getRemark()); |
| | | vipInfo.setBirthday1(addVipDto.getBirthday()); |
| | | vipInfo.setPassWord(addVipDto.getPassword()); |
| | | vipInfo.setRecommendId(addVipDto.getRecommendId()); |
| | | |
| | | if (StringUtils.isNotBlank(addVipDto.getAreas())) { |
| | | String[] areas = addVipDto.getAreas().split("-"); |
| | | vipInfo.setProvince(areas[0]); |
| | | vipInfo.setCity(areas[1]); |
| | | vipInfo.setArea(areas[2]); |
| | | } |
| | | |
| | | vipInfo.setInDate(new Date()); |
| | | vipInfo.setPointAll(0); |
| | | vipInfo.setVipState(Dictionary.VIP_STATE_HY); |
| | | vipInfo.setStaffId(user.getSuId()); |
| | | vipInfo.setShopId(user.getShopId()); |
| | | vipInfo.setVipType(Dictionary.VIP_TYPE_NOCARD); |
| | | vipInfo.setShopId(user.getShopId()); |
| | | vipInfo.setCompanyId(user.getCompanyId()); |
| | | vipInfo.setCreateTime(new Date()); |
| | | vipInfo.setPointAll(0); |
| | | vipInfo.setIsDeal(SysVipInfo.UNDEAL_VIP); |
| | | vipInfo.setZjm(StringUtils.toHanyuPinyin(vipInfo.getVipName())+","+StringUtils.toHeadWordHanyuPinyin(vipInfo.getVipName())); |
| | | if(vipInfo.getSex().equals(Dictionary.SEX_MAN)){ |
| | | vipInfo.setPhoto(defaultMan); |
| | | }else{ |
| | | vipInfo.setPhoto(defaultWoman); |
| | | } |
| | | int i=sysVipInfoDao.insert(vipInfo); |
| | | |
| | | if (CollectionUtils.isNotEmpty(addVipDto.getLabels())) { |
| | | batchInsertLabel(addVipDto.getLabels(), vipInfo.getId()); |
| | | } |
| | | |
| | | //创建用户默认储值卡 |
| | | addVipDefaultCard(vipInfo.getId()); |
| | | return i; |
| | | } |
| | | |
| | | @Override |
| | | public int apiModifyVip(ModifyVipDto modifyVipDto) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | SysVipInfo vipInfo = sysVipInfoDao.selectById(modifyVipDto.getVipId()); |
| | | if (vipInfo == null) { |
| | | throw new GlobleException("用户不存在"); |
| | | } |
| | | |
| | | if (StringUtils.isNotBlank(modifyVipDto.getVipNo())) { |
| | | if (!modifyVipDto.getVipNo().equals(vipInfo.getVipNo())) { |
| | | if (serviceUtil.addCheckRepeatTowColumn(TableMapping.SYS_VIP_INFO, "VIP_NO", modifyVipDto.getVipNo(), |
| | | "company_id", user.getCompanyId())) { |
| | | throw new GlobleException("编号已存在!"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (!vipInfo.getPhone().equals(modifyVipDto.getPhone())) { |
| | | if (serviceUtil.addCheckRepeatTowColumn(TableMapping.SYS_VIP_INFO, "PHONE", modifyVipDto.getPhone(), |
| | | "company_id", user.getCompanyId())) { |
| | | throw new GlobleException("手机已被注册!"); |
| | | } |
| | | } |
| | | |
| | | if (StringUtils.isNotBlank(modifyVipDto.getAreas())) { |
| | | String[] areas = modifyVipDto.getAreas().split("-"); |
| | | vipInfo.setProvince(areas[0]); |
| | | vipInfo.setCity(areas[1]); |
| | | vipInfo.setArea(areas[2]); |
| | | } |
| | | |
| | | vipInfo.setVipName(modifyVipDto.getVipName()); |
| | | vipInfo.setSex(modifyVipDto.getSex()); |
| | | vipInfo.setArrivalWay(modifyVipDto.getArrivalWay()); |
| | | vipInfo.setPhone(modifyVipDto.getPhone()); |
| | | vipInfo.setAddr(modifyVipDto.getAddress()); |
| | | vipInfo.setRemark(modifyVipDto.getRemark()); |
| | | vipInfo.setPassWord(modifyVipDto.getPassword()); |
| | | vipInfo.setBirthday1(modifyVipDto.getBirthday()); |
| | | vipInfo.setRecommendId(modifyVipDto.getRecommendId()); |
| | | vipInfo.setPhoto(modifyVipDto.getPhoto()); |
| | | int i = sysVipInfoDao.update(vipInfo); |
| | | |
| | | if (CollectionUtils.isNotEmpty(modifyVipDto.getLabels())) { |
| | | sysVipLabelDao.deleteRelateByVipId(modifyVipDto.getVipId()); |
| | | batchInsertLabel(modifyVipDto.getLabels(), vipInfo.getId()); |
| | | } |
| | | return i; |
| | | } |
| | | |
| | | private void batchInsertLabel(List<String> labelList, Long id) { |
| | | Set<String> labels = new HashSet<>(labelList); |
| | | Iterator<String> iterator = labels.iterator(); |
| | | while (iterator.hasNext()) { |
| | | SysVipLabelRelate relate = new SysVipLabelRelate(); |
| | | relate.setLabelId(Long.parseLong(iterator.next())); |
| | | relate.setVipId(id); |
| | | sysVipLabelDao.insertRelate(relate); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public VipInfoDetailVo findVipInfoDetail(Long id) { |
| | | SysVipInfo sysVipInfo = sysVipInfoDao.selectById(id); |
| | | if (sysVipInfo == null) { |
| | | throw new GlobleException("用户不存在"); |
| | | } |
| | | |
| | | VipInfoDetailVo vipInfoDetailVo = new VipInfoDetailVo(); |
| | | vipInfoDetailVo.setVipName(sysVipInfo.getVipName()); |
| | | vipInfoDetailVo.setAddress(sysVipInfo.getAddr()); |
| | | vipInfoDetailVo.setPhone(sysVipInfo.getPhone()); |
| | | vipInfoDetailVo.setSex(sysVipInfo.getSex()); |
| | | vipInfoDetailVo.setArrivalWay(sysVipInfo.getArrivalWay()); |
| | | vipInfoDetailVo.setRecommendId(sysVipInfo.getRecommendId()); |
| | | vipInfoDetailVo.setId(sysVipInfo.getId()); |
| | | vipInfoDetailVo.setProvince(sysVipInfo.getProvince()); |
| | | vipInfoDetailVo.setCity(sysVipInfo.getCity()); |
| | | vipInfoDetailVo.setArea(sysVipInfo.getArea()); |
| | | vipInfoDetailVo.setRemark(sysVipInfo.getRemark()); |
| | | vipInfoDetailVo.setBirthday(sysVipInfo.getBirthday1()); |
| | | vipInfoDetailVo.setPassword(sysVipInfo.getPassWord()); |
| | | vipInfoDetailVo.setPhoto(sysVipInfo.getPhoto()); |
| | | vipInfoDetailVo.setVipNo(sysVipInfo.getVipNo()); |
| | | |
| | | List<SysVipLabel> labels = sysVipLabelDao.selectByVipId(sysVipInfo.getId()); |
| | | vipInfoDetailVo.setLabels(labels); |
| | | return vipInfoDetailVo; |
| | | } |
| | | } |
| | |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | 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.bean.SysOrderItem; |
| | | import com.matrix.system.hive.service.AchieveNewService; |
| | | import com.matrix.system.hive.service.SysOrderItemService; |
| | | import com.matrix.system.hive.service.SysOrderService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | |
| | | @Resource |
| | | private AchieveNewService achieveNewService; |
| | | |
| | | @Autowired |
| | | private SysOrderService sysOrderService; |
| | | |
| | | @Autowired |
| | | private SysOrderItemService sysOrderItemService; |
| | | |
| | | /** |
| | | * 门店每日单据明细表 |
| | |
| | | com.matrix.core.tools.excl.ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, res, os, true); |
| | | } |
| | | |
| | | @RequestMapping(value = "/del") |
| | | @ResponseBody |
| | | public AjaxResult del(Long id) { |
| | | int i = achieveNewService.removeById(id); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("删除成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("删除失败"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public AjaxResult add(@RequestBody List<AchieveNew> list) { |
| | | SysOrder order = sysOrderService.findById(list.get(0).getOrderId()); |
| | | List<SysOrderItem> orderItems = sysOrderItemService.findByOrderId(order.getId()); |
| | | orderItems.forEach(item -> { |
| | | List<AchieveNew> achieveNewList = new ArrayList<>(); |
| | | for(AchieveNew achieveNew : list) { |
| | | achieveNewService.removeById(achieveNew.getId()); |
| | | achieveNew.setId(null); |
| | | achieveNew.setConsume(null); |
| | | achieveNew.setCardCash(null); |
| | | |
| | | if (achieveNew.getOrderItemId().equals(item.getId())) { |
| | | achieveNewList.add(achieveNew); |
| | | } |
| | | |
| | | } |
| | | item.setAchaeveList(achieveNewList); |
| | | }); |
| | | order.setItems(orderItems); |
| | | achieveNewService.addAchaeveByOrder(order); |
| | | return AjaxResult.buildSuccessInstance("保存成功"); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.matrix.system.hive.statistics; |
| | | |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-01-15 |
| | | **/ |
| | | public class DailySaleVo { |
| | | |
| | | private String dataTime; |
| | | |
| | | private String shopName; |
| | | |
| | | private BigDecimal shouldPay; |
| | | |
| | | private BigDecimal totalPay; |
| | | |
| | | private BigDecimal cashPay; |
| | | |
| | | private BigDecimal cardPay; |
| | | |
| | | private BigDecimal arrearsPay; |
| | | |
| | | private BigDecimal refundCashPay; |
| | | |
| | | private BigDecimal refundCardPay; |
| | | |
| | | private BigDecimal productAchieve; |
| | | |
| | | private BigDecimal cardAchieve; |
| | | |
| | | private BigDecimal refund; |
| | | |
| | | private BigDecimal perCustomCnt; |
| | | |
| | | private BigDecimal customGoodsCnt; |
| | | |
| | | private BigDecimal perCustomPrice; |
| | | |
| | | private BigDecimal cost; |
| | | |
| | | private BigDecimal grossProfit; |
| | | |
| | | private BigDecimal grossProfitRate; |
| | | |
| | | private BigDecimal consumePay; |
| | | |
| | | private BigDecimal freeConsumePay; |
| | | |
| | | private BigDecimal peopleCnt; |
| | | |
| | | private BigDecimal projConsumeCnt; |
| | | |
| | | private BigDecimal timeLength; |
| | | |
| | | /** |
| | | * 当天销售总数量 |
| | | */ |
| | | private Integer totalSaleCnt; |
| | | |
| | | /** |
| | | * 家居产品成本 |
| | | */ |
| | | private BigDecimal goodsCost; |
| | | |
| | | /** |
| | | * 除家具产品以外成本 |
| | | */ |
| | | private BigDecimal otherCost; |
| | | |
| | | private BigDecimal wechat; |
| | | |
| | | private BigDecimal alipay; |
| | | |
| | | private BigDecimal cash; |
| | | |
| | | private BigDecimal bankCard; |
| | | |
| | | private BigDecimal tuan; |
| | | |
| | | private BigDecimal cardBj; |
| | | |
| | | private BigDecimal cardFree; |
| | | |
| | | private BigDecimal arrears; |
| | | |
| | | @Extend |
| | | @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_DD) |
| | | |
| | | private Date beginTime; |
| | | |
| | | @Extend |
| | | @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_DD) |
| | | private Date endTime; |
| | | |
| | | private Long shopId; |
| | | |
| | | public BigDecimal getShouldPay() { |
| | | return shouldPay; |
| | | } |
| | | |
| | | public void setShouldPay(BigDecimal shouldPay) { |
| | | this.shouldPay = shouldPay; |
| | | } |
| | | |
| | | public BigDecimal getWechat() { |
| | | return wechat; |
| | | } |
| | | |
| | | public void setWechat(BigDecimal wechat) { |
| | | this.wechat = wechat; |
| | | } |
| | | |
| | | public BigDecimal getAlipay() { |
| | | return alipay; |
| | | } |
| | | |
| | | public void setAlipay(BigDecimal alipay) { |
| | | this.alipay = alipay; |
| | | } |
| | | |
| | | public BigDecimal getCash() { |
| | | return cash; |
| | | } |
| | | |
| | | public void setCash(BigDecimal cash) { |
| | | this.cash = cash; |
| | | } |
| | | |
| | | public BigDecimal getBankCard() { |
| | | return bankCard; |
| | | } |
| | | |
| | | public void setBankCard(BigDecimal bankCard) { |
| | | this.bankCard = bankCard; |
| | | } |
| | | |
| | | public BigDecimal getTuan() { |
| | | return tuan; |
| | | } |
| | | |
| | | public void setTuan(BigDecimal tuan) { |
| | | this.tuan = tuan; |
| | | } |
| | | |
| | | public BigDecimal getCardBj() { |
| | | return cardBj; |
| | | } |
| | | |
| | | public void setCardBj(BigDecimal cardBj) { |
| | | this.cardBj = cardBj; |
| | | } |
| | | |
| | | public BigDecimal getCardFree() { |
| | | return cardFree; |
| | | } |
| | | |
| | | public void setCardFree(BigDecimal cardFree) { |
| | | this.cardFree = cardFree; |
| | | } |
| | | |
| | | public BigDecimal getArrears() { |
| | | return arrears; |
| | | } |
| | | |
| | | public void setArrears(BigDecimal arrears) { |
| | | this.arrears = arrears; |
| | | } |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | 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 Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | 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 DateUtil.dateToString(DateUtil.stringToDate(dataTime, DateUtil.DATE_FORMAT_DD),DateUtil.DATE_FORMAT_DD); |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.statistics; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | 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.DataAuthUtil; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.dao.SysOrderFlowDao; |
| | | import com.matrix.system.hive.dto.OrderFlowListDto; |
| | | import com.matrix.system.hive.vo.OrderFlowVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 交易流水统计 |
| | | */ |
| | | @CrossOrigin(origins = "*") |
| | | @Api(value = "OrderFlowAction", tags = "交易流水") |
| | | @RestController |
| | | @RequestMapping(value = "/admin/orderFlow") |
| | | public class OrderFlowAction { |
| | | |
| | | @Resource |
| | | private SysOrderFlowDao orderFlowDao; |
| | | /** |
| | | * 交易流水查询 |
| | | */ |
| | | |
| | | @ApiOperation(value = "查询交易流水") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = OrderFlowListDto.class) |
| | | }) |
| | | @PostMapping(value = "/findOrderFlow") |
| | | public @ResponseBody |
| | | AjaxResult findOrderFlow(@RequestBody OrderFlowListDto orderFlowListDto) { |
| | | if(StringUtils.isBlank(orderFlowListDto.getSort())){ |
| | | orderFlowListDto.setSort("createTime"); |
| | | orderFlowListDto.setOrder("desc"); |
| | | } |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | QueryUtil.setQueryLimit(orderFlowListDto); |
| | | } else { |
| | | QueryUtil.setQueryLimitCom(orderFlowListDto); |
| | | } |
| | | List<OrderFlowVo> rows = orderFlowDao.selectInPage(orderFlowListDto); |
| | | Integer total = orderFlowDao.selectTotal(orderFlowListDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows, total); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 导出Excel |
| | | */ |
| | | @GetMapping(value = "/exportOrderFlowExcel") |
| | | public void exportOrderFlowExcel(OrderFlowListDto orderFlowListDto, HttpServletResponse res) { |
| | | OutputStream os = null; |
| | | try { |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | QueryUtil.setQueryLimit(orderFlowListDto); |
| | | } else { |
| | | QueryUtil.setQueryLimitCom(orderFlowListDto); |
| | | } |
| | | orderFlowListDto.setLimit(null); |
| | | List<OrderFlowVo> rows = orderFlowDao.selectInPage(orderFlowListDto); |
| | | res.setCharacterEncoding("UTF-8"); |
| | | res.setHeader("content-type", "application/octet-stream;charset=UTF-8"); |
| | | res.setContentType("application/octet-stream;charset=UTF-8"); |
| | | |
| | | Date date = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日HH时mm分ss"); |
| | | res.setHeader("Content-Disposition", "attachment;filename=" + |
| | | java.net.URLEncoder.encode("交易流水" + dateFormat.format(date) + ".xlsx".trim(), "UTF-8")); |
| | | os = res.getOutputStream(); |
| | | ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, disPoseExcelData(rows), os, true); |
| | | } catch (Exception e) { |
| | | LogUtil.error("交易流水导出异常", e); |
| | | } finally { |
| | | if (os != null) { |
| | | try { |
| | | os.close(); |
| | | } catch (IOException e) { |
| | | LogUtil.error("关闭资源异常", e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private List<ExcelSheetPO> disPoseExcelData(List<OrderFlowVo> orderFlowVos) { |
| | | List<ExcelSheetPO> res = new ArrayList<>(); |
| | | ExcelSheetPO orderSheet = new ExcelSheetPO(); |
| | | orderSheet.setSheetName("交易流水"); |
| | | orderSheet.setTitle("交易流水"); |
| | | String[] header = new String[]{"订单编号", "交易内容", "交易时间", "交易类型", "交易金额", "会员姓名", |
| | | "支付方式", "支付流水号", "操作人", "门店名称"}; |
| | | orderSheet.setHeaders(header); |
| | | List<List<Object>> body = new ArrayList<>(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); |
| | | for (OrderFlowVo flowVo : orderFlowVos) { |
| | | List<Object> bodyItem = new ArrayList<>(); |
| | | bodyItem.add(flowVo.getOrderNo()); |
| | | bodyItem.add(flowVo.getFlowContent()); |
| | | bodyItem.add(DateUtil.dateFormatStr(flowVo.getCreateTime(),DateUtil.DATE_FORMAT_MM)); |
| | | bodyItem.add(flowVo.getFlowType()); |
| | | bodyItem.add(flowVo.getAmount()); |
| | | bodyItem.add(flowVo.getVipName()); |
| | | bodyItem.add(flowVo.getPayMethod()); |
| | | bodyItem.add(flowVo.getFlowNo()); |
| | | bodyItem.add(flowVo.getStaffName()); |
| | | bodyItem.add(flowVo.getShopName()); |
| | | body.add(bodyItem); |
| | | } |
| | | orderSheet.setDataList(body); |
| | | res.add(orderSheet); |
| | | return res; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | param.put("shopId",sysUsers.getShopId()); |
| | | } |
| | | |
| | | return AjaxResult.buildSuccessInstance(beauticianStateDao.selectItemDetail(param), |
| | | beauticianStateDao.selectItemDetailTotal(param)); |
| | | } |
| | |
| | | */ |
| | | public boolean executeExt2() { |
| | | |
| | | Date today = DateUtil.stringToDate("2020-11-01",DateUtil.DATE_FORMAT_DD); |
| | | Date today = DateUtil.stringToDate("2020-11-27",DateUtil.DATE_FORMAT_DD); |
| | | Date now=new Date(); |
| | | while (DateUtil.isBeforeDate(now,today)){ |
| | | LogUtil.info("日期:"+DateUtil.dateFormatStr(today,DateUtil.DATE_FORMAT_DD)); |
| | |
| | | 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.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.hive.dao.SysBusinessDataDao; |
| | | import com.matrix.system.hiveErp.analysUtil.StatisticsTimeDaoParam; |
| | | import com.matrix.system.hiveErp.analysUtil.StatisticsTimeUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 日销售汇总 |
| | | * |
| | | * @param dailySaleVo |
| | | * @param pageVo |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/findDailySaleData") |
| | | @ResponseBody |
| | | public AjaxResult findDailySaleData(DailySaleVo dailySaleVo, PaginationVO pageVo) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | int total = 999; |
| | | |
| | | Date endDate = new Date(); |
| | | if (dailySaleVo.getEndTime() != null) { |
| | | if (!dailySaleVo.getEndTime().after(new Date())) { |
| | | calendar.setTime(dailySaleVo.getEndTime()); |
| | | endDate = DateUtil.nextNDate(dailySaleVo.getEndTime(), 1); |
| | | } |
| | | } |
| | | |
| | | calendar.add(Calendar.DATE, 1); |
| | | calendar.add(Calendar.DATE, -pageVo.getOffset()); |
| | | String endTime = DateUtil.dateToString(calendar.getTime(), DateUtil.DATE_FORMAT_DD); |
| | | calendar.add(Calendar.DATE, -pageVo.getLimit()); |
| | | String startTime = DateUtil.dateToString(calendar.getTime(), DateUtil.DATE_FORMAT_DD); |
| | | |
| | | if (dailySaleVo.getBeginTime() != null) { |
| | | Date startDate = DateUtil.stringToDate(startTime, DateUtil.DATE_FORMAT_DD); |
| | | if(dailySaleVo.getBeginTime().after(startDate)) { |
| | | startTime = DateUtil.dateFormatStr(dailySaleVo.getBeginTime(), DateUtil.DATE_FORMAT_DD); |
| | | } |
| | | long sub = DateUtil.getTimeSpan(dailySaleVo.getBeginTime(), endDate, null); |
| | | Long l = sub / (1000 * 3600 * 24); |
| | | total = l.intValue(); |
| | | } |
| | | List<Date> xAxis = StatisticsTimeUtil.getTimeSpace(startTime, endTime, "日"); |
| | | List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis); |
| | | List<StatisticsTimeDaoParam> statisticsTimeDaoParams = timeSpaceParam.subList(0, timeSpaceParam.size() - 2); |
| | | |
| | | if (dailySaleVo.getShopId() == null) { |
| | | dailySaleVo.setShopId(user.getShopId()); |
| | | } |
| | | List<DailySaleVo> dailySaleVos = sysBusinessDataDao.selectDailySaleData(statisticsTimeDaoParams, dailySaleVo.getShopId()); |
| | | List<DailySaleVo> result = new ArrayList<>(); |
| | | for (int i = dailySaleVos.size() - 1; i >= 0; i--) { |
| | | result.add(dailySaleVos.get(i)); |
| | | } |
| | | return AjaxResult.buildSuccessInstance(result, total); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.app.vo.OrderDetailItemVo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author jyy |
| | | * @date 2021-01-27 |
| | | **/ |
| | | @ApiModel(value = "OrderFlowVo", description = "订单流水返回参数类") |
| | | public class OrderFlowVo { |
| | | |
| | | @ApiModelProperty(value = "流水id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "订单ID") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty(value = "订单号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value ="交易类型") |
| | | private String flowType; |
| | | |
| | | @ApiModelProperty(value ="支付方式") |
| | | private String payMethod; |
| | | |
| | | @ApiModelProperty(value = "会员姓名") |
| | | private String vipName; |
| | | |
| | | @ApiModelProperty(value = "交易内容") |
| | | private String flowContent; |
| | | |
| | | @ApiModelProperty(value = "交易金额") |
| | | private BigDecimal amount; |
| | | |
| | | @ApiModelProperty(value = "操作人姓名") |
| | | private String staffName; |
| | | |
| | | @ApiModelProperty(value = "支付流水号") |
| | | private String flowNo; |
| | | |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String shopName; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_SS, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(String orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public String getOrderNo() { |
| | | return orderNo; |
| | | } |
| | | |
| | | public void setOrderNo(String orderNo) { |
| | | this.orderNo = orderNo; |
| | | } |
| | | |
| | | public String getFlowType() { |
| | | return flowType; |
| | | } |
| | | |
| | | public void setFlowType(String flowType) { |
| | | this.flowType = flowType; |
| | | } |
| | | |
| | | public String getPayMethod() { |
| | | return payMethod; |
| | | } |
| | | |
| | | public void setPayMethod(String payMethod) { |
| | | this.payMethod = payMethod; |
| | | } |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public String getFlowContent() { |
| | | return flowContent; |
| | | } |
| | | |
| | | public void setFlowContent(String flowContent) { |
| | | this.flowContent = flowContent; |
| | | } |
| | | |
| | | public BigDecimal getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(BigDecimal amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public String getStaffName() { |
| | | return staffName; |
| | | } |
| | | |
| | | public void setStaffName(String staffName) { |
| | | this.staffName = staffName; |
| | | } |
| | | |
| | | public String getFlowNo() { |
| | | return flowNo; |
| | | } |
| | | |
| | | public void setFlowNo(String flowNo) { |
| | | this.flowNo = flowNo; |
| | | } |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.hiveErp.action; |
| | | |
| | | import com.matrix.component.redis.RedisClient; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.service.imp.DataAnalysisCustomerServiceImpl; |
| | | import com.matrix.system.hiveErp.analysUtil.*; |
| | | import com.matrix.system.hiveErp.dao.TjVipSumDao; |
| | | import org.jetbrains.annotations.NotNull; |
| | |
| | | @Autowired |
| | | SysShopInfoDao shopInfoDao; |
| | | |
| | | |
| | | @Autowired |
| | | DataAnalysisCustomerServiceImpl dataAnalysisCustomerService; |
| | | |
| | | /** |
| | | * 会员人头数统计 |
| | |
| | | */ |
| | | @RequestMapping(value = "/customerHeadCompare") |
| | | public @ResponseBody AjaxResult customerHeadCompare(StatisticsParamVo statisticsParam) { |
| | | return getAnalysisResult(statisticsParam, new Caculate() { |
| | | return dataAnalysisCustomerService.getAnalysisResult(statisticsParam, new Caculate<Integer>() { |
| | | @Override |
| | | public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId) { |
| | | public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long companyId) { |
| | | //从员工业绩统计表中,按时间段,门店的维度统计人头数 |
| | | return tjVipSumDao.customerHeadCompare(timeSpaceParam,shopId); |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/customerEnterCountCompare") |
| | | public @ResponseBody AjaxResult customerEnterCountCompare(StatisticsParamVo statisticsParam) { |
| | | return getAnalysisResult(statisticsParam, new Caculate() { |
| | | return dataAnalysisCustomerService.getAnalysisResult(statisticsParam, new Caculate<Integer>() { |
| | | @Override |
| | | public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId) { |
| | | public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long companyId) { |
| | | //从员工业绩统计表中,按时间段,门店的维度统计人次 |
| | | return tjVipSumDao.customerEnterCountCompare(timeSpaceParam,shopId); |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/customerEnterRateCompare") |
| | | public @ResponseBody AjaxResult customerEnterRateCompare(StatisticsParamVo statisticsParam) { |
| | | return getAnalysisResult(statisticsParam, new Caculate() { |
| | | return dataAnalysisCustomerService.getAnalysisResult(statisticsParam, new Caculate<Integer>() { |
| | | @Override |
| | | public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId) { |
| | | public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long companyId) { |
| | | //从员工业绩统计表中,按时间段,门店的维度统计人次 |
| | | return tjVipSumDao.customerEnterRateCompare(timeSpaceParam,shopId); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 按店铺查询数据通用格式执行方法,支持时、日、月、年维度 |
| | | * 如: A店铺 B店铺 |
| | | * 2020-01-01 12 13 |
| | | * 2020-02-02 10 11 |
| | | * @param statisticsParam 时间条件 |
| | | * @param caculate 循环调用caculate计算该店的数据 |
| | | * 查询的数据需满足 只有一个门店只有一行 列名称为 t0,t1,t2 |
| | | * @return |
| | | */ |
| | | private AjaxResult getAnalysisResult(StatisticsParamVo statisticsParam, Caculate caculate) { |
| | | AjaxResult result = new AjaxResult(); |
| | | |
| | | //根据计算横坐标 |
| | | List<Date> xAxis = StatisticsTimeUtil.getTimeSpace(statisticsParam.getBeginTime(), statisticsParam.getEndTime(), statisticsParam.getStatisticsUnit()); |
| | | |
| | | //获取所有门店 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | List<SysShopInfo> shops=null; |
| | | if(DataAuthUtil.hasAllShopAuth()){ |
| | | shops= shopInfoDao.selectShopInfo(user.getCompanyId()); |
| | | }else{ |
| | | shops=Arrays.asList(shopInfoDao.selectById(user.getShopId())); |
| | | } |
| | | //定义数据项内容 |
| | | List<SeriesVo> series=new ArrayList<>(); |
| | | |
| | | //定义数据主体 |
| | | String[] legendData=new String[shops.size()]; |
| | | |
| | | int i=0; |
| | | |
| | | //按门店统计数据 |
| | | List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis); |
| | | for(SysShopInfo shop: shops){ |
| | | |
| | | legendData[i++]=shop.getShopName(); |
| | | //数据项内容 |
| | | SeriesVo storeInfoSeries=new SeriesVo(); |
| | | storeInfoSeries.setName(shop.getShopName()); |
| | | //调用计算器获取数据库统计的结果 |
| | | Map<String, Integer> yAxisMap = caculate.exec(timeSpaceParam,shop.getId()); |
| | | //把统计结果转成数组格式 |
| | | storeInfoSeries.setData(StatisticsTimeUtil.getSeries(yAxisMap)); |
| | | series.add(storeInfoSeries); |
| | | |
| | | } |
| | | //构造返回对象 |
| | | Map<Object,Object> data=new HashMap<>(); |
| | | data.put("legendData",legendData); |
| | | data.put("series",series); |
| | | data.put("xAxis", StatisticsTimeUtil.getFormartDateList(xAxis,statisticsParam)); |
| | | result.setMapInfo(data); |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | moneyCardUse.setVipId(order.getVipId()); |
| | | List<MoneyCardUse> cards = cardUseService.findByModel(moneyCardUse); |
| | | |
| | | WebUtil.getRequest().setAttribute("orderParam", id); |
| | | |
| | | WebUtil.getRequest().setAttribute("cards", cards); |
| | | return "admin/hive-erp/order/orderXq-form"; |
| | | } |
| | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelVersion; |
| | |
| | | @RequestMapping(value = "/showList") |
| | | public @ResponseBody |
| | | AjaxResult showList(ShoppingGoods shoppingGoods, PaginationVO pageVo) { |
| | | pageVo.setOrder("desc"); |
| | | pageVo.setSort("createTime"); |
| | | if(StringUtils.isBlank(pageVo.getSort())){ |
| | | pageVo.setOrder("desc"); |
| | | pageVo.setSort("createTime"); |
| | | } |
| | | QueryUtil.setQueryLimitCom(shoppingGoods); |
| | | shoppingGoods.setIsDel(ShoppingGoods.NORMAL); |
| | | List<ShoppingGoods> dataList = shoppingGoodsService.findInPage(shoppingGoods, pageVo); |
| | |
| | | // 在session存放当前查询的客户 |
| | | MoneyCardUse cardUseInfo = cardUseService.findByVipId(vips.get(0).getId()); |
| | | if (cardUseInfo == null) { |
| | | cardUseInfo = new MoneyCardUse(); |
| | | cardUseInfo.setVipId(vips.get(0).getId()); |
| | | cardUseInfo.setCardName("储值卡"); |
| | | cardUseInfo.setIsVipCar(Dictionary.FLAG_YES_Y); |
| | | cardUseInfo.setRealMoney(0D); |
| | | cardUseInfo.setGiftMoney(0D); |
| | | cardUseInfo.setSource("-"); |
| | | cardUseInfo.setStatus(Dictionary.MONEYCARD_STATUS_YX); |
| | | cardUseInfo.setFailTime(DateUtil.stringToDate("2050-01-01 00:00",DateUtil.DATE_FORMAT_MM)); |
| | | moneyCardUseDao.insert(cardUseInfo); |
| | | cardUseInfo=vipInfoService.addVipDefaultCard(vips.get(0).getId()); |
| | | } |
| | | vips.get(0).setLevelCard(cardUseInfo); |
| | | WebUtil.getSession().setAttribute(SystemConstance.CURRENT_CUSTOMER, vips.get(0)); |
| | |
| | | /** |
| | | * 明细数值计算器 |
| | | */ |
| | | public interface Caculate { |
| | | public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam , Long shopId); |
| | | public interface Caculate<T> { |
| | | public Map<String, T> exec(List<StatisticsTimeDaoParam> timeSpaceParam , Long shopId, Long companyId); |
| | | } |
| | |
| | | package com.matrix.system.hiveErp.analysUtil; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | /** |
| | | * 统计查询条件 |
| | | * @author jyy |
| | | */ |
| | | @ApiModel(value = "StatisticsParamVo", description = "专项统计接收参数类") |
| | | public class StatisticsParamVo { |
| | | |
| | | 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 |
| | | */ |
| | | private String shopId; |
| | | @ApiModelProperty(value = "门店ID, 不传默认统计整个公司") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty(value = "类型 1-营业收入 2-现金收入 3-余额划扣 4-本金消耗 5-赠送消耗 6-现金退款 7-卡项退款 8-欠款", example = "1") |
| | | private String type; |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getBeginTime() { |
| | | return beginTime; |
| | |
| | | this.contrastUnit = contrastUnit; |
| | | } |
| | | |
| | | public String getShopId() { |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(String shopId) { |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.hiveErp.dao; |
| | | |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.vo.VipAchieveDataShowVo; |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | | import com.matrix.system.hiveErp.analysUtil.StatisticsTimeDaoParam; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | Map<String, Integer> customerEnterCountCompare(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId); |
| | | |
| | | Map<String, Integer> customerEnterRateCompare(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId); |
| | | |
| | | // 营业收入 |
| | | Map<String, BigDecimal> selectBusinessInCome(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 现金收款 |
| | | Map<String, BigDecimal> selectCashIncome(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 储值卡收款 |
| | | Map<String, BigDecimal> selectCardUse(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 欠款 |
| | | Map<String, BigDecimal> selectArrears(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 卡项退款 |
| | | Map<String, BigDecimal> selectCardRefund(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 现金退款 |
| | | Map<String, BigDecimal> selectCashRefund(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 产品业绩 |
| | | Map<String, BigDecimal> selectProductAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 卡项业绩 |
| | | Map<String, BigDecimal> selectCardAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 还款 |
| | | Map<String, BigDecimal> selectRepayment(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 客单数 |
| | | Map<String, BigDecimal> selectPerCustomCnt(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 客品数 |
| | | Map<String, BigDecimal> selectCustomGoodsCnt(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 客单价 |
| | | Map<String, BigDecimal> selectPerCustomPrice(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 成本 |
| | | Map<String, BigDecimal> selectCost(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 毛利 |
| | | Map<String, BigDecimal> selectGrossProfit(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 毛利率 |
| | | Map<String, BigDecimal> selectGrossProfitRate(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 本金消耗 |
| | | Map<String, BigDecimal> selectHisConsume(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 赠送消耗 |
| | | Map<String, BigDecimal> selectFreeConsume(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 人头数 |
| | | Map<String, BigDecimal> selectPeopleCnt(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 项目消耗数 |
| | | Map<String, BigDecimal> selectProjConsumeCnt(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | // 服务时长 |
| | | Map<String, BigDecimal> selectTimeLength(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId); |
| | | |
| | | List<VipAchieveDataShowVo> selectVipAchieveInPage(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("userId") Long userId); |
| | | |
| | | // 订单业绩 |
| | | Map<String, BigDecimal> selectStaffOrderAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId); |
| | | // 现金业绩 |
| | | Map<String, BigDecimal> selectStaffCashAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId); |
| | | // 划扣业绩 |
| | | Map<String, BigDecimal> selectStaffCardAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId); |
| | | // 订单提成 |
| | | Map<String, BigDecimal> selectStaffGoodsAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId); |
| | | // 本金消耗 |
| | | Map<String, BigDecimal> selectStaffHisConsumeAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId); |
| | | // 赠送消耗 |
| | | Map<String, BigDecimal> selectStaffFreeConsumeAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId); |
| | | // 服务提成 |
| | | Map<String, BigDecimal> selectStaffCommissionAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId); |
| | | // 人头数目 |
| | | Map<String, BigDecimal> selectStaffPeopleNum(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId); |
| | | // 项目数 |
| | | Map<String, BigDecimal> selectStaffProjNum(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId); |
| | | // 服务时长 |
| | | Map<String, BigDecimal> selectStaffProjTime(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId); |
| | | |
| | | Map<String, BigDecimal> selectStaffCardUseAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId); |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.job; |
| | | |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.MoneyCardUse; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.bean.SysProjUse; |
| | | import com.matrix.system.hive.dao.MoneyCardUseDao; |
| | | import com.matrix.system.hive.dao.SysProjServicesDao; |
| | | import com.matrix.system.hive.dao.SysProjUseDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.shopXcx.mqTask.MQTaskRouting; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 预约服务到时提醒 |
| | | * @author 姜友瑶 |
| | | */ |
| | | @Component |
| | | public class ServiceOvertimeNoticeJob { |
| | | |
| | | @Autowired |
| | | private SysProjServicesDao projServicesDao; |
| | | |
| | | @Value("${evn}") |
| | | private String evn; |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | /** |
| | | * 每分钟执行一次 |
| | | */ |
| | | @Scheduled(cron = "0 0/1 * * * ?") |
| | | public void serviceOvertimeNotice() { |
| | | |
| | | List<SysProjServices> needNoticeService=projServicesDao.selectNeedNoticeService(); |
| | | if(CollectionUtils.isNotEmpty(needNoticeService)){ |
| | | LogUtil.debug("执行服务单预约到时提醒任务,本次通知对象"+ needNoticeService.stream().map(SysProjServices::getVipName).collect(Collectors.joining(","))); |
| | | for(SysProjServices projServices : needNoticeService){ |
| | | //发送微信公众号提醒 |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(projServices.getCompanyId(),UniformMsgParam.GZH_YYDS); |
| | | uniformMsgParam.put("serviceId",projServices.getId()); |
| | | rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | } |
| | | List<Long> noticedIds = needNoticeService.stream().map(SysProjServices::getId).collect(Collectors.toList()); |
| | | projServicesDao.updateNoticeTimes(noticedIds); |
| | | }else{ |
| | | LogUtil.debug("暂无需要提醒的服务单"); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | int reMoney = b1.multiply(bb).intValue(); |
| | | LogUtil.info("退款退款金额{}", reMoney); |
| | | |
| | | //Double refundMoney = 0.1 * 100; |
| | | //用户ID |
| | | String userId = WechatConfigure.mchID; |
| | | |
| | | |
| | | if (isDebug) { |
| | | boolean b = weixinServiceUtil.comRefund(orderNo, refundNo, 1, 1, userId); |
| | | boolean b = weixinServiceUtil.comRefund(orderNo, refundNo, 1, 1, null); |
| | | flag = b; |
| | | } else { |
| | | LogUtil.info("开始调用退款接口。。。退款编号为{}", refundNo); |
| | | boolean b = weixinServiceUtil.comRefund(orderNo, refundNo, orMoney, reMoney, userId); |
| | | boolean b = weixinServiceUtil.comRefund(orderNo, refundNo, orMoney, reMoney, null); |
| | | flag = b; |
| | | } |
| | | |
| | |
| | | @RequestMapping(value = "/modifyShopWxtemplateMsg") |
| | | public @ResponseBody |
| | | AjaxResult modifyShopWxtemplateMsg(ShopWxtemplateMsg newShopWxtemplateMsg) { |
| | | ShopWxtemplateMsg oldShopWxtemplateMsg = WebUtil.getSessionAttribute(BEV); |
| | | int i = 0; |
| | | Map<String, Object> modifyMap = null; |
| | | try { |
| | | if (!ModelUtils.isModified(oldShopWxtemplateMsg, newShopWxtemplateMsg)) { |
| | | i = MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | modifyMap = ModelUtils.comparePojo2Map(oldShopWxtemplateMsg, newShopWxtemplateMsg); |
| | | } catch (Exception e) { |
| | | throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newShopWxtemplateMsg); |
| | | } |
| | | if (modifyMap.size() > 0) { |
| | | modifyMap.put("id", oldShopWxtemplateMsg.getId()); |
| | | shopWxtemplateMsgDao.updateByMap(modifyMap); |
| | | } |
| | | i = MatrixConstance.DML_SUCCESSS; |
| | | |
| | | int i = shopWxtemplateMsgDao.updateByModel(newShopWxtemplateMsg); |
| | | WebUtil.removeSessionAttribute(BEV); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.UPDATE_SUCCES, "微信模板消息"); |
| | |
| | | package com.matrix.system.shopXcx.api; |
| | | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.PropertiesUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.component.tools.HttpRequest; |
| | | import com.matrix.component.tools.HttpResponse; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.PropertiesUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | @Service |
| | | public class WeChatApiTools { |
| | | /** |
| | | * 小程序秘钥 |
| | | */ |
| | | private static final String XCX_SECRET = "xcx_secret"; |
| | | /** |
| | | * 小程序appid |
| | | */ |
| | | private static final String XCX_APPID = "xcx_appid"; |
| | | |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 微信登录url |
| | | */ |
| | |
| | | */ |
| | | private static String accessToken = ""; |
| | | |
| | | private static String appid = ""; |
| | | private static String secret = ""; |
| | | |
| | | |
| | | /** |
| | |
| | | * @param code |
| | | * @return |
| | | */ |
| | | public static String getXcxLoginUrl(String code) { |
| | | public String getXcxLoginUrl(String code,Long companyId) { |
| | | String wechatLoginUrl = PropertiesUtil.getString(WECHAT_LOGIN_URL); |
| | | return String.format(wechatLoginUrl, getAppid(), getSecret(), code); |
| | | return String.format(wechatLoginUrl, getAppid(companyId), getSecret(companyId), code); |
| | | } |
| | | |
| | | /** |
| | | * 获取小程序APPId |
| | | * @return |
| | | */ |
| | | public static String getAppid(){ |
| | | if(StringUtils.isBlank(appid)){ |
| | | appid = PropertiesUtil.getString(XCX_APPID); |
| | | } |
| | | return appid; |
| | | public String getAppid(Long companyId){ |
| | | BusParameterSettings appId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId); |
| | | return appId.getParamValue(); |
| | | } |
| | | |
| | | /** |
| | | * 获取小程序秘钥 |
| | | * @return |
| | | */ |
| | | public static String getSecret(){ |
| | | if(StringUtils.isBlank(secret)){ |
| | | secret = PropertiesUtil.getString(XCX_SECRET); |
| | | } |
| | | return secret; |
| | | public String getSecret(Long companyId){ |
| | | BusParameterSettings secret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_SECRET, companyId); |
| | | return secret.getParamValue(); |
| | | } |
| | | |
| | | |
| | |
| | | accessToken = ""; |
| | | } |
| | | |
| | | public static String getAccessToken() throws IOException { |
| | | public String getAccessToken(Long companyId) throws IOException { |
| | | |
| | | if (isTokenInvalid()) { |
| | | synchronized (accessToken) { |
| | |
| | | HttpResponse result = null; |
| | | result = reqObj |
| | | .sendHttpGet("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" |
| | | + getAppid() + "&secret=" + getSecret(), null); |
| | | + getAppid(companyId) + "&secret=" + getSecret(companyId), null); |
| | | JSONObject json = JSONObject.fromObject(result.getDataString()); |
| | | String access_token = json.getString("access_token"); |
| | | accessToken = access_token; |
New file |
| | |
| | | package com.matrix.system.shopXcx.api; |
| | | |
| | | import com.matrix.component.tools.HttpRequest; |
| | | import com.matrix.component.tools.HttpResponse; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.PropertiesUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import net.sf.json.JSONObject; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | /*** |
| | | * 公众号api工具 |
| | | */ |
| | | public class WeChatGzhApiTools { |
| | | /** |
| | | * 公众号秘钥 |
| | | */ |
| | | private static final String GZH_SECRET = "gzh_secret"; |
| | | /** |
| | | * 公众号appid |
| | | */ |
| | | private static final String GZH_APPID = "gzh_appid"; |
| | | /** |
| | | * 微信登录url |
| | | */ |
| | | private static final String WECHAT_LOGIN_URL = "wechar_login_url"; |
| | | |
| | | /** |
| | | * 上一次获取时间 |
| | | */ |
| | | private static Long preTime; |
| | | |
| | | /** |
| | | * 当前有效的微信token |
| | | */ |
| | | private static String accessToken = ""; |
| | | |
| | | private static String appid = ""; |
| | | private static String secret = ""; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取公众号APPId |
| | | * @return |
| | | */ |
| | | public static String getAppid(){ |
| | | if(StringUtils.isBlank(appid)){ |
| | | appid = PropertiesUtil.getString(GZH_APPID); |
| | | } |
| | | return appid; |
| | | } |
| | | |
| | | /** |
| | | * 获取公众号秘钥 |
| | | * @return |
| | | */ |
| | | public static String getSecret(){ |
| | | if(StringUtils.isBlank(secret)){ |
| | | secret = PropertiesUtil.getString(GZH_SECRET); |
| | | } |
| | | return secret; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 清空token |
| | | */ |
| | | public static void cleanAccessToken() { |
| | | preTime = null; |
| | | accessToken = ""; |
| | | } |
| | | |
| | | public static String getAccessToken(String gzhAppId, String gzhSecret) { |
| | | |
| | | if (isTokenInvalid()) { |
| | | synchronized (accessToken) { |
| | | if (isTokenInvalid()) { |
| | | LogUtil.info("刷新微信accessToken"); |
| | | HttpRequest reqObj = new HttpRequest(); |
| | | HttpResponse result = null; |
| | | try { |
| | | result = reqObj |
| | | .sendHttpGet("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" |
| | | + gzhAppId+ "&secret=" + gzhSecret, null); |
| | | } catch (IOException e) { |
| | | LogUtil.error("获取公众号accessToken失败"+e.getMessage(),e); |
| | | throw new GlobleException(e.getMessage()); |
| | | } |
| | | JSONObject json = JSONObject.fromObject(result.getDataString()); |
| | | |
| | | if(json.has("errmsg")){ |
| | | throw new GlobleException("获取返回刷新的accessToken失败"+json.toString()); |
| | | }else{ |
| | | String access_token = json.getString("access_token"); |
| | | accessToken = access_token; |
| | | preTime = System.currentTimeMillis(); |
| | | LogUtil.info("返回刷新的accessToken={}", accessToken); |
| | | return access_token; |
| | | } |
| | | |
| | | } else { |
| | | return accessToken; |
| | | } |
| | | } |
| | | } else { |
| | | LogUtil.info("返回现有accessToken={}", accessToken); |
| | | return accessToken; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * token是否无效 |
| | | * TODO 由于现在有多个环境,为了防止冲突每次都获取新的token |
| | | * @return |
| | | */ |
| | | private static boolean isTokenInvalid() { |
| | | /** if (StringUtils.isNotBlank(accessToken) && preTime != null) { |
| | | Long now = System.currentTimeMillis() / 1000; |
| | | Long pre = preTime / 1000; |
| | | boolean invalid = (now - pre) > 6200; |
| | | return invalid; |
| | | } else { |
| | | return true; |
| | | }*/ |
| | | return true; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.system.shopXcx.api; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.matrix.biz.bean.BizUser; |
| | | import com.matrix.biz.dao.BizUserDao; |
| | | import com.matrix.biz.service.BizUserService; |
| | |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | @Autowired |
| | | private BizUserDao bizUserDao; |
| | | |
| | | |
| | | @Autowired |
| | | WeChatApiTools weChatApiTools; |
| | | |
| | | |
| | | |
| | |
| | | AjaxResult res = new AjaxResult(); |
| | | LogUtil.info("code:{}" + code); |
| | | if (StringUtils.isNotBlank(code)) { |
| | | String requrl = WeChatApiTools.getXcxLoginUrl(code); |
| | | String requrl = weChatApiTools.getXcxLoginUrl(code, HostInterceptor.getCompanyId()); |
| | | String reslutData = HttpCurlUtil.sendGetHttp(requrl, null); |
| | | JSONObject json = JSONObject.fromObject(reslutData); |
| | | LogUtil.debug("微信登录获取到登录信息={}", json); |
| | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.ShoppingGoods; |
| | | import com.matrix.system.hive.dao.ShoppingGoodsDao; |
| | |
| | | import com.matrix.component.wechat.externalInterface.common.Signature; |
| | | import com.matrix.component.wechat.externalInterface.common.Util; |
| | | import com.matrix.component.wechat.externalInterface.protocol.queryProtocol.NotifyData; |
| | | 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.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.shopXcx.bean.ShopActivitiesGroupJoin; |
| | |
| | | @Autowired |
| | | private SysVipInfoDao sysVipInfoDao; |
| | | |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | |
| | | |
| | | @Value("${evn}") |
| | | private String evn; |
| | | /** |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequestMapping(value = "/wxpayCallback") |
| | | @RequestMapping(value = "/wxapi/wxpayCallback") |
| | | public void payCallBack(HttpServletResponse response, HttpServletRequest request) throws IOException { |
| | | LogUtil.info("微信支付回调start...."); |
| | | |
| | |
| | | // 返回状态码 SUCCESS/FAIL |
| | | if (AppConstance.CODE_SUCCESS.equals(data.getReturn_code())) { |
| | | // 校验签名 |
| | | if (Signature.checkIsSignValidFromResponseString(notityXml.toString())) { |
| | | BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, HostInterceptor.getCompanyId()); |
| | | if (Signature.checkIsSignValidFromResponseString(notityXml.toString(),paySecret.getParamValue())) { |
| | | // 校验业务结果 |
| | | if (AppConstance.CODE_SUCCESS.equals(data.getResult_code())) { |
| | | // 返回SUCCESS报文 |
New file |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.biz.bean.BizUser; |
| | | import com.matrix.component.redis.RedisClient; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.system.app.authority.AppAuthorityManager; |
| | | import com.matrix.system.app.dto.LoginDto; |
| | | import com.matrix.system.app.dto.PwdResetDto; |
| | | import com.matrix.system.app.dto.SmsCodeDto; |
| | | import com.matrix.system.app.dto.UploadPhotoDto; |
| | | 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.SysUsers; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.PasswordUtil; |
| | | import com.matrix.system.hive.bean.AppVersion; |
| | | import com.matrix.system.hive.bean.SysOrderFlow; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysOrderDao; |
| | | import com.matrix.system.hive.dao.SysOrderFlowDao; |
| | | import com.matrix.system.hive.dao.SysOrderItemDao; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | 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.dto.ErpOrderListDto; |
| | | import com.matrix.system.shopXcx.api.vo.ErpOrderDetailFlowVo; |
| | | import com.matrix.system.shopXcx.api.vo.ErpOrderDetailItemVo; |
| | | import com.matrix.system.shopXcx.api.vo.ErpOrderDetailVo; |
| | | import io.swagger.annotations.Api; |
| | | 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.beans.factory.annotation.Value; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.io.File; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @Api(value = "WxErpOrderAction", tags = "小程序端Erp订单查询接口") |
| | | @RestController |
| | | @RequestMapping(value = "/wxapi/erpOrder") |
| | | public class WxErpOrderAction { |
| | | |
| | | @Autowired |
| | | private SysUsersService sysUsersService; |
| | | |
| | | @Autowired |
| | | private SysShopInfoService sysShopInfoService; |
| | | |
| | | @Autowired |
| | | private AppAuthorityManager authorityManager; |
| | | |
| | | @Autowired |
| | | private RedisClient redisClient; |
| | | |
| | | @Autowired |
| | | private SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | RedisUserLoginUtils redisUserLoginUtils; |
| | | |
| | | @Autowired |
| | | private SysOrderDao sysOrderDao; |
| | | |
| | | @Autowired |
| | | private SysOrderItemDao orderItemDao; |
| | | |
| | | @Autowired |
| | | private SysOrderFlowDao orderFlowDao; |
| | | |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | | @Value("${static_resource_url}") |
| | | private String nginxUrl; |
| | | |
| | | @ApiOperation(value = "查询用户所有在ERP中产生的订单" ) |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = ErpOrderListDto.class) |
| | | }) |
| | | @PostMapping(value = "/findUserOrderList") |
| | | public AjaxResult findUserOrderList(@RequestBody @Validated ErpOrderListDto erpOrderListDto) { |
| | | BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(bizUser.getPhoneNumber()); |
| | | if(vipInfo!=null){ |
| | | erpOrderListDto.setVipId(vipInfo.getId()); |
| | | List<ErpOrderDetailVo> rows=sysOrderDao.selectErpOrderList(erpOrderListDto); |
| | | rows.forEach(item->{ |
| | | item.setItems(orderItemDao.selectErpOrderItemByOrderId(item.getOrderId())); |
| | | }); |
| | | return AjaxResult.buildSuccessInstance(rows,"查询成功"); |
| | | }else{ |
| | | return AjaxResult.buildFailInstance("未查询到相关订单001"); |
| | | } |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "查询用户在ERP中的订单详情" ) |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = ErpOrderListDto.class) |
| | | }) |
| | | @GetMapping(value = "/findUserOrderById/{orderId}") |
| | | public AjaxResult findUserOrderList(@PathVariable Long orderId) { |
| | | ErpOrderDetailVo order=sysOrderDao.findUserOrderById(orderId); |
| | | order.setItems(orderItemDao.selectErpOrderItemByOrderId(order.getOrderId())); |
| | | List<SysOrderFlow> sysOrderFlows = orderFlowDao.selectPayMethodsAmountByOrderId(orderId); |
| | | List<ErpOrderDetailFlowVo> flowVos=new ArrayList<>(); |
| | | sysOrderFlows.forEach(item->{ |
| | | ErpOrderDetailFlowVo erpOrderDetailFlowVo = new ErpOrderDetailFlowVo(); |
| | | BeanUtils.copyProperties(item,erpOrderDetailFlowVo); |
| | | flowVos.add(erpOrderDetailFlowVo); |
| | | }); |
| | | order.setFlow(flowVos); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("查询成功"); |
| | | result.putInMap("order",order); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | if (CollectionUtils.isEmpty(shopProducts)) { |
| | | shopProduct.setDelFlag(AppConstance.DATA_USEABLE); |
| | | shopProduct.setStatus(AppConstance.IS_PUTAWAY); |
| | | if(shopProduct.getIsService()==null){ |
| | | shopProduct.setIsService(2); |
| | | } |
| | | shopProduct.setCompanyId(HostInterceptor.getCompanyId()); |
| | | shopProducts = shopProductDao.selectByModelWx(shopProduct); |
| | | } |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.biz.bean.BizUser; |
| | | import com.matrix.biz.dao.BizUserDao; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.VerifyResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | 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.dao.SysUsersDao; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.plugin.message.StringUtil; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.service.CodeService; |
| | | import com.matrix.system.hive.service.SysProjUseService; |
| | | import com.matrix.system.hive.service.SysWorkBeatuistaffService; |
| | | import com.matrix.system.hive.service.SysWorktimeService; |
| | | import com.matrix.system.shopXcx.bean.ShopProduct; |
| | | import com.matrix.system.hive.service.*; |
| | | import com.matrix.system.shopXcx.api.dto.ErpServiceCommentDto; |
| | | import com.matrix.system.shopXcx.api.dto.ErpServiceOrderListDto; |
| | | import com.matrix.system.shopXcx.api.vo.ErpServiceOrderListVo; |
| | | import com.matrix.system.shopXcx.dao.ShopProductDao; |
| | | import com.matrix.system.shopXcx.dao.ShopSkuDao; |
| | | import com.matrix.system.shopXcx.dto.YYDayOfWeek; |
| | | import com.matrix.system.shopXcx.dto.YYmonth; |
| | | import com.matrix.system.shopXcx.mqTask.DTO.UserProjInfo; |
| | | import com.matrix.system.shopXcx.mqTask.MQTaskRouting; |
| | | import com.matrix.system.shopXcx.shopEnum.TemplateMsgType; |
| | | import io.swagger.annotations.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | SysShopInfoDao shopInfoDao; |
| | | |
| | | @Autowired |
| | | private SysVipInfoDao vipDap; |
| | | private SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | private OnlinebookingDao onlinebookingDao; |
| | | @Autowired |
| | | private SysProjServicesService projServicesService; |
| | | |
| | | @Autowired |
| | | private SysProjServicesDao projServicesDao; |
| | | |
| | | @Autowired |
| | | private SysBeauticianStateService sysBeauticianStateService; |
| | | |
| | | @Autowired |
| | | RedisUserLoginUtils redisUserLoginUtils; |
| | |
| | | @Autowired |
| | | RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @Autowired |
| | | SysProjUseDao projUseDao; |
| | | |
| | | @Autowired |
| | | ShopSkuDao skuDao; |
| | | |
| | | @Autowired |
| | | ShoppingGoodsAssembleDao shoppingGoodsAssembleDao; |
| | |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/getUserPro/{phone}") |
| | | public @ResponseBody |
| | | @ResponseBody |
| | | public |
| | | AjaxResult getUserPro(@PathVariable String phone) { |
| | | SysVipInfo vipInfo = vipDap.selectByPhone(phone); |
| | | // 根据时间获取一段排班码 |
| | | Map<Object, Object> taocanProjMap = new HashMap<>(); |
| | | List<UserProjInfo> userProjInfoList = new ArrayList(); |
| | | SysProjUse sysProjUse = new SysProjUse(); |
| | | sysProjUse.setVipId(vipInfo.getId()); |
| | | sysProjUse.setIsOver(Dictionary.DELETED_N); |
| | | sysProjUse.setIsOver(Dictionary.DELETED_N); |
| | | sysProjUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | // 查询出该会员的所有可消耗的选择 |
| | | List<SysProjUse> sysProjUseList = projUseService.findByModel(sysProjUse); |
| | | for (int i = 0; i < sysProjUseList.size(); i++) { |
| | | if (sysProjUseList.get(i).getTaocanId() != null) { |
| | | String flag = sysProjUseList.get(i).getPlatformFlag(); |
| | | if (taocanProjMap.keySet().contains(flag)) { |
| | | ((UserProjInfo) taocanProjMap.get(flag)).getChildPro().add(coversion(sysProjUseList.get(i))); |
| | | } else { |
| | | SysProjUse pru = sysProjUseList.get(i); |
| | | UserProjInfo taocan = new UserProjInfo(); |
| | | taocan.setId(pru.getId()); |
| | | taocan.setName(pru.getProjName()); |
| | | taocan.setType(pru.getType()); |
| | | if (pru.getSurplusCount() > 10000) { |
| | | taocan.setSurplusCount("不限"); |
| | | } else { |
| | | taocan.setSurplusCount(pru.getSurplusCount() + ""); |
| | | } |
| | | taocan.setChildPro(new ArrayList<UserProjInfo>()); |
| | | taocan.getChildPro().add(coversion(pru)); |
| | | taocanProjMap.put(flag, taocan); |
| | | } |
| | | } else { |
| | | userProjInfoList.add(coversion(sysProjUseList.get(i))); |
| | | } |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(phone); |
| | | |
| | | if (vipInfo == null) { |
| | | throw new GlobleException("会员不存在"); |
| | | } |
| | | AjaxResult result = new AjaxResult(); |
| | | result.setStatus("200"); |
| | | result.setMapInfo(taocanProjMap); |
| | | result.setRows(userProjInfoList); |
| | | return result; |
| | | ServiceProductListVo productListVo = new ServiceProductListVo(); |
| | | productListVo.setName(vipInfo.getVipName()); |
| | | productListVo.setVipId(vipInfo.getId()); |
| | | |
| | | SysProjUse queryUse = new SysProjUse(); |
| | | queryUse.setVipId(vipInfo.getId()); |
| | | queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM); |
| | | queryUse.setTaocanId(-1L); |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | 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<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(sysProjUses); |
| | | item.setProj(taocanProj); |
| | | }); |
| | | } |
| | | |
| | | productListVo.setProj(serviceProjVos); |
| | | productListVo.setComposeProj(serviceTcVos); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("proj", productListVo); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | |
| | |
| | | public @ResponseBody |
| | | AjaxResult createServiceOrder(@RequestBody Onlinebooking onlinebooking) { |
| | | BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | bizUser = bizUserDao.findByOpenId(bizUser.getOpenId()); |
| | | SysVipInfo vipInfo = vipDap.selectByPhone(bizUser.getPhoneNumber()); |
| | | onlinebooking.setOrderNo(codeService.getServiceOrderCode()); |
| | | onlinebooking.setVipName(vipInfo.getVipName()); |
| | | onlinebooking.setVipId(vipInfo.getId()); |
| | | onlinebooking.setBizUserId(bizUser.getOpenId()); |
| | | onlinebooking.setStatus(Dictionary.ONLINEBOOKING_DFW); |
| | | onlinebooking.setCreateTime(new Date()); |
| | | onlinebooking.setTime(DateUtil.stringToDate(onlinebooking.getTimeStr(), DateUtil.DATE_FORMAT_MM)); |
| | | onlinebookingDao.insert(onlinebooking); |
| | | //发送消息通知 |
| | | JSONObject msg = new JSONObject(); |
| | | msg.put("templateMsgType", TemplateMsgType.APPOINTMENT_SUCCESS.getCode()); |
| | | msg.put("content", onlinebooking.getId()); |
| | | rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_TEMPLATE_MSG+evn, msg.toJSONString()); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, Collections.singletonList(onlinebooking)); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(bizUser.getPhoneNumber()); |
| | | SysProjUse sysProjUse = projUseDao.selectById(Long.parseLong(onlinebooking.getProductId() + "")); |
| | | Date yyTime = DateUtil.stringToDate(onlinebooking.getTimeStr(), DateUtil.DATE_FORMAT_MM); |
| | | SysProjServices sysProjServices = new SysProjServices(); |
| | | sysProjServices.setCompanyId(vipInfo.getCompanyId()); |
| | | sysProjServices.setShopId(onlinebooking.getShopId()); |
| | | sysProjServices.setVipId(vipInfo.getId()); |
| | | sysProjServices.setYyTime(yyTime); |
| | | sysProjServices.setRemark(onlinebooking.getRemark()); |
| | | |
| | | List<SysBeauticianState> sysBeauticianStates = new ArrayList<>(); |
| | | |
| | | SysBeauticianState sysBeauticianState = new SysBeauticianState(); |
| | | sysBeauticianState.setPuseId(sysProjUse.getId()); |
| | | sysBeauticianState.setProjUse(sysProjUse); |
| | | sysBeauticianState.setCount(1); |
| | | sysBeauticianState.setBeginTime(yyTime); |
| | | int timeLength=30; |
| | | if(sysProjUse.getTimeLength()!=null){ |
| | | timeLength=sysProjUse.getTimeLength(); |
| | | } |
| | | sysBeauticianState.setEndTime(DateUtil.getDateAfterMinute(yyTime, timeLength)); |
| | | if(onlinebooking.getStaffId()!=null){ |
| | | sysBeauticianState.setStaffId(Long.parseLong(onlinebooking.getStaffId()+"")); |
| | | } |
| | | |
| | | 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_DQR); |
| | | SysProjServices newSysProjServices = projServicesService.addSysProjServices(sysProjServices); |
| | | if (newSysProjServices != null) { |
| | | return AjaxResult.buildSuccessInstance("下单成功"); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "下单失败!"); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = " 根据id查询预约订单的详情", notes = " 根据id查询预约订单的详情") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = ErpServiceOrderListVo.class) |
| | | }) |
| | | @RequestMapping(value = "/getServiceOrderById/{id}") |
| | | public @ResponseBody |
| | | AjaxResult getServiceOrderById(@PathVariable Long id) { |
| | | |
| | | Onlinebooking onlinebooking = onlinebookingDao.selectById(id); |
| | | ShopProduct shopProduct = productDao.selectById(onlinebooking.getProductId()); |
| | | onlinebooking.setShopProduct(shopProduct); |
| | | if (onlinebooking.getStaffId() != null) { |
| | | SysUsers shopstaffInfo = staffInfoDao.selectById(Long.parseLong(onlinebooking.getStaffId() + "")); |
| | | onlinebooking.setStaffInfo(shopstaffInfo); |
| | | AjaxResult getServiceOrderById(@PathVariable("id") Long id) { |
| | | SysProjServices projServices = projServicesService.findById(id); |
| | | if (projServices == null) { |
| | | return AjaxResult.buildFailInstance("服务单不存在"); |
| | | } |
| | | SysShopInfo shopInfo = shopInfoDao.selectById(onlinebooking.getShopId()); |
| | | onlinebooking.setShopInfo(shopInfo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, "查询成功"); |
| | | result.putInMap("serviceOrder", onlinebooking); |
| | | return result; |
| | | |
| | | ErpServiceOrderListVo serviceOrder = projServicesDao.findWxServiceOrderById(id); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("detail", serviceOrder); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 订单列表查询 |
| | | * |
| | | * 查询服务单 |
| | | * @param orderListDto |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/getServiceOrderList") |
| | | public @ResponseBody |
| | | AjaxResult getServiceOrderList(@RequestBody Onlinebooking onlinebooking) { |
| | | @ApiOperation(value = "查询服务单列表", notes = "查询服务单列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = ErpServiceOrderListVo.class) |
| | | }) |
| | | @PostMapping(value = "/getServiceOrderList") |
| | | @ResponseBody |
| | | public AjaxResult findServiceOrderList(@RequestBody @Validated ErpServiceOrderListDto orderListDto) { |
| | | BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | onlinebooking.setBizUserId(bizUser.getOpenId()); |
| | | List<Onlinebooking> list = onlinebookingDao.selectInPageForWx(onlinebooking); |
| | | //相关数据赋值 |
| | | list.stream().forEach(order -> { |
| | | ShopProduct shopProduct = productDao.selectById(order.getProductId()); |
| | | order.setShopProduct(shopProduct); |
| | | if (order.getStaffId() != null) { |
| | | SysUsers shopstaffInfo = staffInfoDao.selectById(Long.parseLong(order.getStaffId() + "")); |
| | | order.setStaffInfo(shopstaffInfo); |
| | | } |
| | | SysShopInfo shopInfo = shopInfoDao.selectById(order.getShopId()); |
| | | order.setShopInfo(shopInfo); |
| | | }); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, "查询成功"); |
| | | result.setRows(list); |
| | | return result; |
| | | SysVipInfo vipInfo= vipInfoDao.selectByPhone(bizUser.getPhoneNumber()); |
| | | orderListDto.setVipId(vipInfo.getId()); |
| | | List<ErpServiceOrderListVo> apiServiceOrderListInPage = projServicesDao.findWxServiceOrderList(orderListDto); |
| | | return AjaxResult.buildSuccessInstance(apiServiceOrderListInPage,"查询成功"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消预约订单 |
| | |
| | | * @param |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/cancelOrderById") |
| | | @ApiOperation(value = "取消预约", notes = "取消预约") |
| | | @GetMapping(value = "/cancelOrderById/{id}") |
| | | public @ResponseBody |
| | | AjaxResult cancelOrderById(@RequestBody Onlinebooking onlinebooking) { |
| | | |
| | | AjaxResult result = new AjaxResult(); |
| | | if (onlinebooking.getId() == null) { |
| | | result.setStatus(AjaxResult.STATUS_FAIL); |
| | | result.setInfo("请求参数错误"); |
| | | AjaxResult cancelOrderById(@PathVariable Long id) { |
| | | SysProjServices services = new SysProjServices(); |
| | | services.setId(id); |
| | | int i = projServicesService.modifyCancelProjServices(services); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "取消预约成功"); |
| | | } else { |
| | | onlinebooking.setStatus(Dictionary.ONLINEBOOKING_YQX); |
| | | onlinebookingDao.update(onlinebooking); |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | result.setInfo("订单取消成功"); |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "取消预约失败"); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 删除订单 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/removeOrderById/{id}") |
| | | |
| | | @ApiOperation(value = "服务单评论", notes = "服务单评论") |
| | | @PostMapping(value = "/commentService") |
| | | public @ResponseBody |
| | | AjaxResult removeOrderById(@PathVariable Long id) { |
| | | onlinebookingDao.deleteById(id); |
| | | AjaxResult result = new AjaxResult(); |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | result.setInfo("删除成功"); |
| | | return result; |
| | | AjaxResult commentService(@RequestBody @Validated ErpServiceCommentDto commentDto) { |
| | | SysProjServices services = new SysProjServices(); |
| | | services.setId(commentDto.getId()); |
| | | services.setComment(commentDto.getComment()); |
| | | int i = projServicesDao.update(services); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "评论成功"); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "评论失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | private UserProjInfo coversion(SysProjUse pUse) { |
| | | UserProjInfo projInfo = new UserProjInfo(); |
| | | projInfo.setId(pUse.getId()); |
| | | projInfo.setName(shoppingGoodsDao.selectById(pUse.getProjId()).getName()); |
| | | projInfo.setSurplusCount(pUse.getSurplusCount() + ""); |
| | | projInfo.setType(pUse.getType()); |
| | | return projInfo; |
| | | } |
| | | |
| | | |
| | | private int dateToCodeInt(Date date) { |
| | | return Integer.parseInt(DateUtil.dateToString(date, DateUtil.HHmm)); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.shopXcx.api.dto; |
| | | |
| | | import com.matrix.core.pojo.PaginationDto; |
| | | import com.matrix.system.app.dto.BasePageDto; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author jyy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "ErpOrderListDto", description = "订单列表接收参数类") |
| | | public class ErpOrderListDto extends PaginationDto { |
| | | |
| | | @ApiModelProperty(value = "订单状态 0-全部 1-待付款 2-已付款 3-欠款 4-已取消 全部默认传空字符串", example = "1") |
| | | private Integer orderStatus; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "查询字段") |
| | | private String queryKey; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long vipId; |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | 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; |
| | | case 4: |
| | | this.status = "已取消"; |
| | | break; |
| | | default: |
| | | this.status = ""; |
| | | break; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.shopXcx.api.dto; |
| | | |
| | | import com.matrix.core.pojo.PaginationDto; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author jyy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "ErpServiceCommentDto", description = "服务评价") |
| | | public class ErpServiceCommentDto { |
| | | |
| | | |
| | | @NotNull(message = "评论内容不能为空") |
| | | @ApiModelProperty(value = "评论内容") |
| | | private String comment; |
| | | |
| | | @NotNull(message = "服务单id不能为空") |
| | | @ApiModelProperty(value = "服务单id") |
| | | private Long id; |
| | | |
| | | |
| | | public String getComment() { |
| | | return comment; |
| | | } |
| | | |
| | | public void setComment(String comment) { |
| | | this.comment = comment; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.shopXcx.api.dto; |
| | | |
| | | import com.matrix.core.pojo.PaginationDto; |
| | | import com.matrix.system.app.dto.BasePageDto; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * @author jyy |
| | | * @date 2020-12-24 |
| | | **/ |
| | | @ApiModel(value = "ErpServiceOrderListDto", description = "服务单列表参数接收类") |
| | | public class ErpServiceOrderListDto extends PaginationDto { |
| | | |
| | | @ApiModelProperty(value = "查询参数") |
| | | private String queryKey; |
| | | |
| | | @ApiModelProperty(value = "客户视角状态 0/全部 1/待确认 2进行中(待排班/待配料/待服务/服务中) 3/待评价(已完成/服务结束) 4/已评价 5/已取消 ") |
| | | private String vipStatus; |
| | | |
| | | @ApiModelProperty(value = "客户ID") |
| | | private Long vipId; |
| | | |
| | | public String getVipStatus() { |
| | | return vipStatus; |
| | | } |
| | | |
| | | public void setVipStatus(String vipStatus) { |
| | | this.vipStatus = vipStatus; |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | //Double refundMoney = 0.1 * 100; |
| | | //用户ID |
| | | String userId = WechatConfigure.mchID; |
| | | |
| | | if (isDebug) { |
| | | boolean b = weixinServiceUtil.comRefund(orderNo, refundNo, 1, 1, userId); |
| | | boolean b = weixinServiceUtil.comRefund(orderNo, refundNo, 1, 1, null); |
| | | flag = b; |
| | | } else { |
| | | LogUtil.info("开始调用退款接口。。。退款编号为", refundNo); |
| | | boolean b = weixinServiceUtil.comRefund(orderNo, refundNo, orMoney, reMoney, userId); |
| | | boolean b = weixinServiceUtil.comRefund(orderNo, refundNo, orMoney, reMoney, null); |
| | | flag = b; |
| | | } |
| | | |
New file |
| | |
| | | package com.matrix.system.shopXcx.api.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author jyy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "ErpOrderDetailFlowVo", description = "订单支付方式") |
| | | public class ErpOrderDetailFlowVo { |
| | | |
| | | |
| | | @ApiModelProperty(value = "支付方式") |
| | | private String payMethod; |
| | | |
| | | @ApiModelProperty(value = "支付金额") |
| | | private BigDecimal amount; |
| | | |
| | | public String getPayMethod() { |
| | | return payMethod; |
| | | } |
| | | |
| | | public void setPayMethod(String payMethod) { |
| | | this.payMethod = payMethod; |
| | | } |
| | | |
| | | public BigDecimal getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(BigDecimal amount) { |
| | | this.amount = amount; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.shopXcx.api.vo; |
| | | |
| | | import com.matrix.system.app.vo.OrderDetailAchieveItemVo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author jyy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "ErpOrderDetailItemVo", description = "订单详情明细表") |
| | | public class ErpOrderDetailItemVo { |
| | | |
| | | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | private String count; |
| | | |
| | | |
| | | @ApiModelProperty(value = "原价") |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty(value = "折扣价格") |
| | | private BigDecimal zkPrice; |
| | | |
| | | |
| | | 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 getPrice() { |
| | | return price; |
| | | } |
| | | |
| | | public void setPrice(BigDecimal price) { |
| | | this.price = price; |
| | | } |
| | | |
| | | public BigDecimal getZkPrice() { |
| | | return zkPrice; |
| | | } |
| | | |
| | | public void setZkPrice(BigDecimal zkPrice) { |
| | | this.zkPrice = zkPrice; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.shopXcx.api.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.app.vo.OrderDetailItemVo; |
| | | import com.matrix.system.hive.bean.SysOrderFlow; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author jyy |
| | | * @date 2020-12-23 |
| | | **/ |
| | | @ApiModel(value = "ErpOrderDetailVo", description = "订单详情返回参数类") |
| | | public class ErpOrderDetailVo { |
| | | |
| | | @ApiModelProperty(value = "订单ID") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty(value = "订单号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value = "顾问姓名") |
| | | private String staffName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "应付金额") |
| | | private BigDecimal needPay; |
| | | |
| | | @ApiModelProperty(value = "实付金额") |
| | | private BigDecimal realPay; |
| | | |
| | | @ApiModelProperty(value = "优惠金额") |
| | | private BigDecimal discount; |
| | | |
| | | @ApiModelProperty(value = "订单明细") |
| | | private List<ErpOrderDetailItemVo> items; |
| | | |
| | | @ApiModelProperty(value = "支付流水") |
| | | private List<ErpOrderDetailFlowVo> flow; |
| | | |
| | | @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 List<ErpOrderDetailFlowVo> getFlow() { |
| | | return flow; |
| | | } |
| | | |
| | | public void setFlow(List<ErpOrderDetailFlowVo> flow) { |
| | | this.flow = flow; |
| | | } |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | public String getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(String orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | 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 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; |
| | | } |
| | | |
| | | public List<ErpOrderDetailItemVo> getItems() { |
| | | return items; |
| | | } |
| | | |
| | | public void setItems(List<ErpOrderDetailItemVo> items) { |
| | | this.items = items; |
| | | } |
| | | |
| | | public String getOrderStatus() { |
| | | return orderStatus; |
| | | } |
| | | |
| | | public void setOrderStatus(String orderStatus) { |
| | | this.orderStatus = orderStatus; |
| | | } |
| | | |
| | | public BigDecimal getArrears() { |
| | | return arrears; |
| | | } |
| | | |
| | | public void setArrears(BigDecimal arrears) { |
| | | this.arrears = arrears; |
| | | } |
| | | |
| | | public Date getOrderTime() { |
| | | return orderTime; |
| | | } |
| | | |
| | | public void setOrderTime(Date orderTime) { |
| | | this.orderTime = orderTime; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.shopXcx.api.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | @ApiModel(value = "ErpServiceOrderListProjVo", description = "服务单列表项目返回参数类") |
| | | public class ErpServiceOrderListProjVo { |
| | | |
| | | |
| | | @ApiModelProperty(value = "项目名称") |
| | | private String projName; |
| | | |
| | | @ApiModelProperty(value = "项目图片") |
| | | private String imgMobile; |
| | | |
| | | @ApiModelProperty(value = "美疗师") |
| | | private String beautyName=""; |
| | | |
| | | public String getImgMobile() { |
| | | return imgMobile; |
| | | } |
| | | |
| | | public void setImgMobile(String imgMobile) { |
| | | this.imgMobile = imgMobile; |
| | | } |
| | | |
| | | 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.shopXcx.api.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.app.vo.ServiceOrderListProjVo; |
| | | 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 ErpServiceOrderListVo { |
| | | |
| | | @ApiModelProperty(value = "服务单Id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "服务单编号") |
| | | private String serviceNo; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "预约时间") |
| | | private Date time; |
| | | |
| | | @ApiModelProperty(value = "服务时长") |
| | | private Integer timeLength; |
| | | |
| | | @ApiModelProperty(value = "状态 待预约 待派单 待配料 待服务 服务中 服务完成 服务单结束") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty(value = "门店地址") |
| | | private String shopAddr; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "床位") |
| | | private String bed; |
| | | |
| | | @ApiModelProperty(value = "客户评论") |
| | | private String comment=""; |
| | | |
| | | @ApiModelProperty(value = "员工回复") |
| | | private String reply; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "服务项目信息") |
| | | private List<ErpServiceOrderListProjVo> projs; |
| | | |
| | | |
| | | public String getComment() { |
| | | return comment; |
| | | } |
| | | |
| | | public void setComment(String comment) { |
| | | this.comment = comment; |
| | | } |
| | | |
| | | public String getReply() { |
| | | return reply; |
| | | } |
| | | |
| | | public void setReply(String reply) { |
| | | this.reply = reply; |
| | | } |
| | | |
| | | 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 getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | public String getShopAddr() { |
| | | return shopAddr; |
| | | } |
| | | |
| | | public void setShopAddr(String shopAddr) { |
| | | this.shopAddr = shopAddr; |
| | | } |
| | | |
| | | 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 void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public List<ErpServiceOrderListProjVo> getProjs() { |
| | | return projs; |
| | | } |
| | | |
| | | public void setProjs(List<ErpServiceOrderListProjVo> projs) { |
| | | this.projs = projs; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 模板类型 1,公众号,2,小程序 |
| | | */ |
| | | private Integer tempType; |
| | | |
| | | |
| | | /** |
| | | * 取数模板类 |
| | | */ |
| | | private String templateClass; |
| | | |
| | | /** |
| | | * 模板备注 |
| | |
| | | } |
| | | } |
| | | |
| | | public void buildDicMap(Object value) { |
| | | if (value != null) { |
| | | STATUS[] statusArray = STATUS.values(); |
| | | for (STATUS s : statusArray) { |
| | | if (s.getCode().equals(value)) { |
| | | getDicMap().put("status", s.getName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | public enum TempType { |
| | | |
| | | MP("公众号", 1), |
| | | |
| | | APP("小程序", 2); |
| | | |
| | | private TempType(String name, int code) { |
| | | this.name = name; |
| | | this.code = code; |
| | | } |
| | | |
| | | private String name; |
| | | private Integer code; |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Integer getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(Integer code) { |
| | | this.code = code; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public void setStatus(Integer status) { |
| | | buildDicMap(status); |
| | | |
| | | buildDicMap("status"); |
| | | |
| | | if (status != null) { |
| | | STATUS[] statusArray = STATUS.values(); |
| | | for (STATUS s : statusArray) { |
| | | if (s.getCode().equals(status)) { |
| | | getDicMap().put("status", s.getName()); |
| | | } |
| | | } |
| | | } |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getTemplateClass() { |
| | | return templateClass; |
| | | } |
| | | |
| | | public void setTemplateClass(String templateClass) { |
| | | |
| | | this.templateClass = templateClass; |
| | | } |
| | | |
| | | public Integer getTempType() { |
| | | |
| | | return tempType; |
| | | } |
| | | |
| | | public void setTempType(Integer tempType) { |
| | | if (tempType != null) { |
| | | TempType[] statusArray = TempType.values(); |
| | | for (TempType s : statusArray) { |
| | | if (s.getCode().equals(tempType)) { |
| | | getDicMap().put("tempType", s.getName()); |
| | | } |
| | | } |
| | | } |
| | | this.tempType = tempType; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | |
| | | */ |
| | | List<ShopProduct> selectByIds(@Param("ids") List<Integer> ids); |
| | | |
| | | List<String> selectProductNameByIds(@Param("ids") List<Integer> ids); |
| | | |
| | | List<ShopProduct> selectProductByAttrid(@Param("attrId") String attrId,@Param("shopId") Long shopId); |
| | | |
| | | |
| | |
| | | |
| | | public int deleteById(Integer id); |
| | | |
| | | public ShopWxtemplateMsg selectByCode(Integer code); |
| | | public ShopWxtemplateMsg selectByCode(@Param("code") Integer code, @Param("companyId") Long companyId); |
| | | |
| | | public int deleteByModel(@Param("record") ShopWxtemplateMsg shopWxtemplateMsg); |
| | | |
| | |
| | | * 发送微信消息 |
| | | */ |
| | | String SEND_TEMPLATE_MSG = "SEND_TEMPLATE_MSG"; |
| | | |
| | | /** |
| | | * 发送小程序统一模板消息 |
| | | */ |
| | | String SEND_UNIFORM_TEMPLATE_MSG = "SEND_UNIFORM_TEMPLATE_MSG"; |
| | | |
| | | /** |
| | | * 订单出库 |
| | | */ |
| | |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.ShoppingGoods; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.bean.SysOrderItem; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysOrderDao; |
| | | import com.matrix.system.hive.dao.SysOrderItemDao; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.service.CodeService; |
| | | import com.matrix.system.hive.service.ShoppingGoodsService; |
| | | import com.matrix.system.hive.service.SysOrderService; |
| | |
| | | import com.rabbitmq.client.DeliverCallback; |
| | | import com.rabbitmq.client.Delivery; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 微商城订单同步到erp系统 |
| | | */ |
| | | @Component |
| | | public class OrderTask implements DeliverCallback { |
| | | |
| | | |
| | |
| | | @Autowired |
| | | BusParameterSettingsDao parameterSettingsDao; |
| | | |
| | | @Autowired |
| | | private SysOrderFlowDao sysOrderFlowDao; |
| | | |
| | | @Autowired |
| | | private ShoppingGoodsDao shoppingGoodsDao; |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void createOrder(ShopOrder orderDto) { |
| | | |
| | |
| | | } |
| | | |
| | | //获取订单归属门店 |
| | | order.setCompanyId(vipInfo.getCompanyId()); |
| | | order.setShopId(Long.parseLong(orderDto.getStoreId()+"")); |
| | | //同步的订单订单编号保持一致 |
| | | order.setOrderNo(orderDto.getOrderNo()); |
| | |
| | | order.setCashPay(orderDto.getOrderMoney().doubleValue()); |
| | | order.setTotal(orderDto.getOrderMoney().doubleValue()); |
| | | order.setZkTotal(orderDto.getOrderMoney().doubleValue()); |
| | | order.setPayTime(new Date()); |
| | | order.setArrears(0); |
| | | int i = sysOrderDao.insert(order); |
| | | // 创建订单明细,并计算总价与折扣总价 |
| | |
| | | orderItem.setPrice(orderItemDto.getPrice().doubleValue()); |
| | | orderItem.setZkPrice(orderItemDto.getPrice().doubleValue()); |
| | | orderItem.setGoodsId(shoppingGoods.getId()); |
| | | if (shoppingGoods.getGoodType().equals(Dictionary.SHOPPING_GOODS_TYPE_JJCP)) { |
| | | orderItem.setAssembleId(shoppingGoods.getAssembleGoods().get(0).getId()); |
| | | } else if (shoppingGoods.getGoodType().equals(Dictionary.SHOPPING_GOODS_TYPE_XM)) { |
| | | orderItem.setAssembleId(shoppingGoods.getAssembleProj().get(0).getId()); |
| | | } |
| | | |
| | | // 设置对应产品的id |
| | | switch (shoppingGoods.getGoodType()) { |
| | |
| | | // 设置销量 |
| | | orderService.setShopSelCount(sourceOrder); |
| | | |
| | | SysOrderFlow flow = new SysOrderFlow(); |
| | | flow.setFlowNo(codeService.getFlowCode() + "-" + i); |
| | | Long goodsId = sourceOrder.getItems().get(0).getGoodsId(); |
| | | ShoppingGoods goods = shoppingGoodsDao.selectById(goodsId); |
| | | flow.setFlowContent(goods.getName() + "等" + sourceOrder.getItems().size() + "件产品"); |
| | | |
| | | flow.setOrderId(sourceOrder.getId()); |
| | | flow.setVipId(sourceOrder.getVipId()); |
| | | flow.setFlowType(SysOrderFlow.FLOW_TYPE_BUY); |
| | | |
| | | flow.setAmount(orderDto.getOrderMoney()); |
| | | flow.setPayMethod("微信"); |
| | | |
| | | flow.setShopId(sourceOrder.getShopId()); |
| | | flow.setCompanyId(sourceOrder.getCompanyId()); |
| | | sysOrderFlowDao.insert(flow); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | import com.matrix.biz.service.BizUserService; |
| | | import com.matrix.component.rabbitmq.MqTask; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | |
| | | SysVipInfo vip = vipDap.selectByPhone(userInfo.getPhoneNumber()); |
| | | if (vip != null) { |
| | | LogUtil.warn("会员{}已经存在", userInfo.getPhoneNumber()); |
| | | //更新信息 |
| | | vip.setOpenId(userInfo.getOpenId()); |
| | | if(StringUtils.isBlank(vip.getPhoto())){ |
| | | vip.setPhoto(userInfo.getAvatarUrl()); |
| | | } |
| | | vipDap.update(vip); |
| | | } else { |
| | | SysVipInfo vipInfo = new SysVipInfo(); |
| | | //在备注记下微商城的用户id |
| | | vipInfo.setRemark(userInfo.getOpenId()); |
| | | vipInfo.setOpenId(userInfo.getOpenId()); |
| | | vipInfo.setAddr(userInfo.getProvince() + " " + userInfo.getCity()); |
| | | vipInfo.setPhone(userInfo.getPhoneNumber()); |
| | | if(StringUtils.isBlank(vipInfo.getPhoto())){ |
| | | vipInfo.setPhoto(userInfo.getAvatarUrl()); |
| | | } |
| | | if (userInfo.getGender() != null) { |
| | | vipInfo.setSex(userInfo.getGender().equals("1") ? "男" : "女"); |
| | | } |
| | | vipInfo.setVipName(userInfo.getNickName()); |
| | | vipInfo.setCompanyId(userInfo.getCompanyId()); |
| | | vipInfo.setShopId(shopId); |
| | | vipInfo.setArrivalWay("微商城"); |
| | | vipInfo.setVipState(Dictionary.VIP_STATE_HY); |
| | |
| | | SysShopInfo shopInfo = shopInfoDao.selectById(onlinebooking.getShopId()); |
| | | |
| | | //获取模板id |
| | | ShopWxtemplateMsg wxtemplateMsg = wxtemplateMsgDao.selectByCode(TemplateMsgType.APPOINTMENT_SUCCESS.getCode()); |
| | | ShopWxtemplateMsg wxtemplateMsg = wxtemplateMsgDao.selectByCode(TemplateMsgType.APPOINTMENT_SUCCESS.getCode(), 17L); |
| | | |
| | | |
| | | String page = "pages/yuyue/yyInfo?id=" + orderId + "&model=1"; |
New file |
| | |
| | | package com.matrix.system.wechart.templateMsg; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aliyuncs.utils.HttpsUtils; |
| | | import org.apache.commons.collections.map.HashedMap; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 公众号模板消息对象 |
| | | */ |
| | | public class GzhTemplateMessagePojo { |
| | | |
| | | private String appid; |
| | | private String touser; |
| | | private String template_id; |
| | | private String url; |
| | | private Miniprogram miniprogram; |
| | | public static class Miniprogram{ |
| | | private String appid; |
| | | private String pagepath; |
| | | |
| | | public Miniprogram(String appid, String pagepath) { |
| | | this.appid = appid; |
| | | this.pagepath = pagepath; |
| | | } |
| | | |
| | | public String getAppid() { |
| | | return appid; |
| | | } |
| | | |
| | | public void setAppid(String appid) { |
| | | this.appid = appid; |
| | | } |
| | | |
| | | public String getPagepath() { |
| | | return pagepath; |
| | | } |
| | | |
| | | public void setPagepath(String pagepath) { |
| | | this.pagepath = pagepath; |
| | | } |
| | | } |
| | | public Map<String ,Item> data=new HashedMap(); |
| | | public static class Item{ |
| | | private String value; |
| | | private String color; |
| | | |
| | | public Item(String value, String color) { |
| | | this.value = value; |
| | | this.color = color; |
| | | } |
| | | |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | public String getColor() { |
| | | return color; |
| | | } |
| | | |
| | | public void setColor(String color) { |
| | | this.color = color; |
| | | } |
| | | } |
| | | |
| | | |
| | | public String getAppid() { |
| | | return appid; |
| | | } |
| | | |
| | | public void setAppid(String appid) { |
| | | this.appid = appid; |
| | | } |
| | | |
| | | public void setMiniprogram(String appid, String url){ |
| | | this.setMiniprogram(new Miniprogram(appid,url)); |
| | | } |
| | | public void setFirst(String value, String color){ |
| | | this.data.put("first",new Item(value,color)); |
| | | } |
| | | |
| | | public void setKeyWord(String value, String color){ |
| | | this.data.put("keyword"+(this.data.size()),new Item(value,color)); |
| | | } |
| | | public void setRemark(String value, String color){ |
| | | this.data.put("remark",new Item(value,color)); |
| | | } |
| | | |
| | | public Miniprogram getMiniprogram() { |
| | | return miniprogram; |
| | | } |
| | | |
| | | public void setMiniprogram(Miniprogram miniprogram) { |
| | | this.miniprogram = miniprogram; |
| | | } |
| | | |
| | | public Map<String, Item> getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setData(Map<String, Item> data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | public String getTouser() { |
| | | return touser; |
| | | } |
| | | |
| | | public void setTouser(String touser) { |
| | | this.touser = touser; |
| | | } |
| | | |
| | | public String getTemplate_id() { |
| | | return template_id; |
| | | } |
| | | |
| | | public void setTemplate_id(String template_id) { |
| | | this.template_id = template_id; |
| | | } |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.wechart.templateMsg.Task; |
| | | |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgPojo; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 动态构建消息主体内容 |
| | | * @author jyy |
| | | * |
| | | */ |
| | | public interface TemplateMessageBulder { |
| | | /** |
| | | * * 返回的map中 如果包含错误消息用error属性来表示 |
| | | * @param param |
| | | * @return |
| | | */ |
| | | Map buildMsg(Map param); |
| | | } |
New file |
| | |
| | | package com.matrix.system.wechart.templateMsg.Task; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.biz.bean.BizUser; |
| | | import com.matrix.biz.service.BizUserService; |
| | | import com.matrix.component.tools.HttpClientUtil; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.rr.GlueFactory; |
| | | 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.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysProjServicesDao; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.shopXcx.api.WeChatGzhApiTools; |
| | | import com.matrix.system.shopXcx.bean.ShopWxtemplateMsg; |
| | | import com.matrix.system.shopXcx.dao.ShopWxtemplateMsgDao; |
| | | import com.matrix.system.wechart.templateMsg.GzhTemplateMessagePojo; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgPojo; |
| | | import com.rabbitmq.client.DeliverCallback; |
| | | import com.rabbitmq.client.Delivery; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.commons.collections.map.HashedMap; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 小程序统一消息模板消息发送提醒 |
| | | * @author jyy |
| | | */ |
| | | @Component |
| | | public class UniformMsgSentTask implements DeliverCallback { |
| | | |
| | | @Autowired |
| | | private ShopWxtemplateMsgDao shopWxtemplateMsgDao; |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 发送模板消息需要传JSONO字符串作为格式 |
| | | * 例如:{"companyId":17} |
| | | * companyId 是必须属性 |
| | | * @param consumerTag |
| | | * @param message |
| | | * @throws IOException |
| | | */ |
| | | @Override |
| | | public void handle(String consumerTag, Delivery message) throws IOException { |
| | | try { |
| | | String messages = new String(message.getBody(), "UTF-8"); |
| | | JSONObject messageJsonParam=JSONObject.parseObject(messages); |
| | | |
| | | if(!messageJsonParam.containsKey("companyId")||(!messageJsonParam.containsKey("templateCode"))){ |
| | | LogUtil.error("小程序消息推送参数格式异常发送模板消息需要传JSONO字符串作为格式 例如:{\"companyId\":17,\"templateCode\":10000} companyId 、templateCode 是必须属性"); |
| | | return; |
| | | } |
| | | Long companyId = Long.parseLong( messageJsonParam.get("companyId").toString()); |
| | | Integer templateCode = Integer.parseInt( messageJsonParam.get("templateCode").toString()); |
| | | |
| | | //获取公司微信配置参数 |
| | | BusParameterSettings xcxAppId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId); |
| | | BusParameterSettings xcxSecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_SECRET, companyId); |
| | | BusParameterSettings gzhAppid = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.GZH_APPID, companyId); |
| | | //获取消息模板 |
| | | ShopWxtemplateMsg template = shopWxtemplateMsgDao.selectByCode(templateCode,companyId); |
| | | //校验参数 |
| | | if(xcxAppId==null||xcxSecret==null||gzhAppid==null||template==null){ |
| | | LogUtil.error("小程序消息推送配置缺失xcxAppId="+xcxAppId+";xcxSecret="+xcxSecret+";gzhAppid="+gzhAppid+";template="+template); |
| | | return; |
| | | } |
| | | //获取模板动态构建类 |
| | | TemplateMessageBulder templateMessageBulder = (TemplateMessageBulder) GlueFactory.getInstance().loadInstance(template.getTemplateClass()); |
| | | //为模板动态类装备必要的参数 |
| | | Map<String, Object> bulderParam = new HashedMap(); |
| | | bulderParam.put("xcxAppId", xcxAppId.getParamValue()); |
| | | bulderParam.put("gzhAppid", gzhAppid.getParamValue()); |
| | | bulderParam.put("template_id", template.getUuid()); |
| | | bulderParam.put("messageJsonParam", messageJsonParam); |
| | | //调用模板计算出消息体 |
| | | Map msgResult = templateMessageBulder.buildMsg(bulderParam); |
| | | |
| | | if(msgResult.containsKey("error")){ |
| | | //错误消息处理 |
| | | LogUtil.error("模板消息发送内容:"+msgResult.get("error")); |
| | | return; |
| | | }else{ |
| | | //正常返回消息 |
| | | List msgList = (List) msgResult.get("msgList"); |
| | | //获取acceToken |
| | | String ACCESS_TOKEN = WeChatGzhApiTools.getAccessToken(xcxAppId.getParamValue(), xcxSecret.getParamValue()); |
| | | String url = "https://api.weixin.qq.com/cgi-bin/message/wxopen/template/uniform_send?access_token=ACCESS_TOKEN".replaceAll("ACCESS_TOKEN", ACCESS_TOKEN); |
| | | for (Object msg : msgList) { |
| | | UniformMsgPojo uniformMsgPojo = (UniformMsgPojo) msg; |
| | | LogUtil.debug("微信小程序模板消息推送:" + JSONObject.toJSON(uniformMsgPojo).toString()); |
| | | //推送消息到微信 |
| | | JSONObject result = HttpClientUtil.sendPostWithJson(url, JSONObject.toJSON(uniformMsgPojo).toString()); |
| | | //微信返回值 |
| | | LogUtil.debug("微信小程序模板消息推送结果:" + result.toString()); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | LogUtil.error("消费者执行异常", e); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.wechart.templateMsg.Task.messageBulderDemo; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.bean.SysOrderItem; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.wechart.templateMsg.GzhTemplateMessagePojo; |
| | | import com.matrix.system.wechart.templateMsg.Task.TemplateMessageBulder; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgPojo; |
| | | import org.apache.commons.collections.map.HashedMap; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 充值成功提醒 |
| | | */ |
| | | @Component |
| | | public class CzcgTemplateMessageBulder implements TemplateMessageBulder { |
| | | |
| | | @Autowired |
| | | SysOrderDao orderDao; |
| | | |
| | | @Autowired |
| | | SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | private SysBeauticianStateDao beauticianStateDao; |
| | | |
| | | @Autowired |
| | | private SysShopInfoDao shopInfoDao; |
| | | |
| | | @Autowired |
| | | private SysOrderItemDao orderItemDao; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Map buildMsg(Map param) { |
| | | |
| | | //返回参数 |
| | | Map builParam=new HashedMap(); |
| | | //获取基础公共参数 |
| | | String gzhAppid= (String) param.get("gzhAppid"); |
| | | String template_id= (String) param.get("template_id"); |
| | | String xcxAppId= (String) param.get("xcxAppId"); |
| | | //模板消息列表 |
| | | List msgList=new ArrayList(); |
| | | |
| | | //触发点传送的json参数 |
| | | JSONObject messageJsonParam= (JSONObject) param.get("messageJsonParam"); |
| | | //构建消息主体 |
| | | Long orderId= (Long) messageJsonParam.get("orderId"); |
| | | SysOrder sysOrder = orderDao.selectById(orderId); |
| | | List<SysOrderItem> sysOrderItems = orderItemDao.selectByOrderId(orderId); |
| | | |
| | | //校验客户openId (必须) |
| | | SysVipInfo vipInfo=vipInfoDao.selectById(sysOrder.getVipId()); |
| | | String touser= vipInfo.getOpenId(); |
| | | if(StringUtils.isBlank(touser)){ |
| | | builParam.put("error","未获取到"+vipInfo.getVipName()+"用户小程序openid"); |
| | | return builParam; |
| | | } |
| | | |
| | | |
| | | //自定义信息区START========================================================================================================= |
| | | SysShopInfo sysShopInfo = shopInfoDao.selectById(sysOrder.getShopId()); |
| | | String time= DateUtil.dateFormatStr(sysOrder.getPayTime(),DateUtil.DATE_FORMAT_MM); |
| | | |
| | | //如果一个项目存在多个护理项目则发送多次消息 |
| | | String first="您好!充值余额成功"; |
| | | for (SysOrderItem orderItem:sysOrderItems){ |
| | | first+=orderItem.getShoppingGoods().getName()+"x"+orderItem.getCount()+","; |
| | | } |
| | | first=first.substring(0,first.length()); |
| | | UniformMsgPojo uniformMsgPojo=new UniformMsgPojo(); |
| | | GzhTemplateMessagePojo messagePojo=new GzhTemplateMessagePojo(); |
| | | uniformMsgPojo.setTouser(touser); |
| | | messagePojo.setTemplate_id(template_id); |
| | | messagePojo.setAppid(gzhAppid); |
| | | //个性参数设置 |
| | | messagePojo.setFirst(first,"#453454"); |
| | | messagePojo.setKeyWord(sysShopInfo.getShopName(),"#453454"); |
| | | messagePojo.setKeyWord(vipInfo.getVipNo(),"#453454"); |
| | | messagePojo.setKeyWord(time,"#453454"); |
| | | messagePojo.setKeyWord(sysOrder.getZkTotal()+"","#453454"); |
| | | messagePojo.setRemark("点击【详情】可查询订单明细,若非本人或授权操作,请及时与门店联系","#453454"); |
| | | |
| | | //小程序配置 |
| | | GzhTemplateMessagePojo.Miniprogram miniprogram=new GzhTemplateMessagePojo.Miniprogram(xcxAppId, |
| | | "pages/purchaseRecords/detail?id="+orderId); |
| | | messagePojo.setMiniprogram(miniprogram); |
| | | |
| | | |
| | | uniformMsgPojo.setMp_template_msg(messagePojo); |
| | | //自定义信息区END========================================================================================================= |
| | | |
| | | //返回调用者使用的参数(必须) |
| | | msgList.add(uniformMsgPojo); |
| | | builParam.put("msgList",msgList); |
| | | return builParam; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.wechart.templateMsg.Task.messageBulderDemo; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.bean.SysOrderItem; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.wechart.templateMsg.GzhTemplateMessagePojo; |
| | | import com.matrix.system.wechart.templateMsg.Task.TemplateMessageBulder; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgPojo; |
| | | import org.apache.commons.collections.map.HashedMap; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 订单取消提醒 |
| | | */ |
| | | @Component |
| | | public class DdqxTemplateMessageBulder implements TemplateMessageBulder { |
| | | |
| | | @Autowired |
| | | SysOrderDao orderDao; |
| | | |
| | | @Autowired |
| | | SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | private SysBeauticianStateDao beauticianStateDao; |
| | | |
| | | @Autowired |
| | | private SysShopInfoDao shopInfoDao; |
| | | |
| | | @Autowired |
| | | private SysOrderItemDao orderItemDao; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Map buildMsg(Map param) { |
| | | |
| | | //返回参数 |
| | | Map builParam=new HashedMap(); |
| | | //获取基础公共参数 |
| | | String gzhAppid= (String) param.get("gzhAppid"); |
| | | String template_id= (String) param.get("template_id"); |
| | | String xcxAppId= (String) param.get("xcxAppId"); |
| | | //模板消息列表 |
| | | List msgList=new ArrayList(); |
| | | |
| | | //触发点传送的json参数 |
| | | JSONObject messageJsonParam= (JSONObject) param.get("messageJsonParam"); |
| | | //构建消息主体 |
| | | Long orderId= (Long) messageJsonParam.get("orderId"); |
| | | SysOrder sysOrder = orderDao.selectById(orderId); |
| | | List<SysOrderItem> sysOrderItems = orderItemDao.selectByOrderId(orderId); |
| | | |
| | | //校验客户openId (必须) |
| | | SysVipInfo vipInfo=vipInfoDao.selectById(sysOrder.getVipId()); |
| | | String touser= vipInfo.getOpenId(); |
| | | if(StringUtils.isBlank(touser)){ |
| | | builParam.put("error","未获取到"+vipInfo.getVipName()+"用户小程序openid"); |
| | | return builParam; |
| | | } |
| | | |
| | | |
| | | //自定义信息区START========================================================================================================= |
| | | SysShopInfo sysShopInfo = shopInfoDao.selectById(sysOrder.getShopId()); |
| | | String time= DateUtil.dateFormatStr(sysOrder.getPayTime(),DateUtil.DATE_FORMAT_MM); |
| | | |
| | | //如果一个项目存在多个护理项目则发送多次消息 |
| | | String first="您好!您的订单已取消!"; |
| | | String goodsName=""; |
| | | for (SysOrderItem orderItem:sysOrderItems){ |
| | | goodsName+=orderItem.getShoppingGoods().getName()+"x"+orderItem.getCount()+","; |
| | | } |
| | | goodsName=goodsName.substring(0,first.length()); |
| | | UniformMsgPojo uniformMsgPojo=new UniformMsgPojo(); |
| | | GzhTemplateMessagePojo messagePojo=new GzhTemplateMessagePojo(); |
| | | uniformMsgPojo.setTouser(touser); |
| | | messagePojo.setTemplate_id(template_id); |
| | | messagePojo.setAppid(gzhAppid); |
| | | //个性参数设置 |
| | | messagePojo.setFirst(first,"#453454"); |
| | | messagePojo.setKeyWord(sysOrder.getOrderNo(),"#453454"); |
| | | messagePojo.setKeyWord(goodsName,"#453454"); |
| | | messagePojo.setKeyWord(time,"#453454"); |
| | | messagePojo.setRemark("如有需要,请重新下单 ,点击【详情】可查询订单明细,若非本人或授权操作,请及时与门店联系","#453454"); |
| | | |
| | | //小程序配置 |
| | | GzhTemplateMessagePojo.Miniprogram miniprogram=new GzhTemplateMessagePojo.Miniprogram(xcxAppId, |
| | | "pages/purchaseRecords/detail?id="+orderId); |
| | | messagePojo.setMiniprogram(miniprogram); |
| | | |
| | | |
| | | uniformMsgPojo.setMp_template_msg(messagePojo); |
| | | //自定义信息区END========================================================================================================= |
| | | |
| | | //返回调用者使用的参数(必须) |
| | | msgList.add(uniformMsgPojo); |
| | | builParam.put("msgList",msgList); |
| | | return builParam; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.wechart.templateMsg.Task.messageBulderDemo; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.biz.bean.BizUser; |
| | | import com.matrix.biz.dao.BizUserDao; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysBeauticianStateDao; |
| | | import com.matrix.system.hive.dao.SysProjServicesDao; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.wechart.templateMsg.GzhTemplateMessagePojo; |
| | | import com.matrix.system.wechart.templateMsg.Task.TemplateMessageBulder; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgPojo; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.commons.collections.map.HashedMap; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 某个公司客户的定制消息模板 |
| | | */ |
| | | @Component |
| | | public class DefaultTemplateMessageBulder implements TemplateMessageBulder { |
| | | |
| | | @Autowired |
| | | SysProjServicesDao projServicesDao; |
| | | |
| | | @Autowired |
| | | SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | private SysBeauticianStateDao beauticianStateDao; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Map buildMsg(Map param) { |
| | | |
| | | //返回参数 |
| | | Map builParam=new HashedMap(); |
| | | |
| | | |
| | | //获取基础公共参数 |
| | | String gzhAppid= (String) param.get("gzhAppid"); |
| | | String template_id= (String) param.get("template_id"); |
| | | //触发点传送的json参数 |
| | | JSONObject messageJsonParam= (JSONObject) param.get("messageJsonParam"); |
| | | |
| | | Long serviceId= (Long) messageJsonParam.get("serviceId"); |
| | | |
| | | |
| | | //构建消息主体 |
| | | SysProjServices sysProjServices = projServicesDao.selectById(serviceId); |
| | | |
| | | |
| | | //补充服务单扩展信息=============== |
| | | List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(sysProjServices.getId()); |
| | | |
| | | SysVipInfo vipInfo=vipInfoDao.selectById(sysProjServices.getVipId()); |
| | | String touser= vipInfo.getOpenId(); |
| | | if(StringUtils.isBlank(touser)){ |
| | | builParam.put("error","未获取到"+vipInfo.getVipName()+"用户小程序openid"); |
| | | return builParam; |
| | | } |
| | | |
| | | String time= DateUtil.dateFormatStr(sysProjServices.getConsumeTime(),DateUtil.DATE_FORMAT_MM); |
| | | List msgList=new ArrayList(); |
| | | //如果一个项目存在多个护理项目则发送多次消息 |
| | | for (SysBeauticianState beauticianState:beauticianStateList){ |
| | | UniformMsgPojo uniformMsgPojo=new UniformMsgPojo(); |
| | | GzhTemplateMessagePojo messagePojo=new GzhTemplateMessagePojo(); |
| | | uniformMsgPojo.setTouser(touser); |
| | | messagePojo.setTemplate_id(template_id); |
| | | messagePojo.setAppid(gzhAppid); |
| | | |
| | | |
| | | //个性参数设置 |
| | | Integer suplerTimes= beauticianState.getProjUse().getSurplusCount(); |
| | | messagePojo.setFirst("尊敬的:"+vipInfo.getVipName(),"#453454"); |
| | | messagePojo.setKeyWord(beauticianState.getProjInfo().getName(),"#453454"); |
| | | messagePojo.setKeyWord(time,"#453454"); |
| | | messagePojo.setRemark("您的护理项目剩余"+suplerTimes+"次。","#453454"); |
| | | uniformMsgPojo.setMp_template_msg(messagePojo); |
| | | |
| | | |
| | | msgList.add(uniformMsgPojo); |
| | | } |
| | | |
| | | builParam.put("msgList",msgList); |
| | | return builParam; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.wechart.templateMsg.Task.messageBulderDemo; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | 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.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysBeauticianStateDao; |
| | | import com.matrix.system.hive.dao.SysProjServicesDao; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.wechart.templateMsg.GzhTemplateMessagePojo; |
| | | import com.matrix.system.wechart.templateMsg.Task.TemplateMessageBulder; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgPojo; |
| | | import org.apache.commons.collections.map.HashedMap; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 服务完成提醒 |
| | | */ |
| | | @Component |
| | | public class FwwcTemplateMessageBulder implements TemplateMessageBulder { |
| | | |
| | | @Autowired |
| | | SysProjServicesDao projServicesDao; |
| | | |
| | | @Autowired |
| | | SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | private SysBeauticianStateDao beauticianStateDao; |
| | | |
| | | @Autowired |
| | | private SysShopInfoDao shopInfoDao; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Map buildMsg(Map param) { |
| | | |
| | | //返回参数 |
| | | Map builParam=new HashedMap(); |
| | | //获取基础公共参数 |
| | | String gzhAppid= (String) param.get("gzhAppid"); |
| | | String template_id= (String) param.get("template_id"); |
| | | String xcxAppId= (String) param.get("xcxAppId"); |
| | | //模板消息列表 |
| | | List msgList=new ArrayList(); |
| | | |
| | | //触发点传送的json参数 |
| | | JSONObject messageJsonParam= (JSONObject) param.get("messageJsonParam"); |
| | | //构建消息主体 |
| | | Long serviceId= (Long) messageJsonParam.get("serviceId"); |
| | | SysProjServices sysProjServices = projServicesDao.selectById(serviceId); |
| | | |
| | | |
| | | //校验客户openId (必须) |
| | | SysVipInfo vipInfo=vipInfoDao.selectById(sysProjServices.getVipId()); |
| | | String touser= vipInfo.getOpenId(); |
| | | if(StringUtils.isBlank(touser)){ |
| | | builParam.put("error","未获取到"+vipInfo.getVipName()+"用户小程序openid"); |
| | | return builParam; |
| | | } |
| | | |
| | | |
| | | //自定义信息区START========================================================================================================= |
| | | SysShopInfo sysShopInfo = shopInfoDao.selectById(sysProjServices.getShopId()); |
| | | List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(sysProjServices.getId()); |
| | | String time= DateUtil.dateFormatStr(sysProjServices.getConsumeTime(),DateUtil.DATE_FORMAT_MM); |
| | | |
| | | //如果一个项目存在多个护理项目则发送多次消息 |
| | | String first="您好!您预约的"; |
| | | for (SysBeauticianState beauticianState:beauticianStateList){ |
| | | first+=beauticianState.getProjInfo().getName()+beauticianState.getCount()+"次,"; |
| | | } |
| | | first=first.substring(0,first.length())+"服务已完成"; |
| | | UniformMsgPojo uniformMsgPojo=new UniformMsgPojo(); |
| | | GzhTemplateMessagePojo messagePojo=new GzhTemplateMessagePojo(); |
| | | uniformMsgPojo.setTouser(touser); |
| | | messagePojo.setTemplate_id(template_id); |
| | | messagePojo.setAppid(gzhAppid); |
| | | //个性参数设置 |
| | | messagePojo.setFirst(first,"#453454"); |
| | | messagePojo.setKeyWord(sysShopInfo.getShopName(),"#453454"); |
| | | messagePojo.setKeyWord(time,"#453454"); |
| | | messagePojo.setRemark("点击【详情】可查询订单明细,若非本人或授权操作,请及时与门店联系","#453454"); |
| | | |
| | | //小程序配置 |
| | | GzhTemplateMessagePojo.Miniprogram miniprogram=new GzhTemplateMessagePojo.Miniprogram(xcxAppId, |
| | | "pages/yuyue/showYyInfo?id="+serviceId); |
| | | messagePojo.setMiniprogram(miniprogram); |
| | | |
| | | |
| | | uniformMsgPojo.setMp_template_msg(messagePojo); |
| | | //自定义信息区END========================================================================================================= |
| | | |
| | | //返回调用者使用的参数(必须) |
| | | msgList.add(uniformMsgPojo); |
| | | builParam.put("msgList",msgList); |
| | | return builParam; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.wechart.templateMsg.Task.messageBulderDemo; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.wechart.templateMsg.GzhTemplateMessagePojo; |
| | | import com.matrix.system.wechart.templateMsg.Task.TemplateMessageBulder; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgPojo; |
| | | import org.apache.commons.collections.map.HashedMap; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 购买成功提醒 |
| | | */ |
| | | @Component |
| | | public class GmcgTemplateMessageBulder implements TemplateMessageBulder { |
| | | |
| | | @Autowired |
| | | SysOrderDao orderDao; |
| | | |
| | | @Autowired |
| | | SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | private SysBeauticianStateDao beauticianStateDao; |
| | | |
| | | @Autowired |
| | | private SysShopInfoDao shopInfoDao; |
| | | |
| | | @Autowired |
| | | private SysOrderItemDao orderItemDao; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Map buildMsg(Map param) { |
| | | |
| | | //返回参数 |
| | | Map builParam=new HashedMap(); |
| | | //获取基础公共参数 |
| | | String gzhAppid= (String) param.get("gzhAppid"); |
| | | String template_id= (String) param.get("template_id"); |
| | | String xcxAppId= (String) param.get("xcxAppId"); |
| | | //模板消息列表 |
| | | List msgList=new ArrayList(); |
| | | |
| | | //触发点传送的json参数 |
| | | JSONObject messageJsonParam= (JSONObject) param.get("messageJsonParam"); |
| | | //构建消息主体 |
| | | Long orderId= (Long) messageJsonParam.get("orderId"); |
| | | SysOrder sysOrder = orderDao.selectById(orderId); |
| | | List<SysOrderItem> sysOrderItems = orderItemDao.selectByOrderId(orderId); |
| | | |
| | | //校验客户openId (必须) |
| | | SysVipInfo vipInfo=vipInfoDao.selectById(sysOrder.getVipId()); |
| | | String touser= vipInfo.getOpenId(); |
| | | if(StringUtils.isBlank(touser)){ |
| | | builParam.put("error","未获取到"+vipInfo.getVipName()+"用户小程序openid"); |
| | | return builParam; |
| | | } |
| | | |
| | | |
| | | //自定义信息区START========================================================================================================= |
| | | SysShopInfo sysShopInfo = shopInfoDao.selectById(sysOrder.getShopId()); |
| | | String time= DateUtil.dateFormatStr(sysOrder.getPayTime(),DateUtil.DATE_FORMAT_MM); |
| | | |
| | | //如果一个项目存在多个护理项目则发送多次消息 |
| | | String first="您好!您购买了"; |
| | | for (SysOrderItem orderItem:sysOrderItems){ |
| | | first+=orderItem.getShoppingGoods().getName()+"x"+orderItem.getCount()+","; |
| | | } |
| | | first=first.substring(0,first.length()); |
| | | UniformMsgPojo uniformMsgPojo=new UniformMsgPojo(); |
| | | GzhTemplateMessagePojo messagePojo=new GzhTemplateMessagePojo(); |
| | | uniformMsgPojo.setTouser(touser); |
| | | messagePojo.setTemplate_id(template_id); |
| | | messagePojo.setAppid(gzhAppid); |
| | | //个性参数设置 |
| | | messagePojo.setFirst(first,"#453454"); |
| | | messagePojo.setKeyWord(sysShopInfo.getShopName(),"#453454"); |
| | | messagePojo.setKeyWord(vipInfo.getVipNo(),"#453454"); |
| | | messagePojo.setKeyWord(time,"#453454"); |
| | | messagePojo.setRemark("点击【详情】可查询订单明细,若非本人或授权操作,请及时与门店联系","#453454"); |
| | | |
| | | //小程序配置 |
| | | GzhTemplateMessagePojo.Miniprogram miniprogram=new GzhTemplateMessagePojo.Miniprogram(xcxAppId, |
| | | "pages/purchaseRecords/detail?id="+orderId); |
| | | messagePojo.setMiniprogram(miniprogram); |
| | | |
| | | |
| | | uniformMsgPojo.setMp_template_msg(messagePojo); |
| | | //自定义信息区END========================================================================================================= |
| | | |
| | | //返回调用者使用的参数(必须) |
| | | msgList.add(uniformMsgPojo); |
| | | builParam.put("msgList",msgList); |
| | | return builParam; |
| | | } |
| | | } |
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/resources/config/application.properties
zq-erp/src/main/resources/config/db/increment/20210109.sql
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/system.properties
zq-erp/src/main/resources/config/prd/application.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/system.properties
zq-erp/src/main/resources/config/xcx/application.properties
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/mybatis/mapper/common/SysUsersDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.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/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/xcxShop/ShopProductAttributeDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.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/static/css/styleOne/style.min.css
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/js/systools/AjaxProxyVue.js
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/products/shoppinggoods-list.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/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-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/order-form.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.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/projUseFlow-list.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/vip.html
zq-erp/src/main/resources/templates/views/admin/hive/instore/store-list.html
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/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/daily-sale-list.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-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/store/outStore-form.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/tc-form.html
zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.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/super/sysCompany-form.html
zq-erp/src/test/java/com/matrix/SourceFlowTests.java
zq-xcx/project.config.json |