6 years ago
parent
commit
3b33624858
  1. 9
      game/src/main/java/com/ccsens/game/api/ScreenController.java
  2. 32
      game/src/main/java/com/ccsens/game/bean/dto/ScreenDto.java
  3. 260
      game/src/main/java/com/ccsens/game/bean/po/GameMember.java
  4. 1631
      game/src/main/java/com/ccsens/game/bean/po/GameMemberExample.java
  5. 12
      game/src/main/java/com/ccsens/game/bean/po/GameRecord.java
  6. 48
      game/src/main/java/com/ccsens/game/bean/po/GameRecordExample.java
  7. 12
      game/src/main/java/com/ccsens/game/bean/po/GameScoreLog.java
  8. 48
      game/src/main/java/com/ccsens/game/bean/po/GameScoreLogExample.java
  9. 14
      game/src/main/java/com/ccsens/game/bean/po/GameUserJoin.java
  10. 52
      game/src/main/java/com/ccsens/game/bean/po/GameUserJoinExample.java
  11. 14
      game/src/main/java/com/ccsens/game/bean/po/GameUserPay.java
  12. 52
      game/src/main/java/com/ccsens/game/bean/po/GameUserPayExample.java
  13. 2
      game/src/main/java/com/ccsens/game/persist/dao/GameActivityRuleDao.java
  14. 8
      game/src/main/java/com/ccsens/game/persist/dao/GameMemberDao.java
  15. 8
      game/src/main/java/com/ccsens/game/persist/dao/GameMemberJoinDao.java
  16. 2
      game/src/main/java/com/ccsens/game/persist/dao/GameRecordDao.java
  17. 2
      game/src/main/java/com/ccsens/game/persist/dao/GameTypeDao.java
  18. 9
      game/src/main/java/com/ccsens/game/persist/dao/GameTypeMemberDao.java
  19. 8
      game/src/main/java/com/ccsens/game/persist/dao/GameUserJoinDao.java
  20. 9
      game/src/main/java/com/ccsens/game/persist/dao/GameUserPayDao.java
  21. 30
      game/src/main/java/com/ccsens/game/persist/mapper/GameMemberJoinMapper.java
  22. 30
      game/src/main/java/com/ccsens/game/persist/mapper/GameMemberMapper.java
  23. 30
      game/src/main/java/com/ccsens/game/persist/mapper/GameTypeMemberMapper.java
  24. 30
      game/src/main/java/com/ccsens/game/persist/mapper/GameUserJoinMapper.java
  25. 30
      game/src/main/java/com/ccsens/game/persist/mapper/GameUserPayMapper.java
  26. 3
      game/src/main/java/com/ccsens/game/service/IScreenService.java
  27. 124
      game/src/main/java/com/ccsens/game/service/ScreenService.java
  28. 480
      game/src/main/resources/mapper_raw/GameMemberMapper.xml
  29. 28
      game/src/main/resources/mapper_raw/GameRecordMapper.xml
  30. 28
      game/src/main/resources/mapper_raw/GameScoreLogMapper.xml
  31. 66
      game/src/main/resources/mapper_raw/GameUserJoinMapper.xml
  32. 66
      game/src/main/resources/mapper_raw/GameUserPayMapper.xml
  33. 15
      game/src/main/resources/mbg.xml

9
game/src/main/java/com/ccsens/game/api/ScreenController.java

