查询套餐券列表时,如果过期且未使用,将其状态修改为已过期
This commit is contained in:
76
.idea/workspace.xml
generated
76
.idea/workspace.xml
generated
@ -6,8 +6,8 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="bdad98b9-7a5e-48f7-b79e-ed6a34d55dab" name="Default Changelist" comment="第一次提交">
|
<list default="true" id="bdad98b9-7a5e-48f7-b79e-ed6a34d55dab" name="Default Changelist" comment="第一次提交">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/code/com/wisdo/mmining/config/shiro/ShiroConfiguration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/code/com/wisdo/mmining/config/shiro/ShiroConfiguration.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/code/com/wisdo/mmining/util/excel/ExcelUntils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/code/com/wisdo/mmining/util/excel/ExcelUntils.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/wisdo/mmining/api/OrderApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/wisdo/mmining/api/OrderApi.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/wisdo/mmining/api/UserApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/wisdo/mmining/api/UserApi.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/resources/application-db.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application-db.yml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/resources/application-db.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application-db.yml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.yml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.yml" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
@ -447,33 +447,33 @@
|
|||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
<component name="PropertiesComponent">{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"Maven.wisdommining [clean].executor": "Run",
|
"Maven.wisdommining [clean].executor": "Run",
|
||||||
"Maven.wisdommining [package].executor": "Run",
|
"Maven.wisdommining [package].executor": "Run",
|
||||||
"RequestMappingsPanelOrder0": "0",
|
"RequestMappingsPanelOrder0": "0",
|
||||||
"RequestMappingsPanelOrder1": "1",
|
"RequestMappingsPanelOrder1": "1",
|
||||||
"RequestMappingsPanelWidth0": "75",
|
"RequestMappingsPanelWidth0": "75",
|
||||||
"RequestMappingsPanelWidth1": "75",
|
"RequestMappingsPanelWidth1": "75",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"Spring Boot.WisdoMminingApplication.executor": "Debug",
|
"Spring Boot.WisdoMminingApplication.executor": "Debug",
|
||||||
"dart.analysis.tool.window.visible": "false",
|
"dart.analysis.tool.window.visible": "false",
|
||||||
"git-widget-placeholder": "master",
|
"git-widget-placeholder": "master",
|
||||||
"kotlin-language-version-configured": "true",
|
"kotlin-language-version-configured": "true",
|
||||||
"last_opened_file_path": "D:/Documents/AndroidStudioProjects/logistics_tools",
|
"last_opened_file_path": "D:/Documents/AndroidStudioProjects/logistics_tools",
|
||||||
"node.js.detected.package.eslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"nodejs_package_manager_path": "npm",
|
"nodejs_package_manager_path": "npm",
|
||||||
"project.structure.last.edited": "SDK",
|
"project.structure.last.edited": "SDK",
|
||||||
"project.structure.proportion": "0.0",
|
"project.structure.proportion": "0.0",
|
||||||
"project.structure.side.proportion": "0.2",
|
"project.structure.side.proportion": "0.2",
|
||||||
"settings.editor.selected.configurable": "preferences.pluginManager",
|
"settings.editor.selected.configurable": "preferences.pluginManager",
|
||||||
"show.migrate.to.gradle.popup": "false",
|
"show.migrate.to.gradle.popup": "false",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"vue.rearranger.settings.migration": "true"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}</component>
|
||||||
<component name="ReactorSettings">
|
<component name="ReactorSettings">
|
||||||
<option name="notificationShown" value="true" />
|
<option name="notificationShown" value="true" />
|
||||||
</component>
|
</component>
|
||||||
@ -652,7 +652,9 @@
|
|||||||
<workItem from="1719207318590" duration="683000" />
|
<workItem from="1719207318590" duration="683000" />
|
||||||
<workItem from="1719210374799" duration="28000" />
|
<workItem from="1719210374799" duration="28000" />
|
||||||
<workItem from="1719296864680" duration="33000" />
|
<workItem from="1719296864680" duration="33000" />
|
||||||
<workItem from="1719564748404" duration="335000" />
|
<workItem from="1719564748404" duration="2015000" />
|
||||||
|
<workItem from="1719795551124" duration="6472000" />
|
||||||
|
<workItem from="1720079374607" duration="5264000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="第一次提交">
|
<task id="LOCAL-00001" summary="第一次提交">
|
||||||
<created>1623736948713</created>
|
<created>1623736948713</created>
|
||||||
@ -786,6 +788,22 @@
|
|||||||
<MESSAGE value="测试提交" />
|
<MESSAGE value="测试提交" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="测试提交" />
|
<option name="LAST_COMMIT_MESSAGE" value="测试提交" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="XDebuggerManager">
|
||||||
|
<breakpoint-manager>
|
||||||
|
<breakpoints>
|
||||||
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
|
<url>file://$PROJECT_DIR$/src/main/java/com/wisdo/mmining/service/impl/OrderServiceImpl.java</url>
|
||||||
|
<line>397</line>
|
||||||
|
<option name="timeStamp" value="16" />
|
||||||
|
</line-breakpoint>
|
||||||
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
|
<url>file://$PROJECT_DIR$/src/main/java/com/wisdo/mmining/service/impl/OrderServiceImpl.java</url>
|
||||||
|
<line>400</line>
|
||||||
|
<option name="timeStamp" value="17" />
|
||||||
|
</line-breakpoint>
|
||||||
|
</breakpoints>
|
||||||
|
</breakpoint-manager>
|
||||||
|
</component>
|
||||||
<component name="XSLT-Support.FileAssociations.UIState">
|
<component name="XSLT-Support.FileAssociations.UIState">
|
||||||
<expand />
|
<expand />
|
||||||
<select />
|
<select />
|
||||||
|
@ -49,6 +49,7 @@ public class ExcelUntils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入
|
* 导入
|
||||||
|
*
|
||||||
* @param in
|
* @param in
|
||||||
* @param fileName
|
* @param fileName
|
||||||
* @return
|
* @return
|
||||||
@ -80,7 +81,8 @@ public class ExcelUntils {
|
|||||||
List<Object> li = new ArrayList<>();
|
List<Object> li = new ArrayList<>();
|
||||||
for (int y = row.getFirstCellNum(); y < row.getLastCellNum(); y++) {
|
for (int y = row.getFirstCellNum(); y < row.getLastCellNum(); y++) {
|
||||||
cell = row.getCell(y);
|
cell = row.getCell(y);
|
||||||
cell.setCellType(Cell.CELL_TYPE_STRING);
|
// FIXME: 方法抛出 'java.lang.NumberFormatException' 异常。 无法对 org.apache.poi.xssf.usermodel.XSSFCell.toString() 求值
|
||||||
|
// FIXME: cell.setCellType(Cell.CELL_TYPE_STRING);
|
||||||
li.add(cell);
|
li.add(cell);
|
||||||
}
|
}
|
||||||
list.add(li);
|
list.add(li);
|
||||||
|
@ -17,6 +17,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import org.gavaghan.geodesy.Ellipsoid;
|
import org.gavaghan.geodesy.Ellipsoid;
|
||||||
import org.gavaghan.geodesy.GlobalCoordinates;
|
import org.gavaghan.geodesy.GlobalCoordinates;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
@ -323,6 +324,7 @@ public class UserApi {
|
|||||||
|
|
||||||
@ApiOperation(value = "获取套餐券")
|
@ApiOperation(value = "获取套餐券")
|
||||||
@GetMapping("getUserPackage")
|
@GetMapping("getUserPackage")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result getUserPackage(Long userId, Integer type) {
|
public Result getUserPackage(Long userId, Integer type) {
|
||||||
WisdWxuser wxuser = wxuserService.getById(userId);
|
WisdWxuser wxuser = wxuserService.getById(userId);
|
||||||
QueryWrapper<WisdUserPackage> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<WisdUserPackage> queryWrapper = new QueryWrapper<>();
|
||||||
@ -333,7 +335,13 @@ public class UserApi {
|
|||||||
List<WisdPackage> wisdPackageList = new ArrayList<>();
|
List<WisdPackage> wisdPackageList = new ArrayList<>();
|
||||||
for (WisdUserPackage wisdUserPackage : wisdUserPackageList) {
|
for (WisdUserPackage wisdUserPackage : wisdUserPackageList) {
|
||||||
WisdPackage wisdPackage = packageService.getById(wisdUserPackage.getPackageId());
|
WisdPackage wisdPackage = packageService.getById(wisdUserPackage.getPackageId());
|
||||||
wisdPackageList.add(wisdPackage);
|
// 套餐券已过期并且未使用,则将其设改为已过期
|
||||||
|
if (wisdPackage.getPackageEndTime().getTime() < System.currentTimeMillis() && wisdUserPackage.getIsUsed().equals(0)) {
|
||||||
|
wisdUserPackage.setIsUsed(2);
|
||||||
|
userPackageService.updateById(wisdUserPackage);
|
||||||
|
} else {
|
||||||
|
wisdPackageList.add(wisdPackage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return new Result(ResultUtil.SUCCESS, ResultUtil.SUCCESS_DATA, wisdPackageList);
|
return new Result(ResultUtil.SUCCESS, ResultUtil.SUCCESS_DATA, wisdPackageList);
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
#开发环境
|
#开发环境
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://192.168.0.233:3306/wisdo?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://192.168.0.233:3306/wisdo?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
|
||||||
# url: jdbc:mysql://146.56.198.32:3306/wisdo?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
|
url: jdbc:mysql://146.56.198.32:3306/wisdo?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
|
||||||
username: yshop
|
# username: yshop
|
||||||
# username: root
|
username: root
|
||||||
password: Qwer1234.
|
# password: Qwer1234.
|
||||||
# password: Sphc666888!
|
password: Sphc666888!
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
druid:
|
druid:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
server:
|
server:
|
||||||
port: 9000
|
# port: 9000
|
||||||
# port: 9090
|
port: 9090
|
||||||
servlet:
|
servlet:
|
||||||
context-path: /wisdommining
|
context-path: /wisdommining
|
||||||
spring:
|
spring:
|
||||||
@ -39,8 +39,8 @@ spring:
|
|||||||
# port: 6379
|
# port: 6379
|
||||||
redis:
|
redis:
|
||||||
database: 10
|
database: 10
|
||||||
host: localhost
|
# host: localhost
|
||||||
# host: 146.56.198.32
|
host: 146.56.198.32
|
||||||
timeout: 100000
|
timeout: 100000
|
||||||
jedis:
|
jedis:
|
||||||
pool:
|
pool:
|
||||||
@ -49,8 +49,8 @@ spring:
|
|||||||
max-idle: 8
|
max-idle: 8
|
||||||
min-idle: 0
|
min-idle: 0
|
||||||
port: 6379
|
port: 6379
|
||||||
# password: Zsd@2021!
|
password: Zsd@2021!
|
||||||
password:
|
# password:
|
||||||
|
|
||||||
|
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
|
Reference in New Issue
Block a user