| @@ -3,6 +3,7 @@ package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxWeappAuditStatus; | import com.iformall.domain.po.WxWeappAuditStatus; | ||||
| import com.iformall.domain.vo.WxWeappAuditStatusVo; | import com.iformall.domain.vo.WxWeappAuditStatusVo; | ||||
| import org.apache.ibatis.annotations.Param; | |||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -13,7 +14,7 @@ public interface WxWeappAuditStatusMapper extends CommonMapper<WxWeappAuditStatu | |||||
| List<WxWeappAuditStatusVo> findVoList(WxWeappAuditStatusVo weappAuditStatusVo); | List<WxWeappAuditStatusVo> findVoList(WxWeappAuditStatusVo weappAuditStatusVo); | ||||
| List<Map> findUserVersions(); | |||||
| List<Map> findUserVersions(@Param(value = "type") Integer type); | |||||
| void updateStatus(WxWeappAuditStatus record); | void updateStatus(WxWeappAuditStatus record); | ||||
| @@ -3,6 +3,7 @@ package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxWeappCodeStatus; | import com.iformall.domain.po.WxWeappCodeStatus; | ||||
| import com.iformall.domain.vo.WxWeappCodeStatusVo; | import com.iformall.domain.vo.WxWeappCodeStatusVo; | ||||
| import org.apache.ibatis.annotations.Param; | |||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -13,7 +14,7 @@ public interface WxWeappCodeStatusMapper extends CommonMapper<WxWeappCodeStatus, | |||||
| List<WxWeappCodeStatusVo> findVoList(WxWeappCodeStatusVo weappCodeStatusVo); | List<WxWeappCodeStatusVo> findVoList(WxWeappCodeStatusVo weappCodeStatusVo); | ||||
| List<Map> findUserVersions(); | |||||
| List<Map> findUserVersions(@Param(value = "type") Integer type); | |||||
| void updateStatus(WxWeappCodeStatus weappCodeStatus); | void updateStatus(WxWeappCodeStatus weappCodeStatus); | ||||
| @@ -3,6 +3,7 @@ package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxWeappReleaseStatus; | import com.iformall.domain.po.WxWeappReleaseStatus; | ||||
| import com.iformall.domain.vo.WxWeappReleaseStatusVo; | import com.iformall.domain.vo.WxWeappReleaseStatusVo; | ||||
| import org.apache.ibatis.annotations.Param; | |||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -13,7 +14,7 @@ public interface WxWeappReleaseStatusMapper extends CommonMapper<WxWeappReleaseS | |||||
| List<WxWeappReleaseStatusVo> findVoList(WxWeappReleaseStatusVo weappReleaseStatusVo); | List<WxWeappReleaseStatusVo> findVoList(WxWeappReleaseStatusVo weappReleaseStatusVo); | ||||
| List<Map> findUserVersions(); | |||||
| List<Map> findUserVersions(@Param(value = "type") Integer type); | |||||
| void updateStatus(WxWeappReleaseStatus weappRelaseStatus); | void updateStatus(WxWeappReleaseStatus weappRelaseStatus); | ||||
| @@ -32,7 +32,7 @@ public interface WxWeappAuditStatusService { | |||||
| * | * | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| List<Map> getVersionList(); | |||||
| List<Map> getVersionList(Integer type); | |||||
| /** | /** | ||||
| * 根据Id获得实体 | * 根据Id获得实体 | ||||
| @@ -32,7 +32,7 @@ public interface WxWeappCodeStatusService { | |||||
| * | * | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| List<Map> getVersionList(); | |||||
| List<Map> getVersionList(Integer type); | |||||
| /** | /** | ||||
| * 根据Id获得实体 | * 根据Id获得实体 | ||||
| @@ -35,7 +35,7 @@ public interface WxWeappReleaseStatusService { | |||||
| * | * | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| List<Map> getVersionList(); | |||||
| List<Map> getVersionList(Integer type); | |||||
| /** | /** | ||||
| * 根据Id获得实体 | * 根据Id获得实体 | ||||
| @@ -34,8 +34,8 @@ public class WxWeappAuditStatusServiceImpl implements WxWeappAuditStatusService | |||||
| } | } | ||||
| @Override | @Override | ||||
| public List<Map> getVersionList() { | |||||
| return weappAuditStatusMapper.findUserVersions(); | |||||
| public List<Map> getVersionList(Integer type) { | |||||
| return weappAuditStatusMapper.findUserVersions(type); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -36,8 +36,8 @@ public class WxWeappCodeStatusServiceImpl implements WxWeappCodeStatusService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public List<Map> getVersionList() { | |||||
| return weappCodeStatusMapper.findUserVersions(); | |||||
| public List<Map> getVersionList(Integer type) { | |||||
| return weappCodeStatusMapper.findUserVersions(type); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -9,6 +9,7 @@ import com.iformall.enums.EnumWeappReleaseStatus; | |||||
| import com.iformall.mapper.WxAuthorizerInfoMapper; | import com.iformall.mapper.WxAuthorizerInfoMapper; | ||||
| import com.iformall.mapper.WxWeappReleaseStatusMapper; | import com.iformall.mapper.WxWeappReleaseStatusMapper; | ||||
| import com.iformall.service.WxWeappReleaseStatusService; | import com.iformall.service.WxWeappReleaseStatusService; | ||||
| import org.omg.CORBA.INTERNAL; | |||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| @@ -40,8 +41,8 @@ public class WxWeappReleaseStatusServiceImpl implements WxWeappReleaseStatusServ | |||||
| } | } | ||||
| @Override | @Override | ||||
| public List<Map> getVersionList() { | |||||
| return weappReleaseStatusMapper.findUserVersions(); | |||||
| public List<Map> getVersionList(Integer type) { | |||||
| return weappReleaseStatusMapper.findUserVersions(type); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -62,6 +62,16 @@ | |||||
| where `app_id` = #{appId} and `type` = #{type} | where `app_id` = #{appId} and `type` = #{type} | ||||
| </update> | </update> | ||||
| <select id="findUserVersions" resultType="hashmap" > | |||||
| select user_version as version | |||||
| from wx_weapp_audit_status | |||||
| where 1=1 | |||||
| <if test=" null != type "> | |||||
| and `type` = #{type} | |||||
| </if> | |||||
| group by user_version | |||||
| </select> | |||||
| <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappAuditStatusVo"> | <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappAuditStatusVo"> | ||||
| <id column="id" jdbcType="BIGINT" property="id" /> | <id column="id" jdbcType="BIGINT" property="id" /> | ||||
| <result column="app_id" jdbcType="VARCHAR" property="appId" /> | <result column="app_id" jdbcType="VARCHAR" property="appId" /> | ||||
| @@ -118,12 +128,5 @@ | |||||
| left join wx_appinfo a on c.`app_id` = a.`app_id` | left join wx_appinfo a on c.`app_id` = a.`app_id` | ||||
| <include refid="dynamicVoWhereConditions" /> | <include refid="dynamicVoWhereConditions" /> | ||||
| </select> | </select> | ||||
| <select id="findUserVersions" parameterType="string" resultType="hashmap" > | |||||
| select user_version as version | |||||
| from wx_weapp_audit_status | |||||
| group by user_version | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||
| @@ -57,6 +57,15 @@ | |||||
| where `app_id` = #{appId} and `type` = #{type} | where `app_id` = #{appId} and `type` = #{type} | ||||
| </update> | </update> | ||||
| <select id="findUserVersions" resultType="hashmap" > | |||||
| select user_version as version | |||||
| from wx_weapp_code_status | |||||
| where 1=1 | |||||
| <if test=" null != type "> | |||||
| and `type` = #{type} | |||||
| </if> | |||||
| group by user_version | |||||
| </select> | |||||
| <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappCodeStatusVo"> | <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappCodeStatusVo"> | ||||
| <id column="id" jdbcType="BIGINT" property="id" /> | <id column="id" jdbcType="BIGINT" property="id" /> | ||||
| @@ -109,12 +118,4 @@ | |||||
| left join wx_appinfo a on c.`app_id` = a.`app_id` | left join wx_appinfo a on c.`app_id` = a.`app_id` | ||||
| <include refid="dynamicVoWhereConditions" /> | <include refid="dynamicVoWhereConditions" /> | ||||
| </select> | </select> | ||||
| <select id="findUserVersions" parameterType="string" resultType="hashmap" > | |||||
| select user_version as version | |||||
| from wx_weapp_code_status | |||||
| group by user_version | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||
| @@ -57,6 +57,15 @@ | |||||
| where `app_id` = #{appId} and `type` = #{type} | where `app_id` = #{appId} and `type` = #{type} | ||||
| </update> | </update> | ||||
| <select id="findUserVersions" resultType="hashmap" > | |||||
| select user_version as version | |||||
| from wx_weapp_release_status | |||||
| where 1 = 1 | |||||
| <if test=" null != type "> | |||||
| and `type` = #{type} | |||||
| </if> | |||||
| group by user_version | |||||
| </select> | |||||
| <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappReleaseStatusVo"> | <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappReleaseStatusVo"> | ||||
| <id column="id" jdbcType="BIGINT" property="id" /> | <id column="id" jdbcType="BIGINT" property="id" /> | ||||
| @@ -114,12 +123,5 @@ | |||||
| left join wx_appinfo a on c.`app_id` = a.`app_id` | left join wx_appinfo a on c.`app_id` = a.`app_id` | ||||
| <include refid="dynamicVoWhereConditions" /> | <include refid="dynamicVoWhereConditions" /> | ||||
| </select> | </select> | ||||
| <select id="findUserVersions" parameterType="string" resultType="hashmap" > | |||||
| select user_version as version | |||||
| from wx_weapp_release_status | |||||
| group by user_version | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||
| @@ -770,25 +770,31 @@ public class WxWeappInfoController extends BaseController { | |||||
| @ApiOperation("小程序code提交版本列表") | @ApiOperation("小程序code提交版本列表") | ||||
| @GetMapping("codeVersionList") | @GetMapping("codeVersionList") | ||||
| public ResultData getCodeVersionList() { | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "type", value = "小程序类型", dataType = "int", paramType = "query", required = true)}) | |||||
| public ResultData getCodeVersionList(Integer type) { | |||||
| logger.debug("[" + getIpAddr() + "] WxWeappInfoController::getCodeVersionList"); | logger.debug("[" + getIpAddr() + "] WxWeappInfoController::getCodeVersionList"); | ||||
| final List<Map> list = weappCodeStatusService.getVersionList(); | |||||
| final List<Map> list = weappCodeStatusService.getVersionList(type); | |||||
| return new ResultData(list); | return new ResultData(list); | ||||
| } | } | ||||
| @ApiOperation("小程序审核版本列表") | @ApiOperation("小程序审核版本列表") | ||||
| @GetMapping("auditVersionList") | @GetMapping("auditVersionList") | ||||
| public ResultData getAuditVersionList() { | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "type", value = "小程序类型", dataType = "int", paramType = "query", required = true)}) | |||||
| public ResultData getAuditVersionList(Integer type) { | |||||
| logger.debug("[" + getIpAddr() + "] WxWeappInfoController::getAuditVersionList"); | logger.debug("[" + getIpAddr() + "] WxWeappInfoController::getAuditVersionList"); | ||||
| final List<Map> list = weappAuditStatusService.getVersionList(); | |||||
| final List<Map> list = weappAuditStatusService.getVersionList(type); | |||||
| return new ResultData(list); | return new ResultData(list); | ||||
| } | } | ||||
| @ApiOperation("小程序发布版本列表") | @ApiOperation("小程序发布版本列表") | ||||
| @GetMapping("releaseVersionList") | @GetMapping("releaseVersionList") | ||||
| public ResultData getReleaseVersionList() { | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "type", value = "小程序类型", dataType = "int", paramType = "query", required = true)}) | |||||
| public ResultData getReleaseVersionList(Integer type) { | |||||
| logger.debug("[" + getIpAddr() + "] WxWeappInfoController::getReleaseVersionList"); | logger.debug("[" + getIpAddr() + "] WxWeappInfoController::getReleaseVersionList"); | ||||
| final List<Map> list = weappReleaseStatusService.getVersionList(); | |||||
| final List<Map> list = weappReleaseStatusService.getVersionList(type); | |||||
| return new ResultData(list); | return new ResultData(list); | ||||
| } | } | ||||