查询套餐券列表时,如果过期且未使用,将其状态修改为已过期
This commit is contained in:
76
.idea/workspace.xml
generated
76
.idea/workspace.xml
generated
@ -6,8 +6,8 @@
|
||||
<component name="ChangeListManager">
|
||||
<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$/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/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/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/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.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.yml" afterDir="false" />
|
||||
</list>
|
||||
@ -447,33 +447,33 @@
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"Maven.wisdommining [clean].executor": "Run",
|
||||
"Maven.wisdommining [package].executor": "Run",
|
||||
"RequestMappingsPanelOrder0": "0",
|
||||
"RequestMappingsPanelOrder1": "1",
|
||||
"RequestMappingsPanelWidth0": "75",
|
||||
"RequestMappingsPanelWidth1": "75",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"Spring Boot.WisdoMminingApplication.executor": "Debug",
|
||||
"dart.analysis.tool.window.visible": "false",
|
||||
"git-widget-placeholder": "master",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "D:/Documents/AndroidStudioProjects/logistics_tools",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"project.structure.last.edited": "SDK",
|
||||
"project.structure.proportion": "0.0",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"settings.editor.selected.configurable": "preferences.pluginManager",
|
||||
"show.migrate.to.gradle.popup": "false",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"Maven.wisdommining [clean].executor": "Run",
|
||||
"Maven.wisdommining [package].executor": "Run",
|
||||
"RequestMappingsPanelOrder0": "0",
|
||||
"RequestMappingsPanelOrder1": "1",
|
||||
"RequestMappingsPanelWidth0": "75",
|
||||
"RequestMappingsPanelWidth1": "75",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"Spring Boot.WisdoMminingApplication.executor": "Debug",
|
||||
"dart.analysis.tool.window.visible": "false",
|
||||
"git-widget-placeholder": "master",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "D:/Documents/AndroidStudioProjects/logistics_tools",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"project.structure.last.edited": "SDK",
|
||||
"project.structure.proportion": "0.0",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"settings.editor.selected.configurable": "preferences.pluginManager",
|
||||
"show.migrate.to.gradle.popup": "false",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
}</component>
|
||||
<component name="ReactorSettings">
|
||||
<option name="notificationShown" value="true" />
|
||||
</component>
|
||||
@ -652,7 +652,9 @@
|
||||
<workItem from="1719207318590" duration="683000" />
|
||||
<workItem from="1719210374799" duration="28000" />
|
||||
<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 id="LOCAL-00001" summary="第一次提交">
|
||||
<created>1623736948713</created>
|
||||
@ -786,6 +788,22 @@
|
||||
<MESSAGE value="测试提交" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="测试提交" />
|
||||
</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">
|
||||
<expand />
|
||||
<select />
|
||||
|
@ -49,6 +49,7 @@ public class ExcelUntils {
|
||||
|
||||
/**
|
||||
* 导入
|
||||
*
|
||||
* @param in
|
||||
* @param fileName
|
||||
* @return
|
||||
@ -80,7 +81,8 @@ public class ExcelUntils {
|
||||
List<Object> li = new ArrayList<>();
|
||||
for (int y = row.getFirstCellNum(); y < row.getLastCellNum(); 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);
|
||||
}
|
||||
list.add(li);
|
||||
|
@ -17,6 +17,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
import org.gavaghan.geodesy.Ellipsoid;
|
||||
import org.gavaghan.geodesy.GlobalCoordinates;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@ -323,6 +324,7 @@ public class UserApi {
|
||||
|
||||
@ApiOperation(value = "获取套餐券")
|
||||
@GetMapping("getUserPackage")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result getUserPackage(Long userId, Integer type) {
|
||||
WisdWxuser wxuser = wxuserService.getById(userId);
|
||||
QueryWrapper<WisdUserPackage> queryWrapper = new QueryWrapper<>();
|
||||
@ -333,8 +335,14 @@ public class UserApi {
|
||||
List<WisdPackage> wisdPackageList = new ArrayList<>();
|
||||
for (WisdUserPackage wisdUserPackage : wisdUserPackageList) {
|
||||
WisdPackage wisdPackage = packageService.getById(wisdUserPackage.getPackageId());
|
||||
// 套餐券已过期并且未使用,则将其设改为已过期
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
#开发环境
|
||||
spring:
|
||||
datasource:
|
||||
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
|
||||
username: yshop
|
||||
# username: root
|
||||
password: Qwer1234.
|
||||
# password: Sphc666888!
|
||||
# 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
|
||||
# username: yshop
|
||||
username: root
|
||||
# password: Qwer1234.
|
||||
password: Sphc666888!
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
druid:
|
||||
|
@ -1,6 +1,6 @@
|
||||
server:
|
||||
port: 9000
|
||||
# port: 9090
|
||||
# port: 9000
|
||||
port: 9090
|
||||
servlet:
|
||||
context-path: /wisdommining
|
||||
spring:
|
||||
@ -39,8 +39,8 @@ spring:
|
||||
# port: 6379
|
||||
redis:
|
||||
database: 10
|
||||
host: localhost
|
||||
# host: 146.56.198.32
|
||||
# host: localhost
|
||||
host: 146.56.198.32
|
||||
timeout: 100000
|
||||
jedis:
|
||||
pool:
|
||||
@ -49,8 +49,8 @@ spring:
|
||||
max-idle: 8
|
||||
min-idle: 0
|
||||
port: 6379
|
||||
# password: Zsd@2021!
|
||||
password:
|
||||
password: Zsd@2021!
|
||||
# password:
|
||||
|
||||
|
||||
mybatis-plus:
|
||||
|
Reference in New Issue
Block a user