@ -1,9 +1,11 @@
package com.ccsens.game.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.game.bean.dto.ScreenDto;
import com.ccsens.game.bean.vo.ScreenVo;
import com.ccsens.game.service.IScreenService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -23,14 +25,15 @@ public class ScreenController {
@Autowired
private IScreenService screenService;
@MustLogin
@ApiOperation(value = "获取大屏路径", notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "url", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<ScreenVo.UrlVo> getScreenUrl(HttpServletRequest request,
@ApiParam @Validated @RequestBody ScreenDto.MemberGame memberGame) throws Exception {
log.info("获取大屏路径:{}",memberGame);
ScreenVo.UrlVo urlVo = screenService.getScreenUrl(memberGame);
@ApiParam @Validated @RequestBody QueryDto<ScreenDto.MemberGame> params) throws Exception {
log.info("获取大屏路径:{}",params);
ScreenVo.UrlVo urlVo = screenService.getScreenUrl(params);
return JsonResponse.newInstance().ok(urlVo);
}

32
game/src/main/java/com/ccsens/game/bean/dto/ScreenDto.java

@ -11,38 +11,6 @@ public class ScreenDto {
public static class MemberGame{
@ApiModelProperty("要创建的小游戏的类型 例如:SQ 代表数钱小游戏")
private String gameType;
@ApiModelProperty("是否关注了公众号")
private Byte subscribe;
@ApiModelProperty("用户的标识,对当前公众号唯一")
private String openid;
@ApiModelProperty("只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段。")
private String unionid;
@ApiModelProperty("微信名")
private String nickname;
@ApiModelProperty("头像")
private String headimgurl;
@ApiModelProperty("性别")
private Byte sex;
@ApiModelProperty("语言")
private String language;
@ApiModelProperty("城市")
private String city;
@ApiModelProperty("省份")
private String province;
@ApiModelProperty("国家")
private String country;
@ApiModelProperty("用户关注的时间")
private Long subscribeTime;
@ApiModelProperty("对粉丝的备注")
private String remark;
@ApiModelProperty("所在分组的id")
private Long groupid;
@ApiModelProperty("用户关注的渠道来源")
private String subscribeScene;
@ApiModelProperty("二维码扫码场景")
private Long qrScene;
@ApiModelProperty("二维码扫码场景描述")
private String qrSceneStr;
}
@Data

260
game/src/main/java/com/ccsens/game/bean/po/GameMember.java

@ -1,260 +0,0 @@
package com.ccsens.game.bean.po;
import java.io.Serializable;
import java.util.Date;
public class GameMember implements Serializable {
private Long id;
private Long userId;
private Byte grade;
private Byte subscribe;
private String openid;
private String unionid;
private String nickname;
private String headimgurl;
private Byte sex;
private String language;
private String city;
private String province;
private String country;
private Long subscribeTime;
private String remark;
private Long groupid;
private String subscribeScene;
private Long qrScene;
private String qrSceneStr;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Byte getGrade() {
return grade;
}
public void setGrade(Byte grade) {
this.grade = grade;
}
public Byte getSubscribe() {
return subscribe;
}
public void setSubscribe(Byte subscribe) {
this.subscribe = subscribe;
}
public String getOpenid() {
return openid;
}
public void setOpenid(String openid) {
this.openid = openid == null ? null : openid.trim();
}
public String getUnionid() {
return unionid;
}
public void setUnionid(String unionid) {
this.unionid = unionid == null ? null : unionid.trim();
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname == null ? null : nickname.trim();
}
public String getHeadimgurl() {
return headimgurl;
}
public void setHeadimgurl(String headimgurl) {
this.headimgurl = headimgurl == null ? null : headimgurl.trim();
}
public Byte getSex() {
return sex;
}
public void setSex(Byte sex) {
this.sex = sex;
}
public String getLanguage() {
return language;
}
public void setLanguage(String language) {
this.language = language == null ? null : language.trim();
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city == null ? null : city.trim();
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province == null ? null : province.trim();
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country == null ? null : country.trim();
}
public Long getSubscribeTime() {
return subscribeTime;
}
public void setSubscribeTime(Long subscribeTime) {
this.subscribeTime = subscribeTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public Long getGroupid() {
return groupid;
}
public void setGroupid(Long groupid) {
this.groupid = groupid;
}
public String getSubscribeScene() {
return subscribeScene;
}
public void setSubscribeScene(String subscribeScene) {
this.subscribeScene = subscribeScene == null ? null : subscribeScene.trim();
}
public Long getQrScene() {
return qrScene;
}
public void setQrScene(Long qrScene) {
this.qrScene = qrScene;
}
public String getQrSceneStr() {
return qrSceneStr;
}
public void setQrSceneStr(String qrSceneStr) {
this.qrSceneStr = qrSceneStr == null ? null : qrSceneStr.trim();
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", userId=").append(userId);
sb.append(", grade=").append(grade);
sb.append(", subscribe=").append(subscribe);
sb.append(", openid=").append(openid);
sb.append(", unionid=").append(unionid);
sb.append(", nickname=").append(nickname);
sb.append(", headimgurl=").append(headimgurl);
sb.append(", sex=").append(sex);
sb.append(", language=").append(language);
sb.append(", city=").append(city);
sb.append(", province=").append(province);
sb.append(", country=").append(country);
sb.append(", subscribeTime=").append(subscribeTime);
sb.append(", remark=").append(remark);
sb.append(", groupid=").append(groupid);
sb.append(", subscribeScene=").append(subscribeScene);
sb.append(", qrScene=").append(qrScene);
sb.append(", qrSceneStr=").append(qrSceneStr);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

1631
game/src/main/java/com/ccsens/game/bean/po/GameMemberExample.java

File diff suppressed because it is too large

12
game/src/main/java/com/ccsens/game/bean/po/GameRecord.java

@ -6,7 +6,7 @@ import java.util.Date;
public class GameRecord implements Serializable {
private Long id;
private Long typeMemberId;
private Long userPayId;
private String url;
@ -36,12 +36,12 @@ public class GameRecord implements Serializable {
this.id = id;
}
public Long getTypeMemberId() {
return typeMemberId;
public Long getUserPayId() {
return userPayId;
}
public void setTypeMemberId(Long typeMemberId) {
this.typeMemberId = typeMemberId;
public void setUserPayId(Long userPayId) {
this.userPayId = userPayId;
}
public String getUrl() {
@ -123,7 +123,7 @@ public class GameRecord implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", typeMemberId=").append(typeMemberId);
sb.append(", userPayId=").append(userPayId);
sb.append(", url=").append(url);
sb.append(", qrCodeUrl=").append(qrCodeUrl);
sb.append(", timeDifference=").append(timeDifference);

48
game/src/main/java/com/ccsens/game/bean/po/GameRecordExample.java

@ -165,63 +165,63 @@ public class GameRecordExample {
return (Criteria) this;
}
public Criteria andTypeMemberIdIsNull() {
addCriterion("type_member_id is null");
public Criteria andUserPayIdIsNull() {
addCriterion("user_pay_id is null");
return (Criteria) this;
}
public Criteria andTypeMemberIdIsNotNull() {
addCriterion("type_member_id is not null");
public Criteria andUserPayIdIsNotNull() {
addCriterion("user_pay_id is not null");
return (Criteria) this;
}
public Criteria andTypeMemberIdEqualTo(Long value) {
addCriterion("type_member_id =", value, "typeMemberId");
public Criteria andUserPayIdEqualTo(Long value) {
addCriterion("user_pay_id =", value, "userPayId");
return (Criteria) this;
}
public Criteria andTypeMemberIdNotEqualTo(Long value) {
addCriterion("type_member_id <>", value, "typeMemberId");
public Criteria andUserPayIdNotEqualTo(Long value) {
addCriterion("user_pay_id <>", value, "userPayId");
return (Criteria) this;
}
public Criteria andTypeMemberIdGreaterThan(Long value) {
addCriterion("type_member_id >", value, "typeMemberId");
public Criteria andUserPayIdGreaterThan(Long value) {
addCriterion("user_pay_id >", value, "userPayId");
return (Criteria) this;
}
public Criteria andTypeMemberIdGreaterThanOrEqualTo(Long value) {
addCriterion("type_member_id >=", value, "typeMemberId");
public Criteria andUserPayIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_pay_id >=", value, "userPayId");
return (Criteria) this;
}
public Criteria andTypeMemberIdLessThan(Long value) {
addCriterion("type_member_id <", value, "typeMemberId");
public Criteria andUserPayIdLessThan(Long value) {
addCriterion("user_pay_id <", value, "userPayId");
return (Criteria) this;
}
public Criteria andTypeMemberIdLessThanOrEqualTo(Long value) {
addCriterion("type_member_id <=", value, "typeMemberId");
public Criteria andUserPayIdLessThanOrEqualTo(Long value) {
addCriterion("user_pay_id <=", value, "userPayId");
return (Criteria) this;
}
public Criteria andTypeMemberIdIn(List<Long> values) {
addCriterion("type_member_id in", values, "typeMemberId");
public Criteria andUserPayIdIn(List<Long> values) {
addCriterion("user_pay_id in", values, "userPayId");
return (Criteria) this;
}
public Criteria andTypeMemberIdNotIn(List<Long> values) {
addCriterion("type_member_id not in", values, "typeMemberId");
public Criteria andUserPayIdNotIn(List<Long> values) {
addCriterion("user_pay_id not in", values, "userPayId");
return (Criteria) this;
}
public Criteria andTypeMemberIdBetween(Long value1, Long value2) {
addCriterion("type_member_id between", value1, value2, "typeMemberId");
public Criteria andUserPayIdBetween(Long value1, Long value2) {
addCriterion("user_pay_id between", value1, value2, "userPayId");
return (Criteria) this;
}
public Criteria andTypeMemberIdNotBetween(Long value1, Long value2) {
addCriterion("type_member_id not between", value1, value2, "typeMemberId");
public Criteria andUserPayIdNotBetween(Long value1, Long value2) {
addCriterion("user_pay_id not between", value1, value2, "userPayId");
return (Criteria) this;
}

12
game/src/main/java/com/ccsens/game/bean/po/GameScoreLog.java

@ -6,7 +6,7 @@ import java.util.Date;
public class GameScoreLog implements Serializable {
private Long id;
private Long memberId;
private Long userId;
private Long recordId;
@ -28,12 +28,12 @@ public class GameScoreLog implements Serializable {
this.id = id;
}
public Long getMemberId() {
return memberId;
public Long getUserId() {
return userId;
}
public void setMemberId(Long memberId) {
this.memberId = memberId;
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getRecordId() {
@ -83,7 +83,7 @@ public class GameScoreLog implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", memberId=").append(memberId);
sb.append(", userId=").append(userId);
sb.append(", recordId=").append(recordId);
sb.append(", operationType=").append(operationType);
sb.append(", createdAt=").append(createdAt);

48
game/src/main/java/com/ccsens/game/bean/po/GameScoreLogExample.java

@ -165,63 +165,63 @@ public class GameScoreLogExample {
return (Criteria) this;
}
public Criteria andMemberIdIsNull() {
addCriterion("member_id is null");
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andMemberIdIsNotNull() {
addCriterion("member_id is not null");
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andMemberIdEqualTo(Long value) {
addCriterion("member_id =", value, "memberId");
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdNotEqualTo(Long value) {
addCriterion("member_id <>", value, "memberId");
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdGreaterThan(Long value) {
addCriterion("member_id >", value, "memberId");
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdGreaterThanOrEqualTo(Long value) {
addCriterion("member_id >=", value, "memberId");
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdLessThan(Long value) {
addCriterion("member_id <", value, "memberId");
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdLessThanOrEqualTo(Long value) {
addCriterion("member_id <=", value, "memberId");
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdIn(List<Long> values) {
addCriterion("member_id in", values, "memberId");
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andMemberIdNotIn(List<Long> values) {
addCriterion("member_id not in", values, "memberId");
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andMemberIdBetween(Long value1, Long value2) {
addCriterion("member_id between", value1, value2, "memberId");
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andMemberIdNotBetween(Long value1, Long value2) {
addCriterion("member_id not between", value1, value2, "memberId");
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}

14
game/src/main/java/com/ccsens/game/bean/po/GameMemberJoin.java → game/src/main/java/com/ccsens/game/bean/po/GameUserJoin.java

@ -3,10 +3,10 @@ package com.ccsens.game.bean.po;
import java.io.Serializable;
import java.util.Date;
public class GameMemberJoin implements Serializable {
public class GameUserJoin implements Serializable {
private Long id;
private Long memberId;
private Long userId;
private Long recordId;
@ -36,12 +36,12 @@ public class GameMemberJoin implements Serializable {
this.id = id;
}
public Long getMemberId() {
return memberId;
public Long getUserId() {
return userId;
}
public void setMemberId(Long memberId) {
this.memberId = memberId;
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getRecordId() {
@ -123,7 +123,7 @@ public class GameMemberJoin implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", memberId=").append(memberId);
sb.append(", userId=").append(userId);
sb.append(", recordId=").append(recordId);
sb.append(", times=").append(times);
sb.append(", score=").append(score);

52
game/src/main/java/com/ccsens/game/bean/po/GameMemberJoinExample.java → game/src/main/java/com/ccsens/game/bean/po/GameUserJoinExample.java

@ -4,14 +4,14 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class GameMemberJoinExample {
public class GameUserJoinExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public GameMemberJoinExample() {
public GameUserJoinExample() {
oredCriteria = new ArrayList<Criteria>();
}
@ -165,63 +165,63 @@ public class GameMemberJoinExample {
return (Criteria) this;
}
public Criteria andMemberIdIsNull() {
addCriterion("member_id is null");
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andMemberIdIsNotNull() {
addCriterion("member_id is not null");
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andMemberIdEqualTo(Long value) {
addCriterion("member_id =", value, "memberId");
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdNotEqualTo(Long value) {
addCriterion("member_id <>", value, "memberId");
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdGreaterThan(Long value) {
addCriterion("member_id >", value, "memberId");
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdGreaterThanOrEqualTo(Long value) {
addCriterion("member_id >=", value, "memberId");
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdLessThan(Long value) {
addCriterion("member_id <", value, "memberId");
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdLessThanOrEqualTo(Long value) {
addCriterion("member_id <=", value, "memberId");
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdIn(List<Long> values) {
addCriterion("member_id in", values, "memberId");
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andMemberIdNotIn(List<Long> values) {
addCriterion("member_id not in", values, "memberId");
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andMemberIdBetween(Long value1, Long value2) {
addCriterion("member_id between", value1, value2, "memberId");
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andMemberIdNotBetween(Long value1, Long value2) {
addCriterion("member_id not between", value1, value2, "memberId");
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}

14
game/src/main/java/com/ccsens/game/bean/po/GameTypeMember.java → game/src/main/java/com/ccsens/game/bean/po/GameUserPay.java

@ -3,10 +3,10 @@ package com.ccsens.game.bean.po;
import java.io.Serializable;
import java.util.Date;
public class GameTypeMember implements Serializable {
public class GameUserPay implements Serializable {
private Long id;
private Long memberId;
private Long userId;
private Long gameTypeId;
@ -34,12 +34,12 @@ public class GameTypeMember implements Serializable {
this.id = id;
}
public Long getMemberId() {
return memberId;
public Long getUserId() {
return userId;
}
public void setMemberId(Long memberId) {
this.memberId = memberId;
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getGameTypeId() {
@ -113,7 +113,7 @@ public class GameTypeMember implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", memberId=").append(memberId);
sb.append(", userId=").append(userId);
sb.append(", gameTypeId=").append(gameTypeId);
sb.append(", totalCount=").append(totalCount);
sb.append(", usedCount=").append(usedCount);

52
game/src/main/java/com/ccsens/game/bean/po/GameTypeMemberExample.java → game/src/main/java/com/ccsens/game/bean/po/GameUserPayExample.java

@ -4,14 +4,14 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class GameTypeMemberExample {
public class GameUserPayExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public GameTypeMemberExample() {
public GameUserPayExample() {
oredCriteria = new ArrayList<Criteria>();
}
@ -165,63 +165,63 @@ public class GameTypeMemberExample {
return (Criteria) this;
}
public Criteria andMemberIdIsNull() {
addCriterion("member_id is null");
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andMemberIdIsNotNull() {
addCriterion("member_id is not null");
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andMemberIdEqualTo(Long value) {
addCriterion("member_id =", value, "memberId");
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdNotEqualTo(Long value) {
addCriterion("member_id <>", value, "memberId");
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdGreaterThan(Long value) {
addCriterion("member_id >", value, "memberId");
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdGreaterThanOrEqualTo(Long value) {
addCriterion("member_id >=", value, "memberId");
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdLessThan(Long value) {
addCriterion("member_id <", value, "memberId");
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdLessThanOrEqualTo(Long value) {
addCriterion("member_id <=", value, "memberId");
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andMemberIdIn(List<Long> values) {
addCriterion("member_id in", values, "memberId");
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andMemberIdNotIn(List<Long> values) {
addCriterion("member_id not in", values, "memberId");
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andMemberIdBetween(Long value1, Long value2) {
addCriterion("member_id between", value1, value2, "memberId");
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andMemberIdNotBetween(Long value1, Long value2) {
addCriterion("member_id not between", value1, value2, "memberId");
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}

2
game/src/main/java/com/ccsens/game/persist/dao/GameActivityRuleDao.java

@ -4,5 +4,5 @@ import com.ccsens.game.persist.mapper.GameActivityRuleMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface GameActivityRuleDao extends GameActivityRuleMapper{
public interface GameActivityRuleDao extends GameActivityRuleMapper {
}

8
game/src/main/java/com/ccsens/game/persist/dao/GameMemberDao.java

@ -1,8 +0,0 @@
package com.ccsens.game.persist.dao;
import com.ccsens.game.persist.mapper.GameMemberMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface GameMemberDao extends GameMemberMapper{
}

8
game/src/main/java/com/ccsens/game/persist/dao/GameMemberJoinDao.java

@ -1,8 +0,0 @@
package com.ccsens.game.persist.dao;
import com.ccsens.game.persist.mapper.GameMemberJoinMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface GameMemberJoinDao extends GameMemberJoinMapper{
}

2
game/src/main/java/com/ccsens/game/persist/dao/GameRecordDao.java

@ -4,5 +4,5 @@ import com.ccsens.game.persist.mapper.GameRecordMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface GameRecordDao extends GameRecordMapper{
public interface GameRecordDao extends GameRecordMapper {
}

2
game/src/main/java/com/ccsens/game/persist/dao/GameTypeDao.java

@ -4,5 +4,5 @@ import com.ccsens.game.persist.mapper.GameTypeMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface GameTypeDao extends GameTypeMapper{
public interface GameTypeDao extends GameTypeMapper {
}

9
game/src/main/java/com/ccsens/game/persist/dao/GameTypeMemberDao.java

@ -1,9 +0,0 @@
package com.ccsens.game.persist.dao;
import com.ccsens.game.persist.mapper.GameTypeMemberMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface GameTypeMemberDao extends GameTypeMemberMapper{
}

8
game/src/main/java/com/ccsens/game/persist/dao/GameUserJoinDao.java

@ -0,0 +1,8 @@
package com.ccsens.game.persist.dao;
import com.ccsens.game.persist.mapper.GameUserJoinMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface GameUserJoinDao extends GameUserJoinMapper {
}

9
game/src/main/java/com/ccsens/game/persist/dao/GameUserPayDao.java

@ -0,0 +1,9 @@
package com.ccsens.game.persist.dao;
import com.ccsens.game.persist.mapper.GameUserPayMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface GameUserPayDao extends GameUserPayMapper{
}

30
game/src/main/java/com/ccsens/game/persist/mapper/GameMemberJoinMapper.java

@ -1,30 +0,0 @@
package com.ccsens.game.persist.mapper;
import com.ccsens.game.bean.po.GameMemberJoin;
import com.ccsens.game.bean.po.GameMemberJoinExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface GameMemberJoinMapper {
long countByExample(GameMemberJoinExample example);
int deleteByExample(GameMemberJoinExample example);
int deleteByPrimaryKey(Long id);
int insert(GameMemberJoin record);
int insertSelective(GameMemberJoin record);
List<GameMemberJoin> selectByExample(GameMemberJoinExample example);
GameMemberJoin selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") GameMemberJoin record, @Param("example") GameMemberJoinExample example);
int updateByExample(@Param("record") GameMemberJoin record, @Param("example") GameMemberJoinExample example);
int updateByPrimaryKeySelective(GameMemberJoin record);
int updateByPrimaryKey(GameMemberJoin record);
}

30
game/src/main/java/com/ccsens/game/persist/mapper/GameMemberMapper.java

@ -1,30 +0,0 @@
package com.ccsens.game.persist.mapper;
import com.ccsens.game.bean.po.GameMember;
import com.ccsens.game.bean.po.GameMemberExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface GameMemberMapper {
long countByExample(GameMemberExample example);
int deleteByExample(GameMemberExample example);
int deleteByPrimaryKey(Long id);
int insert(GameMember record);
int insertSelective(GameMember record);
List<GameMember> selectByExample(GameMemberExample example);
GameMember selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") GameMember record, @Param("example") GameMemberExample example);
int updateByExample(@Param("record") GameMember record, @Param("example") GameMemberExample example);
int updateByPrimaryKeySelective(GameMember record);
int updateByPrimaryKey(GameMember record);
}

30
game/src/main/java/com/ccsens/game/persist/mapper/GameTypeMemberMapper.java

@ -1,30 +0,0 @@
package com.ccsens.game.persist.mapper;
import com.ccsens.game.bean.po.GameTypeMember;
import com.ccsens.game.bean.po.GameTypeMemberExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface GameTypeMemberMapper {
long countByExample(GameTypeMemberExample example);
int deleteByExample(GameTypeMemberExample example);
int deleteByPrimaryKey(Long id);
int insert(GameTypeMember record);
int insertSelective(GameTypeMember record);
List<GameTypeMember> selectByExample(GameTypeMemberExample example);
GameTypeMember selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") GameTypeMember record, @Param("example") GameTypeMemberExample example);
int updateByExample(@Param("record") GameTypeMember record, @Param("example") GameTypeMemberExample example);
int updateByPrimaryKeySelective(GameTypeMember record);
int updateByPrimaryKey(GameTypeMember record);
}

30
game/src/main/java/com/ccsens/game/persist/mapper/GameUserJoinMapper.java

@ -0,0 +1,30 @@
package com.ccsens.game.persist.mapper;
import com.ccsens.game.bean.po.GameUserJoin;
import com.ccsens.game.bean.po.GameUserJoinExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface GameUserJoinMapper {
long countByExample(GameUserJoinExample example);
int deleteByExample(GameUserJoinExample example);
int deleteByPrimaryKey(Long id);
int insert(GameUserJoin record);
int insertSelective(GameUserJoin record);
List<GameUserJoin> selectByExample(GameUserJoinExample example);
GameUserJoin selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") GameUserJoin record, @Param("example") GameUserJoinExample example);
int updateByExample(@Param("record") GameUserJoin record, @Param("example") GameUserJoinExample example);
int updateByPrimaryKeySelective(GameUserJoin record);
int updateByPrimaryKey(GameUserJoin record);
}

30
game/src/main/java/com/ccsens/game/persist/mapper/GameUserPayMapper.java

@ -0,0 +1,30 @@
package com.ccsens.game.persist.mapper;
import com.ccsens.game.bean.po.GameUserPay;
import com.ccsens.game.bean.po.GameUserPayExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface GameUserPayMapper {
long countByExample(GameUserPayExample example);
int deleteByExample(GameUserPayExample example);
int deleteByPrimaryKey(Long id);
int insert(GameUserPay record);
int insertSelective(GameUserPay record);
List<GameUserPay> selectByExample(GameUserPayExample example);
GameUserPay selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") GameUserPay record, @Param("example") GameUserPayExample example);
int updateByExample(@Param("record") GameUserPay record, @Param("example") GameUserPayExample example);
int updateByPrimaryKeySelective(GameUserPay record);
int updateByPrimaryKey(GameUserPay record);
}

3
game/src/main/java/com/ccsens/game/service/IScreenService.java

@ -2,9 +2,10 @@ package com.ccsens.game.service;
import com.ccsens.game.bean.dto.ScreenDto;
import com.ccsens.game.bean.vo.ScreenVo;
import com.ccsens.util.bean.dto.QueryDto;
public interface IScreenService {
ScreenVo.UrlVo getScreenUrl(ScreenDto.MemberGame memberGame);
ScreenVo.UrlVo getScreenUrl(QueryDto<ScreenDto.MemberGame> memberGame);
ScreenVo.GameInfoVo getGameInformation(ScreenDto.MemberRecord memberRecord);
}

124
game/src/main/java/com/ccsens/game/service/ScreenService.java

@ -10,6 +10,7 @@ import com.ccsens.game.bean.vo.ScreenVo;
import com.ccsens.game.persist.dao.*;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.WebConstant;
import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -26,9 +27,7 @@ import java.util.List;
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class ScreenService implements IScreenService{
@Autowired
private GameMemberDao memberDao;
@Autowired
private GameTypeMemberDao typeMemberDao;
private GameUserPayDao typeMemberDao;
@Autowired
private GameTypeDao gameTypeDao;
@Autowired
@ -36,30 +35,17 @@ public class ScreenService implements IScreenService{
@Autowired
private GameActivityRuleDao activityRuleDao;
@Autowired
private GameMemberJoinDao gameMemberJoinDao;
private GameUserJoinDao gameMemberJoinDao;
@Autowired
private Snowflake snowflake;
/**
* 传入用户信息返回游戏大屏路径
* @param memberGame
* @return
*/
@Override
public ScreenVo.UrlVo getScreenUrl(ScreenDto.MemberGame memberGame) {
//1、查询此用户,若没有则保存用户信息
GameMember member = null;
GameMemberExample memberExample = new GameMemberExample();
memberExample.createCriteria().andOpenidEqualTo(memberGame.getOpenid());
List<GameMember> memberList = memberDao.selectByExample(memberExample);
if(CollectionUtil.isNotEmpty(memberList)){
member = memberList.get(0);
}else {
member = new GameMember();
BeanUtil.copyProperties(memberGame,member);
member.setId(snowflake.nextId());
memberDao.insertSelective(member);
}
public ScreenVo.UrlVo getScreenUrl(QueryDto<ScreenDto.MemberGame> params) {
ScreenDto.MemberGame memberGame = params.getParam();
//查找游戏
GameType gameType = null;
GameTypeExample gameTypeExample = new GameTypeExample();
@ -72,28 +58,28 @@ public class ScreenService implements IScreenService{
throw new BaseException(CodeEnum.NOT_GAME_TYPE);
}
//2、查找此用户购买的此游戏的信息,若没有则添加一条记录,默认已付款,结束时间为添加后的一个月,默认次数为10次
GameTypeMember gameTypeMember = null;
GameTypeMemberExample typeMemberExample = new GameTypeMemberExample();
typeMemberExample.createCriteria().andMemberIdEqualTo(member.getId()).andGameTypeIdEqualTo(gameType.getId());
List<GameTypeMember> gameTypeMemberList = typeMemberDao.selectByExample(typeMemberExample);
if(CollectionUtil.isNotEmpty(gameTypeMemberList)){
gameTypeMember = gameTypeMemberList.get(0);
GameUserPay gameUserPay = null;
GameUserPayExample gameUserPayExample = new GameUserPayExample();
gameUserPayExample.createCriteria().andUserIdEqualTo(params.getUserId()).andGameTypeIdEqualTo(gameType.getId());
List<GameUserPay> gameUserPayList = typeMemberDao.selectByExample(gameUserPayExample);
if(CollectionUtil.isNotEmpty(gameUserPayList)){
gameUserPay = gameUserPayList.get(0);
}else {
gameTypeMember = new GameTypeMember();
gameTypeMember.setId(snowflake.nextId());
gameTypeMember.setMemberId(member.getId());
gameTypeMember.setGameTypeId(gameType.getId());
gameTypeMember.setTotalCount(10);
gameTypeMember.setUsedCount(0);
gameTypeMember.setCreatedTime(System.currentTimeMillis());
gameTypeMember.setDueTime(gameTypeMember.getCreatedTime() + (3600*24*30));
typeMemberDao.insertSelective(gameTypeMember);
gameUserPay = new GameUserPay();
gameUserPay.setId(snowflake.nextId());
gameUserPay.setUserId(params.getUserId());
gameUserPay.setGameTypeId(gameType.getId());
gameUserPay.setTotalCount(10);
gameUserPay.setUsedCount(0);
gameUserPay.setCreatedTime(System.currentTimeMillis());
gameUserPay.setDueTime(gameUserPay.getCreatedTime() + (3600*24*30));
typeMemberDao.insertSelective(gameUserPay);
}
//3、根据用户购买的记录,添加一场新的游戏记录
GameRecord gameRecord = new GameRecord();
gameRecord.setId(snowflake.nextId());
gameRecord.setTypeMemberId(gameTypeMember.getId());
gameRecord.setUserPayId(gameUserPay.getId());
gameRecord.setUrl(WebConstant.TEST_URL_GAME + gameRecord.getId() + File.separator + gameType.getScreenUrl());
gameRecord.setQrCodeUrl(WebConstant.TEST_URL_GAME + gameRecord.getId() + File.separator + gameType.getClientUrl());
gameRecordDao.insertSelective(gameRecord);
@ -122,42 +108,38 @@ public class ScreenService implements IScreenService{
*/
@Override
public ScreenVo.GameInfoVo getGameInformation(ScreenDto.MemberRecord memberRecord) {
GameRecord gameRecord = gameRecordDao.selectByPrimaryKey(memberRecord.getMemberRecord());
if(ObjectUtil.isNull(gameRecord)){
throw new BaseException(CodeEnum.NOT_GAME_RECORD);
}
GameTypeMember gameTypeMember = typeMemberDao.selectByPrimaryKey(gameRecord.getTypeMemberId());
ScreenVo.GameInfoVo gameInfoVo = new ScreenVo.GameInfoVo();
gameInfoVo.setQRCodeUrl(gameRecord.getQrCodeUrl());
gameInfoVo.setTotalCount(gameTypeMember.getTotalCount());
gameInfoVo.setUsedCount(gameTypeMember.getUsedCount());
gameInfoVo.setGameStatus(gameRecord.getGameStatus());
GameMemberJoinExample gameMemberJoinExample = new GameMemberJoinExample();
gameMemberJoinExample.createCriteria().andRecordIdEqualTo(memberRecord.getMemberRecord());
List<GameMemberJoin> memberJoinList = gameMemberJoinDao.selectByExample(gameMemberJoinExample);
if(CollectionUtil.isNotEmpty(memberJoinList)){
if(gameInfoVo.getGameStatus()==1){
ScreenVo.PreparingData preparingData = new ScreenVo.PreparingData();
// preparingData.setStartLocalTime();
}
gameInfoVo.setTotalMembers(memberJoinList.size());
}else {
gameInfoVo.setTotalMembers(0);
}
switch (gameInfoVo.getGameStatus()){
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
default:
break;
}
// GameRecord gameRecord = gameRecordDao.selectByPrimaryKey(memberRecord.getMemberRecord());
// if(ObjectUtil.isNull(gameRecord)){
// throw new BaseException(CodeEnum.NOT_GAME_RECORD);
// }
// GameTypeMember gameTypeMember = typeMemberDao.selectByPrimaryKey(gameRecord.getTypeMemberId());
// ScreenVo.GameInfoVo gameInfoVo = new ScreenVo.GameInfoVo();
// gameInfoVo.setQRCodeUrl(gameRecord.getQrCodeUrl());
// gameInfoVo.setTotalCount(gameTypeMember.getTotalCount());
// gameInfoVo.setUsedCount(gameTypeMember.getUsedCount());
// gameInfoVo.setGameStatus(gameRecord.getGameStatus());
// GameMemberJoinExample gameMemberJoinExample = new GameMemberJoinExample();
// gameMemberJoinExample.createCriteria().andRecordIdEqualTo(memberRecord.getMemberRecord());
// List<GameMemberJoin> memberJoinList = gameMemberJoinDao.selectByExample(gameMemberJoinExample);
// if(CollectionUtil.isNotEmpty(memberJoinList)){
// gameInfoVo.setTotalMembers(memberJoinList.size());
// }else {
// gameInfoVo.setTotalMembers(0);
// }
// switch (gameInfoVo.getGameStatus()){
// case 0:
//
// break;
// case 1:
//
// break;
// case 2:
// break;
// case 3:
// break;
// default:
// break;
// }
return null;
}

480
game/src/main/resources/mapper_raw/GameMemberMapper.xml

@ -1,480 +0,0 @@
<?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.ccsens.game.persist.mapper.GameMemberMapper">
<resultMap id="BaseResultMap" type="com.ccsens.game.bean.po.GameMember">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="grade" jdbcType="TINYINT" property="grade" />
<result column="subscribe" jdbcType="TINYINT" property="subscribe" />
<result column="openid" jdbcType="VARCHAR" property="openid" />
<result column="unionid" jdbcType="VARCHAR" property="unionid" />
<result column="nickname" jdbcType="VARCHAR" property="nickname" />
<result column="headimgurl" jdbcType="VARCHAR" property="headimgurl" />
<result column="sex" jdbcType="TINYINT" property="sex" />
<result column="language" jdbcType="VARCHAR" property="language" />
<result column="city" jdbcType="VARCHAR" property="city" />
<result column="province" jdbcType="VARCHAR" property="province" />
<result column="country" jdbcType="VARCHAR" property="country" />
<result column="subscribe_time" jdbcType="BIGINT" property="subscribeTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="groupid" jdbcType="BIGINT" property="groupid" />
<result column="subscribe_scene" jdbcType="VARCHAR" property="subscribeScene" />
<result column="qr_scene" jdbcType="BIGINT" property="qrScene" />
<result column="qr_scene_str" jdbcType="VARCHAR" property="qrSceneStr" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, user_id, grade, subscribe, openid, unionid, nickname, headimgurl, sex, language,
city, province, country, subscribe_time, remark, groupid, subscribe_scene, qr_scene,
qr_scene_str, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.game.bean.po.GameMemberExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_game_member
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_game_member
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_game_member
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.game.bean.po.GameMemberExample">
delete from t_game_member
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.game.bean.po.GameMember">
insert into t_game_member (id, user_id, grade,
subscribe, openid, unionid,
nickname, headimgurl, sex,
language, city, province,
country, subscribe_time, remark,
groupid, subscribe_scene, qr_scene,
qr_scene_str, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{grade,jdbcType=TINYINT},
#{subscribe,jdbcType=TINYINT}, #{openid,jdbcType=VARCHAR}, #{unionid,jdbcType=VARCHAR},
#{nickname,jdbcType=VARCHAR}, #{headimgurl,jdbcType=VARCHAR}, #{sex,jdbcType=TINYINT},
#{language,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR},
#{country,jdbcType=VARCHAR}, #{subscribeTime,jdbcType=BIGINT}, #{remark,jdbcType=VARCHAR},
#{groupid,jdbcType=BIGINT}, #{subscribeScene,jdbcType=VARCHAR}, #{qrScene,jdbcType=BIGINT},
#{qrSceneStr,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.game.bean.po.GameMember">
insert into t_game_member
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="grade != null">
grade,
</if>
<if test="subscribe != null">
subscribe,
</if>
<if test="openid != null">
openid,
</if>
<if test="unionid != null">
unionid,
</if>
<if test="nickname != null">
nickname,
</if>
<if test="headimgurl != null">
headimgurl,
</if>
<if test="sex != null">
sex,
</if>
<if test="language != null">
language,
</if>
<if test="city != null">
city,
</if>
<if test="province != null">
province,
</if>
<if test="country != null">
country,
</if>
<if test="subscribeTime != null">
subscribe_time,
</if>
<if test="remark != null">
remark,
</if>
<if test="groupid != null">
groupid,
</if>
<if test="subscribeScene != null">
subscribe_scene,
</if>
<if test="qrScene != null">
qr_scene,
</if>
<if test="qrSceneStr != null">
qr_scene_str,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="grade != null">
#{grade,jdbcType=TINYINT},
</if>
<if test="subscribe != null">
#{subscribe,jdbcType=TINYINT},
</if>
<if test="openid != null">
#{openid,jdbcType=VARCHAR},
</if>
<if test="unionid != null">
#{unionid,jdbcType=VARCHAR},
</if>
<if test="nickname != null">
#{nickname,jdbcType=VARCHAR},
</if>
<if test="headimgurl != null">
#{headimgurl,jdbcType=VARCHAR},
</if>
<if test="sex != null">
#{sex,jdbcType=TINYINT},
</if>
<if test="language != null">
#{language,jdbcType=VARCHAR},
</if>
<if test="city != null">
#{city,jdbcType=VARCHAR},
</if>
<if test="province != null">
#{province,jdbcType=VARCHAR},
</if>
<if test="country != null">
#{country,jdbcType=VARCHAR},
</if>
<if test="subscribeTime != null">
#{subscribeTime,jdbcType=BIGINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="groupid != null">
#{groupid,jdbcType=BIGINT},
</if>
<if test="subscribeScene != null">
#{subscribeScene,jdbcType=VARCHAR},
</if>
<if test="qrScene != null">
#{qrScene,jdbcType=BIGINT},
</if>
<if test="qrSceneStr != null">
#{qrSceneStr,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.game.bean.po.GameMemberExample" resultType="java.lang.Long">
select count(*) from t_game_member
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_game_member
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.grade != null">
grade = #{record.grade,jdbcType=TINYINT},
</if>
<if test="record.subscribe != null">
subscribe = #{record.subscribe,jdbcType=TINYINT},
</if>
<if test="record.openid != null">
openid = #{record.openid,jdbcType=VARCHAR},
</if>
<if test="record.unionid != null">
unionid = #{record.unionid,jdbcType=VARCHAR},
</if>
<if test="record.nickname != null">
nickname = #{record.nickname,jdbcType=VARCHAR},
</if>
<if test="record.headimgurl != null">
headimgurl = #{record.headimgurl,jdbcType=VARCHAR},
</if>
<if test="record.sex != null">
sex = #{record.sex,jdbcType=TINYINT},
</if>
<if test="record.language != null">
language = #{record.language,jdbcType=VARCHAR},
</if>
<if test="record.city != null">
city = #{record.city,jdbcType=VARCHAR},
</if>
<if test="record.province != null">
province = #{record.province,jdbcType=VARCHAR},
</if>
<if test="record.country != null">
country = #{record.country,jdbcType=VARCHAR},
</if>
<if test="record.subscribeTime != null">
subscribe_time = #{record.subscribeTime,jdbcType=BIGINT},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.groupid != null">
groupid = #{record.groupid,jdbcType=BIGINT},
</if>
<if test="record.subscribeScene != null">
subscribe_scene = #{record.subscribeScene,jdbcType=VARCHAR},
</if>
<if test="record.qrScene != null">
qr_scene = #{record.qrScene,jdbcType=BIGINT},
</if>
<if test="record.qrSceneStr != null">
qr_scene_str = #{record.qrSceneStr,jdbcType=VARCHAR},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_game_member
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
grade = #{record.grade,jdbcType=TINYINT},
subscribe = #{record.subscribe,jdbcType=TINYINT},
openid = #{record.openid,jdbcType=VARCHAR},
unionid = #{record.unionid,jdbcType=VARCHAR},
nickname = #{record.nickname,jdbcType=VARCHAR},
headimgurl = #{record.headimgurl,jdbcType=VARCHAR},
sex = #{record.sex,jdbcType=TINYINT},
language = #{record.language,jdbcType=VARCHAR},
city = #{record.city,jdbcType=VARCHAR},
province = #{record.province,jdbcType=VARCHAR},
country = #{record.country,jdbcType=VARCHAR},
subscribe_time = #{record.subscribeTime,jdbcType=BIGINT},
remark = #{record.remark,jdbcType=VARCHAR},
groupid = #{record.groupid,jdbcType=BIGINT},
subscribe_scene = #{record.subscribeScene,jdbcType=VARCHAR},
qr_scene = #{record.qrScene,jdbcType=BIGINT},
qr_scene_str = #{record.qrSceneStr,jdbcType=VARCHAR},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.game.bean.po.GameMember">
update t_game_member
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="grade != null">
grade = #{grade,jdbcType=TINYINT},
</if>
<if test="subscribe != null">
subscribe = #{subscribe,jdbcType=TINYINT},
</if>
<if test="openid != null">
openid = #{openid,jdbcType=VARCHAR},
</if>
<if test="unionid != null">
unionid = #{unionid,jdbcType=VARCHAR},
</if>
<if test="nickname != null">
nickname = #{nickname,jdbcType=VARCHAR},
</if>
<if test="headimgurl != null">
headimgurl = #{headimgurl,jdbcType=VARCHAR},
</if>
<if test="sex != null">
sex = #{sex,jdbcType=TINYINT},
</if>
<if test="language != null">
language = #{language,jdbcType=VARCHAR},
</if>
<if test="city != null">
city = #{city,jdbcType=VARCHAR},
</if>
<if test="province != null">
province = #{province,jdbcType=VARCHAR},
</if>
<if test="country != null">
country = #{country,jdbcType=VARCHAR},
</if>
<if test="subscribeTime != null">
subscribe_time = #{subscribeTime,jdbcType=BIGINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="groupid != null">
groupid = #{groupid,jdbcType=BIGINT},
</if>
<if test="subscribeScene != null">
subscribe_scene = #{subscribeScene,jdbcType=VARCHAR},
</if>
<if test="qrScene != null">
qr_scene = #{qrScene,jdbcType=BIGINT},
</if>
<if test="qrSceneStr != null">
qr_scene_str = #{qrSceneStr,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.game.bean.po.GameMember">
update t_game_member
set user_id = #{userId,jdbcType=BIGINT},
grade = #{grade,jdbcType=TINYINT},
subscribe = #{subscribe,jdbcType=TINYINT},
openid = #{openid,jdbcType=VARCHAR},
unionid = #{unionid,jdbcType=VARCHAR},
nickname = #{nickname,jdbcType=VARCHAR},
headimgurl = #{headimgurl,jdbcType=VARCHAR},
sex = #{sex,jdbcType=TINYINT},
language = #{language,jdbcType=VARCHAR},
city = #{city,jdbcType=VARCHAR},
province = #{province,jdbcType=VARCHAR},
country = #{country,jdbcType=VARCHAR},
subscribe_time = #{subscribeTime,jdbcType=BIGINT},
remark = #{remark,jdbcType=VARCHAR},
groupid = #{groupid,jdbcType=BIGINT},
subscribe_scene = #{subscribeScene,jdbcType=VARCHAR},
qr_scene = #{qrScene,jdbcType=BIGINT},
qr_scene_str = #{qrSceneStr,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

28
game/src/main/resources/mapper_raw/GameRecordMapper.xml

@ -3,7 +3,7 @@
<mapper namespace="com.ccsens.game.persist.mapper.GameRecordMapper">
<resultMap id="BaseResultMap" type="com.ccsens.game.bean.po.GameRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="type_member_id" jdbcType="BIGINT" property="typeMemberId" />
<result column="user_pay_id" jdbcType="BIGINT" property="userPayId" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="QR_code_url" jdbcType="VARCHAR" property="qrCodeUrl" />
<result column="time_difference" jdbcType="INTEGER" property="timeDifference" />
@ -73,7 +73,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, type_member_id, url, QR_code_url, time_difference, start_time, end_time, game_status,
id, user_pay_id, url, QR_code_url, time_difference, start_time, end_time, game_status,
created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.game.bean.po.GameRecordExample" resultMap="BaseResultMap">
@ -107,11 +107,11 @@
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.game.bean.po.GameRecord">
insert into t_game_record (id, type_member_id, url,
insert into t_game_record (id, user_pay_id, url,
QR_code_url, time_difference, start_time,
end_time, game_status, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{typeMemberId,jdbcType=BIGINT}, #{url,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{userPayId,jdbcType=BIGINT}, #{url,jdbcType=VARCHAR},
#{qrCodeUrl,jdbcType=VARCHAR}, #{timeDifference,jdbcType=INTEGER}, #{startTime,jdbcType=BIGINT},
#{endTime,jdbcType=BIGINT}, #{gameStatus,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
@ -122,8 +122,8 @@
<if test="id != null">
id,
</if>
<if test="typeMemberId != null">
type_member_id,
<if test="userPayId != null">
user_pay_id,
</if>
<if test="url != null">
url,
@ -157,8 +157,8 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="typeMemberId != null">
#{typeMemberId,jdbcType=BIGINT},
<if test="userPayId != null">
#{userPayId,jdbcType=BIGINT},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
@ -201,8 +201,8 @@
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.typeMemberId != null">
type_member_id = #{record.typeMemberId,jdbcType=BIGINT},
<if test="record.userPayId != null">
user_pay_id = #{record.userPayId,jdbcType=BIGINT},
</if>
<if test="record.url != null">
url = #{record.url,jdbcType=VARCHAR},
@ -239,7 +239,7 @@
<update id="updateByExample" parameterType="map">
update t_game_record
set id = #{record.id,jdbcType=BIGINT},
type_member_id = #{record.typeMemberId,jdbcType=BIGINT},
user_pay_id = #{record.userPayId,jdbcType=BIGINT},
url = #{record.url,jdbcType=VARCHAR},
QR_code_url = #{record.qrCodeUrl,jdbcType=VARCHAR},
time_difference = #{record.timeDifference,jdbcType=INTEGER},
@ -256,8 +256,8 @@
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.game.bean.po.GameRecord">
update t_game_record
<set>
<if test="typeMemberId != null">
type_member_id = #{typeMemberId,jdbcType=BIGINT},
<if test="userPayId != null">
user_pay_id = #{userPayId,jdbcType=BIGINT},
</if>
<if test="url != null">
url = #{url,jdbcType=VARCHAR},
@ -291,7 +291,7 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.game.bean.po.GameRecord">
update t_game_record
set type_member_id = #{typeMemberId,jdbcType=BIGINT},
set user_pay_id = #{userPayId,jdbcType=BIGINT},
url = #{url,jdbcType=VARCHAR},
QR_code_url = #{qrCodeUrl,jdbcType=VARCHAR},
time_difference = #{timeDifference,jdbcType=INTEGER},

28
game/src/main/resources/mapper_raw/GameScoreLogMapper.xml

@ -3,7 +3,7 @@
<mapper namespace="com.ccsens.game.persist.mapper.GameScoreLogMapper">
<resultMap id="BaseResultMap" type="com.ccsens.game.bean.po.GameScoreLog">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="member_id" jdbcType="BIGINT" property="memberId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="record_id" jdbcType="BIGINT" property="recordId" />
<result column="operation_type" jdbcType="TINYINT" property="operationType" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
@ -69,7 +69,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, member_id, record_id, operation_type, created_at, updated_at, rec_status
id, user_id, record_id, operation_type, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.game.bean.po.GameScoreLogExample" resultMap="BaseResultMap">
select
@ -102,10 +102,10 @@
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.game.bean.po.GameScoreLog">
insert into t_game_score_log (id, member_id, record_id,
insert into t_game_score_log (id, user_id, record_id,
operation_type, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{recordId,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{recordId,jdbcType=BIGINT},
#{operationType,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
@ -115,8 +115,8 @@
<if test="id != null">
id,
</if>
<if test="memberId != null">
member_id,
<if test="userId != null">
user_id,
</if>
<if test="recordId != null">
record_id,
@ -138,8 +138,8 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="memberId != null">
#{memberId,jdbcType=BIGINT},
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="recordId != null">
#{recordId,jdbcType=BIGINT},
@ -170,8 +170,8 @@
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.memberId != null">
member_id = #{record.memberId,jdbcType=BIGINT},
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.recordId != null">
record_id = #{record.recordId,jdbcType=BIGINT},
@ -196,7 +196,7 @@
<update id="updateByExample" parameterType="map">
update t_game_score_log
set id = #{record.id,jdbcType=BIGINT},
member_id = #{record.memberId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
record_id = #{record.recordId,jdbcType=BIGINT},
operation_type = #{record.operationType,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -209,8 +209,8 @@
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.game.bean.po.GameScoreLog">
update t_game_score_log
<set>
<if test="memberId != null">
member_id = #{memberId,jdbcType=BIGINT},
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="recordId != null">
record_id = #{recordId,jdbcType=BIGINT},
@ -232,7 +232,7 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.game.bean.po.GameScoreLog">
update t_game_score_log
set member_id = #{memberId,jdbcType=BIGINT},
set user_id = #{userId,jdbcType=BIGINT},
record_id = #{recordId,jdbcType=BIGINT},
operation_type = #{operationType,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},

66
game/src/main/resources/mapper_raw/GameMemberJoinMapper.xml → game/src/main/resources/mapper_raw/GameUserJoinMapper.xml

@ -1,9 +1,9 @@
<?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.ccsens.game.persist.mapper.GameMemberJoinMapper">
<resultMap id="BaseResultMap" type="com.ccsens.game.bean.po.GameMemberJoin">
<mapper namespace="com.ccsens.game.persist.mapper.GameUserJoinMapper">
<resultMap id="BaseResultMap" type="com.ccsens.game.bean.po.GameUserJoin">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="member_id" jdbcType="BIGINT" property="memberId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="record_id" jdbcType="BIGINT" property="recordId" />
<result column="times" jdbcType="VARCHAR" property="times" />
<result column="score" jdbcType="VARCHAR" property="score" />
@ -73,16 +73,16 @@
</where>
</sql>
<sql id="Base_Column_List">
id, member_id, record_id, times, score, time_difference, local_start_time, local_end_time,
id, user_id, record_id, times, score, time_difference, local_start_time, local_end_time,
created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.game.bean.po.GameMemberJoinExample" resultMap="BaseResultMap">
<select id="selectByExample" parameterType="com.ccsens.game.bean.po.GameUserJoinExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_game_member_join
from t_game_user_join
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
@ -93,37 +93,37 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_game_member_join
from t_game_user_join
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_game_member_join
delete from t_game_user_join
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.game.bean.po.GameMemberJoinExample">
delete from t_game_member_join
<delete id="deleteByExample" parameterType="com.ccsens.game.bean.po.GameUserJoinExample">
delete from t_game_user_join
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.game.bean.po.GameMemberJoin">
insert into t_game_member_join (id, member_id, record_id,
<insert id="insert" parameterType="com.ccsens.game.bean.po.GameUserJoin">
insert into t_game_user_join (id, user_id, record_id,
times, score, time_difference,
local_start_time, local_end_time, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{recordId,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{recordId,jdbcType=BIGINT},
#{times,jdbcType=VARCHAR}, #{score,jdbcType=VARCHAR}, #{timeDifference,jdbcType=INTEGER},
#{localStartTime,jdbcType=BIGINT}, #{localEndTime,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.game.bean.po.GameMemberJoin">
insert into t_game_member_join
<insert id="insertSelective" parameterType="com.ccsens.game.bean.po.GameUserJoin">
insert into t_game_user_join
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="memberId != null">
member_id,
<if test="userId != null">
user_id,
</if>
<if test="recordId != null">
record_id,
@ -157,8 +157,8 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="memberId != null">
#{memberId,jdbcType=BIGINT},
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="recordId != null">
#{recordId,jdbcType=BIGINT},
@ -189,20 +189,20 @@
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.game.bean.po.GameMemberJoinExample" resultType="java.lang.Long">
select count(*) from t_game_member_join
<select id="countByExample" parameterType="com.ccsens.game.bean.po.GameUserJoinExample" resultType="java.lang.Long">
select count(*) from t_game_user_join
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_game_member_join
update t_game_user_join
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.memberId != null">
member_id = #{record.memberId,jdbcType=BIGINT},
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.recordId != null">
record_id = #{record.recordId,jdbcType=BIGINT},
@ -237,9 +237,9 @@
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_game_member_join
update t_game_user_join
set id = #{record.id,jdbcType=BIGINT},
member_id = #{record.memberId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
record_id = #{record.recordId,jdbcType=BIGINT},
times = #{record.times,jdbcType=VARCHAR},
score = #{record.score,jdbcType=VARCHAR},
@ -253,11 +253,11 @@
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.game.bean.po.GameMemberJoin">
update t_game_member_join
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.game.bean.po.GameUserJoin">
update t_game_user_join
<set>
<if test="memberId != null">
member_id = #{memberId,jdbcType=BIGINT},
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="recordId != null">
record_id = #{recordId,jdbcType=BIGINT},
@ -289,9 +289,9 @@
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.game.bean.po.GameMemberJoin">
update t_game_member_join
set member_id = #{memberId,jdbcType=BIGINT},
<update id="updateByPrimaryKey" parameterType="com.ccsens.game.bean.po.GameUserJoin">
update t_game_user_join
set user_id = #{userId,jdbcType=BIGINT},
record_id = #{recordId,jdbcType=BIGINT},
times = #{times,jdbcType=VARCHAR},
score = #{score,jdbcType=VARCHAR},

66
game/src/main/resources/mapper_raw/GameTypeMemberMapper.xml → game/src/main/resources/mapper_raw/GameUserPayMapper.xml

@ -1,9 +1,9 @@
<?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.ccsens.game.persist.mapper.GameTypeMemberMapper">
<resultMap id="BaseResultMap" type="com.ccsens.game.bean.po.GameTypeMember">
<mapper namespace="com.ccsens.game.persist.mapper.GameUserPayMapper">
<resultMap id="BaseResultMap" type="com.ccsens.game.bean.po.GameUserPay">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="member_id" jdbcType="BIGINT" property="memberId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="game_type_id" jdbcType="BIGINT" property="gameTypeId" />
<result column="total_count" jdbcType="INTEGER" property="totalCount" />
<result column="used_count" jdbcType="INTEGER" property="usedCount" />
@ -72,16 +72,16 @@
</where>
</sql>
<sql id="Base_Column_List">
id, member_id, game_type_id, total_count, used_count, created_time, due_time, created_at,
id, user_id, game_type_id, total_count, used_count, created_time, due_time, created_at,
updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.game.bean.po.GameTypeMemberExample" resultMap="BaseResultMap">
<select id="selectByExample" parameterType="com.ccsens.game.bean.po.GameUserPayExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_game_type_member
from t_game_user_pay
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
@ -92,37 +92,37 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_game_type_member
from t_game_user_pay
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_game_type_member
delete from t_game_user_pay
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.game.bean.po.GameTypeMemberExample">
delete from t_game_type_member
<delete id="deleteByExample" parameterType="com.ccsens.game.bean.po.GameUserPayExample">
delete from t_game_user_pay
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.game.bean.po.GameTypeMember">
insert into t_game_type_member (id, member_id, game_type_id,
<insert id="insert" parameterType="com.ccsens.game.bean.po.GameUserPay">
insert into t_game_user_pay (id, user_id, game_type_id,
total_count, used_count, created_time,
due_time, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{gameTypeId,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{gameTypeId,jdbcType=BIGINT},
#{totalCount,jdbcType=INTEGER}, #{usedCount,jdbcType=INTEGER}, #{createdTime,jdbcType=BIGINT},
#{dueTime,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.game.bean.po.GameTypeMember">
insert into t_game_type_member
<insert id="insertSelective" parameterType="com.ccsens.game.bean.po.GameUserPay">
insert into t_game_user_pay
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="memberId != null">
member_id,
<if test="userId != null">
user_id,
</if>
<if test="gameTypeId != null">
game_type_id,
@ -153,8 +153,8 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="memberId != null">
#{memberId,jdbcType=BIGINT},
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="gameTypeId != null">
#{gameTypeId,jdbcType=BIGINT},
@ -182,20 +182,20 @@
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.game.bean.po.GameTypeMemberExample" resultType="java.lang.Long">
select count(*) from t_game_type_member
<select id="countByExample" parameterType="com.ccsens.game.bean.po.GameUserPayExample" resultType="java.lang.Long">
select count(*) from t_game_user_pay
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_game_type_member
update t_game_user_pay
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.memberId != null">
member_id = #{record.memberId,jdbcType=BIGINT},
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.gameTypeId != null">
game_type_id = #{record.gameTypeId,jdbcType=BIGINT},
@ -227,9 +227,9 @@
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_game_type_member
update t_game_user_pay
set id = #{record.id,jdbcType=BIGINT},
member_id = #{record.memberId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
game_type_id = #{record.gameTypeId,jdbcType=BIGINT},
total_count = #{record.totalCount,jdbcType=INTEGER},
used_count = #{record.usedCount,jdbcType=INTEGER},
@ -242,11 +242,11 @@
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.game.bean.po.GameTypeMember">
update t_game_type_member
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.game.bean.po.GameUserPay">
update t_game_user_pay
<set>
<if test="memberId != null">
member_id = #{memberId,jdbcType=BIGINT},
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="gameTypeId != null">
game_type_id = #{gameTypeId,jdbcType=BIGINT},
@ -275,9 +275,9 @@
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.game.bean.po.GameTypeMember">
update t_game_type_member
set member_id = #{memberId,jdbcType=BIGINT},
<update id="updateByPrimaryKey" parameterType="com.ccsens.game.bean.po.GameUserPay">
update t_game_user_pay
set user_id = #{userId,jdbcType=BIGINT},
game_type_id = #{gameTypeId,jdbcType=BIGINT},
total_count = #{totalCount,jdbcType=INTEGER},
used_count = #{usedCount,jdbcType=INTEGER},

15
game/src/main/resources/mbg.xml

@ -55,15 +55,14 @@
<!-- enableSubPackages:是否让schema作为包的后缀 -->
<property name="enableSubPackages" value="false" />
</javaClientGenerator>
<!--<table tableName="t_game_member" domainObjectName="GameMember"></table>-->
<!--<table tableName="t_game_type" domainObjectName="GameType"></table>-->
<!--<table tableName="t_game_type_member" domainObjectName="GameTypeMember"></table>-->
<table tableName="t_game_type" domainObjectName="GameType"></table>
<table tableName="t_game_user_pay" domainObjectName="GameUserPay"></table>
<table tableName="t_game_record" domainObjectName="GameRecord"></table>
<table tableName="t_game_member_join" domainObjectName="GameMemberJoin"></table>
<!--<table tableName="t_game_score_log" domainObjectName="GameScoreLog"></table>-->
<!--<table tableName="t_game_activity_rule" domainObjectName="GameActivityRule"></table>-->
<!--<table tableName="t_game_activity_prize" domainObjectName="GameActivityPrize"></table>-->
<!--<table tableName="t_game_prize_instructions" domainObjectName="GamePrizeInstructions"></table>-->
<table tableName="t_game_user_join" domainObjectName="GameUserJoin"></table>
<table tableName="t_game_score_log" domainObjectName="GameScoreLog"></table>
<table tableName="t_game_activity_rule" domainObjectName="GameActivityRule"></table>
<table tableName="t_game_activity_prize" domainObjectName="GameActivityPrize"></table>
<table tableName="t_game_prize_instructions" domainObjectName="GamePrizeInstructions"></table>
<!-- 有些表的字段需要指定java类型
<table schema="" tableName="">

Loading…
Cancel
Save