releaserelease_toaliyun_real
| @@ -10,7 +10,7 @@ public class BodyReaderHttpServletRequestWrapper extends XssHttpServletRequestWr | |||||
| public BodyReaderHttpServletRequestWrapper(HttpServletRequest request) throws IOException { | public BodyReaderHttpServletRequestWrapper(HttpServletRequest request) throws IOException { | ||||
| super(request); | super(request); | ||||
| StringBuffer stringBuilder = new StringBuffer(); | |||||
| StringBuilder stringBuilder = new StringBuilder(); | |||||
| BufferedReader bufferedReader = null; | BufferedReader bufferedReader = null; | ||||
| try { | try { | ||||
| InputStream inputStream = request.getInputStream(); | InputStream inputStream = request.getInputStream(); | ||||
| @@ -10,7 +10,7 @@ public class BodyReaderHttpServletRequestWrapper extends XssHttpServletRequestWr | |||||
| public BodyReaderHttpServletRequestWrapper(HttpServletRequest request) throws IOException { | public BodyReaderHttpServletRequestWrapper(HttpServletRequest request) throws IOException { | ||||
| super(request); | super(request); | ||||
| StringBuffer stringBuilder = new StringBuffer(); | |||||
| StringBuilder stringBuilder = new StringBuilder(); | |||||
| BufferedReader bufferedReader = null; | BufferedReader bufferedReader = null; | ||||
| try { | try { | ||||
| InputStream inputStream = request.getInputStream(); | InputStream inputStream = request.getInputStream(); | ||||
| @@ -10,7 +10,7 @@ public class BodyReaderHttpServletRequestWrapper extends XssHttpServletRequestWr | |||||
| public BodyReaderHttpServletRequestWrapper(HttpServletRequest request) throws IOException { | public BodyReaderHttpServletRequestWrapper(HttpServletRequest request) throws IOException { | ||||
| super(request); | super(request); | ||||
| StringBuffer stringBuilder = new StringBuffer(); | |||||
| StringBuilder stringBuilder = new StringBuilder(); | |||||
| BufferedReader bufferedReader = null; | BufferedReader bufferedReader = null; | ||||
| try { | try { | ||||
| InputStream inputStream = request.getInputStream(); | InputStream inputStream = request.getInputStream(); | ||||
| @@ -10,7 +10,7 @@ public class BodyReaderHttpServletRequestWrapper extends XssHttpServletRequestWr | |||||
| public BodyReaderHttpServletRequestWrapper(HttpServletRequest request) throws IOException { | public BodyReaderHttpServletRequestWrapper(HttpServletRequest request) throws IOException { | ||||
| super(request); | super(request); | ||||
| StringBuffer stringBuilder = new StringBuffer(); | |||||
| StringBuilder stringBuilder = new StringBuilder(); | |||||
| BufferedReader bufferedReader = null; | BufferedReader bufferedReader = null; | ||||
| try { | try { | ||||
| InputStream inputStream = request.getInputStream(); | InputStream inputStream = request.getInputStream(); | ||||
| @@ -0,0 +1,50 @@ | |||||
| package com.iformall.controller; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.WxCUserBasicInfo; | |||||
| import com.iformall.domain.po.msg.WxMsgRecord; | |||||
| import com.iformall.enums.EnumAssignTagsTrigger; | |||||
| import com.iformall.mq.MqBaseProducer; | |||||
| import com.iformall.mq.impl.RabbitMqMessageProducer; | |||||
| import com.iformall.service.WxCUserBasicInfoService; | |||||
| import com.iformall.service.WxCUserTagsService; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.beans.factory.annotation.Value; | |||||
| import org.springframework.web.bind.annotation.GetMapping; | |||||
| import org.springframework.web.bind.annotation.RestController; | |||||
| @RestController | |||||
| @Api(description = "登录相关接口") | |||||
| public class UserTagsController { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| WxCUserTagsService wxCUserTagsService; | |||||
| @Autowired | |||||
| WxCUserBasicInfoService wxCUserBasicInfoService; | |||||
| @GetMapping("/userTag") | |||||
| public void mqtest() { | |||||
| WxCUserBasicInfo wxCUserBasicInfo = new WxCUserBasicInfo(); | |||||
| int pageIndex = 1; | |||||
| final int pageSize = 1000; | |||||
| PageInfo page; | |||||
| do{ | |||||
| page = wxCUserBasicInfoService.listAsPage(wxCUserBasicInfo, pageIndex++, pageSize); | |||||
| page.getList().stream().forEach(cubi -> { | |||||
| long lStart = System.currentTimeMillis(); | |||||
| wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_SCAN, cubi); | |||||
| logger.info("user tag cost time: {}", System.currentTimeMillis() - lStart); | |||||
| }); | |||||
| } while ((page.isHasNextPage())); | |||||
| } | |||||
| } | |||||
| @@ -22,7 +22,8 @@ public class WxCUserTagsSchedule { | |||||
| @Autowired | @Autowired | ||||
| WxCUserBasicInfoService wxCUserBasicInfoService; | WxCUserBasicInfoService wxCUserBasicInfoService; | ||||
| @Scheduled(cron = "0 0 1 25 * ?") // 每月25日凌晨01:00对会员列表扫描补录标签 | |||||
| // TODO 先不执行打标签操作了, 数据量太大,导致数据库CPU 100% | |||||
| //@Scheduled(cron = "0 0 0 25 * ?") // 每月25日凌晨01:00对会员列表扫描补录标签 | |||||
| //@Scheduled(cron = "0 */5 * * * ?") // 测试1分钟一次 | //@Scheduled(cron = "0 */5 * * * ?") // 测试1分钟一次 | ||||
| public void wxCUserTagsSchedule() { | public void wxCUserTagsSchedule() { | ||||
| WxCUserBasicInfo wxCUserBasicInfo = new WxCUserBasicInfo(); | WxCUserBasicInfo wxCUserBasicInfo = new WxCUserBasicInfo(); | ||||
| @@ -33,7 +34,7 @@ public class WxCUserTagsSchedule { | |||||
| PageInfo page; | PageInfo page; | ||||
| do{ | do{ | ||||
| page = wxCUserBasicInfoService.listAsPage(wxCUserBasicInfo, pageIndex++, pageSize); | page = wxCUserBasicInfoService.listAsPage(wxCUserBasicInfo, pageIndex++, pageSize); | ||||
| page.getList().parallelStream().forEach(cubi -> { | |||||
| page.getList().stream().forEach(cubi -> { | |||||
| wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_SCAN, cubi); | wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_SCAN, cubi); | ||||
| }); | }); | ||||
| } while ((page.isHasNextPage())); | } while ((page.isHasNextPage())); | ||||
| @@ -1,6 +1,8 @@ | |||||
| package com.iformall.service; | package com.iformall.service; | ||||
| import cn.afterturn.easypoi.csv.CsvExportUtil; | |||||
| import cn.afterturn.easypoi.csv.entity.CsvExportParams; | |||||
| import cn.afterturn.easypoi.excel.ExcelExportUtil; | import cn.afterturn.easypoi.excel.ExcelExportUtil; | ||||
| import cn.afterturn.easypoi.excel.ExcelImportUtil; | import cn.afterturn.easypoi.excel.ExcelImportUtil; | ||||
| import cn.afterturn.easypoi.excel.entity.ExportParams; | import cn.afterturn.easypoi.excel.entity.ExportParams; | ||||
| @@ -36,19 +38,20 @@ public class ExcelService { | |||||
| defaultExport(list, pojoClass, fileName, response, exportParams, false); | defaultExport(list, pojoClass, fileName, response, exportParams, false); | ||||
| } | } | ||||
| public void exportExcel(List<?> list, String title, String sheetName, Class<?> pojoClass, String fileName, HttpServletResponse response, boolean template) | |||||
| { | |||||
| public void exportExcel(List<?> list, String title, String sheetName, Class<?> pojoClass, String fileName, HttpServletResponse response, boolean template) { | |||||
| defaultExport(list, pojoClass, fileName, response, new ExportParams(title, sheetName, ExcelType.XSSF), template); | defaultExport(list, pojoClass, fileName, response, new ExportParams(title, sheetName, ExcelType.XSSF), template); | ||||
| } | } | ||||
| public void exportExcel(List<Map<String, Object>> list, String fileName, HttpServletResponse response) | |||||
| { | |||||
| public void exportCsv(List<?> list, String title, String sheetName, Class<?> pojoClass, String fileName, HttpServletResponse response, boolean template) { | |||||
| defaultExportCsv(list, pojoClass, fileName, response, new CsvExportParams(), template); | |||||
| } | |||||
| public void exportExcel(List<Map<String, Object>> list, String fileName, HttpServletResponse response) { | |||||
| defaultExport(list, fileName, response); | defaultExport(list, fileName, response); | ||||
| } | } | ||||
| private void defaultExport(List<?> list, Class<?> pojoClass, String fileName, HttpServletResponse response, ExportParams exportParams, boolean template) | |||||
| { | |||||
| Workbook workbook = ExcelExportUtil.exportExcel(exportParams,pojoClass,list); | |||||
| private void defaultExport(List<?> list, Class<?> pojoClass, String fileName, HttpServletResponse response, ExportParams exportParams, boolean template) { | |||||
| Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list); | |||||
| if (workbook != null) { | if (workbook != null) { | ||||
| if (template) { | if (template) { | ||||
| Sheet sheetAt = workbook.getSheetAt(0); | Sheet sheetAt = workbook.getSheetAt(0); | ||||
| @@ -65,24 +68,33 @@ public class ExcelService { | |||||
| downLoadExcel(fileName, response, workbook); | downLoadExcel(fileName, response, workbook); | ||||
| } | } | ||||
| private void defaultExport(List<Map<String, Object>> list, String fileName, HttpServletResponse response) | |||||
| { | |||||
| private void defaultExportCsv(List<?> list, Class<?> pojoClass, String fileName, HttpServletResponse response, CsvExportParams exportParams, boolean template) { | |||||
| try { | |||||
| response.setCharacterEncoding("UTF-8"); | |||||
| response.setHeader("content-Type", "application/vnd.ms-excel"); | |||||
| response.setHeader("Content-Disposition", | |||||
| "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); | |||||
| CsvExportUtil.exportCsv(exportParams, pojoClass, list, response.getOutputStream()); | |||||
| } catch (IOException e) { | |||||
| throw new MallinkException(ErrorCode.EXCEL_EXPORT_ERROR.getCode(), e.getMessage()); | |||||
| } | |||||
| } | |||||
| private void defaultExport(List<Map<String, Object>> list, String fileName, HttpServletResponse response) { | |||||
| Workbook workbook = ExcelExportUtil.exportExcel(list, ExcelType.HSSF); | Workbook workbook = ExcelExportUtil.exportExcel(list, ExcelType.HSSF); | ||||
| if (workbook != null); | |||||
| downLoadExcel(fileName, response, workbook); | |||||
| if (workbook != null) ; | |||||
| downLoadExcel(fileName, response, workbook); | |||||
| } | } | ||||
| private void downLoadExcel(String fileName, HttpServletResponse response, Workbook workbook) | |||||
| { | |||||
| private void downLoadExcel(String fileName, HttpServletResponse response, Workbook workbook) { | |||||
| try { | try { | ||||
| response.setCharacterEncoding("UTF-8"); | response.setCharacterEncoding("UTF-8"); | ||||
| response.setHeader("content-Type", "application/vnd.ms-excel"); | response.setHeader("content-Type", "application/vnd.ms-excel"); | ||||
| response.setHeader("Content-Disposition", | response.setHeader("Content-Disposition", | ||||
| "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); | "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); | ||||
| workbook.write(response.getOutputStream()); } | |||||
| catch (IOException e) | |||||
| { | |||||
| throw new MallinkException(ErrorCode.EXCEL_EXPORT_ERROR.getCode(),e.getMessage()); | |||||
| workbook.write(response.getOutputStream()); | |||||
| } catch (IOException e) { | |||||
| throw new MallinkException(ErrorCode.EXCEL_EXPORT_ERROR.getCode(), e.getMessage()); | |||||
| } | } | ||||
| } | } | ||||
| @@ -99,7 +99,7 @@ public class WxActivityJoinServiceImpl implements WxActivityJoinService { | |||||
| for (WxActivityJoin activityJoin : list) { | for (WxActivityJoin activityJoin : list) { | ||||
| String answer = activityJoin.getAnswer(); | String answer = activityJoin.getAnswer(); | ||||
| if (StringUtils.isNotEmpty(answer)) { | if (StringUtils.isNotEmpty(answer)) { | ||||
| StringBuffer quesAnswer = new StringBuffer(); | |||||
| StringBuilder quesAnswer = new StringBuilder(); | |||||
| List<WxActivityJoinQuestionAnswer> wxActivityJoinQuestionAnswers = JSONArray.parseArray(answer, WxActivityJoinQuestionAnswer.class); | List<WxActivityJoinQuestionAnswer> wxActivityJoinQuestionAnswers = JSONArray.parseArray(answer, WxActivityJoinQuestionAnswer.class); | ||||
| for (int i = 0; i < wxActivityJoinQuestionAnswers.size(); i++) { | for (int i = 0; i < wxActivityJoinQuestionAnswers.size(); i++) { | ||||
| WxActivityJoinQuestionAnswer wxActivityJoinQuestionAnswer = wxActivityJoinQuestionAnswers.get(i); | WxActivityJoinQuestionAnswer wxActivityJoinQuestionAnswer = wxActivityJoinQuestionAnswers.get(i); | ||||
| @@ -213,7 +213,7 @@ public class WxCouponInjectServiceImpl implements WxCouponInjectService { | |||||
| if(cUsers.size()==0){ | if(cUsers.size()==0){ | ||||
| return new ResultData(ErrorCode.MSG_NO_VALID_PHONE); | return new ResultData(ErrorCode.MSG_NO_VALID_PHONE); | ||||
| } | } | ||||
| StringBuffer sb=new StringBuffer(); | |||||
| StringBuilder sb=new StringBuilder(); | |||||
| for(WxCUser user:cUsers){ | for(WxCUser user:cUsers){ | ||||
| String phone = user.getPhone(); | String phone = user.getPhone(); | ||||
| if(null!=phone && !phone.equals("")){ | if(null!=phone && !phone.equals("")){ | ||||
| @@ -314,7 +314,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| } | } | ||||
| } | } | ||||
| }); | }); | ||||
| excelService.exportExcel(list, null, filename, WxCouponOrderBVo.class, filename + ".xlsx", response, false); | |||||
| excelService.exportCsv(list, null, filename, WxCouponOrderBVo.class, filename + ".csv", response, false); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -284,7 +284,7 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| } | } | ||||
| if (share) { | if (share) { | ||||
| StringBuffer sb = new StringBuffer(); | |||||
| StringBuilder sb = new StringBuilder(); | |||||
| boolean flag = false; | boolean flag = false; | ||||
| for (int i = 0, size = merchantParamList.size(); i < size; i++) { | for (int i = 0, size = merchantParamList.size(); i < size; i++) { | ||||
| JSONObject jsonObject = merchantParamList.get(i); | JSONObject jsonObject = merchantParamList.get(i); | ||||
| @@ -1505,7 +1505,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| int length=10; | int length=10; | ||||
| String base = "abcdefghijklmnopqrstuvwxyz"; | String base = "abcdefghijklmnopqrstuvwxyz"; | ||||
| Random random = new Random(); | Random random = new Random(); | ||||
| StringBuffer sb = new StringBuffer(); | |||||
| StringBuilder sb = new StringBuilder(); | |||||
| for (int i = 0; i < length; i++) { | for (int i = 0; i < length; i++) { | ||||
| int number = random.nextInt(base.length()); | int number = random.nextInt(base.length()); | ||||
| sb.append(base.charAt(number)); | sb.append(base.charAt(number)); | ||||
| @@ -111,7 +111,7 @@ public class HttpUtil { | |||||
| if(code == 200){ //请求成功 | if(code == 200){ //请求成功 | ||||
| in = new BufferedReader(new InputStreamReader(response.getEntity() | in = new BufferedReader(new InputStreamReader(response.getEntity() | ||||
| .getContent(),"utf-8")); | .getContent(),"utf-8")); | ||||
| StringBuffer sb = new StringBuffer(""); | |||||
| StringBuilder sb = new StringBuilder(""); | |||||
| String line = ""; | String line = ""; | ||||
| String NL = System.getProperty("line.separator"); | String NL = System.getProperty("line.separator"); | ||||
| while ((line = in.readLine()) != null) { | while ((line = in.readLine()) != null) { | ||||
| @@ -175,7 +175,7 @@ public class HttpUtil { | |||||
| if(code == 200){ //请求成功 | if(code == 200){ //请求成功 | ||||
| in = new BufferedReader(new InputStreamReader(response.getEntity() | in = new BufferedReader(new InputStreamReader(response.getEntity() | ||||
| .getContent(),"utf-8")); | .getContent(),"utf-8")); | ||||
| StringBuffer sb = new StringBuffer(""); | |||||
| StringBuilder sb = new StringBuilder(""); | |||||
| String line = ""; | String line = ""; | ||||
| String NL = System.getProperty("line.separator"); | String NL = System.getProperty("line.separator"); | ||||
| while ((line = in.readLine()) != null) { | while ((line = in.readLine()) != null) { | ||||
| @@ -76,7 +76,7 @@ public class PriceUtil { | |||||
| * @return 对应的汉语大写 | * @return 对应的汉语大写 | ||||
| */ | */ | ||||
| public static String number2CNMontrayUnit(BigDecimal numberOfMoney) { | public static String number2CNMontrayUnit(BigDecimal numberOfMoney) { | ||||
| StringBuffer sb = new StringBuffer(); | |||||
| StringBuilder sb = new StringBuilder(); | |||||
| // -1, 0, or 1 as the value of this BigDecimal is negative, zero, or | // -1, 0, or 1 as the value of this BigDecimal is negative, zero, or | ||||
| // positive. | // positive. | ||||
| int signum = numberOfMoney.signum(); | int signum = numberOfMoney.signum(); | ||||
| @@ -13,7 +13,7 @@ public class RandomUtils { | |||||
| }; | }; | ||||
| public static String getStr(int lenght) { | public static String getStr(int lenght) { | ||||
| StringBuffer str = new StringBuffer(); | |||||
| StringBuilder str = new StringBuilder(); | |||||
| for(int i = 0;i < lenght; i++) { | for(int i = 0;i < lenght; i++) { | ||||
| Double number=Math.random()*(randomValues.length-1); | Double number=Math.random()*(randomValues.length-1); | ||||
| str.append(randomValues[number.intValue()]); | str.append(randomValues[number.intValue()]); | ||||
| @@ -22,7 +22,7 @@ public class RandomUtils { | |||||
| } | } | ||||
| public static String getNum(int lenght) { | public static String getNum(int lenght) { | ||||
| StringBuffer str = new StringBuffer(); | |||||
| StringBuilder str = new StringBuilder(); | |||||
| for(int i = 0;i < lenght; i++) { | for(int i = 0;i < lenght; i++) { | ||||
| Double number=Math.random()*(randomNums.length-1); | Double number=Math.random()*(randomNums.length-1); | ||||
| str.append(randomNums[number.intValue()]); | str.append(randomNums[number.intValue()]); | ||||
| @@ -437,7 +437,7 @@ public final class XmlUtil { | |||||
| * 将SortedMap<Object,Object> 集合转化成 xml格式 | * 将SortedMap<Object,Object> 集合转化成 xml格式 | ||||
| */ | */ | ||||
| public static String getRequestXml(SortedMap<Object,Object> parameters){ | public static String getRequestXml(SortedMap<Object,Object> parameters){ | ||||
| StringBuffer sb = new StringBuffer(); | |||||
| StringBuilder sb = new StringBuilder(); | |||||
| sb.append("<xml>"); | sb.append("<xml>"); | ||||
| Set es = parameters.entrySet(); | Set es = parameters.entrySet(); | ||||
| Iterator it = es.iterator(); | Iterator it = es.iterator(); | ||||
| @@ -74,7 +74,7 @@ public class BoLinkUtil { | |||||
| public static String md5(String data) throws NoSuchAlgorithmException { | public static String md5(String data) throws NoSuchAlgorithmException { | ||||
| MessageDigest md = MessageDigest.getInstance("MD5"); | MessageDigest md = MessageDigest.getInstance("MD5"); | ||||
| md.update(data.getBytes()); | md.update(data.getBytes()); | ||||
| StringBuffer buf = new StringBuffer(); | |||||
| StringBuilder buf = new StringBuilder(); | |||||
| byte[] bits = md.digest(); | byte[] bits = md.digest(); | ||||
| for(int i=0;i<bits.length;i++){ | for(int i=0;i<bits.length;i++){ | ||||
| int a = bits[i]; | int a = bits[i]; | ||||
| @@ -70,7 +70,7 @@ public class ShangAnUtil { | |||||
| public static String md5(String data) throws NoSuchAlgorithmException { | public static String md5(String data) throws NoSuchAlgorithmException { | ||||
| MessageDigest md = MessageDigest.getInstance("MD5"); | MessageDigest md = MessageDigest.getInstance("MD5"); | ||||
| md.update(data.getBytes()); | md.update(data.getBytes()); | ||||
| StringBuffer buf = new StringBuffer(); | |||||
| StringBuilder buf = new StringBuilder(); | |||||
| byte[] bits = md.digest(); | byte[] bits = md.digest(); | ||||
| for(int i=0;i<bits.length;i++){ | for(int i=0;i<bits.length;i++){ | ||||
| int a = bits[i]; | int a = bits[i]; | ||||
| @@ -122,7 +122,7 @@ public class TJDUtil { | |||||
| public static String md5(String data) throws NoSuchAlgorithmException { | public static String md5(String data) throws NoSuchAlgorithmException { | ||||
| MessageDigest md = MessageDigest.getInstance("MD5"); | MessageDigest md = MessageDigest.getInstance("MD5"); | ||||
| md.update(data.getBytes()); | md.update(data.getBytes()); | ||||
| StringBuffer buf = new StringBuffer(); | |||||
| StringBuilder buf = new StringBuilder(); | |||||
| byte[] bits = md.digest(); | byte[] bits = md.digest(); | ||||
| for(int i=0;i<bits.length;i++){ | for(int i=0;i<bits.length;i++){ | ||||
| int a = bits[i]; | int a = bits[i]; | ||||
| @@ -657,7 +657,7 @@ | |||||
| from wx_merchant_b_user bu inner join wx_merchant m on bu.merchant_id=m.id | from wx_merchant_b_user bu inner join wx_merchant m on bu.merchant_id=m.id | ||||
| where bu.tenant_id = #{tenantId} | where bu.tenant_id = #{tenantId} | ||||
| ) bu on bu.bu_id = co.b_user_id | ) bu on bu.bu_id = co.b_user_id | ||||
| left join wx_merchant_subsidy ms on co.id = ms.coupon_order_id | |||||
| left join wx_merchant_subsidy ms on co.id = ms.coupon_order_id and ms.type = 1 | |||||
| left join wx_coupon_action_log cal on co.id = cal.coupon_order_id and co.coupon_id = cal.coupon_id | left join wx_coupon_action_log cal on co.id = cal.coupon_order_id and co.coupon_id = cal.coupon_id | ||||
| where 1=1 | where 1=1 | ||||
| <choose> | <choose> | ||||
| @@ -742,7 +742,7 @@ | |||||
| left join wx_c_user cu on cu.id = co.c_user_id | left join wx_c_user cu on cu.id = co.c_user_id | ||||
| left join wx_merchant_b_user bu on co.b_user_id = bu.id | left join wx_merchant_b_user bu on co.b_user_id = bu.id | ||||
| left join wx_merchant m on m.id = bu.merchant_id | left join wx_merchant m on m.id = bu.merchant_id | ||||
| left join wx_merchant_subsidy ms on co.id = ms.coupon_order_id | |||||
| left join wx_merchant_subsidy ms on co.id = ms.coupon_order_id and ms.type = 1 | |||||
| where co.id = #{id} | where co.id = #{id} | ||||
| and c.id = co.coupon_id | and c.id = co.coupon_id | ||||
| </select> | </select> | ||||
| @@ -10,7 +10,7 @@ public class BodyReaderHttpServletRequestWrapper extends XssHttpServletRequestWr | |||||
| public BodyReaderHttpServletRequestWrapper(HttpServletRequest request) throws IOException { | public BodyReaderHttpServletRequestWrapper(HttpServletRequest request) throws IOException { | ||||
| super(request); | super(request); | ||||
| StringBuffer stringBuilder = new StringBuffer(); | |||||
| StringBuilder stringBuilder = new StringBuilder(); | |||||
| BufferedReader bufferedReader = null; | BufferedReader bufferedReader = null; | ||||
| try { | try { | ||||
| InputStream inputStream = request.getInputStream(); | InputStream inputStream = request.getInputStream(); | ||||