| @@ -0,0 +1,2 @@ | |||||
| ALTER TABLE `mallink`.`wx_merchant_b_user` | |||||
| ADD COLUMN `is_admin` smallint(2) DEFAULT 1 AFTER `status`; | |||||
| @@ -5,10 +5,7 @@ import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.douyin.pay.enums.AppAddSubMerchantUrlType; | import com.iformall.douyin.pay.enums.AppAddSubMerchantUrlType; | ||||
| import com.iformall.enums.EnumAppPlat; | |||||
| import com.iformall.enums.EnumMsgSend; | |||||
| import com.iformall.enums.EnumPayWay; | |||||
| import com.iformall.enums.EnumProfitSharingType; | |||||
| import com.iformall.enums.*; | |||||
| import com.iformall.service.*; | import com.iformall.service.*; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| @@ -151,7 +148,7 @@ public class WxMerchantController extends BaseController { | |||||
| } | } | ||||
| } | } | ||||
| @RedisCache(expireTime = 30) | |||||
| @RedisCache() | |||||
| @ApiOperation("获取进件/余额页面") | @ApiOperation("获取进件/余额页面") | ||||
| @GetMapping("/getTtReceiverUrl") | @GetMapping("/getTtReceiverUrl") | ||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | ||||
| @@ -160,6 +157,10 @@ public class WxMerchantController extends BaseController { | |||||
| if(urlType == null || id == null){ | if(urlType == null || id == null){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"请检查传递参数"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"请检查传递参数"); | ||||
| } | } | ||||
| if(!EnumYesOrNo.YES.getCode().equals(getLoginBUser().getIsAdmin())){ | |||||
| return new ResultData(ErrorCode.SYS_AUTH_ERROR); | |||||
| } | |||||
| WxMerchant merchant = wxMerchantService.selectById(id); | WxMerchant merchant = wxMerchantService.selectById(id); | ||||
| if(merchant == null){ | if(merchant == null){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"请检查传递参数"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"请检查传递参数"); | ||||
| @@ -44,6 +44,9 @@ public class WxMerchantBUser extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "绑定状态1未绑定商户0已绑定商户", name = "status") | @io.swagger.annotations.ApiModelProperty(value = "绑定状态1未绑定商户0已绑定商户", name = "status") | ||||
| private Integer status; | private Integer status; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "是否是管理员", name = "isAdmin") | |||||
| private Integer isAdmin; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @io.swagger.annotations.ApiModelProperty(value = "b用户ID", name = "buserId") | @io.swagger.annotations.ApiModelProperty(value = "b用户ID", name = "buserId") | ||||
| private transient Long buserId; | private transient Long buserId; | ||||
| @@ -373,7 +373,8 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| } else { | } else { | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "请填写有效时间类型"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "请填写有效时间类型"); | ||||
| } | } | ||||
| if(!this.validCouponDate(record)) { | |||||
| if(!EnumCouponType.COUPON_DOUYIN.getCode().equals(record.getType()) | |||||
| && !this.validCouponDate(record)) { | |||||
| return new ResultData(ResultData.ERROR,"券有效使用日期必须在30天以内。"); | return new ResultData(ResultData.ERROR,"券有效使用日期必须在30天以内。"); | ||||
| } | } | ||||
| } | } | ||||
| @@ -15,10 +15,12 @@ | |||||
| <result column="expire_time" jdbcType="TIMESTAMP" property="expireTime"/> | <result column="expire_time" jdbcType="TIMESTAMP" property="expireTime"/> | ||||
| <result column="name" jdbcType="VARCHAR" property="name"/> | <result column="name" jdbcType="VARCHAR" property="name"/> | ||||
| <result column="status" jdbcType="INTEGER" property="status"/> | <result column="status" jdbcType="INTEGER" property="status"/> | ||||
| <result column="is_admin" jdbcType="INTEGER" property="isAdmin"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`phone`,`user_pwd`,`merchant_id`,`create_date`,`update_date`,`app_id`,`token`,`expire_time`,`name`,`status` | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`phone`,`user_pwd`,`merchant_id`,`create_date`,`update_date`,`app_id`,`token`,`expire_time`,`name`,`status`,`is_admin` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -76,6 +78,9 @@ | |||||
| <if test=" null != status "> | <if test=" null != status "> | ||||
| and `status` = #{status} | and `status` = #{status} | ||||
| </if> | </if> | ||||
| <if test=" null != isAdmin "> | |||||
| and `is_admin` = #{isAdmin} | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||