springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/VolunteerMerchantVO.java
New file @@ -0,0 +1,156 @@ package com.panzhihua.common.model.vos.community; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.Date; @Data @Builder @AllArgsConstructor @NoArgsConstructor @ApiModel("路北商家表") public class VolunteerMerchantVO implements Serializable { private static final long serialVersionUID = -70884515430727555L; /** * 主键 */ @ApiModelProperty(value = "主键") private String id; /** * 活动名称 */ @ApiModelProperty(value = "活动名称") private String name; /** * 商家类型 */ @ApiModelProperty(value = "商家类型") private String merchantType; /** * 商家logo封面 */ @ApiModelProperty(value = "商家logo封面") private String logoUrl; /** * 商家地址 */ @ApiModelProperty(value = "商家地址") private String address; /** * 纬度 */ @ApiModelProperty(value = "纬度") private String lat; /** * 经度 */ @ApiModelProperty(value = "经度") private String lon; /** * 管理员id */ @ApiModelProperty(value = "管理员id") private String userId; /** * 对外服务电话 */ @ApiModelProperty(value = "对外服务电话") private String serviceCall; /** * 商家简介 */ @ApiModelProperty(value = "商家简介") private String merchantContent; /** * 商家图片 */ @ApiModelProperty(value = "商家图片") private String merchantUrl; /** * 法人名字 */ @ApiModelProperty(value = "法人名字") private String legalPersonName; /** * 法人联系电话 */ @ApiModelProperty(value = "法人联系电话") private String legalPersonPhone; /** * 法人身份证 */ @ApiModelProperty(value = "法人身份证") private String legalPersonIdCard; /** * 社区id */ @ApiModelProperty(value = "社区id") private String communityId; /** * 营业状态(1每天 2周一到周五 3周末) */ @ApiModelProperty(value = "营业状态(1每天 2周一到周五 3周末)") private String businessType; /** * 营业开始时间 */ @ApiModelProperty(value = "营业开始时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date businessStartTime; /** * 营业结束时间 */ @ApiModelProperty(value = "营业结束时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date businessEndTime; /** * 活动名称 */ @ApiModelProperty(value = "商家状态0禁用 1启用") private String merchantState; /** * 活动名称 */ @ApiModelProperty(value = "商家折扣") private String merchantDiscount; /** * 创建时间 */ @ApiModelProperty(value = "创建时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date creationTime; /** * 更新时间 */ @ApiModelProperty(value = "更新时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date updateTime; @TableField(exist = false) @ApiModelProperty(value = "商家联系电话") private String merchantPhone; @TableField(exist = false) @ApiModelProperty(value = "商家联系人") private String merchantLinkman; @TableField(exist = false) @ApiModelProperty(value = "商家类型名称") private String merchantTypeName; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -11529,7 +11529,7 @@ * @param * @return */ @GetMapping("order/getList") @GetMapping("/VolunteerIntegralMerchant/order/getList") public R getList(@RequestParam("pageNum") int pageNum, @RequestParam("pageSize") int pageSize, @RequestParam(value = "goodsId", required = false) String goodsId, @@ -11545,7 +11545,7 @@ * @param id * @return */ @GetMapping("order/getData") @GetMapping("/VolunteerIntegralMerchant/order/getData") public R getData(@RequestParam("id") String id); /** @@ -11553,7 +11553,7 @@ * @param * @return */ @PostMapping("/order/insertData") @PostMapping("/VolunteerIntegralMerchant/order/insertData") public R insertData(@RequestBody VolunteerCreditsExchangeVO item); /** @@ -11561,7 +11561,7 @@ * @param item * @return */ @PostMapping("/order/update") @PostMapping("/VolunteerIntegralMerchant/order/update") public R update(@RequestBody VolunteerCreditsExchangeVO item); /** @@ -11569,7 +11569,7 @@ * @param id * @return */ @DeleteMapping("/order/delete") @DeleteMapping("/VolunteerIntegralMerchant/order/delete") public R delete(@RequestParam("id") String id); /** @@ -11577,7 +11577,7 @@ * @param id * @return */ @GetMapping("/order/conditionData") @GetMapping("/VolunteerIntegralMerchant/order/conditionData") public R conditionData(@RequestParam("id") String id); springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/VolunteerTypeApi.java
@@ -99,9 +99,11 @@ } /** /**************************************************************************** * * 商家状态 */ * ********************************************************************************/ /** * 分页查询 * @param springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/VolunteerMerchantDao.java
New file @@ -0,0 +1,45 @@ package com.panzhihua.service_community.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.vos.community.VolunteerMerchantVO; import com.panzhihua.common.model.vos.community.VolunteerTypeVO; import com.panzhihua.service_community.entity.VolunteerMerchant; import com.panzhihua.service_community.entity.VolunteerType; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @Mapper public interface VolunteerMerchantDao extends BaseMapper<VolunteerMerchant> { /** * 分页查询 * @param * @return */ IPage<VolunteerMerchant> getList(Page page, @Param("merchantState") String merchantState, @Param("merchantType") String merchantType, @Param("name") String name, @Param("communityId") String communityId); /** * 新增 * @param * @return */ int insertData(@Param("vtvo") VolunteerMerchantVO vtvo); int Update(@Param("vtvo") VolunteerMerchantVO vtvo); int delete(@Param("id") String id); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/VolunteerMerchant.java
New file @@ -0,0 +1,156 @@ package com.panzhihua.service_community.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.Date; @Data @Builder @AllArgsConstructor @NoArgsConstructor @ApiModel("路北商家表") public class VolunteerMerchant implements Serializable { private static final long serialVersionUID = -70884515430727555L; /** * 主键 */ @ApiModelProperty(value = "主键") private String id; /** * 活动名称 */ @ApiModelProperty(value = "活动名称") private String name; /** * 商家类型 */ @ApiModelProperty(value = "商家类型") private String merchantType; /** * 商家logo封面 */ @ApiModelProperty(value = "商家logo封面") private String logoUrl; /** * 商家地址 */ @ApiModelProperty(value = "商家地址") private String address; /** * 纬度 */ @ApiModelProperty(value = "纬度") private String lat; /** * 经度 */ @ApiModelProperty(value = "经度") private String lon; /** * 管理员id */ @ApiModelProperty(value = "管理员id") private String userId; /** * 对外服务电话 */ @ApiModelProperty(value = "对外服务电话") private String serviceCall; /** * 商家简介 */ @ApiModelProperty(value = "商家简介") private String merchantContent; /** * 商家图片 */ @ApiModelProperty(value = "商家图片") private String merchantUrl; /** * 法人名字 */ @ApiModelProperty(value = "法人名字") private String legalPersonName; /** * 法人联系电话 */ @ApiModelProperty(value = "法人联系电话") private String legalPersonPhone; /** * 法人身份证 */ @ApiModelProperty(value = "法人身份证") private String legalPersonIdCard; /** * 社区id */ @ApiModelProperty(value = "社区id") private String communityId; /** * 营业状态(1每天 2周一到周五 3周末) */ @ApiModelProperty(value = "营业状态(1每天 2周一到周五 3周末)") private String businessType; /** * 营业开始时间 */ @ApiModelProperty(value = "营业开始时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date businessStartTime; /** * 营业结束时间 */ @ApiModelProperty(value = "营业结束时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date businessEndTime; /** * 活动名称 */ @ApiModelProperty(value = "商家状态0禁用 1启用") private String merchantState; /** * 活动名称 */ @ApiModelProperty(value = "商家折扣") private String merchantDiscount; /** * 创建时间 */ @ApiModelProperty(value = "创建时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date creationTime; /** * 更新时间 */ @ApiModelProperty(value = "更新时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date updateTime; @TableField(exist = false) @ApiModelProperty(value = "商家联系电话") private String merchantPhone; @TableField(exist = false) @ApiModelProperty(value = "商家联系人") private String merchantLinkman; @TableField(exist = false) @ApiModelProperty(value = "商家类型名称") private String merchantTypeName; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/VolunteerMerchantMapper.xml
New file @@ -0,0 +1,284 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.panzhihua.service_community.dao.VolunteerMerchantDao"> <resultMap type="com.panzhihua.service_community.entity.VolunteerMerchant" id="VolunteerMerchantMap"> <result property="id" column="id" /> <result property="name" column="name" /> <result property="merchantType" column="merchant_type" /> <result property="logoUrl" column="logo_url" /> <result property="address" column="address" /> <result property="lat" column="lat" /> <result property="lon" column="lon" /> <result property="userId" column="user_id" /> <result property="serviceCall" column="service_call" /> <result property="merchantContent" column="merchant_content" /> <result property="merchantUrl" column="merchant_url" /> <result property="legalPersonName" column="legal_person_name" /> <result property="legalPersonPhone" column="legal_person_phone" /> <result property="legalPersonIdCard" column="legal_person_id_card" /> <result property="communityId" column="community_id" /> <result property="businessType" column="business_type" /> <result property="businessStartTime" column="business_start_time" /> <result property="businessEndTime" column="business_end_time" /> <result property="merchantState" column="merchant_state" /> <result property="merchantDiscount" column="merchant_discount" /> <result property="creationTime" column="creation_time" /> <result property="updateTime" column="update_time" /> </resultMap> <sql id="beas_sql"> id, name, merchant_type, logo_url, address, lat, lon, user_id, (select su.phone from sys_user as su where su.user_id=volunteer_merchant.user_id) as merchantPhone, (select su.name from sys_user as su where su.user_id=volunteer_merchant.user_id) as merchantLinkman, (select vt.name from volunteer_type as vt where vt.id=volunteer_merchant.merchant_type) as merchantTypeName, service_call, merchant_content, merchant_url, legal_person_name, legal_person_phone, legal_person_id_card, community_id, business_type, business_start_time, business_end_time, merchant_state, merchant_discount, creation_time, update_time </sql> <!-- 分页查询 --> <select id="getList" resultMap="VolunteerMerchantMap"> select <include refid="beas_sql"/> from volunteer_merchant <where> 1=1 <if test="communityId!=null"> and community_id=#{communityId} </if> <if test="merchantState !=null"> and merchant_state=#{merchantState} </if> <if test="merchantType !=null "> and merchant_type=#{merchantType} </if> <if test="name !=null "> and name=#{name} </if> </where> order by creation_time desc </select> <insert id="insertData"> insert into volunteer_merchant <trim prefix="(" suffix=")" suffixOverrides=","> <if test="vtvo.id != null"> id, </if> <if test="vtvo.name != null"> name, </if> <if test="vtvo.merchantType != null"> merchant_type, </if> <if test="vtvo.logoUrl != null"> logo_url, </if> <if test="vtvo.address != null"> address, </if> <if test="vtvo.lat != null"> lat, </if> <if test="vtvo.lon != null"> lon, </if> <if test="vtvo.userId != null"> user_id, </if> <if test="vtvo.serviceCall != null"> service_call, </if> <if test="vtvo.merchantContent != null"> merchant_content, </if> <if test="vtvo.merchantUrl != null"> merchant_url, </if> <if test="vtvo.legalPersonName != null"> legal_person_name, </if> <if test="vtvo.legalPersonPhone != null"> legal_person_phone, </if> <if test="vtvo.legalPersonIdCard != null"> legal_person_id_card, </if> <if test="vtvo.communityId != null"> community_id, </if> <if test="vtvo.businessType != null"> business_type, </if> <if test="vtvo.businessStartTime != null"> business_start_time, </if> <if test="vtvo.businessEndTime != null"> business_end_time, </if> <if test="vtvo.merchantState != null"> merchant_state, </if> <if test="vtvo.merchantDiscount != null"> merchant_discount, </if> creation_time </trim> values <trim prefix="(" suffix=")" suffixOverrides=","> <if test="vtvo.id != null"> #{vtvo.id}, </if> <if test="vtvo.name != null"> #{vtvo.name}, </if> <if test="vtvo.merchantType != null"> #{vtvo.merchantType}, </if> <if test="vtvo.logoUrl != null"> #{vtvo.logoUrl}, </if> <if test="vtvo.address != null"> #{vtvo.address}, </if> <if test="vtvo.lat != null"> #{vtvo.lat}, </if> <if test="vtvo.lon != null"> #{vtvo.lon}, </if> <if test="vtvo.userId != null"> #{vtvo.userId}, </if> <if test="vtvo.serviceCall != null"> #{vtvo.serviceCall}, </if> <if test="vtvo.merchantContent != null"> #{vtvo.merchantContent}, </if> <if test="vtvo.merchantUrl != null"> #{vtvo.merchantUrl}, </if> <if test="vtvo.legalPersonName != null"> #{vtvo.legalPersonName}, </if> <if test="vtvo.legalPersonPhone != null"> #{vtvo.legalPersonPhone}, </if> <if test="vtvo.legalPersonIdCard != null"> #{vtvo.legalPersonIdCard}, </if> <if test="vtvo.communityId != null"> #{vtvo.communityId}, </if> <if test="vtvo.businessType != null"> #{vtvo.businessType}, </if> <if test="vtvo.businessStartTime != null"> #{vtvo.businessStartTime}, </if> <if test="vtvo.businessEndTime != null"> #{vtvo.businessEndTime}, </if> <if test="vtvo.merchantState != null"> #{vtvo.merchantState}, </if> <if test="vtvo.merchantDiscount != null"> #{vtvo.merchantDiscount}, </if> sysdate() </trim> </insert> <update id="Update"> update volunteer_merchant <set> <if test="vtvo.id != null"> id=#{vtvo.id}, </if> <if test="vtvo.name != null"> name=#{vtvo.name}, </if> <if test="vtvo.merchantType != null"> merchant_type=#{vtvo.merchantType}, </if> <if test="vtvo.logoUrl != null"> logo_url=#{vtvo.logoUrl}, </if> <if test="vtvo.address != null"> address=#{vtvo.address}, </if> <if test="vtvo.lat != null"> lat=#{vtvo.lat}, </if> <if test="vtvo.lon != null"> lon=#{vtvo.lon}, </if> <if test="vtvo.userId != null"> user_id=#{vtvo.userId}, </if> <if test="vtvo.serviceCall != null"> service_call=#{vtvo.serviceCall}, </if> <if test="vtvo.merchantContent != null"> merchant_content=#{vtvo.merchantContent}, </if> <if test="vtvo.merchantUrl != null"> merchant_url=#{vtvo.merchantUrl}, </if> <if test="vtvo.legalPersonName != null"> legal_person_name=#{vtvo.legalPersonName}, </if> <if test="vtvo.legalPersonPhone != null"> legal_person_phone=#{vtvo.legalPersonPhone}, </if> <if test="vtvo.legalPersonIdCard != null"> legal_person_id_card=#{vtvo.legalPersonIdCard}, </if> <if test="vtvo.communityId != null"> community_id=#{vtvo.communityId}, </if> <if test="vtvo.businessType != null"> business_type=#{vtvo.businessType}, </if> <if test="vtvo.businessStartTime != null"> business_start_time=#{vtvo.businessStartTime}, </if> <if test="vtvo.businessEndTime != null"> business_end_time=#{vtvo.businessEndTime}, </if> <if test="vtvo.merchantState != null"> merchant_state=#{vtvo.id}, </if> <if test="vtvo.merchantDiscount != null"> merchant_discount=#{vtvo.id}, </if> update_time=sysdate() </set> where id = #{volunteerTypeVO.id} </update> <delete id="delete" parameterType="String"> delete from volunteer_merchant where id=#{id} </delete> </mapper>