FrontVxServiceImpl.java
3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
package com.lhcredit.project.business.frontVx.service;
import java.util.List;
import java.util.ArrayList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lhcredit.project.business.frontVx.mapper.FrontVxMapper;
import com.lhcredit.project.business.frontVx.domain.FrontVx;
import com.lhcredit.common.utils.text.Convert;
/**
* 微信用户注册 服务层实现
*
* @author lhcredit
* @date 2025-09-28
*/
@Service
public class FrontVxServiceImpl implements IFrontVxService {
@Autowired
private FrontVxMapper frontVxMapper;
/**
* 查询微信用户注册信息
*
* @param id 微信用户注册ID
* @return 微信用户注册信息
*/
@Override
public FrontVx selectFrontVxById(Integer id) {
return frontVxMapper.selectFrontVxById(id);
}
/**
* 查询微信用户注册列表
*
* @param frontVx 微信用户注册信息
* @return 微信用户注册集合
*/
@Override
public List<FrontVx> selectFrontVxList(FrontVx frontVx) {
return frontVxMapper.selectFrontVxList(frontVx);
}
/**
* 字段转换
* @param frontVx 微信用户注册信息
* @return 微信用户注册信息
*/
@Override
public FrontVx changeModel(FrontVx frontVx) {
// //这里写各字段转换逻辑
// if(frontVx!=null){
// if(StringUtils.isNotEmpty(frontVx.getXXX())){
// frontVx.setXXX(frontVx.getXXX());
// }
// }
return frontVx;
}
/**
* 列表转换
*
* @param frontVxList 微信用户注册集合
* @return 微信用户注册集合
*/
@Override
public List<FrontVx> changeModel(List<FrontVx> frontVxList) {
List<FrontVx> result = new ArrayList<FrontVx>();
if (frontVxList.size() > 0) {
for (FrontVx frontVx:frontVxList){
result.add(changeModel(frontVx));
}
}
return result;
}
/**
* 新增微信用户注册
*
* @param frontVx 微信用户注册信息
* @return 结果
*/
@Override
public int insertFrontVx(FrontVx frontVx) {
FrontVx frontVx1 = new FrontVx();
frontVx1.setOpenId(frontVx.getOpenId());
List<FrontVx> frontVxes = frontVxMapper.selectFrontVxList(frontVx1);
if (!frontVxes.isEmpty()) {
return 0;
}
frontVx.setVxStatus("0");
return frontVxMapper.insertFrontVx(frontVx);
}
/**
* 修改微信用户注册
*
* @param frontVx 微信用户注册信息
* @return 结果
*/
@Override
public int updateFrontVx(FrontVx frontVx) {
return frontVxMapper.updateFrontVx(frontVx);
}
/**
* 删除微信用户注册对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteFrontVxByIds(String ids) {
return frontVxMapper.deleteFrontVxByIds(Convert.toStrArray(ids));
}
}