功能完善

This commit is contained in:
bns_han 2024-02-21 18:26:53 +08:00
parent 3474556833
commit 12ef28f592
7 changed files with 132 additions and 6 deletions

View File

@ -1,5 +1,7 @@
package com.bonus.sgzb.app.controller;
import com.bonus.sgzb.app.domain.AppVersion;
import com.bonus.sgzb.app.domain.BackApplyInfo;
import com.bonus.sgzb.app.domain.CriticalData;
import com.bonus.sgzb.app.domain.ToDoList;
import com.bonus.sgzb.app.service.AppService;
@ -8,9 +10,11 @@ import com.bonus.sgzb.common.log.annotation.Log;
import com.bonus.sgzb.common.log.enums.BusinessType;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import static com.bonus.sgzb.common.core.web.domain.AjaxResult.success;
/**
* @author c liu
@ -28,7 +32,7 @@ public class AppController {
public AjaxResult getCriticalData()
{
CriticalData data = service.getCriticalData();
return AjaxResult.success("操作成功",data);
return success("操作成功",data);
}
@ApiOperation(value = "查询待办事项")
@ -37,6 +41,24 @@ public class AppController {
public AjaxResult getToDoList()
{
ToDoList data = service.getToDoList();
return AjaxResult.success("操作成功",data);
return success("操作成功",data);
}
/**
* 获取app版本信息
*
* @param
* @return AjaxResult对象
*/
@Log(title = "获取app版本信息", businessType = BusinessType.QUERY)
@GetMapping("/getVersion")
public AjaxResult getVersion() {
try {
List<AppVersion> list = service.getVersion();
return success(list);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

View File

@ -0,0 +1,60 @@
package com.bonus.sgzb.app.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @description app版本
* @author hay
* @date 2024/2/21 15:00
*/
@Data
public class AppVersion {
/**
* 版本号
*/
@ApiModelProperty(value = "version")
private int version;
/**
* 版本名称
*/
@ApiModelProperty(value = "versionName")
private String versionName;
/**
* apk名称
*/
@ApiModelProperty(value = "apkName")
private String apkName;
/**
* apk路径
*/
@ApiModelProperty(value = "apkPath")
private String apkPath;
/**
* 更新内容
*/
@ApiModelProperty(value = "updateContent")
private String updateContent;
/**
* 部署时间
*/
@ApiModelProperty(value = "deployTime")
private String deployTime;
/**
* 部署人员
*/
@ApiModelProperty(value = "deployUser")
private String deployUser;
/**
* 备注
*/
@ApiModelProperty(value = "remark")
private String remark;
}

View File

@ -1,8 +1,11 @@
package com.bonus.sgzb.app.mapper;
import com.bonus.sgzb.app.domain.AppVersion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author c liu
* @date 2023/12/11
@ -62,4 +65,11 @@ public interface AppMapper {
* @return
*/
int getTrialNum();
/**
* 获取app版本信息
* @param
* @return List<AppVersion>
*/
List<AppVersion> getVersion();
}

View File

@ -1,8 +1,11 @@
package com.bonus.sgzb.app.service;
import com.bonus.sgzb.app.domain.AppVersion;
import com.bonus.sgzb.app.domain.CriticalData;
import com.bonus.sgzb.app.domain.ToDoList;
import java.util.List;
/**
* @author c liu
* @date 2023/12/11
@ -20,4 +23,11 @@ public interface AppService {
* @return
*/
ToDoList getToDoList();
/**
* 获取app版本信息
* @param
* @return List<AppVersion>
*/
List<AppVersion> getVersion();
}

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.app.service.impl;
import com.bonus.sgzb.app.domain.AppVersion;
import com.bonus.sgzb.app.domain.CriticalData;
import com.bonus.sgzb.app.domain.ToDoList;
import com.bonus.sgzb.app.mapper.AppMapper;
@ -8,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.util.List;
/**
* @author c liu
@ -49,4 +51,12 @@ public class AppServiceImpl implements AppService {
data.setTrialNum(trialNum);
return data;
}
/**
* 获取app版本信息
*/
@Override
public List<AppVersion> getVersion() {
return mapper.getVersion();
}
}

View File

@ -43,4 +43,17 @@
from tm_task
where task_type = '45' and task_status = '46' and status = '1'
</select>
<select id="getVersion" resultType="com.bonus.sgzb.app.domain.AppVersion">
SELECT version,
version_name as versionName,
apk_name AS apkName,
apk_path AS apkPath,
update_content AS updateContent,
deploy_time AS deployTime,
deploy_user AS deployUser,
remark
FROM app_version
WHERE is_active = '1'
ORDER BY version + 0 DESC LIMIT 1
</select>
</mapper>

View File

@ -458,7 +458,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join ma_supplier_info msi on pcd.supplier_id = msi.supplier_id
left join tm_task tk on pcd.task_id = tk.task_id
where
pcd.`status`=3 and pcd.`status`=1
1=1
and (pcd.`status`=3 or pcd.`status`=1)
<if test="taskId != null ">and pcd.task_id = #{taskId}</if>
<if test="keyWord != null and keyWord != ''">and (mt.pa_name like concat('%',#{keyWord},'%')
or mt1.pa_name like concat('%',#{keyWord}) or msi.supplier like concat('%',#{keyWord}))