huwhois преди 5 години
родител
ревизия
accfcfb2a6

+ 23 - 1
src/main/java/io/renren/modules/admin/controller/AttendersController.java

26

26

27
import io.renren.modules.admin.entity.AttendersEntity;
27
import io.renren.modules.admin.entity.AttendersEntity;
28
import io.renren.modules.admin.entity.ExcelEntity;
28
import io.renren.modules.admin.entity.ExcelEntity;
29
import io.renren.modules.admin.entity.MemberEntity;
29
import io.renren.modules.admin.service.AttendersService;
30
import io.renren.modules.admin.service.AttendersService;
31
import io.renren.modules.admin.service.MemberService;
30
import io.renren.common.utils.ExcelUtils;
32
import io.renren.common.utils.ExcelUtils;
31
import io.renren.common.utils.PageUtils;
33
import io.renren.common.utils.PageUtils;
32
import io.renren.common.utils.R;
34
import io.renren.common.utils.R;
44
public class AttendersController extends AbstractController  {
46
public class AttendersController extends AbstractController  {
45
    @Autowired
47
    @Autowired
46
    private AttendersService attendersService;
48
    private AttendersService attendersService;
47

49
    @Autowired
50
    private MemberService memberService;
48
    /**
51
    /**
49
     * 列表
52
     * 列表
50
     */
53
     */
76
    @RequestMapping("/save")
79
    @RequestMapping("/save")
77
    @RequiresPermissions("admin:attenders:save")
80
    @RequiresPermissions("admin:attenders:save")
78
    public R save(@RequestBody AttendersEntity attenders) {
81
    public R save(@RequestBody AttendersEntity attenders) {
82
        if (attenders.getMemberId() == null || attenders.getMemberId()==0) {
83
            MemberEntity member = memberService.getByUserName(attenders.getPhone());
84
            System.out.println(member);
85
            if (member == null || member.getId() == null || member.getId() == 0) {
86
                member = new MemberEntity();
87
                member.setUsername(attenders.getPhone());
88
                member.setPassword("123456");         // 默认密码
89
                member.setTruename(attenders.getName());
90
                member.setOrganization(attenders.getOrganization());
91
                member.setPosition(attenders.getPosition());
92
                member.setJobTitle(attenders.getJobTitle());
93
                member.setPhone(attenders.getPhone());
94
                member.setEmail(attenders.getEmail());
95
                member.setIsCheck(1);
96
                member.setCreateId(getUserId());
97
                memberService.saveMember(member);
98
            }
99
            attenders.setMemberId(member.getId());
100
        }
79
        attenders.setCreateTime(new Date());
101
        attenders.setCreateTime(new Date());
80
        attenders.setCreater(getUserId());
102
        attenders.setCreater(getUserId());
81
        attendersService.save(attenders);
103
        attendersService.save(attenders);

+ 1 - 0
src/main/java/io/renren/modules/admin/controller/SignInfoController.java

176
        payment.setMeetingId(signInfo.getMeetingId());
176
        payment.setMeetingId(signInfo.getMeetingId());
177
        payment.setAttendersId(attenders.getId());
177
        payment.setAttendersId(attenders.getId());
178
        payment.setIsPay(signInfo.getIsPay());
178
        payment.setIsPay(signInfo.getIsPay());
179
        payment.setMoney(signInfo.getMoney());
179
        paymentService.savePayment(payment);
180
        paymentService.savePayment(payment);
180
181
181
        SignEntity sign = new SignEntity();
182
        SignEntity sign = new SignEntity();

+ 5 - 0
src/main/java/io/renren/modules/admin/entity/SignInfoEntity.java

4
import com.baomidou.mybatisplus.annotation.TableName;
4
import com.baomidou.mybatisplus.annotation.TableName;
5
5
6
import java.io.Serializable;
6
import java.io.Serializable;
7
import java.math.BigDecimal;
7
import java.util.Date;
8
import java.util.Date;
8
import lombok.Data;
9
import lombok.Data;
9
10
76
	 * 缴费情况
77
	 * 缴费情况
77
	 */
78
	 */
78
	private Integer isPay;
79
	private Integer isPay;
80
	/**
81
	 * 缴费情况
82
	 */
83
	private BigDecimal money;
79
	/**
84
	/**
80
	 * 签到状态
85
	 * 签到状态
81
	 */
86
	 */

+ 9 - 0
src/main/java/io/renren/modules/admin/service/MemberService.java

2
2
3
import java.util.Map;
3
import java.util.Map;
4
4
5
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5
import com.baomidou.mybatisplus.extension.service.IService;
6
import com.baomidou.mybatisplus.extension.service.IService;
6
7
7
import io.renren.common.utils.PageUtils;
8
import io.renren.common.utils.PageUtils;
9
import io.renren.modules.admin.entity.AttendersEntity;
8
import io.renren.modules.admin.entity.MemberEntity;
10
import io.renren.modules.admin.entity.MemberEntity;
9
11
10
/**
12
/**
34
	 * @param isCheck
36
	 * @param isCheck
35
	 */
37
	 */
36
    int updateStatus(Long id, Integer isCheck);
38
    int updateStatus(Long id, Integer isCheck);
39
40
	/**
41
	 * 根据用户名获取用户信息
42
	 * @param username
43
	 * @return
44
	 */
45
	MemberEntity getByUserName(String username);
37
}
46
}
38
47

+ 5 - 0
src/main/java/io/renren/modules/admin/service/impl/MemberServiceImpl.java

120
        return itemp;
120
        return itemp;
121
        // @Update("update member set is_check=#{is_check}  where id = #{id}")
121
        // @Update("update member set is_check=#{is_check}  where id = #{id}")
122
    }
122
    }
123
124
    @Override
125
    public MemberEntity getByUserName(String username) {
126
        return this.getOne(new QueryWrapper<MemberEntity>().eq("username", username));
127
    }
123
}
128
}