引入了数据展示模块 , 修改了海报分享实现流程
This commit is contained in:
parent
8093da0732
commit
cbda0df6d6
@ -1,19 +1,35 @@
|
|||||||
package cn.com.tenlion.systemcard.controller.app.api.cardbigdata;
|
package cn.com.tenlion.systemcard.controller.app.api.cardbigdata;
|
||||||
|
|
||||||
|
import cn.com.tenlion.bigdata.util.BigDataResult;
|
||||||
|
import cn.com.tenlion.buildingpictures.service.picturestemplate.IPicturesTemplateService;
|
||||||
|
import cn.com.tenlion.systemcard.pojo.dtos.account.AccountDTO;
|
||||||
|
import cn.com.tenlion.systemcard.pojo.dtos.accountitem.AccountItemDTO;
|
||||||
|
import cn.com.tenlion.systemcard.pojo.dtos.accountitem.AccountItemMoneyDTO;
|
||||||
|
import cn.com.tenlion.systemcard.pojo.dtos.cardcharge.CardChargeDTO;
|
||||||
|
import cn.com.tenlion.systemcard.pojo.dtos.cardtemplate.CardTemplateAppDTO;
|
||||||
import cn.com.tenlion.systemcard.pojo.dtos.cardviolation.CardViolationDTO;
|
import cn.com.tenlion.systemcard.pojo.dtos.cardviolation.CardViolationDTO;
|
||||||
import cn.com.tenlion.systemcard.service.account.IAccountService;
|
import cn.com.tenlion.systemcard.service.account.IAccountService;
|
||||||
|
import cn.com.tenlion.systemcard.service.accountitem.IAccountItemService;
|
||||||
|
import cn.com.tenlion.systemcard.service.cardcharge.ICardChargeService;
|
||||||
|
import cn.com.tenlion.systemcard.service.cardtemplate.ICardTemplateService;
|
||||||
import cn.com.tenlion.systemcard.service.cardviolation.ICardViolationService;
|
import cn.com.tenlion.systemcard.service.cardviolation.ICardViolationService;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
|
import ink.wgink.module.wechat.pojo.pos.miniapp.MiniappUserPO;
|
||||||
|
import ink.wgink.module.wechat.service.miniapp.IMiniappUserService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestHeader;
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -33,10 +49,175 @@ public class CardBigdataAppController extends DefaultBaseController {
|
|||||||
private IAccountService accountService;
|
private IAccountService accountService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICardViolationService cardViolationService;
|
private ICardViolationService cardViolationService;
|
||||||
|
@Autowired
|
||||||
|
private ICardTemplateService iCardTemplateService;
|
||||||
|
@Autowired
|
||||||
|
private IAccountService iAccountService;
|
||||||
|
@Autowired
|
||||||
|
private IMiniappUserService iMiniappUserService;
|
||||||
|
@Autowired
|
||||||
|
private IAccountItemService iAccountItemService;
|
||||||
|
@Autowired
|
||||||
|
private ICardChargeService iCardChargeService;
|
||||||
|
|
||||||
@ApiOperation(value = "名片系统违规记录表分页列表", notes = "名片系统违规记录表分页列表接口")
|
@ApiOperation(value = "今日缴费列表", notes = "今日缴费列表L0001")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "10"),
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("systemchargelist")
|
||||||
|
public BigDataResult systemChargeList() {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
int rows = params.get("rows") == null ? 10 : Integer.valueOf(params.get("rows").toString());
|
||||||
|
BigDataResult result = BigDataResult.getInstance();
|
||||||
|
Map<String, Object> query = new HashMap<String, Object>();
|
||||||
|
List<CardChargeDTO> list = iCardChargeService.getToDayList(query);
|
||||||
|
List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
|
||||||
|
int index = 0;
|
||||||
|
for(CardChargeDTO dto : list) {
|
||||||
|
if(index >= rows) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
MiniappUserPO user = iMiniappUserService.getPO(dto.getCardChargeUserId());
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
String cardChargeInvitationUserId = dto.getCardChargeInvitationUserId();
|
||||||
|
String invitationNickName = "";
|
||||||
|
if(!StringUtils.isEmpty(cardChargeInvitationUserId)) {
|
||||||
|
MiniappUserPO miniappUserPO = iMiniappUserService.getPO(cardChargeInvitationUserId);
|
||||||
|
if(miniappUserPO != null) {
|
||||||
|
invitationNickName = miniappUserPO.getNickName() + " 通过转发.邀请"+ user.getNickName();
|
||||||
|
}else{
|
||||||
|
miniappUserPO = iMiniappUserService.getPOByUserCode(cardChargeInvitationUserId);
|
||||||
|
if(miniappUserPO != null) {
|
||||||
|
invitationNickName = miniappUserPO.getNickName() + " 通过邀请码.邀请" + user.getNickName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AccountDTO accountDTO = iAccountService.get(dto.getCardChargeUserId());
|
||||||
|
String city = "";
|
||||||
|
if (!StringUtils.isEmpty(accountDTO.getAccountCity())) {
|
||||||
|
city = "【" + accountDTO.getAccountCity() + "】";
|
||||||
|
}
|
||||||
|
map.put("title", user.getNickName() + city );
|
||||||
|
map.put("content", invitationNickName + "(开通|续费)" + ("1".equals(dto.getCardChargeMode()) ? "【个人标准版】" : "2".equals(dto.getCardChargeMode()) ? "【企业标准版】" : "【企业高级版】") + "。到期时间:" + dto.getCardChargeEnd());
|
||||||
|
map.put("date", dto.getCardChargeOrderTime());
|
||||||
|
resultList.add(map);
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
result.setList(resultList);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "今日收益额", notes = "今日收益额A0004")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "10"),
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("systemcharge")
|
||||||
|
public BigDataResult systemCharge() {
|
||||||
|
BigDataResult result = BigDataResult.getInstance();
|
||||||
|
Map<String, Object> query = new HashMap<String, Object>();
|
||||||
|
List<CardChargeDTO> list = iCardChargeService.getToDayList(query);
|
||||||
|
double totalValue = 0.00;
|
||||||
|
for(CardChargeDTO dto : list) {
|
||||||
|
if(dto.getCardChargePrice() != null) {
|
||||||
|
totalValue = totalValue + dto.getCardChargePrice();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
query.put("value", totalValue);
|
||||||
|
result.setData(query);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "邀请新用户收益排名", notes = "邀请新用户收益排名A0010")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||||
|
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||||
|
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("listpageaccountitem")
|
||||||
|
public BigDataResult listPageAccountItem(ListPage page) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
page.setParams(params);
|
||||||
|
SuccessResultList<List<AccountItemMoneyDTO>> list = iAccountItemService.listPageMoney(page);
|
||||||
|
List<List<String>> resultList = new ArrayList<List<String>>();
|
||||||
|
int index = 1;
|
||||||
|
for(AccountItemMoneyDTO dto : list.getRows()) {
|
||||||
|
List<String> contentList = new ArrayList<String>();
|
||||||
|
MiniappUserPO user = iMiniappUserService.getPO(dto.getAccountId());
|
||||||
|
contentList.add(index + "");
|
||||||
|
contentList.add(user.getUserCode());
|
||||||
|
contentList.add(StringUtils.isEmpty(user.getNickName()) ? "用户未授权" : user.getNickName() );
|
||||||
|
contentList.add((dto.getTotalMoney() / 100.00 ) + "RMB");
|
||||||
|
resultList.add(contentList);
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
BigDataResult result = BigDataResult.getInstance();
|
||||||
|
result.setList(resultList);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "今日新用户", notes = "今日新用户接口A0012")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||||
|
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||||
|
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("listpageaccount")
|
||||||
|
public BigDataResult listPageAccount( ListPage page) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
page.setParams(params);
|
||||||
|
SuccessResultList<List<AccountDTO>> list = iAccountService.listPage(page);
|
||||||
|
List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
|
||||||
|
int index = 1;
|
||||||
|
for(AccountDTO dto : list.getRows()) {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
String city = "";
|
||||||
|
if (!StringUtils.isEmpty(dto.getAccountCity())) {
|
||||||
|
city = "【" + dto.getAccountCity() + "】";
|
||||||
|
}
|
||||||
|
MiniappUserPO user = iMiniappUserService.getPO(dto.getAccountId());
|
||||||
|
map.put("content", index + "、" + ( StringUtils.isEmpty(user.getNickName()) ? "用户未授权" : user.getNickName()) + city );
|
||||||
|
map.put("src", user.getAvatarUrl());
|
||||||
|
resultList.add(map);
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
BigDataResult result = BigDataResult.getInstance();
|
||||||
|
result.setList(resultList);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "名片使用次数统计接口", notes = "名片使用次数统计Z0004")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "templateMode", value = "1(名片)2(海报)", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("listpagecard")
|
||||||
|
public BigDataResult listPageCard( ListPage page) throws Exception {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
params.put("templateMode", params.get("templateMode") == null ? "1" : params.get("templateMode"));// 加载用途为海报
|
||||||
|
params.put("templateStatus", "1");// 发布状态为已发布
|
||||||
|
List<CardTemplateAppDTO> list = iCardTemplateService.listToApp(null, params);
|
||||||
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||||
|
for(CardTemplateAppDTO dto : list) {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
map.put("name", dto.getPicturesTemplateCode());
|
||||||
|
map.put("value", dto.getPicturesTemplateNumber());
|
||||||
|
resultList.add(map);
|
||||||
|
}
|
||||||
|
BigDataResult result = BigDataResult.getInstance();
|
||||||
|
result.setList(resultList);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "名片系统违规记录表分页列表", notes = "名片系统违规记录表分页列表接口A0008")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
|
||||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||||
@ -45,10 +226,22 @@ public class CardBigdataAppController extends DefaultBaseController {
|
|||||||
})
|
})
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@GetMapping("listpageviolation")
|
@GetMapping("listpageviolation")
|
||||||
public SuccessResultList<List<CardViolationDTO>> listPage( ListPage page) {
|
public BigDataResult listPageViolation( ListPage page) {
|
||||||
Map<String, Object> params = requestParams();
|
Map<String, Object> params = requestParams();
|
||||||
page.setParams(params);
|
page.setParams(params);
|
||||||
return cardViolationService.listPage(page);
|
SuccessResultList<List<CardViolationDTO>> list = cardViolationService.listPage(page);
|
||||||
|
List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
|
||||||
|
for(CardViolationDTO dto : list.getRows()) {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
map.put("title", (StringUtils.isEmpty(dto.getCardViolationUserNickName()) ? "用户未授权" : dto.getCardViolationUserNickName()) + " 发布的 " + ("1".equals(dto.getCardViolationType()) ? "名片" : "2".equals(dto.getCardViolationType()) ? "栏目" : "海报") + "内容违规" );
|
||||||
|
map.put("content", dto.getCardViolationRemark());
|
||||||
|
map.put("level", dto.getCardViolationLevel());
|
||||||
|
map.put("date", dto.getGmtCreate());
|
||||||
|
resultList.add(map);
|
||||||
|
}
|
||||||
|
BigDataResult result = BigDataResult.getInstance();
|
||||||
|
result.setList(resultList);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package cn.com.tenlion.systemcard.dao.accountitem;
|
package cn.com.tenlion.systemcard.dao.accountitem;
|
||||||
|
|
||||||
|
import cn.com.tenlion.systemcard.pojo.dtos.accountitem.AccountItemMoneyDTO;
|
||||||
import cn.com.tenlion.systemcard.pojo.dtos.accountitem.MyAccountItemDTO;
|
import cn.com.tenlion.systemcard.pojo.dtos.accountitem.MyAccountItemDTO;
|
||||||
import ink.wgink.exceptions.RemoveException;
|
import ink.wgink.exceptions.RemoveException;
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
@ -128,4 +129,6 @@ public interface IAccountItemDao {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer getSysMoneyTotal(Map<String, Object> params);
|
Integer getSysMoneyTotal(Map<String, Object> params);
|
||||||
|
|
||||||
|
List<AccountItemMoneyDTO> listPageMoney(Map<String, Object> params);
|
||||||
}
|
}
|
@ -126,4 +126,6 @@ public interface ICardChargeDao {
|
|||||||
CardChargeDTO getChargeByOrderNumber(String cardChargeOrderNumber);
|
CardChargeDTO getChargeByOrderNumber(String cardChargeOrderNumber);
|
||||||
|
|
||||||
List<CardChargeDTO> getNotPayList(Map<String, Object> query) throws SearchException;
|
List<CardChargeDTO> getNotPayList(Map<String, Object> query) throws SearchException;
|
||||||
|
|
||||||
|
List<CardChargeDTO> getToDayList(Map<String, Object> map) throws SearchException;
|
||||||
}
|
}
|
@ -46,6 +46,26 @@ public class AccountDTO {
|
|||||||
private String gmtModified;
|
private String gmtModified;
|
||||||
@ApiModelProperty(name = "isDelete", value = "")
|
@ApiModelProperty(name = "isDelete", value = "")
|
||||||
private Integer isDelete;
|
private Integer isDelete;
|
||||||
|
@ApiModelProperty(name = "accountIp", value = "")
|
||||||
|
private String accountIp;
|
||||||
|
@ApiModelProperty(name = "accountCity", value = "")
|
||||||
|
private String accountCity;
|
||||||
|
|
||||||
|
public String getAccountIp() {
|
||||||
|
return accountIp == null ? "" : accountIp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccountIp(String accountIp) {
|
||||||
|
this.accountIp = accountIp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAccountCity() {
|
||||||
|
return accountCity == null ? "" : accountCity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccountCity(String accountCity) {
|
||||||
|
this.accountCity = accountCity;
|
||||||
|
}
|
||||||
|
|
||||||
public String getUserUsername() {
|
public String getUserUsername() {
|
||||||
return userUsername == null ? "" : userUsername;
|
return userUsername == null ? "" : userUsername;
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
package cn.com.tenlion.systemcard.pojo.dtos.accountitem;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
public class AccountItemMoneyDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "accountId", value = "账户ID")
|
||||||
|
private String accountId;
|
||||||
|
@ApiModelProperty(name = "totalMoney", value = "总金额")
|
||||||
|
private Integer totalMoney;
|
||||||
|
|
||||||
|
public Integer getTotalMoney() {
|
||||||
|
return totalMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalMoney(Integer totalMoney) {
|
||||||
|
this.totalMoney = totalMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAccountId() {
|
||||||
|
return accountId == null ? "" : accountId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccountId(String accountId) {
|
||||||
|
this.accountId = accountId;
|
||||||
|
}
|
||||||
|
}
|
@ -32,6 +32,26 @@ public class AccountVO {
|
|||||||
private String accountPassword;
|
private String accountPassword;
|
||||||
@ApiModelProperty(name = "accountSign", value = "账户信息")
|
@ApiModelProperty(name = "accountSign", value = "账户信息")
|
||||||
private String accountSign;
|
private String accountSign;
|
||||||
|
@ApiModelProperty(name = "accountIp", value = "账户登录IP")
|
||||||
|
private String accountIp;
|
||||||
|
@ApiModelProperty(name = "accountCity", value = "账户登录城市")
|
||||||
|
private String accountCity;
|
||||||
|
|
||||||
|
public String getAccountIp() {
|
||||||
|
return accountIp == null ? "" : accountIp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccountIp(String accountIp) {
|
||||||
|
this.accountIp = accountIp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAccountCity() {
|
||||||
|
return accountCity == null ? "" : accountCity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccountCity(String accountCity) {
|
||||||
|
this.accountCity = accountCity;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getAccountMoney() {
|
public Integer getAccountMoney() {
|
||||||
return accountMoney == null ? 0 : accountMoney;
|
return accountMoney == null ? 0 : accountMoney;
|
||||||
|
@ -4,6 +4,8 @@ import cn.com.tenlion.systemcard.pojo.dtos.account.AccountDTO;
|
|||||||
import cn.com.tenlion.systemcard.pojo.vos.account.AccountVO;
|
import cn.com.tenlion.systemcard.pojo.vos.account.AccountVO;
|
||||||
import cn.com.tenlion.systemcard.service.account.IAccountService;
|
import cn.com.tenlion.systemcard.service.account.IAccountService;
|
||||||
import cn.com.tenlion.systemcard.service.cardcharge.ICardChargeService;
|
import cn.com.tenlion.systemcard.service.cardcharge.ICardChargeService;
|
||||||
|
import cn.com.tenlion.systemcard.util.BaiDuUtil;
|
||||||
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.module.wechat.pojo.pay.v3.PayNoticeCiphertext;
|
import ink.wgink.module.wechat.pojo.pay.v3.PayNoticeCiphertext;
|
||||||
import ink.wgink.module.wechat.pojo.pos.miniapp.MiniappUserPO;
|
import ink.wgink.module.wechat.pojo.pos.miniapp.MiniappUserPO;
|
||||||
import ink.wgink.module.wechat.service.miniapp.IMiniappUserCreateHandleService;
|
import ink.wgink.module.wechat.service.miniapp.IMiniappUserCreateHandleService;
|
||||||
@ -13,10 +15,14 @@ import ink.wgink.service.user.pojo.pos.UserPO;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Primary
|
@Primary
|
||||||
public class UserService implements IMiniappUserCreateHandleService {
|
public class UserService extends DefaultBaseService implements IMiniappUserCreateHandleService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IAccountService iAccountService;
|
private IAccountService iAccountService;
|
||||||
@ -24,11 +30,25 @@ public class UserService implements IMiniappUserCreateHandleService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IMiniappUserService iMiniappUserService;
|
private IMiniappUserService iMiniappUserService;
|
||||||
|
|
||||||
|
private String getRemortIP() throws Exception {
|
||||||
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||||
|
String ip = "";
|
||||||
|
if (request.getHeader("x-forwarded-for") == null) {
|
||||||
|
ip = request.getRemoteAddr();
|
||||||
|
}else{
|
||||||
|
ip = request.getHeader("x-forwarded-for");
|
||||||
|
}
|
||||||
|
return ip;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(UserPO userPO, String s) throws Exception {
|
public void handle(UserPO userPO, String s) throws Exception {
|
||||||
/**
|
/**
|
||||||
* 查询是否已经创建 , 如果创建则不执行
|
* 查询是否已经创建 , 如果创建则不执行
|
||||||
*/
|
*/
|
||||||
|
String ip = "116.113.1.245";
|
||||||
|
String city = BaiDuUtil.getIpPosition(ip).getName();
|
||||||
|
LOG.info(userPO.getUserId() + "、IP:" + ip + "、地址:" + city);
|
||||||
AccountDTO accountDTO = iAccountService.get(userPO.getUserId());
|
AccountDTO accountDTO = iAccountService.get(userPO.getUserId());
|
||||||
MiniappUserPO miniappUserPO = iMiniappUserService.getPO(userPO.getUserId());
|
MiniappUserPO miniappUserPO = iMiniappUserService.getPO(userPO.getUserId());
|
||||||
if(accountDTO == null) {
|
if(accountDTO == null) {
|
||||||
@ -39,6 +59,8 @@ public class UserService implements IMiniappUserCreateHandleService {
|
|||||||
accountVO.setAccountPassword("");
|
accountVO.setAccountPassword("");
|
||||||
accountVO.setAccountStatus("1");
|
accountVO.setAccountStatus("1");
|
||||||
accountVO.setAccountUserId(userPO.getUserId());
|
accountVO.setAccountUserId(userPO.getUserId());
|
||||||
|
accountVO.setAccountCity(city);
|
||||||
|
accountVO.setAccountIp(ip);
|
||||||
iAccountService.saveAccount(userPO.getUserId(), accountVO);
|
iAccountService.saveAccount(userPO.getUserId(), accountVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cn.com.tenlion.systemcard.service.accountitem;
|
package cn.com.tenlion.systemcard.service.accountitem;
|
||||||
|
|
||||||
|
import cn.com.tenlion.systemcard.pojo.dtos.accountitem.AccountItemMoneyDTO;
|
||||||
import cn.com.tenlion.systemcard.pojo.dtos.accountitem.MyAccountItemDTO;
|
import cn.com.tenlion.systemcard.pojo.dtos.accountitem.MyAccountItemDTO;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
@ -199,4 +200,6 @@ public interface IAccountItemService {
|
|||||||
AccountItemDTO getByOrderNumber(String orderNumber);
|
AccountItemDTO getByOrderNumber(String orderNumber);
|
||||||
|
|
||||||
Integer getSysMoneyTotal(Map<String, Object> params);
|
Integer getSysMoneyTotal(Map<String, Object> params);
|
||||||
|
|
||||||
|
SuccessResultList<List<AccountItemMoneyDTO>> listPageMoney(ListPage page);
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package cn.com.tenlion.systemcard.service.accountitem.impl;
|
package cn.com.tenlion.systemcard.service.accountitem.impl;
|
||||||
|
|
||||||
|
import cn.com.tenlion.systemcard.pojo.dtos.accountitem.AccountItemMoneyDTO;
|
||||||
import cn.com.tenlion.systemcard.pojo.dtos.accountitem.MyAccountItemDTO;
|
import cn.com.tenlion.systemcard.pojo.dtos.accountitem.MyAccountItemDTO;
|
||||||
import cn.com.tenlion.systemcard.pojo.dtos.accountwithdraw.AccountWithdrawDTO;
|
import cn.com.tenlion.systemcard.pojo.dtos.accountwithdraw.AccountWithdrawDTO;
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
@ -200,6 +201,14 @@ public class AccountItemServiceImpl extends DefaultBaseService implements IAccou
|
|||||||
return accountItemDao.getSysMoneyTotal(params);
|
return accountItemDao.getSysMoneyTotal(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SuccessResultList<List<AccountItemMoneyDTO>> listPageMoney(ListPage page) {
|
||||||
|
PageHelper.startPage(page.getPage(), page.getRows());
|
||||||
|
List<AccountItemMoneyDTO> accountItemDTOs = accountItemDao.listPageMoney(page.getParams());
|
||||||
|
PageInfo<AccountItemMoneyDTO> pageInfo = new PageInfo<>(accountItemDTOs);
|
||||||
|
return new SuccessResultList<>(accountItemDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected SecurityComponent securityComponent;
|
protected SecurityComponent securityComponent;
|
||||||
|
|
||||||
|
@ -243,4 +243,12 @@ public interface ICardChargeService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<CardChargeDTO> listNotCheckOrder(Map<String, Object> query);
|
List<CardChargeDTO> listNotCheckOrder(Map<String, Object> query);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取今日的充值列表
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<CardChargeDTO> getToDayList(Map<String, Object> map);
|
||||||
|
|
||||||
}
|
}
|
@ -654,4 +654,9 @@ public class CardChargeServiceImpl extends DefaultBaseService implements ICardCh
|
|||||||
return cardChargeDao.listNotCheckOrder(query);
|
return cardChargeDao.listNotCheckOrder(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CardChargeDTO> getToDayList(Map<String, Object> map) {
|
||||||
|
return cardChargeDao.getToDayList(map);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -205,6 +205,9 @@ public class CardTemplateServiceImpl extends DefaultBaseService implements ICard
|
|||||||
|
|
||||||
private String getUserId(String token) throws Exception {
|
private String getUserId(String token) throws Exception {
|
||||||
String userId = "notUserId";
|
String userId = "notUserId";
|
||||||
|
if(StringUtils.isEmpty(token)) {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
if (StringUtils.isBlank(token)) {
|
if (StringUtils.isBlank(token)) {
|
||||||
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
|
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
|
||||||
userId = userInfoBO.getUserId();
|
userId = userInfoBO.getUserId();
|
||||||
|
54
src/main/java/cn/com/tenlion/systemcard/util/BaiDuUtil.java
Normal file
54
src/main/java/cn/com/tenlion/systemcard/util/BaiDuUtil.java
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
package cn.com.tenlion.systemcard.util;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.thymeleaf.util.StringUtils;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
public class BaiDuUtil {
|
||||||
|
|
||||||
|
private static String ak = "G0k574UiHH2TTg6iiAyHZk7FEXcnpIhS";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ip获取地理位置
|
||||||
|
* @param ip
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static MapPosition getIpPosition(String ip) {
|
||||||
|
MapPosition mapPosition = new MapPosition();
|
||||||
|
Map<String, Object> param = new HashMap<String, Object>();
|
||||||
|
param.put("ak", ak);
|
||||||
|
param.put("coor", "bd09II");
|
||||||
|
param.put("ip", ip);
|
||||||
|
try {
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
String result = HttpUtil.doGet("http://api.map.baidu.com/location/ip", param);
|
||||||
|
String resultCode = StringUtils.unescapeJava(result);
|
||||||
|
String status = JSONObject.parseObject(resultCode).getString("status");
|
||||||
|
if("0".equals(status)) {
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(resultCode).getJSONObject("content");
|
||||||
|
JSONObject detail = (JSONObject) jsonObject.get("address_detail");
|
||||||
|
JSONObject point = (JSONObject) jsonObject.get("point");
|
||||||
|
String address = jsonObject.getString("address");
|
||||||
|
mapPosition.setDescription(address);
|
||||||
|
mapPosition.setCity(detail.getString("city"));
|
||||||
|
mapPosition.setDistrict(detail.getString("district"));
|
||||||
|
mapPosition.setProvince(detail.getString("province"));
|
||||||
|
mapPosition.setStreet(detail.getString("street"));
|
||||||
|
mapPosition.setStreetNumber(detail.getString("street_number"));
|
||||||
|
mapPosition.setLongitude(point.getDouble("x"));
|
||||||
|
mapPosition.setLatitude(point.getDouble("y"));
|
||||||
|
return mapPosition;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
return mapPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
MapPosition c = getIpPosition("109.94.171.221");
|
||||||
|
System.out.println(c);
|
||||||
|
}
|
||||||
|
}
|
194
src/main/java/cn/com/tenlion/systemcard/util/MapPosition.java
Normal file
194
src/main/java/cn/com/tenlion/systemcard/util/MapPosition.java
Normal file
@ -0,0 +1,194 @@
|
|||||||
|
package cn.com.tenlion.systemcard.util;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import com.github.pagehelper.util.StringUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地图位置对象
|
||||||
|
* ClassName: MapPosition
|
||||||
|
* @Description: TODO
|
||||||
|
* 创建工具: MyEclipse2014
|
||||||
|
* 运行环境: [Tomcat7以上,MySql5.6以上,JDK7以上]
|
||||||
|
* @author 崔宝铖
|
||||||
|
* @date 2019年6月19日
|
||||||
|
*/
|
||||||
|
public class MapPosition implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 速度 时/公里
|
||||||
|
*/
|
||||||
|
public Double speed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 记录时间
|
||||||
|
*/
|
||||||
|
public String createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
public Double longitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
public Double latitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 位置名称(国-省-市-县-街-号)
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 位置详细描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国家
|
||||||
|
*/
|
||||||
|
private String country;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 县
|
||||||
|
*/
|
||||||
|
private String district;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 街道
|
||||||
|
*/
|
||||||
|
private String street;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 街道编号
|
||||||
|
*/
|
||||||
|
private String streetNumber;
|
||||||
|
|
||||||
|
public Double getSpeed() {
|
||||||
|
return speed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSpeed(Double speed) {
|
||||||
|
this.speed = speed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapPosition() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapPosition(Double longitude, Double latitude) {
|
||||||
|
super();
|
||||||
|
this.longitude = longitude;
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapPosition(Double longitude, Double latitude, String createTime) {
|
||||||
|
super();
|
||||||
|
this.createTime = createTime;
|
||||||
|
this.longitude = longitude;
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCountry() {
|
||||||
|
return country;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProvince() {
|
||||||
|
return province;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCity() {
|
||||||
|
return city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDistrict() {
|
||||||
|
return district;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStreet() {
|
||||||
|
return street;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStreetNumber() {
|
||||||
|
return streetNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCountry(String country) {
|
||||||
|
this.country = country;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProvince(String province) {
|
||||||
|
this.province = province;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCity(String city) {
|
||||||
|
this.city = city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistrict(String district) {
|
||||||
|
this.district = district;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStreet(String street) {
|
||||||
|
this.street = street;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStreetNumber(String streetNumber) {
|
||||||
|
this.streetNumber = streetNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return (StringUtil.isEmpty(province) ? "" : (province)) + (StringUtil.isEmpty(city) ? "" : ("-" + city)) + (StringUtil.isEmpty(district) ? "" : ("-" + district)) + (StringUtil.isEmpty(street) ? "" : ("-" + street)) + (StringUtil.isEmpty(streetNumber) ? "" : ("-" + streetNumber));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getLongitude() {
|
||||||
|
return longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getLatitude() {
|
||||||
|
return latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLongitude(Double longitude) {
|
||||||
|
this.longitude = longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLatitude(Double latitude) {
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "MapPosition [createTime="
|
||||||
|
+ createTime + ", longitude=" + longitude + ", latitude="
|
||||||
|
+ latitude + ", name=" + name + ", description=" + description
|
||||||
|
+ ", country=" + country + ", province=" + province + ", city="
|
||||||
|
+ city + ", district=" + district + ", street=" + street
|
||||||
|
+ ", streetNumber=" + streetNumber + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -19,6 +19,7 @@ public class PayUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("逯");
|
String ip = "116.113.1.245";
|
||||||
|
System.out.println(BaiDuUtil.getIpPosition(ip).getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
<result column="account_password" property="accountPassword"/>
|
<result column="account_password" property="accountPassword"/>
|
||||||
<result column="user_username" property="userUsername"/>
|
<result column="user_username" property="userUsername"/>
|
||||||
<result column="account_sign" property="accountSign"/>
|
<result column="account_sign" property="accountSign"/>
|
||||||
|
<result column="account_ip" property="accountIp"/>
|
||||||
|
<result column="account_city" property="accountCity"/>
|
||||||
<result column="creator" property="creator"/>
|
<result column="creator" property="creator"/>
|
||||||
<result column="gmt_create" property="gmtCreate"/>
|
<result column="gmt_create" property="gmtCreate"/>
|
||||||
<result column="modifier" property="modifier"/>
|
<result column="modifier" property="modifier"/>
|
||||||
@ -82,6 +84,8 @@
|
|||||||
account_status,
|
account_status,
|
||||||
account_password,
|
account_password,
|
||||||
account_sign,
|
account_sign,
|
||||||
|
account_ip,
|
||||||
|
account_city,
|
||||||
creator,
|
creator,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
modifier,
|
modifier,
|
||||||
@ -96,6 +100,8 @@
|
|||||||
#{accountStatus},
|
#{accountStatus},
|
||||||
#{accountPassword},
|
#{accountPassword},
|
||||||
#{accountSign},
|
#{accountSign},
|
||||||
|
#{accountIp},
|
||||||
|
#{accountCity},
|
||||||
#{creator},
|
#{creator},
|
||||||
#{gmtCreate},
|
#{gmtCreate},
|
||||||
#{modifier},
|
#{modifier},
|
||||||
@ -174,7 +180,9 @@
|
|||||||
t1.account_password,
|
t1.account_password,
|
||||||
t1.account_sign,
|
t1.account_sign,
|
||||||
t1.account_id,
|
t1.account_id,
|
||||||
t1.gmt_create
|
t1.gmt_create,
|
||||||
|
t1.account_ip,
|
||||||
|
t1.account_city
|
||||||
FROM
|
FROM
|
||||||
e_account t1
|
e_account t1
|
||||||
WHERE
|
WHERE
|
||||||
@ -253,7 +261,9 @@
|
|||||||
t1.modifier,
|
t1.modifier,
|
||||||
t1.gmt_modified,
|
t1.gmt_modified,
|
||||||
t1.is_delete,
|
t1.is_delete,
|
||||||
t2.user_username
|
t2.user_username,
|
||||||
|
t1.account_ip,
|
||||||
|
t1.account_city
|
||||||
FROM
|
FROM
|
||||||
e_account t1
|
e_account t1
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
|
@ -29,6 +29,11 @@
|
|||||||
<result column="is_delete" property="isDelete"/>
|
<result column="is_delete" property="isDelete"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="accountItemMoneyDTO" type="cn.com.tenlion.systemcard.pojo.dtos.accountitem.AccountItemMoneyDTO">
|
||||||
|
<result column="account_id" property="accountId"/>
|
||||||
|
<result column="total_money" property="totalMoney"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="myAccountItemDTO" type="cn.com.tenlion.systemcard.pojo.dtos.accountitem.MyAccountItemDTO">
|
<resultMap id="myAccountItemDTO" type="cn.com.tenlion.systemcard.pojo.dtos.accountitem.MyAccountItemDTO">
|
||||||
<result column="account_item_id" property="accountItemId"/>
|
<result column="account_item_id" property="accountItemId"/>
|
||||||
<result column="account_item_description" property="accountItemDescription"/>
|
<result column="account_item_description" property="accountItemDescription"/>
|
||||||
@ -97,6 +102,21 @@
|
|||||||
<result column="is_delete" property="isDelete"/>
|
<result column="is_delete" property="isDelete"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 邀请人员最多的用户排名 -->
|
||||||
|
<select id="listPageMoney" parameterType="map" resultMap="accountItemMoneyDTO">
|
||||||
|
SELECT
|
||||||
|
ANY_VALUE(t1.account_id) AS account_id,
|
||||||
|
SUM(t1.account_item_sys_money + t1.account_item_wx_money) AS total_money
|
||||||
|
FROM
|
||||||
|
e_account_item t1
|
||||||
|
WHERE
|
||||||
|
t1.is_delete = 0 AND t1.account_item_mode = '1' AND (t1.account_item_type = '邀请使用名片服务收益' OR t1.account_item_type = '邀请续费名片服务收益')
|
||||||
|
GROUP BY
|
||||||
|
t1.account_id
|
||||||
|
ORDER BY
|
||||||
|
total_money DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- 获取订单号关联的流水 -->
|
<!-- 获取订单号关联的流水 -->
|
||||||
<select id="getByOrderNumber" parameterType="java.lang.String" resultMap="myAccountItemDTO">
|
<select id="getByOrderNumber" parameterType="java.lang.String" resultMap="myAccountItemDTO">
|
||||||
SELECT
|
SELECT
|
||||||
@ -114,7 +134,7 @@
|
|||||||
FROM
|
FROM
|
||||||
e_account_item t1
|
e_account_item t1
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0 AND t1.account_item_mode = '1' AND t1.account_item_type = '邀请收益' AND t1.account_item_wx_order = #{accountItemWxOrder}
|
t1.is_delete = 0 AND t1.account_item_mode = '1' AND (t1.account_item_type = '邀请使用名片服务收益' OR t1.account_item_type = '邀请续费名片服务收益') AND t1.account_item_wx_order = #{accountItemWxOrder}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 获取转发邀请收益金额 -->
|
<!-- 获取转发邀请收益金额 -->
|
||||||
@ -124,7 +144,7 @@
|
|||||||
FROM
|
FROM
|
||||||
e_account_item t1
|
e_account_item t1
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0 AND t1.account_item_mode = '1' AND t1.account_item_type = '邀请收益' AND t1.account_id = #{userId}
|
t1.is_delete = 0 AND t1.account_item_mode = '1' AND (t1.account_item_type = '邀请使用名片服务收益' OR t1.account_item_type = '邀请续费名片服务收益') AND t1.account_id = #{userId}
|
||||||
<if test="month != null and month != ''">
|
<if test="month != null and month != ''">
|
||||||
AND DATE_FORMAT(t1.gmt_create, '%Y%m' ) = DATE_FORMAT( CURDATE() ,'%Y%m' )
|
AND DATE_FORMAT(t1.gmt_create, '%Y%m' ) = DATE_FORMAT( CURDATE() ,'%Y%m' )
|
||||||
</if>
|
</if>
|
||||||
|
@ -59,6 +59,34 @@
|
|||||||
<result column="is_delete" property="isDelete"/>
|
<result column="is_delete" property="isDelete"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 查询今日的充值记录-->
|
||||||
|
<select id="getToDayList" parameterType="map" resultMap="cardChargeDTO">
|
||||||
|
SELECT
|
||||||
|
t1.card_charge_price,
|
||||||
|
t1.card_charge_end,
|
||||||
|
t1.card_charge_mode,
|
||||||
|
t1.card_charge_company_id,
|
||||||
|
t1.card_charge_company_number,
|
||||||
|
t1.card_charge_status,
|
||||||
|
t1.card_charge_remark,
|
||||||
|
t1.card_charge_id,
|
||||||
|
t1.card_charge_user_id,
|
||||||
|
t1.card_charge_invitation_user_id,
|
||||||
|
t1.card_charge_order_number,
|
||||||
|
t1.card_charge_order_status,
|
||||||
|
t1.card_charge_order_time,
|
||||||
|
t1.card_template_id,
|
||||||
|
t1.card_charge_order_out_time,
|
||||||
|
t1.card_charge_role
|
||||||
|
FROM
|
||||||
|
e_card_charge t1
|
||||||
|
WHERE
|
||||||
|
t1.is_delete = 0 AND TO_DAYS(t1.card_charge_order_time) = TO_DAYS(NOW()) AND t1.card_charge_order_status = '2' AND t1.card_charge_order_time != '' AND t1.card_charge_order_time IS NOT NULL
|
||||||
|
AND (t1.card_charge_mode = '1' OR t1.card_charge_mode = '2' OR t1.card_charge_mode = '3')
|
||||||
|
ORDER BY
|
||||||
|
t1.card_charge_order_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- 查询我所有的未付款订单 -->
|
<!-- 查询我所有的未付款订单 -->
|
||||||
<select id="getNotPayList" parameterType="map" resultMap="cardChargeDTO">
|
<select id="getNotPayList" parameterType="map" resultMap="cardChargeDTO">
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -156,6 +156,15 @@
|
|||||||
return '<button type="button" class="layui-btn layui-btn-danger layui-btn-xs">冻结</button>';
|
return '<button type="button" class="layui-btn layui-btn-danger layui-btn-xs">冻结</button>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{field: 'accountCity', width: 250, title: '首次使用地', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user