|
|
@@ -7,6 +7,7 @@ import com.iformall.common.ErrorCode; |
|
|
import com.iformall.common.Result; |
|
|
import com.iformall.common.Result; |
|
|
import com.iformall.common.ResultData; |
|
|
import com.iformall.common.ResultData; |
|
|
import com.iformall.controller.base.BaseController; |
|
|
import com.iformall.controller.base.BaseController; |
|
|
|
|
|
import com.iformall.domain.po.WxCUserBasicInfo; |
|
|
import com.iformall.domain.po.WxGame; |
|
|
import com.iformall.domain.po.WxGame; |
|
|
import com.iformall.domain.po.WxGameActionLog; |
|
|
import com.iformall.domain.po.WxGameActionLog; |
|
|
import com.iformall.domain.po.WxGameUserCount; |
|
|
import com.iformall.domain.po.WxGameUserCount; |
|
|
@@ -14,11 +15,16 @@ import com.iformall.domain.po.base.BaseEntity; |
|
|
import com.iformall.domain.vo.WxGameUserActionLogVo; |
|
|
import com.iformall.domain.vo.WxGameUserActionLogVo; |
|
|
import com.iformall.enums.EnumGameStatus; |
|
|
import com.iformall.enums.EnumGameStatus; |
|
|
import com.iformall.exception.MallinkException; |
|
|
import com.iformall.exception.MallinkException; |
|
|
|
|
|
import com.iformall.service.WxCUserBasicInfoService; |
|
|
import com.iformall.service.WxGameService; |
|
|
import com.iformall.service.WxGameService; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.slf4j.LoggerFactory; |
|
|
@@ -33,6 +39,9 @@ public class WxGameController extends BaseController { |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private WxGameService wxGameService; |
|
|
private WxGameService wxGameService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private WxCUserBasicInfoService wxCUserBasicInfoService; |
|
|
|
|
|
|
|
|
@ApiOperation("分页列表接口") |
|
|
@ApiOperation("分页列表接口") |
|
|
@GetMapping("list") |
|
|
@GetMapping("list") |
|
|
@@ -60,6 +69,19 @@ public class WxGameController extends BaseController { |
|
|
} |
|
|
} |
|
|
wxGameLog.updateTenantInfo(getTenantInfo()); |
|
|
wxGameLog.updateTenantInfo(getTenantInfo()); |
|
|
wxGameLog.setSortColumns("user_id asc"); |
|
|
wxGameLog.setSortColumns("user_id asc"); |
|
|
|
|
|
if (StringUtils.isNotBlank(wxGameLog.getUserPhone())) { |
|
|
|
|
|
WxCUserBasicInfo iq = new WxCUserBasicInfo(); |
|
|
|
|
|
iq.setFinalTenantId(wxGameLog.getFinalTenantId()); |
|
|
|
|
|
iq.setPhone(wxGameLog.getUserPhone()); |
|
|
|
|
|
List<Long> userIdList = wxCUserBasicInfoService.findIdList(iq); |
|
|
|
|
|
if (null == userIdList || userIdList.size() <= 0 ) { |
|
|
|
|
|
userIdList = new ArrayList<Long>(); |
|
|
|
|
|
userIdList.add(-1L); |
|
|
|
|
|
wxGameLog.setUserIdList(userIdList); |
|
|
|
|
|
}else { |
|
|
|
|
|
wxGameLog.setUserIdList(userIdList); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
final PageInfo<WxGameUserActionLogVo> page = wxGameService.listUserActionLogAsPage(wxGameLog, pageNum, pageSize); |
|
|
final PageInfo<WxGameUserActionLogVo> page = wxGameService.listUserActionLogAsPage(wxGameLog, pageNum, pageSize); |
|
|
return new ResultData(page); |
|
|
return new ResultData(page); |
|
|
} |
|
|
} |
|
|
@@ -145,6 +167,12 @@ public class WxGameController extends BaseController { |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"参数错误"); |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"参数错误"); |
|
|
} |
|
|
} |
|
|
gameUserCount.updateTenantInfo(getTenantInfo()); |
|
|
gameUserCount.updateTenantInfo(getTenantInfo()); |
|
|
|
|
|
|
|
|
|
|
|
WxCUserBasicInfo cuser = wxCUserBasicInfoService.getById(gameUserCount.getUserId(), gameUserCount.getFinalTenantId()); |
|
|
|
|
|
if (null == cuser) { |
|
|
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"未查询到会员"); |
|
|
|
|
|
} |
|
|
|
|
|
gameUserCount.setUserNickName(cuser.getNickName()); |
|
|
try{ |
|
|
try{ |
|
|
wxGameService.saveOrUpdateGameUserCount(gameUserCount); |
|
|
wxGameService.saveOrUpdateGameUserCount(gameUserCount); |
|
|
return new ResultData(); |
|
|
return new ResultData(); |
|
|
|