Преглед на файлове

添加商户相关页面

limingming преди 1 година
родител
ревизия
d638fe2351

+ 46 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/MerchantUserController.java

@@ -0,0 +1,46 @@
+package com.ruoyi.web.controller.platform;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.MerchantUser;
+import com.ruoyi.system.service.MerchantUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 商户信息Controller
+ * 
+ * @author liming
+ * @date 2023-08-16
+ */
+@RestController
+@RequestMapping("/platform/v1/merchantUser")
+public class MerchantUserController extends BaseController {
+    @Autowired
+    private MerchantUserService merchantUserService;
+
+    /**
+     * 查询商户信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(MerchantUser merchantUser) {
+        return null;
+    }
+
+
+    /**
+     * 新增商户信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:add')")
+    @Log(title = "商户信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody MerchantUser merchantUser) {
+        return null;
+    }
+
+}

+ 47 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/UserInfoController.java

@@ -15,9 +15,11 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 
 
+import java.util.HashMap;
+
 /**
 /**
  * 用户信息Controller
  * 用户信息Controller
- * 
+ *
  * @author liming
  * @author liming
  * @date 2023-08-01
  * @date 2023-08-01
  */
  */
@@ -35,9 +37,9 @@ public class UserInfoController extends BaseController {
      */
      */
 //    @PreAuthorize("@ss.hasPermi('system:info:list')")
 //    @PreAuthorize("@ss.hasPermi('system:info:list')")
     @PostMapping("/list")
     @PostMapping("/list")
-    public R<IPage<UserInfo>> list(@RequestBody  BaseParam param) {
+    public R<IPage<UserInfo>> list(@RequestBody BaseParam param) {
         Page<UserInfo> page = new Page<>(param.getCurrent(), param.getSize());
         Page<UserInfo> page = new Page<>(param.getCurrent(), param.getSize());
-        IPage<UserInfo> userInfoIPage = userInfoService.getUserInfoList(page,null);
+        IPage<UserInfo> userInfoIPage = userInfoService.getUserInfoList(page, null);
 //        IPage<UserInfo> userInfoIPage = userInfoService.page(new Page<UserInfo>().setCurrent(param.getCurrent()).setSize(param.getSize()),
 //        IPage<UserInfo> userInfoIPage = userInfoService.page(new Page<UserInfo>().setCurrent(param.getCurrent()).setSize(param.getSize()),
 //                new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getDelFlag,0));
 //                new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getDelFlag,0));
 
 
@@ -56,5 +58,47 @@ public class UserInfoController extends BaseController {
         return R.ok(userAddress);
         return R.ok(userAddress);
     }
     }
 
 
+    /**
+     * 获取用户地址详情信息
+     */
+    @PostMapping(value = "/distributed")
+    public R<HashMap<String, Integer>> distributed() {
+        HashMap<String, Integer> map = new HashMap<>();
+        map.put("北京市", 1000);
+        map.put("上海市", 2000);
+        map.put("天津市", 3000);
+        map.put("重庆市", 8000);
+        map.put("河北省", 2000);
+        map.put("山西省", 6000);
+        map.put("辽宁省", 4000);
+        map.put("吉林省", 2000);
+        map.put("黑龙江省", 3000);
+        map.put("浙江省", 4000);
+        map.put("福建省", 5000);
+        map.put("山东省", 6000);
+        map.put("河南省", 10000);
+        map.put("湖北省", 8000);
+        map.put("湖南省", 9000);
+        map.put("广东省", 10000);
+        map.put("海南省", 11000);
+        map.put("四川", 6000);
+        map.put("贵州", 6000);
+        map.put("云南", 6000);
+        map.put("江西省", 8000);
+        map.put("陕西省", 8000);
+        map.put("青海省", 8000);
+        map.put("甘肃省", 8000);
+        map.put("广西省", 8000);
+        map.put("新疆省", 8000);
+        map.put("内蒙古省", 9000);
+        map.put("西藏省", 6000);
+        map.put("台湾", 4000);
+        map.put("香港", 6666);
+        map.put("澳门", 6666);
+        map.put("安徽省", 7000);
+        map.put("江苏省省", 9000);
+        return R.ok(map);
+    }
+
 
 
 }
 }

+ 58 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/MerchantUser.java

@@ -0,0 +1,58 @@
+package com.ruoyi.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 商户信息对象 t_merchant_user
+ * 
+ * @author liming
+ * @date 2023-08-16
+ */
+@Data
+@TableName("t_merchant_user")
+public class MerchantUser implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** 商户id */
+    @TableId( value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /** 商户名称 */
+    @Excel(name = "商户名称")
+    private String name;
+
+    /** 商户标识码 */
+    @Excel(name = "商户标识码")
+    private String merchantCode;
+
+    /** 状态(0使用中 1未使用) */
+    @Excel(name = "状态", readConverterExp = "0=使用中,1=未使用")
+    private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+
+    /** 创建者 */
+    private String createBy;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /** 更新者 */
+    private String updateBy;
+
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+}

+ 14 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/MerchantUserMapper.java

@@ -0,0 +1,14 @@
+package com.ruoyi.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.system.domain.MerchantUser;
+
+/**
+ * 商户信息Mapper接口
+ * 
+ * @author liming
+ * @date 2023-08-16
+ */
+public interface MerchantUserMapper extends BaseMapper<MerchantUser> {
+
+}

+ 14 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/MerchantUserService.java

@@ -0,0 +1,14 @@
+package com.ruoyi.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.system.domain.MerchantUser;
+
+/**
+ * 商户信息Service接口
+ * 
+ * @author limng
+ * @date 2023-08-16
+ */
+public interface MerchantUserService extends IService<MerchantUser> {
+
+}

+ 19 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantUserServiceImpl.java

@@ -0,0 +1,19 @@
+package com.ruoyi.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.system.domain.MerchantUser;
+import com.ruoyi.system.mapper.MerchantUserMapper;
+import com.ruoyi.system.service.MerchantUserService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 商户信息Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-08-16
+ */
+@Service
+public class MerchantUserServiceImpl extends ServiceImpl<MerchantUserMapper, MerchantUser> implements MerchantUserService {
+
+
+}

+ 24 - 0
ruoyi-system/src/main/resources/mapper/system/platform/MerchantUserMapper.xml

@@ -0,0 +1,24 @@
+<?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="com.ruoyi.system.mapper.MerchantUserMapper">
+    
+    <resultMap type="MerchantUser" id="MerchantUserResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="merchantCode"    column="merchant_code"    />
+        <result property="status"    column="status"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectTMerchantUserVo">
+        select id, name, merchant_code, status, del_flag, create_by, create_time, update_by, update_time from t_merchant_user
+    </sql>
+
+
+</mapper>