更新10.11 更新积分兑换核销码
This commit is contained in:
parent
9e6ca618aa
commit
21af38fd8e
@ -112,6 +112,10 @@ public class IntegralOrders extends BaseEntity {
|
|||||||
private String makeChange;
|
private String makeChange;
|
||||||
|
|
||||||
private Integer addressId;
|
private Integer addressId;
|
||||||
|
/**
|
||||||
|
* 核销码
|
||||||
|
*/
|
||||||
|
private String checkCode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
<result property="updateBy" column="update_by" jdbcType="INTEGER"/>
|
<result property="updateBy" column="update_by" jdbcType="INTEGER"/>
|
||||||
<result property="staffId" column="staff_id" jdbcType="INTEGER"/>
|
<result property="staffId" column="staff_id" jdbcType="INTEGER"/>
|
||||||
<result property="paymentType" column="payment_type" jdbcType="VARCHAR"/>
|
<result property="paymentType" column="payment_type" jdbcType="VARCHAR"/>
|
||||||
|
<result property="checkCode" column="check_code" jdbcType="VARCHAR"/>
|
||||||
|
|
||||||
<!-- outher-->
|
<!-- outher-->
|
||||||
<result property="mobile" column="mobile" jdbcType="VARCHAR"/>
|
<result property="mobile" column="mobile" jdbcType="VARCHAR"/>
|
||||||
@ -67,7 +68,8 @@
|
|||||||
update_time,
|
update_time,
|
||||||
create_by,
|
create_by,
|
||||||
update_by,
|
update_by,
|
||||||
address_id
|
address_id,
|
||||||
|
check_code
|
||||||
from integral_orders
|
from integral_orders
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
@ -505,7 +507,7 @@
|
|||||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
insert into integral_orders(user_id, order_number, gift_id, shipping_type, paid_info, amount, integral, come_on,
|
insert into integral_orders(user_id, order_number, gift_id, shipping_type, paid_info, amount, integral, come_on,
|
||||||
exchange_quantity, order_status, status, order_type, processing_result, notes, store_id, create_time,
|
exchange_quantity, order_status, status, order_type, processing_result, notes, store_id, create_time,
|
||||||
update_time, create_by, update_by,staff_id,payment_type,chain_store_id,actual_payment,make_change)
|
update_time, create_by, update_by,staff_id,payment_type,chain_store_id,actual_payment,make_change,check_code)
|
||||||
values
|
values
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
(#{entity.userId}, #{entity.orderNumber}, #{entity.giftId}, #{entity.shippingType}, #{entity.paidInfo},
|
(#{entity.userId}, #{entity.orderNumber}, #{entity.giftId}, #{entity.shippingType}, #{entity.paidInfo},
|
||||||
@ -513,7 +515,7 @@
|
|||||||
#{entity.status}, #{entity.orderType}, #{entity.processingResult}, #{entity.notes}, #{entity.storeId},
|
#{entity.status}, #{entity.orderType}, #{entity.processingResult}, #{entity.notes}, #{entity.storeId},
|
||||||
NOW(), NOW(), #{entity.createBy},
|
NOW(), NOW(), #{entity.createBy},
|
||||||
#{entity.updateBy},#{entity.staffId},#{entity.paymentType},#{entity.chainStoreId}
|
#{entity.updateBy},#{entity.staffId},#{entity.paymentType},#{entity.chainStoreId}
|
||||||
,#{entity.actualPayment},#{entity.makeChange})
|
,#{entity.actualPayment},#{entity.makeChange},#{entity.checkCode})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.security.SecureRandom;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -640,6 +641,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
|||||||
integralOrders.setOrderStatus("待处理");
|
integralOrders.setOrderStatus("待处理");
|
||||||
integralOrders.setOrderType("0");
|
integralOrders.setOrderType("0");
|
||||||
integralOrders.setChainStoreId(integralOrdersList.getChainStoreId());
|
integralOrders.setChainStoreId(integralOrdersList.getChainStoreId());
|
||||||
|
integralOrders.setCheckCode(generateUniqueRandomNumber());
|
||||||
}
|
}
|
||||||
integralOrdersDao.insertBatch(integralOrdersList.getIntegralOrdersList());
|
integralOrdersDao.insertBatch(integralOrdersList.getIntegralOrdersList());
|
||||||
|
|
||||||
@ -686,6 +688,16 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
|||||||
return applet;
|
return applet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成核销码
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String generateUniqueRandomNumber() {
|
||||||
|
// 生成 UUID 并移除所有非数字字符,然后截取前 16 位
|
||||||
|
String uuid = UUID.randomUUID().toString().replaceAll("[^0-9]", "");
|
||||||
|
return uuid.substring(0, 16); // 确保返回16位
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询是否领取到同一件商品领取了几件
|
* 查询是否领取到同一件商品领取了几件
|
||||||
|
@ -183,6 +183,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.getInfo()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getInfo() {
|
getInfo() {
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<w-qrcode :options="options"></w-qrcode>
|
<w-qrcode :options="options"></w-qrcode>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="">核销码:6688172293684182</view>
|
<view class="">核销码:{{orderInfo.checkCode}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box_" style="font-size: 14px;">
|
<view class="box_" style="font-size: 14px;">
|
||||||
<view class="title_">自提信息</view>
|
<view class="title_">自提信息</view>
|
||||||
@ -103,7 +103,8 @@
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
totalPage: '',
|
totalPage: '',
|
||||||
options: {
|
options: {
|
||||||
code: 'https://qm.qq.com/cgi-bin/qm/qr?k=LKqML292dD2WvwQfAJXBUmvgbiB_TZWF&noverify=0', // 生成二维码的值
|
// code: 'https://qm.qq.com/cgi-bin/qm/qr?k=LKqML292dD2WvwQfAJXBUmvgbiB_TZWF&noverify=0', // 生成二维码的值
|
||||||
|
code: '', // 生成二维码的值
|
||||||
size: 300, // 460代表生成的二维码的宽高均为460rpx
|
size: 300, // 460代表生成的二维码的宽高均为460rpx
|
||||||
},
|
},
|
||||||
orderId: '',
|
orderId: '',
|
||||||
@ -139,6 +140,7 @@
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
console.log(res, 132);
|
console.log(res, 132);
|
||||||
this.orderInfo = res.data
|
this.orderInfo = res.data
|
||||||
|
this.options.code = res.data.checkCode
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user