Commit 13b79a44 authored by 谢希宇's avatar 谢希宇

Submit by Strive

Submit Date 2021/03/10
parent bba6ff3c
......@@ -229,9 +229,9 @@
i.create_time invoiceCreateTime,
i.invoice_code invoiceCode,
i.invoice_num invoiceNum,
t.order_amount orderAmount,
t.image_url imageUrl,
t.pdf_url pdfUrl
o.order_amount orderAmount,
i.image_url imageUrl,
i.pdf_url pdfUrl
FROM
t_order o
LEFT JOIN t_order_details d ON d.order_id = o.id
......
......@@ -276,7 +276,7 @@
<th>咨询单编码</th>
<th>产品名称</th>
<th>订单金额</th>
<th>付款金额</th>
<th>金额</th>
<th>昵称</th>
<th>别名</th>
<!--<th>openid</th>-->
......
......@@ -298,7 +298,7 @@
</select>
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT IFNULL(SUM(col), 0)
SELECT COUNT(1)
FROM (
SELECT COUNT(1) col
FROM t_order o
......@@ -313,7 +313,6 @@
LEFT JOIN t_aidea_waybill aw ON o.id = aw.order_id
<include refid="sqlWhere"/>
<if test="userid != null"> AND (o.service_id = ${userid} or o.doctor_id =${userid} or o.clerk_id = ${userid}) </if>
<if test="userid != null"> AND (o.service_id = ${userid} or o.doctor_id =${userid} or o.clerk_id = ${userid}) </if>
GROUP BY o.id
<if test="orderAmount != null or payAmount != null">
HAVING 1=1
......
......@@ -542,7 +542,10 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
order.setPayTime(date);
}
if (orderMapper.update(order) > 0) {
//非三期用户才能发券
if (isThreeUsers(order.getOpenid()) == 0) {
couponrecordService.sendCouponRecord(order.getOpenid(), order.getAccountsId());
}
sendQyWechatMassage(order.getId());
return WechatPayUtils.retSucXml;
}
......
......@@ -66,7 +66,8 @@ public class InvoiceUtil {
JSONObject order = new JSONObject();
order.put("terminalNumber", "");//终端号(开票终端号,只能 为空或数字)
//购方电话 非必传
order.put("buyerTel", orderObj.getMemberPhone());
order.put("buyerTel", StringUtils.isNoneBlank(orderObj.getMemberPhone()) ? "": //
orderObj.getMemberPhone().substring(0,3) + "****" + orderObj.getMemberPhone().substring(7, orderObj.getMemberPhone().length()));
//清单标志:非清单:0;清单:1,默认:0 非必传
order.put("listFlag", "0");
//推送方式:-1,不推送;0,邮箱;1,手机(默认);2,邮箱、手机 非必填
......@@ -82,7 +83,8 @@ public class InvoiceUtil {
//收款人 非必填
order.put("payee", SystemConfig.p.getProperty("PAYEE"));
//购方地址 非必填
order.put("buyerAddress", orderObj.getAddressDes());
order.put("buyerAddress", StringUtils.isNoneBlank(orderObj.getAddressDes()) ? "": //
orderObj.getAddressDes().substring(0,3) + "****" + orderObj.getAddressDes().substring(7, orderObj.getMemberPhone().length()));
//购方税号(企业要填,个人可为空)
if (StringUtils.isNotBlank(unitTax)){
order.put("buyerTaxNum", unitTax);
......@@ -107,7 +109,7 @@ public class InvoiceUtil {
if(type.equals("0")){
order.put("buyerName", "个人");
}else{
order.put("buyerName", "企业名称");
order.put("buyerName", invoiceTitle);
}
// 订单时间 必填
order.put("invoiceDate", orderObj.getCreateTimeStr());
......@@ -200,4 +202,10 @@ public class InvoiceUtil {
return result;
}
public static void main(String[] args) {
String aaa= "15800815547";
aaa= aaa.substring(0,3) + "****" + aaa.substring(7, aaa.length());
System.out.println(aaa);
}
}
......@@ -273,10 +273,8 @@ public class OrderController {
if (StringUtils.equals("-1", order.getStatus())) {
conds.in("o.status", new String[]{"0", "1"});
} else if (StringUtils.isNoneBlank(order.getStatus())) {
} else if (StringUtils.isNoneBlank(order.getStatus()) && !StringUtils.equals(order.getStatus(), "all")) {
conds.equal("o.status", order.getStatus());
} else if (StringUtils.equals("all", order.getStatus())) {
}
//三期患者
......@@ -581,8 +579,11 @@ public class OrderController {
try {
OrderFromVO orderFromVO = orderService.fetchId(id);
if (orderFromVO != null && StringUtils.isNoneBlank(orderFromVO.getOpenid())) {
//非三期用户才能发券
if (orderService.isThreeUsers(orderFromVO.getOpenid()) == 0) {
couponrecordService.sendCouponRecord(orderFromVO.getOpenid(), accountId);
}
}
} catch (IOException e) {
e.printStackTrace();
} catch (WriterException e) {
......
......@@ -332,8 +332,6 @@
}
$().ready(function () {
let redingType = $("#redingType").val();
let redingYes = $("#redingYes").val();
if (redingType==redingYes){
......
......@@ -100,6 +100,13 @@ public class ProductController {
if (StringUtils.isNotBlank(product.getDescription())) {
product.setDescription(product.getDescription().replace("\n", "<br/>"));
}
if (StringUtils.isNoneBlank(product.getDescription())) {
String htmlStr = product.getDescription()//
.replaceAll("\r\n", "<br>")
.replaceAll("\n", "<br>");
product.setDescription(htmlStr);
}
if (product != null && product.getId() != null) {
product.setUpdateBy(UserUtils.getUser().getId());
productService.update(product);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment