소스 검색

增加商城联系人管理

gqx 2 년 전
부모
커밋
f2832881d8

+ 36 - 14
jeecg-mall-api/src/main/java/org/jeecg/modules/bus/controller/HotelController.java

@@ -27,9 +27,12 @@ import org.jeecg.modules.business.entity.BusHotel;
 import org.jeecg.modules.business.entity.BusMarketCouponsCashUsed;
 import org.jeecg.modules.business.service.IBusHotelService;
 import org.jeecg.modules.business.util.MapUtil;
+import org.jeecg.modules.rooms.DTO.CanUseRequestParamDto;
+import org.jeecg.modules.rooms.Vo.CanUseResultVo;
 import org.jeecg.modules.rooms.entity.CesRoomLayout;
 import org.jeecg.modules.rooms.service.CesRoomLayoutPriceServiceImpl;
 import org.jeecg.modules.rooms.service.CesRoomLayoutServiceImpl;
+import org.jeecg.modules.rooms.service.CesRoomsServiceImpl;
 import org.jeecg.modules.system.entity.SysTenant;
 import org.jeecg.modules.system.service.ISysTenantService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -53,10 +56,12 @@ import java.util.Map;
 @RequestMapping("/mall-api/hotel")
 @Slf4j
 public class HotelController extends  WebConfig {
-   @Resource
-   private IBusHotelService busHotelService;
-   @Resource
-   private CesRoomLayoutServiceImpl cesRoomLayoutService;
+    @Resource
+    private IBusHotelService busHotelService;
+    @Resource
+    private CesRoomLayoutServiceImpl cesRoomLayoutService;
+    @Resource
+    private CesRoomsServiceImpl cesRoomsService;
 
     /**
      * 酒店列表查询
@@ -65,7 +70,7 @@ public class HotelController extends  WebConfig {
      * @param req
      * @return
      */
-    @ApiOperation(value="酒店列表查询", notes="酒店列表查询")
+    @ApiOperation(value = "酒店列表查询", notes = "酒店列表查询")
     @GetMapping(value = "/queryList")
     @ApiLogin
     @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
@@ -84,22 +89,23 @@ public class HotelController extends  WebConfig {
 
     /**
      * 可入住酒店列表
+     *
      * @param pageNo
      * @param pageSize
-     * @param sort 0推荐排序 1 距离优先 2低价优先 3评分优先 4评论数优先
-     * @param keyWord 搜索关键字
+     * @param sort     0推荐排序 1 距离优先 2低价优先 3评分优先 4评论数优先
+     * @param keyWord  搜索关键字
      * @param req
      * @return
      */
-    @ApiOperation(value="可入住酒店列表", notes="可入住酒店列表")
+    @ApiOperation(value = "可入住酒店列表", notes = "可入住酒店列表")
     @GetMapping(value = "/can-use-hotel-list")
     @ApiLogin
     @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
-    public Result<IPage<BusHotel>> getCanUseHotelList( @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-                                                     @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
-                                                     @RequestParam(name = "sort", defaultValue = "0") Integer sort,
+    public Result<IPage<BusHotel>> getCanUseHotelList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                      @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                      @RequestParam(name = "sort", defaultValue = "0") Integer sort,
                                                       @RequestParam(name = "keyWord", defaultValue = "") String keyWord,
-                                                     HttpServletRequest req) {
+                                                      HttpServletRequest req) {
         Page<BusHotel> page = new Page<BusHotel>(pageNo, pageSize);
         String tenantId = TenantContextHolder.getTenantId();
         IPage<BusHotel> pageList = busHotelService.pageList(page, tenantId, keyWord, sort);
@@ -112,10 +118,26 @@ public class HotelController extends  WebConfig {
      * @param id
      * @return
      */
-    @ApiOperation(value="通过id查询酒店详情", notes="通过id查询酒店详情")
+    @ApiOperation(value = "通过id查询酒店详情", notes = "通过id查询酒店详情")
     @GetMapping(value = "/queryById")
-    public Result<BusHotel> queryById(@RequestParam(name="id",required=true) String id) {
+    public Result<BusHotel> queryById(@RequestParam(name = "id", required = true) String id) {
         BusHotel busHotel = busHotelService.getById(id);
         return Result.OK(busHotel);
     }
+
+    /**
+     * 根据酒店查询房型对应可用房间
+     *
+     * @param param
+     * @return
+     */
+    @ApiOperation(value = "根据酒店查询房型对应可用房间", notes = "根据酒店查询房型对应可用房间")
+    @GetMapping(value = "/can-user-rooms")
+    public Result<List<CanUseResultVo>> getCanUseRooms(CanUseRequestParamDto param) {
+        if (param.getHotelId() == null || param.getHotelId().isEmpty())
+            throw new JeecgBootException("参数错误");
+        if (param.getEndOf() == null || param.getStartOf() == null)
+            throw new JeecgBootException("请传入时间范围");
+        return Result.ok(cesRoomsService.getCanUseRooms(param));
+    }
 }

+ 157 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/controller/MallContactController.java

@@ -0,0 +1,157 @@
+package org.jeecg.modules.mall.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import annotation.ApiLogin;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.util.ThirdSessionHolder;
+import config.WebConfig;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.TenantContextHolder;
+import org.jeecg.common.util.oConvertUtils;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecg.config.ApiVersion;
+import org.jeecg.config.ApiVersionConstant;
+import org.jeecg.modules.mall.entity.MallContact;
+import org.jeecg.modules.mall.service.IMallContactService;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+
+ /**
+ * @Description: mall_contact
+ * @Author: jeecg-boot
+ * @Date:   2023-04-26
+ * @Version: V1.0
+ */
+@Api(tags="商城联系人")
+@RestController
+@RequestMapping("/mall-api/contact")
+@Slf4j
+public class MallContactController extends WebConfig {
+	@Resource
+	private IMallContactService mallContactService;
+
+	/**
+	 * 商城联系人分页列表查询
+	 *
+	 * @param mallContact
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@ApiLogin
+	@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+	@ApiOperation(value="商城联系人分页列表查询", notes="商城联系人分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<MallContact>> queryPageList(MallContact mallContact,
+													@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+													@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+													HttpServletRequest req) {
+		LambdaQueryWrapper<MallContact> queryWrapper = QueryGenerator.initQueryWrapper(mallContact, req.getParameterMap()).lambda();
+		String userId = ThirdSessionHolder.getUserId();
+		queryWrapper.eq(MallContact::getUserId,userId);
+		Page<MallContact> page = new Page<MallContact>(pageNo, pageSize);
+		IPage<MallContact> pageList = mallContactService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+
+	/**
+	 *   添加商城联系人
+	 *
+	 * @param mallContact
+	 * @return
+	 */
+	@AutoLog(value = "添加商城联系人")
+	@ApiOperation(value="添加商城联系人", notes="添加商城联系人")
+	@ApiLogin
+	@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody MallContact mallContact) {
+		String tenantId = TenantContextHolder.getTenantId();
+		String userId = ThirdSessionHolder.getUserId();
+		mallContact.setUserId(userId);
+		mallContact.setTenantId(tenantId);
+		mallContactService.save(mallContact);
+		return Result.OK("添加成功!");
+	}
+
+	/**
+	 *  编辑商城联系人
+	 *
+	 * @param mallContact
+	 * @return
+	 */
+	@AutoLog(value = "编辑商城联系人")
+	@ApiOperation(value="编辑商城联系人", notes="编辑商城联系人")
+	@ApiLogin
+	@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody MallContact mallContact) {
+		mallContactService.updateById(mallContact);
+		return Result.OK("编辑成功!");
+	}
+
+	/**
+	 *   通过id删除商城联系人
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "通过id删除商城联系人")
+	@ApiOperation(value="通过id删除商城联系人", notes="通过id删除商城联系人")
+	@ApiLogin
+	@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		mallContactService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+
+	/**
+	 * 通过id查询商城联系人
+	 *
+	 * @param id
+	 * @return
+	 */
+	@ApiLogin
+	@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+	@ApiOperation(value="通过id查询商城联系人", notes="通过id查询商城联系人")
+	@GetMapping(value = "/queryById")
+	public Result<MallContact> queryById(@RequestParam(name="id",required=true) String id) {
+		MallContact mallContact = mallContactService.getById(id);
+		if(mallContact==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(mallContact);
+	}
+}

+ 55 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/entity/MallContact.java

@@ -0,0 +1,55 @@
+package org.jeecg.modules.mall.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: mall_contact
+ * @Author: jeecg-boot
+ * @Date:   2023-04-26
+ * @Version: V1.0
+ */
+@Data
+@TableName("mall_contact")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="mall_contact对象", description="mall_contact")
+public class MallContact implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**key*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "key")
+    private String id;
+	/**关联租户*/
+	@Excel(name = "关联租户", width = 15)
+    @ApiModelProperty(value = "关联租户")
+    private String tenantId;
+	/**商城用户id*/
+	@Excel(name = "商城用户id", width = 15)
+    @ApiModelProperty(value = "商城用户id")
+    private String userId;
+	/**联系人名称*/
+	@Excel(name = "联系人名称", width = 15)
+    @ApiModelProperty(value = "联系人名称")
+    private String contactName;
+	/**同住人手机号*/
+	@Excel(name = "同住人手机号", width = 15)
+    @ApiModelProperty(value = "同住人手机号")
+    private String phone;
+}

+ 17 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/mapper/MallContactMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.mall.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.mall.entity.MallContact;
+
+/**
+ * @Description: mall_contact
+ * @Author: jeecg-boot
+ * @Date:   2023-04-26
+ * @Version: V1.0
+ */
+public interface MallContactMapper extends BaseMapper<MallContact> {
+
+}

+ 5 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/mapper/xml/MallContactMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.demo.mall.mapper.MallContactMapper">
+
+</mapper>

+ 14 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/service/IMallContactService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.mall.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.mall.entity.MallContact;
+
+/**
+ * @Description: mall_contact
+ * @Author: jeecg-boot
+ * @Date:   2023-04-26
+ * @Version: V1.0
+ */
+public interface IMallContactService extends IService<MallContact> {
+
+}

+ 19 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/service/impl/MallContactServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.mall.service.impl;
+
+import org.jeecg.modules.mall.entity.MallContact;
+import org.jeecg.modules.mall.mapper.MallContactMapper;
+import org.jeecg.modules.mall.service.IMallContactService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: mall_contact
+ * @Author: jeecg-boot
+ * @Date:   2023-04-26
+ * @Version: V1.0
+ */
+@Service
+public class MallContactServiceImpl extends ServiceImpl<MallContactMapper, MallContact> implements IMallContactService {
+
+}

+ 4 - 27
jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/controller/WxUserController.java

@@ -1,47 +1,24 @@
 package org.jeecg.modules.wxuser.controller;
 
 import annotation.ApiLogin;
-import cn.binarywang.wx.miniapp.api.WxMaUserService;
-import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.util.ThirdSessionHolder;
 import config.WebConfig;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.constant.CommonConstant;
-import org.jeecg.common.system.query.MatchTypeEnum;
-import org.jeecg.common.system.query.QueryCondition;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.constant.VxeSocketConst;
 import org.jeecg.config.ApiVersion;
 import org.jeecg.config.ApiVersionConstant;
 import org.jeecg.modules.wxuser.dto.LoginDto;
 import org.jeecg.modules.wxuser.dto.WxOpenDataDto;
-import org.jeecg.modules.wxuser.entity.ThirdSession;
-import org.jeecg.modules.wxuser.entity.UserInfo;
+import org.jeecg.modules.wxuser.entity.MallUserInfo;
 import org.jeecg.modules.wxuser.service.IUserInfoService;
-import org.springframework.context.annotation.Configuration;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 import springfox.documentation.swagger2.annotations.EnableSwagger2;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URLDecoder;
-import java.util.*;
 
 
 @Api(tags="商城登录")
@@ -63,14 +40,14 @@ public class WxUserController extends WebConfig {
     @ApiOperation(value = "小程序用户登录")
     @PostMapping("/ma-login")
     @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
-    public Result<UserInfo> loginMa(HttpServletRequest request, @RequestBody LoginDto dto) {
+    public Result<MallUserInfo> loginMa(HttpServletRequest request, @RequestBody LoginDto dto) {
         try {
             String appId = request.getHeader("app-id");
             if (StringUtils.isBlank(appId)) {
                 return Result.error("缺少appid");
             }
             dto.setAppId(appId);
-            UserInfo userInfo = userInfoService.loginMa(dto);
+            MallUserInfo userInfo = userInfoService.loginMa(dto);
             return Result.ok(userInfo);
         } catch (Exception e) {
             e.printStackTrace();
@@ -90,7 +67,7 @@ public class WxUserController extends WebConfig {
     public Result loginByPhoneMa(HttpServletRequest request, @RequestBody WxOpenDataDto dto) {
         try {
             String token = request.getHeader("third-session");
-            UserInfo userInfo = userInfoService.loginByPhoneMa(dto, token);
+            MallUserInfo userInfo = userInfoService.loginByPhoneMa(dto, token);
             return Result.ok(userInfo);
         } catch (Exception e) {
             e.printStackTrace();

+ 4 - 4
jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/entity/UserInfo.java

@@ -17,17 +17,17 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
 /**
- * @Description: user_info
+ * @Description: mall_user_info
  * @Author: jeecg-boot
  * @Date:   2023-04-25
  * @Version: V1.0
  */
 @Data
-@TableName("user_info")
+@TableName("mall_user_info")
 @Accessors(chain = true)
 @EqualsAndHashCode(callSuper = false)
-@ApiModel(value="user_info对象", description="user_info")
-public class UserInfo implements Serializable {
+@ApiModel(value="mall_user_info对象", description="mall_user_info")
+public class MallUserInfo implements Serializable {
     private static final long serialVersionUID = 1L;
 
 	/**id*/

+ 2 - 5
jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/mapper/UserInfoMapper.java

@@ -1,10 +1,7 @@
 package org.jeecg.modules.wxuser.mapper;
 
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.jeecg.modules.wxuser.entity.UserInfo;
+import org.jeecg.modules.wxuser.entity.MallUserInfo;
 
 /**
  * @Description: user_info
@@ -12,6 +9,6 @@ import org.jeecg.modules.wxuser.entity.UserInfo;
  * @Date:   2023-04-25
  * @Version: V1.0
  */
-public interface UserInfoMapper extends BaseMapper<UserInfo> {
+public interface UserInfoMapper extends BaseMapper<MallUserInfo> {
 
 }

+ 4 - 5
jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/service/IUserInfoService.java

@@ -3,8 +3,7 @@ package org.jeecg.modules.wxuser.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.wxuser.dto.LoginDto;
 import org.jeecg.modules.wxuser.dto.WxOpenDataDto;
-import org.jeecg.modules.wxuser.entity.UserInfo;
-import org.springframework.transaction.annotation.Transactional;
+import org.jeecg.modules.wxuser.entity.MallUserInfo;
 
 /**
  * @Description: user_info
@@ -12,18 +11,18 @@ import org.springframework.transaction.annotation.Transactional;
  * @Date:   2023-04-25
  * @Version: V1.0
  */
-public interface IUserInfoService extends IService<UserInfo> {
+public interface IUserInfoService extends IService<MallUserInfo> {
     /**
      * wx.login登陆成功之后发送请求,后端登录
      * @param dto
      * @return
      */
-    public UserInfo loginMa(LoginDto dto);
+    public MallUserInfo loginMa(LoginDto dto);
 
     /**
      * 通过小程序授权手机号一键登录商城
      * @param dto
      * @return
      */
-    public UserInfo loginByPhoneMa(WxOpenDataDto dto, String token);
+    public MallUserInfo loginByPhoneMa(WxOpenDataDto dto, String token);
 }

+ 11 - 15
jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/service/impl/UserInfoServiceImpl.java

@@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.util.ThirdSessionHolder;
 import me.chanjar.weixin.common.error.WxErrorException;
-import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.common.system.util.JwtUtil;
@@ -21,7 +20,7 @@ import org.jeecg.common.util.TenantContextHolder;
 import org.jeecg.modules.wxuser.dto.LoginDto;
 import org.jeecg.modules.wxuser.dto.WxOpenDataDto;
 import org.jeecg.modules.wxuser.entity.ThirdSession;
-import org.jeecg.modules.wxuser.entity.UserInfo;
+import org.jeecg.modules.wxuser.entity.MallUserInfo;
 import org.jeecg.modules.wxuser.entity.WxAppConfig;
 import org.jeecg.modules.wxuser.entity.WxUser;
 import org.jeecg.modules.wxuser.mapper.UserInfoMapper;
@@ -37,10 +36,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import java.util.Date;
 import java.util.UUID;
-import java.util.concurrent.TimeUnit;
 
 /**
  * @Description: user_info
@@ -49,7 +45,7 @@ import java.util.concurrent.TimeUnit;
  * @Version: V1.0
  */
 @Service
-public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements IUserInfoService {
+public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, MallUserInfo> implements IUserInfoService {
 @Resource
 private IWxAppConfigService wxAppConfigService;
     @Resource
@@ -65,7 +61,7 @@ private IWxAppConfigService wxAppConfigService;
      * @return
      */
     @Transactional(rollbackFor = Exception.class)
-    public UserInfo loginMa(LoginDto dto) {
+    public MallUserInfo loginMa(LoginDto dto) {
         LambdaQueryWrapper<WxAppConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>();
         lambdaQueryWrapper.eq(WxAppConfig::getAppId, dto.getAppId());
         WxAppConfig wxApp = wxAppConfigService.getOne(lambdaQueryWrapper);
@@ -99,7 +95,7 @@ private IWxAppConfigService wxAppConfigService;
             throw new JeecgBootException("小程序获取登录后的微信用户失败:" + e.getMessage());
         }
         System.out.println("【授权登录前】" + wxUser.toString());
-        UserInfo userInfo;
+        MallUserInfo userInfo;
         if (wxUser == null || StrUtil.isBlank(wxUser.getId())) {
             //新增微信用户
             wxUser.setAppId(wxApp.getId());
@@ -110,7 +106,7 @@ private IWxAppConfigService wxAppConfigService;
         if (StrUtil.isNotBlank(wxUser.getUserId())) {
             userInfo = baseMapper.selectById(wxUser.getUserId());
         } else {
-            userInfo = new UserInfo();
+            userInfo = new MallUserInfo();
         }
         System.out.println("【用户信息】" + userInfo.toString());
 
@@ -137,7 +133,7 @@ private IWxAppConfigService wxAppConfigService;
      * @param dto
      * @return
      */
-    public UserInfo loginByPhoneMa(WxOpenDataDto dto,String token) {
+    public MallUserInfo loginByPhoneMa(WxOpenDataDto dto, String token) {
         ThirdSession thirdSession = ThirdSessionHolder.getThirdSession();
         String key = CommonConstant.PREFIX_WX_APP_USER_TOKEN + token;
         dto.setSessionKey(thirdSession.getSessionKey());
@@ -164,18 +160,18 @@ private IWxAppConfigService wxAppConfigService;
             throw new JeecgBootException("微信小程序授权拉取手机号码:" + e.getMessage());
         }
         //通过手机号登录
-        UserInfo userInfo = loginByMobileWx(thirdSession, phone, key);
+        MallUserInfo userInfo = loginByMobileWx(thirdSession, phone, key);
         return userInfo;
     }
 
 
     @Transactional(rollbackFor = Exception.class)
-    public UserInfo loginByMobileWx(ThirdSession thirdSession, String mobile, String key) {
+    public MallUserInfo loginByMobileWx(ThirdSession thirdSession, String mobile, String key) {
         //先查询该手机号是不是商城用户
-        UserInfo userInfo = baseMapper.selectOne(Wrappers.<UserInfo>lambdaQuery()
-                .eq(UserInfo::getMobile, mobile));
+        MallUserInfo userInfo = baseMapper.selectOne(Wrappers.<MallUserInfo>lambdaQuery()
+                .eq(MallUserInfo::getMobile, mobile));
         if (userInfo == null) {//不是商城用户,则新增
-            userInfo = new UserInfo();
+            userInfo = new MallUserInfo();
             userInfo.setCreateTime(DateTime.now());
             userInfo.setUpdateTime(DateTime.now());
         }