| @@ -160,4 +160,31 @@ public class WxMall extends TenantEntity { | |||||
| } | } | ||||
| } | } | ||||
| @io.swagger.annotations.ApiModelProperty(value="管理员姓名",name="adminName") | |||||
| @TableField(exist = false) | |||||
| private Long adminId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="管理员姓名",name="adminName") | |||||
| @TableField(exist = false) | |||||
| private String adminName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="管理员电话",name="adminPhone") | |||||
| @TableField(exist = false) | |||||
| private String adminPhone; | |||||
| @io.swagger.annotations.ApiModelProperty(value="管理员登陆帐号",name="adminUsername") | |||||
| @TableField(exist = false) | |||||
| private String adminUsername; | |||||
| @io.swagger.annotations.ApiModelProperty(value="管理员登陆密码",name="adminPassword") | |||||
| private String adminPassword; | |||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value="查询-开始时间",name="startTime") | |||||
| private Date startTime; | |||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="endTime") | |||||
| private Date endTime; | |||||
| } | } | ||||
| @@ -96,7 +96,7 @@ public class TtCoupon extends TenantEntity { | |||||
| private String dyTitle; | private String dyTitle; | ||||
| @io.swagger.annotations.ApiModelProperty(value="总库存",name="inventory") | @io.swagger.annotations.ApiModelProperty(value="总库存",name="inventory") | ||||
| private Integer inventory; | private Integer inventory; | ||||
| @io.swagger.annotations.ApiModelProperty(value="购买须知",name="remark") | |||||
| @io.swagger.annotations.ApiModelProperty(value="备注",name="remark") | |||||
| private String remark; | private String remark; | ||||
| @io.swagger.annotations.ApiModelProperty(value="状态",name="status") | @io.swagger.annotations.ApiModelProperty(value="状态",name="status") | ||||
| private Integer status; | private Integer status; | ||||
| @@ -3,6 +3,7 @@ package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxMall; | import com.iformall.domain.po.WxMall; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.plugin.autoTenantId.TenantInfo; | |||||
| import org.apache.ibatis.annotations.Param; | import org.apache.ibatis.annotations.Param; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -13,7 +14,7 @@ public interface WxMallMapper extends CommonMapper<WxMall, Long> { | |||||
| WxMall getByTenantId(String tenantId); | WxMall getByTenantId(String tenantId); | ||||
| WxMall getByTenantInfo(WxMall wxMall); | |||||
| WxMall getByTenantInfo(TenantEntity tenantEntity); | |||||
| String queryMenusByTenantId(String tenantId); | String queryMenusByTenantId(String tenantId); | ||||
| @@ -24,4 +25,6 @@ public interface WxMallMapper extends CommonMapper<WxMall, Long> { | |||||
| List<WxMall> listAsSelectMall(@Param(value = "id")Long id); | List<WxMall> listAsSelectMall(@Param(value = "id")Long id); | ||||
| List<TenantEntity> getTenantEntitys(TenantEntity tenantEntity); | List<TenantEntity> getTenantEntitys(TenantEntity tenantEntity); | ||||
| List<WxMall> findListAadmin(WxMall record); | |||||
| } | } | ||||
| @@ -84,4 +84,6 @@ public interface WxMallService { | |||||
| List<WxMall> listAsSelectMall(Long id); | List<WxMall> listAsSelectMall(Long id); | ||||
| List<TenantEntity> getTenantEntitys(TenantEntity tenantEntity); | List<TenantEntity> getTenantEntitys(TenantEntity tenantEntity); | ||||
| PageInfo<WxMall> listAadminAsPage(WxMall wxMall, Integer pageNum, Integer pageSize); | |||||
| } | } | ||||
| @@ -736,9 +736,9 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| @Override | @Override | ||||
| public void exportOweBill(WxBillAll wxBillAll, HttpServletRequest request, HttpServletResponse response) { | public void exportOweBill(WxBillAll wxBillAll, HttpServletRequest request, HttpServletResponse response) { | ||||
| //商场名称 | //商场名称 | ||||
| WxMall q = new WxMall(); | |||||
| q.setTenantInfo(wxBillAll); | |||||
| WxMall wxMall = wxMallMapper.getByTenantInfo(q); | |||||
| // WxMall q = new WxMall(); | |||||
| // q.setTenantInfo(wxBillAll); | |||||
| WxMall wxMall = wxMallMapper.getByTenantInfo(wxBillAll); | |||||
| //映射结果 | //映射结果 | ||||
| Map<String, Object> result = new HashMap<>(); | Map<String, Object> result = new HashMap<>(); | ||||
| result.put("mall", wxMall.getName()); | result.put("mall", wxMall.getName()); | ||||
| @@ -900,9 +900,9 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| //映射结果 | //映射结果 | ||||
| Map<String, Object> result = new HashMap<>(); | Map<String, Object> result = new HashMap<>(); | ||||
| WxMall q = new WxMall(); | |||||
| q.setTenantInfo(wxBillSettle); | |||||
| WxMall wxMall = wxMallMapper.getByTenantInfo(q); | |||||
| // WxMall q = new WxMall(); | |||||
| // q.setTenantInfo(wxBillSettle); | |||||
| WxMall wxMall = wxMallMapper.getByTenantInfo(wxBillSettle); | |||||
| result.put("mall", wxMall.getName()); | result.put("mall", wxMall.getName()); | ||||
| result.put("merchant", wxMerchantMapper.selectById(wxBillSettle.getMerchantId()).getName()); | result.put("merchant", wxMerchantMapper.selectById(wxBillSettle.getMerchantId()).getName()); | ||||
| result.put("num", wxBillSettle.getSettleNumber()); | result.put("num", wxBillSettle.getSettleNumber()); | ||||
| @@ -253,4 +253,10 @@ public class WxMallServiceImpl implements WxMallService { | |||||
| } | } | ||||
| } | } | ||||
| @Override | |||||
| public PageInfo<WxMall> listAadminAsPage(WxMall record, Integer pageNum, Integer pageSize) { | |||||
| return PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxMallMapper.findListAadmin(record)); | |||||
| } | |||||
| } | } | ||||
| @@ -56,7 +56,7 @@ public interface TtCouponService { | |||||
| ResultData auditPass(Long id); | ResultData auditPass(Long id); | ||||
| ResultData auditRejected(Long id); | |||||
| ResultData auditRejected(Long id,String remark); | |||||
| int addSeeCount(Long id); | int addSeeCount(Long id); | ||||
| @@ -245,13 +245,14 @@ public class TtCouponServiceImpl implements TtCouponService { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"此课程状态不在审核中"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"此课程状态不在审核中"); | ||||
| } | } | ||||
| byId.setStatus(EnumTtCouponStatus.TTCOUPON_STATUS_BEFOR_SHELF.getCode()); | byId.setStatus(EnumTtCouponStatus.TTCOUPON_STATUS_BEFOR_SHELF.getCode()); | ||||
| byId.setRemark(""); | |||||
| byId.setUpdateDate(new Date()); | byId.setUpdateDate(new Date()); | ||||
| ttCouponMapper.updateById(byId); | ttCouponMapper.updateById(byId); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData auditRejected(Long id) { | |||||
| public ResultData auditRejected(Long id,String remark) { | |||||
| TtCoupon byId = this.getById(id); | TtCoupon byId = this.getById(id); | ||||
| if(byId == null){ | if(byId == null){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"未找到课程"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"未找到课程"); | ||||
| @@ -260,6 +261,7 @@ public class TtCouponServiceImpl implements TtCouponService { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"此课程状态不在审核中"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"此课程状态不在审核中"); | ||||
| } | } | ||||
| byId.setStatus(EnumTtCouponStatus.TTCOUPON_STATUS_REJECT.getCode()); | byId.setStatus(EnumTtCouponStatus.TTCOUPON_STATUS_REJECT.getCode()); | ||||
| byId.setRemark(remark); | |||||
| byId.setUpdateDate(new Date()); | byId.setUpdateDate(new Date()); | ||||
| ttCouponMapper.updateById(byId); | ttCouponMapper.updateById(byId); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| @@ -40,6 +40,12 @@ | |||||
| <result column="cash_out_limit" jdbcType="INTEGER" property="cashOutLimit"/> | <result column="cash_out_limit" jdbcType="INTEGER" property="cashOutLimit"/> | ||||
| <result column="alipay_app_auth_token" jdbcType="VARCHAR" property="alipayAppAuthToken"/> | <result column="alipay_app_auth_token" jdbcType="VARCHAR" property="alipayAppAuthToken"/> | ||||
| <result column="alipay_member_template_id" jdbcType="VARCHAR" property="alipayMemberTemplateId"/> | <result column="alipay_member_template_id" jdbcType="VARCHAR" property="alipayMemberTemplateId"/> | ||||
| <result column="admin_id" jdbcType="BIGINT" property="adminId"/> | |||||
| <result column="admin_name" jdbcType="VARCHAR" property="adminName"/> | |||||
| <result column="admin_phone" jdbcType="VARCHAR" property="adminPhone"/> | |||||
| <result column="admin_username" jdbcType="VARCHAR" property="adminUsername"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| @@ -52,7 +58,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} | ||||
| @@ -151,7 +157,6 @@ | |||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||
| from wx_mall | from wx_mall | ||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| and id > 1 | |||||
| </select> | </select> | ||||
| @@ -170,11 +175,17 @@ | |||||
| from wx_mall | from wx_mall | ||||
| where `tenant_id` = #{value} | where `tenant_id` = #{value} | ||||
| </select> | </select> | ||||
| <select id="getByTenantInfo" parameterType="com.iformall.domain.po.WxMall" resultMap="BaseResultMap"> | |||||
| <select id="getByTenantInfo" parameterType="com.iformall.domain.po.base.TenantEntity" resultMap="BaseResultMap"> | |||||
| select | select | ||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||
| from wx_mall | from wx_mall | ||||
| <include refid="dynamicWhereConditions"/> | |||||
| where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| </select> | </select> | ||||
| <select id="queryMenusByTenantId" parameterType="string" resultType="string"> | <select id="queryMenusByTenantId" parameterType="string" resultType="string"> | ||||
| @@ -217,4 +228,41 @@ | |||||
| </if> | </if> | ||||
| </select> | </select> | ||||
| <select id="findList" parameterType="com.iformall.domain.po.WxMall" resultMap="BaseResultMap"> | |||||
| select | |||||
| m.`id`,m.`tenant_id`,m.`parent_tenant_id`,m.`name`,m.`group`,m.`country`,m.`province`,m.`city`,m.`addr`, | |||||
| m.`service_phone`,m.`valid_start`, m.`valid_end`, | |||||
| mui.`id` admin_id,mui.`username` admin_username,mui.`name` admin_name,mui.`phone` admin_phone | |||||
| from wx_mall m | |||||
| left join mall_user_info mui on m.tenant_id = mui.tenant_id and mui.is_admin = 1 | |||||
| where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and m.`tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and m.`parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != name "> | |||||
| and m.`name` like concat('%', #{name},'%') | |||||
| </if> | |||||
| <if test=" null != startTime "> | |||||
| and m.`valid_start` >= #{startTime} | |||||
| </if> | |||||
| <if test=" null != endTime"> | |||||
| and m.`valid_start` < #{endTime} | |||||
| </if> | |||||
| <if test=" null != adminName "> | |||||
| and mui.`name` like concat('%', #{adminName},'%') | |||||
| </if> | |||||
| <if test=" null != adminPhone"> | |||||
| and mui.`phone` like concat('%', #{adminPhone},'%') | |||||
| </if> | |||||
| <if test=" null != adminUsername "> | |||||
| and mui.`username` like concat('%', #{adminUsername},'%') | |||||
| </if> | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||
| @@ -143,7 +143,7 @@ public class BaseController { | |||||
| info.setTenantId(info.getParentTenantId()); | info.setTenantId(info.getParentTenantId()); | ||||
| info.setParentTenantId(null); | info.setParentTenantId(null); | ||||
| if(getUser().getParentTenantId().equals(info.getTenantId())){ | |||||
| if(getUser().getTenantId().equals(info.getTenantId())){ | |||||
| return info; | return info; | ||||
| } | } | ||||
| } | } | ||||
| @@ -1,6 +1,9 @@ | |||||
| package com.iformall.controller.basic; | package com.iformall.controller.basic; | ||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.annotation.TenantIgnore; | |||||
| import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.WxMall; | import com.iformall.domain.po.WxMall; | ||||
| @@ -19,6 +22,24 @@ public class WxMallController extends BaseController { | |||||
| @Autowired | @Autowired | ||||
| private WxMallService wxMallService; | private WxMallService wxMallService; | ||||
| @ApiOperation("查询商场集团列表") | |||||
| @GetMapping(value = "/listAadmin") | |||||
| @SystemControllerLog(description = "商场基础数据") | |||||
| public ResultData getlistAadmin(@ModelAttribute WxMall wxMall, Integer pageNum, Integer pageSize) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::getMallList"); | |||||
| try { | |||||
| if(wxMall == null){ | |||||
| wxMall = new WxMall(); | |||||
| } | |||||
| wxMall.setTenantInfo(getTenantInfo()); | |||||
| PageInfo<WxMall> page = wxMallService.listAadminAsPage(wxMall, pageNum, pageSize); | |||||
| return new ResultData(page); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| @ApiOperation("根据id更新接口") | @ApiOperation("根据id更新接口") | ||||
| @PostMapping("update") | @PostMapping("update") | ||||
| @SystemControllerLog(description = "商城-更新") | @SystemControllerLog(description = "商城-更新") | ||||
| @@ -354,7 +354,7 @@ public class TtCouponController extends BaseController { | |||||
| logger.error(e.getMessage()); | logger.error(e.getMessage()); | ||||
| return new ResultData(e.getErrorCode(), e.getMessage()); | return new ResultData(e.getErrorCode(), e.getMessage()); | ||||
| } | } | ||||
| return ttCouponService.auditRejected(record.getId()); | |||||
| return ttCouponService.auditRejected(record.getId(),record.getRemark()); | |||||
| } | } | ||||
| } | } | ||||