| @@ -68,6 +68,9 @@ public class WxProjectConfigController extends BaseController { | |||||
| @Autowired | @Autowired | ||||
| WxAuthorizerInfoService wxAuthorizerInfoService; | WxAuthorizerInfoService wxAuthorizerInfoService; | ||||
| @Autowired | |||||
| WxWeappExtSetService wxWeappExtSetService; | |||||
| @Autowired | @Autowired | ||||
| WxScoreRulesService wxScoreRulesService; | WxScoreRulesService wxScoreRulesService; | ||||
| @@ -125,7 +128,26 @@ public class WxProjectConfigController extends BaseController { | |||||
| logger.error(e.getMessage(),e); | logger.error(e.getMessage(),e); | ||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | return new ResultData(ErrorCode.SYS_SERVER_ERROR); | ||||
| } | } | ||||
| } | |||||
| @ApiOperation("查询商场集团列表(选择子集团)") | |||||
| @GetMapping(value = "/mallListbyMall") | |||||
| @SystemControllerLog(description = "商场基础数据") | |||||
| public ResultData mallListbyMall(@ModelAttribute WxMall wxMall) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::mallListbyMall"); | |||||
| try { | |||||
| if(wxMall == null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(wxMall.getId() == null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| List<WxMall> list = wxMallService.listAsSelectMall(wxMall.getId()); | |||||
| return new ResultData(); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | } | ||||
| @ApiOperation("添加修改商场集团") | @ApiOperation("添加修改商场集团") | ||||
| @@ -649,5 +671,35 @@ public class WxProjectConfigController extends BaseController { | |||||
| } | } | ||||
| } | } | ||||
| @ApiOperation("查询ext数据") | |||||
| @GetMapping(value = "/getExt/{appId}") | |||||
| @SystemControllerLog(description = "商场基础数据") | |||||
| public ResultData getExt(@PathVariable String appId) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::getExt"); | |||||
| try { | |||||
| if(StringUtils.isBlank(appId)){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| WxWeappExtSet byAppId = wxWeappExtSetService.getByAppId(appId); | |||||
| return new ResultData(byAppId); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| @ApiOperation("添加修改停车场配置") | |||||
| @PostMapping("/init/appExt") | |||||
| @SystemControllerLog(description = "商场停车场配置-更新") | |||||
| public ResultData initPark(@RequestBody WxWeappExtSet wxWeappExtSet) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initPark"); | |||||
| try { | |||||
| wxWeappExtSetService.updateById(wxWeappExtSet); | |||||
| return new ResultData(); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| } | } | ||||
| @@ -26,6 +26,8 @@ public class WxWeappExtSet extends BaseEntity { | |||||
| private String releaseJson; | private String releaseJson; | ||||
| @io.swagger.annotations.ApiModelProperty(value="停车(0:不支持,1:etcp)",name="carSupport") | @io.swagger.annotations.ApiModelProperty(value="停车(0:不支持,1:etcp)",name="carSupport") | ||||
| private Integer carSupport; | private Integer carSupport; | ||||
| @io.swagger.annotations.ApiModelProperty(value="菜单(0:全有,1:我的/首页, 2:无停车)",name="storeApp") | |||||
| private Integer storeApp; | |||||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | ||||
| private Date createDate; | private Date createDate; | ||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | ||||
| @@ -19,4 +19,6 @@ public interface WxMallMapper extends CommonMapper<WxMall, Long> { | |||||
| String queryMenusByTenantInfo(WxMall wxMall); | String queryMenusByTenantInfo(WxMall wxMall); | ||||
| void undateSubmall(@Param(value = "parentTenantId")String parentTenantId, @Param(value = "tenantIds")String[] tenantIds); | void undateSubmall(@Param(value = "parentTenantId")String parentTenantId, @Param(value = "tenantIds")String[] tenantIds); | ||||
| List<WxMall> listAsSelectMall(@Param(value = "id")Long id); | |||||
| } | } | ||||
| @@ -3,14 +3,11 @@ package com.iformall.mapper; | |||||
| import java.util.*; | import java.util.*; | ||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxWeappExtSet; | import com.iformall.domain.po.WxWeappExtSet; | ||||
| import org.apache.ibatis.annotations.Param; | |||||
| public interface WxWeappExtSetMapper extends CommonMapper<WxWeappExtSet, Long> { | public interface WxWeappExtSetMapper extends CommonMapper<WxWeappExtSet, Long> { | ||||
| List<WxWeappExtSet> findList(WxWeappExtSet wxWeappReleaseSet); | List<WxWeappExtSet> findList(WxWeappExtSet wxWeappReleaseSet); | ||||
| WxWeappExtSet getByAppId(@Param(value = "appid")String appid); | |||||
| } | } | ||||
| @@ -27,6 +27,7 @@ public interface WxMallService { | |||||
| * @return | * @return | ||||
| */ | */ | ||||
| PageInfo<WxMall> listAsPage(WxMall record, Integer pageIndex, Integer pageSize); | PageInfo<WxMall> listAsPage(WxMall record, Integer pageIndex, Integer pageSize); | ||||
| List<WxMall> findList(WxMall record); | |||||
| /** | /** | ||||
| * 根据Id获得实体 | * 根据Id获得实体 | ||||
| @@ -80,4 +81,6 @@ public interface WxMallService { | |||||
| List<WxMall> getSubByParentTenantId(String parentTenantId); | List<WxMall> getSubByParentTenantId(String parentTenantId); | ||||
| void undateSubmall(String parentTenantId, String[] tenantIds); | void undateSubmall(String parentTenantId, String[] tenantIds); | ||||
| List<WxMall> listAsSelectMall(Long id); | |||||
| } | } | ||||
| @@ -0,0 +1,8 @@ | |||||
| package com.iformall.service; | |||||
| import com.iformall.domain.po.WxWeappExtSet; | |||||
| public interface WxWeappExtSetService { | |||||
| WxWeappExtSet getByAppId(String appid); | |||||
| void updateById(WxWeappExtSet record); | |||||
| } | |||||
| @@ -85,6 +85,10 @@ public class WxMallServiceImpl implements WxMallService { | |||||
| public PageInfo<WxMall> listAsPage(WxMall record, Integer pageIndex, Integer pageSize) { | public PageInfo<WxMall> listAsPage(WxMall record, Integer pageIndex, Integer pageSize) { | ||||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMallMapper.findList(record)); | return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMallMapper.findList(record)); | ||||
| } | } | ||||
| @Override | |||||
| public List<WxMall> findList(WxMall record) { | |||||
| return wxMallMapper.findList(record); | |||||
| } | |||||
| @Override | @Override | ||||
| public WxMall getById(Long id) { | public WxMall getById(Long id) { | ||||
| @@ -299,6 +303,11 @@ public class WxMallServiceImpl implements WxMallService { | |||||
| wxMallMapper.undateSubmall(parentTenantId, tenantIds); | wxMallMapper.undateSubmall(parentTenantId, tenantIds); | ||||
| } | } | ||||
| @Override | |||||
| public List<WxMall> listAsSelectMall(Long id) { | |||||
| return wxMallMapper.listAsSelectMall(id); | |||||
| } | |||||
| private String getRedisKeyByTenantInfo(TenantEntity tenantEntity) { | private String getRedisKeyByTenantInfo(TenantEntity tenantEntity) { | ||||
| StringBuilder sb = new StringBuilder(); | StringBuilder sb = new StringBuilder(); | ||||
| sb.append(Constant.TENANT_KEY_PREV).append(tenantEntity.getTenantId()); | sb.append(Constant.TENANT_KEY_PREV).append(tenantEntity.getTenantId()); | ||||
| @@ -0,0 +1,28 @@ | |||||
| package com.iformall.service.impl; | |||||
| import com.iformall.domain.po.WxWeappExtSet; | |||||
| import com.iformall.mapper.WxWeappExtSetMapper; | |||||
| import com.iformall.service.WxWeappExtSetService; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | |||||
| @Service | |||||
| public class WxWeappExtSetServiceImpl implements WxWeappExtSetService { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| WxWeappExtSetMapper weappExtSetMapper; | |||||
| @Override | |||||
| public WxWeappExtSet getByAppId(String appid) { | |||||
| return weappExtSetMapper.getByAppId(appid); | |||||
| } | |||||
| @Override | |||||
| public void updateById(WxWeappExtSet record) { | |||||
| weappExtSetMapper.updateById(record); | |||||
| } | |||||
| } | |||||
| @@ -49,7 +49,7 @@ | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| where 1 = 1 | |||||
| where id > 1 | |||||
| <if test=" null != id "> | <if test=" null != id "> | ||||
| and `id` = #{id} | and `id` = #{id} | ||||
| @@ -150,6 +150,15 @@ | |||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||
| <select id="listAsSelectMall" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_mall | |||||
| where id > 1 | |||||
| and (`parent_tenant_id` is null or `parent_tenant_id` = #{id} or `parent_tenant_id` = '') | |||||
| </select> | |||||
| <select id="getByTenantId" parameterType="string" resultMap="BaseResultMap"> | <select id="getByTenantId" parameterType="string" resultMap="BaseResultMap"> | ||||
| select | select | ||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||
| @@ -8,12 +8,13 @@ | |||||
| <result column="ext_json" jdbcType="VARCHAR" property="extJson"/> | <result column="ext_json" jdbcType="VARCHAR" property="extJson"/> | ||||
| <result column="release_json" jdbcType="VARCHAR" property="releaseJson"/> | <result column="release_json" jdbcType="VARCHAR" property="releaseJson"/> | ||||
| <result column="car_support" jdbcType="TINYINT" property="carSupport"/> | <result column="car_support" jdbcType="TINYINT" property="carSupport"/> | ||||
| <result column="store_app" jdbcType="TINYINT" property="storeApp"/> | |||||
| <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | ||||
| <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> | <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> | ||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`app_id`,`type`,`ext_json`,`release_json`,`car_support`,`create_date`,`update_date` | |||||
| `id`,`app_id`,`type`,`ext_json`,`release_json`,`car_support`,`store_app`,`create_date`,`update_date` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -53,4 +54,11 @@ | |||||
| </select> | </select> | ||||
| <select id="getByAppId" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_weapp_ext_set where app_id = #{appId} | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||