修改创建订单,判断购物车为空处理
This commit is contained in:
parent
130d3259cc
commit
f206777914
|
|
@ -95,6 +95,21 @@ public class MemberService {
|
|||
return Result.fail(CodeEnum.MEMBERHAVED);
|
||||
}
|
||||
|
||||
if(ObjectUtil.isNotNull(tbShopUsers)&&ObjectUtil.isNotEmpty(tbShopUsers)){
|
||||
TbShopUser tbShopUser= tbShopUsers.get(0);
|
||||
String code= RandomUtil.randomNumbers(6);
|
||||
tbShopUser.setCode(code);
|
||||
tbShopUser.setTelephone(phone);
|
||||
tbShopUser.setBirthDay(map.get("birthDay")+"");
|
||||
tbShopUser.setName(map.get("nickName")+"");
|
||||
tbShopUser.setSex(Byte.parseByte(map.get("sex")+""));
|
||||
tbShopUser.setLevel(Byte.parseByte(map.get("level")+""));
|
||||
tbShopUser.setIsVip(Byte.parseByte("1"));
|
||||
tbShopUser.setUpdatedAt(System.currentTimeMillis());
|
||||
tbShopUserMapper.updateByPrimaryKeySelective(tbShopUser);
|
||||
return Result.success(CodeEnum.SUCCESS);
|
||||
}
|
||||
|
||||
TbShopUser tbShopUser=new TbShopUser();
|
||||
tbShopUser.setAmount(BigDecimal.ZERO);
|
||||
tbShopUser.setCreditAmount(BigDecimal.ZERO);
|
||||
|
|
|
|||
|
|
@ -122,6 +122,10 @@
|
|||
FROM
|
||||
tb_shop_user_flow f
|
||||
LEFT JOIN tb_shop_user u ON f.shop_user_id = u.id
|
||||
where 1=1
|
||||
<if test="memberId != null and memberId!=''">
|
||||
and u.id = #{memberId}
|
||||
</if>
|
||||
order by f.id desc
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue