bug修改
This commit is contained in:
parent
bbded088aa
commit
3054607717
@ -908,6 +908,7 @@ export default {
|
||||
|
||||
|
||||
console.log(" this.dataForm", this.dataForm)
|
||||
this.title = '修改礼品'
|
||||
|
||||
this.open = true;
|
||||
this.getList();
|
||||
|
@ -61,13 +61,13 @@
|
||||
<el-col :span="2.5">
|
||||
<div class="box">
|
||||
<span class="font-chinese">商品数量</span>
|
||||
<span class="font-number">{{statisticsForm.exchangeQuantity}}</span>
|
||||
<span class="font-number">{{statisticsForm.exchangeQuantity?statisticsForm.exchangeQuantity:0}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="2.5">
|
||||
<div class="box">
|
||||
<span class="font-chinese">积分</span>
|
||||
<span class="font-number">{{statisticsForm.integral}}</span>
|
||||
<span class="font-number">{{statisticsForm.integral?statisticsForm.integral:0}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
@ -78,7 +78,7 @@
|
||||
<i class="el-icon-info"></i>
|
||||
</el-tooltip>
|
||||
</span>
|
||||
<span class="font-number">{{statisticsForm.amount}}</span>
|
||||
<span class="font-number">{{statisticsForm.amount?statisticsForm.amount:0}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -88,7 +88,8 @@
|
||||
<el-table ref="tables"
|
||||
v-loading="loading"
|
||||
:data="dataList"
|
||||
:default-sort="defaultSort">
|
||||
:default-sort="defaultSort"
|
||||
>
|
||||
<el-table-column label="用户手机号" align="center" prop="mobile"/>
|
||||
<el-table-column label="订单号" align="center" prop="orderNumber"/>
|
||||
<el-table-column label="商品信息" align="center" prop="" >
|
||||
@ -196,10 +197,10 @@ export default {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
getStatistics() {
|
||||
getStatisticsApi().then(res=>{
|
||||
|
||||
getStatisticsApi({orderType: 1}).then(res=>{
|
||||
this.statisticsForm = res.data
|
||||
})
|
||||
console.log("123123123",this.statisticsForm)
|
||||
},
|
||||
|
||||
handleUpdate(){},
|
||||
|
@ -123,8 +123,8 @@ public class IntegralOrdersController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/statistics")
|
||||
public ResponseObject statistics() {
|
||||
return getSuccessResult(this.integralOrdersService.statistics());
|
||||
public ResponseObject statistics(Integer orderType) {
|
||||
return getSuccessResult(this.integralOrdersService.statistics(orderType));
|
||||
}
|
||||
|
||||
|
||||
|
@ -94,7 +94,7 @@ public interface IntegralOrdersMapper {
|
||||
* 统计数据
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> statistics(@Param("storeId") Integer storeId);
|
||||
Map<String, String> statistics(@Param("storeId") Integer storeId, @Param("orderType") Integer orderType);
|
||||
|
||||
List<IntegralOrders> getListByOrderNo(@Param("orderNumber") String orderNumber,@Param("storeId") Integer storeId);
|
||||
|
||||
|
@ -131,7 +131,7 @@
|
||||
<if test="integralOrders.status != null and integralOrders.status != ''">
|
||||
and io.status = #{integralOrders.status}
|
||||
</if>
|
||||
<if test="integralOrders.orderType != null and integralOrders.orderType != ''">
|
||||
<if test="integralOrders.orderType != null">
|
||||
and io.order_type = #{integralOrders.orderType}
|
||||
</if>
|
||||
<if test="integralOrders.processingResult != null and integralOrders.processingResult != ''">
|
||||
@ -303,6 +303,9 @@
|
||||
SUM(CASE WHEN order_status IN ('已拒绝', '已退款') THEN 1 ELSE 0 END) AS refuse
|
||||
from integral_orders
|
||||
where store_id = #{storeId}
|
||||
<if test="orderType != null">
|
||||
and order_type = #{orderType}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
|
@ -64,7 +64,7 @@ public interface IntegralOrdersService {
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
Map<String, String> statistics();
|
||||
Map<String, String> statistics(Integer orderType);
|
||||
|
||||
IntegralOrders integralOrdersProcessing(IntegralOrdersRequest integralOrdersList);
|
||||
|
||||
|
@ -93,7 +93,9 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
||||
public IPage<IntegralOrdersVO> queryByPage(@Param("page") Page page, @Param("integralOrders") IntegralOrdersDTO integralOrders) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
integralOrders.setStoreId(nowAccountInfo.getStoreId());
|
||||
return integralOrdersDao.queryAllByLimit(page, integralOrders);
|
||||
IPage<IntegralOrdersVO> integralOrdersVOIPage = integralOrdersDao.queryAllByLimit(page, integralOrders);
|
||||
|
||||
return integralOrdersVOIPage;
|
||||
}
|
||||
|
||||
|
||||
@ -149,9 +151,9 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> statistics() {
|
||||
public Map<String, String> statistics(Integer orderType) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
return this.integralOrdersDao.statistics(nowAccountInfo.getStoreId());
|
||||
return this.integralOrdersDao.statistics(nowAccountInfo.getStoreId(),orderType);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -166,7 +168,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
||||
double epsilon = 1e-10; // 阈值
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
// 当为小程序下单时
|
||||
if (ObjectUtil.isNotEmpty(integralOrdersList.getOrderChannel()) & integralOrdersList.getOrderChannel() == -1) {
|
||||
if (ObjectUtil.isNotEmpty(integralOrdersList.getOrderChannel()) && integralOrdersList.getOrderChannel() == -1) {
|
||||
nowAccountInfo.setChainStoreId(integralOrdersList.getChainStoreId());
|
||||
nowAccountInfo.setStoreId(integralOrdersList.getStoreId());
|
||||
integralOrdersList.getIntegralOrdersList().get(0).setUserId(nowAccountInfo.getId());
|
||||
@ -174,6 +176,13 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
||||
}
|
||||
// 首先判断是否足够积分
|
||||
LJUserVo ljUserVos = ljUserMapper.selectAllInfoById2(integralOrdersList.getIntegralOrdersList().get(0).getUserId(), nowAccountInfo.getChainStoreId());
|
||||
if (ObjectUtil.isEmpty(ljUserVos)) {
|
||||
// 个人信息为空时,初始化
|
||||
// return
|
||||
// userBalanceService.initBalance(integralOrdersList.getIntegralOrdersList().get(0).getUserId(), nowAccountInfo.getChainStoreId());
|
||||
// ljUserVos = ljUserMapper.selectAllInfoById2(integralOrdersList.getIntegralOrdersList().get(0).getUserId(), nowAccountInfo.getChainStoreId());
|
||||
}
|
||||
|
||||
if (ljUserVos.getPoints() < integralOrdersList.getAllPoints()) {
|
||||
integralOrdersList.getIntegralOrdersList().get(0).setStatus("un");
|
||||
return integralOrdersList.getIntegralOrdersList().get(0);
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.common.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@ -292,6 +293,7 @@ public class WeixinServiceImpl implements WeixinService {
|
||||
try {
|
||||
String response = HttpRESTDataClient.requestGet(url);
|
||||
JSONObject json = (JSONObject) JSONObject.parse(response);
|
||||
|
||||
if (!json.containsKey("errcode")) {
|
||||
logger.error("拿到code信息:code = " + json);
|
||||
|
||||
@ -314,6 +316,8 @@ public class WeixinServiceImpl implements WeixinService {
|
||||
String wxAccessUrl = "https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code";
|
||||
String url = String.format(wxAccessUrl, wxAppId, wxAppSecret, code);
|
||||
try {
|
||||
// JSONObject wxProfile = getWxProfile(null, code);
|
||||
|
||||
String response = HttpRESTDataClient.requestGet(url);
|
||||
JSONObject json = (JSONObject) JSONObject.parse(response);
|
||||
if (!json.containsKey("errcode")) {
|
||||
|
@ -17,4 +17,5 @@ public class LoginResponse implements Serializable {
|
||||
private Date tokenExpiryTime;
|
||||
private String token;
|
||||
private Integer chainStoreId;
|
||||
private String phone;
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ import com.fuint.utils.StringUtil;
|
||||
import io.lettuce.core.ScriptOutputType;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authc.UsernamePasswordToken;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
@ -55,6 +56,7 @@ import java.util.Map;
|
||||
@Api(tags="会员端-登录相关接口")
|
||||
@RestController
|
||||
@RequestMapping(value = "/clientApi/sign")
|
||||
@Slf4j
|
||||
public class ClientSignController extends BaseController {
|
||||
|
||||
/**
|
||||
@ -135,13 +137,15 @@ public class ClientSignController extends BaseController {
|
||||
if (loginInfo == null) {
|
||||
return getFailureResult(0, "微信登录失败");
|
||||
}
|
||||
// 获取用户的个人信息
|
||||
String phoneNumber = weixinService.getPhoneNumber(param.get("encryptedData").toString(), loginInfo.get("session_key").toString(), param.get("encryptedIv").toString());
|
||||
userInfo.put("phone",phoneNumber);
|
||||
|
||||
MtUser mtUser = memberService.queryMemberByOpenId2(loginInfo.get("openid").toString(), userInfo);
|
||||
if (mtUser == null) {
|
||||
return getFailureResult(0, "用户状态异常");
|
||||
}
|
||||
|
||||
|
||||
logger.error("loginInfo{}",loginInfo.toString());
|
||||
|
||||
String userAgent = request.getHeader("user-agent");
|
||||
AccountInfo accountInfo = new AccountInfo();
|
||||
@ -158,6 +162,7 @@ public class ClientSignController extends BaseController {
|
||||
response.setChainStoreId(ljStore.getChainStoreId());
|
||||
response.setToken(token);
|
||||
response.setTokenCreatedTime(new Date());
|
||||
// response.setPhone(phoneNumber);
|
||||
|
||||
return getSuccessResult("登录成功", response);
|
||||
}
|
||||
|
@ -223,7 +223,7 @@
|
||||
if (uni.getStorageSync("storeId")) {
|
||||
this.storeId = uni.getStorageSync("storeId")
|
||||
} else {
|
||||
let storeId = "12";
|
||||
let storeId = "34";
|
||||
|
||||
uni.setStorageSync("storeId", storeId)
|
||||
}
|
||||
|
@ -98,7 +98,7 @@
|
||||
<text v-else-if="(
|
||||
item.exchangeMethod == '积分' ||
|
||||
item.exchangeMethod == '积分+金额' ) &&
|
||||
item.remainingInventory>myPoints" style="color: darkgray;">积分不足</text>
|
||||
item.exchangePoints>myPoints" style="color: darkgray;">积分不足</text>
|
||||
<text v-else-if="item.ifRedemptionIsOnline" style="color: darkgray;">达到兑换上限</text>
|
||||
<text v-else>立即兑换</text>
|
||||
</view>
|
||||
@ -212,13 +212,15 @@
|
||||
async godetails(data) {
|
||||
|
||||
let flag = await this.checkTheRedemptionLimit(data.giftId)
|
||||
console.log("data.remainingInventory", data.exchangePoints)
|
||||
console.log("this.myPoints", this.myPoints)
|
||||
|
||||
if (data.remainingInventory == 0) {
|
||||
uni.showToast({
|
||||
title: "该商品库存不足!",
|
||||
icon: "none"
|
||||
})
|
||||
} else if (data.remainingInventory > this.myPoints && (
|
||||
} else if (data.exchangePoints > this.myPoints && (
|
||||
data.exchangeMethod == '积分' ||
|
||||
data.exchangeMethod == '积分+金额')) {
|
||||
uni.showToast({
|
||||
|
@ -71,7 +71,7 @@
|
||||
authCode: authCode,
|
||||
storeId: 0,
|
||||
staffId: "",
|
||||
phone: "18457621459",
|
||||
phone: "16548796325",
|
||||
},
|
||||
}).then((resp) => {
|
||||
console.log(resp)
|
||||
@ -347,4 +347,4 @@
|
||||
border: 1px solid #0078FF;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -35,6 +35,22 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
||||
<!--打印的依赖start-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>net.java.dev.jna</groupId>-->
|
||||
<!-- <artifactId>jna</artifactId>-->
|
||||
<!-- <version>3.2.5</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
<version>5.10.0</version> <!-- 请使用最新版本 -->
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
@ -85,12 +101,20 @@
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.5.21</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Redisson 锁功能 -->
|
||||
<dependency>
|
||||
<groupId>org.redisson</groupId>
|
||||
<artifactId>redisson-spring-boot-starter</artifactId>
|
||||
<version>3.16.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
@ -184,6 +208,12 @@
|
||||
<version>2.2.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba.rocketmq</groupId>-->
|
||||
<!-- <artifactId>rocketmq-client</artifactId>-->
|
||||
<!-- <version>2.2.1</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- 微信支付 SDK -->
|
||||
<dependency>
|
||||
<groupId>com.github.wxpay</groupId>
|
||||
|
Loading…
Reference in New Issue
Block a user