Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
21ccd3e2e8
|
|
@ -1,5 +1,6 @@
|
||||||
package com.czg.controller.user;
|
package com.czg.controller.user;
|
||||||
|
|
||||||
|
import com.czg.account.dto.shopuser.ShopUserVipCardDTO;
|
||||||
import com.czg.account.entity.ShopUser;
|
import com.czg.account.entity.ShopUser;
|
||||||
import com.czg.account.service.ShopUserService;
|
import com.czg.account.service.ShopUserService;
|
||||||
import com.czg.resp.CzgResult;
|
import com.czg.resp.CzgResult;
|
||||||
|
|
@ -36,7 +37,7 @@ public class UShopUserController {
|
||||||
* @return 店铺会员信息列表
|
* @return 店铺会员信息列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/vipCard")
|
@GetMapping("/vipCard")
|
||||||
public CzgResult<Page<ShopUser>> list() {
|
public CzgResult<Page<ShopUserVipCardDTO>> list() {
|
||||||
return CzgResult.success(shopUserService.vipCard(StpKit.USER.getLoginIdAsLong()));
|
return CzgResult.success(shopUserService.vipCard(StpKit.USER.getLoginIdAsLong()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ public class MyStpLogic extends StpLogic {
|
||||||
* @param isAdmin 是否为管理员账号
|
* @param isAdmin 是否为管理员账号
|
||||||
*/
|
*/
|
||||||
public void login(Long id, Long shopId, boolean isManager, boolean isAdmin) {
|
public void login(Long id, Long shopId, boolean isManager, boolean isAdmin) {
|
||||||
super.login(id);
|
|
||||||
login(id);
|
login(id);
|
||||||
if (isManager && shopId == null) {
|
if (isManager && shopId == null) {
|
||||||
throw new ApiNotPrintException("管理端登录必须传递店铺id");
|
throw new ApiNotPrintException("管理端登录必须传递店铺id");
|
||||||
|
|
|
||||||
|
|
@ -21,5 +21,9 @@ public class ShopUserVipCardDTO {
|
||||||
* 用户余额
|
* 用户余额
|
||||||
*/
|
*/
|
||||||
private BigDecimal amount;
|
private BigDecimal amount;
|
||||||
|
/**
|
||||||
|
* 店铺id
|
||||||
|
*/
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
package com.czg.account.service;
|
package com.czg.account.service;
|
||||||
|
|
||||||
import com.czg.account.dto.shopuser.ShopUserAddDTO;
|
import com.czg.account.dto.shopuser.*;
|
||||||
import com.czg.account.dto.shopuser.ShopUserEditDTO;
|
|
||||||
import com.czg.account.dto.shopuser.ShopUserMoneyEditDTO;
|
|
||||||
import com.czg.account.dto.shopuser.ShopUserSummaryDTO;
|
|
||||||
import com.czg.account.entity.ShopUser;
|
import com.czg.account.entity.ShopUser;
|
||||||
import com.mybatisflex.core.paginate.Page;
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import com.mybatisflex.core.service.IService;
|
import com.mybatisflex.core.service.IService;
|
||||||
|
|
@ -31,6 +28,6 @@ public interface ShopUserService extends IService<ShopUser> {
|
||||||
/**
|
/**
|
||||||
* 获取小程序登录用户所有店铺会员信息
|
* 获取小程序登录用户所有店铺会员信息
|
||||||
*/
|
*/
|
||||||
Page<ShopUser> vipCard(long userInfoId);
|
Page<ShopUserVipCardDTO> vipCard(long userInfoId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,8 +119,7 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser>
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<ShopUser> vipCard(long userInfoId) {
|
public Page<ShopUserVipCardDTO> vipCard(long userInfoId) {
|
||||||
Page<ShopUserVipCardDTO> infos = mapper.selectVipCard(PageUtil.buildPage(), userInfoId);
|
return mapper.selectVipCard(PageUtil.buildPage(), userInfoId);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectVipCard" resultType="com.czg.account.dto.shopuser.ShopUserVipCardDTO">
|
<select id="selectVipCard" resultType="com.czg.account.dto.shopuser.ShopUserVipCardDTO">
|
||||||
|
select b.logo, b.shop_name shopName, a.amount, a.shop_id shopId from tb_shop_user as a left join tb_shop_info as b on a.shop_id=b.id
|
||||||
|
where a.user_id=#{userInfoId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue