Merge branch 'score_shop' of http://120.27.238.55:7000/r/beauty-erp into score_shop
 
	
	
	
	
	
	
		
		1 files deleted
	
		
		32 files modified
	
		
		9 files added
	
	
 
	
	
	
	
	
	
	
	
 |  |  | 
 |  |  |                 <env>lhx</env> | 
 |  |  |             </properties> | 
 |  |  |         </profile> | 
 |  |  |         <profile> | 
 |  |  |             <id>xcshop</id> | 
 |  |  |             <properties> | 
 |  |  |                 <env>xcshop</env> | 
 |  |  |             </properties> | 
 |  |  |         </profile> | 
 |  |  |     </profiles> | 
 |  |  |     <dependencies> | 
 |  |  |  | 
 |  |  | 
 |  |  |                     <exclude>config/prd/*</exclude> | 
 |  |  |                     <exclude>config/test/*</exclude> | 
 |  |  |                     <exclude>config/xcx/*</exclude> | 
 |  |  |                     <exclude>config/xcshop/*</exclude> | 
 |  |  |  | 
 |  |  |                     <!-- --> | 
 |  |  |                     <!----> | 
 |  |  |                     <exclude>config/config.json</exclude> | 
 |  |  |                     <exclude>config/application.properties</exclude> | 
 |  |  |                     <exclude>config/system.properties</exclude> | 
 
 |  |  | 
 |  |  |         taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.SHOP_ORDER_REFUND + evn,MQTaskRouting.SHOP_ORDER_REFUND + evn, SalesOrderRefundTask())); | 
 |  |  |  | 
 |  |  |         //不同任务在不同的队列,但是routingKey一样则可以收到生产者消息 | 
 |  |  |         taskList.add(new MqTask(MQ_EXCHANGE_TOPIC + evn, MQTaskRouting.CREATE_ORDER + evn,MQTaskRouting.CREATE_ORDER + evn,SalesOrderTask())); | 
 |  |  |         taskList.add(new MqTask(MQ_EXCHANGE_TOPIC + evn, MQTaskRouting.SALES_ORDER + evn,MQTaskRouting.CREATE_ORDER + evn,OrderrCreateTask())); | 
 |  |  |         taskList.add(new MqTask(MQ_EXCHANGE_TOPIC + evn, MQTaskRouting.CREATE_ORDER + evn,MQTaskRouting.CREATE_ORDER + evn,OrderrCreateTask())); | 
 |  |  |         taskList.add(new MqTask(MQ_EXCHANGE_TOPIC + evn, MQTaskRouting.SALES_ORDER + evn,MQTaskRouting.CREATE_ORDER + evn,SalesOrderTask())); | 
 |  |  |         taskList.add(new MqTask(MQ_EXCHANGE_TOPIC + evn, MQTaskRouting.SCORE_ORDER + evn,MQTaskRouting.CREATE_ORDER + evn,ScoreOrderTask())); | 
 |  |  |  | 
 |  |  |  | 
 
 |  |  | 
 |  |  | import com.matrix.system.activity.vo.CouponVo; | 
 |  |  | import com.matrix.system.activity.vo.GoodsVo; | 
 |  |  | import com.matrix.system.activity.vo.SignReceiveListVo; | 
 |  |  | import com.matrix.system.shopXcx.api.dto.SeeAwardTextDto; | 
 |  |  | import com.matrix.system.shopXcx.api.dto.SignAwardDto; | 
 |  |  | import com.matrix.system.shopXcx.api.vo.SeeAwardTextVo; | 
 |  |  | import com.matrix.system.shopXcx.api.vo.SignAwardListVo; | 
 |  |  | import com.matrix.system.shopXcx.vo.SalesOrderVo; | 
 |  |  |  | 
 |  |  | import org.apache.ibatis.annotations.Param; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  | 
 |  |  |  | 
 |  |  |     int getSignAwardReceiveCount(@Param("userId")Long userId, @Param("companyId")Long companyId); | 
 |  |  |  | 
 |  |  |     IPage<SignAwardListVo> selectSignAwardList(Page<SalesOrderVo> page, @Param("record")SignAwardDto signAwardDto); | 
 |  |  |  | 
 |  |  |     SeeAwardTextVo selectSeeAwardTextVOById(@Param("record")SeeAwardTextDto seeAwardTextDto); | 
 |  |  |  | 
 |  |  | } | 
 
 |  |  | 
 |  |  | import com.matrix.system.shopXcx.dao.ShopActivitiesDao; | 
 |  |  | import com.matrix.system.shopXcx.dao.ShopDeliveryInfoDao; | 
 |  |  | import com.matrix.system.shopXcx.dao.ShopLogisticsInfoDao; | 
 |  |  |  | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  | import org.springframework.transaction.annotation.Transactional; | 
 |  |  | 
 |  |  |  | 
 |  |  |         shopDeliveryInfo.setDeliveryTime(new Date()); | 
 |  |  |         shopDeliveryInfoDao.insert(shopDeliveryInfo); | 
 |  |  |         //更新核销记录 | 
 |  |  |         activitySignWriteoff.setState(ActivitySignWriteoff.STATE_THREE); | 
 |  |  |         activitySignWriteoff.setWriteoffTime(new Date()); | 
 |  |  |         activitySignWriteoff.setWriteoffUser(sysUsers.getSuName()); | 
 |  |  |         activitySignWriteoff.setWriteoffUserid(sysUsers.getSuId()); | 
 |  |  |         activitySignWriteoff.setLogisticsId(shopDeliveryInfo.getId()); | 
 |  |  |         activitySignWriteoffDao.updateById(activitySignWriteoff); | 
 |  |  |         //更新领取记录 | 
 |  |  |         ActivitySignReceiveRecord activitySignReceiveRecord = activitySignReceiveRecordDao.selectById(receiveId); | 
 |  |  |         activitySignReceiveRecord.setState(ActivitySignReceiveRecord.STATE_DONE); | 
 |  |  |         activitySignReceiveRecord.setConsignee(logisticsSubmitDto.getShr()); | 
 |  |  |         activitySignReceiveRecord.setConsigneeAddress(logisticsSubmitDto.getShdz()); | 
 |  |  |         activitySignReceiveRecord.setConsigneePhone(logisticsSubmitDto.getLxdh()); | 
 |  |  |         activitySignReceiveRecordDao.updateById(activitySignReceiveRecord); | 
 |  |  | //        Integer id = shopDeliveryInfo.getId(); | 
 |  |  | //        if(ObjectUtil.isNotEmpty(id)) { | 
 |  |  | //            List<ShopLogisticsInfo> shopLogisticsList = new ArrayList<ShopLogisticsInfo>(); | 
 |  |  | //            AjaxResult result = new AjaxResult(); | 
 |  |  | //            Map<String, String> logisticsInfo = new HashMap<String, String>(); | 
 |  |  | //            try { | 
 |  |  | //                if (shopDeliveryInfo == null) { | 
 |  |  | //                    return new AjaxResult(AjaxResult.STATUS_FAIL, "找不到发货信息"); | 
 |  |  | //                } | 
 |  |  | //                if (!StringUtils.isNotBlank(shopDeliveryInfo.getWaybillNo()) || !StringUtils.isNotBlank(shopDeliveryInfo.getLogisticsCompanyCode())) { | 
 |  |  | //                    return new AjaxResult(AjaxResult.STATUS_FAIL, "物流公司信息为空"); | 
 |  |  | //                } | 
 |  |  | //                logisticsInfo.put("logisticsCompany", shopDeliveryInfo.getLogisticsCompany()); | 
 |  |  | //                logisticsInfo.put("waybillNo", shopDeliveryInfo.getWaybillNo()); | 
 |  |  | // | 
 |  |  | //                //如果已经签收直接查数据库 | 
 |  |  | //                if (AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR.equals(shopDeliveryInfo.getLogisticsStatus())) { | 
 |  |  | // | 
 |  |  | //                    List<ShopLogisticsInfo> shopLogisticsInfos = shopLogisticsInfoDao.selectByDelieryId(shopDeliveryInfo.getId()); | 
 |  |  | //                    logisticsInfo.put("logisticsStatus", String.valueOf(AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR)); | 
 |  |  | //                    result.setStatus(AjaxResult.STATUS_SUCCESS); | 
 |  |  | //                    result.setRows(shopLogisticsInfos); | 
 |  |  | //                    result.putInMap("logisticsInfo", logisticsInfo); | 
 |  |  | //                    return result; | 
 |  |  | //                } | 
 |  |  | //                Map<String, String> param = new HashMap<String, String>(); | 
 |  |  | //                param.put("ShipperCode", shopDeliveryInfo.getLogisticsCompanyCode()); | 
 |  |  | //                param.put("LogisticCode", shopDeliveryInfo.getWaybillNo()); | 
 |  |  | //                Map<String, String> paramsUrl = getparams(param); | 
 |  |  | //                LogUtil.info("物流查询参数" + paramsUrl); | 
 |  |  | //                String logisticsResult = HttpCurlUtil.sendPost(logisticsUrl, paramsUrl); | 
 |  |  | //                LogUtil.info("查询物流返回信息" + logisticsResult); | 
 |  |  | //                LogisticsInfoVo logisticsInfoVo = JSON.parseObject(logisticsResult, LogisticsInfoVo.class); | 
 |  |  | //                if (logisticsInfoVo.isSuccess()) { | 
 |  |  | //                    ShopDeliveryInfo shopDelivery = new ShopDeliveryInfo(); | 
 |  |  | //                    shopDelivery.setLogisticsStatus(Integer.valueOf(logisticsInfoVo.getState())); | 
 |  |  | //                    shopDelivery.setId(shopDeliveryInfo.getId()); | 
 |  |  | //                    logisticsInfo.put("logisticsStatus", logisticsInfoVo.getState()); | 
 |  |  | //                    //更新物流状态 | 
 |  |  | //                    shopDeliveryInfoDao.updateByModel(shopDelivery); | 
 |  |  | //                    if (CollectionUtils.isNotEmpty(logisticsInfoVo.getTraces())) { | 
 |  |  | //                        List<Map<String, String>> mapTraces = logisticsInfoVo.getTraces(); | 
 |  |  | //                        for (int i = 0; i < mapTraces.size(); i++) { | 
 |  |  | //                            ShopLogisticsInfo shopLogisticsInfo = new ShopLogisticsInfo(); | 
 |  |  | //                            shopLogisticsInfo.setCreateBy(AppConstance.SYSTEM_USER); | 
 |  |  | //                            shopLogisticsInfo.setUpdateBy(AppConstance.SYSTEM_USER); | 
 |  |  | //                            shopLogisticsInfo.setLogisticsTime(mapTraces.get(i).get("AcceptTime")); | 
 |  |  | //                            String acceptStation = mapTraces.get(i).get("AcceptStation"); | 
 |  |  | //                            shopLogisticsInfo.setDescribe(acceptStation); | 
 |  |  | //                            shopLogisticsInfo.setDelieryId(shopDeliveryInfo.getId()); | 
 |  |  | //                            if (acceptStation.indexOf(AppConstance.KDN_IS_SIGN) != -1) { | 
 |  |  | //                                shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR); | 
 |  |  | //                            } else if (acceptStation.indexOf(AppConstance.KDN_IS_RECEIVE) != -1) { | 
 |  |  | //                                shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_RECEIVE); | 
 |  |  | //                            } else if (acceptStation.indexOf(AppConstance.KDN_IS_ON_WAY) != -1) { | 
 |  |  | //                                shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_ON_WAY); | 
 |  |  | //                            } else if (acceptStation.indexOf(AppConstance.KDN_IS_MISTAKE) != -1) { | 
 |  |  | //                                shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_MISTAKE); | 
 |  |  | //                            } else { | 
 |  |  | //                                shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_NONE); | 
 |  |  | //                            } | 
 |  |  | //                            shopLogisticsList.add(shopLogisticsInfo); | 
 |  |  | //                        } | 
 |  |  | //                        shopLogisticsInfoDao.deleteByDelieryId(shopDeliveryInfo.getId()); | 
 |  |  | //                        if (CollectionUtils.isNotEmpty(shopLogisticsList)) { | 
 |  |  | //                            shopLogisticsInfoDao.batchInsert(shopLogisticsList); | 
 |  |  | //                        } | 
 |  |  | //                    } | 
 |  |  | //                } else { | 
 |  |  | //                    throw new GlobleException(logisticsInfoVo.getReason()); | 
 |  |  | //                } | 
 |  |  | // | 
 |  |  | //            } catch (Exception e) { | 
 |  |  | //                throw new GlobleException("物流信息查询失败"); | 
 |  |  | //            } | 
 |  |  |             //更新核销记录 | 
 |  |  |             activitySignWriteoff.setState(ActivitySignWriteoff.STATE_THREE); | 
 |  |  |             activitySignWriteoff.setWriteoffTime(new Date()); | 
 |  |  |             activitySignWriteoff.setWriteoffUser(sysUsers.getSuName()); | 
 |  |  |             activitySignWriteoff.setWriteoffUserid(sysUsers.getSuId()); | 
 |  |  |             activitySignWriteoff.setLogisticsId(shopDeliveryInfo.getId()); | 
 |  |  |             activitySignWriteoffDao.updateById(activitySignWriteoff); | 
 |  |  |             //更新领取记录 | 
 |  |  |             ActivitySignReceiveRecord activitySignReceiveRecord = activitySignReceiveRecordDao.selectById(receiveId); | 
 |  |  |             activitySignReceiveRecord.setState(ActivitySignReceiveRecord.STATE_DONE); | 
 |  |  |             activitySignReceiveRecord.setConsignee(logisticsSubmitDto.getShr()); | 
 |  |  |             activitySignReceiveRecord.setConsigneeAddress(logisticsSubmitDto.getShdz()); | 
 |  |  |             activitySignReceiveRecord.setConsigneePhone(logisticsSubmitDto.getLxdh()); | 
 |  |  |             activitySignReceiveRecordDao.updateById(activitySignReceiveRecord); | 
 |  |  | //        } | 
 |  |  |         return new AjaxResult(AjaxResult.STATUS_SUCCESS, "发货成功"); | 
 |  |  |     } | 
 |  |  |  | 
 
| New file | 
 |  |  | 
 |  |  | package com.matrix.system.common.actions; | 
 |  |  |  | 
 |  |  | import com.alibaba.fastjson.JSONObject; | 
 |  |  | import com.matrix.core.tools.StringUtils; | 
 |  |  | import com.matrix.core.tools.UUIDUtil; | 
 |  |  | import com.matrix.system.common.constance.AppConstance; | 
 |  |  | import org.apache.commons.fileupload.FileUploadException; | 
 |  |  | import org.apache.log4j.Logger; | 
 |  |  | import org.springframework.beans.factory.annotation.Value; | 
 |  |  | import org.springframework.stereotype.Controller; | 
 |  |  | import org.springframework.util.FileCopyUtils; | 
 |  |  | import org.springframework.web.bind.annotation.RequestMapping; | 
 |  |  | import org.springframework.web.bind.annotation.ResponseBody; | 
 |  |  | import org.springframework.web.multipart.MultipartFile; | 
 |  |  | import org.springframework.web.multipart.MultipartHttpServletRequest; | 
 |  |  |  | 
 |  |  | import javax.servlet.http.HttpServletResponse; | 
 |  |  | import java.io.File; | 
 |  |  | import java.io.IOException; | 
 |  |  | import java.text.SimpleDateFormat; | 
 |  |  | import java.util.Date; | 
 |  |  | import java.util.Map; | 
 |  |  | import java.util.regex.Matcher; | 
 |  |  | import java.util.regex.Pattern; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * 多文件上传控制器 | 
 |  |  |  *  | 
 |  |  |  * @author jiangyouyao | 
 |  |  |  * @email 512061637@qq.com | 
 |  |  |  * @date 2019年2月25日 | 
 |  |  |  */ | 
 |  |  | @Controller | 
 |  |  | @RequestMapping(value = "admin/multipleUploadFile") | 
 |  |  | public class MultipleFileUploadAction { | 
 |  |  |     Logger log = Logger.getLogger(MultipleFileUploadAction.class); | 
 |  |  |  | 
 |  |  |     @Value("${file_storage_path}") | 
 |  |  |     private String fileStoragePath; | 
 |  |  |     @Value("${static_resource_url}") | 
 |  |  |     private String nginxUrl; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 最大值 | 
 |  |  |      */ | 
 |  |  |     private Long maxSize = 1024*1024*100L; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 多文件上传方法 | 
 |  |  |      *  | 
 |  |  |      * @author jiangyouyao | 
 |  |  |      * @email 512061637@qq.com | 
 |  |  |      * @date 2019年2月25日 | 
 |  |  |      * @param response | 
 |  |  |      * @param request | 
 |  |  |      * @return | 
 |  |  |      * @throws IOException | 
 |  |  |      * @throws FileUploadException | 
 |  |  |      */ | 
 |  |  |     @RequestMapping(value = "/doUpload") | 
 |  |  |     public @ResponseBody JSONObject doFileUpload(HttpServletResponse response, MultipartHttpServletRequest request, Integer data) | 
 |  |  |             throws IOException, FileUploadException { | 
 |  |  |         // 文件保存目录路径 | 
 |  |  |         String savePath = fileStoragePath; | 
 |  |  |         // 文件保存目录URL | 
 |  |  |         String saveUrl = nginxUrl; | 
 |  |  |         // String msgPag = "common/fileUploadResult"; | 
 |  |  |         JSONObject object = new JSONObject(); | 
 |  |  |         response.setContentType("text/html; charset=UTF-8"); | 
 |  |  |         request.setCharacterEncoding("UTF-8"); | 
 |  |  |  | 
 |  |  |         // 保存和访问路径检查 | 
 |  |  |         if (StringUtils.isBlank(saveUrl) || StringUtils.isBlank(savePath)) { | 
 |  |  |             object.put("status", "err"); | 
 |  |  |             object.put("msg", "文件上传失败错误代码:001"); | 
 |  |  |             return object; | 
 |  |  |         } | 
 |  |  |         // 检查目录 | 
 |  |  |         File uploadDir = new File(savePath); | 
 |  |  |         if (!uploadDir.isDirectory()) { | 
 |  |  |             uploadDir.mkdir(); | 
 |  |  |         } | 
 |  |  |         // 检查目录写权限 | 
 |  |  | //        if (!uploadDir.canWrite()) { | 
 |  |  | //            object.put("status", "err"); | 
 |  |  | //            object.put("msg", "上传目录没有写权限"); | 
 |  |  | //            return object; | 
 |  |  | //        } | 
 |  |  |  | 
 |  |  |         Map<String, MultipartFile> fileMaps = request.getFileMap(); | 
 |  |  |         for (String key : fileMaps.keySet()) { | 
 |  |  |             MultipartFile file = fileMaps.get(key); | 
 |  |  |  | 
 |  |  |             SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); | 
 |  |  |             String ymd = sdf.format(new Date()); | 
 |  |  |             savePath += ymd + "/"; | 
 |  |  |             saveUrl += ymd + "/"; | 
 |  |  |             File dirFile = new File(savePath); | 
 |  |  |             if (!dirFile.exists()) { | 
 |  |  |                 dirFile.mkdirs(); | 
 |  |  |             } | 
 |  |  |             log.info("上传文件名:" + file.getOriginalFilename()); | 
 |  |  |             log.info("上传文件大小:" + file.getBytes().length); | 
 |  |  |             log.info("上传文件大小限制:" + maxSize); | 
 |  |  |             log.info("上传文件大小是否超过限制:" + (file.getBytes().length > maxSize)); | 
 |  |  |             if (file.getBytes().length > maxSize) { | 
 |  |  |                 object.put("status", "err"); | 
 |  |  |                 object.put("msg", "上传文件大小超过限制"); | 
 |  |  |                 return object; | 
 |  |  |             } | 
 |  |  |             String fileName = file.getOriginalFilename(); | 
 |  |  |             String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase(); | 
 |  |  |  | 
 |  |  |             fileName = fileName.replace("." + fileExt, ""); | 
 |  |  |             fileName = getSensitive(fileName); | 
 |  |  |             String newFileName = UUIDUtil.getRandomID() + UUIDUtil.getRandomID() + "." + fileExt; | 
 |  |  |             File uploadedFile = new File(savePath, newFileName); | 
 |  |  |             try { | 
 |  |  |                 FileCopyUtils.copy(file.getBytes(), uploadedFile); | 
 |  |  |             } catch (Exception e) { | 
 |  |  |                 object.put("status", "err"); | 
 |  |  |                 object.put("msg", "上传文件失败 "+e.getMessage()); | 
 |  |  |                 return object; | 
 |  |  |             } | 
 |  |  |             log.info("saveUrl:" + saveUrl); | 
 |  |  |             String visitPath = saveUrl + newFileName; | 
 |  |  |             log.info("上传一个文件:" + newFileName); | 
 |  |  |             log.info("访问路径:" + visitPath); | 
 |  |  |             // 获取回调函数 | 
 |  |  |             /* | 
 |  |  |              * String callBack = request.getParameter("callBack"); String inputId = | 
 |  |  |              * request.getParameter("inputId"); request.setAttribute("status", "200"); | 
 |  |  |              * request.setAttribute("callBack", callBack); request.setAttribute("inputId", | 
 |  |  |              * inputId); request.setAttribute("url", visitPath); | 
 |  |  |              */ | 
 |  |  |             object.put("path", visitPath); | 
 |  |  |             object.put("fileName", fileName); | 
 |  |  |             object.put("status", 200); | 
 |  |  |             if (data != null) { | 
 |  |  |                 object.put("index", data); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         return object; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 检查文件名,过滤特殊字符 | 
 |  |  |      *  | 
 |  |  |      * @author jiangyouyao | 
 |  |  |      * @email 512061637@qq.com | 
 |  |  |      * @date 2019年2月25日 | 
 |  |  |      * @param globWords | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     public String getSensitive(String globWords) { | 
 |  |  |  | 
 |  |  |         String sensitive = ""; | 
 |  |  |         Pattern pattern = Pattern.compile(AppConstance.SPECIAL_CHARACTERS); | 
 |  |  |         Matcher matcher = pattern.matcher(globWords); | 
 |  |  |         while (matcher.find()) { | 
 |  |  |             sensitive += matcher.group(); | 
 |  |  |         } | 
 |  |  |         /* | 
 |  |  |          * if(sensitive=="" || sensitive.length()<3 ){ | 
 |  |  |          * sensitive=StringUtils.getRandomString(8); } | 
 |  |  |          */ | 
 |  |  |         return sensitive; | 
 |  |  |     } | 
 |  |  | } | 
 
 |  |  | 
 |  |  | package com.matrix.system.hive.bean; | 
 |  |  |  | 
 |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
 |  |  |  | 
 |  |  | import java.io.Serializable; | 
 |  |  | import java.util.Date; | 
 |  |  | /** | 
 |  |  | 
 |  |  |     /** | 
 |  |  |      * 创建时间 | 
 |  |  |      */ | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") | 
 |  |  |     private Date  createTime; | 
 |  |  |      | 
 |  |  |     /** | 
 
 |  |  | 
 |  |  | package com.matrix.system.hive.dao; | 
 |  |  |  | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  | import com.matrix.core.pojo.PaginationVO; | 
 |  |  | import com.matrix.system.hive.bean.MoneyCardUseFlow; | 
 |  |  | import com.matrix.system.shopXcx.api.dto.MoneyCardUseFlowDto; | 
 |  |  | import org.apache.ibatis.annotations.Param; | 
 |  |  |  | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  |  | 
 |  |  | /** | 
 |  |  | 
 |  |  |      | 
 |  |  |     public List<MoneyCardUseFlow> selectInPage(@Param("record") MoneyCardUseFlow moneyCardUseFlow, @Param("pageVo") PaginationVO pageVo); | 
 |  |  |  | 
 |  |  |     public List<MoneyCardUseFlow> selectForWxInPage(@Param("record")MoneyCardUseFlowDto moneyCardUseFlowDto); | 
 |  |  |  | 
 |  |  |     public List<MoneyCardUseFlow> selectByModel(@Param("record") MoneyCardUseFlow moneyCardUseFlow); | 
 |  |  |      | 
 |  |  |     public int  selectTotalRecord(@Param("record") MoneyCardUseFlow moneyCardUseFlow); | 
 
 |  |  | 
 |  |  | import com.matrix.core.tools.ModelUtils; | 
 |  |  | import com.matrix.core.tools.StringUtils; | 
 |  |  | import com.matrix.core.tools.WebUtil; | 
 |  |  | import com.matrix.system.common.bean.CustomerDataDictionary; | 
 |  |  | import com.matrix.system.common.bean.SystemDictionary; | 
 |  |  | import com.matrix.system.common.dao.CustomerDataDictionaryDao; | 
 |  |  | import com.matrix.system.common.bean.SysUsers; | 
 |  |  | import com.matrix.system.common.bean.SystemDictionary; | 
 |  |  | import com.matrix.system.common.constance.AppConstance; | 
 |  |  | import com.matrix.system.common.dao.CustomerDataDictionaryDao; | 
 |  |  | import com.matrix.system.common.dao.SystemDictionaryDao; | 
 |  |  | import com.matrix.system.constance.Dictionary; | 
 |  |  | import com.matrix.system.hive.action.BaseController; | 
 |  |  | import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil; | 
 |  |  | import com.matrix.system.shopXcx.bean.ShopDeliveryInfo; | 
 |  |  | import com.matrix.system.shopXcx.bean.ShopOrder; | 
 |  |  | import com.matrix.system.shopXcx.dao.ShopDeliveryInfoDao; | 
 |  |  | import com.matrix.system.shopXcx.dao.ShopLogisticsInfoDao; | 
 |  |  | import com.matrix.system.shopXcx.dao.ShopOrderDao; | 
 |  |  | import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil; | 
 |  |  | import com.matrix.system.shopXcx.mqTask.MQTaskRouting; | 
 |  |  | import org.apache.commons.collections.CollectionUtils; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | 
 |  |  |         pageVo.setSort("create_time"); | 
 |  |  |         pageVo.setOrder("desc"); | 
 |  |  |         shopDeliveryInfo.setCompanyId(sysUsers.getCompanyId()); | 
 |  |  |         if (getMe().getShopRole().equals(Dictionary.FLAG_NO_N)) { | 
 |  |  |             shopDeliveryInfo.setShopId(sysUsers.getShopId()); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         List<ShopDeliveryInfo> dataList = shopDeliveryInfoDao.selectInPage(shopDeliveryInfo, pageVo); | 
 |  |  |         AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, | 
 |  |  |                 shopDeliveryInfoDao.selectTotalRecord(shopDeliveryInfo)); | 
 
 |  |  | 
 |  |  | import com.matrix.core.tools.excl.ExcelVersion; | 
 |  |  | import com.matrix.system.common.bean.SysUsers; | 
 |  |  | import com.matrix.system.common.constance.AppConstance; | 
 |  |  | import com.matrix.system.constance.Dictionary; | 
 |  |  | import com.matrix.system.hive.action.BaseController; | 
 |  |  | import com.matrix.system.hive.action.util.QueryUtil; | 
 |  |  | import com.matrix.system.hive.bean.SysShopInfo; | 
 |  |  | 
 |  |  |         ExcelSheetPO orderSheet = new ExcelSheetPO(); | 
 |  |  |         orderSheet.setSheetName("订单列表"); | 
 |  |  |         orderSheet.setTitle("订单列表"); | 
 |  |  |         String[] header = new String[]{"订单编号", "客户姓名", "客户电话", "收货地址", "下单时间", "订单金额", | 
 |  |  |                 "优惠总金额", "优惠说明", "订单状态", "配送方式", "门店名称", "商品名称", "规格", "生产企业", "单价", "购买数量"}; | 
 |  |  |         String[] header = new String[]{"订单编号", "客户姓名", "客户电话", "收货地址", "店铺名称","订单状态","下单时间",  "购买商品","订单金额", | 
 |  |  |                 "优惠总金额",  "配送方式"}; | 
 |  |  |         orderSheet.setHeaders(header); | 
 |  |  |         List<List<Object>> body = new ArrayList<>(); | 
 |  |  |         SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); | 
 |  |  | 
 |  |  |                 } else { | 
 |  |  |                     bodyItem.add(""); | 
 |  |  |                 } | 
 |  |  |                 //下单时间 | 
 |  |  |                 bodyItem.add(dateFormat.format(shopOrder.getOrderTime())); | 
 |  |  |                 //购买数量 | 
 |  |  | //                bodyItem.add(shopOrder.getPurchaseQuantity()); | 
 |  |  |                 //订单金额 | 
 |  |  |                 bodyItem.add(shopOrder.getOrderMoney()); | 
 |  |  |                 //优惠总金额 | 
 |  |  |                 bodyItem.add(shopOrder.getDiscountAmount()); | 
 |  |  |                 //优惠说明 | 
 |  |  |                 bodyItem.add(shopOrder.getDiscountExplain()); | 
 |  |  |                 //店铺名称 | 
 |  |  |                 bodyItem.add(shopOrder.getStoreName()); | 
 |  |  |                 //订单状态 | 
 |  |  |                 bodyItem.add(OrderStatusEnum.getNameByCode(shopOrder.getOrderStatus())); | 
 |  |  |                 //配送方式 门店 | 
 |  |  |                 bodyItem.add("物流"); | 
 |  |  |                 bodyItem.add(""); | 
 |  |  |  | 
 |  |  |                 //商品名称 | 
 |  |  |                 //下单时间 | 
 |  |  |                 bodyItem.add(dateFormat.format(shopOrder.getOrderTime())); | 
 |  |  |                 //购买商品 | 
 |  |  |                 ShopSku shopSku = shopOrderDetails.getShopSku(); | 
 |  |  |                 ShopProduct shopProduct = shopOrderDetails.getShopProduct(); | 
 |  |  |                 if (shopProduct == null) { | 
 |  |  |                     bodyItem.add(""); | 
 |  |  |                 } else { | 
 |  |  |                     bodyItem.add(shopProduct.getTitle()); | 
 |  |  |                     bodyItem.add(shopProduct.getTitle()+ "(" +shopSku.getName()+ ")*" + shopOrderDetails.getCount()); | 
 |  |  |                 } | 
 |  |  |                 //规格名称、生产企业、单价 | 
 |  |  |                 ShopSku shopSku = shopOrderDetails.getShopSku(); | 
 |  |  |                 if (shopSku == null) { | 
 |  |  |                     bodyItem.add(""); | 
 |  |  |                     bodyItem.add(shopOrderDetails.getProductionEnterprise()); | 
 |  |  |                     bodyItem.add(""); | 
 |  |  |                 } else { | 
 |  |  |                     bodyItem.add(shopSku.getName()); | 
 |  |  |                     bodyItem.add(shopOrderDetails.getProductionEnterprise()); | 
 |  |  |                     bodyItem.add(shopSku.getPrice()); | 
 |  |  |                 } | 
 |  |  |                 //购买数量 | 
 |  |  |                 bodyItem.add(shopOrderDetails.getCount()); | 
 |  |  |                 //订单金额 | 
 |  |  |                 bodyItem.add(shopOrder.getOrderMoney()); | 
 |  |  |                 //优惠总金额 | 
 |  |  |                 bodyItem.add(shopOrder.getDiscountAmount()); | 
 |  |  |                 //配送方式 门店 | 
 |  |  |                 bodyItem.add("物流"); | 
 |  |  |                 body.add(bodyItem); | 
 |  |  |             } | 
 |  |  |         } | 
 
 |  |  | 
 |  |  | package com.matrix.system.shopXcx.api.action; | 
 |  |  |  | 
 |  |  | import com.matrix.system.hive.bean.SysVipInfo; | 
 |  |  | import com.matrix.component.rabbitmq.RabiitMqTemplate; | 
 |  |  | import com.matrix.component.redis.RedisUserLoginUtils; | 
 |  |  | import com.matrix.component.wechat.externalInterface.protocol.paramProtocol.BrandWCPayRequestData; | 
 |  |  | import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil; | 
 |  |  | import com.matrix.config.RabbitMqConfig; | 
 |  |  | import com.matrix.core.constance.SystemErrorCode; | 
 |  |  | import com.matrix.core.exception.GlobleException; | 
 |  |  | import com.matrix.core.pojo.AjaxResult; | 
 |  |  | import com.matrix.core.tools.LogUtil; | 
 |  |  | import com.matrix.system.common.constance.AppConstance; | 
 |  |  | import com.matrix.system.hive.bean.MoneyCardUse; | 
 |  |  | import com.matrix.system.hive.bean.MoneyCardUseFlow; | 
 |  |  | import com.matrix.system.hive.bean.SysVipInfo; | 
 |  |  | import com.matrix.system.hive.dao.MoneyCardUseDao; | 
 |  |  | import com.matrix.system.hive.dao.MoneyCardUseFlowDao; | 
 |  |  | import com.matrix.system.hive.dao.ShoppingGoodsDao; | 
 |  |  | import com.matrix.system.hive.dao.SysVipInfoDao; | 
 |  |  | import com.matrix.system.score.dao.ScoreVipDetailDao; | 
 |  |  | import com.matrix.system.shopXcx.api.pojo.OrderInfoQueryPOJO; | 
 |  |  | import com.matrix.system.shopXcx.api.pojo.ShopOrderDto; | 
 |  |  | import com.matrix.system.shopXcx.api.service.OrderCouponGroupService; | 
 |  |  | import com.matrix.system.shopXcx.api.service.ShoppingCartService; | 
 |  |  | import com.matrix.system.shopXcx.api.service.WXShopOrderService; | 
 |  |  | import com.matrix.system.shopXcx.api.service.WxShopCouponService; | 
 |  |  | import com.matrix.system.shopXcx.api.tools.WxShopCouponUtil; | 
 |  |  | import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil; | 
 |  |  | import com.matrix.system.shopXcx.bean.ShopActivitiesGroupJoin; | 
 |  |  | import com.matrix.system.shopXcx.bean.ShopActivitiesGroupJoinUser; | 
 |  |  | import com.matrix.system.shopXcx.bean.ShopOrder; | 
 |  |  | import com.matrix.system.shopXcx.bean.ShopPayLog; | 
 |  |  | import com.matrix.system.shopXcx.dao.*; | 
 |  |  | import com.matrix.system.shopXcx.mqTask.MQTaskRouting; | 
 |  |  | 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.validation.annotation.Validated; | 
 |  |  | import org.springframework.web.bind.annotation.*; | 
 |  |  |  | 
 |  |  | import java.math.BigDecimal; | 
 |  |  | import java.util.*; | 
 |  |  |  | 
 |  |  |  | 
 |  |  | /** | 
 |  |  | 
 |  |  |     @Autowired | 
 |  |  |     WxShopCouponService wxShopCouponService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private ShopReceiveAddressDao shopReceiveAddressDao; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     ShoppingCartService shoppingCartService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private ShopCouponDao shopCouponDao; | 
 |  |  |     @Autowired | 
 |  |  |     private WxShopCouponUtil wxShopCouponUtil; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private RedisUserLoginUtils redisUserLoginUtils; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     ShopProductDao shopProductDao; | 
 |  |  |     @Autowired | 
 |  |  |     private WxShopOrderUtil wxShopOrderUtil; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private ShopOrderDetailsDao shopOrderDetailsDao; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     OrderCouponGroupService orderCouponGroupService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private ShopPayLogDao shopPayLogDao; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     ShopOrderDao shopOrderDao; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     SysVipInfoDao sysVipInfoDao; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private ShopActivitiesGroupJoinUserDao shopActivitiesGroupJoinUserDao; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private ShopActivitiesGroupJoinDao shopActivitiesGroupJoinDao; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private RabiitMqTemplate rabiitMqTemplate; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     ShoppingGoodsDao shoppingGoodsDao; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     MoneyCardUseFlowDao moneyCardUseFlowDao; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     MoneyCardUseDao moneyCardUseDao; | 
 |  |  |  | 
 |  |  |     @Value("${evn}") | 
 |  |  |     private String evn; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 计算购物车订单价格 | 
 |  |  | 
 |  |  |     public | 
 |  |  |     @ResponseBody | 
 |  |  |     AjaxResult calculationCartOrder(@RequestBody ShopOrderDto shopOrderDto) throws Exception { | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         return shopOrderService.buildDiscountExplain(shopOrderDto); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     ShoppingGoodsDao shoppingGoodsDao; | 
 |  |  |     private ScoreVipDetailDao scoreVipDetailDao; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 新增订单 | 
 |  |  |      * 新增微信支付订单 | 
 |  |  |      * | 
 |  |  |      * @param shopOrderDto | 
 |  |  |      * @return | 
 |  |  | 
 |  |  |     @PostMapping(value = "/addShopOrder") | 
 |  |  |     public | 
 |  |  |     @ResponseBody | 
 |  |  |     AjaxResult addShopOrder(@RequestBody ShopOrderDto shopOrderDto) throws Exception { | 
 |  |  |         return shopOrderService.createShopOrder(shopOrderDto); | 
 |  |  |     AjaxResult addShopOrder(@RequestBody @Validated ShopOrderDto shopOrderDto) throws Exception { | 
 |  |  |  | 
 |  |  |         ShopOrder shopOrder = shopOrderService.createShopOrder(shopOrderDto); | 
 |  |  |         AjaxResult result = AjaxResult.buildSuccessInstance("订单创建成功"); | 
 |  |  |         result.putInMap("orderId", shopOrder.getId()); | 
 |  |  |         if (shopOrderDto.getPayMethod().equals(ShopOrder.SHOP_ORDER_PAY_METHOD_WX)) { | 
 |  |  |             BrandWCPayRequestData payData = shopOrderService.startPayment(shopOrder); | 
 |  |  |             result.setRows(Arrays.asList(payData)); | 
 |  |  |         } | 
 |  |  |         return result; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @Value("${wx_pay_debug_onoff}") | 
 |  |  |     private boolean isDebug; | 
 |  |  |     @Autowired | 
 |  |  |     private WeixinServiceUtil weixinServiceUtil; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 开始付款 | 
 |  |  |      * 余额支付确认 | 
 |  |  |      * | 
 |  |  |      * @param shopOrder | 
 |  |  |      * @param orderId | 
 |  |  |      * @return | 
 |  |  |      * @throws Exception | 
 |  |  |      */ | 
 |  |  |     public BrandWCPayRequestData startPayment(ShopOrder shopOrder) throws Exception { | 
 |  |  |         BigDecimal unit = new BigDecimal("100"); | 
 |  |  |         BigDecimal money = new BigDecimal(shopOrder.getOrderMoney().toString()); | 
 |  |  |         BrandWCPayRequestData payData; | 
 |  |  |         String productNames = wxShopOrderUtil.getProductNames(shopOrder.getUserId(), shopOrder.getId()); | 
 |  |  |         SysVipInfo vipInfo = sysVipInfoDao.selectById(shopOrder.getUserId()); | 
 |  |  |     @GetMapping(value = "/moneyCardPay/{orderId}") | 
 |  |  |     @ResponseBody | 
 |  |  |     @Transactional | 
 |  |  |     public   AjaxResult moneyCardPay(@PathVariable Integer orderId) throws Exception { | 
 |  |  |  | 
 |  |  |         if (isDebug) { | 
 |  |  |             payData = weixinServiceUtil.createOrder("[测试]" + productNames, shopOrder.getOrderNo(), | 
 |  |  |                     1, vipInfo.getOpenId(), String.valueOf(shopOrder.getId())); | 
 |  |  |         ShopOrder order = shopOrderDao.selectById(orderId); | 
 |  |  |         if (order != null | 
 |  |  |                 && ShopOrder.SHOP_ORDER_PAY_METHOD_VIPCARD == order.getPayMethod() | 
 |  |  |                 && ShopOrder.ORDER_PAY_STATUS_WAIT == order.getPayStatus()) { | 
 |  |  |  | 
 |  |  |             MoneyCardUse moneyCardUse = moneyCardUseDao.selectVipCard(order.getUserId()); | 
 |  |  |             Double balance=moneyCardUse.getGiftMoney() + moneyCardUse.getRealMoney(); | 
 |  |  |             if(balance>=order.getOrderMoney().doubleValue()){ | 
 |  |  |                 //扣减会员卡余额 | 
 |  |  |                 if(moneyCardUse.getRealMoney()>=order.getOrderMoney().doubleValue()){ | 
 |  |  |                     moneyCardUse.setRealMoney(moneyCardUse.getRealMoney()-order.getOrderMoney().doubleValue()); | 
 |  |  |                 }else{ | 
 |  |  |                     moneyCardUse.setGiftMoney(moneyCardUse.getGiftMoney()-(order.getOrderMoney().doubleValue()- moneyCardUse.getRealMoney() )); | 
 |  |  |                     moneyCardUse.setRealMoney(0D); | 
 |  |  |                 } | 
 |  |  |                 moneyCardUseDao.update(moneyCardUse); | 
 |  |  |                 //插入扣减记录 | 
 |  |  |                 MoneyCardUseFlow moneyCardUseFlow=new MoneyCardUseFlow(); | 
 |  |  |                 moneyCardUseFlow.setTotal(order.getOrderMoney().doubleValue()); | 
 |  |  |                 moneyCardUseFlow.setCarUseId(moneyCardUse.getId()); | 
 |  |  |                 moneyCardUseFlow.setVipId(order.getUserId()); | 
 |  |  |                 moneyCardUseFlow.setType(MoneyCardUseFlow.USE_TYPE_CONSUMER); | 
 |  |  |                 moneyCardUseFlow.setOrderNo(order.getOrderNo()); | 
 |  |  |                 moneyCardUseFlow.setCreateTime(new Date()); | 
 |  |  |                 moneyCardUseFlow.setBalance(moneyCardUse.getGiftMoney()+moneyCardUse.getRealMoney()); | 
 |  |  |                 moneyCardUseFlow.setCardName(moneyCardUse.getCardName()); | 
 |  |  |                 moneyCardUseFlowDao.insert(moneyCardUseFlow); | 
 |  |  |  | 
 |  |  |                 //构建需要修改订单信息Map | 
 |  |  |                 Map<String, Object> modifyMap = new HashMap<>(); | 
 |  |  |                 modifyMap.put("id", order.getId()); | 
 |  |  |                 //设置微信支付状态为已支付 | 
 |  |  |                 modifyMap.put("payResult", ShopOrder.ORDER_WX_STATUS_PAY_SUCCESS); | 
 |  |  |                 //设置支付状态为支付成功 | 
 |  |  |                 modifyMap.put("payStatus", ShopOrder.ORDER_PAY_STATUS_SUCCESS); | 
 |  |  |                 //如果是商品订单则进入待发货 | 
 |  |  |                 modifyMap.put("orderStatus", ShopOrder.ORDER_STATUS_WAIT_SEND); | 
 |  |  |                 shopOrderDao.updateByMap(modifyMap); | 
 |  |  |  | 
 |  |  |                 // 判断该订单是否为拼团产生的订单 | 
 |  |  |                 ShopActivitiesGroupJoinUser joinUser = shopActivitiesGroupJoinUserDao.selectGroupJoinUserByOrderId(order.getId().longValue()); | 
 |  |  |                 if (joinUser != null) { | 
 |  |  |                     joinUser.setIsHasPay(ShopActivitiesGroupJoinUser.IS_HAS_PAY_Y); | 
 |  |  |                     shopActivitiesGroupJoinUserDao.updateByModel(joinUser); | 
 |  |  |  | 
 |  |  |                     ShopActivitiesGroupJoin groupJoin = shopActivitiesGroupJoinDao.selectGroupAndPriceById(joinUser.getGjId()); | 
 |  |  |                     List<ShopActivitiesGroupJoinUser> joinUserList = shopActivitiesGroupJoinUserDao.selectGroupJoinUserListByGjId(joinUser.getGjId()); | 
 |  |  |                     LogUtil.info("#当前已支付完成:{}#", joinUserList.size()); | 
 |  |  |                     // 若拼团中已支付的数量等于几人团预设值,则更新拼团状态为拼团成功 | 
 |  |  |                     if (groupJoin.getGroupPrice().getGpCount() == joinUserList.size()) { | 
 |  |  |                         groupJoin.setGjStatus(ShopActivitiesGroupJoin.ACTIVITIES_JOIN_SUCCESS); | 
 |  |  |                     } else { | 
 |  |  |                         if (joinUser.getUserId().equals(groupJoin.getGjHeadId())) { | 
 |  |  |                             groupJoin.setGjStatus(ShopActivitiesGroupJoin.ACTIVITIES_JOIN_ING); | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                     shopActivitiesGroupJoinDao.updateByModel(groupJoin); | 
 |  |  |  | 
 |  |  |                     SysVipInfo sysVipInfo = sysVipInfoDao.selectByPhone(order.getUserTel()); | 
 |  |  |                     if (sysVipInfo != null) { | 
 |  |  |                         sysVipInfo.setIsDeal(SysVipInfo.DEAL_VIP); | 
 |  |  |                         sysVipInfoDao.update(sysVipInfo); | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 // 根据订单类型创建不同的处理任务 | 
 |  |  |                 rabiitMqTemplate.sendTopicMsg(RabbitMqConfig.MQ_EXCHANGE_TOPIC + evn, MQTaskRouting.CREATE_ORDER + evn, orderId + ""); | 
 |  |  |                 //支付记录 | 
 |  |  |                 recordPayLog(Integer.valueOf(orderId), 1, order.getOrderNo(), order.getOrderMoney(), "会员卡余额支付成功", ShopOrder.ORDER_PAY_STATUS_SUCCESS); | 
 |  |  |  | 
 |  |  |                 return AjaxResult.buildSuccessInstance("支付成功"); | 
 |  |  |  | 
 |  |  |             }else{ | 
 |  |  |                 return AjaxResult.buildFailInstance("会员卡余额不足"); | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |         } else { | 
 |  |  |             payData = weixinServiceUtil.createOrder(productNames, shopOrder.getOrderNo(), | 
 |  |  |                     unit.multiply(money).intValue(), vipInfo.getOpenId(), String.valueOf(shopOrder.getId())); | 
 |  |  |             LogUtil.info("订单状态不为待付款,order status=", order.getOrderStatus()); | 
 |  |  |             return AjaxResult.buildFailInstance("订单不支持本次结算"); | 
 |  |  |         } | 
 |  |  |         ShopOrder updateParam = new ShopOrder(); | 
 |  |  |         updateParam.setId(shopOrder.getId()); | 
 |  |  |         updateParam.setWxOrderNo(payData.getPrepay_id()); | 
 |  |  |         shopOrderDao.updateByModel(updateParam); | 
 |  |  |         return payData; | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     private void recordPayLog(Integer orderId, Integer type, String orderNo, BigDecimal payMoney, String payRemark, int payStatus) { | 
 |  |  |         //设置支付类型为收款 | 
 |  |  |         ShopPayLog payLog = new ShopPayLog(); | 
 |  |  |         payLog.setPayType(type); | 
 |  |  |         payLog.setJoinId(orderId); | 
 |  |  |         payLog.setPayMoney(payMoney); | 
 |  |  |         payLog.setPayOrderNo(orderNo); | 
 |  |  |         payLog.setPayRemark(payRemark); | 
 |  |  |         payLog.setPayStatus(payStatus); | 
 |  |  |         payLog.setCreateBy(AppConstance.SYSTEM_USER); | 
 |  |  |         payLog.setUpdateBy(AppConstance.SYSTEM_USER); | 
 |  |  |         shopPayLogDao.insert(payLog); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 
 |  |  | 
 |  |  |                             resXml = AppConstance.RESULT_XML_SUCCESS; | 
 |  |  |  | 
 |  |  |                             //支付记录 | 
 |  |  |                             recordPayLog(Integer.valueOf(orderId), 1, order.getOrderNo(), payMoney,  payLog, "支付成功", ShopOrder.ORDER_PAY_STATUS_SUCCESS); | 
 |  |  |                             recordPayLog(Integer.valueOf(orderId), 1, order.getOrderNo(), payMoney,  "支付成功", ShopOrder.ORDER_PAY_STATUS_SUCCESS); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |                         } else { | 
 |  |  | 
 |  |  |                                 BigDecimal.ROUND_HALF_DOWN).doubleValue(); | 
 |  |  |  | 
 |  |  |                         if (moneyCardUseFlow.getCarUseId()==null) { | 
 |  |  |                             ShopPayLog payLog = new ShopPayLog(); | 
 |  |  |  | 
 |  |  |                             if(payMoney.equals(moneyCardUseFlow.getTotal())){ | 
 |  |  |                                 threadResult.putInMap("status", "success"); | 
 |  |  |                                 resXml = AppConstance.RESULT_XML_SUCCESS; | 
 |  |  |                                 MoneyCardUse moneyCardUse = moneyCardUseDao.selectVipCard(user.getId()); | 
 |  |  |                                 moneyCardUseFlow.setCarUseId(moneyCardUse.getId()); | 
 |  |  |                                 moneyCardUseFlow.setCardName(moneyCardUse.getCardName()); | 
 |  |  |                                 moneyCardUseFlow.setBalance(moneyCardUse.getGiftMoney() + moneyCardUse.getRealMoney()); | 
 |  |  |                                 Double balance=moneyCardUse.getGiftMoney() + moneyCardUse.getRealMoney(); | 
 |  |  |                                 moneyCardUseFlow.setBalance(balance==null?0:balance); | 
 |  |  |                                 moneyCardUseFlowDao.update(moneyCardUseFlow); | 
 |  |  |  | 
 |  |  |                                 moneyCardUse.setRealMoney(moneyCardUse.getRealMoney()+payMoney.doubleValue()); | 
 |  |  |                                 moneyCardUseDao.update(moneyCardUse); | 
 |  |  |  | 
 |  |  |                                 //充值记录 | 
 |  |  |                                 recordPayLog(Integer.valueOf(moneyCardUseFlowId),2,moneyCardUseFlow.getPayNo(),new BigDecimal(payMoney),  payLog, "充值成功", ShopOrder.ORDER_PAY_STATUS_SUCCESS); | 
 |  |  |                                 recordPayLog(Integer.valueOf(moneyCardUseFlowId),2,moneyCardUseFlow.getPayNo(),new BigDecimal(payMoney), "充值成功", ShopOrder.ORDER_PAY_STATUS_SUCCESS); | 
 |  |  |                             }else{ | 
 |  |  |                                 LogUtil.debug("支付金额不一致,检查支付金额payMoney={},order.getPayMoney()={}", payMoney, moneyCardUseFlow.getTotal()); | 
 |  |  |                                 threadResult.putInMap("status", "err"); | 
 |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     private void recordPayLog(Integer orderId, Integer type,String orderNo, BigDecimal payMoney, ShopPayLog payLog, String payRemark, int payStatus) { | 
 |  |  |     private void recordPayLog(Integer orderId, Integer type,String orderNo, BigDecimal payMoney, String payRemark, int payStatus) { | 
 |  |  |         //设置支付类型为收款 | 
 |  |  |         ShopPayLog payLog=new ShopPayLog(); | 
 |  |  |         payLog.setPayType(type); | 
 |  |  |         payLog.setJoinId(orderId); | 
 |  |  |         payLog.setPayMoney(payMoney); | 
 
 |  |  | 
 |  |  | import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil; | 
 |  |  | import com.matrix.core.pojo.AjaxResult; | 
 |  |  | import com.matrix.core.pojo.BasePageQueryDto; | 
 |  |  | import com.matrix.core.pojo.PaginationVO; | 
 |  |  | import com.matrix.core.tools.LogUtil; | 
 |  |  | import com.matrix.core.tools.StringUtils; | 
 |  |  | import com.matrix.system.hive.bean.MoneyCardUse; | 
 |  |  | 
 |  |  | import com.matrix.system.hive.dao.MoneyCardUseFlowDao; | 
 |  |  | import com.matrix.system.hive.dao.MoneyCardUseV2Dao; | 
 |  |  | import com.matrix.system.hive.service.CodeService; | 
 |  |  | import com.matrix.system.shopXcx.api.dto.MoneyCardUseFlowDto; | 
 |  |  | import com.matrix.system.shopXcx.api.vo.WxMoneyCardUseVO; | 
 |  |  | import io.swagger.annotations.Api; | 
 |  |  | import io.swagger.annotations.ApiOperation; | 
 |  |  | 
 |  |  |     @Autowired | 
 |  |  |     CodeService codeService; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation(value = "查询会员主卡", notes = "") | 
 |  |  |     @GetMapping(value = "/getUserVipCard") | 
 |  |  |     @ApiResponses({ | 
 |  |  |             @ApiResponse(code = 200, message = "ok", response = WxMoneyCardUseVO.class) | 
 |  |  |     }) | 
 |  |  |     public AjaxResult getUserVipCard() { | 
 |  |  |         SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); | 
 |  |  |         QueryWrapper queryWrapper = new QueryWrapper(); | 
 |  |  |         queryWrapper.eq("vip_id", sysVipInfo.getId()); | 
 |  |  |         queryWrapper.eq("is_vip_car","Y"); | 
 |  |  |         MoneyCardUse moneyCardUse = moneyCardUseV2Dao.selectOne(queryWrapper); | 
 |  |  |         WxMoneyCardUseVO vo = new WxMoneyCardUseVO(); | 
 |  |  |         BeanUtils.copyProperties(moneyCardUse, vo); | 
 |  |  |         return AjaxResult.buildSuccessInstance(vo); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation(value = "查询会员储值卡", notes = "") | 
 |  |  |     @PostMapping(value = "/getUserMoneyCardUseList") | 
 |  |  |     @ApiResponses({ | 
 |  |  | 
 |  |  |         }).collect(Collectors.toList()); | 
 |  |  |         return AjaxResult.buildSuccessInstance(rows); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation(value = "创建储值卡充值预付单", notes = "传入参数 {rechargeAmount:10} 最少充值1元,最多2位小数 ") | 
 |  |  |     @PostMapping(value = "/createRechargeOrder") | 
 |  |  | 
 |  |  |     @ApiResponses({ | 
 |  |  |             @ApiResponse(code = 200, message = "ok", response = MoneyCardUseFlow.class) | 
 |  |  |     }) | 
 |  |  |     public AjaxResult getRechargeList(@RequestBody @Validated BasePageQueryDto pageDto) { | 
 |  |  |         if(StringUtils.isBlank(pageDto.getKeywords())){ | 
 |  |  |             return AjaxResult.buildFailInstance("keywords参数是必须的"); | 
 |  |  |         } | 
 |  |  |         PaginationVO pageVo = new PaginationVO(); | 
 |  |  |         pageVo.setOffset((pageDto.getPageNum() - 1) * pageDto.getPageSize()); | 
 |  |  |         pageVo.setLimit(pageDto.getPageSize()); | 
 |  |  |     public AjaxResult getRechargeList(@RequestBody @Validated MoneyCardUseFlowDto pageDto) { | 
 |  |  |         SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); | 
 |  |  |         MoneyCardUseFlow moneyCardUseFlow=new MoneyCardUseFlow(); | 
 |  |  |         moneyCardUseFlow.setVipId(sysVipInfo.getId()); | 
 |  |  |         moneyCardUseFlow.setCarUseId(Long.parseLong(pageDto.getKeywords())); | 
 |  |  |         List<MoneyCardUseFlow> dataList = moneyCardUseFlowDao.selectInPage(moneyCardUseFlow, pageVo); | 
 |  |  |         return AjaxResult.buildSuccessInstance(dataList, moneyCardUseFlowDao.selectTotalRecord(moneyCardUseFlow)); | 
 |  |  |         pageDto.setCompanyId(sysVipInfo.getCompanyId()); | 
 |  |  |         List<MoneyCardUseFlow> dataList = moneyCardUseFlowDao.selectForWxInPage(pageDto); | 
 |  |  |         return AjaxResult.buildSuccessInstance(dataList); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 
 |  |  | 
 |  |  | import cn.hutool.core.util.ObjectUtil; | 
 |  |  | import com.alibaba.fastjson.JSON; | 
 |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
 |  |  | import com.baomidou.mybatisplus.core.metadata.IPage; | 
 |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
 |  |  | import com.matrix.component.redis.RedisUserLoginUtils; | 
 |  |  | import com.matrix.core.pojo.AjaxResult; | 
 |  |  | import com.matrix.core.tools.StringUtils; | 
 |  |  | 
 |  |  | import com.matrix.system.activity.entity.ActivitySignWriteoff; | 
 |  |  | import com.matrix.system.hive.bean.SysVipInfo; | 
 |  |  | import com.matrix.system.shopXcx.api.dto.ClickSignDTO; | 
 |  |  | import com.matrix.system.shopXcx.api.dto.SeeAwardTextDto; | 
 |  |  | import com.matrix.system.shopXcx.api.dto.SignAwardDto; | 
 |  |  | import com.matrix.system.shopXcx.api.vo.*; | 
 |  |  | import com.matrix.system.shopXcx.bean.ShopActivities; | 
 |  |  | import com.matrix.system.shopXcx.dao.ShopActivitiesDao; | 
 |  |  | import com.matrix.system.shopXcx.vo.SalesOrderVo; | 
 |  |  | 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.transaction.annotation.Transactional; | 
 |  |  | import org.springframework.validation.annotation.Validated; | 
 |  |  | import org.springframework.web.bind.annotation.*; | 
 |  |  |  | 
 |  |  | import java.util.Date; | 
 |  |  | 
 |  |  |         return getCumulativeDay(actId,userId,offsetDay,i); | 
 |  |  |     } | 
 |  |  |      | 
 |  |  | //    /** | 
 |  |  | //     * 获取累计的签到奖品数量 | 
 |  |  | //     * | 
 |  |  | //     * @return | 
 |  |  | //     */ | 
 |  |  | //    @ApiOperation(value = "获取累计的签到奖品列表", notes = "") | 
 |  |  | //    @ApiResponses({ | 
 |  |  | //            @ApiResponse(code = 200, message = "ok", response = SignAwardListVO.class) | 
 |  |  | //    }) | 
 |  |  | //    @GetMapping(value = "/getSignAwardList") | 
 |  |  | //    @PostMapping(value = "/getSignAwardList") | 
 |  |  | //    public AjaxResult getSignAwardList(@RequestBody SignAwardListVO signAwardListVO) { | 
 |  |  | //        SysVipInfo user = redisUserLoginUtils.getLoginUser(SysVipInfo.class); | 
 |  |  | //        Long userId = user.getId(); | 
 |  |  | //        Long companyId = user.getCompanyId(); | 
 |  |  | //        int size = activitySignReceiveRecordDao.getSignAwardReceiveCount(userId, companyId); | 
 |  |  | //        AjaxResult ajaxResult = AjaxResult.buildSuccessInstance(size); | 
 |  |  | //        return ajaxResult; | 
 |  |  | //    } | 
 |  |  |     /** | 
 |  |  |      * 获取累计的签到奖品 | 
 |  |  |      * | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @ApiOperation(value = "获取累计的签到奖品", notes = "") | 
 |  |  |     @PostMapping(value = "/getSignAwardList") | 
 |  |  |     @ApiResponses({ | 
 |  |  |             @ApiResponse(code = 200, message = "ok", response = SignAwardListVo.class) | 
 |  |  |     }) | 
 |  |  |     public AjaxResult getSignAwardList(@RequestBody @Validated SignAwardDto signAwardDto) { | 
 |  |  |         SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); | 
 |  |  |         Page<SalesOrderVo> page=new Page<>(signAwardDto.getPageNum(),signAwardDto.getPageSize()); | 
 |  |  |         if(StringUtils.isBlank(signAwardDto.getSort())){ | 
 |  |  |             signAwardDto.setSort("create_time"); | 
 |  |  |             signAwardDto.setOrder("desc"); | 
 |  |  |         } | 
 |  |  |         signAwardDto.setUserId(loginUser.getId()); | 
 |  |  |         signAwardDto.setCompanyId(loginUser.getCompanyId()); | 
 |  |  |         IPage<SignAwardListVo> signAwardListVos = activitySignReceiveRecordDao.selectSignAwardList(page,signAwardDto); | 
 |  |  |         AjaxResult result=AjaxResult.buildSuccessInstance(signAwardListVos.getRecords()); | 
 |  |  |         return result; | 
 |  |  |     } | 
 |  |  |      | 
 |  |  |     /** | 
 |  |  |      * 查看劵码 | 
 |  |  |      * | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @ApiOperation(value = "查看劵码", notes = "") | 
 |  |  |     @PostMapping(value = "/seeAwardText") | 
 |  |  |     @ApiResponses({ | 
 |  |  |             @ApiResponse(code = 200, message = "ok", response = SeeAwardTextVo.class) | 
 |  |  |     }) | 
 |  |  |     public AjaxResult seeAwardText(@RequestBody @Validated SeeAwardTextDto seeAwardTextDto) { | 
 |  |  |         SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); | 
 |  |  |         seeAwardTextDto.setUserId(loginUser.getId()); | 
 |  |  |         seeAwardTextDto.setCompanyId(loginUser.getCompanyId()); | 
 |  |  |         SeeAwardTextVo seeAwardTextVO = activitySignReceiveRecordDao.selectSeeAwardTextVOById(seeAwardTextDto); | 
 |  |  |         AjaxResult result=AjaxResult.buildSuccessInstance(seeAwardTextVO); | 
 |  |  |         return result; | 
 |  |  |     } | 
 |  |  |      | 
 |  |  |     /** | 
 |  |  |      * 物流配送确认 | 
 |  |  |      * | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @ApiOperation(value = "查看劵码", notes = "") | 
 |  |  |     @PostMapping(value = "/logisticsInsure") | 
 |  |  |     @ApiResponses({ | 
 |  |  |             @ApiResponse(code = 200, message = "ok", response = SeeAwardTextVo.class) | 
 |  |  |     }) | 
 |  |  |     public AjaxResult logisticsInsure(@RequestBody @Validated SeeAwardTextDto seeAwardTextDto) { | 
 |  |  |         SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); | 
 |  |  |         seeAwardTextDto.setUserId(loginUser.getId()); | 
 |  |  |         seeAwardTextDto.setCompanyId(loginUser.getCompanyId()); | 
 |  |  |         SeeAwardTextVo seeAwardTextVO = activitySignReceiveRecordDao.selectSeeAwardTextVOById(seeAwardTextDto); | 
 |  |  |         AjaxResult result=AjaxResult.buildSuccessInstance(seeAwardTextVO); | 
 |  |  |         return result; | 
 |  |  |     } | 
 |  |  |      | 
 |  |  |      | 
 |  |  |      | 
 
 |  |  | 
 |  |  |         } | 
 |  |  |         logisticsInfo.put("isShipments",AppConstance.IS_SHIPMENTS); | 
 |  |  |         logisticsInfo.put("logisticsStatus",shopDeliveryInfo.getLogisticsStatus()==null?"0":String.valueOf(shopDeliveryInfo.getLogisticsStatus())); | 
 |  |  |         logisticsInfo.put("logisticsCompany", shopDeliveryInfo.getLogisticsCompany()); | 
 |  |  |         logisticsInfo.put("waybillNo", shopDeliveryInfo.getWaybillNo()); | 
 |  |  |         logisticsInfo.put("describe",describe); | 
 |  |  |         result.setStatus(AjaxResult.STATUS_SUCCESS); | 
 |  |  |         result.putInMap("logisticsInfo",logisticsInfo); | 
 
| New file | 
 |  |  | 
 |  |  | package com.matrix.system.shopXcx.api.dto; | 
 |  |  |  | 
 |  |  | import com.matrix.core.pojo.BasePageQueryDto; | 
 |  |  | import io.swagger.annotations.ApiModel; | 
 |  |  | import io.swagger.annotations.ApiModelProperty; | 
 |  |  | import lombok.Data; | 
 |  |  |  | 
 |  |  | import javax.validation.constraints.NotEmpty; | 
 |  |  | import javax.validation.constraints.NotNull; | 
 |  |  |  | 
 |  |  | @Data | 
 |  |  | @ApiModel(value = "MoneyCardUseFlowDto", description = "储值卡流水查询参数接收类") | 
 |  |  | public class MoneyCardUseFlowDto extends BasePageQueryDto { | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @NotEmpty(message = "请选择查询时间") | 
 |  |  |     @ApiModelProperty(value = "查询月份",example = "2021-03") | 
 |  |  |     private String queryTime; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiModelProperty(value = "收支类型 不传全部,1,收入,2支出", example = "1") | 
 |  |  |     private Integer  revenueType; | 
 |  |  |  | 
 |  |  |     @NotNull(message = "请选择要查询的储值卡ID") | 
 |  |  |     @ApiModelProperty(value = "储值卡id", example = "1") | 
 |  |  |     private Long  carUseId; | 
 |  |  |  | 
 |  |  |     @ApiModelProperty(hidden = true) | 
 |  |  |     private Long  companyId; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | } | 
 
| New file | 
 |  |  | 
 |  |  | package com.matrix.system.shopXcx.api.dto; | 
 |  |  |  | 
 |  |  | import javax.validation.constraints.NotNull; | 
 |  |  |  | 
 |  |  | import io.swagger.annotations.ApiModel; | 
 |  |  | import io.swagger.annotations.ApiModelProperty; | 
 |  |  | import lombok.Data; | 
 |  |  |  | 
 |  |  | @Data | 
 |  |  | @ApiModel(value = "SeeAwardTextDto", description = "查询参数接收类") | 
 |  |  | public class SeeAwardTextDto { | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @NotNull(message = "奖品ID不能为空") | 
 |  |  |     @ApiModelProperty(value = "奖品ID", example = "1") | 
 |  |  |     private Long  awardId; | 
 |  |  |  | 
 |  |  |     @ApiModelProperty(hidden = true) | 
 |  |  |     private Long  userId; | 
 |  |  |      | 
 |  |  |     @ApiModelProperty(hidden = true) | 
 |  |  |     private Long  companyId; | 
 |  |  |  | 
 |  |  | } | 
 
| New file | 
 |  |  | 
 |  |  | package com.matrix.system.shopXcx.api.dto; | 
 |  |  |  | 
 |  |  | import com.matrix.core.pojo.BasePageQueryDto; | 
 |  |  |  | 
 |  |  | import io.swagger.annotations.ApiModel; | 
 |  |  | import io.swagger.annotations.ApiModelProperty; | 
 |  |  | import lombok.Data; | 
 |  |  | @Data | 
 |  |  | @ApiModel(value = "SignAwardDto", description = "查询参数接收类") | 
 |  |  | public class SignAwardDto extends BasePageQueryDto { | 
 |  |  |  | 
 |  |  |     @ApiModelProperty(hidden = true) | 
 |  |  |     private Long  userId; | 
 |  |  |      | 
 |  |  |     @ApiModelProperty(hidden = true) | 
 |  |  |     private Long  companyId; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | } | 
 
 |  |  | 
 |  |  |  | 
 |  |  | import lombok.Data; | 
 |  |  |  | 
 |  |  | import javax.validation.constraints.NotNull; | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  | 
 |  |  |     /** | 
 |  |  |      *  收货地址ID | 
 |  |  |      */ | 
 |  |  |     @NotNull(message = "请选择正确的收获地址") | 
 |  |  |     private Integer receiveAddrId; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     private Integer joinActive; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      *  支付方式1微信,2 vipCard余额 | 
 |  |  |      */ | 
 |  |  |     @NotNull(message = "请选择支付方式") | 
 |  |  |     private Integer payMethod; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      *  订单备注 | 
 
 |  |  | 
 |  |  |      * @return | 
 |  |  |      * @throws Exception | 
 |  |  |      */ | 
 |  |  |     AjaxResult createShopOrder(ShopOrderDto shopOrderDto) throws Exception; | 
 |  |  |     ShopOrder createShopOrder(ShopOrderDto shopOrderDto) throws Exception; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 订单结算 | 
 
 |  |  | 
 |  |  | import cn.hutool.core.collection.CollUtil; | 
 |  |  | import com.google.gson.Gson; | 
 |  |  | import com.google.gson.GsonBuilder; | 
 |  |  | import com.matrix.system.hive.bean.SysVipInfo; | 
 |  |  | import com.matrix.component.rabbitmq.RabiitMqTemplate; | 
 |  |  | import com.matrix.component.redis.RedisUserLoginUtils; | 
 |  |  | import com.matrix.component.tools.WxUtils; | 
 |  |  | 
 |  |  | import com.matrix.system.common.dao.BusParameterSettingsDao; | 
 |  |  | import com.matrix.system.common.dao.CustomerDataDictionaryDao; | 
 |  |  | import com.matrix.system.common.interceptor.HostInterceptor; | 
 |  |  | import com.matrix.system.hive.bean.SysVipInfo; | 
 |  |  | import com.matrix.system.hive.dao.ShoppingGoodsDao; | 
 |  |  | import com.matrix.system.hive.dao.SysVipInfoDao; | 
 |  |  | import com.matrix.system.score.dao.ScoreVipDetailDao; | 
 |  |  | 
 |  |  | import com.matrix.system.shopXcx.api.service.ShoppingCartService; | 
 |  |  | import com.matrix.system.shopXcx.api.service.WXShopOrderService; | 
 |  |  | import com.matrix.system.shopXcx.api.service.WxShopCouponService; | 
 |  |  | import com.matrix.system.shopXcx.api.tools.WxShopCouponUtil; | 
 |  |  | import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil; | 
 |  |  | import com.matrix.system.shopXcx.api.vo.CouponReceiveInfoVO; | 
 |  |  | import com.matrix.system.shopXcx.bean.*; | 
 |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private WxShopOrderUtil wxShopOrderUtil; | 
 |  |  |     @Autowired | 
 |  |  |     private WxShopCouponUtil wxShopCouponUtil; | 
 |  |  |     @Autowired | 
 |  |  |     private RedisUserLoginUtils redisUserLoginUtils; | 
 |  |  |     @Autowired | 
 |  |  |     private WeixinServiceUtil weixinServiceUtil; | 
 |  |  | 
 |  |  |     private ShopOrderDao shopOrderDao; | 
 |  |  |     @Autowired | 
 |  |  |     private ShopOrderDetailsDao shopOrderDetailsDao; | 
 |  |  |     @Autowired | 
 |  |  |     private ShopCouponDao shopCouponDao; | 
 |  |  |     @Autowired | 
 |  |  |     private ShopProductDao shopProductDao; | 
 |  |  |     @Autowired | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     @Transactional(rollbackFor = Exception.class) | 
 |  |  |     @Override | 
 |  |  |     public AjaxResult createShopOrder(ShopOrderDto shopOrderDto) throws Exception { | 
 |  |  |     public ShopOrder createShopOrder(ShopOrderDto shopOrderDto) throws Exception { | 
 |  |  |         SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         //校验收货地址 | 
 |  |  |  | 
 |  |  |         ShopReceiveAddress shopReceiveAddress = shopReceiveAddressDao.selectById(shopOrderDto.getReceiveAddrId()); | 
 |  |  |         if (shopReceiveAddress == null) { | 
 |  |  |             return new AjaxResult(AjaxResult.STATUS_FAIL, "请选择正确的收获地址"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         //计算订单优惠信息 | 
 |  |  |         AjaxResult caculateResult= buildDiscountExplain(shopOrderDto); | 
 |  |  |         DiscountExplain discountExplain= (DiscountExplain) caculateResult.getMapInfo().get("discountExplain"); | 
 |  |  |  | 
 |  |  |         if(discountExplain.getScorePay()!=null){ | 
 |  |  |             //校验用户积分是否够用 | 
 |  |  |             int score=scoreVipDetailDao.selectUserTotalScore(sysVipInfo.getId()); | 
 |  |  |             if(score<discountExplain.getScorePay()){ | 
 |  |  |                 return  AjaxResult.buildFailInstance("积分不足"); | 
 |  |  |                 throw new GlobleException("积分不足"); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         ShopOrder shopOrder = new ShopOrder(); | 
 |  |  |         shopOrder.setCompanyId(sysVipInfo.getCompanyId()); | 
 |  |  | 
 |  |  |         shopOrder.setUserId(sysVipInfo.getId()); | 
 |  |  |         shopOrder.setCreateBy("微信小程序生成"); | 
 |  |  |         shopOrder.setUpdateBy("微信小程序生成"); | 
 |  |  |         shopOrder.setPayMethod(shopOrderDto.getPayMethod()); | 
 |  |  |         shopOrder.setCommodityPrice(discountExplain.getBillPrice()); | 
 |  |  |         shopOrder.setPurchaseQuantity(orderCount); | 
 |  |  |         shopOrder.setOrderType(ShopOrder.ORDER_TYPE_GOODS); | 
 |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         BrandWCPayRequestData payData = startPayment(shopOrder); | 
 |  |  |         AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, Arrays.asList(payData)); | 
 |  |  |         result.putInMap("orderId", shopOrder.getId()); | 
 |  |  |  | 
 |  |  |         return result; | 
 |  |  |         return shopOrder; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  | 
 |  |  |     @Override | 
 |  |  |     public AjaxResult orderSettlement(int orderId) throws Exception { | 
 |  |  |         ShopOrder shopOrder = shopOrderDao.selectById(orderId); | 
 |  |  |  | 
 |  |  |         if (shopOrder == null) { | 
 |  |  |             throw new GlobleException("订单不存在!"); | 
 |  |  |             return AjaxResult.buildFailInstance("订单不存在!"); | 
 |  |  |         } | 
 |  |  |         if (ShopOrder.SHOP_ORDER_PAY_METHOD_WX != shopOrder.getPayMethod()) { | 
 |  |  |             return AjaxResult.buildFailInstance("支付方式错误"); | 
 |  |  |         } | 
 |  |  |         if (!shopOrder.getPayResult().equals(ShopOrder.ORDER_PAY_STATUS_WAIT)) { | 
 |  |  |             throw new GlobleException("该订单不是待支付状态!"); | 
 |  |  |             return AjaxResult.buildFailInstance("该订单不是待支付状态!"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         if(shopOrder.getScorePay()!=null){ | 
 
 |  |  | 
 |  |  |         List<ShopLogisticsInfo> shopLogisticsList = new ArrayList<ShopLogisticsInfo>(); | 
 |  |  |         AjaxResult result = new AjaxResult(); | 
 |  |  |         Map<String, String> logisticsInfo = new HashMap<String, String>(); | 
 |  |  |         try { | 
 |  |  |             if (shopDeliveryInfo == null) { | 
 |  |  |                 return new AjaxResult(AjaxResult.STATUS_FAIL, "找不到发货信息"); | 
 |  |  |             } | 
 |  |  |             if (!StringUtils.isNotBlank(shopDeliveryInfo.getWaybillNo()) || !StringUtils.isNotBlank(shopDeliveryInfo.getLogisticsCompanyCode())) { | 
 |  |  |                 return new AjaxResult(AjaxResult.STATUS_FAIL, "物流公司信息为空"); | 
 |  |  |             } | 
 |  |  |             logisticsInfo.put("logisticsCompany", shopDeliveryInfo.getLogisticsCompany()); | 
 |  |  |             logisticsInfo.put("waybillNo", shopDeliveryInfo.getWaybillNo()); | 
 |  |  |  | 
 |  |  |             //如果已经签收直接查数据库 | 
 |  |  |             if (AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR.equals(shopDeliveryInfo.getLogisticsStatus())) { | 
 |  |  |  | 
 |  |  |                 List<ShopLogisticsInfo> shopLogisticsInfos = shopLogisticsInfoDao.selectByDelieryId(shopDeliveryInfo.getId()); | 
 |  |  |                 logisticsInfo.put("logisticsStatus", String.valueOf(AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR)); | 
 |  |  |                 result.setStatus(AjaxResult.STATUS_SUCCESS); | 
 |  |  |                 result.setRows(shopLogisticsInfos); | 
 |  |  |                 result.putInMap("logisticsInfo", logisticsInfo); | 
 |  |  |                 return result; | 
 |  |  |             } | 
 |  |  |             Map<String, String> param = new HashMap<String, String>(); | 
 |  |  |             param.put("ShipperCode", shopDeliveryInfo.getLogisticsCompanyCode()); | 
 |  |  |             param.put("LogisticCode", shopDeliveryInfo.getWaybillNo()); | 
 |  |  |             Map<String, String> paramsUrl = getparams(param); | 
 |  |  |             LogUtil.info("物流查询参数" + paramsUrl); | 
 |  |  |             String logisticsResult = HttpCurlUtil.sendPost(logisticsUrl, paramsUrl); | 
 |  |  |             LogUtil.info("查询物流返回信息" + logisticsResult); | 
 |  |  |             LogisticsInfoVo logisticsInfoVo = JSON.parseObject(logisticsResult, LogisticsInfoVo.class); | 
 |  |  |             if (logisticsInfoVo.isSuccess()) { | 
 |  |  |                 ShopDeliveryInfo shopDelivery = new ShopDeliveryInfo(); | 
 |  |  |                 shopDelivery.setLogisticsStatus(Integer.valueOf(logisticsInfoVo.getState())); | 
 |  |  |                 shopDelivery.setId(shopDeliveryInfo.getId()); | 
 |  |  |                 logisticsInfo.put("logisticsStatus", logisticsInfoVo.getState()); | 
 |  |  |                 //更新物流状态 | 
 |  |  |                 shopDeliveryInfoDao.updateByModel(shopDelivery); | 
 |  |  |                 if (CollectionUtils.isNotEmpty(logisticsInfoVo.getTraces())) { | 
 |  |  |                     List<Map<String, String>> mapTraces = logisticsInfoVo.getTraces(); | 
 |  |  |                     for (int i = 0; i < mapTraces.size(); i++) { | 
 |  |  |                         ShopLogisticsInfo shopLogisticsInfo = new ShopLogisticsInfo(); | 
 |  |  |                         shopLogisticsInfo.setCreateBy(AppConstance.SYSTEM_USER); | 
 |  |  |                         shopLogisticsInfo.setUpdateBy(AppConstance.SYSTEM_USER); | 
 |  |  |                         shopLogisticsInfo.setLogisticsTime(mapTraces.get(i).get("AcceptTime")); | 
 |  |  |                         String acceptStation = mapTraces.get(i).get("AcceptStation"); | 
 |  |  |                         shopLogisticsInfo.setDescribe(acceptStation); | 
 |  |  |                         shopLogisticsInfo.setDelieryId(shopDeliveryInfo.getId()); | 
 |  |  |                         if (acceptStation.indexOf(AppConstance.KDN_IS_SIGN) != -1) { | 
 |  |  |                             shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR); | 
 |  |  |                         } else if (acceptStation.indexOf(AppConstance.KDN_IS_RECEIVE) != -1) { | 
 |  |  |                             shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_RECEIVE); | 
 |  |  |                         } else if (acceptStation.indexOf(AppConstance.KDN_IS_ON_WAY) != -1) { | 
 |  |  |                             shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_ON_WAY); | 
 |  |  |                         } else if (acceptStation.indexOf(AppConstance.KDN_IS_MISTAKE) != -1) { | 
 |  |  |                             shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_MISTAKE); | 
 |  |  |                         } else { | 
 |  |  |                             shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_NONE); | 
 |  |  |                         } | 
 |  |  |                         shopLogisticsList.add(shopLogisticsInfo); | 
 |  |  |                     } | 
 |  |  |                     shopLogisticsInfoDao.deleteByDelieryId(shopDeliveryInfo.getId()); | 
 |  |  |                     if (CollectionUtils.isNotEmpty(shopLogisticsList)) { | 
 |  |  |                         shopLogisticsInfoDao.batchInsert(shopLogisticsList); | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |             } else { | 
 |  |  |                 throw new GlobleException(logisticsInfoVo.getReason()); | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |         } catch (Exception e) { | 
 |  |  |             throw new GlobleException("物流信息查询失败"); | 
 |  |  |         if (shopDeliveryInfo == null) { | 
 |  |  |             return new AjaxResult(AjaxResult.STATUS_FAIL, "找不到发货信息"); | 
 |  |  |         } | 
 |  |  |         if (!StringUtils.isNotBlank(shopDeliveryInfo.getWaybillNo()) || !StringUtils.isNotBlank(shopDeliveryInfo.getLogisticsCompanyCode())) { | 
 |  |  |             return new AjaxResult(AjaxResult.STATUS_FAIL, "物流公司信息为空"); | 
 |  |  |         } | 
 |  |  |         logisticsInfo.put("logisticsCompany", shopDeliveryInfo.getLogisticsCompany()); | 
 |  |  |         logisticsInfo.put("waybillNo", shopDeliveryInfo.getWaybillNo()); | 
 |  |  |  | 
 |  |  |         //如果已经签收直接查数据库 | 
 |  |  |         if (AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR.equals(shopDeliveryInfo.getLogisticsStatus())) { | 
 |  |  |  | 
 |  |  |             List<ShopLogisticsInfo> shopLogisticsInfos = shopLogisticsInfoDao.selectByDelieryId(shopDeliveryInfo.getId()); | 
 |  |  |             logisticsInfo.put("logisticsStatus", String.valueOf(AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR)); | 
 |  |  |             result.setStatus(AjaxResult.STATUS_SUCCESS); | 
 |  |  |             result.setRows(shopLogisticsInfos); | 
 |  |  |             result.putInMap("logisticsInfo", logisticsInfo); | 
 |  |  |             return result; | 
 |  |  |         } | 
 |  |  |         Map<String, String> param = new HashMap<String, String>(); | 
 |  |  |         param.put("ShipperCode", shopDeliveryInfo.getLogisticsCompanyCode()); | 
 |  |  |         param.put("LogisticCode", shopDeliveryInfo.getWaybillNo()); | 
 |  |  |         Map<String, String> paramsUrl = getparams(param); | 
 |  |  |         LogUtil.info("物流查询参数" + paramsUrl); | 
 |  |  |         String logisticsResult = HttpCurlUtil.sendPost(logisticsUrl, paramsUrl); | 
 |  |  |         LogUtil.info("查询物流返回信息" + logisticsResult); | 
 |  |  |         LogisticsInfoVo logisticsInfoVo = JSON.parseObject(logisticsResult, LogisticsInfoVo.class); | 
 |  |  |         if (logisticsInfoVo.isSuccess()) { | 
 |  |  |             ShopDeliveryInfo shopDelivery = new ShopDeliveryInfo(); | 
 |  |  |             shopDelivery.setLogisticsStatus(Integer.valueOf(logisticsInfoVo.getState())); | 
 |  |  |             shopDelivery.setId(shopDeliveryInfo.getId()); | 
 |  |  |             logisticsInfo.put("logisticsStatus", logisticsInfoVo.getState()); | 
 |  |  |             //更新物流状态 | 
 |  |  |             shopDeliveryInfoDao.updateByModel(shopDelivery); | 
 |  |  |             if (CollectionUtils.isNotEmpty(logisticsInfoVo.getTraces())) { | 
 |  |  |                 List<Map<String, String>> mapTraces = logisticsInfoVo.getTraces(); | 
 |  |  |                 for (int i = 0; i < mapTraces.size(); i++) { | 
 |  |  |                     ShopLogisticsInfo shopLogisticsInfo = new ShopLogisticsInfo(); | 
 |  |  |                     shopLogisticsInfo.setCreateBy(AppConstance.SYSTEM_USER); | 
 |  |  |                     shopLogisticsInfo.setUpdateBy(AppConstance.SYSTEM_USER); | 
 |  |  |                     shopLogisticsInfo.setLogisticsTime(mapTraces.get(i).get("AcceptTime")); | 
 |  |  |                     String acceptStation = mapTraces.get(i).get("AcceptStation"); | 
 |  |  |                     shopLogisticsInfo.setDescribe(acceptStation); | 
 |  |  |                     shopLogisticsInfo.setDelieryId(shopDeliveryInfo.getId()); | 
 |  |  |                     if (acceptStation.indexOf(AppConstance.KDN_IS_SIGN) != -1) { | 
 |  |  |                         shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_SIGN_FOR); | 
 |  |  |                     } else if (acceptStation.indexOf(AppConstance.KDN_IS_RECEIVE) != -1) { | 
 |  |  |                         shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_RECEIVE); | 
 |  |  |                     } else if (acceptStation.indexOf(AppConstance.KDN_IS_ON_WAY) != -1) { | 
 |  |  |                         shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_ON_WAY); | 
 |  |  |                     } else if (acceptStation.indexOf(AppConstance.KDN_IS_MISTAKE) != -1) { | 
 |  |  |                         shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_MISTAKE); | 
 |  |  |                     } else { | 
 |  |  |                         shopLogisticsInfo.setState(AppConstance.LOGISTICS_STATUS_OF_NONE); | 
 |  |  |                     } | 
 |  |  |                     shopLogisticsList.add(shopLogisticsInfo); | 
 |  |  |                 } | 
 |  |  |                 shopLogisticsInfoDao.deleteByDelieryId(shopDeliveryInfo.getId()); | 
 |  |  |                 if (CollectionUtils.isNotEmpty(shopLogisticsList)) { | 
 |  |  |                     shopLogisticsInfoDao.batchInsert(shopLogisticsList); | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         List<ShopLogisticsInfo> shopLogisticsInfos = shopLogisticsInfoDao.selectByDelieryId(shopDeliveryInfo.getId()); | 
 |  |  |         result.setStatus(AjaxResult.STATUS_SUCCESS); | 
 |  |  |         result.setRows(shopLogisticsInfos); | 
 |  |  | 
 |  |  |      * @param map | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     private Map<String, String> getparams(Map<String, String> map) throws Exception { | 
 |  |  |     private Map<String, String> getparams(Map<String, String> map)  { | 
 |  |  |         String params = JSON.toJSONString(map); | 
 |  |  |         Map<String, String> paramsUrl = new HashMap<String, String>(); | 
 |  |  |         paramsUrl.put("RequestData", URLEncoder.encode(params, "UTF-8")); | 
 |  |  |         try { | 
 |  |  |             paramsUrl.put("RequestData", URLEncoder.encode(params, "UTF-8")); | 
 |  |  |             String dataSign = encrypt(params, appKey, "UTF-8"); | 
 |  |  |             paramsUrl.put("DataSign", URLEncoder.encode(dataSign, "UTF-8")); | 
 |  |  |         } catch (Exception e) { | 
 |  |  |            throw new GlobleException(e.getMessage()); | 
 |  |  |         } | 
 |  |  |         paramsUrl.put("EBusinessID", eBusinessID); | 
 |  |  |         paramsUrl.put("RequestType", requestType); | 
 |  |  |         String dataSign = encrypt(params, appKey, "UTF-8"); | 
 |  |  |         paramsUrl.put("DataSign", URLEncoder.encode(dataSign, "UTF-8")); | 
 |  |  |         paramsUrl.put("DataType", AppConstance.DATATYPE); | 
 |  |  |         return paramsUrl; | 
 |  |  |     } | 
 
 |  |  | 
 |  |  |         shopDeliveryInfo.setUserId(shopOrder.getUserId()); | 
 |  |  |         shopDeliveryInfo.setDeliveryWay(shippingMethod); | 
 |  |  |         shopDeliveryInfo.setShopId(shopOrder.getStoreId().longValue()); | 
 |  |  |         shopDeliveryInfo.setCompanyId(shopOrder.getCompanyId()); | 
 |  |  |         StringBuffer receiveAddrStr = new StringBuffer(); | 
 |  |  |         if (receiveAddress != null) { | 
 |  |  |             receiveAddrStr.append(receiveAddress.getAddrProvince()); | 
 
| New file | 
 |  |  | 
 |  |  | package com.matrix.system.shopXcx.api.vo; | 
 |  |  |  | 
 |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
 |  |  | import io.swagger.annotations.ApiModel; | 
 |  |  | import io.swagger.annotations.ApiModelProperty; | 
 |  |  | import lombok.Data; | 
 |  |  |  | 
 |  |  | import java.util.Date; | 
 |  |  |  | 
 |  |  | @Data | 
 |  |  | @ApiModel(value = "SeeAwardTextVo", description = "劵码信息") | 
 |  |  | public class SeeAwardTextVo { | 
 |  |  | 	 | 
 |  |  |     @ApiModelProperty(value ="奖项名称") | 
 |  |  |     private String  awardName; | 
 |  |  |  | 
 |  |  |     @ApiModelProperty(value ="图片介绍") | 
 |  |  |     private String  introduceImg; | 
 |  |  | 	 | 
 |  |  |     @ApiModelProperty(value ="兑奖方式(1:线下兑换2:物流配送3:客服兑换)") | 
 |  |  |     private int  awardWay; | 
 |  |  | 	 | 
 |  |  |     @ApiModelProperty(value ="数量") | 
 |  |  |     private int  total; | 
 |  |  |  | 
 |  |  |     @ApiModelProperty(value ="兑奖期限开始日期") | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8") | 
 |  |  |     private Date  prizeStartTime; | 
 |  |  | 	 | 
 |  |  |     @ApiModelProperty(value ="兑奖期限结束日期") | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8") | 
 |  |  |     private Date  prizeEndTime; | 
 |  |  | 	 | 
 |  |  |     @ApiModelProperty(value =" 核销码") | 
 |  |  |     private String  writeOffCode; | 
 |  |  |  | 
 |  |  |     @ApiModelProperty(value ="兑奖须知") | 
 |  |  |     private String  operationTip; | 
 |  |  | 	 | 
 |  |  |     @ApiModelProperty(value ="兑奖地址") | 
 |  |  |     private String  prizeAddress; | 
 |  |  |  | 
 |  |  |     @ApiModelProperty(value ="客服微信") | 
 |  |  |     private String  wechatImg; | 
 |  |  |  | 
 |  |  |     @ApiModelProperty(value =" 是否已领取(1:待领取2:已领取)") | 
 |  |  |     private Integer  state; | 
 |  |  |  | 
 |  |  | } | 
 
| New file | 
 |  |  | 
 |  |  | package com.matrix.system.shopXcx.api.vo; | 
 |  |  |  | 
 |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
 |  |  | import io.swagger.annotations.ApiModel; | 
 |  |  | import io.swagger.annotations.ApiModelProperty; | 
 |  |  | import lombok.Data; | 
 |  |  |  | 
 |  |  | import java.util.Date; | 
 |  |  |  | 
 |  |  | @Data | 
 |  |  | @ApiModel(value = "SignAwardListVo", description = "奖品列表") | 
 |  |  | public class SignAwardListVo { | 
 |  |  |     /** | 
 |  |  |      * 主键 | 
 |  |  |      */ | 
 |  |  |     private Long  id; | 
 |  |  | 	 | 
 |  |  |     @ApiModelProperty(value ="奖项名称") | 
 |  |  |     private String  awardName; | 
 |  |  |  | 
 |  |  |     @ApiModelProperty(value ="图片介绍") | 
 |  |  |     private String  introduceImg; | 
 |  |  | 	 | 
 |  |  |     @ApiModelProperty(value ="兑奖方式(1:线下兑换2:物流配送3:客服兑换)") | 
 |  |  |     private int  awardWay; | 
 |  |  | 	 | 
 |  |  |     @ApiModelProperty(value ="数量") | 
 |  |  |     private int  total; | 
 |  |  | 	 | 
 |  |  |     @ApiModelProperty(value ="是否已领取(1:待领取2:已领取)") | 
 |  |  |     private Integer  state; | 
 |  |  | 	 | 
 |  |  |     @ApiModelProperty(value ="领取时间") | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") | 
 |  |  |     private Date  receiveTime; | 
 |  |  |  | 
 |  |  | } | 
 
 |  |  | 
 |  |  | import java.util.Date; | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
 |  |  |  | 
 |  |  | @Data | 
 |  |  |  | 
 |  |  | @ApiModel(value = "SignBasicInfoVo", description = "签到活动") | 
 |  |  | 
 |  |  |     @ApiModelProperty(value ="活动编码") | 
 |  |  |     private String actCode; | 
 |  |  |     @ApiModelProperty(value ="活动开始时间") | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") | 
 |  |  |     private Date beginTime; | 
 |  |  |     @ApiModelProperty(value ="活动结束时间") | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") | 
 |  |  |     private Date endTime; | 
 |  |  |     @ApiModelProperty(value ="活动基本参数") | 
 |  |  |     private SignBasicInfoJsonVo signBasicInfoJsonVo; | 
 
 |  |  | 
 |  |  |  | 
 |  |  | import java.util.Date; | 
 |  |  |  | 
 |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
 |  |  |  | 
 |  |  | @Data | 
 |  |  |  | 
 |  |  | @ApiModel(value = "SignSuccessVo", description = "签到活动") | 
 |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiModelProperty(value ="兑奖期限开始日期") | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") | 
 |  |  |     private Date  prizeStartTime; | 
 |  |  |      | 
 |  |  |     /** | 
 |  |  | 
 |  |  |      */ | 
 |  |  |  | 
 |  |  |     @ApiModelProperty(value ="兑奖期限结束日期") | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") | 
 |  |  |     private Date  prizeEndTime; | 
 |  |  |      | 
 |  |  |     /** | 
 
 |  |  | 
 |  |  | public class ShopOrder extends EntityDTO { | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 支付方式-微信支付 | 
 |  |  |      */ | 
 |  |  |     public static final int SHOP_ORDER_PAY_METHOD_WX = 1; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 支付方式-vip会籍卡 | 
 |  |  |      */ | 
 |  |  |     public static final int SHOP_ORDER_PAY_METHOD_VIPCARD = 2; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 订单微信支付状态(待支付) | 
 |  |  |      */ | 
 |  |  |     public static final int ORDER_WX_STATUS_WAIT_PAY = 1; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 订单微信支付状态(支付成功) | 
 |  |  |      */ | 
 |  |  | 
 |  |  |      * 支付状态(1=待支付,2=支付成功,3=支付失败) | 
 |  |  |      */ | 
 |  |  |     private Integer payStatus; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      *  支付方式1微信,2 vipCard余额 | 
 |  |  |      */ | 
 |  |  |     private Integer payMethod; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 优惠说明 | 
 |  |  | 
 |  |  |         this.delFlag = delFlag; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     public Integer getPayMethod() { | 
 |  |  |         return payMethod; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void setPayMethod(Integer payMethod) { | 
 |  |  |         this.payMethod = payMethod; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public String getWxOrderNo() { | 
 |  |  |         return wxOrderNo; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     public void setWxOrderNo(String wxOrderNo) { | 
 |  |  |         this.wxOrderNo = wxOrderNo; | 
 |  |  |     } | 
 
 |  |  | 
 |  |  |      * 开始时间 | 
 |  |  |      */ | 
 |  |  |     private String orderBeginTime; | 
 |  |  |     /** | 
 |  |  |      * 开始时间 | 
 |  |  |      */ | 
 |  |  |     private String orderTime; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 结束时间 | 
 
 |  |  | 
 |  |  |  | 
 |  |  | #线上测试环境 | 
 |  |  |  | 
 |  |  | spring.datasource.username=ct_test | 
 |  |  | spring.datasource.password=123456 | 
 |  |  | spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 | 
 |  |  | #spring.datasource.username=ct_test | 
 |  |  | #spring.datasource.password=123456 | 
 |  |  | #spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 | 
 |  |  |  | 
 |  |  | spring.datasource.username=xc_shop | 
 |  |  | spring.datasource.password=xc_shop123!@# | 
 |  |  | spring.datasource.url=jdbc:mysql://124.70.222.34/xc_shop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 
 |  |  | 
 |  |  | ADD COLUMN `pay_no`  varchar(32) NULL COMMENT '微信充值订单号'; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | ALTER TABLE `shop_order` | 
 |  |  |     ADD COLUMN `pay_method`  int(2) NULL COMMENT '支付方式1微信,2 vipCard余额'; | 
 |  |  | update shop_order set pay_method=1; | 
 |  |  |  | 
 |  |  | ALTER TABLE `sys_vip_info` | 
 |  |  |     ADD COLUMN `fenxiao_state` int(11) NULL DEFAULT NULL COMMENT '分销审核状态' AFTER `recommend_id`, | 
 
| New file | 
 |  |  | 
 |  |  | evn=xcshop | 
 |  |  | server.port=8080 | 
 |  |  |  | 
 |  |  |  | 
 |  |  | #线上测试环境 | 
 |  |  |  | 
 |  |  | spring.datasource.username=xc_shop | 
 |  |  | spring.datasource.password=xc_shop123!@# | 
 |  |  | spring.datasource.url=jdbc:mysql://124.70.222.34/xc_shop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 | 
 |  |  |  | 
 |  |  | #spring.datasource.username=chuhuan | 
 |  |  | #spring.datasource.password=chuhuan | 
 |  |  | #spring.datasource.url=jdbc:mysql://175.6.132.141:3306/hive_v2_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource | 
 |  |  | spring.datasource.initialSize=3 | 
 |  |  | spring.datasource.minIdle=3 | 
 |  |  | spring.datasource.maxActive=20 | 
 |  |  | spring.datasource.maxWait=60000 | 
 |  |  | spring.datasource.timeBetweenEvictionRunsMillis=60000 | 
 |  |  | spring.datasource.minEvictableIdleTimeMillis=300000 | 
 |  |  | spring.datasource.validationQuery=SELECT 1 FROM DUAL | 
 |  |  | spring.datasource.testWhileIdle=true | 
 |  |  | spring.datasource.testOnBorrow=true | 
 |  |  | spring.datasource.testOnReturn=true | 
 |  |  | spring.datasource.filters=stat,wall,log4j | 
 |  |  | spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 | 
 |  |  | spring.thymeleaf.prefix: classpath:/templates/views/ | 
 |  |  | spring.thymeleaf.cache=false | 
 |  |  | mybatis-plus.config-location=classpath:mybatis/mybatis-config.xml | 
 |  |  | mybatis-plus.mapper-locations=classpath*:mybatis/mapper/**/*.xml | 
 |  |  |  | 
 |  |  | #设置全局时间返回格式 第三行设置为true表示返回时间戳 | 
 |  |  | #spring.jackson.date-format=yyyy-MM-dd | 
 |  |  | #spring.jackson.time-zone=GMT+8 | 
 |  |  | #spring.jackson.serialization.write-dates-as-timestamps=true | 
 |  |  | #文件上传时的大小限制 单位M | 
 |  |  | spring.servlet.multipart.max-file-size=100MB | 
 |  |  | spring.servlet.multipart.max-request-size=100MB | 
 |  |  | #-------------------------------------- | 
 |  |  |  | 
 |  |  |  | 
 |  |  | #rabbitMQ配置 | 
 |  |  | rabbitmq.host=47.111.134.136 | 
 |  |  | rabbitmq.port=5672 | 
 |  |  | rabbitmq.username=hivequeue | 
 |  |  | rabbitmq.password=hivequeueadmin | 
 |  |  | useRabbit=false | 
 |  |  |  | 
 |  |  | server.session.timeout=120 | 
 |  |  |  | 
 |  |  | ali.sms.accessKeyId=LTAI4FrjY9R9iDfC6YQTHfne | 
 |  |  | ali.sms.accessKeySecret=eSvQslpHpDSGlI9Hxm4y5MynNgLbCp | 
 |  |  | ali.sms.regionId=cn-hangzhou | 
 |  |  | ali.sms.signName=\u80bd\u598d | 
 |  |  |  | 
 |  |  | #hour | 
 |  |  | activities.groupBuy.limit=24 | 
 |  |  | #minute | 
 |  |  | groupBuy.pay.timeLimit=30 | 
 |  |  |  | 
 |  |  | #定时任务 | 
 |  |  | scheduling.enabled=false | 
 |  |  |  | 
 |  |  | swagger.enable=true | 
 |  |  | swagger.security.username=admin | 
 |  |  | swagger.security.password=admin | 
 |  |  |  | 
 |  |  |  | 
 |  |  | #默认头像 | 
 |  |  | default.vip.photo.woman=https://filehive2.jyymatrix.cc/uploadeFile/20210125/db53552e688040afb286686f081e1e68f3fe946f75624598828f01898635152e.png | 
 |  |  | default.vip.photo.man=https://filehive2.jyymatrix.cc/uploadeFile/20210125/3642f1d827c44c76832fea106c85e0f89e089c16cbcc4dd0a82bb52b9ac700f4.png | 
 
| New file | 
 |  |  | 
 |  |  | /* 前后端通信相关的配置,注释只允许使用多行方式 */ | 
 |  |  | { | 
 |  |  |     /* 上传图片配置项 */ | 
 |  |  |     "imageActionName": "uploadimage", /* 执行上传图片的action名称 */ | 
 |  |  |     "imageFieldName": "upfile", /* 提交的图片表单名称 */ | 
 |  |  |     "imageMaxSize": 2048000, /* 上传大小限制,单位B */ | 
 |  |  |     "imageAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 上传图片格式显示 */ | 
 |  |  |     "imageCompressEnable": true, /* 是否压缩图片,默认是true */ | 
 |  |  |     "imageCompressBorder": 1600, /* 图片压缩最长边限制 */ | 
 |  |  |     "imageInsertAlign": "none", /* 插入的图片浮动方式 */ | 
 |  |  |     "imageUrlPrefix": "http://xcshop.csxuncong.com/uploadfile", /* 图片访问路径前缀 */ | 
 |  |  |     "imagePathFormat": "/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ | 
 |  |  |                                 /* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */ | 
 |  |  |                                 /* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */ | 
 |  |  |                                 /* {time} 会替换成时间戳 */ | 
 |  |  |                                 /* {yyyy} 会替换成四位年份 */ | 
 |  |  |                                 /* {yy} 会替换成两位年份 */ | 
 |  |  |                                 /* {mm} 会替换成两位月份 */ | 
 |  |  |                                 /* {dd} 会替换成两位日期 */ | 
 |  |  |                                 /* {hh} 会替换成两位小时 */ | 
 |  |  |                                 /* {ii} 会替换成两位分钟 */ | 
 |  |  |                                 /* {ss} 会替换成两位秒 */ | 
 |  |  |                                 /* 非法字符 \ : * ? " < > | */ | 
 |  |  |                                 /* 具请体看线上文档: fex.baidu.com/ueditor/#use-format_upload_filename */ | 
 |  |  |  | 
 |  |  |     /* 涂鸦图片上传配置项 */ | 
 |  |  |     "scrawlActionName": "uploadscrawl", /* 执行上传涂鸦的action名称 */ | 
 |  |  |     "scrawlFieldName": "upfile", /* 提交的图片表单名称 */ | 
 |  |  |     "scrawlPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ | 
 |  |  |     "scrawlMaxSize": 2048000, /* 上传大小限制,单位B */ | 
 |  |  |     "scrawlUrlPrefix": "http://xcshop.csxuncong.com/uploadfile", /* 图片访问路径前缀 */ | 
 |  |  |     "scrawlInsertAlign": "none", | 
 |  |  |  | 
 |  |  |     /* 截图工具上传 */ | 
 |  |  |     "snapscreenActionName": "uploadimage", /* 执行上传截图的action名称 */ | 
 |  |  |     "snapscreenPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ | 
 |  |  |     "snapscreenUrlPrefix": "http://xcshop.csxuncong.com/uploadfile", /* 图片访问路径前缀 */ | 
 |  |  |     "snapscreenInsertAlign": "none", /* 插入的图片浮动方式 */ | 
 |  |  |  | 
 |  |  |     /* 抓取远程图片配置 */ | 
 |  |  |     "catcherLocalDomain": ["127.0.0.1", "localhost", "img.baidu.com"], | 
 |  |  |     "catcherActionName": "catchimage", /* 执行抓取远程图片的action名称 */ | 
 |  |  |     "catcherFieldName": "source", /* 提交的图片列表表单名称 */ | 
 |  |  |     "catcherPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ | 
 |  |  |     "catcherUrlPrefix": "http://xcshop.csxuncong.com/uploadfile", /* 图片访问路径前缀 */ | 
 |  |  |     "catcherMaxSize": 2048000, /* 上传大小限制,单位B */ | 
 |  |  |     "catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取图片格式显示 */ | 
 |  |  |  | 
 |  |  |     /* 上传视频配置 */ | 
 |  |  |     "videoActionName": "uploadvideo", /* 执行上传视频的action名称 */ | 
 |  |  |     "videoFieldName": "upfile", /* 提交的视频表单名称 */ | 
 |  |  |     "videoPathFormat": "/ueditor/jsp/upload/video/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ | 
 |  |  |     "videoUrlPrefix": "http://127.0.0.1:1088/uploadeFile/", /* 视频访问路径前缀 */ | 
 |  |  |     "videoMaxSize": 102400000, /* 上传大小限制,单位B,默认100MB */ | 
 |  |  |     "videoAllowFiles": [ | 
 |  |  |         ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", | 
 |  |  |         ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid"], /* 上传视频格式显示 */ | 
 |  |  |  | 
 |  |  |     /* 上传文件配置 */ | 
 |  |  |     "fileActionName": "uploadfile", /* controller里,执行上传视频的action名称 */ | 
 |  |  |     "fileFieldName": "upfile", /* 提交的文件表单名称 */ | 
 |  |  |     "filePathFormat": "/ueditor/jsp/upload/file/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ | 
 |  |  |     "fileUrlPrefix": "http://127.0.0.1:1088/uploadeFile/", /* 文件访问路径前缀 */ | 
 |  |  |     "fileMaxSize": 51200000, /* 上传大小限制,单位B,默认50MB */ | 
 |  |  |     "fileAllowFiles": [ | 
 |  |  |         ".png", ".jpg", ".jpeg", ".gif", ".bmp", | 
 |  |  |         ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", | 
 |  |  |         ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid", | 
 |  |  |         ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso", | 
 |  |  |         ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml" | 
 |  |  |     ], /* 上传文件格式显示 */ | 
 |  |  |  | 
 |  |  |     /* 列出指定目录下的图片 */ | 
 |  |  |     "imageManagerActionName": "listimage", /* 执行图片管理的action名称 */ | 
 |  |  |     "imageManagerListPath": "http://127.0.0.1:1088/uploadeFile/", /* 指定要列出图片的目录 */ | 
 |  |  |     "imageManagerListSize": 20, /* 每次列出文件数量 */ | 
 |  |  |     "imageManagerUrlPrefix": "", /* 图片访问路径前缀 */ | 
 |  |  |     "imageManagerInsertAlign": "none", /* 插入的图片浮动方式 */ | 
 |  |  |     "imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 列出的文件类型 */ | 
 |  |  |  | 
 |  |  |     /* 列出指定目录下的文件 */ | 
 |  |  |     "fileManagerActionName": "listfile", /* 执行文件管理的action名称 */ | 
 |  |  |     "fileManagerListPath": "http://127.0.0.1:1088/uploadeFile/", /* 指定要列出文件的目录 */ | 
 |  |  |     "fileManagerUrlPrefix": "", /* 文件访问路径前缀 */ | 
 |  |  |     "fileManagerListSize": 20, /* 每次列出文件数量 */ | 
 |  |  |     "fileManagerAllowFiles": [ | 
 |  |  |         ".png", ".jpg", ".jpeg", ".gif", ".bmp", | 
 |  |  |         ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", | 
 |  |  |         ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid", | 
 |  |  |         ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso", | 
 |  |  |         ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml" | 
 |  |  |     ] /* 列出的文件类型 */ | 
 |  |  |  | 
 |  |  | } | 
 
| New file | 
 |  |  | 
 |  |  | #是否启用debug模式 | 
 |  |  | debug=false | 
 |  |  | # 日志文件保存地址 | 
 |  |  | log_path=/mnt/xcshop/log | 
 |  |  |  | 
 |  |  | # 系统语言环境 zh中文,us英文 | 
 |  |  | system_language=zh | 
 |  |  |  | 
 |  |  | # 错误密码允许输入的次数,大于五次后账号锁定,0表示不锁账号 | 
 |  |  | error_password_times=5 | 
 |  |  | # 默认密码 | 
 |  |  | default_password=123 | 
 |  |  |  | 
 |  |  | #nginx静态资源访问地址 | 
 |  |  | static_resource_url=http://xcshop.csxuncong.com/uploadfile/ | 
 |  |  | #文件保存地址 | 
 |  |  | file_storage_path=/mnt/xcshop/uploadfile/ | 
 |  |  | #文件上传大小字节为单位  10MB | 
 |  |  | maxUploadSize=10485760 | 
 |  |  |  | 
 |  |  |  | 
 |  |  | #Matser\u7684ip\u5730\u5740 | 
 |  |  | redis.hostname=120.27.238.55 | 
 |  |  | #\u7AEF\u53E3\u53F7 | 
 |  |  | redis.port=6379 | 
 |  |  | #\u5982\u679C\u6709\u5BC6\u7801 | 
 |  |  | redis.password=xcong123 | 
 |  |  | #\u5BA2\u6237\u7AEF\u8D85\u65F6\u65F6\u95F4\u5355\u4F4D\u662F\u6BEB\u79D2 \u9ED8\u8BA4\u662F2000 | 
 |  |  | redis.timeout=10000   | 
 |  |  | redis.database=2 | 
 |  |  | redis_time_out=1800000 | 
 |  |  | cookie_time_out=36000 | 
 |  |  |  | 
 |  |  | #APP登录公钥 | 
 |  |  | login_public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCWvK6UWCtSp/8qnTqyUfO0wbg4CuxOe7IeiDSAmATfHnWqBPnbZ73qQ4A90vGowB7mp5XnmBvgTwfXtDh08yd4btlHwSD3ShbRyGfGfV8lc47ZTLiJH0xuuN2iHfnfj8zQ5kcqijeotggo2rF8Uu7KSR3HxVyN9mO22C6p1r5wVQIDAQAB | 
 |  |  | #APP登录秘钥 | 
 |  |  | login_private_key=MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJa8rpRYK1Kn/yqdOrJR87TBuDgK7E57sh6INICYBN8edaoE+dtnvepDgD3S8ajAHuanleeYG+BPB9e0OHTzJ3hu2UfBIPdKFtHIZ8Z9XyVzjtlMuIkfTG643aId+d+PzNDmRyqKN6i2CCjasXxS7spJHcfFXI32Y7bYLqnWvnBVAgMBAAECgYBNzQFGq+NgfDllo1WCaG4jI8GTm3+wWoPq4l5G6S/KgYw1vu+/YOJTIZf1UQVOFitc3a6vpIDu25uup+Rj6IS8B4V8NDfc8P+iMNwdIKqqBj8wHu0/SaxYdW1uqlU5+XkJMxsNMgNRRGPSIQhla5OPHtBzIa7t4lmypETMZtXEmQJBAMsa1OIQzAKU05GweCnNNSoqo/nAQLqp8zfbJypxRx24uaCyS7C+KxN+O4FyaYmM9n0X+cgkr+RYHAIa7mg3gccCQQC9/nJvRBum8+4TINnz6QrvTmTlhi8QKW/CiRYpGgmo5PtQYw4BkRQbYO8ktFDM2yeO75XBv09qnGQaivDCeL0DAkEAisFg8LSy+4x7YcvivAQirxUEg2qRjjTvIZjKEBflkuuRfbRxO2Uf/qg9tPjaGwu/lcScc9yEggaj09hcSbyqHwJAN8QLiqUPCL3oTy0BTBpG316/Nq9f+Ppwl0TtgDroQu6S5VFttwACStb02m0imj5pKgcgibHBeaVVrITDjhEqSQJAaCHD/ytTzgtgLoVVyZZxOB272W7PI3mnzL8qQSldx1/QOBs1NmmEZuo7ELFMrfTmlxa1qR4gsq/ImfIdUdXewQ== | 
 |  |  |  | 
 |  |  |  | 
 |  |  | #日志文件清理阈值  单位:MB | 
 |  |  | log_max=20 | 
 |  |  | #日志清理天数 | 
 |  |  | log_clear_day=5 | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | wechar_login_url =https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code | 
 |  |  | xcx_appid =wx5cc58f796224af61 | 
 |  |  | xcx_secret =facea088aae414e5c2ee86b459887721 | 
 |  |  | gzh_appid=wx57e6335559bdbda6 | 
 |  |  | gzh_secret=ecb408af170e3890e6544290cad33760 | 
 |  |  |  | 
 |  |  | #微信支付调试开关 | 
 |  |  | wx_pay_debug_onoff = false | 
 |  |  |  | 
 |  |  | #快递鸟用户id | 
 |  |  | logistics.eBusinessID=1530881 | 
 |  |  | #快递鸟密钥 | 
 |  |  | logistics.appKey=f1cf9777-26fb-4e3f-a14d-896075e6384e | 
 |  |  | #快递鸟接口地址 | 
 |  |  | logistics.url=http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx | 
 |  |  | #快递鸟接口指令 | 
 |  |  | logistics.requestType=1002 | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | #发送短信配置 | 
 |  |  | crm.request_url = http://192.168.1.248 | 
 |  |  | sms.request_url = http://smssh1.253.com | 
 |  |  | sms.login_account = M7315130 | 
 |  |  | sms.login_password = J7FAoehPkv63e3 | 
 |  |  | sms.login_accountNe = N4617160 | 
 |  |  | sms.login_passwordNe = rb1cxLitRB83e0 | 
 |  |  |  | 
 |  |  | #接入统一登录平台配置 | 
 |  |  | platform_app_code = wx_shop | 
 |  |  | platform_secret_key = b21e309f07964e4fae5b156d74b5d66z | 
 |  |  | #platform_verity_url = http://localhost:8080/platform/getUserInfo | 
 |  |  | platform_verity_url = http://stg1-xcerp-ca.xc.jyymatrix.cc/platform/getUserInfo | 
 |  |  |  | 
 |  |  | qrcodeBackgroundImgPath=/mnt/xcshop/webresource/static/xcxresource/bj1.png | 
 |  |  | qrcodeFrontImgPath=/mnt/xcshop/webresource/static/xcxresource/qj2.png | 
 |  |  |  | 
 |  |  | #hive仓库地址 | 
 |  |  | hive.service=http://localhost:8082/meidu-crm/ | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | #是否启用异常上报 | 
 |  |  | is_open_exception_report=true | 
 |  |  | showExcptionUrl=http://xcshop.csxuncong.com/showException | 
 |  |  |  | 
 |  |  |  | 
 |  |  | #异常信息查询接口 | 
 |  |  | showExcptionUrl=http://xcshop.csxuncong.com/showException | 
 |  |  |  | 
 
 |  |  | 
 |  |  |  | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectSignAwardList" resultType="com.matrix.system.shopXcx.api.vo.SignAwardListVo"> | 
 |  |  |         SELECT | 
 |  |  |         a.id id, | 
 |  |  |         a.state state, | 
 |  |  |         1 total, | 
 |  |  |         a.receive_time receiveTime, | 
 |  |  |         b.award_way awardWay, | 
 |  |  |         b.introduce_img introduceImg, | 
 |  |  |         b.award_name awardName | 
 |  |  |  | 
 |  |  |         FROM | 
 |  |  |         activity_sign_receive_record a | 
 |  |  |         LEFT JOIN activity_sign_award_set b ON a.award_id = b.id | 
 |  |  |         WHERE | 
 |  |  |         b.award_type = 1 | 
 |  |  |         AND a.state = 1 | 
 |  |  |         and a.company_id = #{record.companyId} | 
 |  |  |         and a.user_id = #{record.userId} | 
 |  |  |         <if test="record.sort !=null"> | 
 |  |  |             order by | 
 |  |  |             a.${record.sort} ${record.order} | 
 |  |  |         </if> | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectSeeAwardTextVOById" resultType="com.matrix.system.shopXcx.api.vo.SeeAwardTextVo"> | 
 |  |  |         SELECT | 
 |  |  |             a.id id, | 
 |  |  |             a.state state, | 
 |  |  |             a.receive_time receiveTime, | 
 |  |  |             a.write_off_code writeOffCode, | 
 |  |  |             1 total, | 
 |  |  |             b.wechat_img wechatImg, | 
 |  |  |             b.prize_address prizeAddress, | 
 |  |  |             b.operation_tip operationTip, | 
 |  |  |             b.prize_end_time prizeEndTime, | 
 |  |  |             b.prize_start_time prizeStartTime, | 
 |  |  |             b.award_way awardWay, | 
 |  |  |             b.introduce_img introduceImg, | 
 |  |  |             b.award_name awardName | 
 |  |  |         FROM | 
 |  |  |             activity_sign_receive_record a | 
 |  |  |                 LEFT JOIN activity_sign_award_set b ON a.award_id = b.id | 
 |  |  |         WHERE | 
 |  |  |         a.id = #{record.awardId} | 
 |  |  |         and a.company_id = #{record.companyId} | 
 |  |  |         and a.user_id = #{record.userId} | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  | </mapper> | 
 
 |  |  | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectVipCardTotalMoney" resultType="java.lang.Double"> | 
 |  |  |             SELECT TRUNCATE( SUM(gift_money)+SUM(real_money) ,2 ) from money_card_use where vip_id=#{vipId}  and `status` ='有效' | 
 |  |  |             SELECT  IFNULL(sum(IFNULL(gift_money, 0)),0)+ IFNULL(sum(IFNULL(real_money, 0)),0)  from money_card_use where vip_id=#{vipId}  and `status` ='有效' | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |  | 
 
 |  |  | 
 |  |  |             </if> | 
 |  |  |         </if> | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectForWxInPage" resultMap="MoneyCardUseFlowMap"> | 
 |  |  |         select | 
 |  |  |             id, | 
 |  |  |             order_no, | 
 |  |  |             pay_no, | 
 |  |  |             content, | 
 |  |  |             create_time, | 
 |  |  |             type, | 
 |  |  |             total, | 
 |  |  |             times, | 
 |  |  |             gift_money, | 
 |  |  |             balance, | 
 |  |  |             (SELECT su_name from sys_users a WHERE operation_id=a.su_id) staffName | 
 |  |  |         from money_card_use_flow | 
 |  |  |         <where> | 
 |  |  |                 and car_use_id=#{record.carUseId} | 
 |  |  |             <if test="record.queryTime!=null and record.queryTime!=''"> | 
 |  |  |                 and DATE_FORMAT(create_time,'%Y-%m')=#{record.queryTime} | 
 |  |  |             </if> | 
 |  |  |             <if test="record.revenueType==1"> | 
 |  |  |                 and  total>0 | 
 |  |  |             </if> | 
 |  |  |             <if test="record.revenueType==2"> | 
 |  |  |                 <![CDATA[ and total<0 ]]> | 
 |  |  |             </if> | 
 |  |  |         </where> | 
 |  |  |         order by  create_time desc | 
 |  |  |     </select> | 
 |  |  | </mapper> | 
 |  |  |  | 
 |  |  |          | 
 
 |  |  | 
 |  |  | <mapper namespace="com.matrix.system.score.dao.ScoreVipDetailDao"> | 
 |  |  |  | 
 |  |  |     <select id="selectUserTotalScore" resultType="java.lang.Integer"> | 
 |  |  |         select IFNULL(sum(IFNULL( remain_score, 0 )),0) from score_vip_detail | 
 |  |  |         select IFNULL(sum(IFNULL(remain_score, 0 )),0) from score_vip_detail | 
 |  |  |         where  state=1 and vip_id=#{vipId} | 
 |  |  |  | 
 |  |  |  | 
 
 |  |  | 
 |  |  |             <if test="record.orderId != null "> | 
 |  |  |                 order_id  = #{record.orderId}, | 
 |  |  |             </if> | 
 |  |  |             <if test="record.receiveId != null "> | 
 |  |  |                 receive_id  = #{record.receiveId}, | 
 |  |  |             </if> | 
 |  |  |             <if test="record.userId != null and record.userId != '' "> | 
 |  |  |                 user_id  = #{record.userId}, | 
 |  |  |             </if> | 
 
 |  |  | 
 |  |  |             <result property="orderType" column="order_type" /> | 
 |  |  |             <result property="applyStatus" column="apply_status" /> | 
 |  |  |             <result property="scorePay" column="score_pay" /> | 
 |  |  |             <result property="payMethod" column="pay_method" /> | 
 |  |  |             <result property="companyId" column="company_id" /> | 
 |  |  |             <!--返回详情列表--> | 
 |  |  |             <collection property="details" column="{orderId=id}" | 
 |  |  |                         select="com.matrix.system.shopXcx.dao.ShopOrderDetailsDao.selectByOrderId"/> | 
 |  |  |     </resultMap> | 
 |  |  |  | 
 |  |  |  | 
 |  |  | 
 |  |  |         <result property="createTime" column="create_time" /> | 
 |  |  |         <result property="updateBy" column="update_by" /> | 
 |  |  |         <result property="updateTime" column="update_time" /> | 
 |  |  |         <result property="payMethod" column="pay_method" /> | 
 |  |  |             <result property="orderNo" column="order_no" /> | 
 |  |  |             <result property="orderMoney" column="order_money" /> | 
 |  |  |             <result property="commodityPrice" column="commodity_price" /> | 
 |  |  | 
 |  |  |             order_type, | 
 |  |  |             activity_type, | 
 |  |  | score_pay, | 
 |  |  |  | 
 |  |  |         pay_method, | 
 |  |  |             company_id | 
 |  |  |     </sql> | 
 |  |  |      | 
 |  |  | 
 |  |  |             #{item.orderType}, | 
 |  |  |             #{item.activityType}, | 
 |  |  |             #{item.scorePay}, | 
 |  |  |             #{item.payMethod}, | 
 |  |  |             #{item.companyId} | 
 |  |  |     </sql> | 
 |  |  |      | 
 |  |  | 
 |  |  |              <if test="(record.companyId!=null and record.companyId!='') or  (record.companyId!='' and record.companyId==0)  "> | 
 |  |  |                  and company_id  = #{record.companyId} | 
 |  |  |              </if> | 
 |  |  |  | 
 |  |  |         </if> | 
 |  |  |           | 
 |  |  |     </sql> | 
 |  |  | 
 |  |  |     <!-- 分页查询 --> | 
 |  |  |     <select id="selectInPageByQuery" resultMap="ShopOrderMap"> | 
 |  |  |         select | 
 |  |  |         o.create_by, | 
 |  |  |         o.create_time, | 
 |  |  |         o.update_by, | 
 |  |  |         o.update_time, | 
 |  |  |         o.id, | 
 |  |  |         o.order_no, | 
 |  |  |         o.order_money, | 
 |  |  |         o.commodity_price, | 
 |  |  |         o.user_id, | 
 |  |  |         o.order_time, | 
 |  |  |         o.pay_status, | 
 |  |  |         o.discount_explain, | 
 |  |  |         o.discount_amount, | 
 |  |  |         o.order_status, | 
 |  |  |         o.refund_charge, | 
 |  |  |         o.user_name, | 
 |  |  |         o.user_tel, | 
 |  |  |         o.remarks, | 
 |  |  |         o.shipping_method, | 
 |  |  |         o.store_id, | 
 |  |  |         o.purchase_quantity, | 
 |  |  |         o.del_flag, | 
 |  |  |         o.wx_order_no, | 
 |  |  |         o.pay_result, | 
 |  |  |         o.postage, | 
 |  |  |         s.shop_name, | 
 |  |  |         o.order_type, | 
 |  |  |         o.score_pay, | 
 |  |  |         o.apply_status | 
 |  |  |         o.*, | 
 |  |  |         s.shop_name | 
 |  |  |         from shop_order o | 
 |  |  |         INNER JOIN sys_shop_info s on o.store_id = s.ID | 
 |  |  |         where del_flag = 2 and o.company_id  = #{record.companyId} | 
 |  |  | 
 |  |  |             <if test="(record.shopId!=null and record.shopId!='')"> | 
 |  |  |                 and o.store_id=#{record.shopId} | 
 |  |  |             </if> | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         </if> | 
 |  |  |         <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> | 
 |  |  |             <if test="pageVo.sort !=null  and pageVo.order !=null"> | 
 |  |  | 
 |  |  |         o.wx_order_no, | 
 |  |  |         o.pay_result, | 
 |  |  |         o.postage, | 
 |  |  |         s.store_name, | 
 |  |  |         s.score_pay, | 
 |  |  |                o.pay_method, | 
 |  |  |         s.shop_name, | 
 |  |  |         o.order_type | 
 |  |  |         from shop_order o | 
 |  |  |         LEFT JOIN shop_store s on o.store_id = s.store_id | 
 |  |  |         LEFT JOIN sys_shop_info s on o.store_id = s.ID | 
 |  |  |         where del_flag = 2 and o.company_id  = #{record.companyId} | 
 |  |  |  | 
 |  |  |         <if test="record != null"> | 
 |  |  | 
 |  |  |                 and  o.order_status = #{record.orderStatus} | 
 |  |  |             </if> | 
 |  |  |             <if test="(record.storeName!=null and record.storeName!='')"> | 
 |  |  |                 and s.store_name like concat('%', #{record.storeName}, '%') | 
 |  |  |                 and s.shop_name like concat('%', #{record.storeName}, '%') | 
 |  |  |             </if> | 
 |  |  |         </if> | 
 |  |  |         <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> | 
 
 |  |  | 
 |  |  |             shop_product_comment c | 
 |  |  |             LEFT JOIN shop_product p ON c.product_id = p.id | 
 |  |  |             LEFT JOIN shop_order o ON c.order_id = o.id | 
 |  |  |             LEFT JOIN sys_vip_info b ON c.user_id = b.id | 
 |  |  |             LEFT JOIN sys_vip_info b ON c.user_id = b.openid | 
 |  |  |         <where> | 
 |  |  |             and c.product_id = #{record.productId} | 
 |  |  |             AND p.del_flag = 2 | 
 |  |  | 
 |  |  |         shop_product_comment c | 
 |  |  |         LEFT JOIN shop_product p ON c.product_id = p.id | 
 |  |  |         LEFT JOIN shop_order o ON c.order_id = o.id | 
 |  |  |         LEFT JOIN sys_vip_info b ON c.user_id = b.id | 
 |  |  |         LEFT JOIN sys_vip_info b ON c.user_id = b.openid | 
 |  |  |         <where> | 
 |  |  |             <if test="record!=null"> | 
 |  |  |                 <if test="(record.productId!=null and record.productId!='') or  (record.productId!='' and record.productId==0)  "> | 
 
 |  |  | 
 |  |  |             th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> | 
 |  |  |     <script type="text/javascript" | 
 |  |  |             th:src="@{/js/systools/MBase.js}"></script> | 
 |  |  |     <style type="text/css"> | 
 |  |  |  | 
 |  |  |         .btn-my { | 
 |  |  |             background-color: #f8ac59; | 
 |  |  |             border-color: #f8ac59; | 
 |  |  |             color: #fff | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .btn-my:hover { | 
 |  |  |             background-color: #FFD19F; | 
 |  |  |             border-color: #FFD19F; | 
 |  |  |             color: #fff | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .btn-my:focus { | 
 |  |  |             outline: 0 !important; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .btn-my.active { | 
 |  |  |             background-color: rgb(185, 136, 85); | 
 |  |  |             border-color: rgb(185, 136, 85); | 
 |  |  |             color: #fff; | 
 |  |  |             outline: 0; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     </style> | 
 |  |  |  | 
 |  |  |  | 
 |  |  | </head> | 
 |  |  | <body class=" container-fluid"> | 
 |  |  |  | 
 |  |  | <div class="pd-10"> | 
 |  |  |     <!-- 搜索框部分start --> | 
 |  |  |     <!-- 搜索框部分start --> | 
 |  |  |     <div class="row form-head"> | 
 |  |  |         <div class="col-md-2 col-xs-12"> | 
 |  |  |             <!-- 功能按钮部分 --> | 
 |  |  |             <div class=""> | 
 |  |  |                 <!--<button onclick="myGrid.delItems('id')" type="button"--> | 
 |  |  |                 <!--class="btn btn-danger btn-sm">--> | 
 |  |  |                 <!--<i class="fa fa-trash"></i>批量删除--> | 
 |  |  |                 <!--</button>--> | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |         <div class="col-md-10 col-xs-12"> | 
 |  |  |             <div class="row"> | 
 |  |  |                 <div class="col-md-11" style="text-align: right"> | 
 |  |  |                     <form class="form-inline" id="serchform"> | 
 |  |  |                         <div class="input-group"> | 
 |  |  |                             <div class="btn-group search-list " data-for="search-text"> | 
 |  |  |                                 <button type="button" | 
 |  |  |                                         class="btn btn-default dropdown-toggle searchlist" | 
 |  |  |                                         data-toggle="dropdown"> | 
 |  |  |                                     用户姓名 <span class="caret "></span> | 
 |  |  |                                 </button> | 
 |  |  |                                 <ul class="dropdown-menu" role="menu"> | 
 |  |  |                                     <li data-field="userName"><a>用户姓名</a></li> | 
 |  |  |                                     <li data-field="userTel"><a>用户电话 </a></li> | 
 |  |  |                                     <li data-field="orderNo"><a>订单号 </a></li> | 
 |  |  |                                     <li data-field="storeName"><a>门店名称 </a></li> | 
 |  |  |                                 </ul> | 
 |  |  |                             </div> | 
 |  |  |                             <div class="form-group mr-20 ml-20"> | 
 |  |  |                                 <input autocomplete="off"   id="search-text" name="userName" placeholder="输入查询关键词" | 
 |  |  |                                        type="text" class="form-control"> | 
 |  |  |                             </div> | 
 |  |  |                             <div class="form-group"> | 
 |  |  |                                 <button onclick="myGrid.serchData(1)" type="button" | 
 |  |  |                                         class="btn btn-info"> | 
 |  |  |                                     <i class="fa fa-search "></i> 搜索 | 
 |  |  |                                 </button> | 
 |  |  |                                 <button onclick="exportExcel()" type="button" | 
 |  |  |                                         class="btn btn-info" | 
 |  |  |                                         matrix:btn="order-exportExcel"> | 
 |  |  |                                     <i class="fa fa-search "></i> 导出EXCEL | 
 |  |  |                                 </button> | 
 |  |  |                                 <button type="reset" class="btn btn-info "> | 
 |  |  |                                     <i class="fa fa-refresh "></i> 重置 | 
 |  |  |                                 </button> | 
 |  |  |                                 <button type="reset" class="btn btn-info " onclick="applyMoney()"> | 
 |  |  |                                     <i class="fa fa-bank "></i> 申请提现 | 
 |  |  |                                 </button> | 
 |  |  |                             </div> | 
 |  |  |                         </div> | 
 |  |  |                         <!-- 高级搜索 --> | 
 |  |  |                         <div class="senior-content"> | 
 |  |  |                             <!-- <div><a class="serch-close closestyle">×</a></div> --> | 
 |  |  |                             <div class="serch-headline">高级搜索</div> | 
 |  |  |                             <div> | 
 |  |  |                                 <div style="margin-bottom: 20px!important;"> | 
 |  |  |                                     <div class="col-sm-6" style="text-align: right!important;"> | 
 |  |  |                                         <label class="col-sm-12 control-label"> | 
 |  |  |                                             开始日期: | 
 |  |  |                                         </label> | 
 |  |  |                                     </div> | 
 |  |  |                                     <div class="col-sm-6"> | 
 |  |  |                                         <input autocomplete="off"   name="orderBeginTime" readonly="readonly" | 
 |  |  |                                                type="text" class="form-control datetimepicker" style="width: 98%"> | 
 |  |  |                                     </div> | 
 |  |  |                                 </div> | 
 |  |  |  | 
 |  |  |                                 <div style="margin-bottom: 20px!important;"> | 
 |  |  |                                     <div class="col-sm-6" style="text-align: right!important;"> | 
 |  |  |                                         <label class="col-sm-12 control-label"> | 
 |  |  |                                             结束日期: | 
 |  |  |                                         </label> | 
 |  |  |                                     </div> | 
 |  |  |                                     <div class="col-sm-6"> | 
 |  |  |                                         <input autocomplete="off"   name="orderEndTime" readonly="readonly" | 
 |  |  |                                                type="text" class="form-control datetimepicker" style="width: 98%"> | 
 |  |  |                                     </div> | 
 |  |  |                                 </div> | 
 |  |  |         <!-- ------------搜索服务单开始---------------- --> | 
 |  |  |         <form class="form-inline" id="serchform"> | 
 |  |  |  | 
 |  |  |                                 <div style="margin-bottom: 20px!important;"> | 
 |  |  |                                     <div class="col-sm-6" style="text-align: right!important;"> | 
 |  |  |                                         <label class="col-sm-12 control-label"> | 
 |  |  |                                             订单状态: | 
 |  |  |                                         </label> | 
 |  |  |                                     </div> | 
 |  |  |                                     <div class="col-sm-6"> | 
 |  |  |                                         <select class="form-control autoFull select2" dataType="*" | 
 |  |  |                                                 th:data-url="@{/admin/shopOrder/getOrderStatusSelectValue}" | 
 |  |  |                                                 data-value="code" | 
 |  |  |                                                 data-filed="name" name="orderStatus" style="width: 98%"> | 
 |  |  |                                             <option value=''>请选择</option> | 
 |  |  |                                         </select> | 
 |  |  |                                     </div> | 
 |  |  |                                 </div> | 
 |  |  |  | 
 |  |  |                             </div> | 
 |  |  |                             <div class="button col-sm-12"> | 
 |  |  |                                 <button type="button" class="btn btn-sm btn-info mr20" onclick="myGrid.serchData()">确认 | 
 |  |  |                                 </button> | 
 |  |  |                                 <button type="button" class="btn btn-warning serch-close">取消</button> | 
 |  |  |                             </div> | 
 |  |  |                         </div> | 
 |  |  |                     </form> | 
 |  |  |                 </div> | 
 |  |  |                 <div class="col-md-1 text-r layui-anim" data-anim="layui-anim-up"> | 
 |  |  |                     <a class="senior-serch">高级搜索</a> | 
 |  |  |             <div class="form-group mr-20"> | 
 |  |  |                 <div class="btn-group search-list " data-for="search-text"> | 
 |  |  |                     <button type="button" | 
 |  |  |                             class="btn btn-default dropdown-toggle searchlist" | 
 |  |  |                             data-toggle="dropdown"> | 
 |  |  |                         用户姓名 <span class="caret "></span> | 
 |  |  |                     </button> | 
 |  |  |                     <ul class="dropdown-menu" role="menu"> | 
 |  |  |                         <li data-field="userName"><a>用户姓名</a></li> | 
 |  |  |                         <li data-field="userTel"><a>用户电话 </a></li> | 
 |  |  |                         <li data-field="orderNo"><a>订单号 </a></li> | 
 |  |  |                         <li data-field="storeName"><a>门店名称 </a></li> | 
 |  |  |                     </ul> | 
 |  |  |                 </div> | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |             <div class="form-group mr-20"> | 
 |  |  |                 <input autocomplete="off"   id="search-text" name="userName" placeholder="输入查询关键词" | 
 |  |  |                        type="text" class="form-control"> | 
 |  |  |             </div> | 
 |  |  |  | 
 |  |  |             <div class="form-group mr-20"> | 
 |  |  |                 <label>开始日期:</label> | 
 |  |  |                 <input autocomplete="off"   name="orderBeginTime" type="text" | 
 |  |  |                        class="form-control datetimepicker" id="orderBeginTime"> | 
 |  |  |             </div> | 
 |  |  |             <div class="form-group mr-20"> | 
 |  |  |                 <label>结束日期:</label> | 
 |  |  |                 <input autocomplete="off"   name="orderEndTime" type="text" | 
 |  |  |                        class="form-control datetimepicker" id="orderEndTime"> | 
 |  |  |             </div> | 
 |  |  |  | 
 |  |  |             <input type="hidden" value="" name="orderStatus" id="orderStatus"/> | 
 |  |  |             <div class="form-group mr-20"> | 
 |  |  |                 <button type="button" class="btn btn-my btn-sm active" id="btn0" value="">全部</button> | 
 |  |  |                 <button type="button" class="btn btn-my btn-sm" id="btn1" value="1">待付款</button> | 
 |  |  |                 <button type="button" class="btn btn-my btn-sm" id="btn2" value="2">待配送</button> | 
 |  |  |                 <button type="button" class="btn btn-my btn-sm" id="btn3" value="3">待收货</button> | 
 |  |  |                 <button type="button" class="btn btn-my btn-sm" id="btn4" value="4">待评价</button> | 
 |  |  |                 <button type="button" class="btn btn-my btn-sm" id="btn5" value="5">已评价</button> | 
 |  |  |                 <button type="button" class="btn btn-my btn-sm" id="btn6" value="6">申请退款</button> | 
 |  |  |                 <button type="button" class="btn btn-my btn-sm" id="btn7" value="7">退款成功</button> | 
 |  |  |                 <button type="button" class="btn btn-my btn-sm" id="btn8" value="8">退款拒绝</button> | 
 |  |  |                 <button type="button" class="btn btn-my btn-sm" id="btn9" value="9">已取消</button> | 
 |  |  |             </div> | 
 |  |  |             <div class="form-group mr-20"> | 
 |  |  |                 <button onclick="myGrid.serchData(1)" type="button" | 
 |  |  |                         class="btn btn-info"> | 
 |  |  |                     <i class="fa fa-search "></i> 搜索 | 
 |  |  |                 </button> | 
 |  |  |                 <button onclick="exportExcel()" type="button" | 
 |  |  |                         class="btn btn-info" | 
 |  |  |                         matrix:btn="order-exportExcel"> | 
 |  |  |                     <i class="fa fa-search "></i> 导出EXCEL | 
 |  |  |                 </button> | 
 |  |  |                 <button type="reset" class="btn btn-info "> | 
 |  |  |                     <i class="fa fa-refresh "></i> 重置 | 
 |  |  |                 </button> | 
 |  |  |                 <!--<button type="reset" class="btn btn-info " onclick="applyMoney()"> | 
 |  |  |                     <i class="fa fa-bank "></i> 申请提现 | 
 |  |  |                 </button>--> | 
 |  |  |             </div> | 
 |  |  |         </form> | 
 |  |  |     </div> | 
 |  |  |  | 
 |  |  |     <div class="row"> | 
 |  |  | 
 |  |  |                     <th data-field="storeName">店铺名称</th> | 
 |  |  |                     <th data-field="orderStatus" data-formatter="buildOrderStatus">订单状态</th> | 
 |  |  |                     <th data-field="orderTime" data-formatter="MGrid.getTime">下单时间</th> | 
 |  |  |                     <th data-field="purchaseQuantity">购买件数</th> | 
 |  |  |                     <th data-field="details" data-formatter="buildDetails">购买商品</th> | 
 |  |  |                     <!--<th data-field="purchaseQuantity">购买件数</th>--> | 
 |  |  |                     <th data-field="orderMoney">订单金额</th> | 
 |  |  |                     <th data-field="discountAmount">优惠总金额</th> | 
 |  |  |                     <th data-field="shippingMethod" >配送方式</th> | 
 |  |  |                     <th data-field="orderType" data-formatter="orderTypeFormatter">订单类型</th> | 
 |  |  |                     <th data-field="shippingMethod"  data-formatter="buildShippingMethod" >配送方式</th> | 
 |  |  |                     <!--<th data-field="orderType" data-formatter="orderTypeFormatter">订单类型</th>--> | 
 |  |  |                     <th data-field="orderNo">订单编号</th> | 
 |  |  |                     <th data-field="applyStatus" data-formatter="applyStatusFormatter">是否已提现</th> | 
 |  |  |                     <!--<th data-field="applyStatus" data-formatter="applyStatusFormatter">是否已提现</th>--> | 
 |  |  |                 </tr> | 
 |  |  |                 </thead> | 
 |  |  |             </table> | 
 |  |  | 
 |  |  |  | 
 |  |  |     }); | 
 |  |  |  | 
 |  |  |     $(".btn-my").click(function () { | 
 |  |  |         var btnValue = $(this).val(); | 
 |  |  |         $("#orderStatus").val(btnValue); | 
 |  |  |         myGrid.serchData(); | 
 |  |  |         /* $("#state").val(""); */ | 
 |  |  |         $(".btn-my").removeClass("active"); | 
 |  |  |         $(this).addClass("active"); | 
 |  |  |     }); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     function exportExcel() { | 
 |  |  |         var userName = $('input[name=userName]').val(); | 
 |  |  |         if (typeof userName == 'undefined') { | 
 |  |  | 
 |  |  |         } | 
 |  |  |         var orderBeginTime = $('input[name=orderBeginTime]').val(); | 
 |  |  |         var orderEndTime = $('input[name=orderEndTime]').val(); | 
 |  |  |         var orderStatus = $('select[name=orderStatus]').val(); | 
 |  |  |         var orderStatus = $('input[name=orderStatus]').val(); | 
 |  |  |         var url = basePath + "/admin/shopOrder/exportOrderExcel"; | 
 |  |  |         url += "?userName=" + userName; | 
 |  |  |         url += "&orderNo=" + orderNo; | 
 |  |  | 
 |  |  |         url += "&userTel=" + userTel; | 
 |  |  |         url += "&storeName=" + storeName; | 
 |  |  |         window.open(url); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     function buildDetails(value, row, index) { | 
 |  |  |         var details = ""; | 
 |  |  |         for(var i= 0;i<value.length;i++){ | 
 |  |  |             details = details +value[i].shopProduct.title+ "("+value[i].shopSku.name+ ")*"+value[i].count+";"; | 
 |  |  |         } | 
 |  |  |         return details; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | 
 |  |  |         return ""; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     function buildShippingMethod(value, row, index) { | 
 |  |  |         if (value == 1) { | 
 |  |  |             return "物流配送"; | 
 |  |  |         } else if (value == 2) { | 
 |  |  |             return "<lable class='label label-warning' >门店自取</lable>"; | 
 |  |  |         }else { | 
 |  |  |             return "-"; | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     var btns = []; | 
 |  |  |     btns[0] = "", btns[1] = "", btns[2] = ""; | 
 |  |  |  |