From 43c2b6aa1814381e8b0ab64fef5993a901a3477c Mon Sep 17 00:00:00 2001 From: wen <1455474577@qq.com> Date: Wed, 9 Feb 2022 10:24:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=88=B7=E5=8D=A1=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=EF=BC=8C=E6=9F=A5=E8=AF=A2=E5=B9=B3=E5=8F=B0=E6=88=96?= =?UTF-8?q?=E8=BF=90=E8=90=A5=E5=95=86=E5=90=84=E7=A7=8D=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xhpc/card/constant/Constant.java | 54 +++ .../card/controller/XhpcCardController.java | 45 +- .../com/xhpc/card/domain/BindCardEcho.java | 57 +++ .../xhpc/card/domain/SearchCardResponse.java | 52 +++ .../domain/SearchCardUserQueryCondition.java | 58 +++ .../xhpc/card/mapper/TIccardDeviceMapper.java | 13 + .../xhpc/card/mapper/XhpcAppUserMapper.java | 40 ++ .../mapper/XhpcCommunityPersonnelMapper.java | 66 +++ .../mapper/XhpcCustomersPersonnelMapper.java | 68 +++ .../xhpc/card/mapper/XhpcOperatorMapper.java | 9 + .../java/com/xhpc/card/pojo/XhpcAppUser.java | 118 ++++++ .../card/pojo/XhpcCommunityPersonnel.java | 142 +++++++ .../card/pojo/XhpcCustomersPersonnel.java | 142 +++++++ .../xhpc/card/service/IXhpcCardService.java | 30 +- .../service/impl/XhpcCardServiceImpl.java | 144 ++++++- .../resources/mapper/TIccardDeviceMapper.xml | 7 + .../resources/mapper/XhpcAppUserMapper.xml | 300 ++++++++++++++ .../mapper/XhpcCommunityPersonnelMapper.xml | 389 ++++++++++++++++++ .../mapper/XhpcCustomersPersonnelMapper.xml | 389 ++++++++++++++++++ .../resources/mapper/XhpcOperatorMapper.xml | 7 + 20 files changed, 2108 insertions(+), 22 deletions(-) create mode 100644 xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/constant/Constant.java create mode 100644 xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/domain/BindCardEcho.java create mode 100644 xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/domain/SearchCardResponse.java create mode 100644 xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/domain/SearchCardUserQueryCondition.java create mode 100644 xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcAppUserMapper.java create mode 100644 xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcCommunityPersonnelMapper.java create mode 100644 xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcCustomersPersonnelMapper.java create mode 100644 xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/pojo/XhpcAppUser.java create mode 100644 xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/pojo/XhpcCommunityPersonnel.java create mode 100644 xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/pojo/XhpcCustomersPersonnel.java create mode 100644 xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcAppUserMapper.xml create mode 100644 xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcCommunityPersonnelMapper.xml create mode 100644 xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcCustomersPersonnelMapper.xml diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/constant/Constant.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/constant/Constant.java new file mode 100644 index 00000000..5dd3c93e --- /dev/null +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/constant/Constant.java @@ -0,0 +1,54 @@ +package com.xhpc.card.constant; + +/** + * 刷卡系统的中常量类 + * + * @author WH + * @date 2022/1/28 15:44 + * @since version-1.0 + */ +public class Constant { + + /** + * 用户账户 + */ + public static final String USER_ACCOUNT = "userAccount"; + /** + * 用户类型 + */ + public static final String USER_TYPE = "userType"; + /** + * string form of c client user + */ + public static final String STR_C_USER = "0"; + /** + * string form of s client user + */ + public static final String STR_S_USER = "2"; + /** + * string form of b client user + */ + public static final String STR_B_USER = "3"; + /** + * c client user + */ + public static final Integer C_USER = 0; + /** + * s client user + */ + public static final Integer S_USER = 2; + /** + * b client user + */ + public static final Integer B_USER = 3; + /** + * string form of total items of list + */ + public static final String TOTAL_ITEMS = "totalItems"; + + private Constant() { + + throw new IllegalArgumentException("This is a const class!"); + } + +} diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/controller/XhpcCardController.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/controller/XhpcCardController.java index c9d973b6..acd98aa3 100644 --- a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/controller/XhpcCardController.java +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/controller/XhpcCardController.java @@ -1,8 +1,6 @@ package com.xhpc.card.controller; -import com.xhpc.card.domain.CardList; -import com.xhpc.card.domain.ListOfAuthorizedDevices; -import com.xhpc.card.domain.QueryConditions; +import com.xhpc.card.domain.*; import com.xhpc.card.service.IXhpcCardService; import com.xhpc.common.core.domain.R; import com.xhpc.common.core.web.controller.BaseController; @@ -25,8 +23,9 @@ public class XhpcCardController extends BaseController { /** * 卡启动前判断 - * @param cardno 卡物理卡号 - * @param serialNumber 终端编号 + * + * @param cardno 卡物理卡号 + * @param serialNumber 终端编号 * @return */ @GetMapping("/cardStartup") @@ -38,9 +37,12 @@ public class XhpcCardController extends BaseController { } @GetMapping("/devices") - public R queryDeviceList() { + public R queryDeviceList(@RequestParam Long currentPage, @RequestParam Long items) { - return xhpcCardService.queryDeviceList(); + if (currentPage == null || items == null) { + return R.fail("分页参数不能为null"); + } + return xhpcCardService.queryDeviceList(currentPage, items); } /** @@ -69,5 +71,34 @@ public class XhpcCardController extends BaseController { return xhpcCardService.queryCardListBy(queryConditions); } + /** + * 绑定联网卡回显信息接口 + * + * @author WH + * @date 2022/1/26 10:37 + * @since version-1.0 + */ + @GetMapping("/non-bind/{cardId}") + public R bindCard(@PathVariable("cardId") Long cardId) { + + if (cardId == null) { + return R.fail("cardId不能为null"); + } + return xhpcCardService.bindCard(cardId); + } + + /** + * 查询平台或运营商端各种类型用户的接口 + * + * @author WH + * @date 2022/2/8 10:33 + * @since version-1.0 + */ + @GetMapping("/user/all") + public R searchCardUser(SearchCardUserQueryCondition queryCondition) { + + return xhpcCardService.searchCardUser(queryCondition); + } + } diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/domain/BindCardEcho.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/domain/BindCardEcho.java new file mode 100644 index 00000000..4c9849ee --- /dev/null +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/domain/BindCardEcho.java @@ -0,0 +1,57 @@ +package com.xhpc.card.domain; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * 用于封装绑定卡时,要回显的数据的封装类 + * + * @author WH + * @date 2022/1/28 11:04 + * @since version-1.0 + */ +@NoArgsConstructor +@Data +public class BindCardEcho { + + /** + * 用户类型 + * ( 0 C端用户 1 流量方用户 2社区用户 3 B端用户) + */ + @JsonProperty("userType") + private List userType; + /** + * 用户账号 + */ + @JsonProperty("userAccount") + private Object userAccount; + /** + * 卡序列号 + */ + @JsonProperty("cardId") + private String cardId; + /** + * 卡编号 + */ + @JsonProperty("cardNo") + private String cardNo; + /** + * 卡类型(离线还是联网 0,离线,1联网) + */ + @JsonProperty("cardType") + private Integer cardType; + /** + * 卡分类 0表示平台,1表示运营商 + */ + @JsonProperty("cardClassification") + private Integer cardClassification; + /** + * 押金金额 + */ + @JsonProperty("cashPledge") + private Long cashPledge; + +} diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/domain/SearchCardResponse.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/domain/SearchCardResponse.java new file mode 100644 index 00000000..00ec01e3 --- /dev/null +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/domain/SearchCardResponse.java @@ -0,0 +1,52 @@ +package com.xhpc.card.domain; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * SearchCard接口的响应实体类 + * + * @author WH + * @date 2022/1/28 16:38 + * @since version-1.0 + */ +@NoArgsConstructor +@Data +public class SearchCardResponse { + + /** + * totalItems + */ + @JsonProperty("totalItems") + private Long totalItems; + /** + * data + */ + @JsonProperty("data") + private List data; + + /** + * DataDTO + */ + @NoArgsConstructor + @Data + public static class DataDTO { + + /** + * userAccount + */ + @JsonProperty("userAccount") + private String userAccount; + /** + * userType + * 0 C端用户 1 流量方用户 2社区用户 3B端用户) + */ + @JsonProperty("userType") + private Integer userType; + + } + +} diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/domain/SearchCardUserQueryCondition.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/domain/SearchCardUserQueryCondition.java new file mode 100644 index 00000000..0d49fb03 --- /dev/null +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/domain/SearchCardUserQueryCondition.java @@ -0,0 +1,58 @@ +package com.xhpc.card.domain; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +/** + * 查询卡用户条件实体类 + * + * @author WH + * @date 2022/1/28 16:18 + * @since version-1.0 + */ +@NoArgsConstructor +@Data +public class SearchCardUserQueryCondition { + + + /** + * userType + */ + @JsonProperty("userType") + @NotNull(message = "userType的参数名不正确或者userType的值为空,请检查传入参数") + private Integer userType; + /** + * cardClassification + */ + @JsonProperty("cardClassification") + @NotNull(message = "cardClassification的参数名不正确或者cardClassification的值为空,请检查传入参数") + private Integer cardClassification; + /** + * userAccount + */ + @JsonProperty("userAccount") + private String userAccount; + /** + * currentPage + */ + @JsonProperty("currentPage") + @Min(value = 1, message = "currentPage必须大于等于1") + @NotNull(message = "currentPage的参数名不正确或者currentPage的值为空,请检查传入参数") + private Long currentPage; + /** + * items + */ + @JsonProperty("items") + @Min(value = 1, message = "items必须大于等于1") + @NotNull(message = "items的参数名不正确或者items的值为空,请检查传入参数") + private Long items; + /** + * 授权运营商名称 + */ + private String grantOperatorName; + +} diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/TIccardDeviceMapper.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/TIccardDeviceMapper.java index b52f6dd1..7ffdfbcf 100644 --- a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/TIccardDeviceMapper.java +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/TIccardDeviceMapper.java @@ -1,6 +1,7 @@ package com.xhpc.card.mapper; import com.xhpc.card.pojo.TIccardDevice; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -49,4 +50,16 @@ public interface TIccardDeviceMapper { */ TIccardDevice selectDeletedStatusByDeviceId(Integer deviceId); + /** + * 分页查询所有记录 + * + * @param currentPage 当前页数 + * @param items 每页的条数 + * @return 返回一个装着所有记录的集合 + * @author WH + * @date 2022/1/25 17:07 + * @since version-1.0 + */ + List selectAllByPage(@Param("currentPage") Long currentPage, @Param("items") Long items); + } \ No newline at end of file diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcAppUserMapper.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcAppUserMapper.java new file mode 100644 index 00000000..e9a402bc --- /dev/null +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcAppUserMapper.java @@ -0,0 +1,40 @@ +package com.xhpc.card.mapper; + +import com.xhpc.card.domain.SearchCardUserQueryCondition; +import com.xhpc.card.pojo.XhpcAppUser; + +import java.util.List; + +public interface XhpcAppUserMapper { + + int deleteByPrimaryKey(Long appUserId); + + int insert(XhpcAppUser record); + + int insertSelective(XhpcAppUser record); + + XhpcAppUser selectByPrimaryKey(Long appUserId); + + int updateByPrimaryKeySelective(XhpcAppUser record); + + int updateByPrimaryKey(XhpcAppUser record); + + /** + * 查询记录总数 + * + * @author WH + * @date 2022/1/28 16:30 + * @since version-1.0 + */ + Long selectCount(SearchCardUserQueryCondition queryCondition); + + /** + * 根据条件查询记录 + * + * @author WH + * @date 2022/1/28 16:29 + * @since version-1.0 + */ + List selectByCondition(SearchCardUserQueryCondition queryCondition); + +} \ No newline at end of file diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcCommunityPersonnelMapper.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcCommunityPersonnelMapper.java new file mode 100644 index 00000000..b5c83286 --- /dev/null +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcCommunityPersonnelMapper.java @@ -0,0 +1,66 @@ +package com.xhpc.card.mapper; + +import com.xhpc.card.domain.SearchCardUserQueryCondition; +import com.xhpc.card.pojo.XhpcCommunityPersonnel; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface XhpcCommunityPersonnelMapper { + + int deleteByPrimaryKey(Long communityPersonnelId); + + int insert(XhpcCommunityPersonnel record); + + int insertSelective(XhpcCommunityPersonnel record); + + XhpcCommunityPersonnel selectByPrimaryKey(Long communityPersonnelId); + + int updateByPrimaryKeySelective(XhpcCommunityPersonnel record); + + int updateByPrimaryKey(XhpcCommunityPersonnel record); + + /** + * 查询所有记录 + * + * @author WH + * @date 2022/1/28 15:38 + * @since version-1.0 + */ + List selectAll(); + + /** + * 根据分页条件,查询该表记录 + * + * @author WH + * @date 2022/2/8 10:44 + * @since version-1.0 + */ + List selectByCondition(SearchCardUserQueryCondition queryCondition); + + /** + * 根据分页条件,查询出符合条件记录的总条数 + * + * @author WH + * @date 2022/2/8 10:51 + * @since version-1.0 + */ + Long selectCount(SearchCardUserQueryCondition queryCondition); + + /** + * 根据运营商id、分页条件、查询符合的记录 + * + * @param operatorId 运营商id + * @return 符合条件的所有记录 + */ + List selectByOperatorId(@Param("operatorId") Long operatorId, @Param("currentPage") Long currentPage, @Param("items") Long items); + + /** + * 根据运营商id、分页条件、查询符合的记录的个数 + * + * @param operatorId 运营商id + * @return 符合条件个数 + */ + Long selectCountByOperatorId(@Param("operatorId") Long operatorId); + +} \ No newline at end of file diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcCustomersPersonnelMapper.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcCustomersPersonnelMapper.java new file mode 100644 index 00000000..0512e295 --- /dev/null +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcCustomersPersonnelMapper.java @@ -0,0 +1,68 @@ +package com.xhpc.card.mapper; + +import com.xhpc.card.domain.SearchCardUserQueryCondition; +import com.xhpc.card.pojo.XhpcCustomersPersonnel; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface XhpcCustomersPersonnelMapper { + + int deleteByPrimaryKey(Long customersPersonnelId); + + int insert(XhpcCustomersPersonnel record); + + int insertSelective(XhpcCustomersPersonnel record); + + XhpcCustomersPersonnel selectByPrimaryKey(Long customersPersonnelId); + + int updateByPrimaryKeySelective(XhpcCustomersPersonnel record); + + int updateByPrimaryKey(XhpcCustomersPersonnel record); + + /** + * 查询所有记录 + * + * @author WH + * @date 2022/1/28 15:42 + * @since version-1.0 + */ + List selectAll(); + + /** + * 根据条件查询所有记录 + * + * @author WH + * @date 2022/2/8 14:39 + * @since version-1.0 + */ + List selectByCondition(SearchCardUserQueryCondition queryCondition); + + /** + * 根据条件查询所有记录个数 + * + * @author WH + * @date 2022/2/8 14:43 + * @since version-1.0 + */ + Long selectCount(SearchCardUserQueryCondition queryCondition); + + /** + * 根据运营商id、分页条件、查询对应的记录 + * + * @param operatorId 运营商id + * @param currentPage 当前页码 + * @param items 当前要显示的条数 + * @return 对应的记录 + */ + List selectByOperatorId(@Param("operatorId") Long operatorId, @Param("currentPage") Long currentPage, @Param("items") Long items); + + /** + * 根据运营商id,查询符合条件的总条数 + * + * @param operatorId + * @return + */ + Long selectCountByOperatorId(Long operatorId); + +} \ No newline at end of file diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcOperatorMapper.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcOperatorMapper.java index 8c2fb042..46475a7b 100644 --- a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcOperatorMapper.java +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/mapper/XhpcOperatorMapper.java @@ -16,4 +16,13 @@ public interface XhpcOperatorMapper { int updateByPrimaryKey(XhpcOperator record); + /** + * 根据运营商名称查询出对应的运营商实体类 + * + * @author WH + * @date 2022/2/8 15:15 + * @since version-1.0 + */ + XhpcOperator selectByName(String grantOperatorName); + } \ No newline at end of file diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/pojo/XhpcAppUser.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/pojo/XhpcAppUser.java new file mode 100644 index 00000000..c4888649 --- /dev/null +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/pojo/XhpcAppUser.java @@ -0,0 +1,118 @@ +package com.xhpc.card.pojo; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * xhpc_app_user + * + * @author + */ +@Data +public class XhpcAppUser implements Serializable { + + /** + * 用户ID + */ + private Long appUserId; + + /** + * 手机号码 + */ + private String phone; + + private String weixinOpenId; + + private String alipayOpenId; + + /** + * 微信是否登录(0未登录 1已登录) + */ + private Integer weixinLogin; + + /** + * 支付宝是否登录(0未登录 1已登录) + */ + private Integer alipayLogin; + + /** + * 头像地址 + */ + private String avatar; + + /** + * 余额 + */ + private BigDecimal balance; + + /** + * 密码(加密) + */ + private String password; + + /** + * 帐号状态 + */ + private Integer status; + + /** + * 是否有退款订单审核(0无 1有) + */ + private Integer isRefundApplication; + + /** + * 删除标志(0代表存在 2代表删除) + */ + private String delFlag; + + /** + * 创建者 + */ + private String createBy; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新者 + */ + private String updateBy; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 备注 + */ + private String remark; + + /** + * 用户设置的SOC + */ + private Integer soc; + + /** + * 是否退款 0 不退款 1 退款 + */ + private Integer isRefund; + + /** + * 租户id + */ + private String tenantId; + + /** + * 是否开启电池保护 0 未开启 1开启 + */ + private Integer socProtect; + + private static final long serialVersionUID = 1L; + +} \ No newline at end of file diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/pojo/XhpcCommunityPersonnel.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/pojo/XhpcCommunityPersonnel.java new file mode 100644 index 00000000..8c2c1107 --- /dev/null +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/pojo/XhpcCommunityPersonnel.java @@ -0,0 +1,142 @@ +package com.xhpc.card.pojo; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * xhpc_community_personnel + * + * @author + */ +@Data +public class XhpcCommunityPersonnel implements Serializable { + + private Long communityPersonnelId; + + private Long communityId; + + /** + * 社区人员名称 + */ + private String name; + + /** + * 社区人员账号 + */ + private String account; + + /** + * 充值金额 + */ + private BigDecimal rechargeMoney; + + /** + * 消费金额 + */ + private BigDecimal consumeMoney; + + /** + * 红包金额 + */ + private BigDecimal redPacket; + + /** + * 剩余金额 + */ + private BigDecimal surplusMoney; + + /** + * 绑定手机号 + */ + private String phone; + + /** + * 是否是负责(0 是 1不是) + */ + private Integer type; + + /** + * 状态(0 可用 1不可用) + */ + private Integer status; + + /** + * 删除标志(0代表存在 2代表删除) + */ + private Integer delFlag; + + /** + * 创建者 + */ + private String createBy; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新者 + */ + private String updateBy; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 备注 + */ + private String remark; + + /** + * 是否退款 0 不退款 1 退款 + */ + private Integer isRefund; + + /** + * 是否有退款订单审核(0无 1有) + */ + private Integer isRefundApplication; + + /** + * 用户设置的SOC + */ + private Integer soc; + + /** + * 头像地址 + */ + private String avatar; + + private String weixinOpenId; + + private String alipayOpenId; + + /** + * 微信是否登录(0未登录 1已登录) + */ + private Integer weixinLogin; + + /** + * 支付宝是否登录(0未登录 1已登录) + */ + private Integer alipayLogin; + + /** + * 租户id + */ + private String tenantId; + + /** + * 是否开启电池保护 0 未开启 1开启 + */ + private Integer socProtect; + + private static final long serialVersionUID = 1L; + +} \ No newline at end of file diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/pojo/XhpcCustomersPersonnel.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/pojo/XhpcCustomersPersonnel.java new file mode 100644 index 00000000..a89f4359 --- /dev/null +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/pojo/XhpcCustomersPersonnel.java @@ -0,0 +1,142 @@ +package com.xhpc.card.pojo; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * xhpc_customers_personnel + * + * @author + */ +@Data +public class XhpcCustomersPersonnel implements Serializable { + + private Long customersPersonnelId; + + private Long customersId; + + /** + * 大客户人员名称 + */ + private String name; + + /** + * 大客户人员账号 + */ + private String account; + + /** + * 充值金额 + */ + private BigDecimal rechargeMoney; + + /** + * 消费金额 + */ + private BigDecimal consumeMoney; + + /** + * 红包金额 + */ + private BigDecimal redPacket; + + /** + * 剩余金额 + */ + private BigDecimal surplusMoney; + + /** + * 绑定手机号 + */ + private String phone; + + /** + * 是否是负责(0 是 1不是) + */ + private Integer type; + + /** + * 状态(0 可用 1不可用) + */ + private Integer status; + + /** + * 删除标志(0代表存在 1代表删除) + */ + private Integer delFlag; + + /** + * 创建者 + */ + private String createBy; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新者 + */ + private String updateBy; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 备注 + */ + private String remark; + + /** + * 是否有退款订单审核(0无 1有) + */ + private Integer isRefundApplication; + + /** + * 用户设置的SOC + */ + private Integer soc; + + /** + * 头像地址 + */ + private String avatar; + + private String weixinOpenId; + + private String alipayOpenId; + + /** + * 微信是否登录(0未登录 1已登录) + */ + private Integer weixinLogin; + + /** + * 支付宝是否登录(0未登录 1已登录) + */ + private Integer alipayLogin; + + /** + * 是否退款 0 不退款 1 退款 + */ + private Integer isRefund; + + /** + * 租户id + */ + private String tenantId; + + /** + * 是否开启电池保护 0 未开启 1开启 + */ + private Integer socProtect; + + private static final long serialVersionUID = 1L; + +} \ No newline at end of file diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/service/IXhpcCardService.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/service/IXhpcCardService.java index da0ad5c6..91274a72 100644 --- a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/service/IXhpcCardService.java +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/service/IXhpcCardService.java @@ -1,8 +1,6 @@ package com.xhpc.card.service; -import com.xhpc.card.domain.CardList; -import com.xhpc.card.domain.ListOfAuthorizedDevices; -import com.xhpc.card.domain.QueryConditions; +import com.xhpc.card.domain.*; import com.xhpc.common.core.domain.R; /** @@ -23,12 +21,14 @@ public interface IXhpcCardService { /** * 查询卡授权设备列表 * + * @param currentPage 当前页码 + * @param items 当前显示条数 * @return 返回卡授权列表 * @author WH * @date 2022/1/25 16:18 * @since version-1.0 */ - R queryDeviceList(); + R queryDeviceList(Long currentPage, Long items); /** * 逻辑删除指定卡授权设备 @@ -52,4 +52,26 @@ public interface IXhpcCardService { */ R queryCardListBy(QueryConditions queryConditions); + /** + * 绑定卡回显信息 + * + * @param cardId 卡记录id + * @return 返回需要回显的卡数据 + * @author WH + * @date 2022/1/28 10:44 + * @since version-1.0 + */ + R bindCard(Long cardId); + + /** + * 平台、运营商选择用户时,查询指定类型下的所有用户数据 + * + * @param queryCondition 查询条件 + * @return 平台、运营商选择用户时,查询指定类型下的所有用户数据 + * @author WH + * @date 2022/1/28 15:31 + * @since version-1.0 + */ + R searchCardUser(SearchCardUserQueryCondition queryCondition); + } diff --git a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/service/impl/XhpcCardServiceImpl.java b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/service/impl/XhpcCardServiceImpl.java index e12720d2..1e044c3f 100644 --- a/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/service/impl/XhpcCardServiceImpl.java +++ b/xhpc-modules/xhpc-card/src/main/java/com/xhpc/card/service/impl/XhpcCardServiceImpl.java @@ -1,13 +1,8 @@ package com.xhpc.card.service.impl; -import com.xhpc.card.domain.CardList; -import com.xhpc.card.domain.ListOfAuthorizedDevices; -import com.xhpc.card.domain.QueryConditions; +import com.xhpc.card.domain.*; import com.xhpc.card.mapper.*; -import com.xhpc.card.pojo.TIccardDevice; -import com.xhpc.card.pojo.TIccardInfo; -import com.xhpc.card.pojo.TIccardUsers; -import com.xhpc.card.pojo.XhpcOperator; +import com.xhpc.card.pojo.*; import com.xhpc.card.service.IXhpcCardService; import com.xhpc.card.utils.MyPagingUtil; import com.xhpc.common.api.CardHistoryOrderService; @@ -19,7 +14,9 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import java.util.stream.Collectors; /** * @author yuyang @@ -41,6 +38,12 @@ public class XhpcCardServiceImpl implements IXhpcCardService { private TIccardInfoMapper tIccardInfoMapper; @Resource private XhpcOperatorMapper xhpcOperatorMapper; + @Resource + private XhpcAppUserMapper xhpcAppUserMapper; + @Resource + private XhpcCommunityPersonnelMapper xhpcCommunityPersonnelMapper; + @Resource + private XhpcCustomersPersonnelMapper xhpcCustomersPersonnelMapper; /** @@ -87,12 +90,13 @@ public class XhpcCardServiceImpl implements IXhpcCardService { } @Override - public R queryDeviceList() { - + public R queryDeviceList(Long currentPage, Long items) { + //计算分页索引 + currentPage = MyPagingUtil.calculateStartIndex(currentPage, items); ListOfAuthorizedDevices listOfAuthorizedDevices = new ListOfAuthorizedDevices(); listOfAuthorizedDevices.setData(new ArrayList<>()); listOfAuthorizedDevices.setTotalItems(0); - List tIccardDeviceList = tIccardDeviceMapper.selectAll(); + List tIccardDeviceList = tIccardDeviceMapper.selectAllByPage(currentPage, items); if (tIccardDeviceList.isEmpty()) { return R.ok(listOfAuthorizedDevices); } @@ -110,7 +114,8 @@ public class XhpcCardServiceImpl implements IXhpcCardService { dataDTO.setType(tIccardDevice.getType()); listOfAuthorizedDevices.getData().add(dataDTO); } - listOfAuthorizedDevices.setTotalItems(tIccardDeviceList.size()); + List tIccardDeviceList1 = tIccardDeviceMapper.selectAll(); + listOfAuthorizedDevices.setTotalItems(tIccardDeviceList1.size()); return R.ok(listOfAuthorizedDevices); } @@ -177,4 +182,121 @@ public class XhpcCardServiceImpl implements IXhpcCardService { return R.ok(cardList); } + @Override + public R bindCard(Long cardId) { + + BindCardEcho bindCardEcho = new BindCardEcho(); + TIccardInfo tIccardInfo = tIccardInfoMapper.selectByPrimaryKey(Math.toIntExact(cardId)); + bindCardEcho.setCardId(tIccardInfo.getCardid()); + bindCardEcho.setCardNo(tIccardInfo.getCardno()); + bindCardEcho.setCardType(tIccardInfo.getCardtype()); + //如果该卡不是联网卡 + if (tIccardInfo.getCardtype() == 0) { + return R.fail("该卡不是联网卡"); + } + bindCardEcho.setCardClassification(tIccardInfo.getIsPlatform()); + //如果该卡的分类是平台卡的话 + if (bindCardEcho.getCardClassification() == 0) { + //0 C端用户 2社区用户 3 B端用户 + int[] userTypeArray = {0, 2, 3}; + List userType = Arrays.stream(userTypeArray).boxed().collect(Collectors.toList()); + bindCardEcho.setUserType(userType); + + } else { + //如果是运营商的话 + //2社区用户 3 B端用户 + int[] userTypeArray = {2, 3}; + List userType = Arrays.stream(userTypeArray).boxed().collect(Collectors.toList()); + bindCardEcho.setUserType(userType); + } + return R.ok(bindCardEcho); + } + + @Override + public R searchCardUser(SearchCardUserQueryCondition queryCondition) { + //计算分页索引 + long startIndex = MyPagingUtil.calculateStartIndex(queryCondition.getCurrentPage(), queryCondition.getItems()); + queryCondition.setCurrentPage(startIndex); + SearchCardResponse searchCardResponse = new SearchCardResponse(); + searchCardResponse.setData(new ArrayList<>()); + searchCardResponse.setTotalItems(0L); + //判断是平台还是运营商 + if (queryCondition.getCardClassification() == 0) { + //(0 C端用户 2社区用户 3 B端用户) + switch (queryCondition.getUserType()) { + case 0: + List appUserList = xhpcAppUserMapper.selectByCondition(queryCondition); + Long allCount = xhpcAppUserMapper.selectCount(queryCondition); + searchCardResponse.setTotalItems(allCount); + for (XhpcAppUser xhpcAppUser : appUserList) { + SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO(); + dataDTO.setUserAccount(xhpcAppUser.getPhone()); + dataDTO.setUserType(0); + searchCardResponse.getData().add(dataDTO); + } + break; + case 2: + List xhpcCommunityPersonnelList = xhpcCommunityPersonnelMapper.selectByCondition(queryCondition); + Long allCount1 = xhpcCommunityPersonnelMapper.selectCount(queryCondition); + searchCardResponse.setTotalItems(allCount1); + for (XhpcCommunityPersonnel xhpcCommunityPersonnel : xhpcCommunityPersonnelList) { + SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO(); + dataDTO.setUserAccount(xhpcCommunityPersonnel.getAccount()); + dataDTO.setUserType(2); + searchCardResponse.getData().add(dataDTO); + } + break; + case 3: + List xhpcCustomersPersonnelList = xhpcCustomersPersonnelMapper.selectByCondition(queryCondition); + Long allCount2 = xhpcCustomersPersonnelMapper.selectCount(queryCondition); + searchCardResponse.setTotalItems(allCount2); + for (XhpcCustomersPersonnel xhpcCustomersPersonnel : xhpcCustomersPersonnelList) { + SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO(); + dataDTO.setUserAccount(xhpcCustomersPersonnel.getAccount()); + dataDTO.setUserType(3); + searchCardResponse.getData().add(dataDTO); + } + break; + default: + break; + } + return R.ok(searchCardResponse); + } else if (queryCondition.getCardClassification() == 1) { + XhpcOperator operator = xhpcOperatorMapper.selectByName(queryCondition.getGrantOperatorName()); + if (operator == null) { + return R.fail("没有此运营商,或未填入授权运营商参数"); + } + Long operatorId = operator.getOperatorId(); + //2社区用户 3 B端用户) + switch (queryCondition.getUserType()) { + case 2: + List xhpcCommunityPersonnelList = xhpcCommunityPersonnelMapper.selectByOperatorId(operatorId, queryCondition.getCurrentPage(), queryCondition.getItems()); + Long allCount1 = xhpcCommunityPersonnelMapper.selectCountByOperatorId(operatorId); + searchCardResponse.setTotalItems(allCount1); + for (XhpcCommunityPersonnel xhpcCommunityPersonnel : xhpcCommunityPersonnelList) { + SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO(); + dataDTO.setUserAccount(xhpcCommunityPersonnel.getAccount()); + dataDTO.setUserType(2); + searchCardResponse.getData().add(dataDTO); + } + break; + case 3: + List xhpcCustomersPersonnelList = xhpcCustomersPersonnelMapper.selectByOperatorId(operatorId, queryCondition.getCurrentPage(), queryCondition.getItems()); + Long allCount2 = xhpcCustomersPersonnelMapper.selectCountByOperatorId(operatorId); + searchCardResponse.setTotalItems(allCount2); + for (XhpcCustomersPersonnel xhpcCustomersPersonnel : xhpcCustomersPersonnelList) { + SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO(); + dataDTO.setUserAccount(xhpcCustomersPersonnel.getAccount()); + dataDTO.setUserType(3); + searchCardResponse.getData().add(dataDTO); + } + break; + default: + break; + } + return R.ok(searchCardResponse); + } + return R.fail("没有此卡类型"); + } + } diff --git a/xhpc-modules/xhpc-card/src/main/resources/mapper/TIccardDeviceMapper.xml b/xhpc-modules/xhpc-card/src/main/resources/mapper/TIccardDeviceMapper.xml index 414f0700..06f7d0dd 100644 --- a/xhpc-modules/xhpc-card/src/main/resources/mapper/TIccardDeviceMapper.xml +++ b/xhpc-modules/xhpc-card/src/main/resources/mapper/TIccardDeviceMapper.xml @@ -34,6 +34,13 @@ from t_iccard_device where del_flag = 1 and id = #{deviceId} + delete from t_iccard_device diff --git a/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcAppUserMapper.xml b/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcAppUserMapper.xml new file mode 100644 index 00000000..c66ac2ab --- /dev/null +++ b/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcAppUserMapper.xml @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + app_user_id + , phone, weixin_open_id, alipay_open_id, weixin_login, alipay_login, avatar, + balance, `password`, `status`, is_refund_application, del_flag, create_by, create_time, + update_by, update_time, remark, soc, is_refund, tenant_id, soc_protect + + + + + + delete + from xhpc_app_user + where app_user_id = #{appUserId,jdbcType=BIGINT} + + + insert into xhpc_app_user (phone, weixin_open_id, alipay_open_id, + weixin_login, alipay_login, avatar, + balance, `password`, `status`, + is_refund_application, del_flag, create_by, + create_time, update_by, update_time, + remark, soc, is_refund, + tenant_id, soc_protect) + values (#{phone,jdbcType=VARCHAR}, #{weixinOpenId,jdbcType=VARCHAR}, #{alipayOpenId,jdbcType=VARCHAR}, + #{weixinLogin,jdbcType=INTEGER}, #{alipayLogin,jdbcType=INTEGER}, #{avatar,jdbcType=VARCHAR}, + #{balance,jdbcType=DECIMAL}, #{password,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, + #{isRefundApplication,jdbcType=INTEGER}, #{delFlag,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{remark,jdbcType=VARCHAR}, #{soc,jdbcType=INTEGER}, #{isRefund,jdbcType=INTEGER}, + #{tenantId,jdbcType=VARCHAR}, #{socProtect,jdbcType=INTEGER}) + + + insert into xhpc_app_user + + + phone, + + + weixin_open_id, + + + alipay_open_id, + + + weixin_login, + + + alipay_login, + + + avatar, + + + balance, + + + `password`, + + + `status`, + + + is_refund_application, + + + del_flag, + + + create_by, + + + create_time, + + + update_by, + + + update_time, + + + remark, + + + soc, + + + is_refund, + + + tenant_id, + + + soc_protect, + + + + + #{phone,jdbcType=VARCHAR}, + + + #{weixinOpenId,jdbcType=VARCHAR}, + + + #{alipayOpenId,jdbcType=VARCHAR}, + + + #{weixinLogin,jdbcType=INTEGER}, + + + #{alipayLogin,jdbcType=INTEGER}, + + + #{avatar,jdbcType=VARCHAR}, + + + #{balance,jdbcType=DECIMAL}, + + + #{password,jdbcType=VARCHAR}, + + + #{status,jdbcType=INTEGER}, + + + #{isRefundApplication,jdbcType=INTEGER}, + + + #{delFlag,jdbcType=CHAR}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{remark,jdbcType=VARCHAR}, + + + #{soc,jdbcType=INTEGER}, + + + #{isRefund,jdbcType=INTEGER}, + + + #{tenantId,jdbcType=VARCHAR}, + + + #{socProtect,jdbcType=INTEGER}, + + + + + update xhpc_app_user + + + phone = #{phone,jdbcType=VARCHAR}, + + + weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR}, + + + alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR}, + + + weixin_login = #{weixinLogin,jdbcType=INTEGER}, + + + alipay_login = #{alipayLogin,jdbcType=INTEGER}, + + + avatar = #{avatar,jdbcType=VARCHAR}, + + + balance = #{balance,jdbcType=DECIMAL}, + + + `password` = #{password,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=INTEGER}, + + + is_refund_application = #{isRefundApplication,jdbcType=INTEGER}, + + + del_flag = #{delFlag,jdbcType=CHAR}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + soc = #{soc,jdbcType=INTEGER}, + + + is_refund = #{isRefund,jdbcType=INTEGER}, + + + tenant_id = #{tenantId,jdbcType=VARCHAR}, + + + soc_protect = #{socProtect,jdbcType=INTEGER}, + + + where app_user_id = #{appUserId,jdbcType=BIGINT} + + + update xhpc_app_user + set phone = #{phone,jdbcType=VARCHAR}, + weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR}, + alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR}, + weixin_login = #{weixinLogin,jdbcType=INTEGER}, + alipay_login = #{alipayLogin,jdbcType=INTEGER}, + avatar = #{avatar,jdbcType=VARCHAR}, + balance = #{balance,jdbcType=DECIMAL}, + `password` = #{password,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=INTEGER}, + is_refund_application = #{isRefundApplication,jdbcType=INTEGER}, + del_flag = #{delFlag,jdbcType=CHAR}, + create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + remark = #{remark,jdbcType=VARCHAR}, + soc = #{soc,jdbcType=INTEGER}, + is_refund = #{isRefund,jdbcType=INTEGER}, + tenant_id = #{tenantId,jdbcType=VARCHAR}, + soc_protect = #{socProtect,jdbcType=INTEGER} + where app_user_id = #{appUserId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcCommunityPersonnelMapper.xml b/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcCommunityPersonnelMapper.xml new file mode 100644 index 00000000..f8c3b61c --- /dev/null +++ b/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcCommunityPersonnelMapper.xml @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + community_personnel_id + , community_id, `name`, account, recharge_money, consume_money, + red_packet, surplus_money, phone, `type`, `status`, del_flag, create_by, create_time, + update_by, update_time, remark, is_refund, is_refund_application, soc, avatar, weixin_open_id, + alipay_open_id, weixin_login, alipay_login, tenant_id, soc_protect + + + + + + + + + delete + from xhpc_community_personnel + where community_personnel_id = #{communityPersonnelId,jdbcType=BIGINT} + + + insert into xhpc_community_personnel (community_id, `name`, account, + recharge_money, consume_money, red_packet, + surplus_money, phone, `type`, + `status`, del_flag, create_by, + create_time, update_by, update_time, + remark, is_refund, is_refund_application, + soc, avatar, weixin_open_id, + alipay_open_id, weixin_login, alipay_login, + tenant_id, soc_protect) + values (#{communityId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{account,jdbcType=VARCHAR}, + #{rechargeMoney,jdbcType=DECIMAL}, #{consumeMoney,jdbcType=DECIMAL}, #{redPacket,jdbcType=DECIMAL}, + #{surplusMoney,jdbcType=DECIMAL}, #{phone,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, + #{status,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{remark,jdbcType=VARCHAR}, #{isRefund,jdbcType=INTEGER}, #{isRefundApplication,jdbcType=INTEGER}, + #{soc,jdbcType=INTEGER}, #{avatar,jdbcType=VARCHAR}, #{weixinOpenId,jdbcType=VARCHAR}, + #{alipayOpenId,jdbcType=VARCHAR}, #{weixinLogin,jdbcType=INTEGER}, #{alipayLogin,jdbcType=INTEGER}, + #{tenantId,jdbcType=VARCHAR}, #{socProtect,jdbcType=INTEGER}) + + + insert into xhpc_community_personnel + + + community_id, + + + `name`, + + + account, + + + recharge_money, + + + consume_money, + + + red_packet, + + + surplus_money, + + + phone, + + + `type`, + + + `status`, + + + del_flag, + + + create_by, + + + create_time, + + + update_by, + + + update_time, + + + remark, + + + is_refund, + + + is_refund_application, + + + soc, + + + avatar, + + + weixin_open_id, + + + alipay_open_id, + + + weixin_login, + + + alipay_login, + + + tenant_id, + + + soc_protect, + + + + + #{communityId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{account,jdbcType=VARCHAR}, + + + #{rechargeMoney,jdbcType=DECIMAL}, + + + #{consumeMoney,jdbcType=DECIMAL}, + + + #{redPacket,jdbcType=DECIMAL}, + + + #{surplusMoney,jdbcType=DECIMAL}, + + + #{phone,jdbcType=VARCHAR}, + + + #{type,jdbcType=INTEGER}, + + + #{status,jdbcType=INTEGER}, + + + #{delFlag,jdbcType=INTEGER}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{remark,jdbcType=VARCHAR}, + + + #{isRefund,jdbcType=INTEGER}, + + + #{isRefundApplication,jdbcType=INTEGER}, + + + #{soc,jdbcType=INTEGER}, + + + #{avatar,jdbcType=VARCHAR}, + + + #{weixinOpenId,jdbcType=VARCHAR}, + + + #{alipayOpenId,jdbcType=VARCHAR}, + + + #{weixinLogin,jdbcType=INTEGER}, + + + #{alipayLogin,jdbcType=INTEGER}, + + + #{tenantId,jdbcType=VARCHAR}, + + + #{socProtect,jdbcType=INTEGER}, + + + + + update xhpc_community_personnel + + + community_id = #{communityId,jdbcType=BIGINT}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + account = #{account,jdbcType=VARCHAR}, + + + recharge_money = #{rechargeMoney,jdbcType=DECIMAL}, + + + consume_money = #{consumeMoney,jdbcType=DECIMAL}, + + + red_packet = #{redPacket,jdbcType=DECIMAL}, + + + surplus_money = #{surplusMoney,jdbcType=DECIMAL}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + `type` = #{type,jdbcType=INTEGER}, + + + `status` = #{status,jdbcType=INTEGER}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + is_refund = #{isRefund,jdbcType=INTEGER}, + + + is_refund_application = #{isRefundApplication,jdbcType=INTEGER}, + + + soc = #{soc,jdbcType=INTEGER}, + + + avatar = #{avatar,jdbcType=VARCHAR}, + + + weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR}, + + + alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR}, + + + weixin_login = #{weixinLogin,jdbcType=INTEGER}, + + + alipay_login = #{alipayLogin,jdbcType=INTEGER}, + + + tenant_id = #{tenantId,jdbcType=VARCHAR}, + + + soc_protect = #{socProtect,jdbcType=INTEGER}, + + + where community_personnel_id = #{communityPersonnelId,jdbcType=BIGINT} + + + update xhpc_community_personnel + set community_id = #{communityId,jdbcType=BIGINT}, + `name` = #{name,jdbcType=VARCHAR}, + account = #{account,jdbcType=VARCHAR}, + recharge_money = #{rechargeMoney,jdbcType=DECIMAL}, + consume_money = #{consumeMoney,jdbcType=DECIMAL}, + red_packet = #{redPacket,jdbcType=DECIMAL}, + surplus_money = #{surplusMoney,jdbcType=DECIMAL}, + phone = #{phone,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=INTEGER}, + `status` = #{status,jdbcType=INTEGER}, + del_flag = #{delFlag,jdbcType=INTEGER}, + create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + remark = #{remark,jdbcType=VARCHAR}, + is_refund = #{isRefund,jdbcType=INTEGER}, + is_refund_application = #{isRefundApplication,jdbcType=INTEGER}, + soc = #{soc,jdbcType=INTEGER}, + avatar = #{avatar,jdbcType=VARCHAR}, + weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR}, + alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR}, + weixin_login = #{weixinLogin,jdbcType=INTEGER}, + alipay_login = #{alipayLogin,jdbcType=INTEGER}, + tenant_id = #{tenantId,jdbcType=VARCHAR}, + soc_protect = #{socProtect,jdbcType=INTEGER} + where community_personnel_id = #{communityPersonnelId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcCustomersPersonnelMapper.xml b/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcCustomersPersonnelMapper.xml new file mode 100644 index 00000000..df0c87de --- /dev/null +++ b/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcCustomersPersonnelMapper.xml @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + customers_personnel_id + , customers_id, `name`, account, recharge_money, consume_money, + red_packet, surplus_money, phone, `type`, `status`, del_flag, create_by, create_time, + update_by, update_time, remark, is_refund_application, soc, avatar, weixin_open_id, + alipay_open_id, weixin_login, alipay_login, is_refund, tenant_id, soc_protect + + + + + + + + + delete + from xhpc_customers_personnel + where customers_personnel_id = #{customersPersonnelId,jdbcType=BIGINT} + + + insert into xhpc_customers_personnel (customers_id, `name`, account, + recharge_money, consume_money, red_packet, + surplus_money, phone, `type`, + `status`, del_flag, create_by, + create_time, update_by, update_time, + remark, is_refund_application, soc, + avatar, weixin_open_id, alipay_open_id, + weixin_login, alipay_login, is_refund, + tenant_id, soc_protect) + values (#{customersId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{account,jdbcType=VARCHAR}, + #{rechargeMoney,jdbcType=DECIMAL}, #{consumeMoney,jdbcType=DECIMAL}, #{redPacket,jdbcType=DECIMAL}, + #{surplusMoney,jdbcType=DECIMAL}, #{phone,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, + #{status,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{remark,jdbcType=VARCHAR}, #{isRefundApplication,jdbcType=INTEGER}, #{soc,jdbcType=INTEGER}, + #{avatar,jdbcType=VARCHAR}, #{weixinOpenId,jdbcType=VARCHAR}, #{alipayOpenId,jdbcType=VARCHAR}, + #{weixinLogin,jdbcType=INTEGER}, #{alipayLogin,jdbcType=INTEGER}, #{isRefund,jdbcType=INTEGER}, + #{tenantId,jdbcType=VARCHAR}, #{socProtect,jdbcType=INTEGER}) + + + insert into xhpc_customers_personnel + + + customers_id, + + + `name`, + + + account, + + + recharge_money, + + + consume_money, + + + red_packet, + + + surplus_money, + + + phone, + + + `type`, + + + `status`, + + + del_flag, + + + create_by, + + + create_time, + + + update_by, + + + update_time, + + + remark, + + + is_refund_application, + + + soc, + + + avatar, + + + weixin_open_id, + + + alipay_open_id, + + + weixin_login, + + + alipay_login, + + + is_refund, + + + tenant_id, + + + soc_protect, + + + + + #{customersId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{account,jdbcType=VARCHAR}, + + + #{rechargeMoney,jdbcType=DECIMAL}, + + + #{consumeMoney,jdbcType=DECIMAL}, + + + #{redPacket,jdbcType=DECIMAL}, + + + #{surplusMoney,jdbcType=DECIMAL}, + + + #{phone,jdbcType=VARCHAR}, + + + #{type,jdbcType=INTEGER}, + + + #{status,jdbcType=INTEGER}, + + + #{delFlag,jdbcType=INTEGER}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{remark,jdbcType=VARCHAR}, + + + #{isRefundApplication,jdbcType=INTEGER}, + + + #{soc,jdbcType=INTEGER}, + + + #{avatar,jdbcType=VARCHAR}, + + + #{weixinOpenId,jdbcType=VARCHAR}, + + + #{alipayOpenId,jdbcType=VARCHAR}, + + + #{weixinLogin,jdbcType=INTEGER}, + + + #{alipayLogin,jdbcType=INTEGER}, + + + #{isRefund,jdbcType=INTEGER}, + + + #{tenantId,jdbcType=VARCHAR}, + + + #{socProtect,jdbcType=INTEGER}, + + + + + update xhpc_customers_personnel + + + customers_id = #{customersId,jdbcType=BIGINT}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + account = #{account,jdbcType=VARCHAR}, + + + recharge_money = #{rechargeMoney,jdbcType=DECIMAL}, + + + consume_money = #{consumeMoney,jdbcType=DECIMAL}, + + + red_packet = #{redPacket,jdbcType=DECIMAL}, + + + surplus_money = #{surplusMoney,jdbcType=DECIMAL}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + `type` = #{type,jdbcType=INTEGER}, + + + `status` = #{status,jdbcType=INTEGER}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + is_refund_application = #{isRefundApplication,jdbcType=INTEGER}, + + + soc = #{soc,jdbcType=INTEGER}, + + + avatar = #{avatar,jdbcType=VARCHAR}, + + + weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR}, + + + alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR}, + + + weixin_login = #{weixinLogin,jdbcType=INTEGER}, + + + alipay_login = #{alipayLogin,jdbcType=INTEGER}, + + + is_refund = #{isRefund,jdbcType=INTEGER}, + + + tenant_id = #{tenantId,jdbcType=VARCHAR}, + + + soc_protect = #{socProtect,jdbcType=INTEGER}, + + + where customers_personnel_id = #{customersPersonnelId,jdbcType=BIGINT} + + + update xhpc_customers_personnel + set customers_id = #{customersId,jdbcType=BIGINT}, + `name` = #{name,jdbcType=VARCHAR}, + account = #{account,jdbcType=VARCHAR}, + recharge_money = #{rechargeMoney,jdbcType=DECIMAL}, + consume_money = #{consumeMoney,jdbcType=DECIMAL}, + red_packet = #{redPacket,jdbcType=DECIMAL}, + surplus_money = #{surplusMoney,jdbcType=DECIMAL}, + phone = #{phone,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=INTEGER}, + `status` = #{status,jdbcType=INTEGER}, + del_flag = #{delFlag,jdbcType=INTEGER}, + create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + remark = #{remark,jdbcType=VARCHAR}, + is_refund_application = #{isRefundApplication,jdbcType=INTEGER}, + soc = #{soc,jdbcType=INTEGER}, + avatar = #{avatar,jdbcType=VARCHAR}, + weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR}, + alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR}, + weixin_login = #{weixinLogin,jdbcType=INTEGER}, + alipay_login = #{alipayLogin,jdbcType=INTEGER}, + is_refund = #{isRefund,jdbcType=INTEGER}, + tenant_id = #{tenantId,jdbcType=VARCHAR}, + soc_protect = #{socProtect,jdbcType=INTEGER} + where customers_personnel_id = #{customersPersonnelId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcOperatorMapper.xml b/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcOperatorMapper.xml index a693ad7a..46095e5d 100644 --- a/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcOperatorMapper.xml +++ b/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcOperatorMapper.xml @@ -1,5 +1,6 @@ + @@ -47,6 +48,12 @@ from xhpc_operator where operator_id = #{operatorId,jdbcType=BIGINT} + delete from xhpc_operator