Merge remote-tracking branch 'origin/weiran'
commit
c64db627a0
|
@ -40,5 +40,35 @@ public class UserProductCount {
|
|||
*/
|
||||
private Integer testCount;
|
||||
|
||||
public Integer getTestId() {
|
||||
return testId;
|
||||
}
|
||||
|
||||
public void setTestId(Integer testId) {
|
||||
this.testId = testId;
|
||||
}
|
||||
|
||||
public long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Integer getProductId() {
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setProductId(Integer productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Integer getTestCount() {
|
||||
return testCount;
|
||||
}
|
||||
|
||||
public void setTestCount(Integer testCount) {
|
||||
this.testCount = testCount;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@ public class ProducttestController {
|
|||
@Operation(summary = "测试次数-1",description = "测试次数-1")
|
||||
public void reducetestcount(@Validated @RequestBody UserProductCount userProductCount){
|
||||
Integer reducetestcount = producttestService.reducetestcount(userProductCount);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -36,10 +36,10 @@ public class ProducttestServiceImpl extends ServiceImpl<ProducttestMapper, UserP
|
|||
*/
|
||||
@Override
|
||||
public UserProductCount findcount(UserProductCount userProductCount, HttpServletRequest request) {
|
||||
String token = SecurityUtils.getToken();// 获取当前Token
|
||||
LoginUser loginUser = tokenService.getLoginUser(token); // 获取当前登录用户
|
||||
Long userid = loginUser.getUserid();
|
||||
userProductCount.setUserId(userid);
|
||||
// String token = SecurityUtils.getToken();// 获取当前Token
|
||||
// LoginUser loginUser = tokenService.getLoginUser(token); // 获取当前登录用户
|
||||
// Long userid = loginUser.getUserid();
|
||||
// userProductCount.setUserId(userid);
|
||||
return producttestMapper.findcount(userProductCount);
|
||||
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
left join product on user_product_count.product_id=product.product_id
|
||||
<where>
|
||||
and user_product_count.user_id=#{userId}
|
||||
<if test="product_id!=null and product_id!=''">
|
||||
<if test="productId!=null">
|
||||
and user_product_count.product_id=#{productId}
|
||||
</if>
|
||||
</where>
|
||||
|
|
Loading…
Reference in New Issue