diff --git a/pom.xml b/pom.xml
index a82b5d6..9c6a7a9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -174,6 +174,17 @@
${sf.version}
+
+ com.smarterFramework
+ sf-payment
+ ${sf.version}
+
+
+
+ com.smarterFramework
+ sf-service
+ ${sf.version}
+
com.smarterFramework
diff --git a/sf-admin/pom.xml b/sf-admin/pom.xml
index 3603c72..6a68f81 100644
--- a/sf-admin/pom.xml
+++ b/sf-admin/pom.xml
@@ -66,6 +66,21 @@
sf-oauth
+
+ com.smarterFramework
+ sf-order
+
+
+
+ com.smarterFramework
+ sf-payment
+
+
+
+ com.smarterFramework
+ sf-service
+
+
diff --git a/sf-admin/src/main/java/com/sf/index/domain/ApplyListInfo.java b/sf-admin/src/main/java/com/sf/index/domain/ApplyListInfo.java
index 65eba05..47eaa62 100644
--- a/sf-admin/src/main/java/com/sf/index/domain/ApplyListInfo.java
+++ b/sf-admin/src/main/java/com/sf/index/domain/ApplyListInfo.java
@@ -7,127 +7,147 @@ import com.sf.common.core.domain.BaseEntity;
/**
* 应用列对象 APPLY_LIST_INFO
- *
+ *
* @author ztzh
* @date 2024-04-11
*/
-public class ApplyListInfo extends BaseEntity
-{
+public class ApplyListInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
- /** 主键 */
+ /**
+ * 主键
+ */
private Long id;
-
- /** 应用名称 */
+ /**
+ * 应用code
+ */
+ @Excel(name = "应用编号")
+ private String appCode;
+ /**
+ * 应用名称
+ */
@Excel(name = "应用名称")
private String appName;
- /** 应用描述 */
+ /**
+ * 应用描述
+ */
@Excel(name = "应用描述")
private String appDesc;
- /** 图片 */
+ /**
+ * 图片
+ */
@Excel(name = "图片")
private String picture;
- /** 排序 */
+ /**
+ * 排序
+ */
private Long orderNum;
- /** 逻辑删除,0:未删除,1:删除 */
+ /**
+ * 逻辑删除,0:未删除,1:删除
+ */
private Long isDelete;
- /** 创建人 */
+ /**
+ * 创建人
+ */
private String created;
- /** 更新人 */
+ /**
+ * 更新人
+ */
private String modified;
- public void setId(Long id)
- {
+ public void setId(Long id) {
this.id = id;
}
- public Long getId()
- {
+ public Long getId() {
return id;
}
- public void setAppName(String appName)
- {
+
+ public void setAppName(String appName) {
this.appName = appName;
}
- public String getAppName()
- {
+ public String getAppName() {
return appName;
}
- public void setAppDesc(String appDesc)
- {
+
+ public void setAppDesc(String appDesc) {
this.appDesc = appDesc;
}
- public String getAppDesc()
- {
+ public String getAppDesc() {
return appDesc;
}
- public void setPicture(String picture)
- {
+
+ public void setPicture(String picture) {
this.picture = picture;
}
- public String getPicture()
- {
+ public String getPicture() {
return picture;
}
- public void setOrderNum(Long orderNum)
- {
+
+ public void setOrderNum(Long orderNum) {
this.orderNum = orderNum;
}
- public Long getOrderNum()
- {
+ public Long getOrderNum() {
return orderNum;
}
- public void setIsDelete(Long isDelete)
- {
+
+ public void setIsDelete(Long isDelete) {
this.isDelete = isDelete;
}
- public Long getIsDelete()
- {
+ public Long getIsDelete() {
return isDelete;
}
- public void setCreated(String created)
- {
+
+ public void setCreated(String created) {
this.created = created;
}
- public String getCreated()
- {
+ public String getCreated() {
return created;
}
- public void setModified(String modified)
- {
+
+ public void setModified(String modified) {
this.modified = modified;
}
- public String getModified()
- {
+ public String getModified() {
return modified;
}
+ public void setAppCode(String appCode) {
+ this.appCode = appCode;
+ }
+
+ public String getAppCode() {
+ return appCode;
+ }
+
@Override
public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("id", getId())
- .append("appName", getAppName())
- .append("appDesc", getAppDesc())
- .append("picture", getPicture())
- .append("orderNum", getOrderNum())
- .append("isDelete", getIsDelete())
- .append("created", getCreated())
- .append("modified", getModified())
- .append("createTime", getCreateTime())
- .append("updateTime", getUpdateTime())
- .toString();
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("appCode",getAppCode())
+ .append("appName", getAppName())
+ .append("appDesc", getAppDesc())
+ .append("picture", getPicture())
+ .append("orderNum", getOrderNum())
+ .append("isDelete", getIsDelete())
+ .append("created", getCreated())
+ .append("modified", getModified())
+ .append("createTime", getCreateTime())
+ .append("updateTime", getUpdateTime())
+ .toString();
}
+
}
diff --git a/sf-admin/src/main/java/com/sf/index/service/impl/ApplyListInfoServiceImpl.java b/sf-admin/src/main/java/com/sf/index/service/impl/ApplyListInfoServiceImpl.java
index 5181ce4..c77d3e8 100644
--- a/sf-admin/src/main/java/com/sf/index/service/impl/ApplyListInfoServiceImpl.java
+++ b/sf-admin/src/main/java/com/sf/index/service/impl/ApplyListInfoServiceImpl.java
@@ -2,6 +2,7 @@ package com.sf.index.service.impl;
import java.util.List;
import com.sf.common.utils.DateUtils;
+import com.sf.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sf.index.mapper.ApplyListInfoMapper;
@@ -54,6 +55,7 @@ public class ApplyListInfoServiceImpl implements IApplyListInfoService
public int insertApplyListInfo(ApplyListInfo applyListInfo)
{
applyListInfo.setCreateTime(DateUtils.getNowDate());
+ applyListInfo.setAppCode(IdUtils.randomTime("ZT"));
return applyListInfoMapper.insertApplyListInfo(applyListInfo);
}
diff --git a/sf-admin/src/main/java/com/sf/order/domain/OrderInfo.java b/sf-admin/src/main/java/com/sf/order/domain/OrderInfo.java
deleted file mode 100644
index 6e165a8..0000000
--- a/sf-admin/src/main/java/com/sf/order/domain/OrderInfo.java
+++ /dev/null
@@ -1,367 +0,0 @@
-package com.sf.order.domain;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.sf.common.annotation.Excel;
-import com.sf.common.core.domain.BaseEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-import java.util.Date;
-
-/**
- * 订单基础信息对象 ORDER_INFO
- *
- * @author ztzh
- * @date 2024-04-09
- */
-public class OrderInfo extends BaseEntity {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- private Long id;
-
- /**
- * 订单编号
- */
- @Excel(name = "订单编号")
- private Long orderNo;
-
- /**
- * 订单状态:
- * 0:待支付
- * 1:已付款
- * 2:支付超时系统结束
- * 3:已完成
- */
- @Excel(name = "订单状态: 0:待支付 1:已付款 2:支付超时系统结束 3:已完成 ")
- private Long orderStatus;
-
- /**
- * 支付方式:0-点券 1-现金
- */
- @Excel(name = "支付方式:0-点券 1-现金")
- private Long payType;
-
- /**
- * 支付渠道(支付方式为现金时)
- * 0:微信
- * 1:支付宝
- */
- @Excel(name = "支付渠道(支付方式为现金时) 0:微信 1:支付宝")
- private Long payChannel;
-
- /**
- * 订单金额
- */
- @Excel(name = "订单金额")
- private Long orderAmt;
-
- /**
- * 运费
- */
- @Excel(name = "运费")
- private Long freightAmt;
-
- /**
- * 总金额
- */
- @Excel(name = "总金额")
- private Long payAmt;
-
- /**
- * 实际支付金额
- */
- @Excel(name = "实际支付金额")
- private Long reallyAmt;
-
- /**
- * 收件方式
- * :0-自提
- * 1-快递 2-配送
- */
- @Excel(name = "收件方式:0-自提 1-快递 2-配送")
- private Long receiveType;
-
- /**
- * 商品Id
- */
- @Excel(name = "商品Id")
- private Long goodsId;
-
- /**
- * 商户Id
- */
- @Excel(name = "商户Id")
- private Long businessId;
-
- /**
- * 收货地址配置Id
- */
- @Excel(name = "收货地址配置Id")
- private Long receiveAddrId;
-
- /**
- * 支付时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
- private Date payTime;
-
- /**
- * 订单创建人
- */
- @Excel(name = "订单创建人")
- private Long createUserId;
-
- /**
- * 最后一次更新操作人
- */
- @Excel(name = "最后一次更新操作人")
- private Long updateUserId;
-
- /**
- * 逻辑删除标识
- * 0:未删除
- * 1:已删除
- */
- @Excel(name = "逻辑删除标识 0:未删除 1:已删除")
- private Long isDelete;
-
- /**
- * 快递单号
- */
- @Excel(name = "快递单号")
- private String trackNo;
-
- /**
- * 订单类型0:自动1:手动
- */
- @Excel(name = "订单类型0:自动1:手动")
- private Long orderType;
-
- /**
- * 平台外部订单号
- */
- @Excel(name = "平台外部订单号")
- private Long outOrderNo;
-
- /**
- * 平台支付返回值
- */
- @Excel(name = "平台支付返回值")
- private String payData;
-
- /**
- * 减免金额(优惠券抵扣)
- */
- @Excel(name = "减免金额(优惠券抵扣)")
- private Long reductionAmout;
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setOrderNo(Long orderNo) {
- this.orderNo = orderNo;
- }
-
- public Long getOrderNo() {
- return orderNo;
- }
-
- public void setOrderStatus(Long orderStatus) {
- this.orderStatus = orderStatus;
- }
-
- public Long getOrderStatus() {
- return orderStatus;
- }
-
- public void setPayType(Long payType) {
- this.payType = payType;
- }
-
- public Long getPayType() {
- return payType;
- }
-
- public void setPayChannel(Long payChannel) {
- this.payChannel = payChannel;
- }
-
- public Long getPayChannel() {
- return payChannel;
- }
-
- public void setOrderAmt(Long orderAmt) {
- this.orderAmt = orderAmt;
- }
-
- public Long getOrderAmt() {
- return orderAmt;
- }
-
- public void setFreightAmt(Long freightAmt) {
- this.freightAmt = freightAmt;
- }
-
- public Long getFreightAmt() {
- return freightAmt;
- }
-
- public void setPayAmt(Long payAmt) {
- this.payAmt = payAmt;
- }
-
- public Long getPayAmt() {
- return payAmt;
- }
-
- public void setReallyAmt(Long reallyAmt) {
- this.reallyAmt = reallyAmt;
- }
-
- public Long getReallyAmt() {
- return reallyAmt;
- }
-
- public void setReceiveType(Long receiveType) {
- this.receiveType = receiveType;
- }
-
- public Long getReceiveType() {
- return receiveType;
- }
-
- public void setGoodsId(Long goodsId) {
- this.goodsId = goodsId;
- }
-
- public Long getGoodsId() {
- return goodsId;
- }
-
- public void setBusinessId(Long businessId) {
- this.businessId = businessId;
- }
-
- public Long getBusinessId() {
- return businessId;
- }
-
- public void setReceiveAddrId(Long receiveAddrId) {
- this.receiveAddrId = receiveAddrId;
- }
-
- public Long getReceiveAddrId() {
- return receiveAddrId;
- }
-
- public void setPayTime(Date payTime) {
- this.payTime = payTime;
- }
-
- public Date getPayTime() {
- return payTime;
- }
-
- public void setCreateUserId(Long createUserId) {
- this.createUserId = createUserId;
- }
-
- public Long getCreateUserId() {
- return createUserId;
- }
-
- public void setUpdateUserId(Long updateUserId) {
- this.updateUserId = updateUserId;
- }
-
- public Long getUpdateUserId() {
- return updateUserId;
- }
-
- public void setIsDelete(Long isDelete) {
- this.isDelete = isDelete;
- }
-
- public Long getIsDelete() {
- return isDelete;
- }
-
- public void setTrackNo(String trackNo) {
- this.trackNo = trackNo;
- }
-
- public String getTrackNo() {
- return trackNo;
- }
-
- public void setOrderType(Long orderType) {
- this.orderType = orderType;
- }
-
- public Long getOrderType() {
- return orderType;
- }
-
- public void setOutOrderNo(Long outOrderNo) {
- this.outOrderNo = outOrderNo;
- }
-
- public Long getOutOrderNo() {
- return outOrderNo;
- }
-
- public void setPayData(String payData) {
- this.payData = payData;
- }
-
- public String getPayData() {
- return payData;
- }
-
- public void setReductionAmout(Long reductionAmout) {
- this.reductionAmout = reductionAmout;
- }
-
- public Long getReductionAmout() {
- return reductionAmout;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
- .append("id", getId())
- .append("orderNo", getOrderNo())
- .append("orderStatus", getOrderStatus())
- .append("payType", getPayType())
- .append("payChannel", getPayChannel())
- .append("orderAmt", getOrderAmt())
- .append("freightAmt", getFreightAmt())
- .append("payAmt", getPayAmt())
- .append("reallyAmt", getReallyAmt())
- .append("receiveType", getReceiveType())
- .append("goodsId", getGoodsId())
- .append("businessId", getBusinessId())
- .append("receiveAddrId", getReceiveAddrId())
- .append("createTime", getCreateTime())
- .append("payTime", getPayTime())
- .append("createUserId", getCreateUserId())
- .append("updateUserId", getUpdateUserId())
- .append("isDelete", getIsDelete())
- .append("updateTime", getUpdateTime())
- .append("trackNo", getTrackNo())
- .append("orderType", getOrderType())
- .append("outOrderNo", getOutOrderNo())
- .append("payData", getPayData())
- .append("reductionAmout", getReductionAmout())
- .toString();
- }
-}
diff --git a/sf-admin/src/main/java/com/sf/order/domain/res/OrderListResVo.java b/sf-admin/src/main/java/com/sf/order/domain/res/OrderListResVo.java
deleted file mode 100644
index 1c7a63d..0000000
--- a/sf-admin/src/main/java/com/sf/order/domain/res/OrderListResVo.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.sf.order.domain.res;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-/**
- * 活动信息详情
- *
- */
-@Data
-@Schema(name = "OrderListResVo", description = "订单列表")
-public class OrderListResVo {
- /**
- * 主键id
- */
- private Long id;
-
- /**
- * 订单编号
- */
- private String orderNo;
-
- /**
- * 订单状态:
- * 0:待支付
- * 1:已付款
- * 2:支付超时系统结束
- * 3:已完成
- */
- private Long orderStatus;
-
- /**
- * 订单金额
- */
- private Long orderAmt;
-
- /**
- * 商品标题
- */
- private String productTitle;
- /**
- * 图片
- */
- private String productPicture;
-
- /**
- * 商品规格
- */
- private String goodsSpec;
- /**
- * 商品数量
- */
- private Integer goodsCount = 1;
-
-}
diff --git a/sf-admin/src/main/java/com/sf/web/controller/system/UserMemberController.java b/sf-admin/src/main/java/com/sf/web/controller/system/UserMemberController.java
new file mode 100644
index 0000000..294c62a
--- /dev/null
+++ b/sf-admin/src/main/java/com/sf/web/controller/system/UserMemberController.java
@@ -0,0 +1,117 @@
+package com.sf.web.controller.system;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.sf.common.utils.SecurityUtils;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.sf.common.annotation.Log;
+import com.sf.common.core.controller.BaseController;
+import com.sf.common.core.domain.AjaxResult;
+import com.sf.common.enums.BusinessType;
+import com.sf.system.domain.UserMember;
+import com.sf.system.service.IUserMemberService;
+import com.sf.common.utils.poi.ExcelUtil;
+import com.sf.common.core.page.TableDataInfo;
+
+/**
+ * 会员Controller
+ *
+ * @author ztzh
+ * @date 2024-04-16
+ */
+@RestController
+@RequestMapping("/system/member")
+public class UserMemberController extends BaseController
+{
+ @Autowired
+ private IUserMemberService userMemberService;
+
+ /**
+ * 查询会员列表
+ */
+ @PreAuthorize("@ss.hasPermi('system:member:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(UserMember userMember)
+ {
+ startPage();
+ List list = userMemberService.selectUserMemberList(userMember);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出会员列表
+ */
+ @PreAuthorize("@ss.hasPermi('system:member:export')")
+ @Log(title = "会员", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, UserMember userMember)
+ {
+ List list = userMemberService.selectUserMemberList(userMember);
+ ExcelUtil util = new ExcelUtil(UserMember.class);
+ util.exportExcel(response, list, "会员数据");
+ }
+
+ /**
+ * 获取会员详细信息
+ */
+ @PreAuthorize("@ss.hasPermi('system:member:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return success(userMemberService.selectUserMemberById(id));
+ }
+
+ /**
+ * 获取会员详细信息,通过用户id
+ * 当前用户
+ */
+ @GetMapping(value = "/currentUser")
+ public AjaxResult getInfoByUser()
+ {
+ Long userId = SecurityUtils.getUserId();
+ return success(userMemberService.selectUserMemberByUserId(userId));
+ }
+
+ /**
+ * 新增会员
+ */
+ @PreAuthorize("@ss.hasPermi('system:member:add')")
+ @Log(title = "会员", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody UserMember userMember)
+ {
+ return toAjax(userMemberService.insertUserMember(userMember));
+ }
+
+ /**
+ * 修改会员
+ */
+ @PreAuthorize("@ss.hasPermi('system:member:edit')")
+ @Log(title = "会员", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody UserMember userMember)
+ {
+ return toAjax(userMemberService.updateUserMember(userMember));
+ }
+
+ /**
+ * 删除会员
+ */
+ @PreAuthorize("@ss.hasPermi('system:member:remove')")
+ @Log(title = "会员", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(userMemberService.deleteUserMemberByIds(ids));
+ }
+}
diff --git a/sf-admin/src/main/resources/application.yml b/sf-admin/src/main/resources/application.yml
index 843f1c4..d953204 100644
--- a/sf-admin/src/main/resources/application.yml
+++ b/sf-admin/src/main/resources/application.yml
@@ -18,7 +18,7 @@ sf:
# 开发环境配置
server:
# 服务器的HTTP端口,默认为8080
- port: 7781
+ port: 80
servlet:
# 应用的访问路径
context-path: /
diff --git a/sf-admin/src/main/resources/mapper/index/ApplyListInfoMapper.xml b/sf-admin/src/main/resources/mapper/index/ApplyListInfoMapper.xml
index bcc6625..6ab3a1f 100644
--- a/sf-admin/src/main/resources/mapper/index/ApplyListInfoMapper.xml
+++ b/sf-admin/src/main/resources/mapper/index/ApplyListInfoMapper.xml
@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -18,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select id, app_name, app_desc, picture, order_num, is_delete, created, modified, create_time, update_time from APPLY_LIST_INFO
+ select id, app_code, app_name, app_desc, picture, order_num, is_delete, created, modified, create_time, update_time from APPLY_LIST_INFO