赵冬冬 пре 4 година
родитељ
комит
bcee28c2a0

+ 9 - 0
carbon-h5/carbon-h5-service/src/main/java/com/hcloud/microserver/h5/service/impl/CustomerInfoServiceImpl.java

@@ -327,6 +327,15 @@ public class CustomerInfoServiceImpl implements CustomerInfoService {
         if (customerInfo == null) {
             Asserts.fail("登录失败");
         }
+
+        CustomerInfoForm customerInfoBo = customerInfo.getCustomerInfo();
+        if(!org.springframework.util.StringUtils.isEmpty(customerInfoBo)){
+
+            Integer isEnable = customerInfoBo.getIsEnable();
+            if(isEnable.intValue()==0){
+                Asserts.fail("用户被禁用");
+            }
+        }
         UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(customerInfo, null, customerInfo.getAuthorities());
         SecurityContextHolder.getContext().setAuthentication(authentication);
         String token = jwtTokenUtil.generateToken(customerInfo);

+ 2 - 0
carbon-h5/carbon-h5-service/src/main/java/com/hcloud/microserver/h5/service/impl/OrderInfoServiceImpl.java

@@ -629,6 +629,8 @@ public class OrderInfoServiceImpl implements OrderInfoService {
         goodsOrderInfo.setOrderAmount(sumTotal);
         //碳汇总数量
         goodsOrderInfo.setOrderCarbonAmount(carbonTotal);
+        //设置为线上订单
+        goodsOrderInfo.setOrderType(0);
     }
 
     private void addGoodsOrderDetail(String customerId, String orderId, List<GoodsOrderDetail> dataList, CreateOrderDetailFrom good, GoodsSaleInfoForm goodsInfo, BigDecimal sum) {

+ 6 - 0
carbon-h5/carbon-h5-service/src/main/resources/com/hcloud/microserver/h5/dao/GoodsOrderInfoMapper.xml

@@ -194,6 +194,9 @@
       <if test="payNo != null">
         pay_no,
       </if>
+      <if test="orderType != null">
+        order_type,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="guid != null">
@@ -238,6 +241,9 @@
       <if test="payNo != null">
         #{payNo,jdbcType=VARCHAR},
       </if>
+      <if test="orderType != null">
+        #{orderType,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="GoodsOrderInfo">