商品查询修改

This commit is contained in:
wangguocheng
2024-05-17 10:28:43 +08:00
parent 7b259ba55f
commit 1c6ccb7d10
13 changed files with 247 additions and 38 deletions

View File

@@ -1,10 +1,12 @@
server:
port: 10587
spring:
application:
name: cashierService
datasource:
url: jdbc:mysql://121.40.128.145:3306/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
username: root
password: mysqlroot@123
url: jdbc:mysql://101.37.12.135:3306/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
username: fycashier
password: Twc6MrzzjBiWSsjh
driver-class-name: com.mysql.cj.jdbc.Driver
initialSize: 5
minIdle: 5

View File

@@ -1,6 +1,6 @@
spring:
profiles:
active: hph
active: prod2
server:
servlet:
context-path: /cashier-client/

View File

@@ -6,7 +6,7 @@
<generatorConfiguration>
<!-- 需要指明数据库连接器的绝对路径 -->
<!-- <classPathEntry location="C:\Users\admin\.m1\repository\mysql\mysql-connector-java\8.0.20\mysql-connector-java-8.0.20.jar" />-->
<classPathEntry location="E:\app\maven\repository\mysql\mysql-connector-java\8.0.17\mysql-connector-java-8.0.17.jar"/>
<classPathEntry location="/Users/wangguocheng/Desktop/app/maven/repository/mysql/mysql-connector-java/8.0.17/mysql-connector-java-8.0.17.jar"/>
<context id="msqlTables" targetRuntime="MyBatis3">
<!-- 生成的pojo将implements Serializable-->
<plugin type="org.mybatis.generator.plugins.SerializablePlugin"></plugin>
@@ -19,8 +19,8 @@
<!-- 数据库链接URL、用户名、密码 -->
<jdbcConnection connectionURL="jdbc:mysql://121.40.128.145:3306/fycashier?useUnicode=true&amp;characterEncoding=utf-8&amp;useSSL=false&amp;serverTimezone=GMT%2B8"
driverClass="com.mysql.cj.jdbc.Driver" password="mysqlroot@123" userId="root" >
<jdbcConnection connectionURL="jdbc:mysql://101.37.12.135:3306/fycashier?useUnicode=true&amp;characterEncoding=utf-8&amp;useSSL=false&amp;serverTimezone=GMT%2B8"
driverClass="com.mysql.cj.jdbc.Driver" password="Twc6MrzzjBiWSsjh" userId="fycashier" >
<property name="nullCatalogMeansCurrent" value="true"/>
</jdbcConnection>
@@ -37,28 +37,31 @@
也可以使用“MAVEN”来自动生成这样生成的代码会在target/generatord-source目录下
-->
<!--<javaModelGenerator targetPackage="com.forezp.entity" targetProject="MAVEN">-->
<javaModelGenerator targetPackage="com.chaozhanggui.system.cashierservice.entity" targetProject="src\main\java">
<javaModelGenerator targetPackage="com.chaozhanggui.system.cashierservice.entity" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
<!-- 从数据库返回的值被清理前后的空格 -->
<property name="trimStrings" value="true" />
</javaModelGenerator>
<sqlMapGenerator targetPackage="mapper" targetProject="src\main\resources">
<sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<javaClientGenerator type="XMLMAPPER" targetPackage="com.chaozhanggui.system.cashierservice.dao" targetProject="src\main\java">
<javaClientGenerator type="XMLMAPPER" targetPackage="com.chaozhanggui.system.cashierservice.dao" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 要生成的表tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
<!-- <table tableName="%" schema="fycashier" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
<table tableName="tb_shop_user_duty_pay" domainObjectName="ShopUserDutyPay"
<table tableName="tb_order_child_info" domainObjectName="OrderChildInfo"
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false" >
</table>
<table tableName="tb_order_child_detail" domainObjectName="OrderChildDetail"
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false" >
</table>
</context>
</generatorConfiguration>

View File

@@ -228,6 +228,10 @@
<select id="selectByOrderId" resultType="java.math.BigDecimal">
select IFNULL(sum(price_amount),0) from tb_order_detail where order_id=#{orderId} and `status`='refund'
</select>
<select id="selectByOrderIdAndSkuId"
resultType="com.chaozhanggui.system.cashierservice.entity.TbOrderDetail">
select * from tb_order_detail where order_id = #{orderId} and product_sku_id = #{skuId}
</select>
<update id="updateStatusByOrderIdAndStatus">
update tb_order_detail set status = #{status} where order_id = #{orderId} and status='unpaid'

View File

@@ -537,4 +537,9 @@
<select id="selectAllByStatus" resultMap="BaseResultMap">
select * from tb_order_info where `status`=#{status} and order_type !='miniapp'
</select>
<select id="selectByTradeAndMasterId"
resultType="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo">
select * from tb_order_info where trade_day = #{day} and table_id = #{masterId} and shop_id = #{shopId}
</select>
</mapper>

View File

@@ -883,7 +883,7 @@
</update>
<select id="selectByShopId" resultMap="ResultMapWithBLOBs">
select * from tb_product where shop_id=#{shopId} and status=1 and is_show_cash = 1
select * from tb_product where shop_id=#{shopId} and status=1 and is_show_cash = 1 and type_enum in ('normal','sku','currentPrice','weight')
<if test="commdityName != null and commdityName!='' ">
and name like CONCAT('%',#{commdityName},'%')
</if>
@@ -893,7 +893,7 @@
<select id="selectByShopIdAndShopType" resultMap="ResultMapWithBLOBs">
select * from tb_product where shop_id=#{shopId} and status=1 and category_id=#{categoryId} and is_show_cash = 1
select * from tb_product where shop_id=#{shopId} and status=1 and category_id=#{categoryId} and is_show_cash = 1 and type_enum in ('normal','sku','currentPrice','weight')
<if test="commdityName != null and commdityName!='' ">
and name like CONCAT('%',#{commdityName},'%')