新增报课子系统
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
package com.gxwebsoft.booking.controller;
|
package com.gxwebsoft.booking.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||||
|
import com.gxwebsoft.common.core.utils.RequestUtil;
|
||||||
import com.gxwebsoft.common.core.web.BaseController;
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
import com.gxwebsoft.booking.service.TeacherService;
|
import com.gxwebsoft.booking.service.TeacherService;
|
||||||
import com.gxwebsoft.booking.entity.Teacher;
|
import com.gxwebsoft.booking.entity.Teacher;
|
||||||
@@ -10,12 +13,14 @@ import com.gxwebsoft.common.core.web.PageParam;
|
|||||||
import com.gxwebsoft.common.core.web.BatchParam;
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
import com.gxwebsoft.common.system.entity.User;
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import com.gxwebsoft.shop.entity.MerchantAccount;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,12 +60,10 @@ public class TeacherController extends BaseController {
|
|||||||
|
|
||||||
@ApiOperation("添加老师管理")
|
@ApiOperation("添加老师管理")
|
||||||
@PostMapping()
|
@PostMapping()
|
||||||
public ApiResult<?> save(@RequestBody Teacher teacher) {
|
public ApiResult<?> save(@RequestBody Teacher teacher, HttpServletRequest request) {
|
||||||
// 记录当前登录用户id
|
if (teacherService.count(new LambdaQueryWrapper<Teacher>().eq(Teacher::getPhone,teacher.getPhone())) > 0) {
|
||||||
// User loginUser = getLoginUser();
|
return fail("手机号码已存在");
|
||||||
// if (loginUser != null) {
|
}
|
||||||
// teacher.setUserId(loginUser.getUserId());
|
|
||||||
// }
|
|
||||||
if (teacherService.save(teacher)) {
|
if (teacherService.save(teacher)) {
|
||||||
return success("添加成功");
|
return success("添加成功");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,9 +36,15 @@ public class Teacher implements Serializable {
|
|||||||
@ApiModelProperty(value = "老师介绍")
|
@ApiModelProperty(value = "老师介绍")
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "手机号码")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
@ApiModelProperty(value = "商户ID")
|
@ApiModelProperty(value = "商户ID")
|
||||||
private Integer merchantId;
|
private Integer merchantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String comments;
|
private String comments;
|
||||||
|
|
||||||
|
|||||||
@@ -63,8 +63,7 @@ public class MybatisPlusConfig {
|
|||||||
"sys_tenant",
|
"sys_tenant",
|
||||||
"sys_dictionary",
|
"sys_dictionary",
|
||||||
"sys_dictionary_data",
|
"sys_dictionary_data",
|
||||||
"apps_test_data",
|
"apps_test_data"
|
||||||
"shop_merchant_account"
|
|
||||||
).contains(tableName);
|
).contains(tableName);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
"/WW_verify_QMv7HoblYU6z63bb.txt",
|
"/WW_verify_QMv7HoblYU6z63bb.txt",
|
||||||
"/5zbYEPkyV4.txt",
|
"/5zbYEPkyV4.txt",
|
||||||
"/api/love/user-plan-log/wx-pay/**",
|
"/api/love/user-plan-log/wx-pay/**",
|
||||||
"/api/cms/form-record"
|
"/api/cms/form-record",
|
||||||
|
"/api/shop/merchant-account/getMerchantAccountByPhone"
|
||||||
)
|
)
|
||||||
.permitAll()
|
.permitAll()
|
||||||
.anyRequest()
|
.anyRequest()
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||||
import com.gxwebsoft.common.core.utils.RequestUtil;
|
import com.gxwebsoft.common.core.utils.RequestUtil;
|
||||||
import com.gxwebsoft.common.core.web.BaseController;
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
|
import com.gxwebsoft.shop.mapper.MerchantAccountMapper;
|
||||||
import com.gxwebsoft.shop.service.MerchantAccountService;
|
import com.gxwebsoft.shop.service.MerchantAccountService;
|
||||||
import com.gxwebsoft.shop.entity.MerchantAccount;
|
import com.gxwebsoft.shop.entity.MerchantAccount;
|
||||||
import com.gxwebsoft.shop.param.MerchantAccountParam;
|
import com.gxwebsoft.shop.param.MerchantAccountParam;
|
||||||
@@ -34,6 +35,8 @@ import java.util.List;
|
|||||||
public class MerchantAccountController extends BaseController {
|
public class MerchantAccountController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private MerchantAccountService merchantAccountService;
|
private MerchantAccountService merchantAccountService;
|
||||||
|
@Resource
|
||||||
|
private MerchantAccountMapper merchantAccountMapper;
|
||||||
|
|
||||||
@ApiOperation("分页查询商户账号")
|
@ApiOperation("分页查询商户账号")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@@ -123,4 +126,15 @@ public class MerchantAccountController extends BaseController {
|
|||||||
return fail("删除失败");
|
return fail("删除失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据手机号码查询商户账号信息")
|
||||||
|
@GetMapping("/getMerchantAccountByPhone")
|
||||||
|
public ApiResult<MerchantAccount> getMerchantAccountByPhone(MerchantAccountParam param){
|
||||||
|
param.setTenantId(getTenantId());
|
||||||
|
final MerchantAccount merchantAccount = merchantAccountMapper.getMerchantAccountByPhone(param);
|
||||||
|
if(merchantAccount == null){
|
||||||
|
return fail("账号不存在",null);
|
||||||
|
}
|
||||||
|
return success(merchantAccount);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ public class Goods implements Serializable {
|
|||||||
@ApiModelProperty(value = "二级分类")
|
@ApiModelProperty(value = "二级分类")
|
||||||
private String categoryChildren;
|
private String categoryChildren;
|
||||||
|
|
||||||
@ApiModelProperty(value = "规格")
|
@ApiModelProperty(value = "商品规格 0单规格 1多规格")
|
||||||
private String specs;
|
private Integer specs;
|
||||||
|
|
||||||
@ApiModelProperty(value = "货架")
|
@ApiModelProperty(value = "货架")
|
||||||
private String position;
|
private String position;
|
||||||
@@ -76,6 +76,12 @@ public class Goods implements Serializable {
|
|||||||
@ApiModelProperty(value = "库存")
|
@ApiModelProperty(value = "库存")
|
||||||
private Integer stock;
|
private Integer stock;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "库存计算方式(10下单减库存 20付款减库存)")
|
||||||
|
private Integer deductStockType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商品重量")
|
||||||
|
private Integer goodsWeight;
|
||||||
|
|
||||||
@ApiModelProperty(value = "推荐")
|
@ApiModelProperty(value = "推荐")
|
||||||
private Integer recommend;
|
private Integer recommend;
|
||||||
|
|
||||||
@@ -91,6 +97,9 @@ public class Goods implements Serializable {
|
|||||||
@ApiModelProperty(value = "所有人")
|
@ApiModelProperty(value = "所有人")
|
||||||
private Integer userId;
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商户ID")
|
||||||
|
private Integer merchantId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
@TableLogic
|
@TableLogic
|
||||||
private Integer deleted;
|
private Integer deleted;
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ public class Merchant implements Serializable {
|
|||||||
private Integer recommend;
|
private Integer recommend;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否需要审核")
|
@ApiModelProperty(value = "是否需要审核")
|
||||||
private Integer goodsReview;
|
private Boolean goodsReview;
|
||||||
|
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String comments;
|
private String comments;
|
||||||
|
|||||||
@@ -72,4 +72,8 @@ public class MerchantAccount implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String merchantName;
|
private String merchantName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否需要审核")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Boolean goodsReview;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
package com.gxwebsoft.shop.mapper;
|
package com.gxwebsoft.shop.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import com.gxwebsoft.common.system.param.UserParam;
|
||||||
import com.gxwebsoft.shop.entity.MerchantAccount;
|
import com.gxwebsoft.shop.entity.MerchantAccount;
|
||||||
import com.gxwebsoft.shop.param.MerchantAccountParam;
|
import com.gxwebsoft.shop.param.MerchantAccountParam;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -34,4 +37,7 @@ public interface MerchantAccountMapper extends BaseMapper<MerchantAccount> {
|
|||||||
*/
|
*/
|
||||||
List<MerchantAccount> selectListRel(@Param("param") MerchantAccountParam param);
|
List<MerchantAccount> selectListRel(@Param("param") MerchantAccountParam param);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
MerchantAccount getMerchantAccountByPhone(@Param("param") MerchantAccountParam param);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,9 @@
|
|||||||
<if test="param.userId != null">
|
<if test="param.userId != null">
|
||||||
AND a.user_id = #{param.userId}
|
AND a.user_id = #{param.userId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.merchantId != null">
|
||||||
|
AND a.merchant_id = #{param.merchantId}
|
||||||
|
</if>
|
||||||
<if test="param.deleted != null">
|
<if test="param.deleted != null">
|
||||||
AND a.deleted = #{param.deleted}
|
AND a.deleted = #{param.deleted}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<!-- 关联查询sql -->
|
<!-- 关联查询sql -->
|
||||||
<sql id="selectSql">
|
<sql id="selectSql">
|
||||||
SELECT a.*,b.merchant_name
|
SELECT a.*,b.merchant_name,b.goods_review
|
||||||
FROM shop_merchant_account a
|
FROM shop_merchant_account a
|
||||||
LEFT JOIN shop_merchant b ON a.merchant_id = b.merchant_id
|
LEFT JOIN shop_merchant b ON a.merchant_id = b.merchant_id
|
||||||
<where>
|
<where>
|
||||||
@@ -55,4 +55,7 @@
|
|||||||
<include refid="selectSql"></include>
|
<include refid="selectSql"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getMerchantAccountByPhone" resultType="com.gxwebsoft.shop.entity.MerchantAccount">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public class GoodsParam extends BaseParam {
|
|||||||
private String categoryChildren;
|
private String categoryChildren;
|
||||||
|
|
||||||
@ApiModelProperty(value = "规格")
|
@ApiModelProperty(value = "规格")
|
||||||
private String specs;
|
private Integer specs;
|
||||||
|
|
||||||
@ApiModelProperty(value = "货架")
|
@ApiModelProperty(value = "货架")
|
||||||
private String position;
|
private String position;
|
||||||
|
|||||||
Reference in New Issue
Block a user